/* ==========================================================================
   MIS ROUDLOTUL KHUFFADZ — MAIN DESIGN SYSTEM
   Professional, Editorial, Clean & Modern Educational Platform
   ========================================================================== */

:root {
    --bg-color: #F9F9F6;
    --surface-white: #ffffff;
    --text-dark: #1A1A1A;
    --text-muted: #666666;
    --text-light: #8E8E93;
    --green-school: #17a24b;
    --green-school-hover: #13883f;
    --green-light: rgba(23, 162, 75, 0.08);
    --green-badge: rgba(23, 162, 75, 0.12);
    --accent-orange: #E25E3E;
    --accent-yellow: #f59e0b;
    --border-light: rgba(0, 0, 0, 0.06);
    --border-card: rgba(0, 0, 0, 0.04);
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.03);
    --shadow-elevated: 0 20px 50px rgba(0, 0, 0, 0.05);
    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 32px;
    --radius-full: 9999px;
    --transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base Reset & Typography */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-dark);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1 0 auto;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
}

/* ==========================================================================
   NAVIGATION BAR (PREMIUM & ADAPTIVE)
   ========================================================================== */
.navbar-custom {
    padding: 24px 40px;
    background: transparent;
    transition: var(--transition);
    position: relative;
    z-index: 1000;
}

.navbar-custom.scrolled {
    background: rgba(249, 249, 246, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    padding: 16px 40px;
}

.navbar-brand-custom {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: -0.4px;
    color: var(--text-dark);
}

.navbar-brand-custom img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.nav-link-custom {
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.95rem;
    margin: 0 14px;
    opacity: 0.8;
    position: relative;
    padding: 6px 0;
    transition: var(--transition);
}

.nav-link-custom:hover,
.nav-link-custom.active {
    opacity: 1;
    color: var(--green-school);
}

.nav-link-custom::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: var(--green-school);
    transition: width 0.3s ease-in-out;
}

.nav-link-custom:hover::after,
.nav-link-custom.active::after {
    width: 100%;
}

.btn-primary-school {
    background-color: var(--green-school) !important;
    color: #ffffff !important;
    border-radius: var(--radius-full);
    padding: 10px 24px;
    font-weight: 600;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    box-shadow: 0 4px 14px rgba(23, 162, 75, 0.25);
    transition: var(--transition);
}

.btn-primary-school:hover {
    background-color: var(--green-school-hover) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(23, 162, 75, 0.35);
    color: #ffffff !important;
}

.btn-outline-custom {
    border: 1px solid var(--text-dark);
    color: var(--text-dark) !important;
    padding: 12px 28px;
    border-radius: var(--radius-full);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    transition: var(--transition);
}

.btn-outline-custom:hover {
    background: var(--text-dark);
    color: #ffffff !important;
    transform: translateY(-2px);
}

.btn-outline-pill {
    border: 1px solid var(--text-dark);
    color: var(--text-dark);
    border-radius: var(--radius-full);
    padding: 8px 20px;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.btn-outline-pill:hover {
    background: var(--text-dark);
    color: #ffffff !important;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
    padding: 50px 40px 90px;
    background: radial-gradient(circle at top right, rgba(226, 94, 62, 0.12), transparent 45%),
                radial-gradient(circle at bottom left, rgba(23, 162, 75, 0.1), transparent 40%);
}

.hero-title {
    font-size: 4.2rem;
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -2px;
    margin-bottom: 24px;
    color: var(--text-dark);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 40px;
    max-width: 90%;
}

.hero-image-wrapper {
    position: relative;
    border-radius: 28px;
    overflow: visible;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.08);
}

.hero-image-wrapper img {
    width: 100%;
    height: 540px;
    object-fit: cover;
    border-radius: 28px;
    display: block;
}

.glass-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.7);
    padding: 16px 24px;
    border-radius: var(--radius-md);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    gap: 16px;
    z-index: 10;
}

.glass-card-1 {
    top: 36px;
    right: -24px;
}

.glass-card-2 {
    bottom: 48px;
    right: 28px;
}

.hero-stats {
    margin-top: 70px;
    display: flex;
    gap: 60px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    padding-top: 36px;
}

