/* ===================================
   Ponpes IC At Tauhid - Custom Styles
   =================================== */

:root {
    /* Warna Tema Islami */
    --main-color: #2d5f3f;          /* Hijau Islami */
    --secondary-color: #d4af37;      /* Gold */
    --accent-color: #1a4d2e;         /* Hijau Tua */
    --text-color: #333333;
    --text-light: #666666;
    --bg-color: #ffffff;
    --bg-light: #f8f9fa;
    --border-color: #e0e0e0;
    
    /* Typography */
    --font-main: 'Poppins', sans-serif;
    --main-width: 1200px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-main) !important;
    color: var(--main-color);
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: var(--main-color);
    transition: all 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
}

.container {
    max-width: var(--main-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* ===================================
   Header Styles
   =================================== */

.hdWrp {
    background: var(--bg-color);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

#hdC {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    max-width: var(--main-width);
    margin: 0 auto;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-img {
    height: 60px;
    width: auto;
}

.titleHdn h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--main-color);
    margin: 0;
}

.subtitle {
    font-size: 0.9rem;
    color: var(--text-light);
    margin: 0;
}

/* Navigation Menu */
#main-menu-nav {
    display: flex;
    list-style: none;
    gap: 30px;
    margin: 0;
    padding: 0;
}

#main-menu-nav li a {
    font-weight: 600;
    color: var(--text-color);
    padding: 10px 0;
    position: relative;
}

#main-menu-nav li a:hover {
    color: var(--main-color);
}

#main-menu-nav li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary-color);
    transition: width 0.3s ease;
}

#main-menu-nav li a:hover::after {
    width: 100%;
}

/* Header Right Icons */
.hdRight {
    display: flex;
    align-items: center;
    gap: 15px;
}

#sICN button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

#sICN svg {
    width: 24px;
    height: 24px;
    fill: var(--text-color);
}

/* Mobile Menu Toggle */
.menushow, .menuhide {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.menushow svg, .menuhide svg {
    width: 28px;
    height: 28px;
    fill: var(--text-color);
}

/* Dark Mode Toggle */
.checkbox {
    display: none;
}

.switch {
    display: flex;
    align-items: center;
    cursor: pointer;
    width: 50px;
    height: 26px;
    background: var(--border-color);
    border-radius: 50px;
    position: relative;
    transition: background 0.3s;
}

.slider {
    position: absolute;
    width: 22px;
    height: 22px;
    background: white;
    border-radius: 50%;
    left: 2px;
    transition: transform 0.3s;
}

.checkbox:checked + .switch {
    background: var(--main-color);
}

.checkbox:checked + .switch .slider {
    transform: translateX(24px);
}

.sun, .moon {
    width: 16px;
    height: 16px;
    position: absolute;
    fill: white;
}

.sun {
    left: 5px;
}

.moon {
    right: 5px;
}

/* ===================================
   Hero Slider
   =================================== */

.hdBX {
    background: var(--bg-light);
    padding: 0;
}

.slide-item {
    position: relative;
    height: 500px;
    overflow: hidden;
}

.slide-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-caption {
    position: absolute;
    bottom: 50px;
    left: 50px;
    color: white;
    background: rgba(45, 95, 63, 0.9);
    padding: 30px;
    border-radius: 10px;
    max-width: 600px;
}

.slide-caption h2 {
    color: white;
    font-size: 2rem;
    margin-bottom: 10px;
}

.slide-caption p {
    color: white;
    font-size: 1.1rem;
}

/* ===================================
   Main Content Sections
   =================================== */

main {
    padding: 60px 20px;
}

section {
    margin-bottom: 80px;
}

section h2 {
    text-align: center;
    font-size: 2.5rem;
    color: var(--main-color);
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 15px;
}

section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--secondary-color);
    border-radius: 2px;
}

/* Welcome Section */
.welcome-content {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
    align-items: start;
}

