:root {
    /* ----- LIGHT THEME (Default) ----- */
    --bg-main: #f5f7fa;
    --bg-gradient: linear-gradient(135deg, #f5f7fa 0%, #e8edf5 100%);
    --bg-surface: rgba(255, 255, 255, 0.9);
    --text-primary: #0a2647;
    --text-secondary: #205295;
    --accent-gold: #c39b1e;
    --accent-gold-shimmer: #f1d279;
    --glass-border: rgba(20, 66, 114, 0.1);
    --card-shadow: 0 10px 30px rgba(10, 38, 71, 0.1);
    --footer-bg: #0a2647;
    --footer-text: #f5f7fa;
    --text-primary-rgb: 10, 38, 71;
    
    /* Semantic aliases */
    --deep-ocean: #0a2647;
    --warm-gold: #c39b1e;
    --section-dark-bg: #0a2647;
    --section-dark-text: #fdf6e3;
    --card-bg: var(--bg-surface);
}

.reader-access-page { min-height: 65vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; padding: 40px 20px; }
.reader-story-form[hidden], #storyAccessGate[hidden] { display: none; }
.reader-access-page h1 { font-size: 2rem; text-align: center; }
.reader-auth-dialog { margin: auto; width: min(420px, calc(100% - 32px)); max-height: calc(100dvh - 32px); overflow-y: auto; padding: 32px 24px 24px; border: 1px solid var(--glass-border); border-radius: 8px; background: var(--bg-main); color: var(--text-primary); }
.reader-auth-dialog::backdrop { background: rgba(0,0,0,0.65); }
.reader-auth-dialog h2 { font-size: 1.35rem; line-height: 1.5; margin-bottom: 20px; padding-right: 16px; }
.reader-auth-dialog label { display: block; margin-bottom: 16px; font-size: 0.9rem; }
.reader-auth-dialog [hidden] { display: none; }
.reader-auth-dialog input { display: block; width: 100%; min-height: 46px; margin-top: 6px; padding: 10px; border: 1px solid var(--glass-border); border-radius: 4px; background: var(--bg-surface); color: var(--text-primary); font: inherit; }
.reader-auth-dialog input:focus { outline: 2px solid var(--accent-gold); }
.reader-auth-dialog .btn-gold { width: 100%; margin-top: 12px; padding: 12px; color: var(--bg-main); }
.reader-auth-close { position: absolute; right: 8px; top: 8px; width: 32px; height: 32px; border: 0; background: transparent; color: var(--text-primary); cursor: pointer; }
.reader-auth-switch { display: block; margin: 14px auto 0; padding: 8px; border: 0; background: transparent; color: var(--text-primary); text-decoration: underline; font: inherit; font-size: 0.9rem; cursor: pointer; }
#readerAuthMessage { font-size: 0.85rem; overflow-wrap: anywhere; }

.legal-page { max-width: 850px; padding-top: 120px; padding-bottom: 70px; color: var(--text-primary); }
.legal-page h1 { font-size: 2.2rem; line-height: 1.2; overflow-wrap: anywhere; }
.legal-page h2 { font-size: 1.2rem; margin-top: 2rem; }
.legal-page p { line-height: 1.8; overflow-wrap: anywhere; }
.legal-page a { color: var(--text-secondary); text-decoration: underline; }
.legal-draft { color: var(--text-secondary); font-size: 0.9rem; }

.category-empty-state { grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 1rem; padding: 1.5rem 0; }
.category-empty-state p { margin: 0; }
.category-empty-state .btn-gold { display: inline-flex; align-items: center; gap: 0.65rem; }
.category-empty-state i { font-size: 1.2rem; }
.story-reader { inset: 0; margin: 0; padding: 0; border: 0; border-radius: 0; width: 100%; height: 100dvh; max-width: none; max-height: none; background: var(--bg-main); color: var(--text-primary); overflow: hidden; }
.story-reader[open] { display: grid; grid-template-rows: minmax(0, 1fr); }
.story-reader::backdrop { background: rgba(0, 0, 0, 0.65); }
.story-reader-toolbar { position: absolute; top: 10px; right: 20px; z-index: 10; display: flex; align-items: center; gap: 12px; font-size: 0.9rem; }
.story-reader.has-image-close .story-reader-toolbar { display: none; }
.story-featured-img { position: relative; }
.story-image-close { display: none; position: absolute; top: 20px; right: 20px; z-index: 5; width: 44px; height: 44px; align-items: center; justify-content: center; border: 1px solid rgba(255,255,255,0.7); border-radius: 50%; background: rgba(0,0,0,0.65); color: #fff; cursor: pointer; font-size: 1.1rem; }
.story-embedded .story-image-close { display: inline-flex; }
.story-image-close:hover { background: rgba(0,0,0,0.9); }
.story-image-close:focus-visible { outline: 3px solid var(--accent-gold); outline-offset: 3px; }
.story-reader-toolbar .action-btn { flex-shrink: 0; }
#storyReaderStatus { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 10; width: max-content; max-width: calc(100% - 48px); color: var(--text-primary); font-size: 0.9rem; text-align: center; overflow-wrap: anywhere; pointer-events: none; }
#storyReaderStatus:empty { display: none; }
.reader-embedded-document, .story-embedded { scrollbar-width: none; }
.reader-embedded-document::-webkit-scrollbar, .story-embedded::-webkit-scrollbar { display: none; }
.story-reader-frame { display: block; width: 100%; height: 100%; border: 0; background: var(--bg-main); }
body.reader-open { overflow: hidden; }

.search-results-page { padding-top: 6rem; min-height: 80vh; }
.search-results-heading { display: grid; grid-template-columns: minmax(0, 1fr) 44px; align-items: start; gap: 16px; }
.search-results-heading .section-title { min-width: 0; overflow-wrap: anywhere; }
.search-results-close { width: 44px; height: 44px; margin-top: 4px; background: var(--bg-surface); color: var(--text-primary); border: 1px solid var(--glass-border); }
.search-results-close:focus-visible { outline: 2px solid var(--accent-gold); outline-offset: 3px; }
.search-results-home { display: flex; justify-content: center; margin-top: 40px; }
.search-results-home .btn-gold { display: inline-flex; align-items: center; gap: 10px; }

body.dark-mode {
    /* ----- DARK THEME ----- */
    --bg-main: #0a0a0a;
    --bg-gradient: linear-gradient(135deg, #121212 0%, #000000 100%);
    --bg-surface: rgba(30, 30, 30, 0.85);
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --accent-gold: #d4af37;
    --glass-border: rgba(255, 255, 255, 0.1);
    --card-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    --footer-bg: #050505;
    --footer-text: #e0e0e0;
    
    --deep-ocean: #ffffff;
    --warm-gold: #d4af37;
    --section-dark-bg: #121212;
    --section-dark-text: #ffffff;
    --card-bg: var(--bg-surface);
}

body.dark-blue-mode {
    /* ----- DARK BLUE THEME ----- */
    --bg-main: #020c1b;
    --bg-gradient: linear-gradient(135deg, #020c1b 0%, #010812 100%);
    --bg-surface: rgba(10, 25, 47, 0.9);
    --text-primary: #ccd6f6;
    --text-secondary: #8892b0;
    --accent-gold: #64ffda;
    --accent-gold-shimmer: #a8ffeb;
    --glass-border: rgba(100, 255, 218, 0.15);
    --card-shadow: 0 10px 30px rgba(2, 12, 27, 0.5);
    --footer-bg: #010812;
    --footer-text: #64ffda;
    
    --deep-ocean: #ffffff; /* Use white for high-contrast headlines in blue mode */
    --warm-gold: #64ffda;
    --section-dark-bg: #010812;
    --section-dark-text: #ccd6f6;
    --card-bg: rgba(17, 34, 64, 0.95);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--bg-gradient);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    transition: background 0.5s ease, color 0.5s ease;
}

/* ----- THEME SWITCHER STYLES ----- */
.theme-switcher {
    display: flex;
    gap: 0.3rem;
    margin-right: 0.5rem; /* Reduced from 1.5rem */
    background: rgba(0,0,0,0.03);
    padding: 0.2rem;
    border-radius: 50px;
    border: 1px solid var(--glass-border);
}

.theme-btn {
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.theme-btn:hover {
    background: rgba(212, 175, 55, 0.2);
    color: var(--warm-gold);
}

.theme-btn.active {
    background: var(--warm-gold);
    color: white;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 5 L35 20 L50 20 L38 30 L43 45 L30 36 L17 45 L22 30 L10 20 L25 20 Z' fill='%23D4AF37' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: -1;
}

h1, h2, h3, .logo {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
}

.container {
    width: 90%;
    max-width: 1280px;
    margin: 0 auto;
}

.gold {
    color: var(--warm-gold);
}

/* ----- TYPOGRAPHY ENHANCEMENTS ----- */
.dropcap:first-letter {
    font-family: 'Playfair Display', serif;
    font-size: 4.5rem;
    float: left;
    line-height: 0.8;
    margin-right: 1rem;
    color: var(--warm-gold);
    font-weight: 900;
    text-shadow: 2px 2px 0 rgba(10,38,71,0.1);
}

/* ----- GLASSMORPHISM with gradient border ----- */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    transition: all 0.3s ease;
}

.glass-nav {
    background: var(--bg-surface);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--glass-border);
}

.glass-card:hover {
    border-color: var(--warm-gold);
    box-shadow: var(--shadow-strong);
}

/* ----- NAVBAR (enhanced) ----- */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0.7rem 0; /* Reduced from 1rem */
    background: var(--bg-surface);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.7rem; /* Reduced from 1.9rem */
    font-weight: 900;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.5px;
    transition: all 0.3s ease;
}

.logo:hover {
    color: var(--warm-gold);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem; /* Reduced from 1.5rem */
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1001;
}

/* ----- MODERN LANGUAGE TOGGLE SWITCH ----- */
.language-selector {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: rgba(var(--text-primary-rgb), 0.05);
    padding: 0.4rem 0.6rem;
    border-radius: 50px;
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.language-dropdown {
    width: 105px;
    min-height: 28px;
    border: 0;
    appearance: none;
    background: transparent;
    color: var(--text-primary);
    font: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
}

.language-dropdown:focus-visible {
    outline: 2px solid var(--accent-gold);
    outline-offset: 2px;
}

.language-dropdown option {
    background: var(--bg-main);
    color: var(--text-primary);
}

.language-selector {
    position: relative;
    gap: 10px;
    padding: 5px 12px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.language-selector::after {
    content: '';
    position: absolute;
    right: 14px;
    width: 6px;
    height: 6px;
    border-right: 2px solid var(--accent-gold);
    border-bottom: 2px solid var(--accent-gold);
    transform: rotate(45deg);
    pointer-events: none;
}

.language-dropdown { padding-right: 20px; }

.nav-icon-btn.login-link {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    background: var(--bg-surface);
    color: var(--accent-gold);
    font-size: 16px;
}

.password-field { position: relative; }
.password-field .form-control { padding-right: 52px; }
.password-visibility {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
}
.password-visibility:hover { color: var(--accent-gold); }
.password-visibility:focus-visible { outline: 2px solid var(--accent-gold); }

.lang-icon {
    font-size: 0.9rem;
    color: var(--accent-gold);
    opacity: 0.8;
}

/* ----- FLOATING QUICK ACTIONS ----- */
.header-search { margin-left: auto; margin-right: 1rem; }
.header-search[hidden], .header-search-form[hidden], .floating-theme-options[hidden] { display: none; }
.navbar.search-open .nav-container > :not(.header-search) { visibility: hidden; }
.navbar.search-open #headerSearchToggle { visibility: hidden; }
.navbar.search-open #mobileHeaderCollections { visibility: hidden !important; opacity: 0; pointer-events: none; }
.navbar.search-open #mobileHeaderCollections * { visibility: hidden !important; transition: none !important; }
.reader-busy-spinner { margin-right: 8px; }
button[aria-busy="true"] { cursor: wait; }
.stories-section[aria-busy="true"]::after {
    content: '\f110';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 24px;
    position: fixed;
    top: 90px;
    right: 24px;
    z-index: 150;
    color: var(--accent-gold);
    animation: readerSpin 1s linear infinite;
}
@keyframes readerSpin { to { transform: rotate(360deg); } }
.header-search-form {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 5%;
    right: 5%;
    height: calc(100% - 8px);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0;
}
.header-search-field {
    position: relative;
    flex: 1;
    min-width: 0;
    height: 100%;
}
.header-search-field .search-input { height: 100%; padding-top: 0; padding-bottom: 0; }
.header-search-field .search-btn { width: 40px; height: 40px; }
.header-search button { flex-shrink: 0; }
.floating-theme-control { position: relative; }
.floating-theme-btn { position: relative; font-size: 1.1rem; }
.floating-theme-btn i { position: relative; z-index: 1; }
.floating-theme-options {
    position: absolute;
    right: 100%;
    top: 0;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: var(--bg-main);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    box-shadow: var(--card-shadow);
}
.floating-theme-options .theme-btn { width: 36px; height: 36px; }
.floating-theme-options .theme-btn:focus-visible { outline: 2px solid var(--accent-gold); }
.floating-tools {
    position: fixed;
    right: clamp(16px, 3vw, 34px);
    bottom: clamp(18px, 3vw, 34px);
    z-index: 9998;
    display: grid;
    gap: 0.75rem;
    justify-items: center;
}

.floating-language-select {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.floating-tool-btn {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.92);
    color: #0a2647;
    box-shadow: 0 12px 30px rgba(10, 38, 71, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.floating-tool-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 34px rgba(10, 38, 71, 0.28);
    background: #ffffff;
}

.floating-tool-btn:focus-visible {
    outline: 3px solid var(--accent-gold);
    outline-offset: 4px;
}

.floating-language-btn {
    position: relative;
    flex-direction: column;
    gap: 0;
    font-size: 1.05rem;
    overflow: hidden;
}

.floating-language-btn i,
.floating-language-btn span {
    position: relative;
    z-index: 1;
}

.floating-language-btn span {
    font-size: 0.63rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0;
}

.scroll-progress-ring {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.scroll-progress-track,
.scroll-progress-value {
    fill: none;
    stroke-width: 4;
}

.scroll-progress-track {
    stroke: rgba(10, 38, 71, 0.12);
}

.scroll-progress-value {
    stroke: var(--accent-gold);
    stroke-linecap: round;
    stroke-dasharray: 144.5;
    stroke-dashoffset: 144.5;
    transition: stroke-dashoffset 0.12s linear;
}

.floating-whatsapp-btn {
    position: relative;
    background: #25d366;
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.75);
    font-size: 1.55rem;
}
.floating-whatsapp-btn i { position: relative; z-index: 1; }
.floating-whatsapp-btn .scroll-progress-track { stroke: rgba(255, 255, 255, 0.35); }
.floating-whatsapp-btn .scroll-progress-value { stroke: #0a2647; }

.floating-whatsapp-btn:hover {
    background: #1fbd5a;
    color: #ffffff;
}

.switch-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-primary);
    min-width: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.switch-label.active {
    color: var(--accent-gold);
}

.lang-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 22px;
}

.lang-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(var(--text-primary-rgb), 0.1);
    transition: .4s;
    border-radius: 34px;
    border: 1px solid var(--glass-border);
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: var(--accent-gold);
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

input:checked + .slider:before {
    transform: translateX(22px);
}

/* Responsiveness Utilities */
@media (max-width: 768px) {
    .hero-title { font-size: 3rem; }
    .hero-sub { font-size: 1.2rem; }
    .section-title { font-size: 2.2rem; }
    .card-grid { grid-template-columns: 1fr; }
    .nav-right {
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .container { width: 92%; }
    .hero-title { font-size: 2.5rem; }
    .navbar { padding: 0.5rem 0; }
    .logo { font-size: 1.4rem; }
    .floating-tools {
        right: 14px;
        bottom: 16px;
        gap: 0.6rem;
    }
    .floating-tool-btn {
        width: 50px;
        height: 50px;
    }
}

/* ----- BUTTONS with shine effect ----- */
.btn-gold {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background-color: var(--warm-gold);
    color: white; /* Changed for consistency */
    padding: 0.8rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1.5px solid transparent;
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.2);
    cursor: pointer;
    line-height: 1;
}

.btn-gold:hover {
    background-color: transparent;
    color: var(--warm-gold);
    border-color: var(--warm-gold);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(212, 175, 55, 0.3);
}

.btn-small {
    padding: 0.5rem 1.2rem;
    font-size: 0.85rem;
}

.btn-shine {
    position: relative;
    overflow: hidden;
}

.btn-shine::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 200%;
    height: 200%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0) 100%);
    transform: rotate(30deg);
    transition: transform 0.6s;
}