.stat-item h3 {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 4px;
    color: var(--text-dark);
}

.stat-item p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin: 0;
    font-weight: 500;
}

/* ==========================================================================
   TENTANG KAMI & PROFIL KAMAD
   ========================================================================== */
.custom-about-card {
    background-color: var(--surface-white);
    border-radius: var(--radius-lg);
    padding: 70px 50px;
    margin: 0 20px;
    box-shadow: var(--shadow-elevated);
    border: 1px solid var(--border-card);
}

.kamad-image-wrapper {
    position: relative;
    width: 100%;
    max-width: 320px;
    border-radius: 24px;
}

.kamad-image-wrapper img {
    width: 100%;
    height: auto;
    border-radius: 24px;
    display: block;
    background-color: #e2f5e9;
    box-shadow: 0 20px 40px rgba(23, 162, 75, 0.15);
}

.kamad-badge {
    position: absolute;
    bottom: -18px;
    right: 18px;
    width: 64px;
    height: 64px;
    background-color: var(--green-school);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    border: 4px solid #ffffff;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.icon-box {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.icon-box-success {
    background-color: var(--green-light);
    color: var(--green-school);
}

.icon-box-warning {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--accent-yellow);
}

.visi-misi-card {
    padding: 28px;
    background: var(--bg-color);
    border-radius: var(--radius-md);
    height: 100%;
    transition: var(--transition);
    border: 1px solid var(--border-card);
}

.visi-misi-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-soft);
}

/* ==========================================================================
   STICKY SCROLL SECTIONS (EKSKUL & BERITA)
   ========================================================================== */
.sticky-container {
    position: relative;
    padding: 100px 40px;
    background: var(--surface-white);
    border-radius: var(--radius-lg);
    margin: 40px 20px;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-card);
}

.sticky-left {
    position: sticky;
    top: 120px;
    height: fit-content;
}

.sticky-label {
    text-transform: uppercase;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    margin-bottom: 16px;
}

.sticky-title {
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -1.5px;
    margin-bottom: 24px;
}

.scroll-item {
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    opacity: 0.35;
    transition: opacity 0.5s ease, transform 0.5s ease;
    transform: translateY(20px);
}

.scroll-item.active {
    opacity: 1;
    transform: translateY(0);
}

.scroll-visual {
    background: var(--bg-color);
    border-radius: 24px;
    padding: 30px;
    text-align: center;
    margin-bottom: 20px;
    position: relative;
}

.scroll-visual img {
    width: 100%;
    height: 320px;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.scroll-desc {
    background: var(--surface-white);
    padding: 26px 30px;
    border-radius: var(--radius-md);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.06);
    max-width: 85%;
    margin-top: -45px;
    position: relative;
    z-index: 5;
    border: 1px solid var(--border-card);
}

/* ==========================================================================
   CARDS & MASONRY (GALERI & MATERI)
   ========================================================================== */
.card-modern {
    background: var(--surface-white);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    padding: 36px;
    box-shadow: var(--shadow-soft);
    height: 100%;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.card-modern:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-elevated);
}

.badge-custom {
    background-color: var(--green-badge);
    color: var(--green-school);
    font-weight: 700;
    font-size: 0.78rem;
    padding: 6px 14px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Gallery Masonry Layout */
.gallery-grid {
    column-count: 3;
    column-gap: 24px;
    padding: 0 10px;
}

.gallery-card {
    break-inside: avoid;
    margin-bottom: 24px;
    background: var(--surface-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-card);
    transition: var(--transition);
}

.gallery-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-elevated);
}

.gallery-card img {
    width: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-card:hover img {
    transform: scale(1.03);
}

.gallery-card-body {
    padding: 16px 20px;
}

.gallery-caption {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-dark);
}

/* Lightbox Modal */
.lightbox-modal .modal-content {
    background: transparent;
    border: none;
}

.lightbox-modal .modal-body {
    padding: 0;
    text-align: center;
}

.lightbox-modal img {
    max-height: 85vh;
    border-radius: var(--radius-md);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
}

