/* ============================================================
   SerambiPikir — Home page styles
   Diekstrak dari view home (sebelumnya inline <style>) supaya
   bisa di-cache browser via Vite.

   CATATAN PERUBAHAN vs versi inline:
   - Dead code (blok komentar .trending-strip & .hero-section lama)
     dibuang.
   - Dua blok @media (max-width:992px) untuk .hero-section digabung
     jadi satu; baris `height:400px` yang bentrok dengan aspect-ratio
     DIHAPUS.
   - Aturan .hero-dots yang tertulis dobel di @media(max-width:768px)
     dihapus salah satunya.
   - [FIX] stretched-link: link rubrik & link di dalam meta diberi
     z-index supaya tetap bisa diklik (lihat blok "STRETCHED-LINK FIX").
   - [BARU] blok prefers-reduced-motion untuk mematikan animasi ticker
     bagi pengguna yang menyetel perangkatnya ke minim gerak.
   ============================================================ */

/* ── CONFIGURATION & VARIABLES ── */
:root {
    --primary-blue: #00356b;
    --dark-slate: #0f172a;
    --accent-indigo: #6366f1;
    --amber-gold: #fda616;
    --text-main: #334155;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
}

/* Menimpa variable lokal file ini untuk mode gelap — otomatis berlaku
   ke SEMUA elemen di bawah yang sudah pakai var(--text-main),
   var(--text-muted), var(--border-color), tanpa perlu diedit satu-satu. */
[data-theme="dark"] {
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
    --border-color: #334155;
}

/* ── E-JOURNAL TICKER (running text, marquee CSS murni) ── */
.ejournal-strip {
    background: linear-gradient(
        90deg,
        var(--primary-blue) 0%,
        var(--dark-slate) 100%
    );
    color: #fff;
    padding: 0.6rem 0;
    font-size: 0.8rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.ejournal-inner {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.ejournal-label {
    background: #a43306;
    color: #f8fafc;
    font-weight: 700;
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    padding: 0.25rem 0.75rem;
    border-radius: 100px;
    white-space: nowrap;
    flex-shrink: 0;
    text-transform: uppercase;
    text-decoration: none;
}

.ejournal-label:hover {
    color: #f8fafc;
    opacity: 0.9;
}

/* "Jendela" yang membatasi lebar terlihat — konten sebenarnya
   (.ejournal-ticker-track) jauh lebih lebar dan digeser terus lewat
   animasi, tapi yang boleh terlihat cuma dalam kotak ini. */
.ejournal-ticker-viewport {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(
        90deg,
        transparent 0,
        #000 24px,
        #000 calc(100% - 24px),
        transparent 100%
    );
    mask-image: linear-gradient(
        90deg,
        transparent 0,
        #000 24px,
        #000 calc(100% - 24px),
        transparent 100%
    );
}

.ejournal-ticker-track {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    width: max-content;
    white-space: nowrap;
    animation: ejournal-scroll 60s linear infinite;
}

/* Konten di-duplikasi 2x di HTML — animasi cuma geser SEPARUH lebar
   total, begitu sampai di titik itu posisinya identik dengan awal lagi,
   jadi loop terlihat mulus tanpa "kedutan". */
@keyframes ejournal-scroll {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}

/* Jeda animasi saat kursor di atasnya — supaya sempat dibaca/diklik. */
.ejournal-ticker-track:hover {
    animation-play-state: paused;
}

.ejournal-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #94a3b8;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s;
}

.ejournal-item::before {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 50%;
    flex-shrink: 0;
}

.ejournal-item:hover {
    color: #fff;
}

@media (max-width: 576px) {
    .ejournal-ticker-track {
        animation-duration: 35s;
    }
}

/* ── TICKER PENGUMUMAN (running text kedua) — pola SAMA dengan
   .ejournal-*, cuma warna beda. ── */
.announce-strip {
    background: linear-gradient(
        90deg,
        var(--primary-blue) 0%,
        var(--dark-slate) 100%
    );
    color: #fff;
    padding: 0.6rem 0;
    font-size: 0.8rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.announce-inner {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.announce-label {
    background: #a43306;
    color: #fef2f2;
    font-weight: 700;
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    padding: 0.25rem 0.75rem;
    border-radius: 100px;
    white-space: nowrap;
    flex-shrink: 0;
    text-transform: uppercase;
}

.announce-ticker-viewport {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(
        90deg,
        transparent 0,
        #000 24px,
        #000 calc(100% - 24px),
        transparent 100%
    );
    mask-image: linear-gradient(
        90deg,
        transparent 0,
        #000 24px,
        #000 calc(100% - 24px),
        transparent 100%
    );
}

.announce-ticker-track {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    width: max-content;
    white-space: nowrap;
    animation: announce-scroll 45s linear infinite;
}

@keyframes announce-scroll {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}

.announce-ticker-track:hover {
    animation-play-state: paused;
}

.announce-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #fed7aa;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s;
}

.announce-item::before {
    content: "";
    font-size: 0.8rem;
    flex-shrink: 0;
}

.announce-item:hover {
    color: #fff;
}

@media (max-width: 576px) {
    .announce-ticker-track {
        animation-duration: 28s;
    }
}

/* ── HERO SLIDER (FULLY RESPONSIVE) ── */
.hero-section {
    position: relative;
    background: var(--dark-slate);
    overflow: hidden;
    width: 100%;
    height: auto;
    /* Rasio 16/7 untuk desktop (pas untuk banner web lebar). Ganti ke
       16/9 kalau foto Anda standar widescreen biasa. */
    aspect-ratio: 16 / 7;
    touch-action: pan-y; /* scroll vertikal browser jalan, swipe horizontal ditangani JS */
    cursor: grab;
    user-select: none;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-slide.active {
    opacity: 1;
    cursor: grabbing;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(15, 23, 42, 0.1) 0%,
        rgba(15, 23, 42, 0.95) 100%
    );
}

.hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

.hero-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.3rem 0.85rem;
    border-radius: 100px;
    margin-bottom: 1rem;
    background: var(--accent-indigo);
    color: #fff;
}

/* Badge rubrik hero lebih kecil di ponsel. Desktop tidak tersentuh. */
@media (max-width: 576px) {
    .hero-badge {
        font-size: 0.58rem;
        letter-spacing: 0.05em;
        padding: 0.22rem 0.65rem;
        margin-bottom: 0.5rem;
    }
}

.hero-title {
    font-family: "Lora", serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.25;
    max-width: 800px;
    margin-bottom: 1rem;
}

.hero-title a {
    transition: opacity 0.2s;
}

.hero-title a:hover {
    opacity: 0.85;
}

.hero-meta {
    color: #94a3b8;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.hero-meta > span:not([id]) {
    color: #64748b;
    line-height: 1;
    user-select: none;
}

#hero-author-link {
    transition: color 0.2s;
}

