/* ============================================================
   THEME OVERRIDE — nadeekaguruge.com
   Phase 1: Color palette, typography, hero, nav, animations
   developed by Hasitha Dayarathna.
   ============================================================ */

/* ── 1. WARM EARTH-TONE PALETTE ───────────────────────────── */
:root {
    --color-primary: #1C1917;
    --color-secondary: #78716C;
    --color-accent: #A47148;
    --color-accent-light: #C2956B;
    --color-bg: #F5F0EB;
    --color-white: #FFFDF9;
    --color-border: #E7DDD2;
    --color-highlight: #2D2520;

    /* Font stacks */
    --font-heading: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    --font-body: 'Montserrat', system-ui, sans-serif;
}

/* ── 2. BODY & BACKGROUND ─────────────────────────────────── */
body {
    background-color: var(--color-bg) !important;
    color: var(--color-primary);
}

.book-container {
    background-color: var(--color-white) !important;
}

.main-wrapper {
    background-color: var(--color-white) !important;
}

.left-sidebar {
    background-color: #F0EBE5 !important;
}

/* ── 3. SERIF HEADINGS ────────────────────────────────────── */
.logo,
.section-title,
.gallery-title,
.card-title,
.music-title,
.book-title,
.event-title,
.event-hero h1,
.event-section h2,
.cta-section h2,
.slide h2,
.bio-section h2,
h1.logo,
.page-title {
    font-family: var(--font-heading) !important;
}

/* Logo refinement */
.logo {
    color: var(--color-primary) !important;
    font-weight: 600 !important;
    letter-spacing: -1px !important;
}

/* Section titles */
.section-title,
.gallery-title {
    font-style: italic;
    font-weight: 400;
    color: var(--color-primary);
}

/* Card titles */
.card-title,
.music-title {
    font-weight: 500 !important;
    letter-spacing: -0.3px;
}

/* ── 4. ACCENT COLOR REFINEMENTS ──────────────────────────── */
.card-category,
.music-category,
.book-category,
.event-category {
    color: var(--color-accent) !important;
}

.newsletter-btn,
.event-btn {
    background-color: var(--color-accent) !important;
}

.newsletter-btn:hover {
    background-color: var(--color-accent-light) !important;
}

.card-link,
.music-link,
.book-link {
    color: var(--color-primary);
    transition: color 0.3s ease, border-bottom-color 0.3s ease;
}

.card-link:hover,
.music-link:hover,
.book-link:hover {
    color: var(--color-accent) !important;
    border-bottom-color: var(--color-accent) !important;
}

/* View gallery / view events button */
.view-gallery-link {
    border-color: var(--color-primary) !important;
    color: var(--color-primary) !important;
    transition: all 0.3s ease !important;
}

.view-gallery-link:hover {
    background: var(--color-primary) !important;
    color: var(--color-white) !important;
}

/* ── 5. HERO BANNER IMPROVEMENTS ──────────────────────────── */
/* Darker gradient overlay instead of white wash */
.slide::before {
    background: linear-gradient(to bottom,
            rgba(28, 25, 23, 0.10) 0%,
            rgba(28, 25, 23, 0.35) 50%,
            rgba(28, 25, 23, 0.75) 100%) !important;
}

/* Reduce grain noise opacity */
.slide::after {
    opacity: 0.06 !important;
}

/* Hero text */
.slide h2 {
    color: var(--color-white) !important;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5) !important;
    font-family: var(--font-heading) !important;
    font-weight: 400 !important;
    font-style: italic !important;
}

.slide p {
    color: rgba(255, 255, 255, 0.9) !important;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4) !important;
}

/* ── 6. NAVIGATION ENHANCEMENTS ───────────────────────────── */
/* Active page indicator */
.social-header a[aria-current="page"],
.social-header a.active {
    color: var(--color-primary) !important;
    border-bottom: 2px solid var(--color-accent);
    padding-bottom: 4px;
}

/* Smooth hover transitions */
.social-header a {
    transition: color 0.25s ease, border-bottom-color 0.25s ease !important;
    border-bottom: 2px solid transparent;
    padding-bottom: 4px;
}

