/* =========================================================
   HOME.CSS
   Style yang HANYA dipakai di halaman Home.
   Di-load setelah app.css, jadi bisa pakai var(--color-primary)
   dkk yang sudah didefinisikan di app.css.
   ========================================================= */

/* --- 1. HERO SECTION --- */
.hero {
    position: relative;
    min-height: 560px;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
    /* Gradient gelap di atas foto supaya teks putih tetap terbaca */
    background-image:
        linear-gradient(180deg, rgba(1, 40, 80, 0.75) 0%, rgba(1, 40, 80, 0.45) 45%, rgba(1, 40, 80, 0.65) 100%),
        var(--hero-image, url('/images/hero-sekolah.jpg'));
}

.hero-content {
    max-width: 620px;
    padding: 60px 0 130px;
}

.hero-content h1 {
    color: #ffffff;
    font-size: 40px;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 18px;
}

.hero-content p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 15.5px;
    margin-bottom: 28px;
    max-width: 540px;
}

.hero-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

/* --- 2. KARTU STATISTIK ---
   Kartu ini sengaja ditarik ke atas (margin-top negatif) supaya
   posisinya "mengambang" menimpa bagian bawah hero, sesuai desain. */
.stats-card {
    background-color: #ffffff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    margin-top: -90px;
    margin-bottom: 60px;
    position: relative;
    z-index: 2;
}

.stats-card .container {
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding-top: 32px;
    padding-bottom: 32px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    flex: 1;
}

.stat-item:not(:last-child) {
    border-right: 1px solid var(--color-border);
}

.stat-item .stat-icon {
    color: var(--color-primary);
    margin-bottom: 4px;
}

.stat-item .stat-number {
    font-size: 26px;
    font-weight: 700;
    color: var(--color-text-dark);
}

.stat-item .stat-label {
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--color-text-muted);
}

/* --- 3. SECTION UMUM (heading + link "lihat semua") --- */
.section {
    padding: 56px 0;
}

.section-bg-light {
    background-color: var(--color-bg-light);
}

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 28px;
    gap: 16px;
}

.section-head h2 {
    color: var(--color-primary);
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 6px;
}

.section-head p {
    color: var(--color-text-muted);
    font-size: 14.5px;
}

.section-link {
    color: var(--color-primary);
    font-weight: 600;
    font-size: 14.5px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* --- 4. ARTIKEL TERBARU --- */
.article-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.article-card {
    background-color: #ffffff;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.article-card .article-thumb {
    width: 100%;
    height: 170px;
    object-fit: cover;
}

.article-card .article-body {
    padding: 18px 20px 22px;
}

.article-card .article-date {
    font-size: 12.5px;
    color: var(--color-text-muted);
    margin-bottom: 8px;
}

.article-card h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--color-text-dark);
    margin-bottom: 8px;
}

.article-card p {
    font-size: 13.5px;
    color: var(--color-text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- 5. GALERI & PRODUK (2 kolom) --- */
.gallery-product-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

/* Grid thumbnail galeri.
   Catatan: di desain Figma area ini kosong (belum diisi gambar),
   jadi susunan 2x2 ini dibuat sebagai default yang masuk akal. */
.gallery-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.gallery-grid img {
    width: 100%;
    height: 130px;
    object-fit: cover;
    border-radius: var(--radius-md);
}

.product-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.product-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background-color: var(--color-bg-light);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 14px 18px;
}

.product-card .product-thumb {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    background-color: #ffffff;
    flex-shrink: 0;
}

.product-card .product-info {
    flex: 1;
}

.product-card .product-info h3 {
    font-size: 15.5px;
    font-weight: 600;
    color: var(--color-text-dark);
}

.product-card .product-info p {
    font-size: 13px;
    color: var(--color-text-muted);
    margin: 3px 0 6px;
}

.product-card .product-price {
    font-size: 14.5px;
    font-weight: 700;
    color: #B8860B;
}

.product-card .product-cart-btn {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background-color: transparent;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.product-card .product-cart-btn:hover {
    background-color: var(--color-primary);
    color: #ffffff;
}

/* --- 6. RESPONSIVE --- */
@media (max-width: 900px) {
    .hero-content h1 {
        font-size: 32px;
    }

    .stats-card {
        margin-top: -60px;
    }

    .stats-card .container {
        flex-wrap: wrap;
        gap: 20px;
    }

    .stat-item {
        min-width: 40%;
        border-right: none !important;
    }

    .article-grid {
        grid-template-columns: 1fr;
    }

    .gallery-product-grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }
}

@media (max-width: 560px) {
    .hero-content h1 {
        font-size: 26px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .section-head {
        flex-direction: column;
        align-items: flex-start;
    }
}
