/* DESIGN SYSTEM & CUSTOM TOKENS */
:root {
    /* Color Palette */
    --primary-color: #0084BD;       /* Echoes Ocean Blue */
    --primary-light: #33a3d5;
    --primary-dark: #005f88;
    --primary-rgb: 0, 132, 189;
    --accent-color: #00e5ff;        /* Electric Teal accent */
    --accent-rgb: 0, 229, 255;
    --memories-accent: #3a8cc6;     /* Muted slate blue for Memories in Dark Theme */
    --memories-accent-rgb: 58, 140, 198;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;

    /* Dark Theme Variables (Default) */
    --bg-main: #070d19;
    --bg-primary: #070d19;
    --bg-primary-rgb: 7, 13, 25;
    --bg-card: rgba(13, 25, 48, 0.75);
    --bg-card-hover: rgba(20, 38, 72, 0.85);
    --bg-navbar: rgba(7, 13, 25, 0.8);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(0, 132, 189, 0.4);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --shadow-main: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 25px rgba(0, 132, 189, 0.2);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.06);

    /* Fonts & Radii */
    --font-sans: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Light Theme Variables */
body.light-theme {
    --bg-main: #f9f8f6;
    --bg-primary: #f9f8f6;
    --bg-primary-rgb: 249, 248, 246;
    --bg-card: rgba(255, 255, 255, 0.85);
    --bg-card-hover: rgba(255, 255, 255, 0.95);
    --bg-navbar: rgba(249, 248, 246, 0.8);
    --border-color: rgba(0, 132, 189, 0.1);
    --border-hover: rgba(0, 132, 189, 0.5);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --shadow-main: 0 10px 30px -10px rgba(0, 132, 189, 0.08);
    --shadow-glow: 0 0 25px rgba(0, 132, 189, 0.1);
    --glass-bg: rgba(255, 255, 255, 0.4);
    --glass-border: rgba(0, 132, 189, 0.15);
    --memories-accent: #1e6391;     /* More muted, deeper slate blue for Light Theme contrast */
    --memories-accent-rgb: 30, 99, 145;
}

/* RESET & CORE STYLES */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.4s ease, color 0.4s ease;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.02em;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-smooth);
}

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    background: none;
    border: none;
    outline: none;
}

ul {
    list-style: none;
}

/* BACKGROUND GLOW BLOBS */
.blob-container {
    position: fixed;
    width: 100vw;
    height: 100vh;
    top: 0;
    left: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.glow-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.12;
    transition: var(--transition-smooth);
}

body.light-theme .glow-blob {
    opacity: 0.06;
}

.blob-1 {
    width: 45vw;
    height: 45vw;
    background-color: var(--primary-color);
    top: -10vw;
    right: -10vw;
    animation: floatBlob1 25s infinite alternate ease-in-out;
}

.blob-2 {
    width: 35vw;
    height: 35vw;
    background-color: var(--accent-color);
    bottom: -5vw;
    left: -5vw;
    animation: floatBlob2 20s infinite alternate ease-in-out;
}

.blob-3 {
    width: 25vw;
    height: 25vw;
    background-color: var(--primary-dark);
    top: 40%;
    left: 30%;
    animation: floatBlob3 30s infinite alternate ease-in-out;
}

@keyframes floatBlob1 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-8vw, 8vw) scale(1.1); }
}

@keyframes floatBlob2 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(8vw, -8vw) scale(1.15); }
}

@keyframes floatBlob3 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-5vw, -5vw) scale(0.9); }
}

/* CONTAINER */
.content-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 120px 24px 80px 24px;
    min-height: calc(100vh - 120px);
}

/* HELPER LAYOUT CLASSES */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

@media (max-width: 900px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .grid-2, .grid-3 {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* GRADIENTS & UTILITIES */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-light), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-icon {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

/* PREMIUM NAV BAR */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background-color: var(--bg-navbar);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition-smooth);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
}

.nav-logo-img {
    height: 50px;
    object-fit: contain;
    transition: var(--transition-smooth);
}

.logo-link:hover .nav-logo-img {
    transform: scale(1.03);
}

.nav-menu {
    display: flex;
    gap: 32px;
}

.nav-link {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    padding: 8px 0;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: var(--radius-full);
    transition: var(--transition-smooth);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* THEME TOGGLE BUTTON */
.theme-toggle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background-color: var(--glass-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.theme-toggle:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-glow);
    transform: scale(1.05);
}

.theme-toggle .moon-icon {
    display: block;
    color: #ffd54f;
    transition: var(--transition-smooth);
}

.theme-toggle .sun-icon {
    display: none;
    color: #f57c00;
    transition: var(--transition-smooth);
}

body.light-theme .theme-toggle .moon-icon {
    display: none;
}

body.light-theme .theme-toggle .sun-icon {
    display: block;
}

/* MOBILE TOGGLE BUTTON */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    cursor: pointer;
}

.mobile-menu-toggle .bar {
    width: 100%;
    height: 2px;
    background-color: var(--text-primary);
    border-radius: var(--radius-full);
    transition: var(--transition-smooth);
}

@media (max-width: 800px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav-links-wrapper {
        position: fixed;
        top: 80px;
        right: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background-color: var(--bg-main);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-left: 1px solid var(--border-color);
        transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        padding: 40px 24px;
        z-index: 99;
    }
    
    .nav-links-wrapper.open {
        right: 0;
    }
    
    .nav-menu {
        flex-direction: column;
        gap: 24px;
        align-items: center;
    }
    
    .nav-link {
        font-size: 20px;
    }

    .mobile-menu-toggle.open .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .mobile-menu-toggle.open .bar:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-toggle.open .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}

/* VIEW SECTIONS */
.view-section {
    display: none;
    animation: fadeSection 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.view-section.active {
    display: block;
}

#not-found.view-section.active {
    display: flex;
}

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

/* BUTTONS */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(var(--primary-rgb), 0.4);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-secondary {
    background-color: var(--glass-bg);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--bg-card-hover);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.btn-block {
    width: 100%;
}

.btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* HOME/HERO SECTION */
.hero-container {
    display: flex;
    align-items: center;
    gap: 48px;
    margin-bottom: 80px;
    min-height: 450px;
}

.hero-text-content {
    flex: 1.2;
}

.hero-visual-content {
    flex: 0.8;
    display: flex;
    justify-content: center;
    align-items: center;
}

@media (max-width: 850px) {
    .hero-container {
        flex-direction: column;
        text-align: center;
        gap: 40px;
    }
    .hero-visual-content {
        order: -1;
    }
}

.badge-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: var(--glass-bg);
    border: 1px solid var(--border-color);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 24px;
}

.badge-dot {
    width: 6px;
    height: 6px;
    background-color: var(--accent-color);
    border-radius: 50%;
    animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {
    0% { transform: scale(0.9); opacity: 0.5; }
    50% { transform: scale(1.3); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.5; }
}

.hero-title {
    font-size: clamp(36px, 5vw, 56px);
    line-height: 1.15;
    margin-bottom: 20px;
}

.hero-description {
    font-size: clamp(16px, 2vw, 18px);
    color: var(--text-secondary);
    margin-bottom: 36px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
}

@media (max-width: 850px) {
    .hero-buttons {
        justify-content: center;
    }
}

@media (max-width: 500px) {
    .hero-buttons {
        flex-direction: column;
    }
}

/* ECHO RADAR ILLUSTRATION (CSS ONLY) */
.echo-radar {
    position: relative;
    width: 280px;
    height: 280px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.radar-circle {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(var(--primary-rgb), 0.15);
    background-color: rgba(var(--primary-rgb), 0.01);
    animation: radarPulse 6s infinite linear;
}

.circle-1 {
    width: 100%;
    height: 100%;
    animation-delay: 0s;
}

.circle-2 {
    width: 100%;
    height: 100%;
    animation-delay: 2s;
}

.circle-3 {
    width: 100%;
    height: 100%;
    animation-delay: 4s;
}

.radar-core {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-main);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
    transition: var(--transition-smooth);
}

.radar-favicon {
    width: 64px;
    height: 64px;
    object-fit: contain;
    animation: rotateCore 20s infinite linear;
}

.echo-radar:hover .radar-core {
    transform: scale(1.08);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-glow);
}

@keyframes radarPulse {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 0.3;
    }
    100% {
        transform: scale(1.2);
        opacity: 0;
    }
}

@keyframes rotateCore {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* STATS BLOCK - REDESIGNED */
.stats-clean-row {
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 40px;
    margin: 80px 0 50px 0;
    padding: 40px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.stat-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
}

/* Subtle vertical rule between items */
.stat-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: -20px;
    top: 15%;
    height: 70%;
    width: 1px;
    background-color: var(--border-color);
}

.stat-num-val {
    font-size: clamp(44px, 6vw, 64px);
    font-weight: 800;
    line-height: 1;
    margin-bottom: 12px;
    font-family: var(--font-heading);
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-desc-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.stat-desc-label i {
    font-size: 14px;
    color: var(--primary-color);
    opacity: 0.85;
}

@media (max-width: 768px) {
    .stats-clean-row {
        flex-direction: column;
        gap: 32px;
        padding: 32px 0;
    }
    .stat-item:not(:last-child)::after {
        display: none;
    }
}

/* CMPS BANNER */
.cmps-banner {
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.05), rgba(var(--accent-rgb), 0.05));
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px 32px;
    box-shadow: var(--shadow-main);
}

