/* ============================================================
   hero-upgrade.css — Font Upgrade + Hero Section Redesign
   Tambahkan di header.php SETELAH style.css dan mobile.css:
   <link rel="stylesheet" href="<?= $asset_base ?>hero-upgrade.css?v=1">

   Ganti juga baris @import font di style.css dengan:
   @import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');
   ============================================================ */

/* ──────────────────────────────────────────
   1. FONT SYSTEM UPGRADE
   Sora  → heading (lebih tajam, editorial feel)
   Inter → body    (paling readabel di semua ukuran)
   ────────────────────────────────────────── */
:root {
    --font-heading: 'Sora', 'Outfit', sans-serif;
    --font-body:    'Inter', 'Plus Jakarta Sans', sans-serif;

    /* Token tambahan hero */
    --hero-radius: 20px;
    --hero-overlay: linear-gradient(
        to top,
        rgba(6, 9, 16, 0.97) 0%,
        rgba(6, 9, 16, 0.72) 42%,
        rgba(6, 9, 16, 0.18) 100%
    );
    --hero-accent-line: linear-gradient(90deg, #6366F1 0%, #8B5CF6 50%, #06B6D4 100%);
}

/* Body tracking sedikit lebih rapat — Inter sangat baik di -0.01em */
body {
    letter-spacing: -0.01em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ──────────────────────────────────────────
   2. HERO SPLIT CARD — OVERLAY STYLE
   Gambar full-bleed, teks overlay di atas
   ────────────────────────────────────────── */
.hero-split-card {
    position: relative;
    border-radius: var(--hero-radius);
    overflow: hidden;
    display: block;          /* override flex column */
    border: 1px solid rgba(99,102,241,0.18);
    box-shadow: 0 24px 48px -12px rgba(0,0,0,0.55);
    transition: box-shadow 0.4s ease;
}

.hero-split-card:hover {
    box-shadow: 0 32px 64px -12px rgba(99,102,241,0.3);
}

/* Gambar — full-bleed, lebih tinggi */
.hero-split-img {
    display: block;
    width: 100%;
    height: 460px;
    overflow: hidden;
    position: relative;
}

.hero-split-img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--hero-overlay);
    z-index: 1;
    pointer-events: none;
}

.hero-split-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 8s cubic-bezier(0.16, 1, 0.3, 1);
    display: block;
}

.hero-split-card:hover .hero-split-img img {
    transform: scale(1.06);
}

/* Teks — overlay di atas gambar (absolute) */
.hero-split-body {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2;
    padding: 36px 40px 40px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: transparent; /* overlay sudah dari ::after */
}

/* Garis aksen tipis di atas body */
.hero-split-body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 40px;
    right: 40px;
    height: 1px;
    background: var(--hero-accent-line);
    opacity: 0.35;
}

