/**
 * CSS Variables & Base Styles
 * Uses a modern, elegant color palette suited for an Islamic University/Pesantren context
 * Deep emerald greens mixed with warm gold/sand accents and glassmorphism.
 */
:root {
    /* Colors */
    --primary: #0F5A41;       /* Deep Emerald */
    --primary-light: #1CA679; /* Vibrant Emerald */
    --primary-dark: #072D20;  /* Very Dark Green */
    
    --secondary: #D4AF37;     /* Gold / Brass */
    --secondary-light: #FCEABB; /* Soft Gold */
    
    --bg-main: #02130e;       /* Almost Black Green */
    --bg-surface: #0a2119;    /* Surface Green */
    --surface-glass: rgba(15, 90, 65, 0.25);
    
    --text-main: #F8FAFC;
    --text-muted: #94A3B8;
    
    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Outfit', sans-serif;
    
    /* Layout */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --border-radius: 16px;
    --border-radius-lg: 24px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Typography Utility */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-body); /* Using Outfit for modern look, override for specific serif usage */
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-main);
}

.highlight {
    color: var(--secondary);
    font-family: var(--font-heading);
    font-style: italic;
    font-weight: 600;
}

/* Glassmorphism Utilities */
.glass-panel {
    background: var(--surface-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    box-shadow: 0 4px 15px rgba(28, 166, 121, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(28, 166, 121, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition);
    padding: 1.5rem 0;
}

.navbar.scrolled {
    padding: 1rem 0;
    background: rgba(2, 19, 14, 0.85);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.logo-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--secondary), #B89020);
    border-radius: 10px;
    color: var(--bg-main);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.25rem;
}

.logo-text {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
    color: var(--secondary);
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropbtn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: inherit;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: var(--transition);
}

.dropdown:hover .dropbtn {
    color: var(--secondary);
}

.dropdown-content {
    position: absolute;
    background-color: var(--bg-surface);
    min-width: 200px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border-radius: 12px;
    overflow: hidden;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 0.5rem;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}

.dropdown-content::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 0;
    width: 100%;
    height: 20px;
    background: transparent;
}

.dropdown:hover .dropdown-content {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.dropdown-content a {
    color: var(--text-main);
    padding: 10px 16px;
    text-decoration: none;
    display: block;
    border-radius: 8px;
    transition: var(--transition);
    font-size: 0.9rem;
}

.dropdown-content a:hover {
    background-color: var(--surface-glass);
    color: var(--secondary);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 8rem 2rem 4rem;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    filter: blur(80px);
    border-radius: 50%;
    opacity: 0.4;
    animation: drift 20s infinite alternate;
}

.shape-1 {
    width: 500px;
    height: 500px;
    background: var(--primary-light);
    top: -10%;
    left: -10%;
}

.shape-2 {
    width: 400px;
    height: 400px;
    background: var(--secondary);
    bottom: -10%;
    right: -5%;
    animation-delay: -10s;
}

@keyframes drift {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 50px) scale(1.1); }
}

.hero-content {
    text-align: center;
    max-width: 800px;
    z-index: 1;
}

.hero-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(212, 175, 55, 0.15);
    color: var(--secondary);
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(212, 175, 55, 0.3);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.hero-title {
    font-size: clamp(3rem, 6vw, 5.5rem);
    margin-bottom: 1.5rem;
    letter-spacing: -1.5px;
}

.hero-title .highlight {
    display: block;
    color: var(--secondary);
    font-size: 1.1em;
}

.hero-desc {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-inline: auto;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.hero-stats {
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 2rem 4rem;
    border-radius: 24px;
    margin-top: 4rem;
    width: 100%;
    max-width: 900px;
    z-index: 1;
}

.stat-item {
    text-align: center;
}

.stat-num {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--secondary);
    display: inline-block;
}

.stat-plus {
    font-size: 2rem;
    font-weight: 800;
    color: var(--secondary);
    vertical-align: top;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0.25rem;
}

.stat-divider {
    width: 1px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
}

/* Sections Base */
section {
    padding: 6rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
    max-width: 600px;
    margin-inline: auto;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Values Section */
.values-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.value-card {
    background: var(--bg-surface);
    padding: 2.5rem;
    border-radius: var(--border-radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

.value-card:hover, .value-card.featured {
    transform: translateY(-10px);
    background: var(--surface-glass);
    border-color: rgba(212, 175, 55, 0.3);
}

.value-card.featured {
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.value-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 20px rgba(15, 90, 65, 0.3);
}

.value-card.featured .value-icon {
    background: linear-gradient(135deg, var(--secondary), #B89020);
    box-shadow: 0 10px 20px rgba(212, 175, 55, 0.2);
}

.value-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.value-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Programs Layout Split */
.layout-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.split-title {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.split-desc {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
}

.feature-list {
    list-style: none;
}

.feature-list li {
    display: flex;
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.feature-icon {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--secondary);
}

.feature-text h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.feature-text p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.image-composition {
    position: relative;
    padding-right: 2rem;
    padding-bottom: 2rem;
}

.main-img {
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    max-height: 500px;
}

.main-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s;
}

.main-img:hover img {
    transform: scale(1.05);
}

.glass-border {
    position: relative;
}

.glass-border::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: 10px;
    bottom: 10px;
    border: 2px solid var(--primary);
    border-radius: 24px;
    z-index: -1;
}

.floating-card {
    position: absolute;
    bottom: 0;
    right: 0;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
}

.floating-card i {
    font-size: 1.5rem;
}

/* CTA Section */
.cta-box {
    padding: 4rem;
    border-radius: var(--border-radius-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: linear-gradient(135deg, var(--bg-surface), var(--primary-dark));
    border: 1px solid rgba(28, 166, 121, 0.2);
}

.cta-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-content p {
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 2.5rem;
    font-size: 1.1rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--text-muted);
    color: var(--text-main);
}

.btn-outline:hover {
    border-color: var(--text-main);
    background: rgba(255,255,255,0.05);
}

/* Footer */
footer {
    background: #020F0B;
    padding: 4rem 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

.footer-brand p {
    color: var(--text-muted);
    margin-top: 1.5rem;
    max-width: 400px;
}

.footer-links h4 {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--secondary);
    padding-left: 5px;
}

.footer-bottom {
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 992px) {
    .values-grid {
        grid-template-columns: 1fr;
    }
    
    .layout-split {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 2rem;
        padding: 2rem;
    }
    
    .stat-divider {
        width: 50px;
        height: 1px;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
}