.cmps-content {
    display: flex;
    align-items: center;
    gap: 24px;
}

.cmps-icon {
    font-size: 32px;
    color: var(--warning-color);
}

.cmps-text h4 {
    font-size: 18px;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.cmps-text p {
    font-size: 14px;
    color: var(--text-secondary);
}

@media (max-width: 600px) {
    .cmps-content {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
}

/* SECTION HEADER */
.section-header {
    text-align: center;
    max-width: 650px;
    margin: 0 auto 60px auto;
}

.section-title {
    font-size: clamp(28px, 4vw, 40px);
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
}

/* ABOUT SECTION - REDESIGNED */
.about-editorial-columns {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 60px;
    margin-top: 40px;
    align-items: start;
}

@media (max-width: 900px) {
    .about-editorial-columns {
        grid-template-columns: 1fr;
        gap: 48px;
    }
}

.about-column h3 {
    font-size: 26px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.about-mission-text {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.75;
    margin-bottom: 20px;
}

.highlight-quote-editorial {
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.04), rgba(var(--accent-rgb), 0.02));
    border-left: 3px solid var(--primary-color);
    padding: 28px 32px;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    margin-top: 36px;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

.quote-large-editorial {
    position: absolute;
    top: 15px;
    left: 20px;
    font-size: 40px;
    color: var(--primary-color);
    opacity: 0.08;
}

.highlight-quote-editorial p {
    font-style: italic;
    font-size: 16px;
    color: var(--text-primary);
    margin-bottom: 0;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

/* TIMELINE REDESIGNED */
.editorial-timeline {
    position: relative;
    padding-left: 56px;
}

.editorial-timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 10px;
    bottom: 10px;
    width: 2px;
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--accent-color) 100%);
    opacity: 0.3;
}

.timeline-step {
    position: relative;
    margin-bottom: 40px;
}

.timeline-step:last-child {
    margin-bottom: 0;
}

.timeline-number {
    position: absolute;
    left: -56px;
    top: -2px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background-color: var(--bg-main);
    border: 2px solid var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 15px;
    color: var(--primary-color);
    z-index: 2;
    box-shadow: var(--shadow-main);
    transition: var(--transition-smooth);
}

.timeline-step:hover .timeline-number {
    transform: scale(1.1);
    background-color: var(--primary-color);
    color: #ffffff;
    box-shadow: var(--shadow-glow);
}

.timeline-step-content h4 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.timeline-step-content p {
    font-size: 14.5px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* FOUNDERS */
.founders-section {
    margin-top: 80px;
}

.founders-title {
    font-size: 26px;
    margin-bottom: 32px;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

.founder-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    text-align: center;
    box-shadow: var(--shadow-main);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.founder-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-6px);
    box-shadow: var(--shadow-glow);
}

.founder-avatar {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-family: var(--font-heading);
    font-weight: 700;
    margin: 0 auto 20px auto;
    box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.2);
}

.founder-name {
    font-size: 18px;
    margin-bottom: 4px;
}

.founder-role {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

.founder-desc {
    font-size: 14px;
    color: var(--text-secondary);
}

/* STORIES & SEARCH */
.search-filter-container {
    margin-bottom: 48px;
}

.search-box {
    position: relative;
    max-width: 600px;
    margin: 0 auto 24px auto;
}

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-box input {
    width: 100%;
    padding: 16px 20px 16px 52px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    background-color: var(--bg-card);
    transition: var(--transition-smooth);
}

.search-box input:focus {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-glow);
}

.filter-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
}

.filter-btn {
    padding: 8px 18px;
    font-size: 14px;
    font-weight: 500;
    background-color: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.filter-btn:hover, .filter-btn.active {
    background-color: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
}

/* STORY CARDS */
.story-card {
    background-color: transparent;
    border: none;
    border-radius: 0;
    padding: 24px 0 24px 20px;
    cursor: pointer;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    position: relative;
    border-left: 3px solid var(--primary-color);
    transition: var(--transition-smooth);
    margin-bottom: 24px;
}

.story-card:last-child {
    margin-bottom: 0;
}

/* Alternate Left Border Colors Based on Category Badges */
.story-card:has(.badge-landscape) { border-left-color: #00e5ff; }
.story-card:has(.badge-history) { border-left-color: #33a3d5; }
.story-card:has(.badge-community) { border-left-color: #10b981; }
.story-card:has(.badge-wisdom) { border-left-color: #f59e0b; }

.story-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, rgba(var(--primary-rgb), 0.04) 0%, transparent 100%);
    transition: var(--transition-smooth);
    z-index: -1;
}

.story-card:hover {
    padding-left: 28px;
    border-left-width: 5px;
}

.story-card:hover::before {
    width: 100%;
}

.story-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}

.resident-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--glass-bg);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--primary-color);
    box-shadow: none;
}

.resident-meta {
    flex: 1;
}

.resident-name {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 2px;
    color: var(--text-primary);
}

.resident-age {
    font-size: 12px;
    color: var(--text-secondary);
}

.category-badge {
    padding: 4px 12px;
    font-size: 10px;
    font-weight: 700;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-landscape { background-color: rgba(0, 229, 255, 0.12); color: #00e5ff; }
.badge-history { background-color: rgba(0, 132, 189, 0.12); color: #33a3d5; }
.badge-community { background-color: rgba(16, 185, 129, 0.12); color: #10b981; }
.badge-wisdom { background-color: rgba(245, 158, 11, 0.12); color: #f59e0b; }

.story-excerpt {
    font-size: 14.5px;
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 16px;
    flex: 1;
    font-style: italic;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    overflow: hidden;
}

.story-footer {
    display: flex;
    justify-content: flex-start;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--primary-color);
}

.read-more-text {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition-smooth);
}

.story-card:hover .read-more-text {
    color: var(--primary-light);
    transform: translateX(4px);
}

/* THE BOOK SECTION (3D BOOK LAYOUT) */
.book-container-layout {
    display: flex;
    gap: 60px;
    align-items: center;
}

.book-visual-wrapper {
    flex: 0.9;
    display: flex;
    justify-content: center;
    perspective: 1000px;
}

.book-info-wrapper {
    flex: 1.1;
}

@media (max-width: 850px) {
    .book-container-layout {
        flex-direction: column;
        gap: 48px;
    }
}

.sub-badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

.book-main-title {
    font-size: 32px;
    margin-bottom: 20px;
}

.book-main-description {
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.book-features {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 32px;
}

.book-feature-item {
    display: flex;
    gap: 16px;
}

.feature-icon {
    font-size: 20px;
    color: var(--primary-color);
    margin-top: 3px;
}

.book-feature-item h5 {
    font-size: 16px;
    margin-bottom: 4px;
}

.book-feature-item p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* 3D BOOK MODEL */
.book-3d {
    position: relative;
    width: 200px;
    height: 280px;
    transform-style: preserve-3d;
    transform: rotateY(-20deg);
    transition: transform 0.5s ease-in-out;
}

.book-3d:hover {
    transform: rotateY(10deg) rotateX(5deg);
}

.book-front {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #091c35, #0084BD);
    border-radius: 4px 12px 12px 4px;
    box-shadow: 5px 5px 20px rgba(0, 0, 0, 0.4);
    z-index: 5;
    transform: translateZ(15px);
    display: flex;
    flex-direction: column;
    padding: 24px 20px;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.book-cover-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    margin-bottom: 24px;
}

.book-cover-title {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: auto;
}

.book-cover-waves {
    display: flex;
    gap: 6px;
    margin-bottom: 24px;
}

.book-cover-waves span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.4);
}

.book-cover-author {
    font-size: 11px;
    font-weight: 600;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.book-spine {
    position: absolute;
    width: 30px;
    height: 100%;
    background-color: #071527;
    z-index: 4;
    transform: rotateY(-90deg) translateZ(15px);
    border-radius: 4px 0 0 4px;
}

.book-pages {
    position: absolute;
    width: 190px;
    height: 270px;
    background-color: #f1ebd9;
    top: 5px;
    right: -2px;
    z-index: 3;
    border-radius: 0 8px 8px 0;
    box-shadow: 4px 4px 10px rgba(0,0,0,0.15);
    transform: translateZ(10px);
}

/* CHAPTER TABS */
.chapters-container {
    background-color: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 32px;
}

.chapters-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chapters-tabs {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 12px;
}

.chapter-tab-btn {
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: var(--transition-smooth);
}

.chapter-tab-btn:hover {
    color: var(--primary-color);
    background-color: var(--glass-bg);
}

.chapter-tab-btn.active {
    color: #ffffff;
    background-color: var(--primary-color);
}

.chapters-tab-content {
    min-height: 80px;
}

.chapter-content-pane {
    display: none;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    animation: fadeInTab 0.4s ease forwards;
}

.chapter-content-pane.active {
    display: block;
}

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

.book-action-buttons {
    display: flex;
    gap: 16px;
}

@media (max-width: 500px) {
    .book-action-buttons {
        flex-direction: column;
    }
}

/* TOOLKIT SECTION */
.toolkit-stepper {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-bottom: 48px;
    padding: 0 40px;
}

.stepper-progress-line {
    position: absolute;
    top: 20px;
    left: 40px;
    height: 4px;
    background-color: var(--primary-color);
    z-index: 1;
    transition: var(--transition-smooth);
}

.toolkit-stepper::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 40px;
    right: 40px;
    height: 4px;
    background-color: var(--border-color);
    z-index: 0;
}

.step-indicator {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

.step-num {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: var(--bg-main);
    border: 3px solid var(--border-color);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 16px;
    transition: var(--transition-smooth);
}

.step-label {
    margin-top: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    transition: var(--transition-smooth);
}

.step-indicator.active .step-num {
    border-color: var(--primary-color);
    background-color: var(--primary-color);
    color: #ffffff;
    box-shadow: var(--shadow-glow);
}

.step-indicator.active .step-label {
    color: var(--primary-color);
}

.step-indicator.completed .step-num {
    border-color: var(--primary-color);
    background-color: var(--bg-main);
    color: var(--primary-color);
}

@media (max-width: 600px) {
    .toolkit-stepper {
        padding: 0;
    }
    .toolkit-stepper::before, .stepper-progress-line {
        left: 20px;
        right: 20px;
    }
    .step-label {
        display: none;
    }
}

.step-details-card {
    background-color: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    min-height: 250px;
    margin-bottom: 24px;
    position: relative;
}

.step-details-content {
    display: none;
    animation: fadeStep 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.step-details-content.active {
    display: block;
}

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

.step-badge {
    display: inline-block;
    background-color: rgba(var(--primary-rgb), 0.12);
    color: var(--primary-color);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
}

.step-title {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.step-paragraph {
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.75;
    font-size: 15.5px;
}

.step-tips {
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.03), rgba(var(--accent-rgb), 0.01));
    border-left: 3px solid var(--primary-color);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    padding: 28px 32px;
    margin-top: 28px;
}

.step-tips h5 {
    font-size: 15.5px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.step-tips ul {
    list-style: none;
}

.step-tips li {
    font-size: 14.5px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    position: relative;
    padding-left: 24px;
    line-height: 1.6;
}

.step-tips li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: 700;
}

.step-tips li:last-child {
    margin-bottom: 0;
}

.stepper-nav-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-bottom: 48px;
}

/* TOOLKIT DOWNLOAD BOX */
.toolkit-download-box {
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.05), rgba(var(--accent-rgb), 0.05));
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    box-shadow: var(--shadow-main);
}

