/* ==========================================================================
   CONFIG & VARIABLES (KEMENAG GREEN & GOLD PALETTE)
   ========================================================================== */
:root {
    --green-kemenag: #006837;
    --green-kemenag-dark: #004d28;
    --green-kemenag-light: #008f4c;
    --yellow-kemenag: #ffcc00;
    --yellow-hover: #e6b800;
    --text-dark: #1e293b;
    --text-muted: #64748b;
	--text-info: #ffdd00;
    --bg-light: #f8fafc;
    --white: #ffffff;
    --shadow-header: 0 10px 30px -5px rgba(0, 0, 0, 0.22);
    --transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

body {
	background: 
        linear-gradient(rgba(248, 250, 252, 0.35), rgba(248, 250, 252, 0.50)), 
        url('../images/batik.jpg') no-repeat center center fixed !important;
    background-size: cover !important;
    
    color: #1e293b;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
} /*  background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
}*/

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================================
   1. TOP HEADER & MAIN HEADER (SHADOW & PRO)
   ========================================================================== */
.top-header {
    background-color: var(--green-kemenag-dark);
    color: var(--white);
    font-size: 0.8rem;
    padding: 7px 0;
    border-bottom: 2px solid var(--yellow-kemenag);
}

.top-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.top-left a {
    color: #e2e8f0;
    text-decoration: none;
    transition: var(--transition);
}

.top-left a:hover { color: var(--yellow-kemenag); }
.divider { color: rgba(255, 255, 255, 0.3); }

.social-links a {
    color: #ffffff;
    margin-left: 12px;
    transition: var(--transition);
}

.social-links a:hover { color: var(--yellow-kemenag); }

.main-header {
    background: linear-gradient(135deg, var(--green-kemenag) 0%, var(--green-kemenag-dark) 100%);
    color: var(--white);
    padding: 14px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-header);
    border-bottom: 1px solid rgba(255, 204, 0, 0.25);
}

.main-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.header-logo {
    height: 52px;
    width: auto;
    filter: drop-shadow(0px 3px 6px rgba(0,0,0,0.3));
    transition: transform 0.3s ease;
}

.header-logo:hover { transform: scale(1.05); }

.brand-text .title-top {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--yellow-kemenag);
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.brand-text .title-bottom {
    font-size: 0.78rem;
    font-weight: 500;
    color: #f1f5f9;
    letter-spacing: 1px;
}

.badge-status {
    background: rgba(255, 204, 0, 0.15);
    color: var(--yellow-kemenag);
    border: 1px solid var(--yellow-kemenag);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    backdrop-filter: blur(5px);
}

/* ==========================================================================
   STYLING HEADER UTAMA
   ========================================================================== */
.main-header {
    background-color: #004d25; /* Warna hijau khas Kemenag */
    padding: 15px 0;
}

.main-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    flex-wrap: wrap; /* Agar badge otomatis pindah ke bawah jika layar sempit */
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-logo {
    height: 50px;
    width: auto;
    flex-shrink: 0;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.title-top {
    color: #ffcc00; /* Warna kuning emas */
    font-size: 1.1rem;
    font-weight: 800;
    margin: 0;
    line-height: 1.2;
}

.title-bottom {
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 700;
    margin-top: 3px;
    line-height: 1.2;
}

/* Badge Server CBT Online */
.header-badge {
    flex-shrink: 0; /* Mencegah badge tertekan gepeng */
}

.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1.5px solid #ffcc00;
    color: #ffcc00;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.15);
    
    /* PENTING: Mencegah teks "Server CBT Online" terpisah/menumpuk atas bawah */
    white-space: nowrap; 
}


/* ==========================================================================
   RESPONSIF KHUSUS HP (Layar < 768px)
   ========================================================================== */
@media (max-width: 768px) {
    .main-header-content {
        flex-direction: column; /* Mengubah tata letak jadi dari atas ke bawah */
        text-align: center;
        justify-content: center;
        gap: 12px;
    }

    .brand {
        flex-direction: column; /* Logo dan judul bertumpuk rapi di tengah */
        justify-content: center;
        gap: 8px;
    }

    .header-logo {
        height: 42px;
    }

    .title-top {
        font-size: 0.95rem;
    }

    .title-bottom {
        font-size: 0.8rem;
    }

    .badge-status {
        font-size: 0.78rem;
        padding: 5px 12px;
    }
}

/* ==========================================================================
   2. TICKER ANNOUNCEMENT
   ========================================================================== */
.ticker-wrapper {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 8px 0;
    font-size: 0.85rem;
}

.ticker-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.ticker-title {
    background: var(--green-kemenag);
    color: var(--yellow-kemenag);
    padding: 3px 12px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.75rem;
    white-space: nowrap;
}

.ticker-text {
    color: var(--text-dark);
    font-weight: 500;
}

/* ==========================================================================
   3. HERO BANNER & QUICK INFO PANEL
   ========================================================================== */
.hero-section {
    padding: 25px 0;
}