#hero-author-link:hover {
    color: #fff !important;
}

.hero-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid rgba(255, 255, 255, 0.2);
}

.avatar-initials-hero {
    width: 28px;
    height: 28px;
    font-size: 0.7rem;
    font-weight: 600;
}

/* Hero Navigation System */
.hero-arrows {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 1.5rem;
    pointer-events: none;
    z-index: 20;
}

.hero-arrow {
    pointer-events: all;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
}

.hero-arrow:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

.hero-dots {
    position: absolute;
    bottom: 1.5rem;
    right: 1.5rem;
    display: flex;
    gap: 0.4rem;
    z-index: 20;
}

.hero-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    border: none;
    cursor: pointer;
    transition: all 0.25s;
    padding: 0;
}

.hero-dot.active {
    background: var(--accent-indigo);
    transform: scale(1.1);
    width: 20px;
    border-radius: 4px;
}

/* Dot hero sedikit dikecilkan di ponsel — versi 8px/20px terasa besar
   di layar kecil. Desktop tidak tersentuh. */
@media (max-width: 576px) {
    .hero-dot {
        width: 6px;
        height: 6px;
    }

    .hero-dot.active {
        width: 15px;
    }

    .hero-dots {
        gap: 0.3rem;
    }
}

/* ── STICKY CATEGORY STRIP ── */
.cat-strip {
    border-bottom: 1px solid var(--border-color);
    background: var(--sp-surface);
    position: sticky;
    top: 0;
    z-index: 900;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.cat-strip-inner {
    display: flex;
    gap: 0.5rem;
    padding: 0.85rem 0;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.cat-strip-inner::-webkit-scrollbar {
    display: none;
}

.cat-pill {
    white-space: nowrap;
    border-radius: 100px;
    padding: 0.45rem 1.1rem;
    font-size: 0.825rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s ease;
    border: 1px solid var(--border-color);
    background: var(--sp-surface-alt);
    color: var(--text-muted);
}

.cat-pill:hover {
    background: var(--border-color);
    color: var(--text-main);
}

.cat-pill.active {
    background: var(--primary-blue) !important;
    color: #ffffff !important;
    border-color: var(--primary-blue) !important;
}

/* Pil rubrik lebih ringkas di ponsel — versi default terlalu besar
   dan makan tinggi di strip kategori. */
@media (max-width: 576px) {
    .cat-pill {
        padding: 0.32rem 0.8rem;
        font-size: 0.72rem;
    }

    .cat-strip-inner {
        gap: 0.4rem;
        padding: 0.6rem 0;
    }
}

/* ── SECTION HEADER & VIEW SWITCHER ── */
.sec-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--border-color);
}