.download-text h4 {
    font-size: 18px;
    margin-bottom: 8px;
}

.download-text p {
    font-size: 14px;
    color: var(--text-secondary);
}

@media (max-width: 800px) {
    .toolkit-download-box {
        flex-direction: column;
        text-align: center;
    }
}

/* CONTACT SECTION */
.contact-info-panel {
    display: flex;
    flex-direction: column;
}

.contact-panel-title {
    font-size: 26px;
    margin-bottom: 16px;
}

.contact-panel-desc {
    color: var(--text-secondary);
    margin-bottom: 36px;
}

.contact-channels {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-channel-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition-smooth);
}

.contact-channel-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-glow);
}

.channel-icon {
    font-size: 22px;
    color: var(--primary-color);
}

.contact-channel-card h5 {
    font-size: 15px;
    margin-bottom: 2px;
}

.contact-channel-card p {
    font-size: 13px;
    color: var(--text-secondary);
}

.contact-channel-card p a {
    color: var(--primary-color);
}

.contact-channel-card p a:hover {
    text-decoration: underline;
}

/* CONTACT FORM */
/* CONTACT FORM REDESIGNED */
.contact-form-card {
    background-color: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
}

.form-title {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 32px;
    color: var(--text-primary);
}

.form-group {
    position: relative;
    margin-bottom: 32px;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 12px 0;
    border-radius: 0;
    border: none;
    border-bottom: 2px solid var(--border-color);
    background-color: transparent;
    color: var(--text-primary);
    transition: var(--transition-smooth);
    font-size: 15px;
}

.form-group label {
    position: absolute;
    left: 0;
    top: 12px;
    color: var(--text-muted);
    pointer-events: none;
    transition: var(--transition-smooth);
    font-size: 14.5px;
}

/* Floating Label Animation */
.form-group input:focus ~ label,
.form-group input:not(:placeholder-shown) ~ label,
.form-group textarea:focus ~ label,
.form-group textarea:not(:placeholder-shown) ~ label {
    top: -16px;
    left: 0;
    font-size: 11.5px;
    padding: 0;
    background-color: transparent;
    color: var(--primary-color);
    border-radius: 0;
}

/* Dropdown/Select adjustments */
.form-group select {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.form-group select ~ .select-label {
    top: 12px;
    transition: var(--transition-smooth);
}

.form-group select:focus ~ .select-label,
.form-group select:valid ~ .select-label {
    top: -16px;
    left: 0;
    font-size: 11.5px;
    padding: 0;
    background-color: transparent;
    color: var(--primary-color);
    border-radius: 0;
}

/* Input validation states */
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-bottom-color: var(--primary-color);
}

.form-group.invalid input, .form-group.invalid select, .form-group.invalid textarea {
    border-bottom-color: var(--error-color);
}

.form-group.invalid label {
    color: var(--error-color);
}

.error-msg {
    display: none;
    color: var(--error-color);
    font-size: 11px;
    font-weight: 600;
    margin-top: 6px;
}

.form-group.invalid .error-msg {
    display: block;
}

/* TOAST NOTIFICATION */
.toast-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    transform: translateY(20px);
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast-container.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.toast-card {
    background-color: #10b981;
    color: #ffffff;
    border-radius: var(--radius-md);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
}

.toast-icon {
    font-size: 24px;
}

.toast-message h5 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 2px;
}

.toast-message p {
    font-size: 13px;
    opacity: 0.9;
}

/* MODAL / BACKDROP */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 200;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 680px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-main);
    transform: scale(0.95);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-content.modal-sm {
    max-width: 420px;
}

.modal-backdrop.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 28px;
    line-height: 1;
    color: var(--text-secondary);
    cursor: pointer;
    z-index: 10;
    transition: var(--transition-smooth);
}

.modal-close:hover {
    color: var(--primary-color);
    transform: rotate(90deg);
}

.modal-body {
    padding: 40px;
}

.text-center {
    text-align: center;
}

.text-success { color: var(--success-color); }
.text-large { font-size: 48px; margin-bottom: 16px; display: inline-block; }
.modal-action-title { font-size: 22px; margin-bottom: 8px; }

/* MODAL INTERVIEW CONTENT */
.modal-story-title {
    font-size: clamp(20px, 3.5vw, 28px);
    margin-bottom: 8px;
}

.modal-story-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
}

.modal-quote-box {
    background-color: var(--glass-bg);
    border-left: 4px solid var(--primary-color);
    padding: 24px;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    margin-bottom: 28px;
    position: relative;
}

.modal-quote-box p {
    font-style: italic;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.6;
    color: var(--text-primary);
}

.modal-full-text h5 {
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary-color);
    margin-bottom: 12px;
}

.modal-full-text p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 16px;
}

.modal-full-text p:last-child {
    margin-bottom: 0;
}

/* FOOTER STYLES */
.footer-bar {
    background-color: #040912;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    transition: var(--transition-smooth);
}

body.light-theme .footer-bar {
    background-color: #e2e8f0;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 24px;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1.5fr;
    gap: 48px;
}

@media (max-width: 800px) {
    .footer-container {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

.footer-logo {
    height: 50px;
    object-fit: contain;
    margin-bottom: 16px;
}

.footer-tagline {
    font-size: 13px;
}

.footer-container h5 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a:hover {
    color: var(--primary-color);
    padding-left: 4px;
}

.footer-meta-block p {
    font-size: 13px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.social-icons {
    display: flex;
    gap: 12px;
}

.social-icons a {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.05);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--text-secondary);
}

body.light-theme .social-icons a {
    background-color: rgba(0,0,0,0.05);
}

.social-icons a:hover {
    color: #ffffff;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
    border-top: 1px solid rgba(255,255,255,0.04);
    text-align: center;
    font-size: 12px;
}

body.light-theme .footer-bottom {
    border-top-color: rgba(0,0,0,0.04);
}

/* DROPDOWN MENU */
.nav-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    min-width: 160px;
    padding: 8px 0;
    box-shadow: var(--shadow-main);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: var(--transition-smooth);
    z-index: 100;
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.dropdown-menu.dropdown-menu-right {
    left: auto;
    right: 0;
    transform: translateX(0) translateY(10px);
}

.nav-dropdown:hover .dropdown-menu.dropdown-menu-right {
    transform: translateX(0) translateY(0);
}

.dropdown-item {
    display: block;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition-smooth);
}

.dropdown-item:hover, .dropdown-item.active {
    color: var(--primary-color);
    background-color: rgba(var(--primary-rgb), 0.05);
}

.dropdown-icon {
    font-size: 10px;
    margin-left: 4px;
    transition: var(--transition-smooth);
}

.nav-dropdown:hover .dropdown-icon {
    transform: rotate(180deg);
}

/* CHAPTER NEEDHAM LAYOUT */
.chapter-content-grid {
    margin-top: 20px;
}

.chapter-stories-card, .chapter-publication-card {
    background-color: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    display: flex;
    flex-direction: column;
}

