/* src/css/story.css (Theme: Dramatic Spotlight Focus) */

/* src/css/story.css (Theme: Dramatic Spotlight Focus) */

.story {
    position: relative;
    z-index: 2;
    padding: 4rem 0 4rem 0; /* Padding bawah disusutkan gila-gilaan agar menyambung normal dengan section hadist */
    /* Soft gradient from body bg to cinematic dark and back to body bg */
    background: linear-gradient(to bottom, var(--bg-body) 0%, var(--overlay-black-dark, #050505) 15%, var(--overlay-black-dark, #020202) 85%, var(--bg-body) 100%) !important;
    border: none !important;
    width: 100% !important;
    overflow: hidden !important; 
    color: var(--card-bg-color, #fff); /* Teks dasar yang selaras dengan tema (terang untuk latar gelap) */
}

/* HEADER */
.story-header {
    text-align: center;
    margin-bottom: 5rem;
    padding: 0 1rem;
    position: relative;
    z-index: 5;
}

.spotlight-main-title {
    font-family: var(--sacramento);
    font-size: 3rem;
    color: var(--heading-text-color); /* Gold yang menyala di kegelapan */
    margin-bottom: 0.5rem;
}

.story-header p {
    font-size: 1rem;
    opacity: 0.7;
    color: var(--heading-text-color) !important; /* Memaksa warna terang agar tidak kalah oleh selector global theme lain */
    max-width: 500px;
    margin: 0 auto;
}

/* --- SPOTLIGHT LIST --- */
.spotlight-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 80px; /* Jarak sangat jauh antar kartu agar fokus satu per satu */
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding-bottom: 3rem; /* Ekstra padding disetel sangat normal agar tidak mendorong hadist terlalu jauh ke dasar bumi */
}

/* --- SPOTLIGHT ITEM (STABIL) --- */
.story-spotlight-item {
    position: relative;
    width: 90%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /* Container ini tidak dianimasikan posisi/skalanya, agar obsever stabil! */
}

/* --- SPOTLIGHT INNER (ANIMASI) --- */
.spotlight-inner {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    
    /* INITIAL STATE: Unfocused Mode */
    opacity: 0.15;
    transform: scale(0.9) translateY(40px);
    filter: blur(8px) grayscale(100%);
    transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* --- FOCUSED STATE (Triggered by IntersectionObserver in JS) --- */
.story-spotlight-item.focused .spotlight-inner {
    opacity: 1;
    transform: scale(1) translateY(0);
    filter: blur(0px) grayscale(0%);
    z-index: 10;
}

/* --- PHOTO WRAPPER --- */
.spotlight-photo-wrap {
    position: relative;
    width: 100%;
    height: 400px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-xl, 0 20px 50px rgba(0,0,0,0.5));
    /* Sedikit garis tipis memisahkan gambar dari gelap */
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
}

.spotlight-photo-wrap.empty {
    display: none;
}

.spotlight-img {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 1.5s ease;
}

/* Efek zoom menjiwai pelan saat menyala */
.story-spotlight-item.focused .spotlight-img {
    transform: scale(1.05);
}

/* --- CONTENT OVERLAY / TEXT --- */
.spotlight-content {
    position: relative;
    margin-top: -60px; /* Tumpuk sedikit di luar foto memecah batas */
    width: 90%;
    
    /* THE REAL GLASSMORPHISM */
    background: rgba(255, 255, 255, 0.75); /* Kaca putih susu agar teks gelap bisa hidup bersinar */
    backdrop-filter: blur(20px) saturate(120%);
    -webkit-backdrop-filter: blur(20px) saturate(120%);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
    
    padding: 2rem;
    border-radius: 70px 10px 70px 10px;
    text-align: center;
    
    /* Text initial state: Hide completely */
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
    transition-delay: 0.2s; /* Muncul sedikit lebih lama setelah kotak foto merespon */
}

/* Efek kemunculan mulus untuk teks */
.story-spotlight-item.focused .spotlight-content {
    opacity: 1;
    transform: translateY(0);
}

/* TYPOGRAPHY IN SPOTLIGHT */
.spotlight-date {
    display: inline-block;
    padding: 6px 14px;
    background: var(--heading-text-color, #1a1a1a);
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    border-radius: 30px;
    margin-bottom: 1rem;
    border: 1px solid var(--accent-color, rgba(212, 175, 55, 0.3));
}

.spotlight-title {
    font-family: var(--sacramento);
    font-size: 2.2rem;
    color: var(--heading-text-color) !important;
    margin: 0 0 0.8rem 0;
    line-height: 1.1;
}

.spotlight-desc {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--heading-text-color) !important; /* Override selector p global */
    opacity: 0.8;
    margin: 0;
    /* Limit baris jika teks cerita terlalu panjang */
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Sembunyikan SVG lama jika masih ada */
.story-svg-container, #winding-path, .story-connector {
    display: none !important;
}

/* RESPONSIVE */
@media screen and (max-width: 768px) {
    .spotlight-list {
        gap: 60px;
    }
    .spotlight-photo-wrap {
        height: 320px;
    }
    .spotlight-content {
        margin-top: -50px; /* Lebihin offset ke bawah agar terbaca jelas pas di HP */
        padding: 1.5rem;
    }
    .spotlight-title {
        font-size: 1.8rem;
    }
    .spotlight-desc {
        font-size: 0.85rem;
    }
}
