/* Base Styles & Variables */
:root {
    --primary: #047857;     /* Modern Islamic Green */
    --primary-dark: #064e3b;
    --secondary: #f59e0b;   /* Amber/Gold */
    --secondary-light: #fcd34d;
    --dark: #0f172a;
    --light: #f8fafc;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.2);
    --shadow: 0 10px 30px -10px rgba(0,0,0,0.1);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

body {
    font-family: 'Inter', sans-serif;
    color: #334155;
    background-color: var(--light);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    color: var(--dark);
    line-height: 1.2;
}

a { text-decoration: none; color: inherit; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section { padding: 100px 0; }
.bg-light { background-color: #f1f5f9; }

/* Utilities */
.text-gradient {
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.text-primary { color: var(--primary); }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-5 { margin-top: 3rem; }
.p-4 { padding: 1.5rem; }
.text-center { text-align: center; }
.text-3xl { font-size: 2.5rem; }

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}
.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(4, 120, 87, 0.3);
}
.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(4, 120, 87, 0.4);
}
.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}
.btn-outline:hover {
    background: var(--primary);
    color: white;
}

/* Navbar (Glassmorphism) */
.glass-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    transition: var(--transition);
    padding: 20px 0;
}
.glass-nav.scrolled {
    padding: 12px 0;
    box-shadow: var(--shadow);
}
.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    font-size: 1.5rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    gap: 10px;
}
.logo i { color: var(--secondary); }
.nav-links { display: flex; gap: 30px; align-items: center; font-weight: 500; }
.nav-links a:not(.btn) {
    position: relative;
    color: var(--dark);
    transition: var(--transition);
}
.nav-links a:not(.btn)::after {
    content: '';
    position: absolute; width: 0; height: 2px;
    bottom: -5px; left: 0;
    background-color: var(--secondary);
    transition: var(--transition);
}
.nav-links a:not(.btn):hover::after, .nav-links a.active-link::after { width: 100%; }
.mobile-menu-btn { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; }

/* Dropdown Menu */
.dropdown { position: relative; display: inline-block; }
.dropdown-menu {
    display: none; position: absolute; top: 150%; left: 0; min-width: 250px;
    z-index: 1000; padding: 15px 0; border-radius: 15px; opacity: 0;
    transform: translateY(10px); transition: all 0.3s ease; box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}
.dropdown:hover .dropdown-menu { display: block; opacity: 1; transform: translateY(0); top: 100%; }
.dropdown-menu a {
    display: flex !important; align-items: center; gap: 15px; padding: 10px 20px;
    color: var(--dark) !important; font-weight: 500; transition: var(--transition);
}
.dropdown-menu a::after { display: none !important; }
.dropdown-menu a:hover { background: rgba(4, 120, 87, 0.05); padding-left: 25px; color: var(--primary) !important; }

/* Page Header */
.page-header {
    padding: 150px 0 80px; text-align: center; background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: white; border-radius: 0 0 50px 50px; margin-bottom: 60px; position: relative; overflow: hidden;
}
.page-header h1 { color: white; font-size: 3.5rem; margin-bottom: 15px; position: relative; z-index: 1; }
.page-header p { font-size: 1.2rem; opacity: 0.9; max-width: 600px; margin: 0 auto; position: relative; z-index: 1; }
.page-header::before {
    content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%); z-index: 0;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding-top: 100px; /* Clear fixed navbar */
}
.hero-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1;
}
.hero-media {
    width: 100%; height: 100%;
    object-fit: cover;
}
.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to right, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.5));
}
.hero-content {
    color: white;
    max-width: 800px;
    z-index: 1;
    margin-top: 50px;
}
.hero h1 {
    color: white;
    font-size: 4rem;
    margin-bottom: 20px;
}
.hero p {
    font-size: 1.25rem;
    color: #e2e8f0;
    margin-bottom: 40px;
    max-width: 600px;
}
.hero-actions { display: flex; gap: 20px; }