.sec-title {
    font-family: "Lora", serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.sec-title::before {
    content: "";
    display: block;
    width: 4px;
    height: 1.2rem;
    background: var(--accent-indigo);
    border-radius: 2px;
}

.sp-view-switcher {
    display: inline-flex;
    background: var(--sp-surface-alt);
    padding: 3px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.sp-view-btn {
    border: none;
    background: transparent;
    color: var(--text-muted);
    padding: 0.3rem 0.7rem;
    border-radius: 6px;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.sp-view-btn:hover {
    color: var(--text-main);
}

.sp-view-btn.is-active {
    background: var(--sp-surface);
    color: var(--primary-blue);
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06);
}

[data-theme="dark"] .sp-view-btn {
    color: var(--text-muted);
}

[data-theme="dark"] .sp-view-btn:hover {
    color: var(--text-main);
}

[data-theme="dark"] .sp-view-btn.is-active {
    color: #fff;
}

/* ── UNIVERSAL ARTICLE CARDS (GRID MODE DEFAULT) ── */
.art-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: var(--sp-surface);
    border: 1px solid var(--border-color);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.art-card:hover {
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.04);
    transform: translateY(-3px);
    border-color: var(--text-muted);
}

.art-card:hover .art-card-title a {
    color: var(--accent-indigo);
}

.art-card-img {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--sp-surface-alt);
}

.art-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* "top" membuat crop mengutamakan bagian atas foto (wajah/judul overlay)
       supaya tidak terpotong. */
    object-position: center top;
    transition: transform 0.4s ease;
}

.art-card:hover .art-card-img img {
    transform: scale(1.03);
}

/* Rasio aspek disesuaikan bertahap mengikuti breakpoint grid (1 kolom
   mobile → 2 kolom ≥576px → 3 kolom ≥992px) supaya perubahan crop halus. */
@media (min-width: 576px) and (max-width: 991.98px) {
    .art-card-mobile-fluid .art-card-img {
        aspect-ratio: 16/10;
    }
}

@media (min-width: 992px) {
    .art-card-mobile-fluid .art-card-img {
        aspect-ratio: 4/3;
    }
}

/* ── GRID 2 KOLOM DI MOBILE — kartu dibuat lebih ringkas.
   Khusus mode GRID (:not(.is-list-layout)); mode LIST punya gaya sendiri. ── */
@media (max-width: 575.98px) {
    .sp-flow-wrapper:not(.is-list-layout) .art-card-mobile-fluid .art-card-img {
        aspect-ratio: 4/3;
    }

    .sp-flow-wrapper:not(.is-list-layout)
        .art-card-mobile-fluid
        .art-card-body {
        padding: 0.75rem;
    }

    .sp-flow-wrapper:not(.is-list-layout) .art-card-mobile-fluid .art-card-cat {
        font-size: 0.58rem;
        padding: 0.15rem 0.45rem;
        margin-bottom: 0.4rem;
    }

    .sp-flow-wrapper:not(.is-list-layout)
        .art-card-mobile-fluid
        .art-card-title {
        font-size: 0.825rem;
        line-height: 1.35;
        margin-bottom: 0.35rem;
        -webkit-line-clamp: 3;
    }

    /* Sinopsis disembunyikan — ruang terlalu sempit di 2 kolom mobile. */
    .sp-flow-wrapper:not(.is-list-layout)
        .art-card-mobile-fluid
        .art-card-excerpt {
        display: none;
    }

    .sp-flow-wrapper:not(.is-list-layout)
        .art-card-mobile-fluid
        .art-card-meta {
        flex-wrap: wrap;
        gap: 0.35rem;
        padding-top: 0.6rem;
    }

    .sp-flow-wrapper:not(.is-list-layout)
        .art-card-mobile-fluid
        .art-card-avatar,
    .sp-flow-wrapper:not(.is-list-layout)
        .art-card-mobile-fluid
        .avatar-initials-card {
        width: 18px;
        height: 18px;
    }

    .sp-flow-wrapper:not(.is-list-layout)
        .art-card-mobile-fluid
        .art-card-author {
        font-size: 0.68rem;
        max-width: 70px;
    }

    .sp-flow-wrapper:not(.is-list-layout)
        .art-card-mobile-fluid
        .art-card-time {
        font-size: 0.65rem;
    }

    .sp-flow-wrapper:not(.is-list-layout)
        .art-card-mobile-fluid
        .art-card-lock {
        font-size: 0.62rem;
    }
}

