/* --- Base Variables --- */
:root {
    --bg: #0a0a0a;
    --bg-light: #1a1a1a;
    --text: #e0e0e0;
    --text-muted: #888;
    --accent: #d4a373;
    --accent-dark: #b8865d;
    --dark: #0d0d0d;
    --white: #fff;
    --card-bg: #141414;
    --shadow: rgba(0, 0, 0, 0.5);
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent; /* Remove tap highlight on mobile */
}

body {
    font-family: 'Lato', 'Arial', sans-serif; /* Fallback font to prevent layout shift */
    background: linear-gradient(135deg, var(--bg) 0%, #1a1520 100%);
    color: var(--text);
    scroll-behavior: smooth;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Performance: Reduce repaints */
    will-change: scroll-position;
    /* Performance: Prevent layout shift from fonts */
    font-size-adjust: 0.5;
}

/* Performance: Optimize images */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* --- Navigation --- */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 5%;
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    position: sticky; 
    top: 0; 
    z-index: 100;
    border-bottom: 1px solid rgba(212, 163, 115, 0.2);
}

.logo { 
    font-family: 'Cinzel', 'Georgia', serif; /* Fallback font */
    font-size: 1.8rem; 
    font-weight: 700; 
    background: linear-gradient(135deg, var(--accent) 0%, #f4d4a8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 2px;
    /* Performance: Prevent layout shift */
    min-height: 2rem;
    display: inline-block;
}

nav ul { 
    list-style: none; 
    display: flex; 
    gap: 35px; 
}

nav a { 
    text-decoration: none; 
    color: var(--text-muted); 
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
}

nav a:hover { 
    color: var(--accent); 
}

nav a:hover::after {
    width: 100%;
}

/* --- Hero --- */
.hero {
    height: 65vh;
    min-height: 400px;
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.7));
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
    contain: layout style paint;
}
.hero img.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}
.hero::before { z-index: 1; }
.hero-content { z-index: 2; }

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, transparent 0%, rgba(10, 10, 10, 0.8) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    animation: fadeInUp 1s ease;
}

.hero h1 { 
    font-family: 'Cinzel', 'Georgia', serif; /* Fallback font */
    font-size: 4.5rem; 
    margin-bottom: 20px;
    letter-spacing: 3px;
    background: linear-gradient(135deg, #fff 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    /* Performance: Prevent layout shift */
    min-height: 5rem;
    line-height: 1.2;
}

.hero p {
    font-size: 1.3rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.9);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Layout --- */
.container { 
    max-width: 1400px; 
    margin: 0 auto; 
    padding: 60px 30px; 
}

section { 
    margin-bottom: 100px; 
    padding-top: 40px;
}

.section-header { 
    text-align: center; 
    margin-bottom: 60px; 
    font-family: 'Cinzel', serif; 
    font-size: 2.8rem; 
    color: var(--white);
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-header::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    border-radius: 2px;
}

.grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 40px;
    
/* --- Cards (Enhanced) --- */
.card {
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 30px var(--shadow);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(212, 163, 115, 0.1);
    position: relative;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(212, 163, 115, 0.1) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 1;
}

.card:hover { 
    transform: translateY(-12px) scale(1.02); 
    box-shadow: 0 20px 50px rgba(212, 163, 115, 0.3);
    border-color: rgba(212, 163, 115, 0.4);
}

.card:hover::before {
    opacity: 1;
}

.card-image { 
    height: 260px; 
    background-size: cover; 
    background-position: center; 
    position: relative;
    overflow: hidden;
    /* Performance: Reduce layout shifts */
    aspect-ratio: 16 / 9;
}

.card-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.7) 100%);
}

.card-info { 
    padding: 30px;
    position: relative;
    z-index: 2;
}

.card-info h3 { 
    font-family: 'Cinzel', serif; 
    margin-bottom: 12px;
    font-size: 1.4rem;
    color: var(--white);
}

.excerpt {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 15px;
}

