/* ==============================================================================
   File: index.css
   Lokasi: public/css/index.css
   Deskripsi: Styling Landing Page PTSP Online (Clean, Modern & Professional)
   ============================================================================== */

:root {
    --primary: #1b5e20;
    --primary-hover: #0d3b13;
    --primary-light: #e8f5e9;
    --accent: #2e7d32;
    --text-dark: #1e293b;
    --text-muted: #c906cc;
    --bg-light: #f8fafc;
    --border-color: #e2e8f0;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
    --shadow-md: 0 10px 25px -5px rgba(0,0,0,0.05), 0 8px 10px -6px rgba(0,0,0,0.01);
    --shadow-lg: 0 5px 25px rgba(0, 0, 0, 0.8), 0 5px 15px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    /*background: #daf5dd;
    color: var(--text-dark);
    line-height: 1.6;*/
	background-color: #dcfadf;
    background-repeat: no-repeat;   /* Mencegah gambar berulang */
    background-size: cover;         /* Membuat gambar memenuhi layar */
    background-position: center;    /* Memposisikan gambar di tengah */
    background-attachment: fixed;
}

/* NAVBAR */
.navbar {
    /* Gradiasi hijau ke biru tegas */
    background: linear-gradient(135deg, #c6f5c6, #c6f5c6);
    padding: 0 15px; /* Padding atas & bawah diatur ke 0 (mengandalkan padding container) */
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-lg);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 8px 20px; /* Padding atas & bawah diperkecil dari 20px menjadi 8px */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
}

.brand-logo {
    width: 50px;
    height: 42px;
    background: var(--primary);
    color: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.2rem;
    box-shadow: 0 4px 10px rgba(27, 94, 32, 0.25);
}

.brand-text h1 {
    font-size: 1.20rem;
    font-weight: 600;
    color: 	#940396;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.brand-text p {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.btn-login {
    background: transparent;
    color: var(--primary);
    border: 1.5px solid var(--primary);
    padding: 8px 18px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.88rem;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-login:hover {
    background: var(--primary-light);
}

/* HERO SECTION UPGRADE */
.hero {
    /* Menggabungkan gradient gelap transparan dengan gambar background */
    background: linear-gradient(
        rgba(15, 23, 52, 1), 
        rgba(15, 23, 52, 0.30)
        ), url('../../public/img/background_1.pn');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    color: white;
    padding: 15px 24px 30px 24px;
    text-align: center;
    position: relative;
    border-bottom-left-radius: 0x;
    border-bottom-right-radius: 0px;
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.65), 
                0 5px 15px -5px rgba(0, 0, 0, 0.45);
}

/* CONTAINER HERO HEADER (Judul & Search Card Sejajar Presisi di Tengah) */
.hero-header-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center; /* Memastikan grup teks persis di tengah */
    max-width: 720px;        /* Disamakan dengan max-width .search-card agar lebar sejajar simetris */
    margin: 0 auto 24px auto;
}

/* LOGO DIGESER KE KIRI TANPA MENGGANGGU KETENGAHAN JUDUL */
section.hero .hero-header-content img.hero-logo {
	margin-left: -70px !important;
    margin-right: 20px !important;
    position: absolute;
    left: -110px;            /* Menggeser logo ke sebelah kiri luar judul */
    top: 50%;
    transform: translateY(-50%); /* Posisi vertikal pas di tengah */
    width: 90px !important;      /* Ukuran disesuaikan agar proporsional */
    height: auto !important;
    max-width: none !important;
    flex-shrink: 0 !important;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.3));
}

/* GRUP TEKS (RATA TENGAH SEMPURNA) */
.hero-text-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
}

.hero-title {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1.25;
    margin-bottom: 6px;
    color: #ffffff;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    text-align: center;
}

.hero-subtitle_1 {
    font-size: 3rem;
    color: #ffffff;
    font-weight: 800;
    line-height: 1.25;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    text-align: center;
}


.hero-subtitle {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 400;
    line-height: 1.5;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    text-align: center;
}