.kyai-img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.welcome-text h3 {
    color: var(--main-color);
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.welcome-text p {
    color: var(--text-color);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 15px;
    text-align: justify;
}

/* Program Section */
.program-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.program-card {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.program-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(45, 95, 63, 0.2);
}

.program-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.program-card h3 {
    color: var(--main-color);
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.program-card p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Artikel Section */
.artikel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

/* ===================================
   Footer
   =================================== */

#footer {
    background: var(--main-color);
    color: white;
    padding: 60px 0 20px;
}

.ftrWrp {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h3 {
    color: var(--secondary-color);
    font-size: 1.3rem;
    margin-bottom: 20px;
}

.footer-desc {
    color: rgba(255,255,255,0.8);
    line-height: 1.8;
    margin-bottom: 20px;
}

.logo_footer img {
    height: 60px;
    margin-bottom: 20px;
}

/* Social Media */
.social-counter {
    display: flex;
    gap: 15px;
    list-style: none;
    margin-top: 20px;
}

.social-counter li a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.social-counter li a:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
}

/* Footer Links */
.footer-links, .footer-contact {
    list-style: none;
}

.footer-links li, .footer-contact li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255,255,255,0.8);
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--secondary-color);
}

.footer-contact li {
    color: rgba(255,255,255,0.8);
}

/* Credit */
#credit {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.6);
}

/* Back to Top */
.backtop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--main-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.backtop.show {
    opacity: 1;
    visibility: visible;
}

.backtop:hover {
    background: var(--secondary-color);
    transform: translateY(-5px);
}

.backtop svg {
    width: 24px;
    height: 24px;
}

/* ===================================
   Search Modal
   =================================== */

.gsmodal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 9999;
}

.gsmodal.gsshow {
    opacity: 1;
    visibility: visible;
}

.gscontent {
    max-width: 600px;
    width: 90%;
}

.gsclose {
    position: absolute;
    top: 30px;
    right: 30px;
    background: none;
    border: none;
    cursor: pointer;
}

.gsclose svg {
    width: 30px;
    height: 30px;
    fill: white;
}

.search-form {
    display: flex;
    gap: 10px;
}

.search-input {
    flex: 1;
    padding: 15px 20px;
    font-size: 1.2rem;
    border: none;
    border-radius: 50px;
    outline: none;
}

.search-submit {
    width: 60px;
    height: 60px;
    background: var(--main-color);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-submit:hover {
    background: var(--secondary-color);
}

.search-submit svg {
    width: 24px;
    height: 24px;
    fill: white;
}

.gscontent p {
    color: rgba(255,255,255,0.6);
    text-align: center;
    margin-top: 20px;
}

/* ===================================
   Dark Mode
   =================================== */

body.darkmode {
    background: #1a1a1a;
    color: #e0e0e0;
}

body.darkmode .hdWrp {
    background: #2d2d2d;
}

body.darkmode #main-menu-nav li a {
    color: #e0e0e0;
}

body.darkmode .program-card {
    background: #2d2d2d;
}

body.darkmode .welcome-text p {
    color: #b0b0b0;
}

/* ===================================
   Responsive Design
   =================================== */

@media (max-width: 768px) {
    #main-menu-nav {
        flex-direction: column;
        gap: 0;
    }
    
    .menu {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        height: 100vh;
        background: white;
        padding: 80px 30px 30px;
        transition: left 0.3s ease;
        z-index: 9998;
    }
    
    .menu.active {
        left: 0;
    }
    
    .menushow, .menuhide {
        display: block;
    }
    
    .menuhide {
        position: absolute;
        top: 20px;
        right: 20px;
    }
    
    .overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 9997;
    }
    
    .menu.active ~ .overlay {
        opacity: 1;
        visibility: visible;
    }
    
    .welcome-content {
        grid-template-columns: 1fr;
    }
    
    .ftrWrp {
        grid-template-columns: 1fr;
    }
    
    .slide-caption {
        left: 20px;
        right: 20px;
        bottom: 20px;
        padding: 20px;
    }
    
    .slide-caption h2 {
        font-size: 1.5rem;
    }
    
    section h2 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .titleHdn h1 {
        font-size: 1.2rem;
    }
    
    .slide-item {
        height: 300px;
    }
    
    .program-grid {
        grid-template-columns: 1fr;
    }
}