/* Story Tags */
.story-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.tag {
    font-size: 0.75rem;
    padding: 4px 10px;
    background: rgba(212, 163, 115, 0.15);
    color: var(--accent);
    border-radius: 12px;
    border: 1px solid rgba(212, 163, 115, 0.3);
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.tag:hover {
    background: rgba(212, 163, 115, 0.25);
    border-color: var(--accent);
    transform: translateY(-2px);
}

/* --- Individual Story Page --- */
.story-detail {
    max-width: 1000px;
    margin: 40px auto;
}

.story-header {
    text-align: center;
    margin-bottom: 50px;
}

.story-header h1 {
    font-family: 'Cinzel', serif;
    font-size: 3rem;
    color: var(--white);
    margin-bottom: 20px;
    background: linear-gradient(135deg, #fff 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.story-meta {
    font-size: 1.2rem;
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 25px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.story-tags-detail {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 30px;
}

.story-tags-detail .tag {
    font-size: 0.85rem;
    padding: 6px 14px;
}

.btn-play-story {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(212, 163, 115, 0.3);
}

.btn-play-story:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(212, 163, 115, 0.5);
}

.story-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 60px;
}

.preview-image {
    height: 250px;
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.preview-image:hover {
    transform: scale(1.05);
}

.related-stories {
    text-align: center;
    padding: 40px 0;
}

.btn-back {
    display: inline-block;
    padding: 12px 30px;
    background: rgba(212, 163, 115, 0.2);
    color: var(--accent);
    text-decoration: none;
    border-radius: 25px;
    border: 2px solid var(--accent);
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.btn-back:hover {
    background: var(--accent);
    color: white;
    transform: translateY(-2px);
}

@media(max-width: 768px) {
    .story-header h1 {
        font-size: 2rem;
    }
    
    .story-meta {
        font-size: 1rem;
    }
    
    .story-preview-grid {
        grid-template-columns: 1fr;
    }
}

/* Story Specific */
.story-card { 
    cursor: pointer; 
}

.card-overlay {
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    display: flex; 
    align-items: center; 
    justify-content: center;
    opacity: 0; 
    transition: opacity 0.4s ease;
    z-index: 2;
}

.story-card:hover .card-overlay { 
    opacity: 1; 
}

.card-overlay span { 
    color: white; 
    border: 2px solid var(--accent); 
    padding: 12px 28px; 
    border-radius: 30px; 
    font-weight: bold; 
    background: rgba(212, 163, 115, 0.2);
    backdrop-filter: blur(10px);
    font-size: 1.05rem;
    transition: all 0.3s ease;
}

.card-overlay span:hover {
    background: var(--accent);
    transform: scale(1.05);
}

/* --- Story Player Overlay (Enhanced) --- */
.overlay {
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    background: rgba(0, 0, 0, 0.97);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex; 
    align-items: center; 
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.overlay.hidden { 
    display: none; 
}

.close-btn {
    position: absolute; 
    top: 30px; 
    right: 40px;
    background: rgba(212, 163, 115, 0.2); 
    border: 2px solid var(--accent);
    color: white; 
    font-size: 2.5rem; 
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer; 
    z-index: 1001;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.close-btn:hover {
    background: var(--accent);
    transform: rotate(90deg);
}

.player-content {
    width: 95%; 
    height: 90%;
    display: grid; 
    grid-template-columns: 1.4fr 1fr; 
    gap: 30px;
    padding: 20px;
}

/* --- Visual Stage (Enhanced) --- */
.visual-stage { 
    background: #000; 
    position: relative; 
    border-radius: 12px; 
    overflow: hidden;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.8);
}

#stage-image { 
    width: 100%; 
    height: 100%; 
    object-fit: contain; 
    transition: opacity 0.5s ease;
}

/* --- Navigation Arrows (Enhanced) --- */
.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(212, 163, 115, 0.3);
    backdrop-filter: blur(10px);
    color: white;
    border: 2px solid rgba(212, 163, 115, 0.5);
    font-size: 2.5rem;
    width: 60px;
    height: 60px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
}

.nav-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    transform: translateY(-50%) scale(1.1);
}

.nav-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.prev { left: 20px; }
.next { right: 20px; }

/* --- Image Counter (New) --- */
.image-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid rgba(212, 163, 115, 0.3);
    z-index: 5;
    display: none;
}