.card-box-title {
    font-size: 22px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.card-box-desc {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 24px;
}

.stories-list-vertical {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.chapter-book-showcase {
    display: flex;
    gap: 24px;
    align-items: center;
    background-color: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 24px;
    border-radius: var(--radius-md);
    margin-top: auto;
}

@media (max-width: 500px) {
    .chapter-book-showcase {
        flex-direction: column;
        text-align: center;
    }
}

.book-mini-cover {
    flex-shrink: 0;
    width: 100px;
    height: 145px;
    border-radius: 4px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    transition: transform 0.1s ease-out, box-shadow 0.3s ease;
    transform-style: preserve-3d;
    transform: perspective(1000px) rotateX(0deg) rotateY(0deg) scale(1);
}

.book-mini-cover:hover {
    box-shadow: 0 12px 25px rgba(0, 132, 189, 0.25);
}

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

.book-mini-info h4 {
    font-size: 16px;
    margin-bottom: 4px;
}

.book-mini-authors {
    display: block;
    font-size: 12px;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.book-mini-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 16px;
}

.btn-sm-block {
    padding: 8px 16px;
    font-size: 13px;
}

/* PUBLICATIONS SECTION */
.publications-showcase-grid {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.publication-detailed-card {
    display: flex;
    background-color: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
    max-width: 950px;
    width: 100%;
    gap: 48px;
    align-items: center;
}

@media (max-width: 768px) {
    .publication-detailed-card {
        flex-direction: column;
        gap: 32px;
    }
}

.pub-cover-wrapper {
    flex: 0.85;
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.08), rgba(var(--accent-rgb), 0.03));
    border-radius: var(--radius-lg);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 48px;
    border: 1px solid var(--border-color);
    perspective: 1000px;
    width: 100%;
}
.pub-amazon-cover-art {
    width: 160px;
    height: 240px;
    border-radius: 6px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    transition: transform 0.1s ease-out, box-shadow 0.3s ease;
    transform-style: preserve-3d;
    transform: perspective(1000px) rotateX(0deg) rotateY(0deg) scale(1);
}

.pub-amazon-cover-art:hover {
    box-shadow: 0 20px 40px rgba(0, 132, 189, 0.3);
}

.pub-amazon-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pub-details-wrapper {
    flex: 1.2;
    padding: 40px;
}

.pub-badge-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    color: var(--primary-color);
    background-color: rgba(var(--primary-rgb), 0.15);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    margin-bottom: 16px;
}

.pub-badge-chapter {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    color: var(--primary-color);
    background-color: rgba(var(--primary-rgb), 0.15);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    margin-bottom: 16px;
    margin-left: 8px;
}

.pub-title {
    font-size: 26px;
    margin-bottom: 4px;
}

.pub-authors {
    display: block;
    font-size: 14px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.pub-description {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.6;
}

.pub-meta-list {
    margin: 24px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.meta-item {
    display: flex;
    font-size: 13px;
}

.meta-label {
    font-weight: 700;
    color: var(--text-primary);
    width: 100px;
}

.meta-val {
    color: var(--text-secondary);
}

.pub-action-buttons {
    margin-top: 24px;
}

/* MEMORIES SECTION */
.memories-showcase-grid {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.memories-detailed-card {
    display: flex;
    background-color: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
    max-width: 1000px;
    width: 100%;
    gap: 48px;
    align-items: center;
}

@media (max-width: 768px) {
    .memories-detailed-card {
        flex-direction: column;
        gap: 32px;
    }
}

.memories-visual-wrapper {
    flex: 1;
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.08), rgba(var(--memories-accent-rgb), 0.03));
    border-radius: var(--radius-lg);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    border: 1px solid var(--border-color);
    width: 100%;
}

.browser-mockup {
    width: 100%;
    max-width: 380px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-main);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.browser-header {
    background-color: var(--glass-bg);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 8px 12px;
    gap: 16px;
}

.browser-dots {
    display: flex;
    gap: 5px;
    flex-shrink: 0;
}

.browser-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: var(--radius-full);
}

.browser-dots .dot.red { background-color: #ff5f56; }
.browser-dots .dot.yellow { background-color: #ffbd2e; }
.browser-dots .dot.green { background-color: #27c93f; }

.browser-address {
    flex: 1;
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 10px;
    font-family: monospace;
    color: var(--text-secondary);
    text-align: center;
    padding: 2px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.browser-content {
    background-color: var(--bg-main);
    height: 250px;
    position: relative;
}

.map-mockup-workspace {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    /* Grid background representing map grid */
    background-size: 16px 16px;
    background-image: linear-gradient(to right, rgba(0, 132, 189, 0.03) 1px, transparent 1px),
                      linear-gradient(to bottom, rgba(0, 132, 189, 0.03) 1px, transparent 1px);
    background-color: var(--bg-main);
}

.map-grid-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.road-dash {
    animation: roadFlow 30s linear infinite;
}

@keyframes roadFlow {
    to {
        stroke-dashoffset: -100;
    }
}

.map-pin {
    position: absolute;
    z-index: 2;
    color: var(--primary-color);
    font-size: 20px;
    cursor: pointer;
    transform: translate(-50%, -100%);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    transition: transform 0.2s ease;
}

.map-pin.active {
    color: var(--primary-light);
}

.map-pin:hover {
    transform: translate(-50%, -100%) scale(1.2);
}

.map-pin.pin-1 { top: 110px; left: 180px; }
.map-pin.pin-2 { top: 75px; left: 290px; }
.map-pin.pin-3 { top: 215px; left: 95px; }

.pin-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    border-radius: var(--radius-full);
    background-color: rgba(0, 132, 189, 0.15);
    transform: translate(-50%, -50%) scale(0.5);
    z-index: -1;
    pointer-events: none;
}

.map-pin.active .pin-pulse {
    background-color: rgba(0, 132, 189, 0.2);
    animation: pinPulseRing 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pinPulseRing {
    0% {
        transform: translate(-50%, -50%) scale(0.4);
        opacity: 0.8;
    }
    100% {
        transform: translate(-50%, -50%) scale(2);
        opacity: 0;
    }
}

.floating-memory-card {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 200px;
    background-color: var(--bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 10px;
    box-shadow: var(--shadow-main);
    z-index: 3;
    pointer-events: none;
    animation: floatCard 6s ease-in-out infinite;
}

@keyframes floatCard {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

.memory-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.memory-tag {
    font-size: 8px;
    font-weight: 700;
    color: var(--primary-color);
    background-color: rgba(0, 132, 189, 0.1);
    padding: 2px 6px;
    border-radius: var(--radius-full);
    text-transform: uppercase;
}

.memory-location {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    font-family: 'Outfit', sans-serif;
}

.memory-excerpt {
    font-size: 9.5px;
    color: var(--text-secondary);
    margin: 0 0 6px 0;
    line-height: 1.4;
    font-style: italic;
}

.memory-author {
    font-size: 8px;
    font-weight: 500;
    color: var(--text-muted);
}

.mini-timeline-mockup {
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 6px 10px;
    z-index: 3;
}

.timeline-track {
    height: 3px;
    background-color: var(--border-color);
    border-radius: var(--radius-full);
    position: relative;
    margin-bottom: 4px;
}

.timeline-track::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 35%;
    background-color: var(--primary-color);
    border-radius: var(--radius-full);
}

.timeline-ticks {
    display: flex;
    justify-content: space-between;
}

.timeline-ticks .tick {
    font-size: 8px;
    color: var(--text-muted);
    font-weight: 600;
}

.timeline-ticks .tick.active {
    color: var(--primary-color);
    font-weight: 700;
}

.memories-details-wrapper {
    flex: 1.2;
    padding: 40px;
}

@media (max-width: 500px) {
    .memories-details-wrapper {
        padding: 24px;
    }
}

.memories-badge-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    color: var(--primary-color);
    background-color: rgba(var(--primary-rgb), 0.15);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    margin-bottom: 16px;
}

.memories-title {
    font-size: 26px;
    margin-bottom: 4px;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: var(--text-primary);
}

.memories-subtitle {
    display: block;
    font-size: 14px;
    color: var(--primary-color);
    margin-bottom: 20px;
    font-weight: 600;
}

.memories-description {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.6;
}

.memories-features-list {
    margin: 28px 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.m-feature-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.m-feature-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-md);
    background-color: rgba(0, 132, 189, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 16px;
    flex-shrink: 0;
}

.m-feature-text h5 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 4px 0;
    font-family: 'Outfit', sans-serif;
}

.m-feature-text p {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.4;
}

.memories-action-buttons {
    margin-top: 24px;
}

/* DONATE SECTION */
.donate-grid {
    margin-top: 30px;
    align-items: flex-start;
}

.giving-channels-panel {
    display: flex;
    flex-direction: column;
}

.panel-inner-title {
    font-size: 20px;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 0;
    margin-bottom: 8px;
}

.panel-inner-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-top: 0;
    margin-bottom: 24px;
}

.giving-cards-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.giving-channel-card {
    display: flex;
    gap: 24px;
    padding: 24px 0;
    background-color: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    align-items: flex-start;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition-smooth);
}

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

.channel-icon-box {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background-color: rgba(0, 132, 189, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 20px;
    flex-shrink: 0;
}

.channel-details {
    flex: 1;
}

.channel-details h4 {
    font-size: 16px;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 0;
    margin-bottom: 6px;
}

.channel-details p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-top: 0;
    margin-bottom: 12px;
}

.address-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 16px;
    background-color: var(--bg-main);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-primary);
    font-family: monospace;
}