.art-card-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.art-card-cat {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    margin-bottom: 0.6rem;
    text-decoration: none;
    background: var(--sp-surface-alt);
    color: var(--text-muted);
    width: fit-content;
    transition: all 0.15s;
}

.art-card-cat:hover {
    background: var(--border-color);
    color: var(--text-main);
}

.art-card-title {
    font-family: "Lora", serif;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--text-main);
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.art-card-title a {
    text-decoration: none;
    color: inherit;
}

.art-card-excerpt {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 1.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.art-card-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 0.85rem;
    border-top: 1px solid var(--border-color);
}

.art-card-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--sp-surface-alt);
}

.avatar-initials-card {
    width: 24px;
    height: 24px;
    font-size: 0.65rem;
    font-weight: 600;
}

.art-card-author {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 130px;
}

.art-card-time {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-left: auto;
}

.art-cover-fallback {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.15);
    font-family: "Lora", serif;
    font-weight: 700;
    letter-spacing: -0.02em;
    user-select: none;
}

/* ============================================================
   STRETCHED-LINK FIX
   Di kartu, judul memakai .stretched-link yang overlay-nya (::after)
   menutupi seluruh .art-card. Akibatnya link rubrik (.art-card-cat)
   dan link apa pun di dalam meta jadi TIDAK bisa diklik walau terlihat
   seperti link. Mengangkat mereka dengan position:relative + z-index
   menaruhnya di atas overlay, jadi klik-nya kembali berfungsi.
   ============================================================ */
.art-card-cat,
.art-card-meta a {
    position: relative;
    z-index: 2;
}

/* ── DESKTOP/TABLET LIST VIEW LAYOUT ── */
@media (min-width: 769px) {
    .sp-flow-wrapper.is-list-layout .sp-article-grid-col {
        width: 100% !important;
    }

    .sp-flow-wrapper.is-list-layout .art-card {
        flex-direction: row !important;
        align-items: center;
        padding: 1.25rem;
        gap: 1.5rem;
    }

    .sp-flow-wrapper.is-list-layout .art-card-img {
        width: 240px !important;
        height: 150px !important;
        border-radius: 8px;
    }

    .sp-flow-wrapper.is-list-layout .art-card-body {
        padding: 0 !important;
    }

    .sp-flow-wrapper.is-list-layout .art-card-meta {
        margin-top: 0.85rem;
        padding-top: 0.6rem;
    }
}

/* ── ADJUST RATIOS ON 4-COLUMN WIDE DESKTOP GRID ── */
@media (min-width: 1200px) {
    #sp-articles-flow-wrapper:not(.is-list-layout) .art-card-img {
        aspect-ratio: 4/3; /* Supaya feed Terkini seimbang tingginya */
    }
}

/* ── SIDEBAR WIDGETS ── */
.widget-box {
    background: var(--sp-surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.widget-header {
    padding: 0.95rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--sp-surface-alt);
}

.widget-body {
    padding: 1.25rem;
}

.tag-badge {
    display: inline-block;
    font-size: 0.75rem;
    padding: 0.4rem 0.85rem;
    border-radius: 100px;
    background: var(--sp-surface-alt);
    color: var(--text-main);
    font-weight: 500;
    text-decoration: none;
    margin-bottom: 0.4rem;
    transition: all 0.15s ease;
}

.tag-badge:hover {
    background: var(--dark-slate);
    color: #fff;
}

.channel-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.85rem;
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    transition: all 0.15s ease;
}

.channel-row:last-child {
    border-bottom: none;
}

.channel-row:hover {
    background: var(--sp-surface-alt);
    color: var(--accent-indigo);
}

.cta-banner {
    border-radius: 12px;
    background: linear-gradient(
        180deg,
        var(--primary-blue) 0%,
        var(--dark-slate) 100%
    );
    color: #fff;
    padding: 2rem 1.5rem;
    text-align: center;
    margin-bottom: 1.5rem;
    border: 1px solid var(--dark-slate);
}