/* --- Audio Controls (Enhanced) --- */
.stage-controls {
    position: absolute; 
    bottom: 30px; 
    left: 30px; 
    right: 30px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    padding: 20px 25px;
    border-radius: 40px;
    display: flex; 
    gap: 20px; 
    align-items: center;
    border: 1px solid rgba(212, 163, 115, 0.3);
}

.stage-controls button {
    padding: 12px 24px; 
    border-radius: 25px; 
    border: none; 
    font-weight: bold; 
    cursor: pointer;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: white;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.stage-controls button:hover { 
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(212, 163, 115, 0.4);
}

.time-display { 
    margin-left: auto; 
    color: white; 
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    font-weight: 600;
}

/* --- Transcript Container (Enhanced) --- */
.transcript-container { 
    display: flex; 
    flex-direction: column; 
    overflow: hidden; 
    color: var(--text);
    background: var(--card-bg);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

.player-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid rgba(212, 163, 115, 0.2);
    padding-bottom: 20px;
    margin-bottom: 25px;
}

.player-header h2 {
    margin: 0;
    font-size: 1.8rem;
    color: white;
    font-family: 'Cinzel', serif;
}

/* --- MODE SWITCHER (Enhanced) --- */
.mode-switch {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 30px;
    padding: 5px;
    border: 1px solid rgba(212, 163, 115, 0.2);
}

.mode-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.mode-btn.active {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(212, 163, 115, 0.3);
}

/* --- Transcript Scroll Area --- */
#transcript-scroll-area { 
    overflow-y: auto; 
    padding-right: 15px; 
    flex: 1;
}

/* Listen Mode (SRT Style) */
.mode-listen .trans-line {
    padding: 16px 20px;
    margin-bottom: 10px;
    border-radius: 10px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    background: rgba(255, 255, 255, 0.02);
}

.mode-listen .trans-line:hover { 
    background: rgba(212, 163, 115, 0.1);
    color: var(--text);
}

.mode-listen .trans-line.active { 
    color: white; 
    background: rgba(212, 163, 115, 0.15);
    border-left-color: var(--accent); 
    font-size: 1.15rem;
    transform: translateX(5px);
}

.mode-listen .timestamp {
    color: var(--accent);
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    margin-right: 12px;
    font-weight: 600;
}

/* Read Mode (Book Style) */
.mode-read {
    padding: 20px;
}

.read-text p {
    font-family: 'Merriweather', serif;
    font-size: 1.2rem;
    line-height: 2;
    color: var(--text);
    margin-bottom: 25px;
    text-align: justify;
    text-indent: 2em;
}

.read-text p:first-child {
    text-indent: 0;
}

/* Scrollbar styling */
#transcript-scroll-area::-webkit-scrollbar { 
    width: 10px; 
}

#transcript-scroll-area::-webkit-scrollbar-track { 
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

#transcript-scroll-area::-webkit-scrollbar-thumb { 
    background: var(--accent);
    border-radius: 10px;
}

#transcript-scroll-area::-webkit-scrollbar-thumb:hover { 
    background: var(--accent-dark);
}

/* --- Responsive Design --- */
@media(max-width: 1200px) {
    .player-content { 
        grid-template-columns: 1fr; 
        grid-template-rows: 1fr 1.2fr; 
        height: 95%;
        gap: 20px;
    }
    
    .visual-stage {
        min-height: 300px;
    }
}