.social-header a:hover {
    color: var(--color-primary) !important;
    border-bottom-color: var(--color-accent) !important;
}

/* ── 7. DIVIDER REFINEMENT ────────────────────────────────── */
.divider {
    background: linear-gradient(to right,
            transparent 0%,
            var(--color-border) 20%,
            var(--color-border) 80%,
            transparent 100%) !important;
}

/* ── 8. FOOTER UPGRADE ────────────────────────────────────── */
footer {
    background-color: var(--color-highlight) !important;
    border-top: 3px solid var(--color-accent);
}

.footer-section h3 {
    color: var(--color-white) !important;
    font-family: var(--font-heading) !important;
    font-size: 16px !important;
}

/* ── 9. SCROLL REVEAL ANIMATIONS ──────────────────────────── */
.content-section,
.music-section,
.book-section,
.event-section,
#gallery .gallery-header,
.gallery-category,
.bio-section {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.content-section.visible,
.music-section.visible,
.book-section.visible,
.event-section.visible,
#gallery .gallery-header.visible,
.gallery-category.visible,
.bio-section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Gallery and Grid items staggered entrance */
figure.masonry-item,
.music-item,
.book-item,
.content-card,
.event-card {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

figure.masonry-item.visible,
.music-item.visible,
.book-item.visible,
.content-card.visible,
.event-card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── 10. CONTENT CARD HOVER POLISH ────────────────────────── */
.content-card {
    transition: background-color 0.3s ease, transform 0.2s ease !important;
}

.content-card:hover {
    background-color: rgba(164, 113, 72, 0.03) !important;
}

.music-item:hover {
    background-color: rgba(164, 113, 72, 0.03) !important;
}

.book-item {
    transition: background-color 0.3s ease;
}

.book-item:hover {
    background-color: rgba(164, 113, 72, 0.03);
}

/* ── 11. GALLERY IMAGE IMPROVEMENTS ───────────────────────── */
/* Remove the white wash overlay on gallery images */
figure.masonry-item a::before {
    display: none !important;
}

/* Improved hover effect */
figure.masonry-item img {
    transition: transform 0.4s ease, box-shadow 0.4s ease !important;
}

figure.masonry-item:hover img {
    transform: translateY(-6px) !important;
    box-shadow: 0 16px 40px rgba(28, 25, 23, 0.2) !important;
}

/* ── 12. SLIDER NAVIGATION DOTS ACCENT ───────────────────── */
.slider-dot.active {
    background-color: var(--color-accent) !important;
}

/* ── 13. NEWSLETTER & FORM INPUTS ────────────────────────── */
.newsletter-input {
    border-color: rgba(255, 255, 255, 0.15) !important;
    background-color: rgba(255, 255, 255, 0.08) !important;
}

.newsletter-input:focus {
    border-color: var(--color-accent) !important;
    outline: none;
}

/* ── 14. CONTACT PAGE CARDS ──────────────────────────────── */
.contact-item {
    border: 1px solid var(--color-border) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

.contact-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(28, 25, 23, 0.08) !important;
}

.contact-item i {
    color: var(--color-accent) !important;
}

/* ── 15. EVENT HERO & CTA ────────────────────────────────── */
.event-hero {
    background: var(--color-highlight) !important;
}

.cta-section {
    background: var(--color-highlight) !important;
}

.coming-soon-event {
    background: linear-gradient(135deg, var(--color-accent) 0%, #7D5A3C 100%) !important;
}

/* ── 16. BIOGRAPHY PAGE ──────────────────────────────────── */
.bio-section p {
    font-size: 16px;
    line-height: 1.85;
    color: var(--color-secondary);
}

/* ── 17. INFO CARD ACCENT ────────────────────────────────── */
.info-card i {
    color: var(--color-accent) !important;
}

.film-item {
    border-left-color: var(--color-accent) !important;
}

/* ── 18. SELECTION COLOR ─────────────────────────────────── */
::selection {
    background-color: rgba(164, 113, 72, 0.2);
    color: var(--color-primary);
}

/* ── 19. SMOOTH SCROLL ───────────────────────────────────── */
html {
    scroll-behavior: smooth;
}

/* ── 20. EVENT CARD HOVER ────────────────────────────────── */
.event-card:hover {
    /*box-shadow: 0 12px 30px rgba(28, 25, 23, 0.1) !important;*/
}

/* ============================================================
   MUSIC PAGE ENHANCEMENTS
   ============================================================ */

/* ── M1. STICKY SECTION NAV ──────────────────────────────── */
.section-nav {
    display: flex;
    justify-content: center;
    gap: 28px;
    padding: 14px 60px;
    background: var(--color-white);
    /* border-bottom: 1px solid var(--color-border);*/
    position: sticky;
    top: 0;
    z-index: 100;
    flex-wrap: wrap;
}

.section-nav-link {
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--color-secondary);
    padding: 8px 4px;
    border-bottom: 2px solid transparent;
    transition: color 0.25s ease, border-bottom-color 0.25s ease;
    white-space: nowrap;
}

.section-nav-link:hover,
.section-nav-link.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-accent);
}

