/* anselm_web/static/css/style.css */

/* === CSS VARIABLES / THEME SYSTEM === */
:root { /* Default Dark Mode */
    --primary: #1a1a1a;
    --secondary: #2a2a2a;
    --accent: #8b7355; 
    --gold: #d4af37; 
    --text: #e8e8e8;
    --text-muted: #a8a8a8;
    --border: #333333;
    --background: #0f0f0f;
    --card-bg: #1e1e1e; 
    --card-hover-bg: #2a2a2a; 

    /* Navigation specific if different from page defaults */
    --nav-bg-color: rgba(15, 15, 15, 0.8);
    --nav-border-color: rgba(255, 255, 255, 0.05);
    --nav-link-color: var(--text-muted);
    --nav-link-hover-color: var(--text);
    --nav-brand-color: var(--gold);

    /* Icon fill for theme toggle */
    --icon-fill: var(--text-muted);
    --icon-hover-fill: var(--text);

    /* Other component colors used by the content block */
    --hero-cta-color: var(--gold);
    --hero-cta-border: var(--gold);
    --hero-cta-hover-bg: var(--gold);
    --hero-cta-hover-color: var(--background);
    --hero-cta-shadow: rgba(212, 175, 55, 0.3);
    --card-glow-gradient: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.08), transparent);
    --card-shadow: rgba(0,0,0, 0.3);
    --card-hover-border: rgba(212, 175, 55, 0.3);
    --button-primary-bg: var(--gold);
    --button-primary-text: var(--background);
    --button-primary-hover-fill: #f4c842; 
    --button-primary-shadow: rgba(212, 175, 55, 0.4);
    --feature-item-base-border: rgba(255, 255, 255, 0.05);
    --feature-item-hover-border: rgba(212, 175, 55, 0.3);
    --feature-item-shadow: rgba(0,0,0,0.2);
    --share-button-bg: var(--secondary);
    --share-button-border: var(--border);
    --share-button-text: var(--text-muted);
    --share-button-hover-bg: var(--primary);
    --share-button-icon-default-fill: var(--text-muted);
     /* Credits Badge from your layout.html */
    --credits-badge-bg-color: rgba(139, 115, 85, 0.2); 
    --credits-badge-border-color: var(--accent);
    --credits-badge-text-color: var(--text);

    /* Anselm Project Original Theme Variables (Dark Mode Default) */
    --primary-color: #3d5a80; /* This was your original primary, keeping for reference, may need to map to new vars */
    --secondary-color: #98c1d9;/* This was your original secondary */
    --accent-color: #ee6c4d;   /* This was your original accent */
    --light-color: #e0fbfc;   /* This was your original light */
    --dark-color: #293241;    /* This was your original dark */
}

/* Replace the light mode section in your style.css with this updated version */

body.light-mode {
    --primary: #f8fafc;      /* Softer than pure white */
    --secondary: #f1f5f9;    /* Warm light gray instead of stark white */
    --accent: #3b82f6;       /* Keep the blue accent you love */
    --gold: #d4af37;         /* CHANGED: Keep the same gold color as dark mode */
    --text: #1e293b;         /* Darker, easier to read */
    --text-muted: #475569;   /* Less harsh than previous gray */
    --border: #cbd5e1;       /* Softer borders */
    --background: #f8fafc;   /* Gentle off-white background */
    --card-bg: #ffffff;      /* Cards stay white for contrast */
    --card-hover-bg: #f1f5f9; /* Subtle hover background */

    --nav-bg-color: rgba(248, 250, 252, 0.95); /* Softer nav background */
    --nav-border-color: rgba(0, 0, 0, 0.06);  /* Subtler border */
    --nav-link-color: var(--text-muted);
    --nav-link-hover-color: var(--text);
    --nav-brand-color: var(--gold);

    --icon-fill: var(--text-muted);
    --icon-hover-fill: var(--text);

    --hero-cta-color: var(--gold); 
    --hero-cta-border: var(--gold); 
    --hero-cta-hover-bg: var(--gold); 
    --hero-cta-hover-color: #ffffff; /* CHANGED: Use white instead of var(--card-bg) */
    --hero-cta-shadow: rgba(212, 175, 55, 0.3); /* CHANGED: Use gold shadow instead of blue */
    --card-glow-gradient: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.06), transparent); /* CHANGED: Use gold glow */
    --card-shadow: rgba(0,0,0, 0.08); /* Softer shadows */
    --card-hover-border: rgba(212, 175, 55, 0.3); /* CHANGED: Use gold border */
    --button-primary-bg: var(--gold); 
    --button-primary-text: #ffffff; /* CHANGED: Use white instead of var(--card-bg) */
    --button-primary-hover-fill: #f4c842; /* CHANGED: Use lighter gold instead of blue */
    --button-primary-shadow: rgba(212, 175, 55, 0.3); /* CHANGED: Use gold shadow */
    --feature-item-base-border: rgba(0, 0, 0, 0.06); /* Much subtler borders */
    --feature-item-hover-border: rgba(212, 175, 55, 0.3); /* CHANGED: Use gold border */
    --feature-item-shadow: rgba(0,0,0,0.08); /* Gentler shadows */
    --share-button-bg: var(--card-bg);
    --share-button-border: #e2e8f0; /* Softer button borders */
    --share-button-text: var(--text-muted);
    --share-button-hover-bg: var(--card-hover-bg); 
    --share-button-icon-default-fill: var(--text-muted);
    /* Credits Badge - softer light mode */
    --credits-badge-bg-color: rgba(212, 175, 55, 0.08); /* CHANGED: Use gold background */
    --credits-badge-border-color: var(--gold); /* CHANGED: Use gold border */
    --credits-badge-text-color: var(--gold); /* CHANGED: Use gold text */

    /* Anselm Project Original Theme Variables (Light Mode Mapped) */
    --primary-color: #3d5a80; /* Keeping original for reference */
    --secondary-color: #98c1d9;
    --accent-color: #ee6c4d;
    --light-color: #e0fbfc;
    --dark-color: #293241;
}

/* === GLOBAL STYLES === */
body {
    font-family: 'Lato', sans-serif; /* Default body font from original layout */
    line-height: 1.6;
    color: var(--text); 
    background-color: var(--background); 
    margin: 0;
    padding: 0;
    transition: background-color 0.3s ease, color 0.3s ease; 
}

.container { 
    max-width: 1200px; /* From original layout */
    margin: 0 auto;
    padding: 20px;
    background-color: var(--secondary); 
}

/* === NAVIGATION STYLES === */
nav {
    background-color: var(--nav-bg-color) !important; /* Use new variable, important to override old #1a365d */
    color: var(--nav-link-color) !important; /* Text color for nav, important to override old #ffffff */
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 1rem 1.5rem !important; /* Use padding from new theme */
    border-bottom: 1px solid var(--nav-border-color) !important; /* Use border from new theme */
    margin-bottom: 0 !important; /* Removed original margin-bottom: 2em; */
}

.nav-container { /* Copied from layout.html and kept as is */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0; /* Padding is on nav now */
    max-width: 1200px; /* Consistent max-width */
    margin: 0 auto;
}

.nav-left, .nav-right { /* Copied from layout.html */
    display: flex;
    align-items: center;
    flex-wrap: nowrap; 
}