.digital-handles-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.handle-item {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    padding: 8px 12px;
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
}

.handle-platform {
    font-weight: 600;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 6px;
}

.handle-name {
    color: var(--text-primary);
    font-family: monospace;
}

.direct-donation-panel {
    padding: 24px 0 0 0;
    background-color: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

.preset-amounts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(65px, 1fr));
    gap: 10px;
}

.preset-amount-btn {
    padding: 10px 14px;
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.preset-amount-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background-color: rgba(0, 132, 189, 0.05);
}

.preset-amount-btn.active {
    border-color: var(--primary-color);
    color: #ffffff;
    background-color: var(--primary-color);
    box-shadow: 0 4px 10px rgba(0, 132, 189, 0.2);
}

/* MERCH STORE SECTION */
.merch-showcase-container {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.merch-coming-soon-card {
    display: flex;
    background-color: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
    max-width: 1000px;
    width: 100%;
    gap: 48px;
    align-items: center;
}

@media (max-width: 768px) {
    .merch-coming-soon-card {
        flex-direction: column;
        gap: 32px;
    }
}

.merch-artwork-box {
    flex: 1;
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.08), rgba(var(--accent-rgb), 0.03));
    border-radius: var(--radius-lg);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    border: 1px solid var(--border-color);
    width: 100%;
}

.merch-mockups-showcase {
    position: relative;
    width: 260px;
    height: 180px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.merch-svg {
    position: absolute;
    width: 120px;
    height: 120px;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.1));
    transition: transform 0.4s ease;
}

.mug-svg {
    transform: translate(-45px, 20px) rotate(-10deg) scale(0.95);
    z-index: 1;
}

.shirt-svg {
    transform: translate(35px, -15px) rotate(8deg) scale(1.05);
    z-index: 2;
}

.merch-coming-soon-card:hover .mug-svg {
    transform: translate(-55px, 25px) rotate(-15deg) scale(0.95);
}

.merch-coming-soon-card:hover .shirt-svg {
    transform: translate(45px, -20px) rotate(12deg) scale(1.05);
}

.mug-body, .mug-handle, .shirt-body {
    stroke: var(--primary-color);
    stroke-linecap: round;
    stroke-linejoin: round;
}

.merch-coming-soon-details {
    flex: 1.2;
    padding: 40px;
}

@media (max-width: 500px) {
    .merch-coming-soon-details {
        padding: 24px;
    }
}

.merch-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    color: var(--primary-color);
    background-color: rgba(var(--primary-rgb), 0.15);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    margin-bottom: 16px;
}

.merch-coming-soon-details h3 {
    font-size: 24px;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 0;
    margin-bottom: 12px;
}

.merch-coming-soon-details p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-top: 0;
    margin-bottom: 16px;
}

.merch-disclaimer {
    font-size: 13px !important;
    color: var(--text-muted) !important;
}

.fourthwall-placeholder {
    margin-top: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 2px dashed rgba(var(--primary-rgb), 0.2);
    border-radius: var(--radius-md);
    background-color: rgba(var(--primary-rgb), 0.02);
    padding: 20px;
    color: var(--text-secondary);
    transition: var(--transition-smooth);
}

.fourthwall-placeholder:hover {
    border-color: var(--primary-color);
    background-color: rgba(var(--primary-rgb), 0.05);
}

.placeholder-icon {
    font-size: 18px;
    color: var(--primary-color);
}

.placeholder-label {
    font-family: monospace;
    font-size: 12px;
    font-weight: 600;
}

/* CENTERED SPLASH TEXT */
.centered-splash {
    text-align: center;
    margin: 0 auto 55px auto !important;
    max-width: 700px;
    font-size: 16px;
    color: var(--text-secondary);
}

/* FOUNDER BIO HOVER OVERLAYS */
/* Redefined image container with thin outline */
.founder-image-container {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 20px auto;
    box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.2);
    transition: var(--transition-smooth);
}

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

.founder-card:hover .founder-image-container {
    transform: scale(1.05);
}

.founder-bio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.76);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    transform: translateY(15px);
    transition: var(--transition-smooth);
    pointer-events: none;
    z-index: 10;
    overflow-y: auto;
}

/* Custom premium scrollbar for the bio overlay */
.founder-bio-overlay::-webkit-scrollbar {
    width: 4px;
}
.founder-bio-overlay::-webkit-scrollbar-track {
    background: transparent;
}
.founder-bio-overlay::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.25);
    border-radius: 2px;
}

.founder-card:hover .founder-bio-overlay {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.founder-bio-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.founder-bio-text {
    font-size: 13.5px;
    color: #ffffff;
    font-weight: 500;
    line-height: 1.6;
    text-align: center;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.founder-quote {
    border-left: 3px solid var(--primary-color);
    padding: 2px 0 2px 12px;
    margin: 12px 0 0 0;
    font-style: italic;
    font-size: 12px;
    color: #e2e8f0;
    line-height: 1.5;
    text-align: left;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* SUB-TEAM SPLIT HEADERS */
.sub-team-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 22px;
    color: var(--primary-color);
    margin: 40px auto 24px auto;
    text-align: center;
    position: relative;
    display: block;
    width: fit-content;
}

.sub-team-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    background-color: var(--accent-color);
    margin: 8px auto 0 auto;
    border-radius: var(--radius-full);
}

.chapters-sub-title {
    margin-top: 60px;
}

/* CHAPTER HOVER EXPANDING PANELS */
/* CHAPTER HOVER EXPANDING PANELS - REDESIGNED LIKE STORIES */
.chapters-hover-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 750px;
    margin: 0 auto;
}

.chapter-hover-panel {
    background-color: transparent;
    border: none;
    border-radius: 0;
    padding: 16px 0 16px 20px;
    transition: var(--transition-smooth);
    cursor: pointer;
    box-shadow: none;
    overflow: hidden;
    border-left: 3px solid var(--primary-color);
    position: relative;
}

.chapter-hover-panel::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, rgba(var(--primary-rgb), 0.04) 0%, transparent 100%);
    transition: var(--transition-smooth);
    z-index: -1;
}

.chapter-hover-panel:hover {
    padding-left: 28px;
    border-left-width: 5px;
}

.chapter-hover-panel:hover::before {
    width: 100%;
}

/* Even-child chapter hover panels use the muted blue memories theme */
.chapter-hover-panel:nth-child(even) {
    border-left-color: var(--memories-accent);
}

.chapter-hover-panel:nth-child(even)::before {
    background: linear-gradient(90deg, rgba(var(--memories-accent-rgb), 0.04) 0%, transparent 100%);
}

.chapter-hover-panel:nth-child(even) .panel-badge {
    color: var(--memories-accent);
    background-color: rgba(var(--memories-accent-rgb), 0.12);
}

.chapter-hover-panel:nth-child(even) .panel-action-block a {
    color: var(--memories-accent);
}

.chapter-hover-panel:nth-child(even):hover .panel-action-block a {
    color: var(--memories-accent);
    opacity: 0.8;
}

.panel-collapsed-view {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-badge {
    font-size: 10px;
    font-weight: 700;
    color: var(--primary-color);
    background-color: rgba(var(--primary-rgb), 0.12);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-block;
    margin-bottom: 6px;
}

.panel-title-text {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
}

.panel-arrow-icon {
    font-size: 14px;
    color: var(--text-secondary);
    transition: var(--transition-smooth);
}

.panel-expanded-content {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: var(--transition-smooth);
    margin-top: 0;
}

.panel-expanded-content p {
    font-size: 14.5px;
    color: var(--text-secondary);
    line-height: 1.65;
    font-style: italic;
    margin-bottom: 12px;
}

.chapter-hover-panel:hover .panel-expanded-content {
    max-height: 200px;
    opacity: 1;
    margin-top: 16px;
}

.chapter-hover-panel:hover .panel-arrow-icon {
    transform: rotate(90deg);
    color: var(--primary-color);
}

.panel-action-block {
    margin-top: 16px;
}

.panel-action-block a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--primary-color);
    transition: var(--transition-smooth);
    background: transparent;
    border: none;
    padding: 0;
    box-shadow: none;
}

.panel-action-block a::after {
    display: none;
}

.chapter-hover-panel:hover .panel-action-block a {
    color: var(--primary-light);
    transform: translateX(4px);
}

/* GENERAL ECHOES DIRECTORY */
/* ACTIVE ECHOES CHAPTER DIRECTORY - REDESIGNED */
.echo-chapters-directory {
    display: flex;
    flex-direction: column;
    gap: 40px;
    margin-top: 40px;
}

.echo-chapter-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(90deg, rgba(var(--primary-rgb), 0.03) 0%, transparent 100%);
    border-left: 4px solid var(--primary-color);
    padding: 40px;
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    transition: var(--transition-smooth);
    gap: 48px;
}

.echo-chapter-row:hover {
    background: linear-gradient(90deg, rgba(var(--primary-rgb), 0.06) 0%, rgba(var(--primary-rgb), 0.01) 100%);
    transform: translateX(6px);
}