.hero-grid {
    display: grid;
    grid-template-columns: 2.8fr 1.2fr;
    gap: 20px;
    align-items: stretch;
}

.banner-wrapper {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
    height: 100%;
    min-height: 280px;
    cursor: pointer;
}

.banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.banner-wrapper:hover .banner-img {
    transform: scale(1.06);
}

.banner-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(to top, rgba(0, 51, 26, 0.95) 0%, rgba(0, 77, 40, 0.6) 65%, transparent 100%);
    color: var(--white);
    padding: 30px;
}

.hero-tag {
    background: var(--yellow-kemenag);
    color: #000;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 8px;
}

.banner-overlay h2 {
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.banner-overlay p {
    font-size: 0.88rem;
    color: #cbd5e1;
}

/* Mini Quick Info Panel */
.quick-info-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-card {
    background: #05a9f5;
    border-radius: 16px;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    height: 100%;
}
.info-card-1 {
    background: #51c1f5;
    border-radius: 16px;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    height: 100%;
}
.info-card-2 {
    background: #99daf7;
    border-radius: 16px;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    height: 100%;
}

.icon-info {
    font-size: 1.5rem;
    color: var(--green-kemenag);
    background: rgba(0, 104, 55, 0.08);
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-card h4 {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.info-card p {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
}

.text-online {
    color: #16a34a !important;
    font-size: 0.9rem !important;
}

/* ==========================================================================
   4. CONTROL BAR (SEARCH & TITLE) & CARDS
   ========================================================================== */
.main-content {
    padding: 20px 0 60px 0;
}

.control-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.section-title h3 {
    color: var(--green-kemenag-dark);
    font-size: 1.5rem;
    font-weight: 700;
}

.section-title p {
    color: var(--text-muted);
    font-size: 0.88rem;
}

/* ==========================================================================
   STYLING KOLOM PENCARIAN (MENCOLOK & MENAWAN)
   ========================================================================== */
.search-box {
    position: relative;
    width: 100%;
    max-width: 300px; /* Ukuran diperpendek sesuai permintaan */
    margin: 0;        /* Reset margin center */
}

.search-box input {
    width: 100%;
    padding: 10px 16px 10px 42px; /* Padat & ringkas */
    font-size: 0.88rem;
    font-weight: 600;
    color: #0f172a;
    background-color: #ffffff;
    border: 2px solid #ffcc00;
    border-radius: 50px;
    box-shadow: 0 4px 12px rgba(255, 204, 0, 0.2);
    transition: all 0.3s ease;
    outline: none;
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #d97706;
    font-size: 0.95rem;
}

.search-box input:focus {
    border-color: #d97706;
    box-shadow: 0 0 0 3px rgba(255, 204, 0, 0.35);
}

/* Penyesuaian Otomatis di HP */
@media (max-width: 768px) {
    .section-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .search-box {
        max-width: 100%; /* Di HP akan melebar penuh agar mudah diklik */
    }
}

/* Grid Layout 4 Kolom */
.card-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.exam-card {
    background: #54a4b8;
    border-radius: 18px;
    padding: 20px;
    text-decoration: none;
    color: var(--text-dark);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    border: 2px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    transition: var(--transition);
    height: 100%;
    min-height: 175px;
}

.exam-card:hover {
    transform: translateY(-6px);
    border-color: rgba(0, 104, 55, 0.2);
    box-shadow: 0 16px 30px rgba(0, 104, 55, 0.12);
}

.card-number {
    position: absolute;
    top: 5px;
    right: 15px;
    font-size: 2rem;
    font-weight: 800;
    color: rgba(0, 104, 55, 0.04);
}

.card-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.card-icon {
    width: 46px;
    height: 46px;
    background: #f1f8f3;
    color: var(--green-kemenag);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: var(--transition);
}

.exam-card:hover .card-icon {
    background: var(--green-kemenag);
    color: var(--yellow-kemenag);
}

.status-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
}

.status-badge.aktif { background: #dcfce7; color: #15803d; }
.status-badge.segera { background: #fef3c7; color: #b45309; }

.card-info h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.duration-info {
    font-size: 0.75rem;
    color: var(--text-info);
}

.btn-action {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--green-kemenag-dark);
    background-color: #f0f7f3;
    padding: 8px 14px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 15px;
    transition: var(--transition);
}

.exam-card:hover .btn-action {
    background: var(--yellow-kemenag);
    color: #000;
    font-weight: 700;
}

/* FAQ SECTION */
.faq-section {
    margin-top: 50px;
    background: #ffffff;
    border-radius: 20px;
    padding: 30px;
    border: 1px solid #e2e8f0;
}

.faq-section h3 {
    color: var(--green-kemenag-dark);
    font-size: 1.25rem;
    margin-bottom: 20px;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.faq-item h5 {
    font-size: 0.95rem;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.faq-item h5 i { color: var(--green-kemenag); }

.faq-item p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ==========================================================================
   5. RESPONSIVE MOBILE & TABLET
   ========================================================================== */
@media (max-width: 1024px) {
    .hero-grid { grid-template-columns: 1fr; }
    .quick-info-panel { flex-direction: row; }
    .card-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .quick-info-panel { flex-direction: column; }
    .card-grid { grid-template-columns: repeat(2, 1fr); }
    .faq-grid { grid-template-columns: 1fr; }
    .control-bar { flex-direction: column; align-items: flex-start; }
    .search-box { width: 100%; }
}

@media (max-width: 480px) {
    .card-grid { grid-template-columns: repeat(1, 1fr); }
    .brand-text .title-top { font-size: 0.95rem; }
}
/* ==========================================================================
   FOOTER MEWAH INSTANSI RESMI
   ========================================================================== */
.site-footer {
    background: linear-gradient(180deg, #00381e 0%, #002413 100%);
    color: #e2e8f0;
    border-top: 4px solid var(--yellow-kemenag);
    margin-top: 60px;
    font-size: 0.88rem;
}

.footer-top {
    padding: 50px 0 35px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1.2fr 1fr;
    gap: 40px;
}

.footer-brand {
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
}

.footer-logo {
    height: 48px;
    width: auto;
    filter: drop-shadow(0px 2px 4px rgba(0,0,0,0.4));
}

.brand-col h4 {
    color: var(--yellow-kemenag);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}

.brand-col p {
    color: #94a3b8;
    font-size: 0.85rem;
    line-height: 1.6;
}

.footer-title {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 18px;
    position: relative;
    padding-bottom: 8px;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 35px;
    height: 3px;
    background-color: var(--yellow-kemenag);
    border-radius: 2px;
}

.footer-contact, .footer-links {
    list-style: none;
    padding: 0;
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
    color: #cbd5e1;
    font-size: 0.85rem;
}

.footer-contact li i {
    color: var(--yellow-kemenag);
    margin-top: 3px;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #cbd5e1;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
}

.footer-links a i {
    font-size: 0.7rem;
    color: var(--yellow-kemenag);
    transition: transform 0.3s ease;
}

.footer-links a:hover {
    color: var(--yellow-kemenag);
}

.footer-links a:hover i {
    transform: translateX(4px);
}

.footer-bottom {
    background-color: rgba(0, 0, 0, 0.25);
    padding: 18px 0;
    font-size: 0.8rem;
    color: #94a3b8;
}

.footer-bottom-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-bottom span {
    color: var(--yellow-kemenag);
    font-weight: 600;
}

/* Responsif Footer untuk HP */
@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer-bottom-flex {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}

/*Warna Status*/
.status-badge.aktif { background: #dcfce7; color: #15803d; }
.status-badge.segera { background: #fef3c7; color: #b45309; }
.status-badge.selesai { background: #f1f5f9; color: #64748b; }

/* Kartu yang terkunci tampil sedikit transparan agar beda */
.exam-card.card-locked {
    opacity: 0.85;
}
.exam-card.card-locked:hover {
    border-color: rgba(0,0,0,0.1);
    box-shadow: none;
}

/* ==========================================================================
   HEADER RESPONSIVE FIX
   ========================================================================== */

/* Styling Header Utama (Desktop Base) */
.site-header, .header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 15px 0;
}

.brand-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.brand-logo-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0; /* Logo tidak memengecil tertekan */
}

.brand-logo-group img {
    height: 52px;
    width: auto;
}

.brand-text h1 {
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.25; /* Penting agar teks multi-baris tidak menumpuk */
    margin: 0 0 3px 0;
    color: #0f172a;
}

.brand-text p {
    font-size: 0.85rem;
    margin: 0;
    color: #64748b;
    line-height: 1.3;
}


/* ==========================================================================
   RESPONSIF MOBILE (Layar HP < 768px)
   ========================================================================== */
@media (max-width: 768px) {
    .site-header, .header-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 15px;
        padding: 12px 10px;
    }

    .brand-section {
        flex-direction: column; /* Ubah layout logo & judul jadi bertumpuk rapi */
        align-items: center;
        gap: 10px;
    }

    .brand-logo-group img {
        height: 42px; /* Ukuran logo disesuaikan untuk HP */
    }

    .brand-text {
        text-align: center;
    }

    .brand-text h1 {
        font-size: 1.1rem; /* Ukuran font judul dikecilkan agar muat di HP */
        line-height: 1.3;   /* Mencegah teks bertumpuk ke atas/bawah */
        word-break: break-word;
    }

    .brand-text p {
        font-size: 0.78rem;
        line-height: 1.3;
    }

    /* Kolom pencarian di header mengikuti lebar layar HP */
    .search-box {
        width: 100%;
        max-width: 100%;
    }
}

/* ==========================================================================
   TOMBOL BACK TO TOP
   ========================================================================== */
.back-to-top {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 45px;
    height: 45px;
    background-color: #004d25; /* Hijau Kemenag */
    color: #ffcc00;            /* Emas */
    border: 2px solid #ffcc00;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

/* Tampil Saat Di-scroll */
.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

/* Efek Hover */
.back-to-top:hover {
    background-color: #ffcc00;
    color: #004d25;
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}