/* FIXED NAV LOGO STYLES - ONLY GLOW, NO SCALE */
.logo-link {
    display: inline-block !important;
    text-decoration: none !important;
    cursor: pointer !important;
    border-radius: 8px !important;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1) !important;
    padding: 0 !important;
    position: relative !important;
    overflow: visible !important;
    outline: none !important;
    margin-right: 15px !important;
}

.nav-logo {
    height: 40px !important;
    width: auto !important;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1) !important;
    position: relative !important;
    z-index: 2 !important;
    border-radius: 8px !important;
    filter: drop-shadow(0 0 0px transparent) !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    -webkit-touch-callout: none !important;
    -webkit-user-drag: none !important;
}

/* ONLY glow on hover - NO scaling */
.logo-link:hover .nav-logo {
    filter: drop-shadow(0 0 20px var(--gold)) !important;
}

/* Remove focus effects */
.logo-link:focus {
    outline: none !important;
}

/* Prevent text selection highlighting completely */
.nav-logo::selection {
    background: transparent !important;
}

.nav-logo::-moz-selection {
    background: transparent !important;
}

/* Remove ALL pseudo-element effects */
.logo-link::before {
    display: none !important;
}

.logo-link::after {
    display: none !important;
}

/* Navigation Links with Glow Effect */
nav a, .nav-link {
    color: var(--nav-link-color) !important;
    text-decoration: none !important;
    padding: 8px 15px !important;
    margin: 0 5px !important;
    border-radius: 8px !important;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1) !important;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    display: inline-block;
}

/* Glow effect like focus area cards for nav links */
nav a::before, .nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--card-glow-gradient);
    transition: left 0.6s ease, background-image 0.3s ease;
    z-index: 1;
}

nav a:hover::before, .nav-link:hover::before {
    left: 100%;
}

nav a:hover, .nav-link:hover {
    background-color: var(--card-hover-bg) !important;
    color: var(--gold) !important;
    transform: scale(1.03) translateY(-2px) !important;
    box-shadow: 0 5px 10px var(--card-shadow) !important;
    border: 1px solid var(--card-hover-border) !important;
}

/* Ensure text stays above the glow effect */
nav a span, nav a, .nav-link span, .nav-link {
    position: relative;
    z-index: 2;
}

/* Credits Badge Enhanced */
.credits-badge {
    background-color: var(--credits-badge-bg-color) !important;
    border: 1px solid var(--credits-badge-border-color) !important;
    color: var(--credits-badge-text-color) !important;
    padding: 6px 12px !important;
    border-radius: 12px !important;
    font-weight: bold !important;
    margin-right: 10px !important;
    text-decoration: none !important;
    display: inline-block !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1) !important;
    position: relative;
    overflow: hidden;
}

/* Glow effect for credits badge */
.credits-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--card-glow-gradient);
    transition: left 0.6s ease, background-image 0.3s ease;
    z-index: 1;
}

.credits-badge:hover::before {
    left: 100%;
}

.credits-badge:hover {
    background-color: var(--card-hover-bg) !important;
    color: var(--gold) !important;
    transform: scale(1.05) translateY(-2px) !important;
    box-shadow: 0 5px 10px var(--card-shadow) !important;
    border-color: var(--gold) !important;
}

/* Ensure credits text stays above glow */
.credits-badge {
    position: relative;
    z-index: 2;
}

/* === THEME TOGGLE BUTTON STYLES === */
.theme-toggle-button-item { 
    list-style-type: none; 
    margin-left: 10px; 
}

.theme-toggle-button {
    background: none !important;
    border: none !important;
    color: var(--nav-link-color) !important;
    cursor: pointer !important;
    padding: 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 0 !important;
    font-size: 0.875rem !important;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1) !important;
    border-radius: 8px !important;
    position: relative;
    overflow: hidden;
}

/* Glow effect for theme toggle */
.theme-toggle-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--card-glow-gradient);
    transition: left 0.6s ease, background-image 0.3s ease;
    z-index: 1;
}

.theme-toggle-button:hover::before {
    left: 100%;
}

.theme-toggle-button:hover {
    color: var(--gold) !important;
    background-color: var(--card-hover-bg) !important;
    transform: scale(1.1) translateY(-2px) !important;
    box-shadow: 0 5px 10px var(--card-shadow) !important;
    border: 1px solid var(--card-hover-border) !important;
}

.theme-toggle-button:hover .theme-icon {
    fill: var(--gold) !important;
}

.theme-icon {
    width: 20px !important;
    height: 20px !important;
    fill: var(--icon-fill) !important;
    transition: fill 0.3s ease !important;
    position: relative;
    z-index: 2;
}

.sun-icon, .moon-icon { display: none; } 
body:not(.light-mode) .moon-icon { display: block; } 
body.light-mode .sun-icon { display: block; } 

/* === HERO SECTION STYLES === */
.hero {
    min-height: 80vh; /* Reduced from 100vh */
    display: flex; 
    flex-direction: column;
    justify-content: center; 
    align-items: center; 
    text-align: center;
    position: relative; 
    padding: 2rem 2rem 1rem; /* Reduced bottom padding */
}

/* Hero Logo Styles - Only highlight visible part */
.hero-logo {
    margin-bottom: 1.5rem; /* Reduced spacing */
    opacity: 0;
    transform: translateY(-20px);
    animation: logoFadeIn 1.5s ease-out 0.5s forwards;
    display: inline-block; /* Changed from block to inline-block */
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    padding: 0; /* Removed padding so glow follows image shape */
    position: relative;
    overflow: visible; /* Changed to visible so glow can extend beyond image */
}

/* Glow effect applied to the image itself, not the container */
.hero-logo-img {
    max-width: 300px;
    width: 100%;
    height: auto;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    z-index: 2;
    border-radius: 8px;
    filter: drop-shadow(0 0 0px transparent);
}

.hero-logo:hover .hero-logo-img {
    transform: scale(1.05) translateY(-5px);
    filter: drop-shadow(0 5px 15px var(--card-shadow)) drop-shadow(0 0 20px var(--gold));
}

/* Remove the ::before pseudo-element glow effect for hero logo */
.hero-logo::before {
    display: none;
}

@keyframes logoFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero Content - reduced spacing */
.hero-content {
    margin-bottom: 1rem; /* Reduced spacing */
}

.hero-title {
    font-family: 'Playfair Display', serif; font-size: clamp(2.8rem, 7vw, 5.5rem); 
    font-weight: 400; line-height: 1.15; margin-bottom: 2rem;
    color: var(--text); letter-spacing: -1px; transition: color 0.3s ease;
}
.hero-subtitle {
    font-size: 1.125rem; font-weight: 300; color: var(--text-muted);
    line-height: 1.8; max-width: 600px; margin-left: auto; margin-right: auto;
    margin-bottom: 4rem; letter-spacing: 0.3px; transition: color 0.3s ease;
}

.hero-cta {
    display: inline-block; background: transparent; border: 1px solid var(--hero-cta-border);
    color: var(--hero-cta-color); padding: 1rem 2.5rem; text-decoration: none;
    font-weight: 400; font-size: 0.875rem; letter-spacing: 1px; text-transform: uppercase;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1); position: relative;
    overflow: hidden; border-radius: 4px; 
}
.hero-cta::before {
    content: ''; position: absolute; top: 0; left: -100%;
    width: 100%; height: 100%; background: var(--hero-cta-hover-bg);
    transition: left 0.4s ease, background-color 0.3s ease; z-index: 1; 
}
.hero-cta:hover::before { left: 0; }
.hero-cta:hover {
    color: var(--hero-cta-hover-color); transform: translateY(-3px);
    box-shadow: 0 10px 20px var(--hero-cta-shadow);
}
.hero-cta span { position: relative; z-index: 2; }