.btn-shine:hover::after {
    transform: rotate(30deg) translate(100%, 0);
}

/* ----- NAVBAR ACTIONS ----- */
.nav-actions {
    display: flex;
    gap: 1rem;
    margin-right: 1.5rem;
}

.mobile-header-collections { display: none; }
.profile-dropdown[hidden] { display: none; }
.user-profile.profile-open .profile-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
@media (max-width: 768px) {
    .mobile-header-collections .user-name-label { display: none; }
    .mobile-header-collections .profile-dropdown { position: fixed; top: 64px; right: 12px; margin-top: 0; max-width: calc(100vw - 24px); }
    .mobile-header-collections { display: flex; align-items: center; gap: 2px; }
    .nav-container { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 3px; }
    .nav-container .logo { order: 0; font-size: 1.3rem; letter-spacing: 0; white-space: nowrap; }
    .mobile-header-collections { order: 1; }
    .nav-container .header-search { order: 2; margin: 0; }
    .nav-container .mobile-menu-btn { order: 3; display: flex; align-items: center; justify-content: center; margin: 0; width: 34px; height: 38px; }
    .mobile-header-collections .nav-icon-btn,
    .header-search > .nav-icon-btn { width: 34px; height: 38px; padding: 4px; font-size: 1rem; }
    .mobile-header-collections .count-badge { top: 0; right: 0; }
    .mobile-story-arrival .story-content { transition: none !important; transform: none !important; opacity: 1 !important; }
}
@media (max-width: 360px) {
    .nav-container .logo { font-size: 1rem; }
    .mobile-header-collections .nav-icon-btn,
    .nav-container .mobile-menu-btn,
    .header-search > .nav-icon-btn { width: 30px; }
}