@media(max-width: 768px) {
    /* Hero Section */
    .hero {
        height: 50vh;
        min-height: 300px; /* Prevent layout shift on mobile */
    }
    
    .hero h1 { 
        font-size: 2.5rem;
        letter-spacing: 2px;
    }
    
    .hero p {
        font-size: 1rem;
        letter-spacing: 1.5px;
    }
    
    /* Navigation */
    nav {
        padding: 15px 4%;
        flex-wrap: wrap;
    }
    
    .logo {
        font-size: 1.4rem;
    }
    
    nav ul {
        gap: 15px;
        font-size: 0.85rem;
    }
    
    nav a {
        font-size: 0.85rem;
    }
    
    /* Sections */
    .container {
        padding: 40px 15px;
    }
    
    section {
        margin-bottom: 60px;
    }
    
    .section-header {
        font-size: 2rem;
        margin-bottom: 40px;
    }
    
    .grid-layout {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    /* Cards */
    .card-info {
        padding: 20px;
    }
    
    .card-info h3 {
        font-size: 1.2rem;
    }
    
    /* Player Overlay */
    .player-content {
        width: 100%;
        height: 100%;
        padding: 0;
        gap: 0;
        grid-template-rows: 45vh auto;
    }
    
    .close-btn {
        top: 10px;
        right: 10px;
        width: 45px;
        height: 45px;
        font-size: 1.8rem;
        border-width: 1px;
    }
    
    /* Visual Stage */
    .visual-stage {
        border-radius: 0;
        min-height: auto;
        height: 100%;
    }
    
    #stage-image {
        object-fit: contain;
    }
    
    /* Navigation Arrows - Larger touch targets */
    .nav-btn {
        width: 50px;
        height: 50px;
        font-size: 1.8rem;
        border-width: 1px;
    }
    
    .prev { 
        left: 10px; 
    }
    
    .next { 
        right: 10px; 
    }
    
    /* Image Counter */
    .image-counter {
        bottom: 15px;
        font-size: 0.85rem;
        padding: 6px 15px;
    }
    
    /* Audio Controls */
    .stage-controls {
        bottom: 15px;
        left: 10px;
        right: 10px;
        padding: 12px 15px;
        border-radius: 25px;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .stage-controls button {
        padding: 10px 20px;
        font-size: 0.9rem;
        flex: 1;
        min-width: 100px;
    }
    
    .time-display {
        font-size: 0.9rem;
        width: 100%;
        text-align: center;
        margin-left: 0;
        margin-top: 5px;
    }
    
    /* Transcript Container */
    .transcript-container {
        padding: 20px 15px;
        border-radius: 0;
        max-height: 55vh;
        overflow: hidden;
    }
    
    .player-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
        padding-bottom: 15px;
        margin-bottom: 20px;
    }
    
    .player-header h2 {
        font-size: 1.3rem;
        width: 100%;
    }
    
    /* Mode Switcher */
    .mode-switch {
        width: 100%;
        justify-content: center;
    }
    
    .mode-btn {
        flex: 1;
        padding: 12px 20px;
        font-size: 0.9rem;
    }
    
    /* Transcript Modes */
    #transcript-scroll-area {
        padding-right: 10px;
        max-height: calc(55vh - 120px);
    }
    
    .mode-listen .trans-line {
        padding: 12px 15px;
        font-size: 0.95rem;
    }
    
    .mode-listen .trans-line.active {
        font-size: 1.05rem;
    }
    
    .mode-listen .timestamp {
        font-size: 0.75rem;
        margin-right: 8px;
    }
    
    .read-text p {
        font-size: 1.05rem;
        line-height: 1.8;
        margin-bottom: 20px;
        text-indent: 1.5em;
    }
    
    /* Gallery */
    .gallery-grid {
        column-count: 1;
    }
}