/* Verse Reference Styles - Remove glow effect */
.verse-reference {
    margin-bottom: 1.5rem; /* Reduced spacing */
    text-align: center;
    padding: 1rem 2rem;
}

.reference-text {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    color: var(--gold);
    font-weight: 600;
    display: block;
    letter-spacing: 1px;
    text-shadow: 0 0 10px var(--gold);
    transition: color 0.3s ease;
}

/* Remove all hover effects and glow for verse reference */

/* === SECTION STYLES === */
.section { 
    padding: 2rem 3rem; /* Reduced from 6rem to 2rem */
    transition: background-color 0.3s ease; 
} 

.section.features-section { 
    background: var(--primary); 
    padding: 2rem 3rem; /* Consistent reduced padding */
}

.section.analysis-section { 
    background: var(--secondary); 
    padding: 0.75rem 3rem; /* Consistent reduced padding */
}

.section.share-section {
    background-color: var(--secondary);
    padding: 0.75rem 3rem; /* Consistent reduced padding */
}

.section.cta-section { 
    text-align: center; 
    padding: 1rem 3rem; /* Consistent reduced padding */
}

.anselm-content-container { 
    max-width: 1400px; margin: 0 auto; 
}

.section-header { 
    text-align: center; 
    margin-bottom: 2rem; /* Reduced from 4rem to 2rem */
}

.section-title {
    font-family: 'Playfair Display', serif; font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 400; color: var(--text); margin-bottom: 1.5rem;
    letter-spacing: -0.5px; transition: color 0.3s ease;
}
.section-description {
    font-size: 1rem; font-weight: 300; color: var(--text-muted);
    max-width: 600px; margin: 0 auto; line-height: 1.8;
    letter-spacing: 0.3px; transition: color 0.3s ease;
}

/* === FOCUS AREAS GRID === */
.focus-areas-grid { 
    display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1px; background: var(--border); border: 1px solid var(--border); 
    border-radius: 8px; overflow: hidden; 
    transition: background-color 0.3s ease, border-color 0.3s ease;
}
.focus-area-card { 
    background: var(--card-bg); padding: 2.5rem 2rem; 
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative; cursor: pointer; overflow: hidden;
}
.focus-area-card::before {
    content: ''; position: absolute; top: 0; left: -100%;
    width: 100%; height: 100%; background: var(--card-glow-gradient); 
    transition: left 0.6s ease, background-image 0.3s ease; z-index: 1;
}
.focus-area-card:hover::before { left: 100%; }
.focus-area-card:hover {
    background: var(--card-hover-bg); transform: scale(1.03) translateY(-8px);
    box-shadow: 0 20px 40px var(--card-shadow); z-index: 10;
    border: 1px solid var(--card-hover-border); 
}
.focus-areas-grid > .focus-area-card { border: none; }
.focus-area-title { 
    font-family: 'Playfair Display', serif; font-size: 1.2rem; 
    font-weight: 500; color: var(--text); margin-bottom: 0.8rem; 
    letter-spacing: -0.3px; transition: all 0.3s ease;
    position: relative; z-index: 2;
}
.focus-area-card:hover .focus-area-title { color: var(--gold); }
.focus-area-description { 
    font-size: 0.875rem; font-weight: 300; color: var(--text-muted);
    line-height: 1.7; letter-spacing: 0.3px; transition: all 0.3s ease;
    position: relative; z-index: 2;
}
.focus-area-card:hover .focus-area-description { color: var(--text); }

/* === FEATURES SECTION === */
.features-grid {
    display: grid; grid-template-columns: 1fr; 
    gap: 1.5rem; /* Reduced from 2rem */
    margin-top: 2rem; /* Reduced from 4rem */
}
@media (min-width: 768px) { .features-grid { grid-template-columns: repeat(2, 1fr); } }

.feature-item {
    text-align: left; padding: 2.5rem; border: 1px solid var(--feature-item-base-border);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1); cursor: pointer;
    position: relative; overflow: hidden; border-radius: 8px; 
    background-color: var(--card-bg); 
}
.feature-item::before {
    content: ''; position: absolute; top: 0; left: 0;
    width: 0; height: 100%; background: var(--card-glow-gradient); 
    transition: width 0.6s ease, background-image 0.3s ease; z-index: 1;
}
.feature-item:hover::before { width: 100%; }
.feature-item:hover {
    border-color: var(--feature-item-hover-border); transform: translateY(-5px);
    box-shadow: 0 15px 30px var(--feature-item-shadow);
    background-color: var(--card-hover-bg); 
}
.feature-icon { 
    font-size: 2.5rem; color: var(--accent); margin-bottom: 1.5rem;
    transition: all 0.3s ease; position: relative; z-index: 2;
}
.feature-item:hover .feature-icon { color: var(--gold); transform: scale(1.1); }
.feature-title {
    font-family: 'Playfair Display', serif; font-size: 1.2rem; 
    color: var(--text); margin-bottom: 1rem; font-weight: 500;
    letter-spacing: -0.3px; transition: all 0.3s ease;
    position: relative; z-index: 2;
}
.feature-item:hover .feature-title { color: var(--gold); }
.feature-description {
    font-size: 0.875rem; font-weight: 300; color: var(--text-muted);
    line-height: 1.8; letter-spacing: 0.3px; transition: all 0.3s ease;
    position: relative; z-index: 2;
}
.feature-item:hover .feature-description { color: var(--text); }

/* === ANALYSIS SECTION === */
.analysis-content { 
    text-align: center; 
    max-width: 800px; 
    margin: 0 auto; 
}
.analysis-text {
    font-size: 1.125rem; font-weight: 300; line-height: 2;
    color: var(--text); letter-spacing: 0.3px; transition: color 0.3s ease;
}
.analysis-highlight {
    color: var(--gold); font-weight: 400; transition: color 0.3s ease;
}