/* Carousel */
.carousel-container { position: relative; width: 100%; height: 100vh; overflow: hidden; }
.carousel-slide { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 0.8s ease-in-out; }
.carousel-slide.active { opacity: 1; z-index: 1; }
.carousel-control {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 10;
    background: rgba(255,255,255,0.2); border: none; color: white; width: 50px; height: 50px;
    border-radius: 50%; font-size: 1.5rem; cursor: pointer; backdrop-filter: blur(5px);
    transition: var(--transition);
}
.carousel-control:hover { background: var(--primary); }
.carousel-control.prev { left: 20px; }
.carousel-control.next { right: 20px; }

/* Section Header */
.section-header { text-align: center; margin-bottom: 60px; }
.section-header h2 { font-size: 2.5rem; }
.divider {
    height: 4px;
    width: 60px;
    background: var(--secondary);
    border-radius: 2px;
    margin: 15px auto 0;
}
.subtitle { color: #64748b; font-size: 1.1rem; }

/* Cards & Grids */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }

.glass-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
    transition: var(--transition);
}
.card-hover:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

/* Rapor Mutu */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.stat-card {
    background: white; padding: 25px; border-radius: 15px;
    box-shadow: var(--shadow); border-top: 4px solid var(--primary);
    transition: var(--transition);
}
.stat-card:hover { transform: translateY(-5px); }
.stat-value { font-size: 2.5rem; font-weight: 800; color: var(--dark); font-family: 'Outfit'; margin: 10px 0; }
.stat-desc { font-size: 0.9rem; color: #64748b; margin-bottom: 15px; }
.badge { padding: 5px 12px; border-radius: 20px; font-size: 0.8rem; font-weight: 600; display: inline-block; }
.badge-success { background: #dcfce7; color: #166534; }
.badge-danger { background: #fee2e2; color: #991b1b; }

/* Grid 2 Kolom Responsif */
.responsive-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; }
@media (max-width: 768px) {
    .responsive-grid-2 { grid-template-columns: 1fr; }
}

/* Jurusan Section */
.jurusan-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; }
@media (max-width: 768px) {
    .jurusan-grid { grid-template-columns: 1fr; }
}
.jurusan-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}
.jurusan-card:hover { transform: translateY(-10px); }
.jurusan-img { width: 100%; height: 200px; overflow: hidden; position: relative; }
.jurusan-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.jurusan-card:hover .jurusan-img img { transform: scale(1.1); }
.jurusan-content { padding: 25px; position: relative; }
.jurusan-code {
    position: absolute; top: -20px; right: 20px;
    background: var(--secondary); color: white;
    padding: 8px 15px; border-radius: 10px; font-weight: bold; font-family: 'Outfit';
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.3);
}

/* Fasilitas */
.fasilitas-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.fasilitas-item {
    display: flex; align-items: center; gap: 15px;
    background: white; padding: 20px; border-radius: 15px;
    box-shadow: var(--shadow); transition: var(--transition);
}
.fasilitas-item:hover { background: var(--primary); color: white; transform: translateX(5px); }
.fasilitas-item:hover h4, .fasilitas-item:hover p, .fasilitas-item:hover .fasilitas-icon i { color: white; }
.fasilitas-icon {
    width: 50px; height: 50px; border-radius: 12px;
    background: #f1f5f9; display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; color: var(--primary); transition: var(--transition);
}

/* Timeline (Program Kesiswaan) */
.timeline { position: relative; max-width: 800px; margin: 0 auto; padding: 40px 0; }
.timeline::before { content: ''; position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; background: var(--primary); transform: translateX(-50%); opacity: 0.3; }
.timeline-item { position: relative; margin-bottom: 40px; width: 50%; padding-right: 40px; }
.timeline-item:nth-child(even) { left: 50%; padding-left: 40px; padding-right: 0; }
.timeline-icon {
    position: absolute; right: -20px; top: 0; width: 40px; height: 40px; border-radius: 50%; background: var(--primary);
    color: white; display: flex; justify-content: center; align-items: center; box-shadow: 0 0 0 4px white, inset 0 2px 0 rgba(0,0,0,0.08), 0 3px 0 4px rgba(0,0,0,0.05); z-index: 1;
}
.timeline-item:nth-child(even) .timeline-icon { left: -20px; right: auto; }
.timeline-content { padding: 25px; background: white; border-radius: 15px; box-shadow: var(--shadow); position: relative; border-top: 4px solid var(--secondary); transition: var(--transition); }
.timeline-content:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(0,0,0,0.1); }
.timeline-date { display: inline-block; padding: 5px 15px; background: rgba(4, 120, 87, 0.1); color: var(--primary); border-radius: 20px; font-size: 0.85rem; font-weight: 600; margin-bottom: 10px; }