.nav-icon-btn {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.1rem; /* Reduced from 1.2rem */
    cursor: pointer;
    position: relative;
    padding: 0.4rem; /* Reduced from 0.5rem */
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-icon-btn:hover {
    color: var(--accent-gold);
    transform: translateY(-2px);
}

.count-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--accent-gold);
    color: white;
    font-size: 0.65rem; /* Reduced from 0.7rem */
    font-weight: 700;
    width: 16px; /* Reduced from 18px */
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid var(--bg-surface);
}

/* User Profile Dropdown */
.user-profile {
    position: relative;
    display: flex;
    align-items: center;
}

.user-name-label {
    margin-left: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 160px;
    margin-top: 1rem;
    padding: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

@media (hover: hover) {
.user-profile:hover .profile-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9rem;
    border-radius: 8px;
    transition: all 0.2s;
}

.dropdown-item:hover {
    background: rgba(212, 175, 55, 0.1);
    color: var(--accent-gold);
}

@media (max-width: 480px) {
    .user-name-label { display: none; }
}

/* ----- SIDE PANEL ----- */
.side-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: var(--bg-surface);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 10001;
    box-shadow: -10px 0 30px rgba(0,0,0,0.3);
    transition: right 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--glass-border);
}

.side-panel.open {
    right: 0; /* Moves into view */
}

.panel-header {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.05);
}

.panel-header h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: var(--accent-gold);
    margin: 0;
}

.close-btn {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.close-btn:hover {
    opacity: 1;
    color: var(--accent-gold);
}

.panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s;
}

.panel-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Collection Items */
.panel-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    margin-bottom: 1rem;
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.panel-item:hover {
    transform: translateX(-5px);
    border-color: var(--accent-gold);
    background: rgba(255,255,255,0.08);
}

.item-img {
    width: 80px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
}

.item-info {
    flex: 1;
}

.item-info h4 {
    font-size: 0.95rem;
    margin: 0 0 0.3rem 0;
    color: var(--text-primary);
}

.item-info p {
    font-size: 0.85rem;
    margin-top: 0.4rem;
}

.item-info a {
    color: var(--accent-gold);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.item-info a:hover {
    color: var(--text-primary);
    transform: translateX(3px);
}

.item-info a::after {
    content: '→';
    font-size: 1rem;
}

.remove-item-btn {
    background: transparent;
    border: none;
    color: #e74c3c;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.3s;
    padding: 0.5rem;
}

.remove-item-btn:hover {
    opacity: 1;
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    opacity: 0.5;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

@media (max-width: 480px) {
    .side-panel {
        width: 100%;
        right: -100%;
    }
}

/* ----- HERO with animated pattern ----- */
.hero {
    position: relative;
    height: 90vh;
    background-image: url('https://images.unsplash.com/photo-1544396821-4dd40b938ad3?w=1400&auto=format');
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    isolation: isolate;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(10,38,71,0.7) 0%, rgba(10,38,71,0.4) 100%);
    z-index: 1;
}

.hero-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M50 10 L60 40 L90 40 L65 60 L75 90 L50 70 L25 90 L35 60 L10 40 L40 40 Z' fill='%23D4AF37' opacity='0.1'/%3E%3C/svg%3E");
    background-size: 80px 80px;
    opacity: 0.3;
    z-index: 1;
    animation: movePattern 30s linear infinite;
}

@keyframes movePattern {
    0% { background-position: 0 0; }
    100% { background-position: 100px 100px; }
}