/* ── M2. FEATURED CARD (Cannes winner, full-width) ───────── */
.music-item.featured {
    grid-column: 1 / -1;
    /* background: linear-gradient(to right, rgba(164, 113, 72, 0.08) 0%, rgba(164, 113, 72, 0.01) 100%);*/
    /*border-left: 4px solid var(--color-accent);*/
    padding: 40px 80px !important;
    border-right: none !important;
    margin-bottom: 20px;
}

.music-item.featured .music-card {
    gap: 60px;
    align-items: center;
}

.music-item.featured .poster img {
    width: 200px;
    height: 300px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15) !important;
}

.music-item.featured .music-title {
    font-size: 38px !important;
    font-weight: 500 !important;
    margin-bottom: 16px !important;
}

.music-item.featured .music-category {
    font-size: 13px !important;
    letter-spacing: 2.5px !important;
    margin-bottom: 12px !important;
}

.featured-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--color-accent);
    color: #fff;
    font-family: var(--font-body);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 6px 16px;
    border-radius: 20px;
    margin-bottom: 20px;
}

/* ── M3. AWARD BADGES ────────────────────────────────────── */
.awards-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
    margin-top: 4px;
}

.award-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(164, 113, 72, 0.08);
    color: #8B6914;
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.3px;
    padding: 4px 10px;
    border-radius: 16px;
    line-height: 1.4;
}

.award-badge::before {
    content: '🏆';
    font-size: 11px;
    flex-shrink: 0;
}

.award-badge.special::before {
    content: '⭐';
}

.award-badge.cannes::before {
    content: '🎬';
}

/* ── M4. POSTER HOVER ────────────────────────────────────── */
.poster img {
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    border-radius: 6px !important;
}

.poster img:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 32px rgba(28, 25, 23, 0.18);
}

/* ── M5. YEAR BADGE (for albums/theatre) ─────────────────── */
.music-year {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 500;
    color: var(--color-accent);
    border: 1px solid rgba(164, 113, 72, 0.25);
    padding: 2px 10px;
    border-radius: 4px;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}

/* ── M6. HIDE EMPTY ELEMENTS ─────────────────────────────── */
.music-meta:empty,
.music-description:empty,
.book-meta:empty,
.book-description:empty {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ── M7. SECTION DIVIDER BETWEEN MUSIC SECTIONS ──────────── */
.music-section+.music-section::before,
.book-section+.book-section::before {
    content: '';
    display: block;
    height: 1px;
    background: linear-gradient(to right,
            transparent 0%,
            var(--color-border) 20%,
            var(--color-border) 80%,
            transparent 100%);
    margin-bottom: 60px;
}



/* ── M9. ALBUM PLACEHOLDER STYLING ───────────────────────── */
.poster img[src*="placeholder"] {
    opacity: 0.6;
    background: linear-gradient(135deg, #F5F0EB, #E7DDD2);
}

@media (max-width: 768px) {
    .section-nav {
        gap: 12px 16px;
        padding: 12px 20px;
    }

    .section-nav-link {
        font-size: 10px;
        letter-spacing: 1px;
    }

    .music-item.featured {
        padding: 24px !important;
    }

    .music-item.featured .poster img {
        width: 120px;
        height: 180px;
    }

    .music-item.featured .music-title {
        font-size: 24px !important;
    }


}

@media (max-width: 480px) {
    .section-nav {
        gap: 8px 12px;
        padding: 10px 16px;
    }

    .section-nav-link {
        font-size: 9px;
    }

    .music-item.featured .music-card {
        flex-direction: column;
    }

    .music-item.featured .poster {
        align-self: center;
    }
}

/* ── M10. ALBUM GRID (1:1 Aspect Ratio Covers) ───────────── */
.music-grid.album-grid .poster {
    flex: 0 0 150px;
}

.music-grid.album-grid .poster img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 4px !important;
}

/* ── M11. BOOK GRID POLISH (Research Page) ───────────── */
.book-section {
    margin-bottom: 100px;
}

.book-item {
    transition: background-color 0.35s ease, border-radius 0.35s ease;
}

.book-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    position: relative;
}

