/* =========================================
   1. RESET & GLOBAL
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Poppins', sans-serif; }
body { background-color: #f8f9fa; color: #333; line-height: 1.6; }
a { text-decoration: none; transition: 0.3s; }

/* =========================================
   2. HEADER
   ========================================= */
header { background: #fff; padding: 15px 0; box-shadow: 0 4px 20px rgba(0,0,0,0.05); position: sticky; top: 0; z-index: 100; }
.container { width: 90%; max-width: 1200px; margin: 0 auto; }
.header-content { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 24px; font-weight: 800; color: #0d6efd; display: flex; align-items: center; gap: 10px; }
.btn-login { padding: 8px 20px; border: 2px solid #0d6efd; border-radius: 50px; color: #0d6efd; font-weight: 600; }
.btn-login:hover { background: #0d6efd; color: #fff; }

/* =========================================
   3. HERO SECTION
   ========================================= */
.hero { 
    text-align: center; 
    padding: 80px 20px 120px; 
    background-color: #0d6efd;
    background-image: radial-gradient(circle at 10% 20%, rgb(13, 110, 253) 0%, rgb(10, 88, 202) 90%);
    color: white; 
    border-radius: 0 0 50px 50px; 
    position: relative; overflow: hidden;
}
.hero::before { content: ''; position: absolute; top: -50px; left: -50px; width: 200px; height: 200px; background: rgba(255,255,255,0.1); border-radius: 50%; }
.hero::after { content: ''; position: absolute; bottom: -50px; right: -20px; width: 300px; height: 300px; background: rgba(255,255,255,0.1); border-radius: 50%; }
.hero h1 { margin-bottom: 15px; font-size: 2.8rem; font-weight: 700; text-shadow: 0 2px 10px rgba(0,0,0,0.2); position: relative; z-index: 2;}
.hero p { font-size: 1.1rem; opacity: 0.9; margin-bottom: 40px; position: relative; z-index: 2;}

/* Search Box */
.search-box { 
    display: flex; justify-content: center; background: white; padding: 10px; 
    border-radius: 60px; box-shadow: 0 10px 30px rgba(0,0,0,0.2); 
    max-width: 700px; margin: 0 auto; position: relative; z-index: 2; flex-wrap: wrap; gap: 10px;
}
.search-box input { flex: 2; padding: 15px 25px; border: none; outline: none; font-size: 16px; border-radius: 50px; min-width: 200px;}
.search-box select { flex: 1; padding: 15px 20px; border: none; outline: none; border-left: 1px solid #eee; font-size: 16px; color: #555; background: transparent; min-width: 120px;}
.search-box button { padding: 15px 40px; border: none; background: #003e80; color: white; border-radius: 50px; cursor: pointer; font-weight: bold; font-size: 16px; transition: 0.3s; box-shadow: 0 4px 15px rgba(13, 110, 253, 0.4); }
.search-box button:hover { background: #002a5c; transform: translateY(-2px); }

/* =========================================
   4. STATS COUNTER
   ========================================= */
.stats-container { display: flex; justify-content: center; gap: 20px; margin-top: -60px; position: relative; z-index: 10; margin-bottom: 60px; flex-wrap: wrap; }
.stat-box { background: white; padding: 25px; border-radius: 15px; width: 220px; text-align: center; box-shadow: 0 10px 25px rgba(0,0,0,0.1); border-bottom: 4px solid transparent; transition: 0.3s; }
.stat-box:hover { transform: translateY(-5px); }
.stat-number { font-size: 36px; font-weight: 800; color: #333; line-height: 1; margin-bottom: 5px; }
.stat-label { font-size: 14px; color: #666; font-weight: 500; text-transform: uppercase; letter-spacing: 1px; }
.stat-icon { font-size: 24px; margin-bottom: 10px; color: #ddd; }
.s-total { border-bottom-color: #0d6efd; } .s-total .stat-number { color: #0d6efd; }
.s-negeri { border-bottom-color: #198754; } .s-negeri .stat-number { color: #198754; }
.s-swasta { border-bottom-color: #fd7e14; } .s-swasta .stat-number { color: #fd7e14; }
.s-boarding { border-bottom-color: #6f42c1; } .s-boarding .stat-number { color: #6f42c1; }

/* =========================================
   5. FEATURES & GRID
   ========================================= */
.features-section { display: flex; gap: 30px; justify-content: center; flex-wrap: wrap; margin-bottom: 60px; }
.feature-box { background: white; padding: 30px; border-radius: 15px; width: 300px; text-align: center; box-shadow: 0 5px 15px rgba(0,0,0,0.05); transition: 0.3s; border: 1px solid #f0f0f0; }
.feature-box:hover { transform: translateY(-5px); border-color: #0d6efd; }
.icon-circle { width: 70px; height: 70px; background: #e7f1ff; color: #0d6efd; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 28px; margin: 0 auto 20px; }
.feature-box h3 { font-size: 18px; margin-bottom: 10px; color: #333; }
.feature-box p { font-size: 14px; color: #666; }

.section-header { text-align: center; margin-bottom: 40px; }
.section-title { font-size: 28px; font-weight: 700; color: #333; position: relative; display: inline-block; padding-bottom: 10px; }
.section-title::after { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 60px; height: 4px; background: #0d6efd; border-radius: 2px; }

.grid-sekolah { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 30px; margin-bottom: 60px; }
.card { background: white; border-radius: 15px; overflow: hidden; box-shadow: 0 5px 15px rgba(0,0,0,0.05); transition: 0.3s; border: 1px solid #f0f0f0; display: flex; flex-direction: column; }
.card:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(0,0,0,0.1); border-color: #0d6efd; }
.card-img-wrap { position: relative; overflow: hidden; height: 200px; }
.card-img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; }
.card:hover .card-img { transform: scale(1.1); }
.badge-jenjang { position: absolute; top: 15px; left: 15px; background: #0d6efd; color: white; padding: 5px 12px; border-radius: 20px; font-size: 12px; font-weight: bold; box-shadow: 0 2px 5px rgba(0,0,0,0.2); }
.card-body { padding: 25px; flex-grow: 1; display: flex; flex-direction: column; }
.card-title { font-size: 18px; font-weight: 700; margin-bottom: 10px; color: #222; }
.card-price { color: #0d6efd; font-weight: 700; font-size: 16px; margin-bottom: 15px; display: flex; align-items: center; gap: 5px;}
.card-info { font-size: 14px; color: #666; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.btn-detail { margin-top: auto; background: #e7f1ff; color: #0d6efd; font-weight: 600; padding: 12px; border-radius: 8px; text-align: center; transition: 0.3s; }
.btn-detail:hover { background: #0d6efd; color: white; }

/* Pagination */
.pagination { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 40px; margin-bottom: 80px; }
.page-link { display: flex; align-items: center; justify-content: center; min-width: 45px; height: 45px; padding: 0 15px; background: white; color: #555; border-radius: 50px; font-weight: 600; font-size: 14px; text-decoration: none; transition: all 0.3s ease; box-shadow: 0 5px 15px rgba(0,0,0,0.05); border: 1px solid transparent; }
.page-link:hover { background: #0d6efd; color: white; transform: translateY(-3px); box-shadow: 0 8px 20px rgba(13, 110, 253, 0.3); }
.page-link.active { background: #0d6efd; color: white; box-shadow: 0 5px 15px rgba(13, 110, 253, 0.4); pointer-events: none; transform: scale(1.1); }
.page-nav { font-weight: bold; letter-spacing: 0.5px; color: #0d6efd; }

/* CTA */
.cta-section { background: linear-gradient(45deg, #003e80, #0d6efd); color: white; padding: 60px 20px; text-align: center; border-radius: 20px; margin-bottom: 50px; position: relative; overflow: hidden; }
.cta-section h2 { margin-bottom: 15px; }
.btn-cta { background: #fff; color: #0d6efd; padding: 12px 30px; border-radius: 50px; font-weight: bold; margin-top: 20px; display: inline-block; }

/* Footer */
footer { background: #0959d1; color: #ffffff; padding: 50px 0 20px; font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 40px; margin-bottom: 40px; }
.footer-col h3 { color: #ffffff; margin-bottom: 20px; font-size: 18px; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { color: #ffffff; }
.footer-col ul li a:hover { color: #ffffff; }
.copyright { text-align: center; border-top: 1px solid #333; padding-top: 20px; margin-top: 20px; }

/* --- CSS HALAMAN DETAIL MODERN (PERBAIKAN GAMBAR) --- */
.detail-banner {
    background: linear-gradient(135deg, #0d6efd 0%, #003e80 100%);
    padding: 60px 0 100px;
    color: white;
    margin-bottom: -60px;
    border-radius: 0 0 30px 30px;
}
.detail-banner-content {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

/* PENTING: Ini class yang memperbaiki ukuran gambar */
.logo-detail-big {
    width: 120px !important;       /* Paksa lebar */
    height: 120px !important;      /* Paksa tinggi */
    min-width: 120px;              /* Jangan sampai mengecil */
    object-fit: cover;             /* Crop gambar biar kotak rapi */
    border-radius: 15px;
    border: 4px solid rgba(255,255,255,0.3);
    background: #fff;
    display: block;
}

.school-title h1 { font-size: 32px; margin-bottom: 5px; }
.school-meta { font-size: 14px; opacity: 0.9; display: flex; gap: 15px; align-items: center; }
.school-meta i { margin-right: 5px; }

.detail-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 30px; margin-bottom: 60px; position: relative; z-index: 10; }
.detail-main .box-white { background: white; padding: 30px; border-radius: 15px; box-shadow: 0 5px 15px rgba(0,0,0,0.05); margin-bottom: 30px; }
.detail-label { font-size: 18px; font-weight: 700; color: #333; margin-bottom: 20px; padding-bottom: 10px; border-bottom: 2px solid #f0f0f0; display: flex; align-items: center; }
.detail-label i { color: #0d6efd; margin-right: 10px; }

.detail-sidebar { position: sticky; top: 100px; height: fit-content; }
.price-card { background: white; padding: 30px; border-radius: 15px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); text-align: center; border-top: 5px solid #0d6efd; }
.price-item { margin-bottom: 15px; padding-bottom: 15px; border-bottom: 1px dashed #ddd; text-align: left; }
.price-label { font-size: 13px; color: #666; display: block; }
.price-val { font-size: 20px; font-weight: bold; color: #333; }
.map-frame { width: 100%; height: 250px; border: 0; border-radius: 10px; margin-top: 10px; }

.btn-daftar-big { display: block; background: #0d6efd; color: white; text-align: center; padding: 18px; font-size: 18px; font-weight: bold; border-radius: 10px; margin-top: 20px; transition: 0.3s; border: none; width: 100%; cursor: pointer; box-shadow: 0 8px 20px rgba(13, 110, 253, 0.3); text-decoration: none; }
.btn-daftar-big:hover { background: #0b5ed7; transform: translateY(-2px); }

.lightbox { display: none; position: fixed; z-index: 1000; padding-top: 50px; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.9); }
.lightbox-content { margin: auto; display: block; width: 80%; max-width: 800px; max-height: 80vh; object-fit: contain; border-radius: 5px; animation: zoom 0.6s; }
.close { position: absolute; top: 20px; right: 35px; color: #f1f1f1; font-size: 40px; font-weight: bold; cursor: pointer; }
@keyframes zoom { from {transform:scale(0)} to {transform:scale(1)} }

/* Responsive Detail */
@media (max-width: 768px) {
    .detail-grid { grid-template-columns: 1fr; }
    .detail-banner { padding: 40px 0 80px; text-align: center; }
    .detail-banner-content { flex-direction: column; }
    .school-meta { justify-content: center; flex-wrap: wrap; }
    /* Flex reset untuk header */
    div[style*="display: flex"] { flex-direction: column !important; }
    /* Kecuali pagination, stats, dan banner content yang kita atur sendiri */
    .pagination, .stats-container, .school-meta { flex-direction: row !important; flex-wrap: wrap; }
}