/* === SHARE SECTION === */
.share-container {
    border-radius: 8px;
    padding: 2rem 2rem; /* Reduced padding */
    margin: 0 auto; 
    text-align: center;
    max-width: 700px; 
}
.share-text { 
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.8rem, 3.5vw, 2.5rem); 
    font-weight: 400;
    color: var(--text);
    margin-bottom: 2rem;
    letter-spacing: -0.5px;
    transition: color 0.3s ease;
}
.social-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem; 
}
.social-button {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.25rem; 
    border-radius: 30px; 
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid var(--share-button-border);
    background-color: var(--share-button-bg);
    color: var(--share-button-text); 
}
.social-button:hover {
    background-color: var(--share-button-hover-bg);
    transform: translateY(-2px);
    border-color: var(--accent); 
}
.social-button:hover .social-name {
    color: var(--text); 
}
.social-icon {
    width: 20px;
    height: 20px;
    margin-right: 8px;
}
.social-name {
    font-weight: 500; 
    font-size: 0.875rem;
    transition: color 0.3s ease;
}
.social-button.facebook .social-icon { fill: #4267B2; }
.social-button.twitter .social-icon { fill: #1DA1F2; }
.social-button.whatsapp .social-icon { fill: #25D366; }
.social-button.telegram .social-icon { fill: #0088cc; }
.social-button.email .social-icon { fill: var(--share-button-icon-default-fill); } 
.social-button:hover.facebook .social-icon,
.social-button:hover.twitter .social-icon,
.social-button:hover.whatsapp .social-icon,
.social-button:hover.telegram .social-icon {
    opacity: 0.85; 
}
.social-button:hover.email .social-icon {
    fill: var(--accent); 
}

/* === CTA SECTION === */
.cta-content { 
    max-width: 600px; 
    margin: 0 auto; 
}
.cta-title {
    font-family: 'Playfair Display', serif; font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 400; color: var(--text); margin-bottom: 2rem;
    letter-spacing: -0.5px; transition: color 0.3s ease;
}
.cta-description {
    font-size: 1rem; font-weight: 300; color: var(--text-muted);
    margin-bottom: 2rem; /* Reduced from 3rem */
    line-height: 1.8; letter-spacing: 0.3px;
    transition: color 0.3s ease;
}
.cta-button {
    display: inline-block; background: var(--button-primary-bg);
    color: var(--button-primary-text); padding: 1.25rem 3rem; text-decoration: none;
    font-weight: 400; font-size: 0.875rem; letter-spacing: 1px; text-transform: uppercase;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1); position: relative;
    overflow: hidden; border-radius: 4px; border: none; 
}
.cta-button::before {
    content: ''; position: absolute; top: 0; left: -100%;
    width: 100%; height: 100%; background: var(--button-primary-hover-fill); 
    transition: left 0.4s ease, background-color 0.3s ease; z-index: 1;
}
.cta-button:hover::before { left: 0; }
.cta-button:hover {
    transform: translateY(-3px); box-shadow: 0 15px 30px var(--button-primary-shadow);
}
.cta-button span { position: relative; z-index: 2; }

/* === FOOTER STYLES === */
footer {
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    border-top: 1px solid var(--border); 
    color: var(--text-muted); 
    background-color: var(--primary); 
}

footer a { /* From original layout, adapted */
    color: var(--gold); 
    text-decoration: none;
}

footer a:hover { /* From original layout */
    text-decoration: underline;
}

/* Footer styles for standalone content */
.anselm-footer-placeholder {
    background: var(--primary); 
    border-top: 1px solid var(--border); /* Simplified border */
    padding: 3rem 1.5rem; 
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* === HEADINGS === */
h1, h2, h3 {
    font-family: 'Cinzel', serif;
    color: var(--text);
}

h1 { /* From original layout, adapted for theming */
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
    border-bottom: 2px solid var(--secondary-color); /* Original anselm secondary */
    padding-bottom: 10px;
}

h2 { font-size: 1.6em; margin-bottom: 1em; border-bottom: 1px solid #eee; padding-bottom: 0.4em;}
h3 { font-size: 1.3em; margin-bottom: 0.8em; }

/* === FLASH MESSAGES === */
.flashes {
    list-style: none;
    padding: 0;
    margin-bottom: 20px;
}

.flash {
    padding: 12px 15px;
    margin-bottom: 10px;
    border-radius: 4px;
    font-weight: bold;
    border: 1px solid transparent; /* Added from style.css original */
}

.flash-success { /* Adapted from original layout */
    background-color: var(--accent); /* Example: Use a theme variable */
    color: var(--background); /* Contrasting text */
    border-color: var(--gold); /* Example */
    border-left: 4px solid var(--gold); /* Original style had border-left */
}

.flash-error, .flash-danger {
    background-color: #f8d7da; /* Original color, can be themed */
    color: #721c24;
    border-color: #f5c6cb;
    border-left: 4px solid #dc3545;
}
.flash-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-color: #b8daff;
    border-left: 4px solid #17a2b8;
}
.flash-warning {
    background-color: #fff3cd;
    color: #856404;
    border-color: #ffeeba;
    border-left: 4px solid #ffc107;
}

/* === FORMS === */
label {
    display: block;
    margin-bottom: 0.5em;
    font-weight: bold;
    color: #555;
}
input[type="text"],
input[type="email"],
input[type="password"] {
    width: 100%; /* Full width within container */
    max-width: 450px; /* Limit max width */
    padding: 0.8em;
    margin-bottom: 1.2em;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box; /* Include padding in width */
    font-size: 1em;
}

input.is-invalid {
    border-color: #dc3545;
}
.invalid-feedback span {
    color: #dc3545;
    font-size: 0.875em;
    display: block; /* Ensure it appears below */
    margin-top: -0.8em; /* Adjust spacing */
    margin-bottom: 1em;
}

button, input[type="submit"], .btn { /* Add .btn class */
    padding: 0.8em 1.8em;
    background-color: #007bff;
    color: white !important; /* MODIFIED: Ensure text is white */
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s ease;
    text-decoration: none; /* For <a> styled as buttons */
    display: inline-block; /* For <a> styled as buttons */
}

button:hover, input[type="submit"]:hover, .btn:hover {
    background-color: #0056b3;
    color: white !important; /* MODIFIED: Ensure text remains white on hover */
}

/* Specific button styles (mimicking Bootstrap) */
.btn-primary { background-color: #007bff; color: white !important; } /* MODIFIED */
.btn-primary:hover { background-color: #0056b3; color: white !important; } /* MODIFIED */

.btn-success { background-color: #28a745; color: white !important; } /* MODIFIED */
.btn-success:hover { background-color: #1e7e34; color: white !important; } /* MODIFIED */

.btn-info { background-color: #17a2b8; color: white !important; } /* MODIFIED */
.btn-info:hover { background-color: #117a8b; color: white !important; } /* MODIFIED */

.btn-danger { background-color: #dc3545; color: white !important; } /* MODIFIED */
.btn-danger:hover { background-color: #bd2130; color: white !important; } /* MODIFIED */

/* Ensure outline buttons have correct text color when not hovered */
.btn-outline-info {
    background-color: transparent;
    border: 1px solid var(--secondary-color, #17a2b8); /* Added fallback */
    color: var(--primary-color, #007bff) !important; /* MODIFIED */
}
.btn-outline-info:hover {
    background-color: var(--secondary-color, #17a2b8); /* Added fallback */
    color: var(--dark-color, white) !important; /* MODIFIED to ensure contrast */
}

.btn-sm { /* Smaller button size */
    padding: 0.4em 1em;
    font-size: 0.875em;
}

.form-group {
    margin-bottom: 1.5rem;
}
legend {
    font-size: 1.8em;
    margin-bottom: 1.5em;
    color: #1a365d;
    border-bottom: 2px solid #eee;
    padding-bottom: 0.5em;
}
.form-check {
    margin-bottom: 1.2em;
}

/* === TABLES === */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1.5em;
    margin-bottom: 1.5em;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
th, td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
    vertical-align: middle;
}
th {
    background-color: #f2f8fc; /* Light blue header */
    font-weight: bold;
    color: #333;
}
tbody tr:nth-child(even) {
    background-color: #f9f9f9; /* Zebra striping */
}
tbody tr:hover {
    background-color: #e9ecef; /* Hover effect */
}

/* === STATUS PAGE SPECIFIC === */
#task-status {
    font-weight: bold;
}
#task-info {
    background-color: #e9ecef; /* Light grey background */
    padding: 15px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    white-space: pre-wrap; /* Wrap long lines */
    word-wrap: break-word;
    font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; /* Monospace font */
    font-size: 0.95em;
    max-height: 400px; /* Limit height */
    overflow-y: auto; /* Add scroll if needed */
}
#result-link-container a {
    font-weight: bold;
    color: #28a745; /* Green link for success */
}

/* === REPORT STATUS CLASSES === */
.status-success {
    color: #28a745; /* Bootstrap success green */
    font-weight: bold;
}
.status-failure {
    color: #dc3545; /* Bootstrap danger red */
    font-weight: bold;
}
.status-pending,
.status-progress { /* Style PENDING and PROGRESS the same */
    color: #ffc107; /* Bootstrap warning yellow */
    font-weight: bold;
}

/* === FOOTER LINKS === */
.border-top.pt-3 {
    margin-top: 1.5em;
    border-top: 1px solid #eee;
    padding-top: 1em;
}

/* === DASHBOARD STYLES - HORIZONTAL LAYOUT === */
.dashboard-hero {
    padding: 1rem;
    margin-top: 1.5rem; /* More buffer below navbar */
    text-align: center;
}

.dashboard-hero .hero-logo {
    margin-bottom: 2rem; /* Increased from 0.5rem */
    opacity: 0;
    transform: translateY(-20px);
    animation: logoFadeIn 1.5s ease-out 0.5s forwards;
    display: inline-block;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    padding: 0;
    position: relative;
    overflow: visible;
}

.dashboard-hero .hero-logo-img {
    max-width: 300px;
    width: 100%;
    height: auto;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    z-index: 2;
    border-radius: 8px;
    filter: drop-shadow(0 0 0px transparent);
}

.dashboard-hero .hero-logo:hover .hero-logo-img {
    transform: scale(1.05) translateY(-5px);
    filter: drop-shadow(0 5px 15px var(--card-shadow)) drop-shadow(0 0 20px var(--gold));
}

/* Verse section below containers */
.verse-section {
    padding: 2rem;
    text-align: center;
}

.verse-section .hero-content {
    margin-bottom: 2rem;
}

.verse-section .verse-reference {
    padding: 1rem 2rem;
}

.dashboard-layout {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* First Row - Main Actions */
.main-actions-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    width: 100%;
}

/* Second Row - Suggestions */
.suggestions-row {
    width: 100%;
}

.suggestions-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.action-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 2rem 1.5rem;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: inherit;
    text-align: center;
    min-height: 160px;
}

.action-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--card-glow-gradient);
    transition: left 0.6s ease, background-image 0.3s ease;
    z-index: 1;
}

.action-card:hover::before {
    left: 100%;
}

.action-card:hover {
    background: var(--card-hover-bg);
    transform: scale(1.03) translateY(-5px);
    box-shadow: 0 15px 30px var(--card-shadow);
    border: 1px solid var(--card-hover-border);
}

.action-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    color: var(--text);
    margin-bottom: 1rem;
    font-weight: 500;
    position: relative;
    z-index: 2;
    transition: color 0.3s ease;
}

.action-card:hover .action-title {
    color: var(--gold);
}

.action-description {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 0;
    position: relative;
    z-index: 2;
    transition: color 0.3s ease;
}

.action-card:hover .action-description {
    color: var(--text);
}

.suggestion-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1.5rem 1rem;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    text-align: center;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.suggestion-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--card-glow-gradient);
    transition: left 0.6s ease, background-image 0.3s ease;
    z-index: 1;
}

.suggestion-card:hover::before {
    left: 100%;
}

.suggestion-card:hover {
    background: var(--card-hover-bg);
    transform: scale(1.02) translateY(-3px);
    box-shadow: 0 10px 20px var(--card-shadow);
    border: 1px solid var(--card-hover-border);
}

.suggestion-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    color: var(--text);
    margin-bottom: 0.75rem;
    font-weight: 500;
    position: relative;
    z-index: 2;
    transition: color 0.3s ease;
    line-height: 1.3;
}

.suggestion-card:hover .suggestion-title {
    color: var(--gold);
}

.suggestion-package {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    color: var(--gold);
    margin-bottom: 0.75rem;
    font-weight: 400;
    position: relative;
    z-index: 2;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.suggestion-description {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
    position: relative;
    z-index: 2;
    transition: color 0.3s ease;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.suggestion-card:hover .suggestion-description {
    color: var(--text);
}

/* Enhanced styling for the first action card */
.main-actions-row .action-card:first-child .action-title {
    color: var(--gold);
}

.main-actions-row .action-card:first-child {
    background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.03), rgba(0, 0, 0, 0.1));
}

body.light-mode .main-actions-row .action-card:first-child {
    background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.01), rgba(0, 0, 0, 0.03));
}

.main-actions-row .action-card:first-child:hover {
    border-color: var(--gold);
}

/* ==========================================================================
   Dynamic Report View Styles
   ========================================================================== */

/* Main container for the dynamically viewed report content */
.report-dynamic-view-section .container { /* Assuming .container provides max-width and centering */
    background-color: var(--card-bg); /* Use card background for the report body */
    border: 1px solid var(--border);
    border-radius: var(--border-radius-lg, 12px); /* Use existing or a new variable for consistency */
    padding: 2rem 2.5rem; /* Generous padding for readability */
    margin-top: 2rem;
    margin-bottom: 3rem;
    box-shadow: var(--shadow-md, 0 4px 12px rgba(0,0,0,0.08)); /* Use existing or define a shadow variable */
}

/* Header section within the report (Title) */
.report-dynamic-view-section .report-header-main {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-light, var(--border)); /* Use a light border or default */
}

.report-dynamic-view-section .report-header-main h1 {
    font-family: 'Playfair Display', serif; /* Consistent with site H1 */
    color: var(--gold); 
    font-size: 2.4rem; /* Adjust size as needed for report title */
    font-weight: 600;
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

/* Divider lines */
.report-dynamic-view-section hr.report-header-divider, 
.report-dynamic-view-section hr.report-content-divider {
    border: none;
    height: 1px;
    background-color: var(--border-light, var(--border));
    margin: 2.5rem 0;
}

/* General styling for content blocks */
.report-dynamic-view-section .report-content-blocks-area .content-block {
    margin-bottom: 2em; /* Consistent spacing between blocks */
}

/* --- Headings within Report Content --- */
.report-dynamic-view-section .report-heading-block h1.report-main-title-dynamic, /* For H1 inside content (if used) */
.report-dynamic-view-section .report-heading-block h2.report-category-title-dynamic,
.report-dynamic-view-section .report-heading-block h3.report-subcategory-title-dynamic {
    font-family: 'Playfair Display', serif; /* Main heading font */
    color: var(--text-heading, var(--text)); /* Use a specific heading text color or default */
    margin-top: 2.5em;  /* More space above major headings */
    margin-bottom: 1em;
    padding-bottom: 0.4em;
    border-bottom: 1px solid var(--border-light, var(--border));
    line-height: 1.3;
}
.report-dynamic-view-section .report-heading-block .content-block:first-child h1,
.report-dynamic-view-section .report-heading-block .content-block:first-child h2,
.report-dynamic-view-section .report-heading-block .content-block:first-child h3 {
    margin-top: 0; /* Remove top margin if it's the very first block */
}


.report-dynamic-view-section .report-heading-block h2.report-category-title-dynamic {
    font-size: 1.9rem; /* Example */
    color: var(--gold); /* Make category titles prominent */
    font-weight: 500;
}

.report-dynamic-view-section .report-heading-block h3.report-subcategory-title-dynamic {
    font-size: 1.6rem; /* Example */
    color: var(--text-heading-muted, var(--text)); /* Slightly less prominent */
    font-weight: 500;
}

/* AI-Generated Headings (H4-H6) */
.report-dynamic-view-section .report-heading-block .ai-gen-heading-dynamic {
    font-family: var(--font-primary, 'Inter', sans-serif); /* Primary/sans-serif font */
    color: var(--text);
    margin-top: 2em;
    margin-bottom: 0.8em;
    font-weight: 600; /* Bold for sub-sub-headings */
    line-height: 1.4;
}
.report-dynamic-view-section .report-heading-block.level-4 .ai-gen-heading-dynamic,
.report-dynamic-view-section .report-heading-block h4.ai-gen-heading-dynamic { 
    font-size: 1.3rem; 
}
.report-dynamic-view-section .report-heading-block.level-5 .ai-gen-heading-dynamic,
.report-dynamic-view-section .report-heading-block h5.ai-gen-heading-dynamic { 
    font-size: 1.15rem; 
}
.report-dynamic-view-section .report-heading-block.level-6 .ai-gen-heading-dynamic,
.report-dynamic-view-section .report-heading-block h6.ai-gen-heading-dynamic { 
    font-size: 1.05rem; 
    font-style: italic; 
    font-weight: 500;
}


/* --- Paragraph Text --- */
.report-dynamic-view-section .report-text-block p {
    font-family: var(--font-secondary, 'Lato', sans-serif); /* Secondary/body font */
    color: var(--text);
    font-size: 1rem; /* Standard body text size, ensure it's defined in :root or body */
    line-height: 1.75; /* Generous line height for readability */
    margin-bottom: 1.25em; /* Space after paragraphs */
}
.report-dynamic-view-section .report-text-block p:last-child {
    margin-bottom: 0;
}

/* --- Lists --- */
.report-dynamic-view-section .report-list-block .list-intro {
    font-family: var(--font-secondary, 'Lato', sans-serif);
    color: var(--text);
    margin-bottom: 0.75em;
    font-style: italic;
    line-height: 1.7;
}

.report-dynamic-view-section .report-list-block ul,
.report-dynamic-view-section .report-list-block ol {
    font-family: var(--font-secondary, 'Lato', sans-serif);
    color: var(--text);
    margin-left: 1.5em; 
    padding-left: 1.2em; 
    margin-bottom: 1.25em;
    line-height: 1.75;
}

.report-dynamic-view-section .report-list-block li {
    margin-bottom: 0.6em;
    padding-left: 0.5em; 
}

.report-dynamic-view-section .report-list-block ul li::marker {
    color: var(--gold); 
}
.report-dynamic-view-section .report-list-block ol li::marker {
    color: var(--gold);
    font-weight: 600;
}

/* --- Error Messages for Blocks --- */
.report-dynamic-view-section .error-message {
    background-color: var(--danger-bg-tint, #fff0f0); 
    color: var(--danger-text, #c53030);
    border: 1px solid var(--danger-border, #f56565);
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius-md, 8px);
    margin-bottom: 1.5em;
    font-family: var(--font-secondary, 'Lato', sans-serif);
}
.report-dynamic-view-section .error-message strong {
    font-weight: bold;
    color: var(--danger-text-strong, var(--danger-text));
}
.report-dynamic-view-section .error-message pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 250px;
    overflow-y: auto;
    background-color: var(--code-bg, #f7fafc); 
    padding: 0.8em 1em;
    border-radius: var(--border-radius-sm, 4px);
    margin-top: 0.8em;
    font-family: var(--font-mono, 'Courier New', Courier, monospace); 
    font-size: 0.85em;
    color: var(--code-text, var(--text-muted));
    border: 1px solid var(--border-light, var(--border));
}

/* --- Unknown Block Fallbacks --- */
.report-dynamic-view-section .unknown-block-type p,
.report-dynamic-view-section .unknown-block-as-text p,
.report-dynamic-view-section .unknown-block-as-list ul li {
    font-style: italic;
    color: var(--text-muted);
}

/* Ensure the main content area has enough vertical space */
.report-dynamic-view-section {
    padding-bottom: 3rem; /* Extra space at the bottom of the report section */
}

/* === NEW STYLES FOR SIDEBAR TOC AND LAYOUT === */
.report-toc-sidebar {
    background-color: var(--secondary);
    padding: 1.5rem;
    margin-bottom: 2rem; /* For mobile view where it's not a sidebar */
    border-radius: 8px;
    border: 1px solid var(--border);
}

.report-toc-sidebar h2 {
    font-family: 'Playfair Display', serif;
    color: var(--gold);
    font-size: 1.2rem;
    margin-top: 0;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-light, var(--border));
    padding-bottom: 0.5rem;
}

.report-toc-sidebar ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}

.report-toc-sidebar li {
    margin-bottom: 0.25rem;
}

.report-toc-sidebar li a {
    text-decoration: none;
    color: var(--text);
    transition: color 0.2s ease, background-color 0.2s ease, border-left-color 0.2s ease, padding-left 0.2s ease;
    display: block;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    border-left: 3px solid transparent;
}

.report-toc-sidebar li a:hover {
    color: var(--gold);
    background-color: var(--card-hover-bg); /* Ensure var defined or use fallback */
}

.report-toc-sidebar li a.active {
    color: var(--gold);
    font-weight: bold;
    background-color: var(--primary); /* Ensure var defined or use fallback */
    border-left-color: var(--gold);
    padding-left: calc(0.8rem - 3px + 0.5rem); /* Adjust if base padding changes */
}

.report-toc-sidebar .toc-level-1 a.active {
    font-weight: bold;
}

.report-toc-sidebar .toc-level-2 {
    padding-left: 1em;
}
.report-toc-sidebar .toc-level-2 a {
    font-size: 0.9em;
}
.report-toc-sidebar .toc-level-2 a.active {
    font-weight: bold;
}

hr.report-toc-divider { /* This was for the top TOC, hide if not used or for sidebar */
    display: none;
}

/* Layout for TOC and Main Content (Desktop) */
@media (min-width: 992px) { /* Adjust breakpoint as needed */
    .report-layout-container {
        display: flex;
        gap: 2.5rem;
    }

    .report-toc-sidebar {
        flex: 0 0 260px; /* Fixed width for TOC */
        margin-bottom: 0;
        position: sticky;
        top: 80px; /* Adjust based on your navbar height + desired spacing */
        align-self: flex-start;
        max-height: calc(100vh - 100px); /* Adjust top + bottom desired clearance */
        overflow-y: auto;
    }

    .report-main-column {
        flex: 1;
        min-width: 0; /* Prevents content from overflowing container */
    }
}

/* Smooth scrolling for anchor links - ensure this is present or add it if not */
html {
  scroll-behavior: smooth;
}

/* ====================================================================
   COMPLETE TOC STYLES - Replace your entire TOC section with this
   ==================================================================== */

/* MOBILE TOC - FIXED TO TOP */
.mobile-toc {
    display: none;
    position: fixed;
    bottom: 0;        /* Changed from top: 80px */
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    border-top: 1px solid var(--border);    /* Changed from border-bottom */
    z-index: 50;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
}

.mobile-toc-content {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    height: 100%;
}

.mobile-section {
    position: absolute;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
    opacity: 0;
    color: var(--text);
    font-weight: 400;
}

.mobile-section.active {
    opacity: 1;
    color: var(--gold);
    border-bottom-color: var(--gold);
    font-weight: 600;
    position: relative;
}

.mobile-section.prev,
.mobile-section.next {
    display: none;
}

.mobile-arrow {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    padding: 0.75rem 1rem;
    position: relative;
    overflow: hidden;
    min-width: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-arrow::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--card-glow-gradient);
    transition: left 0.6s ease;
    z-index: 1;
}

.mobile-arrow:hover::before {
    left: 100%;
}

.mobile-arrow:hover {
    color: var(--gold);
    background: var(--card-hover-bg);
    border-color: var(--card-hover-border);
    transform: scale(1.03) translateY(-2px);
    box-shadow: 0 5px 10px var(--card-shadow);
}

.mobile-arrow:disabled {
    background: transparent;
    border-color: var(--text-muted);
    color: var(--text-muted);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.5;
}

.mobile-arrow:disabled::before {
    display: none;
}

.mobile-arrow {
    position: relative;
    z-index: 2;
}

/* DESKTOP TOC - RESTORE ORIGINAL PERFECT VERSION */
.report-toc-sidebar {
    flex: 0 0 320px;
    background: linear-gradient(145deg, var(--secondary), var(--primary));
    border: 1px solid var(--border);
    box-shadow: 0 8px 32px var(--card-shadow);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    position: sticky;
    top: 100px;
    height: calc(100vh - 120px);
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0;
    scroll-behavior: smooth;
}

.report-toc-sidebar:hover {
    box-shadow: 0 12px 48px var(--card-shadow);
    transform: translateY(-2px);
}

.report-toc-sidebar::-webkit-scrollbar { 
    display: none; 
}

.report-toc-sidebar { 
    scrollbar-width: none; 
    -ms-overflow-style: none; 
}

.desktop-toc-item {
    display: block;
    padding: 1.25rem 2rem;
    color: var(--text);
    cursor: pointer;
    border-left: 4px solid transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    font-weight: 400;
    letter-spacing: 0.3px;
    line-height: 1.4;
}

.desktop-toc-item:last-child {
    border-bottom: none;
}

.desktop-toc-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--card-glow-gradient);
    transition: left 0.6s ease;
    z-index: 1;
}