.book-item:nth-child(odd) {
    /* border-right: 1px solid rgba(0, 0, 0, 0.08);*/
    padding-right: 60px;
}

.book-item:nth-child(even) {
    padding-left: 60px;
}

.book-item:hover {
    background-color: rgba(164, 113, 72, 0.03) !important;
    border-radius: 6px;
}

.cover img {
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    border-radius: 4px !important;
}

.cover img:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 32px rgba(28, 25, 23, 0.18) !important;
}

/* Typography refinements */
.music-description,
.book-description {
    font-weight: 400 !important;
    font-size: 14.5px !important;
    opacity: 0.9;
}

.music-title,
.book-title {
    margin-bottom: 12px !important;
}

/* ============================================================
   MOBILE RESPONSIVE OVERRIDES
   ============================================================ */

/* ── 21. HAMBURGER MENU (CSS-only via hidden checkbox) ───── */
.mobile-menu-toggle {
    display: none;
    /* hidden on desktop */
    cursor: pointer;
    background: none;
    border: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    z-index: 1100;
}

.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--color-primary);
    transition: transform 0.3s ease, opacity 0.3s ease;
    border-radius: 2px;
}

/* ── 22. TABLET NAV (968px–1199px) ───────────────────────── */
@media (max-width: 1199px) {
    .social-header {
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 16px 24px !important;
        max-width: 100% !important;
    }

    .social-header a {
        font-size: 10px !important;
        letter-spacing: 1px !important;
    }
}