.hero-content {
    position: relative;
    z-index: 3;
    color: white;
    max-width: min(800px, 100%);
    min-width: 0;
    overflow-wrap: anywhere;
    padding: 2rem;
    animation: fadeInUp 1.2s ease-out;
}

.hero-title {
    font-size: 4.2rem;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 1rem;
    text-shadow: 0 5px 20px rgba(0,0,0,0.4);
}

.hero-sub {
    font-size: 1.6rem;
    margin-bottom: 2.5rem;
    font-weight: 300;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.hero-scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    animation: bounce 2s infinite;
}

.hero-scroll-indicator span {
    display: block;
    width: 30px;
    height: 50px;
    border: 2px solid white;
    border-radius: 50px;
    position: relative;
}

.hero-scroll-indicator span::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    transform: translateX(-50%);
    animation: scrollWheel 1.5s infinite;
}

@keyframes scrollWheel {
    0% { opacity: 1; top: 8px; }
    100% { opacity: 0; top: 30px; }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0) translateX(-50%); }
    40% { transform: translateY(-20px) translateX(-50%); }
    60% { transform: translateY(-10px) translateX(-50%); }
}

/* ----- FEATURED STORY SECTION ----- */
.featured-section {
    padding: 5rem 0 2rem;
}

.featured-card {
    max-width: 900px;
    margin: 0 auto;
    border-radius: 8px;
    display: flex;
    flex-wrap: wrap;
    overflow: hidden;
    padding: 0;
    background: var(--bg-surface);
}

.featured-img {
    flex: 1 1 300px;
    height: 280px;
    min-height: 0;
    overflow: hidden;
}

.featured-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s;
}

.featured-card:hover .featured-img img {
    transform: scale(1.05);
}

.featured-content {
    flex: 1 1 300px;
    padding: 1.5rem;
    background: var(--bg-surface);
    backdrop-filter: blur(8px);
}

.featured-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--deep-ocean);
}

.featured-excerpt {
    font-size: 0.95rem;
    margin-bottom: 1.2rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--text-secondary);
}

/* ----- STORY CARDS (enhanced) ----- */
.story-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--glass-border);
    color: var(--text-secondary);
    font-size: 0.75rem;
}
.story-card-meta i { color: var(--accent-gold); margin-right: 4px; }
.panel-item h4 { overflow-wrap: anywhere; }
.stories-section {
    padding: 3rem 0 5rem;
}

.section-title {
    font-size: 2.8rem;
    color: var(--text-primary);
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--warm-gold);
    margin: 0.8rem 0 0;
    border-radius: 2px;
    transition: width 0.4s;
}

.section-title:hover::after {
    width: 120px;
}

.section-title.small {
    font-size: 2rem;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
}

.story-card {
    background: var(--bg-surface);
    border-radius: 25px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.4s;
    position: relative;
}

.story-card:hover {
    transform: translateY(-15px);
    box-shadow: var(--shadow-strong);
}

.card-img {
    height: 240px;
    overflow: hidden;
    position: relative;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s;
}

.story-card:hover .card-img img {
    transform: scale(1.15);
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(10,38,71,0.9), transparent);
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.4s;
}

.story-card:hover .card-overlay {
    opacity: 1;
}

.card-overlay .excerpt {
    color: white;
    font-size: 0.95rem;
    line-height: 1.5;
    transform: translateY(20px);
    transition: transform 0.4s;
}

.story-card:hover .card-overlay .excerpt {
    transform: translateY(0);
}

.card-content {
    padding: 1.8rem 1.5rem;
}

.card-content h3 {
    font-size: 1.7rem;
    margin-bottom: 1rem;
    color: var(--deep-ocean);
}

.read-more {
    color: var(--warm-gold);
    font-weight: 600;
    text-decoration: none;
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    transition: gap 0.3s;
}

.read-more:hover {
    gap: 0.8rem;
}

/* ----- CATEGORY BADGES ----- */
.category-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(10, 38, 71, 0.7);
    color: var(--warm-gold);
    padding: 0.4rem 0.9rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 5;
    backdrop-filter: blur(5px);
    border: 1px solid var(--glass-border);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.story-category {
    display: inline-block;
    background: var(--bg-surface);
    color: var(--deep-ocean);
    padding: 0.3rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
    border: 1px solid var(--warm-gold);
}

/* ----- CATEGORY NAVIGATION ----- */
.category-nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.cat-pill {
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    background: var(--bg-surface);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    position: relative;
    overflow: hidden;
    perspective: 1000px;
}

.cat-pill i {
    font-size: 1.2rem;
    color: var(--warm-gold);
    transition: transform 0.5s;
}

.cat-pill:hover {
    background: var(--warm-gold);
    color: var(--deep-ocean);
    transform: translateY(-5px) rotateX(10deg);
    box-shadow: 0 10px 20px rgba(212, 175, 55, 0.3);
    border-color: var(--warm-gold);
}

.cat-pill:hover i {
    transform: scale(1.2) rotate(15deg);
    color: var(--deep-ocean);
}

.cat-pill.active {
    background: var(--warm-gold);
    color: var(--deep-ocean);
    border-color: var(--warm-gold);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.4);
}

.cat-pill.active i {
    color: var(--deep-ocean);
}

/* Header Read Books Link */
.header-read-books {
    background: linear-gradient(135deg, rgba(195, 155, 30, 0.1) 0%, rgba(195, 155, 30, 0.05) 100%);
    border: 1px solid rgba(195, 155, 30, 0.3);
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    color: var(--warm-gold);
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.header-read-books:hover {
    background: var(--warm-gold);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(195, 155, 30, 0.3);
    border-color: var(--warm-gold);
}

.header-read-books i {
    font-size: 1rem;
}

/* ----- FLOATING ANIMATION ----- */
.float-animation {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ----- PULSE ANIMATION (for gold icons) ----- */
.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 0.8; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
    100% { opacity: 0.8; transform: scale(1); }
}

/* ----- CULTURAL PATTERN DIVIDER ----- */
.pattern-divider {
    width: 100%;
    overflow: hidden;
    line-height: 0;
    margin: 3rem 0;
}

.pattern-divider svg {
    width: 100%;
    height: 80px;
}

/* ----- ABOUT SECTION (enriched) ----- */
.about-section {
    background: var(--section-dark-bg);
    color: var(--section-dark-text);
    padding: 6rem 0; /* Slightly more padding for a premium feel */
    margin-top: 2rem;
    position: relative;
    overflow: hidden;
}

.about-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -20%;
    width: 140%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(212,175,55,0.1) 0%, transparent 70%);
    animation: rotateGlow 20s linear infinite;
}

@keyframes rotateGlow {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.about-flex {
    display: flex;
    align-items: center;
    gap: 3rem;
    position: relative;
    z-index: 2;
}

.about-text h2 {
    font-size: 3rem; /* Larger heading */
    color: var(--warm-gold);
    margin-bottom: 1.5rem;
    font-family: 'Playfair Display', serif;
}

.about-text p {
    font-size: 1.25rem;
    line-height: 1.8;
    color: var(--section-dark-text);
    opacity: 0.95;
}

.cultural-badge {
    margin-top: 2rem;
    display: flex;
    gap: 1.5rem;
    font-size: 2rem;
    color: var(--warm-gold);
}

.cultural-badge i {
    transition: transform 0.3s;
}

.cultural-badge i:hover {
    transform: scale(1.2) rotate(5deg);
}

.about-decoration {
    font-size: 7rem;
    color: var(--warm-gold);
    opacity: 0.8;
}

/* ----- STORY PAGE ----- */
.story-page {
    padding: 4rem 0;
}

.story-featured-img {
    width: 100%;
    height: 500px;
    border-radius: 30px;
    overflow: hidden;
    margin-bottom: 2.5rem;
    box-shadow: var(--shadow-strong);
}

.story-featured-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 8s;
}