.desktop-toc-item:hover::before {
    left: 100%;
}

.desktop-toc-item:hover {
    color: var(--gold);
    background: var(--card-hover-bg);
    border-left-color: var(--gold);
    transform: translateX(8px);
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.2);
}

.desktop-toc-item.active {
    color: var(--gold);
    background: var(--card-hover-bg);
    border-left-color: var(--gold);
    font-weight: 600;
    box-shadow: inset 4px 0 0 var(--gold), 0 2px 12px rgba(212, 175, 55, 0.15);
    transform: translateX(4px);
}

.desktop-toc-item.active::after {
    content: '●';
    position: absolute;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gold);
    animation: tocPulse 2s infinite;
    z-index: 2;
}

.desktop-toc-item {
    position: relative;
    z-index: 2;
}

@keyframes tocPulse {
    0%, 100% { 
        opacity: 1; 
        transform: translateY(-50%) scale(1); 
    }
    50% { 
        opacity: 0.6; 
        transform: translateY(-50%) scale(1.2); 
    }
}

/* RESPONSIVE - SIMPLE AND CLEAN */
@media (max-width: 991px) {
    .report-toc-sidebar { 
        display: none !important; 
    }
    
    .mobile-toc { 
        display: flex !important; 
    }
}

@media (min-width: 992px) {
    .mobile-toc {
        display: none !important;
    }
}