.cta-banner h6 {
    font-family: "Lora", serif;
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #fff;
}

.cta-banner p {
    font-size: 0.825rem;
    color: #94a3b8;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.cta-banner .btn-cta {
    background: var(--accent-indigo);
    color: #fff;
    font-weight: 600;
    font-size: 0.85rem;
    border-radius: 8px;
    padding: 0.6rem 1.5rem;
    border: none;
    text-decoration: none;
    display: inline-block;
    transition: background 0.15s;
}

.cta-banner .btn-cta:hover {
    background: #4f46e5;
}

/* ── KARTU BANTU SERAMBIPIKIR BERTUMBUH ── */
.feedback-card {
    background: var(--sp-surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.75rem 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.feedback-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #574efb33;
    color: #4f46e5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin: 0 auto 1rem;
}

.feedback-card h6 {
    font-family: "Lora", serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.6rem;
}

.feedback-card p {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

.feedback-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-blue);
    color: #fff;
    font-weight: 600;
    font-size: 0.85rem;
    border-radius: 8px;
    padding: 0.6rem 1.5rem;
    text-decoration: none;
    transition: background 0.15s;
}

.feedback-btn:hover {
    background: #002a54;
    color: #fff;
}

/* ── SERAMBI INSPIRASI AUTOMATED CARD ── */
.inspiration-card {
    background: linear-gradient(
        180deg,
        var(--primary-blue) 0%,
        var(--dark-slate) 100%
    );
    border-radius: 16px;
    padding: 2rem 1.5rem;
    margin: 1.5rem 0;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
    min-height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    touch-action: pan-y;
    cursor: grab;
    user-select: none;
}

.inspiration-card:active {
    cursor: grabbing;
}

.insp-circle-1 {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 1.5px solid rgba(99, 102, 241, 0.15);
    pointer-events: none;
}

.insp-circle-2 {
    position: absolute;
    bottom: -30px;
    left: 20px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 1px solid rgba(245, 158, 11, 0.1);
    pointer-events: none;
}

.insp-tag {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #fece18;
    margin-bottom: 1.25rem;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 6px;
}

.inspiration-slides-container {
    position: relative;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.inspiration-slide {
    display: none;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.inspiration-slide.active {
    display: block;
    opacity: 1;
}

.insp-quote {
    font-size: 1.05rem;
    font-weight: 500;
    color: #f1f5f9;
    line-height: 1.5;
    font-style: italic;
    position: relative;
    z-index: 1;
    margin-bottom: 0.5rem;
}

.insp-author {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #94a3b8;
    position: relative;
    z-index: 1;
}

.insp-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 1.25rem;
    position: relative;
    z-index: 5;
}

.insp-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.25s ease;
}

.insp-dot.active {
    background: #818cf8;
    width: 16px;
    border-radius: 4px;
}

#sp-load-more-btn {
    min-width: 220px;
    transition: all 0.2s;
    border-color: var(--border-color);
    color: var(--text-muted);
}

#sp-load-more-btn:hover {
    background: var(--dark-slate);
    border-color: var(--dark-slate);
    color: #fff;
}

/* ── BADGE PERINGKAT & TEKS MINI-LIST (widget Terpopuler/Sajian Redaksi) ── */
.rank-badge {
    flex-shrink: 0;
    font-family: "Lora", serif;
    font-weight: 800;
    font-style: italic;
    font-size: 2.5rem;
    line-height: 1;
    min-width: 42px;
    text-align: center;
    color: #4f46e5;
    transition: transform 0.15s ease;
}

.channel-row:hover .rank-badge {
    transform: scale(1.08);
}

.mini-list-title {
    font-family: "Lora", serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.4;
    overflow-wrap: break-word;
    word-break: break-word;
}