/* ── 23. MOBILE BREAKPOINT (≤ 768px) ─────────────────────── */
@media (max-width: 768px) {

    /* Show hamburger */
    .mobile-menu-toggle {
        display: flex !important;
    }

    /* Collapse nav into vertical dropdown */
    .social-header {
        display: none !important;
        flex-direction: column !important;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--color-white);
        box-shadow: 0 12px 40px rgba(28, 25, 23, 0.12);
        padding: 20px 30px !important;
        gap: 0 !important;
        z-index: 1050;
        border-top: 1px solid var(--color-border);
    }

    .social-header.open {
        display: flex !important;
    }

    .social-header a {
        font-size: 13px !important;
        padding: 12px 0 !important;
        border-bottom: 1px solid var(--color-border) !important;
        width: 100%;
        text-align: left;
    }

    .social-header a:last-child {
        border-bottom: none !important;
    }

    .social-header a:hover,
    .social-header a.active {
        border-bottom-color: var(--color-border) !important;
        color: var(--color-accent) !important;
    }

    /* Header adjustments */
    .header-top {
        position: relative;
        justify-content: flex-end !important;
    }

    header {
        position: relative;
    }

    /* Logo sizing */
    .logo {
        font-size: 42px !important;
    }

    .tag-line {
        font-size: 13px !important;
    }

    /* Hero */
    .slide {
        min-height: 400px !important;
    }

    .slide-content {
        top: auto !important;
        bottom: 30px !important;
        left: 0 !important;
        right: 0 !important;
        padding: 0 24px !important;
        position: absolute !important;
    }

    .slide h2 {
        font-size: 28px !important;
        line-height: 1.25 !important;
        margin-bottom: 16px !important;
    }

    .slide p {
        font-size: 14px !important;
        margin-bottom: 20px !important;
    }

    /* Main content */
    main {
        padding: 30px 20px 50px !important;
    }

    .content-area {
        padding: 24px 20px 50px !important;
    }

    /* Section titles */
    .section-title,
    .gallery-title {
        font-size: 28px !important;
    }

    .section-subtitle,
    .gallery-subtitle {
        font-size: 13px !important;
    }

    /* Cards */
    .card-title,
    .music-title {
        font-size: 22px !important;
    }

    .content-card {
        padding: 30px 20px !important;
    }

    /* Footer */
    footer {
        padding: 40px 20px 24px !important;
    }

    .footer-grid {
        gap: 30px !important;
    }

    .newsletter-form {
        flex-direction: column !important;
    }

    .newsletter-btn {
        width: 100%;
    }

    /* Event hero */
    .event-hero {
        padding: 50px 20px !important;
    }

    .event-hero h1 {
        font-size: 30px !important;
    }

    /* CTA section */
    .cta-section {
        padding: 40px 20px !important;
        margin: 30px 0 !important;
        border-radius: 6px !important;
    }

    .cta-section h2 {
        font-size: 24px !important;
    }

    /* Gallery */
    .masonry-gallery {
        column-count: 2 !important;
        column-gap: 12px !important;
        padding: 12px 20px !important;
    }

    figure.masonry-item {
        margin-bottom: 12px !important;
    }

    /* Bio section */
    .bio-section p {
        font-size: 15px !important;
        line-height: 1.75 !important;
    }

    /* Book grid */
    .book-grid {
        grid-template-columns: 1fr !important;
    }

    .book-item {
        padding: 24px 20px !important;
    }

    /* Music grid */
    .music-grid {
        grid-template-columns: 1fr !important;
    }

    .music-item {
        padding: 24px 20px !important;
    }

    .music-item:nth-child(odd),
    .book-item:nth-child(odd) {
        border-right: none !important;
        padding-right: 20px !important;
    }

    .music-item:nth-child(even),
    .book-item:nth-child(even) {
        padding-left: 20px !important;
    }
}

/* ── 24. SMALL PHONE (≤ 480px) ───────────────────────────── */
@media (max-width: 480px) {
    .book-container {
        margin: 0 !important;
        box-shadow: none !important;
    }

    .logo {
        font-size: 34px !important;
    }

    header {
        padding: 20px 16px 16px !important;
    }

    .divider {
        margin: 0 16px 20px !important;
    }

    main,
    .content-area {
        padding: 20px 16px 40px !important;
    }

    .slide {
        min-height: 350px !important;
    }

    .slide h2 {
        font-size: 24px !important;
    }

    /* Single-column gallery */
    .masonry-gallery {
        column-count: 1 !important;
        padding: 8px 16px !important;
    }

    /* Section headers */
    .section-header {
        margin-bottom: 30px !important;
    }

    .section-title,
    .gallery-title {
        font-size: 24px !important;
    }

    /* Events controls */
    .events-controls {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .events-controls input[type="search"],
    .events-controls select {
        min-width: 100% !important;
    }

    /* Content grid */
    .content-grid {
        grid-template-columns: 1fr !important;
    }

    .content-card:nth-child(odd) {
        border-right: none !important;
        padding-right: 20px !important;
    }

    .content-card:nth-child(even) {
        padding-left: 20px !important;
    }

    /* Music cards stack vertically */
    .music-card {
        flex-direction: column !important;
    }

    .poster {
        align-self: center !important;
    }

    /* Book cards stack */
    .book-card {
        flex-direction: column !important;
    }

    .cover {
        width: 100% !important;
        justify-content: center !important;
    }

    /* Footer */
    footer {
        padding: 30px 16px 20px !important;
    }

    .footer-bottom {
        flex-direction: column !important;
        text-align: center !important;
        gap: 12px !important;
    }

    .social-links {
        justify-content: center !important;
    }

    /* Event info grid */
    .event-info-grid {
        grid-template-columns: 1fr !important;
    }

    /* Events grid */
    .events-grid,
    #upcoming-events {
        grid-template-columns: 1fr !important;
    }

    /* Contact items full width */
    .contact-item {
        padding: 16px !important;
    }
}