/* Masonry Grid (Galeri & Profil) */
.masonry-grid { column-count: 3; column-gap: 20px; }
.guru-grid { column-count: 4; }
.masonry-item { break-inside: avoid; margin-bottom: 20px; border-radius: 15px; overflow: hidden; position: relative; }
.masonry-item img { width: 100%; height: 250px; object-fit: cover; display: block; transition: var(--transition); }
.masonry-overlay {
    position: absolute; bottom: 0; left: 0; right: 0; padding: 20px; background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white; opacity: 0; transform: translateY(20px); transition: var(--transition);
}
.masonry-item:hover img { transform: scale(1.05); }
.masonry-item:hover .masonry-overlay { opacity: 1; transform: translateY(0); }

/* Marquee */
.marquee-container { overflow: hidden; white-space: nowrap; padding: 20px 0; }
.marquee-content {
    display: inline-block;
    animation: marquee 20s linear infinite;
}
.mitra-item {
    display: inline-block;
    padding: 15px 40px;
    background: white; border-radius: 10px; margin: 0 15px;
    box-shadow: var(--shadow); font-weight: 600; color: var(--dark);
}
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* Footer */
.footer { background: var(--dark); color: white; padding: 80px 0 20px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 40px; margin-bottom: 40px; }
.footer-info h3 { color: white; margin-bottom: 20px; }
.footer-info p { display: flex; gap: 10px; margin-bottom: 15px; color: #cbd5e1; }
.footer-links a { display: block; color: #cbd5e1; margin-bottom: 10px; transition: var(--transition); }
.footer-links a:hover { color: var(--secondary); padding-left: 5px; }
.social-icons { display: flex; gap: 15px; }
.social-icons a {
    width: 40px; height: 40px; border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition);
}
.social-icons a:hover { background: var(--secondary); color: white; transform: translateY(-3px); }
.footer-bottom { text-align: center; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.1); color: #94a3b8; }

/* Animations */
.fade-up { opacity: 0; transform: translateY(30px); animation: fadeUpAnim 0.8s forwards; }
.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
@keyframes fadeUpAnim { to { opacity: 1; transform: translateY(0); } }

/* Responsive */
@media (min-width: 992px) {
    .footer-grid { grid-template-columns: 2fr 1fr 0.8fr 3.5fr; gap: 30px; }
}
@media (max-width: 992px) {
    .masonry-grid { column-count: 2 !important; }
}
@media (max-width: 768px) {
    .nav-links { 
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        padding: 80px 30px;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        transition: right 0.3s ease-in-out;
        z-index: 999;
        overflow-y: auto;
        gap: 20px;
    }
    .nav-links.mobile-active {
        right: 0;
    }
    .mobile-menu-btn { display: block; z-index: 1001; position: relative; }
    
    /* Dropdown adjustments for mobile */
    .dropdown { width: 100%; }
    .dropdown-menu {
        position: relative;
        top: 0 !important;
        box-shadow: none;
        padding-left: 15px;
        background: transparent;
        transform: none;
    }
    .dropdown:hover .dropdown-menu, .dropdown:focus-within .dropdown-menu {
        display: block;
        opacity: 1;
        transform: none;
    }

    .hero h1 { font-size: 2.5rem; }
    .hero p { font-size: 1rem; }
}
@media (max-width: 576px) {
    .masonry-grid { column-count: 1 !important; }
}