/* RESPONSIVE UNTUK TAMPILAN SELULER / HP */
@media (max-width: 768px) {
    /* Pembungkus Hero Header */
    .hero-header-content {
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        text-align: center !important;
        width: 100% !important;
        margin: 0 auto !important;
    }

    /* Perbaikan Presisi Logo MTsN di Tengah */
    .hero-logo {
        width: 80px !important;
        height: auto !important;
        max-width: 80px !important;
        min-width: unset !important;
        flex-shrink: 1 !important;
        display: block !important;
        margin: 0 auto 10px auto !important; /* Otomatis ke tengah dengan margin auto */
        float: none !important;
    }
}
.search-card {
    max-width: 500px;
    margin: 0 auto;
    background: #ffffff;
    padding: 10px;
    border-radius: 14px;
    box-shadow: var(--shadow-lg, 0 20px 25px -5px rgba(0,0,0,0.1));
    display: flex;
    gap: 10px;
}

.search-input {
    flex: 1;
    border: 1px solid transparent;
    padding: 14px 18px;
    font-size: 0.95rem;
    border-radius: 10px;
    outline: none;
    color: var(--text-dark, #1e293b);
    background: #f8fafc;
    transition: all 0.2s ease;
}

.search-input:focus {
    background: #ffffff;
    border-color: var(--accent, #2e7d32);
}

.btn-search {
    background: var(--primary, #1b5e20);
    color: #ffffff;
    border: none;
    padding: 14px 28px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s ease;
    white-space: nowrap;
}

.btn-search:hover {
    background: var(--primary-hover, #0d3b13);
}

/* RESPONSIVE SELULER */
@media (max-width: 640px) {
    .hero-header-content {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    
    /* Spesifisitas tinggi agar menimpa aturan img global */
section.hero .hero-header-content img.hero-logo {
    width: 130px !important;       /* Sesuaikan angka ukuran yang kamu inginkan */
    height: auto !important;       /* Menjaga rasio logo agar tidak gepeng */
    max-width: none !important;    /* Mencegah logo dibatasi oleh max-width global */
    flex-shrink: 0 !important;     /* Mencegah logo menciut di dalam flexbox */
    object-fit: contain;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.3));
}
    .hero-title {
        font-size: 1.6rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }

    .search-card {
        flex-direction: column;
    }

    .btn-search {
        width: 100%;
    }
}

/* MAIN CONTAINER */
.container {
    max-width: 1200px;
    margin: -30px auto 60px auto;
    padding: 0 24px;
    position: relative;
    z-index: 10;
}

/* SEARCH RESULT CARD */
.result-card {
    background: white;
    border-radius: 25px;
    padding: 28px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    margin-bottom: 40px;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.result-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 0;
    margin-bottom: 20px;
}

.badge-status {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.badge-pending { background: #fef3c7; color: #92400e; }
.badge-proses { background: #e0f2fe; color: #075985; }
.badge-ttd { background: #f3e8ff; color: #6b21a8; }
.badge-selesai { background: #dcfce7; color: #166534; }
.badge-ditolak { background: #fee2e2; color: #991b1b; }

.catatan-box {
    background: #f8fafc;
    border-left: 4px solid var(--primary);
    padding: 14px 16px;
    border-radius: 6px;
    margin-bottom: 15px;
}

.download-box {
    background: #f0fdf4;
    border: 1.5px dashed #22c55e;
    border-radius: 12px;
    padding: 18px;
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.btn-download {
    background: #166534;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.88rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
}

.btn-download:hover { 
    background: #14532d; 
}

/* SERVICES SECTION */
.section-header {
    text-align: center;
    margin-bottom: 35px;
    margin-top: 50px;
}

.section-header h2 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-dark);
    letter-spacing: -0.02em;
}

.section-header p {	
	color: var(--text-dark);	
    font-size: 0.95rem;
    margin-top: 4px;
}

.grid-layanan {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

/* TAMPILAN DASAR KARTU LAYANAN */
.card-layanan {
    background-color: #cceff0;
    border: 1px solid #05631d;
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
	box-shadow: 0 15px 10px -7px rgba(0, 0, 0, 0.25)
	
}

/* EFEK HOVER ABU-ABU SAMAR & ELEGANT */
.card-layanan:hover {
    background-color: #c2c7cc;                  /* Warna background tetap */
    border-color: #cbd5e1;                      /* Border tetap */
    transform: scale(1.2);                     /* Kartu membesar 8% dari ukuran asli */
    z-index: 10;                                /* Mengangkat posisi kartu ke paling atas */
    box-shadow: 0 20px 30px -5px rgba(0, 0, 0, 0.35), 
                0 10px 15px -5px rgba(0, 0, 0, 0.25);  /* Bayangan sedikit disesuaikan agar efek melayang makin tegas */
}

/* EFEK HOVER PADA TOMBOL DI DALAM KARTU */
.card-layanan:hover .btn-ajukan {
    color: var(--primary, #1b5e20);             /* Warna teks tombol berubah saat kartu di-hover */
    text-decoration: underline;
}

/* KONDISI AWAL IKON LAYANAN */
.card-icon {
    font-size: 2.2rem;
    margin: 0 auto 14px auto;               /* Margin auto kiri-kanan untuk posisi pas di tengah */
    display: table;                          /* Memastikan alignment margin auto bekerja presisi */
    text-align: center;
    transform-origin: center center;        /* Sumbu putaran di titik tengah ikon */
    transition: transform 0.9s cubic-bezier(0.25, 1, 0.5, 1); /* Transisi halus & pelan */
    transform: scale(0.85) rotate(0deg);     /* Posisi awal: sedikit lebih kecil di dalam */
}

/* EFEK HOVER KARTU UNTUK IKON */
.card-layanan:hover .card-icon {
    transform: scale(1.2) rotate(360deg);   /* Memutar 360° dan membesar sempurna dari dalam */
}

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.card-desc {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 20px;
}

.btn-ajukan {
    background: #ffbb00;
    color: var(--text-dark);
    text-align: center;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.88rem;
    text-decoration: none;
    transition: all 0.2s;
}

.card-layanan:hover .btn-ajukan {
    background: var(--primary);
    color: white;
}

/* FOOTER */
footer {
    background: white;
    border-top: 1px solid var(--border-color);
    padding: 24px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 80px;
}

@media (max-width: 640px) {
    .hero-title { font-size: 1.6rem; }
    .search-card { flex-direction: column; }
    .btn-search { width: 100%; }
}

/* =========================================================
   1. VARIASI EFEK TOP-TO-BOTTOM (PADA HERO SECTION)
   ========================================================= */
@keyframes slideDownFade {
    0% {
        opacity: 0;
        transform: translateY(-30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Terapkan animasi saat halaman pertama kali dimuat */
.hero-header-content,
.search-card {
    animation: slideDownFade 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Beri sedikit jeda waktu muncul untuk kolom search agar lebih estetik */
.search-card {
    animation-delay: 0.15s;
}
/* =========================================================
   2. STYLING TOMBOL BACK TO TOP
   ========================================================= */
.btn-back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    background-color: #1b5e20; /* Warna hijau khas branding */
    color: #ffffff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    opacity: 0;
    visibility: hidden;
    transform: scale(0.7);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
}

.btn-back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.btn-back-to-top:hover {
    background-color: #2e7d32;
    transform: scale(1.1) translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}
/* ==========================================================================
   CSS RESPONSIVE MOBILE FIX (Layar HP < 768px)
   ========================================================================== */
@media (max-width: 768px) {
    /* Mencegah layar goyang / geser ke samping */
    html, body {
        overflow-x: hidden !important;
        width: 100% !important;
    }

    /* Pembungkus Utama Otomatis Mengikuti Lebar Layar HP */
    .container, .nav-container, .hero {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 12px !important;
        padding-right: 12px !important;
        box-sizing: border-box !important;
    }

    /* Navbar */
    .nav-container {
        flex-direction: column !important;
        gap: 10px !important;
        text-align: center !important;
    }
    .brand {
        flex-direction: column !important;
        align-items: center !important;
    }

    /* Hero Section & Logo */
    .hero {
        padding-top: 20px !important;
        padding-bottom: 20px !important;
    }
    .hero-header-content {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        gap: 10px !important;
        width: 100% !important;
    }
    /* Memaksa Logo Madrasah Ikut Ukuran HP */
    .hero-logo {
        width: 75px !important;
        height: auto !important;
        max-width: 75px !important;
        margin: 0 auto !important;
    }
    .hero-title {
        font-size: 1rem !important;
        line-height: 1.3 !important;
    }
    .hero-subtitle_1 {
        font-size: 1.1rem !important;
    }

    /* Form Cek Resi (Dibuat Pas & Tipis) */
    .search-card {
        width: 100% !important;
        padding: 12px !important;
        box-sizing: border-box !important;
    }
    .search-card form {
        flex-direction: column !important;
        width: 100% !important;
        gap: 8px !important;
    }
    .search-input, .btn-search {
        width: 100% !important;
        box-sizing: border-box !important;
        font-size: 0.85rem !important;
    }

    /* Grid Kartu Layanan (1 Kolom Full & Presisi) */
    .grid-layanan {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
        width: 100% !important;
    }
    .card-layanan {
        padding: 12px 15px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
}