/* ── 25. TOUCH-FRIENDLY TARGETS ──────────────────────────── */
@media (pointer: coarse) {

    .social-header a,
    .card-link,
    .music-link,
    .book-link,
    .view-gallery-link,
    .event-link,
    .footer-links a,
    .slide-btn,
    .event-btn,
    .cta-btn {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }
}

/* ── 26. LANDSCAPE PHONE ─────────────────────────────────── */
@media (max-height: 500px) and (orientation: landscape) {
    .slide {
        min-height: 300px !important;
    }

    .event-hero {
        padding: 30px 20px !important;
    }
}

/* ============================================================
   TV TIMELINE — Television Dramas Section
   ============================================================ */

/* ── T1. TIMELINE CONTAINER ─────────────────────────────────── */
.tv-timeline {
    position: relative;
    width: 100%;
    margin: 0 auto;
    padding: 20px 0 40px;
}

/* Vertical centre line */
.tv-timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom,
            transparent 0%,
            var(--color-border) 4%,
            var(--color-accent) 15%,
            var(--color-accent) 85%,
            var(--color-border) 96%,
            transparent 100%);
    transform: translateX(-50%);
}

/* ── T2. YEAR MARKERS (Integrated) ─────────────────────────────── */
.tv-item-year {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 600;
    font-style: italic;
    letter-spacing: 1px;
    color: var(--color-accent);
    margin: 0 0 16px 0;
    /* Alignment is inherited from the timeline item (.left vs .right) */
}

/* ── T3. TIMELINE ITEMS ──────────────────────────────────────── */
.tv-timeline::after {
    content: '';
    display: table;
    clear: both;
}