.mini-list-content {
    min-height: calc(1.05rem * 1.4 * 3);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.mini-list-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ── COMPREHENSIVE RESPONSIVE ENGINE (MOBILE & TABLET FIXES) ── */
/* CATATAN: dua blok @media(max-width:992px) di versi lama digabung di
   sini; baris `height:400px` yang bentrok dengan aspect-ratio dihapus. */
@media (max-width: 992px) {
    .hero-section {
        aspect-ratio: 16 / 9;
    }

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

    .hero-content {
        padding: 2.5rem 1.25rem;
    }
}

@media (max-width: 768px) {
    /* Fix Hero Slider Elements for Mobile */
    .hero-section {
        aspect-ratio: 4 / 3;
    }

    .hero-title {
        font-size: 1.2rem;
        line-height: 1.3;
        margin-bottom: 0.5rem;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .hero-content {
        padding: 1.5rem 1.15rem;
    }

    .hero-badge {
        margin-bottom: 0.5rem;
    }

    .hero-meta {
        gap: 0.4rem;
        font-size: 0.8rem;
    }

    /* Sembunyikan tombol panah di mobile — cukup lewat swipe & dots */
    .hero-arrows {
        display: none;
    }

    /* (Aturan .hero-dots yang tadinya ditulis dobel di sini dihapus salah satunya) */
    .hero-dots {
        bottom: 1rem;
        right: 50%;
        transform: translateX(50%);
    }

    /* ── FIX VIEW SWITCHER FOR MOBILE ──
       Default di mobile grid biasa (vertikal stack). Gaya list HANYA aktif
       jika wrapper punya class .is-list-layout */
    .sp-flow-wrapper.is-list-layout .sp-article-grid-col {
        width: 100% !important;
    }

    .sp-flow-wrapper.is-list-layout .art-card {
        flex-direction: row !important;
        align-items: stretch;
        padding: 0.85rem !important;
        gap: 1rem !important;
    }

    .sp-flow-wrapper.is-list-layout .art-card-img {
        width: 110px !important;
        height: 95px !important;
        aspect-ratio: 1/1 !important;
        border-radius: 8px !important;
        overflow: hidden;
    }

    .sp-flow-wrapper.is-list-layout .art-card-body {
        padding: 0 !important;
    }

    .sp-flow-wrapper.is-list-layout .art-card-excerpt {
        display: none; /* Sembunyikan sinopsis di mobile list view */
    }

    .sp-flow-wrapper.is-list-layout .art-card-title {
        font-size: 0.925rem !important;
        line-height: 1.3;
        margin-bottom: 0.35rem;
        -webkit-line-clamp: 2;
    }

    .sp-flow-wrapper.is-list-layout .art-card-cat {
        font-size: 0.55rem !important;
        padding: 0.1rem 0.4rem;
        margin-bottom: 0.35rem;
    }

    .sp-flow-wrapper.is-list-layout .art-card-meta {
        margin-top: auto;
        padding-top: 0;
        border-top: none;
    }

    .sp-flow-wrapper.is-list-layout .art-card-avatar {
        width: 18px;
        height: 18px;
    }

    .sp-flow-wrapper.is-list-layout .avatar-initials-card {
        width: 18px;
        height: 18px;
        font-size: 0.55rem;
    }

    .sp-flow-wrapper.is-list-layout .art-card-author {
        font-size: 0.7rem;
        max-width: 90px;
    }

    .sp-flow-wrapper.is-list-layout .art-card-time {
        font-size: 0.68rem;
    }
}

/* ── HERO — PONSEL SEMPIT (≤430px) ──
   Ukuran judul diturunkan lagi supaya tidak menutupi hampir seluruh
   gambar hero di layar kecil. */
@media (max-width: 430px) {
    .hero-title {
        font-size: 1.05rem;
        line-height: 1.28;
    }

    .hero-content {
        padding: 1.15rem 1rem;
    }

    .hero-badge {
        font-size: 0.6rem;
        padding: 0.25rem 0.7rem;
        margin-bottom: 0.45rem;
    }

    .hero-meta {
        font-size: 0.72rem;
        gap: 0.35rem;
    }
}

/* ============================================================
   PREFERS-REDUCED-MOTION (BARU)
   Hormati pengguna yang menyetel perangkatnya ke minim gerak:
   matikan animasi ticker berjalan. flex-wrap:wrap membuat teks turun
   ke bawah (tetap terbaca) saat animasi mati.
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    .ejournal-ticker-track,
    .announce-ticker-track {
        animation: none !important;
        transform: none !important;
        flex-wrap: wrap;
    }
}

.art-card-img {
    background: linear-gradient(100deg,
        var(--sp-surface-alt) 28%,
        rgba(148, 163, 184, 0.20) 45%,
        var(--sp-surface-alt) 62%);
    background-size: 200% 100%;
    animation: sp-img-shimmer 1.4s ease-in-out infinite;
}

@keyframes sp-img-shimmer {
    from { background-position: 200% 0; }
    to   { background-position: -200% 0; }
}

@media (prefers-reduced-motion: reduce) {
    .art-card-img { animation: none; background: var(--sp-surface-alt); }
}