.story-featured-img:hover img {
    transform: scale(1.1);
}

.story-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    gap: 1.5rem;
}

.story-actions {
    display: flex;
    flex-wrap: wrap;
    max-width: 100%;
    align-items: center;
    gap: 1rem;
}

.story-actions .action-btn {
    background: var(--bg-surface);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
}

.story-title {
    font-size: 2rem;
    color: var(--text-primary);
    line-height: 1.2;
}

.story-content {
    font-size: 1.25rem;
    background: var(--bg-surface);
    padding: 2.5rem;
    border-radius: 30px;
    line-height: 1.9;
    color: var(--text-primary);
}

.story-decoration {
    text-align: center;
    margin: 3rem 0 2rem;
}

.story-actions .story-focus-open { display: none; }
.story-focus-close[hidden], .story-focus-end[hidden] { display: none; }
.story-focus-close {
    position: fixed;
    top: max(12px, env(safe-area-inset-top));
    right: max(16px, env(safe-area-inset-right));
    z-index: 10000;
    width: 44px;
    height: 44px;
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    background: var(--bg-main);
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
}
.story-focus-end { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; margin-top: 32px; min-height: 48px; font-size: 1rem; }
.story-focus-close:focus-visible, .story-focus-open:focus-visible { outline: 3px solid var(--accent-gold); outline-offset: 3px; }
body.story-focus-mode { background: var(--bg-main); }
body.story-focus-mode::before, body.story-focus-mode::after,
body.story-focus-mode > :not(.story-page),
.story-focus-mode .story-container > :not(.story-content):not(.story-focus-close) { display: none !important; }
.story-focus-mode .story-page { padding: 0; }
.story-focus-mode .story-container { width: 100%; max-width: none; padding: 0; }
.story-focus-mode .story-container::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: max(68px, calc(env(safe-area-inset-top) + 56px));
    background: var(--bg-main);
    z-index: 9999;
    pointer-events: none;
}
.story-focus-mode .story-content {
    min-height: 100dvh;
    padding: max(76px, calc(env(safe-area-inset-top) + 64px)) 24px max(32px, env(safe-area-inset-bottom));
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: var(--bg-main);
    transform: none !important;
    opacity: 1 !important;
    transition: none !important;
    overflow-wrap: anywhere;
}
.story-focus-mode .story-text img { max-width: 100%; height: auto; }
@media (max-width: 768px) {
    .story-actions .story-focus-open { display: inline-flex; flex-shrink: 0; }
}

/* ----- RELATED STORIES (mini cards) ----- */
.related-stories {
    margin-top: 4rem;
}

.mini-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
}

.mini-grid .story-card .card-img {
    height: 160px;
}

.mini-grid .card-content h4 {
    font-size: 1.3rem;
}