/* Meta row */
.hero-meta-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* Tag badge — lebih kontras di atas foto */
.hero-split-body .tag-badge {
    background: rgba(99,102,241,0.2);
    border-color: rgba(99,102,241,0.45);
    color: #a5b4fc;
    font-size: 0.7rem;
    padding: 4px 12px;
    letter-spacing: 1.2px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.hero-time-ago {
    color: rgba(255,255,255,0.6);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.02em;
}

/* Judul utama */
.hero-title {
    font-family: var(--font-heading);
    font-size: 2.1rem;
    font-weight: 800;
    line-height: 1.22;
    letter-spacing: -0.04em;
    color: #ffffff;
}

.hero-title a {
    color: inherit;
}

.hero-title a:hover {
    color: #a5b4fc;
}

/* Deskripsi singkat */
.hero-desc {
    color: rgba(255,255,255,0.72);
    font-size: 0.95rem;
    line-height: 1.65;
    font-weight: 400;
    max-width: 680px;
}

/* ──────────────────────────────────────────
   3. SUB-FEATURED ROW — lebih kuat & berhierarki
   ────────────────────────────────────────── */
.sub-featured-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-top: 16px;
    margin-bottom: 4px;
    overflow: hidden;
    background: rgba(15, 20, 32, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.sub-featured-col {
    padding: 22px 24px;
    border-right: 1px solid var(--border-color);
    border-bottom: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: background 0.25s ease;
}

.sub-featured-col:hover {
    background: rgba(99,102,241,0.05);
}

.sub-featured-col:last-child {
    border-right: none;
}

/* Reset override dari style.css agar padding konsisten */
.sub-featured-col:first-child,
.sub-featured-col:not(:first-child) {
    padding-left: 24px;
    padding-right: 24px;
}

/* Garis aksen vertikal kiri saat hover */
.sub-featured-col {
    position: relative;
}

.sub-featured-col::before {
    content: '';
    position: absolute;
    left: 0;
    top: 22px;
    bottom: 22px;
    width: 2px;
    background: var(--grad-primary);
    border-radius: 2px;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.sub-featured-col:hover::before {
    opacity: 1;
}

.sub-featured-meta {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.sub-featured-category {
    color: var(--accent-primary);
    font-weight: 700;
}

.sub-featured-time {
    color: var(--text-muted);
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
}

.sub-featured-title {
    font-family: var(--font-heading);
    font-size: 0.97rem;
    font-weight: 700;
    line-height: 1.45;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.sub-featured-col:hover .sub-featured-title {
    color: var(--accent-primary);
}

/* ──────────────────────────────────────────
   4. SECTION TITLE — lebih bersih
   ────────────────────────────────────────── */
.section-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 16px;
    margin-top: 28px;
    display: flex;
    align-items: center;
}

.section-title span {
    white-space: nowrap;
}

.section-title-line {
    flex-grow: 1;
    height: 1px;
    background: var(--border-color);
    margin-left: 16px;
}

/* ──────────────────────────────────────────
   5. POST CARD — lebih refined
   ────────────────────────────────────────── */
.post-card {
    border-radius: var(--radius-md);
    border-color: var(--border-color);
    background: rgba(15, 20, 32, 0.5);
    transition: border-color 0.25s, background 0.25s, transform 0.25s, box-shadow 0.25s;
}

.post-card:hover {
    border-color: rgba(99,102,241,0.3);
    background: rgba(15, 20, 32, 0.75) !important;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    transform: translateY(-2px);
}

.post-card-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.97rem;
    line-height: 1.42;
    letter-spacing: -0.025em;
}

/* ──────────────────────────────────────────
   6. WIDGET TITLE — lebih bersih
   ────────────────────────────────────────── */
.widget-title {
    font-family: var(--font-heading);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

/* ──────────────────────────────────────────
   7. POPULAR NUMBER — lebih impactful
   ────────────────────────────────────────── */
.popular-number {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.05em;
}

.popular-item-title {
    font-family: var(--font-heading);
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.42;
}

/* ──────────────────────────────────────────
   8. DETAIL PAGE — font upgrade
   ────────────────────────────────────────── */
.detail-title {
    font-family: var(--font-heading);
    letter-spacing: -0.04em;
    font-weight: 800;
}

.detail-body {
    font-family: var(--font-body);
    font-size: 1.1rem;
    line-height: 1.82;
    letter-spacing: -0.01em;
}

/* ──────────────────────────────────────────
   9. LIGHT THEME overrides
   ────────────────────────────────────────── */
.light-theme .sub-featured-row {
    background: rgba(255,255,255,0.8);
}

.light-theme .sub-featured-col:hover {
    background: rgba(99,102,241,0.04);
}

.light-theme .hero-split-body .tag-badge {
    background: rgba(99,102,241,0.12);
    color: #4338ca;
    border-color: rgba(99,102,241,0.3);
}

.light-theme .post-card {
    background: rgba(255,255,255,0.75);
}

.light-theme .post-card:hover {
    background: rgba(255,255,255,0.95) !important;
}

/* ──────────────────────────────────────────
   10. MOBILE — hero overlay style
   ────────────────────────────────────────── */
@media (max-width: 768px) {
    .hero-split-img {
        height: 360px;
    }

    .hero-split-body {
        padding: 24px 20px 28px;
    }

    .hero-split-body::before {
        left: 20px;
        right: 20px;
    }

    .hero-title {
        font-size: 1.4rem;
        letter-spacing: -0.03em;
    }

    .hero-desc {
        font-size: 0.88rem;
        line-height: 1.6;
    }

    .sub-featured-row {
        display: flex;
        flex-direction: column;
        border-radius: var(--radius-md);
    }

    .sub-featured-col {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 16px 18px;
    }

    .sub-featured-col:last-child {
        border-bottom: none;
    }

    .sub-featured-col::before {
        top: 16px;
        bottom: 16px;
    }
}

@media (max-width: 480px) {
    .hero-split-img {
        height: 280px;
    }

    .hero-title {
        font-size: 1.2rem;
    }
}