/* LIGHT MODE ADJUSTMENTS */
body.light-mode .mobile-arrow {
    border-color: var(--border);
    color: var(--text);
}

body.light-mode .mobile-arrow:hover {
    color: var(--gold);
    border-color: var(--card-hover-border);
}

body.light-mode .mobile-arrow:disabled {
    border-color: var(--text-muted);
    color: var(--text-muted);
}

/* === RESPONSIVE DESIGN === */
@media (max-width: 1200px) {
    .suggestions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-container {
        flex-direction: column; 
        padding: 10px;
    }

    .nav-left, .nav-right {
        margin-bottom: 10px; 
    }
    
    .nav-left {
        margin-bottom: 15px; 
    }

    .nav-right {
        margin-top: 0; 
    }
    
    nav a, .credits-badge, .theme-toggle-button-item { 
        margin: 5px; 
    }

    h1 { 
        font-size: 2rem;
    }
    
    .nav-logo { 
        height: 35px !important;
    }
    
    .logo-link {
        margin-right: 10px !important;
        padding: 0.4rem !important;
    }
    
    .nav-link {
        padding: 6px 12px !important;
        margin: 3px !important;
        font-size: 0.9rem;
    }
    
    .credits-badge {
        padding: 5px 10px !important;
        margin-right: 8px !important;
        font-size: 0.85rem;
    }
    
    .theme-toggle-button {
        padding: 6px !important;
    }

    .hero {
        min-height: 70vh;
        padding: 1.5rem 1.5rem 1rem; /* Reduced bottom padding */
    }
    
    .section { 
        padding: 1.5rem 1.5rem; /* Further reduced for mobile */
    } 
    
    .section-header { 
        margin-bottom: 1.5rem; /* Reduced spacing */
    }
    
    .hero-logo {
        margin-bottom: 1rem; /* Further reduced */
    }
    
    .hero-logo-img {
        max-width: 250px;
    }
    
    .reference-text {
        font-size: 1.2rem;
    }
    
    .hero-content {
        margin-bottom: 0.75rem;
    }
    
    .verse-reference {
        margin-bottom: 1rem;
    }
    
    .share-container { 
        padding: 1.5rem 1rem; 
    }
    
    .share-text { font-size: clamp(1.5rem, 3vw, 2rem); }
    .social-buttons { gap: 0.75rem; }
    .social-button { padding: 0.6rem 1rem; }

    .dashboard-hero {
        min-height: auto;
        padding: 1rem 1.5rem 0.5rem;
    }
    
    .dashboard-layout {
        gap: 2rem;
        padding: 1.5rem;
    }
    
    .main-actions-row {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .suggestions-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .action-card {
        padding: 1.5rem;
        min-height: 140px;
    }
    
    .suggestion-card {
        padding: 1.25rem;
        min-height: 160px;
    }
}

@media (max-width: 480px) { 
    nav a, .credits-badge, .theme-toggle-button {
        padding: 6px 10px; 
        font-size: 0.9rem; 
    }
    .nav-logo {
        height: 30px !important; 
    }
    .credits-badge {
        margin-right: 5px; 
    }
    
    .logo-link {
        padding: 0.3rem !important;
    }
    
    .nav-link {
        padding: 5px 10px !important;
        font-size: 0.85rem;
    }
    
    .credits-badge {
        padding: 4px 8px !important;
        margin-right: 5px !important;
        font-size: 0.8rem;
    }

    .hero {
        min-height: 60vh;
        padding: 1rem 1rem 0.5rem; /* Minimal bottom padding */
    }
    
    .section { 
        padding: 1rem 1rem; /* Minimal padding for mobile */
    }
    
    .section-header { 
        margin-bottom: 1rem; /* Further reduced */
    }
    
    .hero-logo-img {
        max-width: 200px;
    }
    
    .hero-logo {
        margin-bottom: 0.75rem;
        padding: 0.5rem;
    }
    
    .verse-reference {
        padding: 0.75rem 1.5rem;
        margin-bottom: 0.75rem;
    }
    
    .reference-text {
        font-size: 1rem;
    }
    
    .hero-content {
        margin-bottom: 0.5rem;
    }
    
    .cta-description {
        margin-bottom: 1.5rem;
    }
    
    .hero-title { font-size: 2.2rem; }
    .hero-subtitle { font-size: 0.95rem; }
    .section-title { font-size: 1.7rem; }
    .section-description { font-size: 0.85rem; }
    .focus-area-title { font-size: 1.05rem; }
    .feature-title { font-size: 1rem; }
    .cta-title { font-size: 1.7rem; }
    .cta-button { padding: 1rem 2rem; font-size: 0.8rem; }
    .social-buttons { grid-template-columns: 1fr; }

    .dashboard-hero {
        min-height: 40vh;
        padding: 0.75rem 1rem 0.25rem;
    }
    
    .dashboard-hero .hero-logo-img {
        max-width: 150px;
    }
    
    .dashboard-layout {
        padding: 1rem;
        gap: 1.5rem;
    }
    
    .action-card {
        padding: 1.25rem;
        min-height: 120px;
    }
    
    .suggestion-card {
        padding: 1rem;
        min-height: 140px;
    }
    
    .action-title {
        font-size: 1.2rem;
        margin-bottom: 0.75rem;
    }
    
    .suggestion-title {
        font-size: 1rem;
    }
    
    .action-description {
        font-size: 0.9rem;
    }
    
    .suggestion-description {
        font-size: 0.8rem;
    }
}

/* === PRINT STYLES === */
@media print {
    body {
        font-family: 'Times New Roman', Times, serif;
        font-size: 12pt;
        color: #000000 !important;
        background-color: #ffffff !important;
        margin: 0;
        padding: 0;
    }

    nav,
    footer,
    .theme-toggle-button-item,
    .report-toc-sidebar, /* Hide sidebar TOC in print */
    .flashes,
    .report-dynamic-view-section .report-header-main .btn,
    .btn,
    .action-card,
    .credits-badge,
    .search-form /* Assuming this class exists for search forms */
     {
        display: none !important;
    }

    .report-dynamic-view-section .container,
    .report-dynamic-view-section,
    /* .section, */ /* Commenting out .section as it might be too broad for print reset */
    .container {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        box-shadow: none !important;
        background-color: #ffffff !important;
    }

    /* Ensure the report-layout-container and main-column don't constrain print width */
    .report-layout-container, .report-main-column {
        display: block !important; /* Override flex for print */
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .report-dynamic-view-section .report-header-main h1 {
        font-size: 20pt !important;
        color: #000000 !important;
        text-align: left !important;
        border-bottom: 2px solid #000000 !important;
        margin-bottom: 0.5in !important;
        padding-left: 0.75in; 
        padding-right: 0.75in;
        box-sizing: border-box;
    }

    .report-dynamic-view-section .report-content-blocks-area {
        padding: 0 0.75in 0.75in 0.75in; 
        box-sizing: border-box;
    }

    .report-dynamic-view-section .report-heading-block h1.report-main-title-dynamic,
    .report-dynamic-view-section .report-heading-block h2.report-category-title-dynamic,
    .report-dynamic-view-section .report-heading-block h3.report-subcategory-title-dynamic,
    .report-dynamic-view-section .report-heading-block .ai-gen-heading-dynamic,
    .report-dynamic-view-section .report-heading-block.old-format h1,
    .report-dynamic-view-section .report-heading-block.old-format h2,
    .report-dynamic-view-section .report-heading-block.old-format h3,
    .report-dynamic-view-section .report-heading-block.old-format h4,
    .report-dynamic-view-section .report-heading-block.old-format h5,
    .report-dynamic-view-section .report-heading-block.old-format h6 {
        color: #000000 !important;
        border-bottom: 1px solid #cccccc !important;
        page-break-after: avoid;
        page-break-inside: avoid;
        margin-top: 0.4in;
    }
    .report-dynamic-view-section .report-content-blocks-area > .content-block:first-child,
    .report-dynamic-view-section .report-content-blocks-area > div:first-child > .report-heading-block {
        margin-top: 0 !important;
    }

    .report-dynamic-view-section .report-heading-block h1.report-main-title-dynamic,
    .report-dynamic-view-section .report-heading-block.old-format h1 {
        font-size: 16pt !important;
        page-break-before: auto; 
    }
    .report-dynamic-view-section .report-heading-block h2.report-category-title-dynamic,
    .report-dynamic-view-section .report-heading-block.old-format h2 {
        font-size: 14pt !important;
        page-break-before: auto; 
    }
    .report-dynamic-view-section .report-heading-block h3.report-subcategory-title-dynamic,
    .report-dynamic-view-section .report-heading-block.old-format h3 {
        font-size: 13pt !important;
    }
    .report-dynamic-view-section .report-heading-block .ai-gen-heading-dynamic,
    .report-dynamic-view-section .report-heading-block.old-format h4,
    .report-dynamic-view-section .report-heading-block.old-format h5,
    .report-dynamic-view-section .report-heading-block.old-format h6 {
        font-size: 12pt !important;
        border-bottom-style: dotted !important;
    }

    .report-dynamic-view-section .report-text-block p {
        color: #000000 !important;
        font-size: 12pt !important;
        line-height: 1.5 !important;
        orphans: 3;
        widows: 3;
    }

    .report-dynamic-view-section .report-list-block ul,
    .report-dynamic-view-section .report-list-block ol {
        color: #000000 !important;
        page-break-inside: avoid;
    }
    .report-dynamic-view-section .report-list-block li {
         color: #000000 !important;
    }
    .report-dynamic-view-section .report-list-block ul li::marker,
    .report-dynamic-view-section .report-list-block ol li::marker {
        color: #000000 !important;
    }

    .report-dynamic-view-section hr.report-content-divider {
         display: none !important;
    }

    a {
        text-decoration: none;
        color: #000000 !important;
    }
    /* Optional: Show full URLs for links in print */
    /*
    .report-text-block a[href^="http"]::after,
    .report-list-block a[href^="http"]::after {
        content: " (" attr(href) ")";
        font-size: 10pt;
        color: #333333 !important;
        word-break: break-all;
    }
    */

    img {
        max-width: 100% !important;
        page-break-inside: avoid;
    }

    .report-dynamic-view-section .error-message,
    .report-dynamic-view-section .unknown-block-type,
    .report-dynamic-view-section .unknown-block-as-text,
    .report-dynamic-view-section .unknown-block-as-list {
         border: 1px dashed #cccccc !important;
         color: #666666 !important;
         padding: 0.5em;
         font-size: 10pt;
    }

    .report-dynamic-view-section .report-header-main {
        border-bottom: none !important; 
        margin-bottom: 0 !important; 
        padding-bottom: 0 !important;
    }
}