/* ----- FOOTER ----- */
footer {
    background: var(--text-primary);
    color: var(--bg-main);
    padding: 2.5rem 0;
    margin-top: 4rem;
    border-top: 1px solid var(--glass-border);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.social-icons a {
    color: var(--soft-sand);
    font-size: 1.6rem;
    margin-left: 1.5rem;
    transition: all 0.3s;
    display: inline-block;
}

.social-icons a:hover {
    color: var(--warm-gold);
    transform: translateY(-8px) scale(1.2);
}

/* ----- SEARCH BAR ----- */
.search-container {
    margin-top: 2rem;
    position: relative;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.search-input {
    width: 100%;
    padding: 1rem 3.5rem 1rem 1.5rem;
    border-radius: 50px;
    border: 2px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    color: white;
    font-size: 1.1rem;
    font-family: inherit;
    transition: all 0.3s;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-input.has-sliding-placeholder::placeholder {
    color: transparent;
}

.header-search-field .search-input { color: var(--text-primary); caret-color: var(--text-primary); }
.header-search-field .search-input::placeholder { color: var(--text-secondary); }
.header-search-field .search-input.has-sliding-placeholder::placeholder { color: transparent; }
.header-search-field .search-placeholder { color: var(--text-secondary); }
.footer-developer { display: flex; align-items: center; gap: 12px; margin-top: 24px; color: var(--text-primary); text-decoration: none; }
.footer-developer img { flex: 0 0 56px; width: 56px; height: 56px; object-fit: cover; object-position: 60% 24%; border-radius: 50%; border: 2px solid var(--accent-gold); }
.footer-developer > span { min-width: 0; }
.footer-developer small, .footer-developer strong, .footer-developer span > span { display: block; overflow-wrap: anywhere; }
.footer-developer small, .footer-developer span > span { color: var(--text-secondary); font-size: 0.8rem; }
.contact-form { display: grid; gap: 8px; }
.footer-projects-title { margin-top: 24px; }
.collection-opening { margin: 0 0 8px; font-size: 0.9rem; font-weight: 400; line-height: 1.65; color: var(--text-primary); overflow-wrap: anywhere; }
.footer-links a { overflow-wrap: anywhere; }
.contact-limit { display: flex; align-items: center; gap: 10px; font-size: 0.75rem; color: var(--text-secondary); }
.contact-limit progress { flex: 1; min-width: 0; height: 6px; appearance: none; border: none; border-radius: 3px; overflow: hidden; background: var(--glass-border); }
.contact-limit progress::-webkit-progress-bar { background: var(--glass-border); }
.contact-limit progress::-webkit-progress-value { background: var(--accent-gold); transition: width 0.15s; }
.contact-limit progress::-moz-progress-bar { background: var(--accent-gold); }
.contact-limit span { white-space: nowrap; }
.contact-form label { font-size: 0.85rem; }
.contact-form input, .contact-form textarea, #dislikeReason { width: 100%; min-width: 0; padding: 10px 12px; font: inherit; color: var(--text-primary); background: var(--bg-surface); border: 1px solid var(--glass-border); border-radius: 4px; }
.contact-form textarea, #dislikeReason { resize: vertical; }
.contact-form button { justify-self: end; width: 44px; height: 44px; }
#contactStatus { font-size: 0.85rem; overflow-wrap: anywhere; }
#contactStatus:empty { display: none; }
#dislikeReason { display: block; margin: 8px 0 16px; }

.search-placeholder {
    position: absolute;
    top: 50%;
    left: 1.5rem;
    right: 3.5rem;
    height: 1.5em;
    transform: translateY(-50%);
    overflow: hidden;
    pointer-events: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
    line-height: 1.5;
    text-align: left;
}

.search-placeholder[hidden] {
    display: none;
}

.search-placeholder > span {
    position: absolute;
    inset: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stories-section[aria-busy="true"] #storyGrid {
    opacity: 0.5;
}

.search-input:focus {
    outline: none;
    border-color: var(--warm-gold);
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
}

.search-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--warm-gold);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    color: var(--deep-ocean);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.3s;
}

.search-btn:hover {
    transform: translateY(-50%) scale(1.1);
    background-color: white;
}

/* ----- SOCIAL INTERACTIONS ----- */
.social-actions {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 5;
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.story-card:hover .social-actions {
    opacity: 1;
    transform: translateX(0);
}

/* ----- INTERACTION STATS ----- */
.interaction-stats {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.interact-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.interact-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.interact-btn.active.like-btn {
    color: #2ecc71;
    border-color: #2ecc71;
    background: rgba(46, 204, 113, 0.1);
}

.interact-btn.active.dislike-btn {
    color: #e74c3c;
    border-color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
}

.interact-btn .count {
    font-weight: 700;
}

/* ----- COMMENTS SECTION ----- */
.comments-section {
    margin-top: 5rem;
    padding-top: 3rem;
    border-top: 1px solid var(--glass-border);
}

.section-title.small {
    font-size: 1.8rem;
    margin-bottom: 2rem;
}

.comment-count {
    font-size: 1.1rem;
    opacity: 0.6;
    margin-left: 0.5rem;
}

.comment-form {
    margin-bottom: 3rem;
    padding: 2rem;
}

.comment-form textarea {
    width: 100%;
    min-height: 120px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-primary);
    padding: 1.2rem;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    resize: vertical;
    margin-bottom: 1.2rem;
    outline: none;
    transition: all 0.3s;
}

.comment-form textarea:focus {
    border-color: var(--accent-gold);
    background: rgba(255, 255, 255, 0.05);
}

.login-prompt {
    padding: 2rem;
    text-align: center;
    margin-bottom: 3rem;
}

.login-prompt a {
    color: var(--accent-gold);
    font-weight: 600;
    text-decoration: none;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.comment-item {
    padding: 1.5rem;
}

.comment-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.8rem;
    font-size: 0.85rem;
}

.comment-user {
    color: var(--accent-gold);
    font-weight: 700;
}

.comment-date {
    opacity: 0.5;
}

.comment-content {
    line-height: 1.6;
    opacity: 0.9;
}

.no-comments {
    text-align: center;
    opacity: 0.5;
    padding: 2rem;
}

@media (max-width: 768px) {
    .interaction-stats {
        width: 100%;
        justify-content: center;
        margin-bottom: 1rem;
    }
    
    .interact-btn {
        flex: 1;
        justify-content: center;
    }
}

/* ----- RESPONSIVE ----- */

/* Laptops & Tablets (1024px and below) */
@media (max-width: 1024px) {
    .container { width: 92%; }
    .footer-grid { grid-template-columns: repeat(3, 1fr); }
    .about-flex { gap: 2rem; }
    .about-text h2 { font-size: 2.5rem; }
}

/* Tablets & Large Mobile (768px and below) */
@media (max-width: 768px) {
    .hero-title { font-size: 2.5rem; }
    .hero-sub { font-size: 1.1rem; }
    
    .nav-right { gap: 1rem; }
    .logo { font-size: 1.6rem; }
    
    .featured-card { flex-direction: column; }
    .featured-img { height: 300px; width: 100%; }
    
    .about-flex { flex-direction: column; text-align: center; }
    .about-decoration { display: none; } /* Hide big icon on mobile to save space */
    .cultural-badge { justify-content: center; }

    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    
    .section-title { font-size: 2.2rem; }
}

/* Mobile navigation */
@media (max-width: 768px) {
    .navbar { padding: 0.8rem 0; }
    .logo { font-size: 1.4rem; }
    
    .mobile-menu-btn { 
        display: block; 
        order: 2;
        margin-left: 12px;
    }

    .header-search { order: 1; margin-right: 0; }
    .nav-right { order: 3; }

    .nav-right {
        position: fixed;
        top: 0;
        right: 0;
        width: 100%; /* Full screen overlay for mobile menu */
        height: 100vh;
        background: var(--bg-surface);
        backdrop-filter: blur(25px);
        -webkit-backdrop-filter: blur(25px);
        display: flex; /* Changed from display:none to flex with opacity/visibility */
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 4rem 2rem;
        gap: 2.5rem;
        z-index: 1000;
        transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-20px);
    }

    .nav-right.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .theme-switcher { 
        flex-direction: row;
        background: rgba(0,0,0,0.05);
        padding: 0.5rem;
        border-radius: 50px;
    }
    
    .nav-actions { gap: 1.5rem; }
}

/* Mobile Devices (480px and below) */
@media (max-width: 480px) {
    .hero-title { font-size: 2.1rem; }
    .btn-gold { padding: 0.8rem 1.6rem; font-size: 1rem; width: 100%; text-align: center; }
    
    .card-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    
    .side-panel { width: 100%; right: -100%; }
}

/* ----- SEARCH BAR ----- */
.search-container {
    max-width: 800px;
    margin: 0 auto 3rem;
}

.search-bar {
    display: flex;
    background: var(--bg-surface);
    border: 2px solid var(--accent-gold);
    border-radius: 50px;
    padding: 0.5rem;
    box-shadow: var(--card-shadow);
}

.search-bar input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 0.5rem 1.5rem;
    font-size: 1.1rem;
    color: var(--text-primary);
    outline: none;
}

.search-bar button {
    background: var(--accent-gold);
    color: white;
    border: none;
    padding: 0.8rem 1.8rem;
    border-radius: 40px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.search-bar button:hover {
    background: var(--accent-gold-shimmer);
    transform: scale(1.05);
}

/* ---------- PREMIUM FOOTER ---------- */
.site-footer {
    position: relative;
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: 4rem 0 2rem;
    margin-top: 5rem;
    overflow: hidden;
    border-top: 1px solid var(--glass-border);
    font-family: 'Poppins', sans-serif;
}

.footer-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 5 L35 20 L50 20 L38 30 L43 45 L30 36 L17 45 L22 30 L10 20 L25 20 Z' fill='%23D4AF37' opacity='0.03'/%3E%3C/svg%3E");
    background-size: 80px 80px;
    pointer-events: none;
    z-index: 1;
    animation: movePattern 40s linear infinite;
}

@keyframes movePattern {
    from { background-position: 0 0; }
    to { background-position: 1000px 1000px; }
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2.5rem;
    position: relative;
    z-index: 2;
    margin-bottom: 3rem;
}

.footer-col {
    min-width: 0;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-radius: 24px;
    padding: 1.8rem 1.5rem;
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.footer-col:hover {
    border-color: var(--accent-gold);
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-5px);
    box-shadow: 0 15px 30px -10px rgba(0,0,0,0.3);
}

.story-text {
    font-family: 'Poppins', sans-serif;
    font-size: 1.15rem;
    line-height: 1.9;
    color: var(--text-primary);
    word-break: break-word; /* Fix for long continuous text */
    overflow-wrap: break-word;
}

.footer-logo {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--accent-gold);
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
}

.footer-description {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--footer-text);
    opacity: 0.8;
    margin-bottom: 1.2rem;
}

.cultural-quote {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1rem;
    font-style: italic;
    color: var(--accent-gold);
    border-left: 3px solid var(--accent-gold);
    padding-left: 1rem;
    margin: 1.5rem 0;
}

.footer-decor-icons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    opacity: 0.6;
}

.footer-decor-icons i {
    font-size: 1.2rem;
    color: var(--accent-gold);
    animation: floatIcon 4s ease-in-out infinite;
}

.footer-decor-icons i:nth-child(2) { animation-delay: 0.6s; }
.footer-decor-icons i:nth-child(3) { animation-delay: 1.2s; }