.tv-timeline-item {
    position: relative;
    width: 50%;
    /* side padding */
    padding: 0 50px 30px;
    box-sizing: border-box;
    /* Float left instead of relative shifting to clear vertical gaps */
    float: left;
    clear: left;
    text-align: right;
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Right side items */
.tv-timeline-item.right {
    float: right;
    clear: right;
    text-align: left;
    transform: translateX(30px);
}

.tv-timeline-item.visible {
    opacity: 1;
    transform: translateX(0);
}

/* ── T4. TIMELINE DOTS ───────────────────────────────────────── */
.tv-timeline-dot {
    position: absolute;
    top: 10px;
    width: 14px;
    height: 14px;
    background: var(--color-white);
    border: 3px solid var(--color-accent);
    border-radius: 50%;
    z-index: 2;
    box-shadow: 0 0 0 4px rgba(164, 113, 72, 0.12);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Dot on right for left-aligned items */
.tv-timeline-item .tv-timeline-dot {
    right: -7px;
}

/* Dot on left for right-aligned items */
.tv-timeline-item.right .tv-timeline-dot {
    left: -7px;
    right: auto;
}

.tv-timeline-item:hover .tv-timeline-dot {
    transform: scale(1.3);
    box-shadow: 0 0 0 6px rgba(164, 113, 72, 0.2);
    background: var(--color-accent);
}

/* ── T5. TIMELINE CONTENT CARD ───────────────────────────────── */
.tv-timeline-content {
    position: relative;
}

.tv-timeline-card {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    text-align: left;
}

.tv-timeline-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(28, 25, 23, 0.08);
    border-color: var(--color-accent-light);
}

/* Poster inside timeline cards */
.tv-timeline-card .poster {
    flex: 0 0 80px;
}

.tv-timeline-card .poster img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

/* Title styling inside timeline */
.tv-timeline-card .music-title {
    font-size: 20px !important;
    margin-bottom: 8px !important;
}

.tv-timeline-card .music-category {
    margin-bottom: 8px;
}

.tv-timeline-card .music-description {
    font-size: 13px !important;
    line-height: 1.6;
    margin-bottom: 4px;
}

/* ── T6. CONNECTOR ARROWS ────────────────────────────────────── */
/* Right-pointing arrow for left-side cards */
.tv-timeline-item .tv-timeline-content::after {
    content: '';
    position: absolute;
    top: 14px;
    right: -18px;
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: 8px solid var(--color-border);
}

/* Left-pointing arrow for right-side cards */
.tv-timeline-item.right .tv-timeline-content::after {
    left: -18px;
    right: auto;
    border-left: none;
    border-right: 8px solid var(--color-border);
}

/* ── T7. YEAR MARKER ANIMATION ───────────────────────────────── */
/* ── T8. RESPONSIVE — TABLET (≤ 768px) ──────────────────────── */
@media (max-width: 768px) {
    .tv-timeline::before {
        left: 20px;
    }

    .tv-timeline-item,
    .tv-timeline-item.right {
        width: 100%;
        float: none;
        clear: both;
        text-align: left;
        padding-left: 50px;
        padding-right: 20px;
        transform: translateX(-20px);
    }

    .tv-timeline-item.visible,
    .tv-timeline-item.right.visible {
        transform: translateX(0);
    }

    .tv-timeline-item .tv-timeline-dot,
    .tv-timeline-item.right .tv-timeline-dot {
        left: 13px;
        right: auto;
    }

    /* Arrows always point left on mobile */
    .tv-timeline-item .tv-timeline-content::after,
    .tv-timeline-item.right .tv-timeline-content::after {
        left: -8px;
        right: auto;
        border-left: none;
        border-right: 8px solid var(--color-border);
    }
}

/* ── T9. RESPONSIVE — SMALL PHONE (≤ 480px) ─────────────────── */
@media (max-width: 480px) {
    .tv-timeline {
        padding: 10px 0 30px;
    }

    .tv-timeline::before {
        left: 14px;
    }

    .tv-timeline-item,
    .tv-timeline-item.right {
        padding-left: 40px;
        padding-right: 8px;
    }

    .tv-timeline-item .tv-timeline-dot,
    .tv-timeline-item.right .tv-timeline-dot {
        left: 7px;
        width: 12px;
        height: 12px;
    }

    .tv-timeline-card {
        padding: 14px;
        gap: 12px;
        flex-direction: column;
    }

    .tv-timeline-card .poster {
        align-self: center;
    }

    .tv-timeline-card .music-title {
        font-size: 18px !important;
    }
}

/* ============================================================
   DARK MODE — applied only when <html data-theme="dark">
   Appended section; no light-mode rules above are modified.
   ============================================================ */

/* Sidebar surface */
html[data-theme="dark"] .left-sidebar { background-color: #1D1F24 !important; }

/* Stronger book shadow so the page reads against the dark surround */
html[data-theme="dark"] .book-container {
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.5), 0 28px 68px rgba(0, 0, 0, 0.6);
}

/* Vertical line between sidebar and content */
html[data-theme="dark"] .main-wrapper::before {
    background: linear-gradient(to bottom, transparent 0%, rgba(255, 255, 255, 0.07) 10%, rgba(255, 255, 255, 0.07) 90%, transparent 100%);
}

/* Hero headline stays light over imagery (theme.css sets it to var(--color-white)) */
html[data-theme="dark"] .slide h2 { color: #EFF1F4 !important; }

/* Footer stays dark in both themes — keep its text light */
html[data-theme="dark"] footer { color: #E9EAEE; }
html[data-theme="dark"] .footer-inner a { color: rgba(233, 234, 238, 0.75); }
html[data-theme="dark"] .footer-inner a:hover { color: var(--color-accent-light); }

/* Accent-filled buttons/labels need dark text in dark mode */
html[data-theme="dark"] .newsletter-btn,
html[data-theme="dark"] .event-btn { color: #14161A !important; }
html[data-theme="dark"] .featured-label { color: #14161A; }

/* Award badges: brighten for dark backgrounds */
html[data-theme="dark"] .award-badge { background: rgba(143, 163, 199, 0.14); color: #A9BAD6; }

/* Album placeholder gradient */
html[data-theme="dark"] .poster img[src*="placeholder"] {
    background: linear-gradient(135deg, #22242A, #17181C);
    opacity: 0.45;
}

/* Card hover washes: dark equivalents of the light accent tint */
html[data-theme="dark"] .content-card:hover,
html[data-theme="dark"] .music-item:hover,
html[data-theme="dark"] .book-item:hover { background-color: rgba(143, 163, 199, 0.08) !important; }

/* Selection */
html[data-theme="dark"] ::selection { background-color: rgba(143, 163, 199, 0.35); color: #F0F1F4; }