.echo-chapter-row:nth-child(even) {
    border-left-color: var(--memories-accent);
    background: linear-gradient(90deg, rgba(var(--memories-accent-rgb), 0.03) 0%, transparent 100%);
}

.echo-chapter-row:nth-child(even):hover {
    background: linear-gradient(90deg, rgba(var(--memories-accent-rgb), 0.06) 0%, rgba(var(--memories-accent-rgb), 0.01) 100%);
}

.chapter-row-info {
    flex: 1.3;
}

.chapter-row-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary-color);
    margin-bottom: 12px;
}

.echo-chapter-row:nth-child(even) .chapter-row-badge {
    color: var(--memories-accent);
}

.chapter-row-name {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.chapter-row-desc {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
    max-width: 650px;
}

.chapter-row-stats-and-action {
    flex: 0.7;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
}

.chapter-row-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.chapter-stat-badge-new {
    background-color: var(--glass-bg);
    border: 1px solid var(--border-color);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-smooth);
}

.chapter-stat-badge-new i {
    color: var(--primary-color);
}

.echo-chapter-row:nth-child(even) .chapter-stat-badge-new i {
    color: var(--memories-accent);
}

@media (max-width: 900px) {
    .echo-chapter-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 32px;
        padding: 32px 24px;
    }
    
    .chapter-row-stats-and-action {
        width: 100%;
    }
}

/* BACK BUTTON ALIGNMENTS */
.section-back-wrapper {
    margin-bottom: 24px;
}

.btn-back {
    padding: 10px 20px;
    font-size: 14px;
}

/* COMPACT PUBLICATIONS PANEL IN CHAPTER VIEW */
.compact-pub-card {
    padding: 32px !important;
    min-height: auto !important;
}

.compact-book-showcase {
    padding: 16px !important;
    margin-top: 12px !important;
    gap: 20px !important;
}

.compact-book-showcase .book-mini-desc {
    margin-bottom: 12px !important;
}

.stories-more-btn-wrapper {
    display: flex;
    justify-content: flex-end;
    margin-top: 24px;
}

/* CHAPTER LOGO HEADER & THEME TOGGLE SUPPORT */
.chapter-logo-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 16px;
}

.chapter-title-logo {
    max-width: 280px;
    width: 100%;
    height: auto;
    display: block;
}

body.light-theme .logo-dark-only {
    display: none !important;
}
body.light-theme .logo-light-only {
    display: block !important;
}
body.dark-theme .logo-light-only {
    display: none !important;
}
body.dark-theme .logo-dark-only {
    display: block !important;
}

/* EDITORIAL MINIMAL YOUTUBE BADGE (NON-AI BRANDED TEXT LINK) */
.youtube-badge-container {
    display: flex;
    justify-content: center;
    margin-top: 18px;
    margin-bottom: 6px;
}

.youtube-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--border-color);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 12.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    transition: var(--transition-smooth);
}

.youtube-badge:hover {
    color: var(--text-primary);
    border-bottom-color: #ff0000;
}

.youtube-badge i {
    color: var(--text-muted);
    font-size: 15px;
    transition: var(--transition-smooth);
}

.youtube-badge:hover i {
    color: #ff0000;
    transform: scale(1.1);
}

.youtube-badge .youtube-brand {
    font-weight: 800;
    transition: var(--transition-smooth);
}

.youtube-badge:hover .youtube-brand {
    color: #ff0000;
}

.youtube-badge .youtube-handle {
    opacity: 0.55;
    font-size: 11px;
    text-transform: none;
    letter-spacing: 0;
    margin-left: 2px;
}


/* ECHO PHOTOS PANEL (EDITORIAL POLAROID ART-ALBUM STYLE) */
.chapter-gallery-card {
    background-color: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    margin-top: 56px;
    transition: var(--transition-smooth);
}

.gallery-grid-mosaic {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 28px;
}

@media (max-width: 900px) {
    .gallery-grid-mosaic {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 500px) {
    .gallery-grid-mosaic {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Polaroid Matte Frame (Organic, Album Scrapbook Effect) */
.gallery-item {
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    padding: 12px 12px 20px 12px;
    border-radius: 4px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gallery-item:hover {
    transform: translateY(-5px) rotate(1deg); /* Subtle organic human-placed tilt */
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
    border-color: var(--primary-light);
}

.gallery-item:nth-child(even):hover {
    transform: translateY(-5px) rotate(-1.2deg); /* Alternate tilt for natural scrapbook effect */
}

.gallery-img-wrapper {
    position: relative;
    border-radius: 2px;
    overflow: hidden;
    aspect-ratio: 4/3;
    border: 1px solid var(--border-color);
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-item:hover .gallery-img {
    transform: scale(1.05);
}

/* Elegant editorial caption beneath the photo frame instead of pop-up overlay */
.gallery-caption {
    font-size: 13px;
    line-height: 1.45;
    color: var(--text-secondary);
    text-align: center;
    font-style: italic;
    border-top: 1px dashed var(--border-color);
    padding-top: 10px;
    transition: var(--transition-smooth);
}

.gallery-item:hover .gallery-caption {
    color: var(--primary-color);
}

/* Sleek minimalist divider credit line at the bottom */
.gallery-credit-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 36px;
    font-size: 13px;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    padding-top: 24px;
    width: 100%;
}

.gallery-credit-banner i {
    font-size: 14px;
    color: var(--primary-color);
    opacity: 0.8;
}

.gallery-credit-banner strong {
    color: var(--text-secondary);
}

.gallery-credit-banner em {
    color: var(--text-secondary);
    font-style: normal;
}

/* HOME SECTION LEGACY STYLES */
.legacy-editorial-block {
    margin-top: 0;
    padding-top: 40px;
}

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

.legacy-pretitle {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.legacy-title {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
    position: relative;
    display: inline-block;
}

.legacy-divider {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    margin: 16px auto 0 auto;
    border-radius: var(--radius-full);
}

.legacy-content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.legacy-column {
    display: flex;
    flex-direction: column;
}

.legacy-badge-year, .legacy-badge-rebrand {
    display: inline-block;
    align-self: flex-start;
    font-size: 10px;
    font-weight: 700;
    color: var(--primary-color);
    background-color: rgba(var(--primary-rgb), 0.1);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 16px;
}

.legacy-badge-rebrand {
    color: var(--memories-accent);
    background-color: rgba(var(--memories-accent-rgb), 0.1);
}

.legacy-subtitle {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
    font-family: var(--font-heading);
}

.legacy-text {
    font-size: 14.5px;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.legacy-text strong {
    color: var(--text-primary);
}

@media (max-width: 768px) {
    .legacy-content-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .legacy-editorial-block {
        margin-top: 60px;
        padding-top: 40px;
    }
}

/* DASHBOARD PANES & STYLES */
.dashboard-pane {
    display: none;
    animation: fadeIn 0.4s ease;
}

.dashboard-pane.active {
    display: block;
}

.inbox-records-list {
    display: flex;
    flex-direction: column;
    background-color: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.inbox-record-item {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.inbox-record-item:last-child {
    border-bottom: none;
}

.inbox-record-item:hover {
    background-color: rgba(var(--primary-rgb), 0.02);
}

.record-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.record-meta-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.record-type-badge {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 4px 12px;
    border-radius: var(--radius-full);
}

.record-type-badge.application {
    color: var(--primary-color);
    background-color: rgba(var(--primary-rgb), 0.1);
}

.record-type-badge.toolkit {
    color: var(--memories-accent);
    background-color: rgba(var(--memories-accent-rgb), 0.1);
}

.record-type-badge.contact {
    color: #10b981;
    background-color: rgba(16, 185, 129, 0.1);
}

.record-title-text {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
}

.record-date {
    font-size: 12px;
    color: var(--text-muted);
}

.record-body-text {
    font-size: 13.5px;
    color: var(--text-secondary);
    line-height: 1.6;
    background-color: rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-color);
    padding: 16px;
    border-radius: var(--radius-md);
    margin: 0;
}

body.light-theme .record-body-text {
    background-color: rgba(255, 255, 255, 0.5);
}

.record-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    font-size: 13px;
    color: var(--text-secondary);
}

.record-detail-field strong {
    color: var(--text-primary);
}

/* User Account Row */
.user-record-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition-smooth);
    gap: 16px;
    flex-wrap: wrap;
}

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

.user-record-row:hover {
    background-color: rgba(var(--primary-rgb), 0.02);
}

.user-info-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.user-email-text {
    font-size: 14.5px;
    font-weight: 800;
    color: var(--text-primary);
}

.user-role-meta {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.user-role-badge {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.user-role-badge.executive {
    color: var(--primary-color);
    background-color: rgba(var(--primary-rgb), 0.1);
}

.user-role-badge.chapter {
    color: var(--memories-accent);
    background-color: rgba(var(--memories-accent-rgb), 0.1);
}

.user-actions-btn-group {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.user-role-select {
    font-size: 12px;
    padding: 6px 12px;
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    cursor: pointer;
    outline: none;
    transition: var(--transition-smooth);
}

.user-role-select:focus {
    border-color: var(--primary-color);
}

/* Discord-style Hover Roles Dropdown Panel */
#users-records-list {
    overflow: visible !important;
}

.user-roles-dropdown-wrapper {
    position: relative;
    display: inline-block;
}

.user-roles-dropdown-panel {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    z-index: 1050;
    min-width: 240px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    flex-direction: column;
    gap: 8px;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.user-roles-dropdown-wrapper:hover .user-roles-dropdown-panel,
.user-roles-dropdown-panel:hover {
    display: flex;
}


.inbox-empty-state {
    padding: 40px;
    text-align: center;
    color: var(--text-muted);
}

.inbox-empty-state i {
    font-size: 32px;
    margin-bottom: 12px;
    color: var(--border-hover);
}

/* ==========================================
   ENHANCED PLATFORM STYLES (COMPLETED DELIVERIES, ROLES & MESSAGES)
   ========================================== */

/* Completed Delivery Items */
.inbox-record-item.completed {
    opacity: 0.65;
    background-color: rgba(var(--primary-rgb), 0.01);
}

.inbox-record-item.completed .record-title-text {
    text-decoration: line-through;
    color: var(--text-muted);
}

/* Delivery Item Actions */
.record-actions-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn-action-icon {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-action-icon:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background-color: rgba(var(--primary-rgb), 0.05);
}

.btn-action-icon.complete-btn.active {
    border-color: #10b981;
    color: #10b981;
    background-color: rgba(16, 185, 129, 0.05);
}

.btn-action-icon.delete-btn:hover {
    border-color: var(--error-color);
    color: var(--error-color);
    background-color: rgba(239, 68, 68, 0.05);
}

/* Custom Role Tags */
.role-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--text-secondary);
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    transition: var(--transition-smooth);
}

.role-tag i {
    cursor: pointer;
    font-size: 11px;
    color: var(--text-muted);
    transition: var(--transition-smooth);
}

.role-tag i:hover {
    color: var(--error-color);
}

/* Message Center Inbox & Items */
.message-item {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition-smooth);
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.message-item:last-child {
    border-bottom: none;
}

.message-item:hover {
    background-color: rgba(var(--primary-rgb), 0.02);
}

.message-item.unread {
    background-color: rgba(var(--primary-rgb), 0.03);
}

.unread-dot {
    width: 8px;
    height: 8px;
    background-color: var(--primary-color);
    border-radius: 50%;
    position: absolute;
    top: 30px;
    left: 10px;
}

.message-item.unread .message-subject {
    font-weight: 800;
    color: var(--text-primary);
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-secondary);
    padding-left: 8px;
    flex-wrap: wrap;
    gap: 8px;
}

.message-sender {
    font-weight: 700;
    color: var(--text-primary);
}

.message-subject {
    font-size: 15px;
    color: var(--text-primary);
    padding-left: 8px;
    margin: 0;
}

.message-body-preview {
    font-size: 13px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-left: 8px;
    margin: 0;
}

.message-expanded-body {
    margin-top: 12px;
    font-size: 13.5px;
    color: var(--text-secondary);
    line-height: 1.6;
    background-color: rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-color);
    padding: 16px;
    border-radius: var(--radius-md);
    white-space: pre-line;
    cursor: default;
}

body.light-theme .message-expanded-body {
    background-color: rgba(255, 255, 255, 0.5);
}

/* ==========================================
   PERSISTENT FLOATING CHAT WIDGET STYLES
   ========================================== */
#persistent-chat-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    font-family: 'Outfit', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

/* Trigger button */
#chat-widget-trigger {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border: none;
    cursor: pointer;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 24px;
    transition: var(--transition-smooth);
    position: relative;
    outline: none;
}

#chat-widget-trigger:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

/* Pulsing Badge */
.chat-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--error-color, #ff4d4d);
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    box-sizing: border-box;
    box-shadow: 0 0 12px var(--error-color, #ff4d4d);
    border: 2px solid var(--card-bg, #1e1e1e);
    animation: chat-badge-pulse 2s infinite;
}

@keyframes chat-badge-pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 77, 77, 0.7);
    }
    70% {
        transform: scale(1.1);
        box-shadow: 0 0 0 8px rgba(255, 77, 77, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 77, 77, 0);
    }
}