@keyframes floatIcon {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.footer-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    color: var(--accent-gold);
    margin-bottom: 1.2rem;
    position: relative;
    display: inline-block;
}

.footer-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    background: var(--accent-gold);
    margin-top: 0.4rem;
    transition: width 0.3s;
}

.footer-col:hover .footer-title::after {
    width: 70px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-link {
    display: inline-block;
    color: var(--footer-text);
    opacity: 0.7;
    text-decoration: none;
    font-size: 1rem;
    padding: 0.3rem 0;
    transition: all 0.2s;
    position: relative;
}

.footer-link:hover {
    color: var(--accent-gold);
    opacity: 1;
    transform: translateX(5px);
}

.newsletter-text {
    font-size: 0.95rem;
    opacity: 0.8;
    margin-bottom: 1rem;
}

.newsletter-input-group {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    align-items: stretch; /* Make them match height */
}

.newsletter-input-group input {
    flex: 1;
    padding: 0.8rem 1.2rem;
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    background: rgba(255,255,255,0.05);
    color: var(--footer-text);
    font-family: 'Poppins', sans-serif;
    outline: none;
    box-sizing: border-box; /* Ensure padding doesn't push height */
}

.footer-social {
    display: flex;
    gap: 1.2rem;
    margin-top: 1rem;
}

.social-link {
    color: var(--footer-text);
    opacity: 0.7;
    font-size: 1.4rem;
    transition: all 0.3s;
    display: inline-block;
}

.social-link:hover {
    color: var(--accent-gold);
    opacity: 1;
    transform: translateY(-5px) scale(1.1);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
    position: relative;
    z-index: 2;
}

.copyright {
    opacity: 0.6;
    font-size: 0.9rem;
    margin: 0;
}

.made-with {
    opacity: 0.5;
    font-size: 0.9rem;
}

.made-with i {
    color: #e74c3c;
    animation: heartbeat 1.5s ease infinite;
}

.footer-bottom .bottom-right { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 16px; padding-right: 48px; }
.footer-bottom-link { color: var(--text-secondary); text-decoration: none; font-size: 0.85rem; }
.footer-bottom-link:hover { color: var(--accent-gold); text-decoration: underline; }

@media (max-width: 1100px) {
    .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .site-footer { padding-right: 40px; }
}

@media (max-width: 768px) {
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }
}

/* ----- TOAST NOTIFICATIONS ----- */
#toast-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
}