/* Extra small devices */
@media(max-width: 480px) {
    .hero h1 { 
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 0.9rem;
    }
    
    .section-header {
        font-size: 1.6rem;
    }
    
    nav ul {
        width: 100%;
        justify-content: center;
        margin-top: 10px;
    }
    
    .player-content {
        grid-template-rows: 40vh auto;
    }
    
    .close-btn {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
    
    .nav-btn {
        width: 45px;
        height: 45px;
        font-size: 1.5rem;
    }
    
    .stage-controls button {
        padding: 8px 15px;
        font-size: 0.85rem;
        min-width: 80px;
    }
    
    .player-header h2 {
        font-size: 1.1rem;
    }
    
    .mode-btn {
        padding: 10px 15px;
        font-size: 0.85rem;
    }
    
    .read-text p {
        font-size: 1rem;
        line-height: 1.7;
    }
}

/* Landscape mobile - optimize for horizontal viewing */
@media(max-width: 768px) and (orientation: landscape) {
    .player-content {
        grid-template-columns: 1.3fr 1fr;
        grid-template-rows: 1fr;
        height: 100%;
    }
    
    .visual-stage {
        height: 100vh;
    }
    
    .transcript-container {
        max-height: 100vh;
        border-radius: 0;
    }
    
    #transcript-scroll-area {
        max-height: calc(100vh - 140px);
    }
    
    .stage-controls {
        flex-wrap: nowrap;
    }
    
    .time-display {
        width: auto;
        margin-left: auto;
        margin-top: 0;
    }
}
/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    /* Increase touch targets */
    .card {
        cursor: pointer;
    }
    
    .nav-btn,
    .close-btn,
    .stage-controls button,
    .mode-btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .trans-line {
        padding: 16px;
        font-size: 1rem;
    }

    /* Remove hover effects on touch devices */
    .card:hover {
        transform: none;
    }
    
    /* Always show controls on touch devices in read mode */
    .story-card .card-overlay {
        opacity: 0.7;
    }
} /* <-- ADDED CLOSING BRACKET HERE */

/* --- Footer --- */
footer {
    background: var(--card-bg);
    border-top: 2px solid rgba(212, 163, 115, 0.3);
    padding: 60px 20px 40px;
    margin-top: 100px;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.footer-brand {
    text-align: center;
    margin-bottom: 40px;
}

.footer-brand .logo {
    font-family: 'Cinzel', 'Georgia', serif;
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent) 0%, #f4d4a8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 2px;
    margin-bottom: 10px;
    display: inline-block;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-style: italic;
    margin-top: 5px;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
    margin-bottom: 35px;
    padding: 0;
}

.footer-links a {
    color: var(--text);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    padding: 12px 20px;
    position: relative;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'Lato', sans-serif;
}

.footer-links a::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 60%;
    height: 2px;
    background: var(--accent);
    transition: transform 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent);
    transform: translateY(-2px);
}

.footer-links a:hover::after {
    transform: translateX(-50%) scaleX(1);
}

.footer-links a:not(:last-child)::before {
    content: '•';
    position: absolute;
    right: -5px;
    color: rgba(212, 163, 115, 0.4);
    font-size: 1.2rem;
    font-weight: normal;
}

.footer-copyright {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid rgba(212, 163, 115, 0.15);
    position: relative;
}

.footer-copyright::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.footer-copyright p {
    margin: 0;
    letter-spacing: 0.5px;
}

@media (max-width: 768px) {
    footer {
        padding: 50px 15px 30px;
        margin-top: 60px;
    }
    
    .footer-brand .logo {
        font-size: 1.6rem;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 10px;
        margin-bottom: 30px;
    }
    
    .footer-links a {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    .footer-links a:not(:last-child)::before {
        display: none;
    }
    
    .footer-links a::after {
        width: 40%;
    }
    
    .footer-copyright {
        font-size: 0.85rem;
        padding-top: 25px;
        margin-top: 25px;
    }
}

/* About Section Enhancement */
section p strong {
    font-weight: 700;
}

@media(max-width: 768px) {
    section p {
        font-size: 1rem !important;
        padding: 0 20px;
    }
}
/* About Section Enhancement */
section p strong {
    font-weight: 700;
}

@media(max-width: 768px) {
    section p {
        font-size: 1rem !important;
        padding: 0 20px;
    }
}