/* Expanded Window */
#chat-widget-window {
    position: absolute;
    bottom: 72px;
    right: 0;
    width: 380px;
    height: 520px;
    max-height: calc(85vh - 100px);
    display: flex;
    flex-direction: column;
    border-radius: var(--radius-lg, 16px);
    border: 1px solid var(--border-color);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    background-color: var(--bg-main);
    
    /* Animation base state: Collapsed */
    opacity: 0;
    pointer-events: none;
    transform: scale(0.85) translateY(24px);
    transform-origin: bottom right;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Expanded Animation Trigger State */
#persistent-chat-widget.expanded #chat-widget-window {
    opacity: 1;
    pointer-events: all;
    transform: scale(1) translateY(0);
}

/* Header */
.chat-widget-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(var(--primary-rgb), 0.05);
}

.chat-header-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-header-title i {
    font-size: 18px;
}

.chat-header-title h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

#chat-widget-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: var(--transition-smooth);
}

#chat-widget-close:hover {
    color: var(--text-primary);
    transform: scale(1.1);
}

/* Tabs */
.chat-widget-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.1);
}

body.light-theme .chat-widget-tabs {
    background: rgba(255, 255, 255, 0.3);
}

.chat-tab-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-smooth);
    border-bottom: 2px solid transparent;
}

.chat-tab-btn:hover {
    color: var(--text-primary);
    background-color: rgba(var(--primary-rgb), 0.02);
}

.chat-tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background-color: rgba(var(--primary-rgb), 0.04);
}

/* Body */
.chat-widget-body {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.chat-pane {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    flex-direction: column;
    padding: 16px;
    box-sizing: border-box;
    overflow: hidden;
}

.chat-pane.active {
    display: flex;
}

/* Inbox Messages List */
.chat-messages-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-right: 4px;
}

/* Custom Scrollbar for compact chat */
.chat-messages-list::-webkit-scrollbar,
#chat-pane-compose::-webkit-scrollbar {
    width: 6px;
}

.chat-messages-list::-webkit-scrollbar-thumb,
#chat-pane-compose::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 3px;
}

/* Compose pane overrides */
#chat-pane-compose {
    overflow-y: auto;
}

/* Compact Message Item */
.chat-msg-item {
    padding: 12px 14px;
    border-radius: var(--radius-md, 8px);
    border: 1px solid var(--border-color);
    background-color: rgba(255, 255, 255, 0.02);
    cursor: pointer;
    transition: var(--transition-smooth);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

body.light-theme .chat-msg-item {
    background-color: rgba(255, 255, 255, 0.4);
}

.chat-msg-item:hover {
    background-color: rgba(var(--primary-rgb), 0.04);
    border-color: rgba(var(--primary-rgb), 0.2);
}

.chat-msg-item.unread {
    background-color: rgba(var(--primary-rgb), 0.06);
    border-color: rgba(var(--primary-rgb), 0.3);
}

.chat-msg-item.unread .chat-msg-subject {
    font-weight: 700;
}

.chat-msg-header {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-secondary);
}

.chat-msg-sender {
    font-weight: 700;
    color: var(--text-primary);
    max-width: 70%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-msg-date {
    color: var(--text-muted);
}

.chat-msg-subject {
    font-size: 13px;
    color: var(--text-primary);
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-msg-preview {
    font-size: 11px;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin: 0;
}

/* Expanded Message view inside chat */
.chat-msg-expanded {
    margin-top: 8px;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm, 4px);
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-secondary);
    white-space: pre-line;
    cursor: default;
}

body.light-theme .chat-msg-expanded {
    background-color: rgba(0, 0, 0, 0.03);
}

.chat-msg-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 8px;
}

.chat-msg-btn {
    background: none;
    border: none;
    font-size: 11px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: var(--transition-smooth);
}

.chat-msg-btn-reply {
    color: var(--primary-color);
}

.chat-msg-btn-reply:hover {
    background-color: rgba(var(--primary-rgb), 0.1);
}

.chat-msg-btn-delete {
    color: var(--error-color, #ff4d4d);
}

.chat-msg-btn-delete:hover {
    background-color: rgba(255, 77, 77, 0.1);
}

/* Responsive mobile adaptations */
@media (max-width: 480px) {
    #persistent-chat-widget {
        bottom: 16px;
        right: 16px;
        left: 16px;
        align-items: flex-end;
    }
    
    #chat-widget-window {
        width: 100%;
        height: 480px;
        bottom: 76px;
        right: 0;
    }
}

/* ==========================================================================
   WYSIWYG PAGE EDITOR & CUSTOMIZABLE PAGES SYSTEM
   ========================================================================== */

#page-editor-view {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 2000;
    background: var(--bg-primary);
    display: none; /* Controlled by routing in js */
    flex-direction: column;
    overflow: hidden;
}

#page-editor-view.active {
    display: flex !important;
}