.toast {
    background: var(--bg-surface);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    padding: 1rem 2rem;
    border-radius: 15px;
    margin-top: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 1rem;
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.toast.show {
    transform: translateX(0);
}

.toast-success i {
    color: #2ecc71;
}

.toast-error i {
    color: #e74c3c;
}

/* ----- STATS SECTION ----- */
.stats-section {
    padding: 4rem 0;
    margin-bottom: 3rem;
    border-radius: 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    justify-content: center;
}

.stat-icon {
    font-size: 2.5rem;
    color: var(--accent-gold);
    opacity: 0.8;
}

.stat-value {
    display: block;
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ----- TESTIMONIALS SECTION ----- */
.testimonials-section {
    padding: 6rem 0;
    background: rgba(0, 0, 0, 0.2);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
}

.testimonial-card {
    padding: 3rem 2rem 2rem;
    position: relative;
    border-radius: 20px;
}

.quote-icon {
    position: absolute;
    top: 1.5rem;
    left: 2rem;
    font-size: 1.5rem;
    color: var(--accent-gold);
    opacity: 0.3;
}

.testimonial-text {
    font-style: italic;
    line-height: 1.8;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-avatar {
    width: 45px;
    height: 45px;
    background: var(--accent-gold);
    color: var(--deep-ocean);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
}

.author-info h5 {
    margin: 0;
    font-size: 1rem;
}

.author-info p {
    margin: 0;
    font-size: 0.8rem;
    opacity: 0.5;
}

.glass-card-flat {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .stat-item {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
}

/* ----- BRAND SHOWCASE & ABOUT ----- */
.about-showcase {
    padding: 8rem 0;
    background: radial-gradient(circle at 50% 50%, rgba(212, 175, 55, 0.05) 0%, transparent 70%);
}

.about-main {
    text-align: center;
    max-width: 900px;
    margin: 0 auto 5rem;
}

.brand-ad-text {
    font-size: 1.25rem;
    line-height: 2;
    color: var(--text-primary);
    opacity: 0.85;
    font-family: 'Poppins', sans-serif;
    margin-top: 1.5rem;
    position: relative;
}

.feature-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
}

.glass-card-premium {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 30px;
    padding: 4rem 2rem;
    text-align: center;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    height: 100%;
}

.glass-card-premium::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.glass-card-premium:hover {
    transform: translateY(-15px) scale(1.02);
    border-color: var(--accent-gold);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    background: rgba(255, 255, 255, 0.05);
}

.glass-card-premium:hover::before {
    opacity: 1;
}

.feature-icon-wrapper {
    width: 90px;
    height: 90px;
    background: rgba(212, 175, 55, 0.1);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    font-size: 2.5rem;
    color: var(--accent-gold);
    transition: all 0.4s ease;
}

.glass-card-premium:hover .feature-icon-wrapper {
    transform: rotate(10deg) scale(1.1);
    background: var(--accent-gold);
    color: var(--deep-ocean);
    box-shadow: 0 0 25px rgba(212, 175, 55, 0.4);
}

.glass-card-premium h3 {
    font-size: 1.5rem;
    margin-bottom: 1.2rem;
    color: var(--accent-gold);
}

.glass-card-premium p {
    font-size: 1rem;
    line-height: 1.7;
    opacity: 0.7;
    margin: 0;
}

/* Animations */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.float-animation {
    animation: float 6s ease-in-out infinite;
}

@media (max-width: 768px) {
    .about-showcase { padding: 5rem 0; }
    .brand-ad-text { font-size: 1.1rem; }
    .glass-card-premium { padding: 3rem 1.5rem; }
}

/* ----- Featured story and compact story cards ----- */
.featured-section {
    padding: 3rem 0 1rem;
}

.featured-card {
    max-width: 760px;
    min-height: 220px;
}

.featured-img {
    flex-basis: 260px;
    height: 220px;
}

.featured-content {
    padding: 1.25rem;
}

.featured-content h3 {
    font-size: 1.35rem;
}

.featured-excerpt {
    -webkit-line-clamp: 2;
}

.card-grid:not(.mini-grid) {
    grid-template-columns: repeat(auto-fit, minmax(290px, 360px));
    justify-content: center;
    margin: 0 auto;
    gap: 2rem;
}

.card-grid:not(.mini-grid) .story-card {
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 10px 10px 12px;
    border-radius: 8px;
    border: 0;
    background: var(--card-bg);
    color: var(--text-primary);
    box-shadow: 0 16px 34px rgba(10, 38, 71, 0.14);
}

.card-grid:not(.mini-grid) .story-card:hover {
    transform: translateY(-6px);
}

.card-grid:not(.mini-grid) .card-img {
    height: auto;
    min-height: 0;
    aspect-ratio: 16 / 9;
    margin: 0;
    border-radius: 6px;
}

.card-grid:not(.mini-grid) .card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.65rem;
    padding: 1rem 1rem 0.85rem;
    flex: 1;
}

.card-grid:not(.mini-grid) .card-content h3 {
    margin: 0;
    color: var(--deep-ocean);
    font-family: 'Poppins', sans-serif;
    font-size: 1.05rem;
    font-weight: 500;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.card-grid:not(.mini-grid) .read-more {
    width: min(100%, 315px);
    min-height: 42px;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    background: var(--accent-gold);
    color: #0a2647;
    margin-top: auto;
    font-family: 'Poppins', sans-serif;
    font-size: 1.2rem;
    font-weight: 400;
    line-height: 1.2;
}

.card-grid:not(.mini-grid) .read-more:hover {
    gap: 0.3rem;
    background: var(--accent-gold-shimmer);
    color: #0a2647;
}

.stories-section > .container {
    width: min(92%, 1280px);
    max-width: 1280px;
}

.story-card-excerpt {
    max-width: 320px;
    margin: 0;
    color: #080808;
    font-size: 0.94rem;
    line-height: 1.25;
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-grid:not(.mini-grid) .social-actions {
    display: none;
}

.card-grid:not(.mini-grid) .card-overlay {
    opacity: 1;
    position: static;
    height: auto;
    background: transparent;
    padding: 0;
    align-items: center;
}

.card-grid:not(.mini-grid) .card-overlay .excerpt {
    color: var(--text-primary);
    transform: none;
    max-width: 420px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-grid:not(.mini-grid) .story-card:hover .card-img img {
    transform: scale(1.03);
}

.story-card-meta {
    background: transparent;
    flex-direction: column;
    align-items: stretch;
    color: var(--text-primary);
    margin: 0;
    padding: 0.1rem 1.15rem 0;
    border-radius: 0;
    justify-content: space-between;
    gap: 0.45rem;
    border: 0;
}

.story-author { display: flex; align-items: center; gap: 10px; padding: 10px 0 12px; min-width: 0; text-align: left; }
.story-author-details { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.story-author-name { font-size: 0.88rem; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.story-author-title { font-size: 0.76rem; line-height: 1.45; color: var(--text-secondary); overflow-wrap: anywhere; }
.story-card-actions { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--glass-border); padding-top: 8px; }
.story-author-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.story-card { position: relative; }
.story-card-link { color: inherit; text-decoration: none; }
.story-posted-date { font-size: 0.72rem; white-space: nowrap; color: var(--text-secondary); }
.story-card-actions { gap: 4px; flex-wrap: wrap; }
.story-card-actions .meta-action { min-width: 36px; padding-inline: 3px; font-size: 0.8rem; }
.story-opening { margin: 0; font-size: 0.84rem; line-height: 1.65; color: var(--text-secondary); text-align: left; width: 100%; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.story-card-link::after { content: ''; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.story-card-link:focus-visible { outline: none; }
.story-card-link:focus-visible::after { outline: 3px solid var(--accent-gold); outline-offset: 3px; }
.story-card .meta-action { position: relative; z-index: 2; }
.story-card .social-actions { z-index: 2; }

.story-author-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--accent-gold);
    color: #0a2647;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex: 0 0 auto;
}

.meta-action {
    min-width: 50px;
    min-height: 34px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 6px;
    font: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none;
}

.meta-action:hover,
.meta-action.active {
    background: var(--glass-border);
    color: var(--accent-gold);
}

.action-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid var(--glass-border);
    background: var(--bg-surface);
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
}

.action-btn:hover,
.action-btn.active {
    background: var(--accent-gold);
    color: #07101f;
    transform: translateY(-2px);
}

.story-card-meta i {
    color: inherit;
    margin-right: 0;
}

.meta-action:hover i,
.meta-action.active i {
    color: inherit;
}

.reader-submit-cta {
    margin-top: 1.5rem;
    padding: 1.2rem 1.4rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.reader-submit-cta h2 {
    font-size: 1.35rem;
    margin-bottom: 0.3rem;
}

.reader-submit-cta p {
    margin: 0;
    color: var(--text-secondary);
}

.submit-story-page {
    padding: 5rem 0;
}

.submit-story-container {
    max-width: 860px;
}

.submit-story-card {
    position: relative;
    border-radius: 8px;
    padding: 2rem;
}

.story-form-close { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; color: var(--text-primary); border: 1px solid var(--border-color); border-radius: 50%; text-decoration: none; }
.story-form-close:hover { background: var(--bg-secondary); }
.story-form-close:focus-visible { outline: 2px solid var(--accent-gold); outline-offset: 3px; }
.submit-story-copy h1 { padding-right: 32px; }

.submit-story-copy {
    margin-bottom: 1.5rem;
}

.submit-story-copy h1 {
    font-size: 2.4rem;
    margin-bottom: 0.7rem;
}

.submission-success {
    margin-top: 1rem;
    padding: 0.9rem 1rem;
    border-radius: 8px;
    background: rgba(46, 204, 113, 0.12);
    color: #2ecc71;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
}

.reader-story-form {
    display: grid;
    gap: 1rem;
}

.reader-story-form .form-row {
    display: grid;
    gap: 0.35rem;
}

.reader-story-form input,
.reader-story-form textarea {
    width: 100%;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    background: rgba(255,255,255,0.05);
    color: var(--text-primary);
    padding: 0.9rem 1rem;
    font: inherit;
}

.reader-story-form textarea {
    resize: vertical;
    min-height: 220px;
}

@media (max-width: 768px) {
    .stories-section > .container {
        width: min(94%, 1280px);
    }

    .card-grid:not(.mini-grid) .story-card {
        border-radius: 8px;
    }

    .card-grid:not(.mini-grid) .card-img {
        aspect-ratio: 16 / 9;
    }

    .card-grid:not(.mini-grid) .card-content {
        padding: 1rem;
    }

    .story-card-meta {
        padding-inline: 0.85rem;
    }

    .reader-submit-cta {
        align-items: stretch;
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .card-grid:not(.mini-grid) .card-content h3 {
        font-size: 1.05rem;
    }

    .card-grid:not(.mini-grid) .read-more {
        width: 100%;
    }

    .meta-action {
        min-width: 44px;
        font-size: 0.84rem;
    }

    .submit-story-card {
        padding: 1.2rem;
    }
}

/* Avoid continuously repainting large surfaces while the page scrolls. */
.story-featured-img.no-thumbnail { height: 48px; min-height: 0; background: transparent; box-shadow: none; }
body, .hero { background-attachment: scroll; }
.story-card.float-animation, .hero-pattern, .about-showcase::before, .about-section::before { animation: none; }
.story-card { backdrop-filter: none; -webkit-backdrop-filter: none; }
.story-embedded .glass-card { backdrop-filter: none; -webkit-backdrop-filter: none; }
.story-embedded [data-aos] { opacity: 1 !important; transform: none !important; transition: none !important; }
body.reader-open .hero-scroll-indicator,
body.reader-open .hero-scroll-indicator span::after,
body.reader-open .feature-icon-wrapper { animation-play-state: paused; }

@media (max-width: 768px), (pointer: coarse) {
    [data-aos] { opacity: 1 !important; transform: none !important; transition: none !important; }
    .glass-nav, .glass-card, .glass-card-premium, .category-badge {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
    .glass-nav { background: var(--bg-surface); }
}

@media (prefers-reduced-motion: reduce) {
    .float-animation, .feature-icon-wrapper, .hero-scroll-indicator,
    .hero-scroll-indicator span::after { animation: none; }
    [data-aos] { transition: none !important; transform: none !important; opacity: 1 !important; }
}