/* Step Wizard Pendaftaran */
.step-wrapper {
    display: flex;
    align-items: flex-start;
    margin-bottom: 32px;
    position: relative;
}

.step-number {
    width: 48px;
    height: 48px;
    background-color: var(--text-dark);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    margin-right: 24px;
    flex-shrink: 0;
    z-index: 2;
}

.step-wrapper:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 24px;
    top: 48px;
    bottom: -32px;
    width: 2px;
    background-color: rgba(0, 0, 0, 0.08);
    z-index: 1;
}

/* Search input modern */
.search-wrapper {
    max-width: 580px;
    margin: 0 auto 50px;
    position: relative;
}

.search-input-modern {
    width: 100%;
    padding: 16px 24px 16px 52px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: var(--surface-white);
    box-shadow: var(--shadow-soft);
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
}

.search-input-modern:focus {
    border-color: var(--green-school);
    box-shadow: 0 0 0 4px var(--green-light);
}

.search-icon-inside {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 1.1rem;
}

/* ==========================================================================
   FOOTER (UNIFIED & CLEAN)
   ========================================================================== */
.custom-footer {
    background-color: var(--surface-white);
    border-radius: var(--radius-lg);
    padding: 60px 48px 32px;
    margin: 40px 20px 30px;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-card);
}

.footer-brand {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.footer-brand img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.footer-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 28px;
    max-width: 90%;
}

.footer-socials {
    display: flex;
    gap: 16px;
}

.footer-socials a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dark);
    font-size: 1.1rem;
    transition: var(--transition);
}

.footer-socials a:hover {
    background: var(--green-school);
    color: #ffffff;
    transform: translateY(-3px);
}

.footer-col-title {
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 20px;
    font-size: 1rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.95rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--green-school);
    padding-left: 4px;
}

.footer-bottom {
    margin-top: 50px;
    padding-top: 26px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

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

.footer-legal-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.footer-legal-links a {
    color: var(--text-muted);
    font-size: 0.88rem;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: var(--transition);
}

.footer-legal-links a:hover {
    color: var(--text-dark);
}

/* Hidden Admin Lock Button */
.admin-lock-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: var(--text-light);
    opacity: 0.5;
    transition: var(--transition);
    text-decoration: none !important;
}

.admin-lock-btn:hover {
    opacity: 1;
    color: var(--green-school);
    background: var(--green-light);
}

/* ==========================================================================
   RESPONSIVE QUERIES
   ========================================================================== */
@media (max-width: 991px) {
    .navbar-custom {
        padding: 16px 20px;
    }
    
    .navbar-collapse {
        margin-top: 16px;
        background: #ffffff;
        padding: 20px;
        border-radius: var(--radius-md);
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
    }
    
    .nav-link-custom {
        margin: 8px 0;
        text-align: center;
    }
    
    .hero-section {
        padding: 30px 20px 60px;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.8rem;
        letter-spacing: -1px;
    }
    
    .hero-subtitle {
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-stats {
        justify-content: center;
        gap: 32px;
        flex-wrap: wrap;
    }
    
    .hero-image-wrapper img {
        height: 380px;
    }
    
    .glass-card-1 {
        right: 10px;
        top: 20px;
    }
    
    .glass-card-2 {
        right: 10px;
        bottom: 20px;
    }
    
    .gallery-grid {
        column-count: 2;
    }
    
    .sticky-container {
        padding: 60px 20px;
        margin: 20px 10px;
    }
    
    .sticky-left {
        position: relative;
        top: 0;
        margin-bottom: 40px;
        text-align: center;
    }
    
    .sticky-title {
        font-size: 2.2rem;
    }
    
    .scroll-item {
        min-height: auto;
        padding-bottom: 40px;
        opacity: 1;
        transform: none;
    }
    
    .scroll-desc {
        max-width: 95%;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2.1rem;
    }
    
    .custom-about-card {
        padding: 40px 20px;
        margin: 0 10px;
    }
    
    .gallery-grid {
        column-count: 1;
    }
    
    .custom-footer {
        padding: 40px 20px 24px;
        margin: 30px 10px 20px;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-legal-links {
        justify-content: center;
    }
}