/* Toolbox Sidebar Styles */
.editor-toolbox {
    background: rgba(var(--bg-primary-rgb), 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.toolbox-item-btn {
    border: 1px solid var(--border-color) !important;
    background: rgba(var(--text-primary-rgb), 0.02) !important;
    color: var(--text-primary) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.toolbox-item-btn:hover {
    transform: translateY(-2px);
    background: rgba(var(--primary-rgb), 0.05) !important;
    border-color: rgba(var(--primary-rgb), 0.3) !important;
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.1);
}

.toolbox-item-btn:active {
    transform: translateY(0);
}

/* Live Canvas & Dynamic Editable Block Styling */
.editor-canvas-container {
    background: radial-gradient(circle at center, rgba(var(--primary-rgb), 0.03) 0%, rgba(0,0,0,0.15) 100%);
    padding-bottom: 180px !important;
}

#editor-live-canvas {
    background: var(--bg-primary) !important;
    transition: box-shadow 0.3s ease;
}

/* Canvas block packaging and hover state outlines */
.editor-canvas-block {
    position: relative;
    padding: 16px;
    border-radius: var(--radius-md, 8px);
    border: 1px dashed var(--border-color);
    background: rgba(var(--text-primary-rgb), 0.01);
    transition: all 0.25s ease;
    cursor: pointer;
}

.editor-canvas-block:hover {
    border-color: var(--primary-color);
    background: rgba(var(--primary-rgb), 0.02);
    box-shadow: 0 0 0 1px var(--primary-color);
}

.editor-canvas-block.selected {
    border-color: var(--accent-color) !important;
    background: rgba(var(--accent-rgb), 0.03) !important;
    box-shadow: 0 0 0 2px var(--accent-color) !important;
}

/* Block Toolbar Action Menu */
.editor-canvas-block .block-toolbar {
    position: absolute;
    top: -16px;
    right: 16px;
    display: none;
    gap: 6px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm, 6px);
    padding: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 10;
}

.editor-canvas-block:hover .block-toolbar,
.editor-canvas-block.selected .block-toolbar {
    display: flex;
}

.block-toolbar-btn {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    font-size: 12px;
}

.block-toolbar-btn:hover {
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary-color);
}

.block-toolbar-btn.delete:hover {
    background: rgba(255, 77, 77, 0.1);
    color: var(--error-color, #ff4d4d);
}

/* Block Placeholder styling */
.block-placeholder {
    padding: 40px;
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-md);
    background: rgba(var(--text-primary-rgb), 0.01);
}

/* Parameters Context Sidebar Styling */
.editor-parameters {
    background: rgba(var(--bg-primary-rgb), 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.parameter-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.parameter-form-group label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

.parameter-form-group input[type="text"],
.parameter-form-group textarea,
.parameter-form-group select {
    width: 100%;
    padding: 10px 12px;
    border-radius: var(--radius-sm, 6px);
    border: 1px solid var(--border-color);
    background: rgba(var(--text-primary-rgb), 0.02);
    color: var(--text-primary);
    font-size: 13px;
    transition: var(--transition-smooth);
    outline: none;
    box-sizing: border-box;
}

.parameter-form-group input[type="text"]:focus,
.parameter-form-group textarea:focus,
.parameter-form-group select:focus {
    border-color: var(--primary-color);
    background: rgba(var(--primary-rgb), 0.02);
    box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.1);
}

/* Premium Confirmation Modals overlay transitions */
#delete-confirm-modal {
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#delete-confirm-modal .modal-content {
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#delete-confirm-modal.active .modal-content {
    transform: scale(1);
}

/* General clean styling for sub-list lists in edit panes */
.parameter-sublist-item {
    padding: 12px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: rgba(var(--text-primary-rgb), 0.01);
    margin-bottom: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Light Theme overrides for modular page builder to prevent darkening */
body.light-theme #page-editor-view {
    background: var(--bg-main);
}
body.light-theme .editor-toolbox,
body.light-theme .editor-parameters {
    background: rgba(255, 255, 255, 0.95);
}
body.light-theme .editor-canvas-container {
    background: radial-gradient(circle at center, rgba(var(--primary-rgb), 0.02) 0%, rgba(0, 0, 0, 0.03) 100%);
}
body.light-theme #editor-live-canvas {
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Shake animation for incorrect login */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    15%, 45%, 75% { transform: translateX(-8px); }
    30%, 60%, 90% { transform: translateX(8px); }
}

/* ==========================================
   DISCORD-STYLE MEMBER ROLES UI
   ========================================== */
.user-record-row-wrapper {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.02);
    margin-bottom: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.user-record-row-wrapper.expanded {
    background: rgba(255, 255, 255, 0.04);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
    border-color: rgba(var(--primary-rgb), 0.3);
}

.user-record-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    transition: background 0.2s ease;
}

.user-record-row:hover {
    background: rgba(255, 255, 255, 0.02);
}

.discord-profile-card-container {
    padding: 0 20px 20px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.discord-profile-card {
    background: #18191c; /* Discord dark-theme card background */
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    max-width: 500px;
    margin: 10px 0;
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
    font-family: 'Inter', sans-serif;
    color: #dcddde;
}

/* Light theme support */
body.light-theme .discord-profile-card {
    background: #f2f3f5;
    color: #2e3338;
}

.discord-profile-banner {
    height: 60px;
    width: 100%;
}

.discord-profile-avatar-container {
    position: absolute;
    top: 28px;
    left: 16px;
}

.discord-profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    font-size: 26px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 6px solid #18191c;
}

body.light-theme .discord-profile-avatar {
    border-color: #f2f3f5;
}

.discord-profile-info {
    padding: 40px 16px 16px 16px;
}

.discord-profile-username-row {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.discord-profile-username {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
}

body.light-theme .discord-profile-username {
    color: #060607;
}

.discord-profile-tag {
    font-size: 13px;
    color: #b9bbbe;
}

.discord-profile-email {
    font-size: 12px;
    color: #b9bbbe;
    margin-top: 4px;
}

.discord-profile-chapter {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--accent-color);
    margin-top: 6px;
}

.discord-profile-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
    margin: 0 16px;
}

body.light-theme .discord-profile-divider {
    background: rgba(0, 0, 0, 0.08);
}

.discord-profile-section {
    padding: 16px;
}

.discord-section-title {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    color: #b9bbbe;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

body.light-theme .discord-section-title {
    color: #4f5660;
}

.discord-roles-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.discord-role-pill {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 500;
    color: #dcddde;
    gap: 6px;
    transition: all 0.2s ease;
}

body.light-theme .discord-role-pill {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.1);
    color: #2e3338;
}

.discord-role-circle {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.discord-role-remove {
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    color: #b9bbbe;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    transition: all 0.2s;
}

.discord-role-remove:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

body.light-theme .discord-role-remove:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #060607;
}

.discord-add-role-wrapper {
    position: relative;
    display: inline-block;
}

.discord-add-role-pill-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px dashed rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    width: 28px;
    height: 24px;
    cursor: pointer;
    color: #b9bbbe;
    transition: all 0.2s;
}

.discord-add-role-pill-btn:hover {
    border-color: var(--primary-color);
    color: #ffffff;
    background: rgba(var(--primary-rgb), 0.1);
}

body.light-theme .discord-add-role-pill-btn {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.2);
    color: #4f5660;
}

body.light-theme .discord-add-role-pill-btn:hover {
    color: var(--primary-color);
    background: rgba(var(--primary-rgb), 0.05);
}

.discord-role-dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    background: #18191c;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    display: none;
    flex-direction: column;
    min-width: 160px;
    z-index: 1000;
    overflow: hidden;
}

body.light-theme .discord-role-dropdown-menu {
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.discord-role-dropdown-menu.active {
    display: flex;
}

.discord-role-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    font-size: 12px;
    cursor: pointer;
    color: #dcddde;
    transition: background 0.2s;
}

body.light-theme .discord-role-dropdown-item {
    color: #2e3338;
}

.discord-role-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

body.light-theme .discord-role-dropdown-item:hover {
    background: rgba(0, 0, 0, 0.04);
    color: #060607;
}

.discord-profile-actions {
    padding: 12px 16px;
    display: flex;
    justify-content: flex-end;
}

.discord-delete-btn {
    border-color: var(--error-color) !important;
    color: var(--error-color) !important;
    background: transparent !important;
    transition: all 0.2s !important;
}

.discord-delete-btn:hover {
    background: var(--error-color) !important;
    color: #ffffff !important;
}

/* ==========================================
   EDITOR COLLAPSIBLE PANEL TOGGLES
   ========================================== */
.editor-main-container {
    transition: grid-template-columns 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.editor-toolbox {
    grid-column: 1;
}

.editor-canvas-container-outer {
    grid-column: 2;
}

.editor-parameters {
    grid-column: 3;
}

.editor-toolbox, .editor-parameters {
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                padding 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                border-width 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 0.2s ease;
}

.editor-toolbox.collapsed {
    padding: 0 !important;
    border-right-width: 0 !important;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.editor-parameters.collapsed {
    padding: 0 !important;
    border-left-width: 0 !important;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.editor-canvas-container {
    position: relative;
}

.editor-toggle-panel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 48px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
}

.editor-toggle-panel-btn.left {
    left: 0;
    border-radius: 0 8px 8px 0;
    border-left: none;
}

.editor-toggle-panel-btn.right {
    right: 0;
    border-radius: 8px 0 0 8px;
    border-right: none;
}

.editor-toggle-panel-btn:hover {
    background: var(--primary-color);
    color: #ffffff;
    width: 30px;
    box-shadow: 0 0 10px rgba(var(--primary-rgb), 0.3);
}

body.light-theme .editor-toggle-panel-btn {
    background: rgba(255, 255, 255, 0.85);
}

