/*
Theme Name: Agora
Description: Custom Agora theme using WordPress templates and editable content.
Version: 2.0.0
*/
/* =========================================
   1. CORE VARIABLES & GLOBAL RESET
   ========================================= */
:root {
    /* Colors */
    --bg-color: #fcfcfc;
    --text-main: #2d2d2d;
    --text-muted: #5e5e5e;
    --accent-color: #2b5c8a;
    --accent-hover: #1a3c5e;
    --border-light: #e0e0e0;

    /* Fonts */
    --font-serif: 'Georgia', 'Times New Roman', serif;
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

    /* Layout Dimensions */
    --sidebar-width: 300px;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-serif);
    margin: 0;
    padding: 0;
    font-size: 18px; /* Senior-friendly base size */
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

/* Global Link Styles */
a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

a:focus-visible {
    outline: 3px solid rgba(43, 92, 138, 0.45);
    outline-offset: 3px;
    border-radius: 4px;
}

/* Accessibility: Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition: none !important; }
}

/* Container Utility */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}


/* =========================================
   2. NAVIGATION STYLES
   (Note: Your WP Theme might override these. 
   Use these classes if building a custom header block.)
   ========================================= */
.agora-nav {
    padding: 0;
    height: 70px;
    border-bottom: 1px solid var(--border-light);
    font-family: var(--font-sans);
    background: rgba(252, 252, 252, 0.98);
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-weight: 700;
    font-size: 1.4rem;
    letter-spacing: -0.5px;
    color: var(--text-main);
}

.nav-links {
    display: flex;
    gap: 2rem;
    height: 70px;
    align-items: center;
}

.nav-link {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 500;
    position: relative;
    padding: 24px 0;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

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

/* Dropdown Menu */
.has-dropdown { position: relative; }

.dropdown-menu {
    position: absolute;
    top: 95%;
    left: -15px;
    background: white;
    min-width: 200px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.has-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    padding: 10px 20px;
    font-size: 0.95rem;
    color: var(--text-muted);
    transition: background 0.1s ease;
}

.dropdown-item:hover {
    background-color: #f7f9fc;
    color: var(--accent-color);
}

.chevron {
    font-size: 0.7em;
    transition: transform 0.2s ease;
    margin-top: 2px;
}

.has-dropdown:hover .chevron {
    transform: rotate(180deg);
}


/* =========================================
   3. HERO SECTIONS (Editorial Fade)
   ========================================= */
.hero-section {
    position: relative;
    min-height: 550px; /* Adjust as needed */
    display: flex;
    align-items: center;
    overflow: hidden;
    /* IMPORTANT: Replace 'hero.jpg' with your actual media library URL in WP */
    background-image: url('agora-hero.jpg'); 
    background-size: cover;
    background-position: center right;
    background-repeat: no-repeat;
    margin-bottom: 3rem;
    border-bottom: 1px solid var(--border-light);
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    /* The Magic Gradient Mask */
    background: linear-gradient(90deg, 
        #fcfcfc 30%, 
        rgba(252,252,252,0.95) 45%, 
        rgba(252,252,252,0.6) 60%, 
        rgba(252,252,252,0) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
    padding-right: 2rem;
}

.hero-content h1 {
    font-size: 3.8rem;
    font-weight: 400;
    margin-bottom: 1rem;
    line-height: 1.1;
    color: #111;
    letter-spacing: -1px;
}

.hero-content p {
    font-size: 1.35rem;
    color: #444;
    margin-bottom: 2rem;
    line-height: 1.6;
    font-family: var(--font-serif);
}

/* Hero Search "Omnibox" */
.hero-search-wrapper {
    background: white;
    border-radius: 50px;
    padding: 4px;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e0e0e0;
    max-width: 500px;
    transition: all 0.2s ease;
    margin-bottom: 1.5rem;
}

.hero-search-wrapper:focus-within {
    border-color: var(--accent-color);
    box-shadow: 0 4px 20px rgba(43, 92, 138, 0.15);
}

.search-icon {
    padding-left: 16px;
    color: #1f1f1f;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 22px;
}

.search-icon svg {
    width: 20px;
    height: 20px;
    display: block;
}

.hero-search-input {
    border: none;
    background: transparent;
    font-size: 1rem;
    padding: 12px;
    flex-grow: 1;
    outline: none;
    font-family: var(--font-sans);
    color: #333;
}

.search-submit-btn, .search-btn, .cta-button {
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 40px;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-sans);
    transition: background 0.2s ease, transform 0.2s ease;
}

.search-submit-btn:hover, .search-btn:hover, .cta-button:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
}

/* "Browse" text link */
.browse-link {
    font-family: var(--font-sans);
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 600;
    display: inline-block;
    margin-left: 10px;
}
.browse-link:hover {
    color: var(--accent-color);
    text-decoration: underline;
}


/* =========================================
   4. LAYOUT: LIBRARY GRID (Homepage)
   ========================================= */
.library-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 4rem;
    padding: 2rem 0 6rem 0;
}

.grid-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: transform 0.2s ease;
    cursor: pointer;
    padding-right: 1rem;
    border-top: 1px solid transparent;
}

.grid-item:hover .item-title { color: var(--accent-color); }
.grid-item:hover .arrow-icon { transform: translateX(5px); opacity: 1; color: var(--accent-color); }

.item-category {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #999;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.item-title-wrapper { display: flex; align-items: baseline; gap: 8px; }

.item-title {
    font-size: 1.6rem;
    font-weight: 400;
    margin: 0;
    line-height: 1.3;
    color: #222;
    transition: color 0.2s ease;
}

.arrow-icon {
    font-family: var(--font-sans);
    font-size: 1.2rem;
    color: #ccc;
    opacity: 0.5;
    transition: all 0.2s ease;
    font-weight: 300;
}

.item-desc {
    font-size: 1.05rem;
    color: var(--text-muted);
    margin: 0;
    margin-top: 0.5rem;
    line-height: 1.5;
}


/* =========================================
   5. LAYOUT: NEWSPAPER INDEX (Category Pages)
   ========================================= */
.index-container {
    column-count: 3;
    column-gap: 4rem;
    padding-bottom: 6rem;
}

.alpha-section {
    break-inside: avoid;
    margin-bottom: 2rem;
}

.alpha-header {
    font-family: var(--font-sans);
    font-size: 2rem;
    font-weight: 800;
    color: #e0e0e0;
    margin: 0 0 0.5rem 0;
    line-height: 1;
}

.topic-link {
    display: block;
    font-family: var(--font-serif);
    font-size: 1.1rem;
    color: #222;
    padding: 4px 0;
    border-bottom: 1px solid transparent;
    line-height: 1.3;
}

.topic-link:hover {
    color: var(--accent-color);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
}


/* =========================================
   6. LAYOUT: ARTICLE READER (Single Post)
   ========================================= */
.article-layout {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    gap: 5rem;
    padding: 2rem 0 8rem 0;
    align-items: start;
}

.article-layout--fullwidth {
    grid-template-columns: 1fr;
    gap: 0;
}

.article-layout--fullwidth .article-content {
    max-width: none;
}

/* Breadcrumbs */
.breadcrumbs {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    margin-top: 2rem;
}
.breadcrumbs a:hover { color: var(--accent-color); text-decoration: underline; }

/* Sticky TOC Sidebar */
.toc-sidebar {
    position: sticky;
    top: 132px;
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.45;
    border-right: 1px solid var(--border-light);
    padding-right: 1.5rem;
    max-height: 80vh;
    overflow-y: auto;
}

.toc-header {
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.75rem;
    color: #404040;
    margin-bottom: 1rem;
    font-weight: 700;
}

.toc-list { list-style: none; padding: 0; margin: 0; }
.toc-list li { margin-bottom: 0.9rem; }
.toc-list a { color: #404040; display: block; }
.toc-list a:hover, .toc-list a.active { color: var(--accent-color); }

.toc-list--chapters-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.45rem 0.5rem;
}

.toc-list--chapters-grid li {
    margin-bottom: 0;
}

.toc-list--chapters-grid .toc-link {
    text-align: left;
    font-variant-numeric: tabular-nums;
}

.toc-sublist {
    list-style: none;
    margin: 0.45rem 0 0.2rem 0.75rem;
    padding-left: 0.75rem;
    border-left: 1px solid var(--border-light);
}

.toc-sublist li {
    margin-bottom: 0.55rem;
    margin-left: 10px;
}

.toc-link--h3 {
    font-size: 0.93em;
    color: #5f5f5f;
}

/* Article Header Area */
.article-content { max-width: 55ch; }
.article-header { margin-bottom: 3.5rem; }

.kicker {
    font-family: var(--font-sans);
    text-transform: uppercase;
    color: var(--accent-color);
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    display: block;
}

/* Master Article Typography */
.article-body p { margin-bottom: 1.8rem; font-size: 1.15rem; color: #333; }

.article-body a {
    color: var(--accent-color);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 2px;
    transition: color 0.2s ease;
}
.article-body a:hover { color: var(--accent-hover); }

.article-body h2 {
    font-family: var(--font-sans);
    font-size: 1.7rem;
    margin-top: 4rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    color: #111;
    letter-spacing: -0.5px;
    scroll-margin-top: 100px;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5rem;
}

.article-body h3 {
    font-family: var(--font-sans);
    font-size: 1.3rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
    color: #333;
}

.lead-paragraph {
    font-size: 1.35rem;
    line-height: 1.6;
    color: #222;
    font-weight: 400;
    margin-bottom: 2.5rem;
}

.article-body ul { margin-bottom: 2rem; padding-left: 1.2rem; }
.article-body li { margin-bottom: 1rem; padding-left: 0.5rem; font-size: 1.15rem; }

/* Pull Quotes */
.pull-quote, blockquote {
    border-left: 4px solid var(--accent-color);
    padding: 1.5rem;
    margin: 2.5rem 0;
    background: #f8fbff;
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1.25rem;
    color: #222;
    border-radius: 0 4px 4px 0;
}

/* Reference Bubbles */
.ref-link {
    font-family: var(--font-sans);
    font-size: 0.8em;
    color: var(--accent-color);
    background: #eff6fb;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    margin-left: 5px;
    text-decoration: none !important;
}
.ref-link:hover { background: #dbeaf5; }


/* =========================================
   7. UTILITIES & FOOTER
   ========================================= */
/* Scroll Progress Bar */

/* Chapter Bottom Nav */
.chapter-nav {
    margin-top: 5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    font-family: var(--font-sans);
}
.nav-btn { display: block; max-width: 45%; }
.nav-label { font-size: 0.75rem; text-transform: uppercase; color: #999; letter-spacing: 1px; font-weight: 700; margin-bottom: 0.5rem; display: block; }
.nav-title { font-size: 1.1rem; color: var(--accent-color); font-weight: 600; line-height: 1.3; }
.nav-btn:hover .nav-title { text-decoration: underline; }
.nav-btn.next { text-align: right; margin-left: auto; }

/* Footer */
footer {
    background-color: #f4f4f4;
    padding: 4rem 0;
    margin-top: 4rem;
    font-family: var(--font-sans);
}
.footer-content { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 2rem; }
.footer-col h4 { font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 1rem; color: #666; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 0.75rem; color: #555; }


/* =========================================
   8. RESPONSIVE ADJUSTMENTS
   ========================================= */
@media (max-width: 900px) {
    /* Hero */
    .hero-section {
        min-height: auto;
        padding: 3rem 0;
        background-position: top center;
        flex-direction: column;
    }
    .hero-overlay {
        background: linear-gradient(180deg, rgba(252,252,252,0.85) 0%, #fcfcfc 60%);
    }
    .hero-content {
        max-width: 100%;
        text-align: center;
        padding-top: 150px;
        padding-right: 0;
    }
    .hero-content h1 { font-size: 2.5rem; }
    .hero-search-wrapper { margin: 0 auto 1.5rem auto; }
    
    /* Layouts */
    .article-layout { grid-template-columns: 1fr; gap: 2rem; }
    .index-container { column-count: 2; column-gap: 2rem; }
    
    /* Sidebar Mobile */
    .toc-sidebar {
        position: relative; top: 70px;
        border-right: none; border-bottom: 1px solid var(--border-light);
        padding: 1.5rem 0; background: #f9f9f9; padding-left: 1rem; max-height: 300px;
    }
    .toc-list { display: grid; grid-template-columns: 1fr; gap: 5px; }
    
    /* Hide Desktop Nav Elements */
    .nav-links { display: none; } /* Use Theme's mobile hamburger instead */
}

@media (max-width: 600px) {
    .index-container { column-count: 1; }
}
/* WordPress content helpers */
.home-editable-content {
  padding: 2rem 0 6rem 0;
}
.home-editable-content .library-grid {
  padding: 0;
}
.toc-sidebar--empty {
  border-right: none;
  min-height: 1px;
}

/* Primary WP menu rendering in header */
.nav-links .agora-menu,
.nav-links .agora-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links .agora-menu {
    display: flex;
    gap: 2rem;
    height: 70px;
    align-items: center;
}

.nav-links .agora-menu > li {
    position: relative;
    height: 70px;
    display: flex;
    align-items: center;
}

.nav-links .agora-menu > li > a.nav-link {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 500;
    position: relative;
    padding: 24px 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.nav-links .agora-menu > li:hover > a.nav-link {
    color: var(--accent-color);
}

.nav-links .agora-menu > li.menu-item-has-children > a.nav-link::after {
    content: "▼";
    font-size: 0.7em;
    margin-left: 4px;
    margin-top: 2px;
    transition: transform 0.2s ease;
}

.nav-links .agora-menu > li.menu-item-has-children:hover > a.nav-link::after {
    transform: rotate(180deg);
}

.nav-links .agora-menu .dropdown-menu {
    position: absolute;
    top: 95%;
    left: -15px;
    background: white;
    min-width: 200px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s cubic-bezier(0.165, 0.84, 0.44, 1);
    z-index: 1001;
}

.nav-links .agora-menu > li:hover > .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-links .agora-menu .dropdown-menu > li > a.nav-link {
    display: block;
    padding: 10px 20px;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.nav-links .agora-menu .dropdown-menu > li > a.nav-link:hover {
    background-color: #f7f9fc;
    color: var(--accent-color);
}

/* Enforce consistent top-of-article header styling (matches article.html). */
.article-header h1 {
    font-family: var(--font-serif);
    font-size: 3rem;
    line-height: 1.1;
    font-weight: 400;
    margin: 0 0 1.5rem 0;
    color: #111;
    letter-spacing: 0;
}

.article-header .meta {
    font-family: var(--font-sans);
    color: var(--text-muted);
    font-size: 0.85rem;
    display: flex;
    gap: 1rem;
    align-items: center;
    border-top: 1px solid var(--border-light);
    padding-top: 1.5rem;
}

@media (max-width: 900px) {
    .article-header h1 {
        font-size: 2.2rem;
    }
}

/* Progress bar for single article pages only (markup exists in single-article.php). */
#progress-container {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    height: 4px;
    z-index: 9999;
    background: rgba(44, 92, 138, 0.18);
    pointer-events: none;
}

#progress-bar {
    width: 0%;
    height: 100%;
    background: var(--accent-color);
    transition: width 0.08s linear;
}

body.admin-bar #progress-container {
    top: 102px;
}

@media (max-width: 782px) {
    body.admin-bar #progress-container {
        top: 116px;
    }
}

body.admin-bar .agora-nav {
    top: 32px;
}

@media (max-width: 782px) {
    body.admin-bar .agora-nav {
        top: 46px;
    }
}

/* Book chapter sidebar states */
.book-chapter-list .book-chapter-current > .toc-link--chapter {
    color: var(--accent-color);
    font-weight: 700;
}

.book-chapter-list .toc-sublist {
    margin-top: 0.5rem;
}

/* Book archive list */
/* Book archive list */
.alpha-section--books {
    max-width: none;
    column-count: 3;
    column-gap: 2.25rem;
}

.alpha-section--books .book-archive-item {
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
    page-break-inside: avoid;
    margin: 0 0 0.85rem;
}

.alpha-section--books .topic-link--book {
    display: block;
    font-size: 1.35rem;
    font-weight: 600;
    line-height: 1.15;
    margin-top: 0;
    margin-bottom: 0.06rem;
}

.alpha-section--books .book-author-line {
    font-family: var(--font-sans);
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.45;
    margin-bottom: 15px;
	font-style: italic
}

@media (max-width: 1000px) {
    .alpha-section--books {
        column-count: 2;
    }
}

@media (max-width: 640px) {
    .alpha-section--books {
        column-count: 1;
    }
}

/* Book chapter template styling */
.toc-header--series {
    color: #9a9a9a;
    letter-spacing: 2px;
}

.toc-sidebar--book {
    top: 132px;
}

.article-layout--book .article-content {
    max-width: 62ch;
}

.article-header--book h1 {
    font-size: clamp(2.3rem, 5vw, 4rem);
    line-height: 1.08;
    letter-spacing: -0.6px;
}

.book-chapter-meta {
    font-family: var(--font-sans);
    color: var(--text-muted);
    font-size: 1.05rem;
}

.article-header-divider {
    border: 0;
    border-top: 1px solid var(--border-light);
    margin-top: 1.1rem;
}

/* Daily Exhortations archive layout */
.exhort-featured {
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 1.5rem 1.6rem;
    background: #fff;
    margin-bottom: 2rem;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.04);
}

.exhort-kicker {
    font-family: var(--font-sans);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--accent-color);
    font-weight: 700;
    margin-bottom: 0.55rem;
    margin-left: 10px;
}

.exhort-title {
    display: block;
    font-size: clamp(1.6rem, 3.5vw, 2.2rem);
    line-height: 1.18;
    color: #1d1d1d;
    margin-bottom: 0.5rem;
}

.exhort-date {
    font-family: var(--font-sans);
    color: var(--text-muted);
    margin-bottom: 0.85rem;
}

.exhort-excerpt {
    margin: 0;
    font-size: 1.03rem;
    color: #333;
}

.exhort-list .topic-link {
    margin-bottom: 0.55rem;
    margin-left: 10px;
}

/* Daily Exhortations full-content view */
.index-container--daily {
    column-count: 1;
    max-width: 900px;
}


.exhort-today-title {
    margin: 0.2rem 0 0.4rem;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    line-height: 1.15;
}

.exhort-today-title a {
    color: #1f1f1f;
}

.exhort-today-content h2 {
    margin-top: 2.1rem;
}

.exhort-today-content p {
    margin-bottom: 3.2rem;
}


.exhort-month-jump {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin: 0.6rem 0 1rem;
}

.exhort-month-jump a {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    border: 1px solid var(--border-light);
    border-radius: 999px;
    padding: 0.28rem 0.7rem;
    color: #3f3f3f;
    background: #fafafa;
}

.exhort-month-block {
    margin-bottom: 1rem;
}

.exhort-month-block h3 {
    font-size: 1rem;
    margin: 0.5rem 0;
    font-family: var(--font-sans);
}

.exhort-day-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.exhort-day-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2rem;
    border: 1px solid var(--border-light);
    border-radius: 7px;
    font-family: var(--font-sans);
    font-size: 0.82rem;
    color: #4a4a4a;
    background: #fff;
}

.exhort-day-link.is-today {
    background: #2b5c8a;
    border-color: #2b5c8a;
    color: #fff;
    font-weight: 700;
}

/* Daily Exhortations: match clean site style (no boxed containers) */
.exhort-intro,
.exhort-daynav,
.exhort-today-wrap {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin-bottom: 2rem;
}

.exhort-intro blockquote {
    border-left: 0;
    margin: 1rem 0;
    padding: 0;
    color: #3b3b3b;
}

/* Daily Exhortations: lead + section break */
.exhort-lead {
    margin: 0 0 2rem;
}

.exhort-lead p {
    margin: 0;
    font-size: clamp(1.02rem, 2.1vw, 1.2rem);
    line-height: 1.65;
}


#daily-exhort-introduction {
    scroll-margin-top: 140px;
}

/* Daily Exhortations refinements */
.exhort-lead a {
    font-size: 0.7em;
    letter-spacing: 0.04em;
}

.exhort-section-divider {
    height: 3px;
    margin: 3rem 0 2.25rem;
    background: #d8d8d8;
}

/* Resources page */
.resources-container {
    column-count: 1;
    max-width: 980px;
}

.resource-card {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 1.6rem;
    padding: 1.4rem 0;
    border-top: 1px solid var(--border-light);
    break-inside: avoid;
}

.resource-card:last-child {
    border-bottom: 1px solid var(--border-light);
}

.resource-card-image {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    background: linear-gradient(135deg, #f1f2f3 0%, #e1e3e7 100%);
    border: 1px solid var(--border-light);
    color: #60656b;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.resource-card-image span {
    opacity: 0.8;
}

.resource-card-body h2 {
    margin: 0 0 0.85rem;
    font-size: clamp(1.5rem, 2.3vw, 2rem);
    line-height: 1.2;
}

.resource-card-body h2 a {
    color: #1f1f1f;
}

.resource-card-body p {
    margin: 0;
}

@media (max-width: 900px) {
    .resource-card {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .resource-card-image {
        min-height: 150px;
    }
}

/* Resources page: 3-up cards with image on top */
.resources-grid {
    max-width: var(--site-width);
    margin: 0 auto;
    padding: 4rem 0 5rem;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.8rem;
}

.resources-grid .resource-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-light);
    background: #fff;
    min-height: 100%;
}

.resources-grid .resource-card-image {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 190px;
    background: linear-gradient(135deg, #f1f2f3 0%, #e1e3e7 100%);
    border-bottom: 1px solid var(--border-light);
    color: #60656b;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.resources-grid .resource-card-body {
    padding: 1.25rem 1.25rem 1.4rem;
}

.resources-grid .resource-card-body h2 {
    margin: 0 0 0.75rem;
    font-size: clamp(1.35rem, 2vw, 1.9rem);
    line-height: 1.2;
}

.resources-grid .resource-card-body h2 a {
    color: #1f1f1f;
}

.resources-grid .resource-card-body p {
    margin: 0;
    font-size: 1.03rem;
    line-height: 1.7;
}

@media (max-width: 1100px) {
    .resources-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .resources-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
        padding-top: 2.2rem;
    }

    .resources-grid .resource-card-image {
        min-height: 150px;
    }
}

/* Resources page: match homepage container behavior (no hero) */
.resources-page-content {
    padding-top: 2rem;
}

.resources-page-content .resources-grid {
    width: 100%;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.8rem;
}

.resources-page-content .resource-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-light);
    background: #fff;
    min-height: 100%;
}

.resources-page-content .resource-card-image {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 190px;
    background: linear-gradient(135deg, #f1f2f3 0%, #e1e3e7 100%);
    border-bottom: 1px solid var(--border-light);
    color: #60656b;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.resources-page-content .resource-card-body {
    padding: 1.25rem 1.25rem 1.4rem;
}

.resources-page-content .resource-card-body h2 {
    margin: 0 0 0.75rem;
    font-size: clamp(1.35rem, 2vw, 1.9rem);
    line-height: 1.2;
}

.resources-page-content .resource-card-body h2 a {
    color: #1f1f1f;
}

.resources-page-content .resource-card-body p {
    margin: 0;
    font-size: 1.03rem;
    line-height: 1.7;
}

@media (max-width: 1100px) {
    .resources-page-content .resources-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .resources-page-content .resources-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }

    .resources-page-content .resource-card-image {
        min-height: 150px;
    }
}

/* Resources page: hero restored + card CTA arrows */
.resources-page-content .resource-card-body {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.resources-page-content .resource-card-copy {
    margin: 0;
    font-size: 1.03rem;
    line-height: 1.7;
}

.resources-page-content .resource-card-cta {
    margin-top: auto;
    padding-top: 1.05rem;
    font-family: var(--font-sans);
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--accent-color);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.resources-page-content .resource-card-cta:hover {
    text-decoration: underline;
}

/* Resources page card images */
.resources-page-content .resource-card-image {
    overflow: hidden;
}

.resources-page-content .resource-card-image img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 190px;
    object-fit: cover;
}

@media (max-width: 760px) {
    .resources-page-content .resource-card-image img {
        min-height: 150px;
    }
}


/* Resources cards: light style with vertical separators */
.resources-page-content .resource-card {
    border: 0;
    background: transparent;
    position: relative;
    padding-right: 0.9rem;
}

.resources-page-content .resource-card:not(:last-child)::after {
    content: "";
    position: absolute;
    right: -0.9rem;
    top: 12.5%;
    width: 1px;
    height: 75%;
    background: var(--border-light);
}

.resources-page-content .resource-card-image {
    border: 0;
}

.resources-page-content .resource-card-body h2,
.resources-page-content .resource-card-body h2 a {
    font-weight: 400;
}

@media (max-width: 1100px) {
    .resources-page-content .resource-card {
        padding-right: 0;
    }

    .resources-page-content .resource-card::after {
        display: none;
    }
}

/* Bible Companion & Comments */
.bible-companion-page {
    padding-top: 2rem;
}

.bc-intro {
    max-width: 900px;
    margin-bottom: 2rem;
}

.bc-section-title {
    margin: 2rem 0 1rem;
    font-size: 1.9rem;
    font-weight: 400;
}

.bc-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.3rem 1.8rem;
    margin-bottom: 1.6rem;
}

.bc-book {
    padding-right: 0.4rem;
}

.bc-book h3 {
    margin: 0 0 0.45rem;
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 1.25;
}

.bc-links {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    line-height: 1.9;
}

.bc-links a {
    color: var(--accent-color);
    margin-right: 0.45rem;
    white-space: nowrap;
}

.bc-links a:hover {
    text-decoration: underline;
}

@media (max-width: 1100px) {
    .bc-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .bc-grid {
        grid-template-columns: 1fr;
    }
}

.bible-companion-page .bc-jump-links {
    margin-top: 1rem;
    font-family: var(--font-sans);
    font-size: 0.88rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #59626c;
}

.bible-companion-page .bc-jump-links a {
    text-transform: none;
    letter-spacing: normal;
    font-size: 0.98rem;
}

.bible-companion-page .bc-edition {
    margin: 0 0 0.35rem;
    color: #6b7280;
    font-family: var(--font-sans);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.bible-companion-page .bc-chapters {
    margin-top: 0.2rem;
}

.bible-companion-page .bc-chapters a {
    display: inline-block;
    margin-right: 0.4rem;
}


/* Companion page: suppress edition line */
.bc-edition {
    display: none !important;
}

/* Editorial archive: plain 3-column titles (match simple index style) */
.editorial-simple-list {
    column-count: 3;
    column-gap: 2rem;
}

.editorial-simple-list .editorial-link {
    display: block;
    break-inside: avoid;
    margin: 0 0 0.65rem;
    color: #1f1f1f;
    text-decoration: none;
    line-height: 1.4;
    font-size: 1.03rem;
    font-weight: 400;
}

.editorial-simple-list .editorial-link:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

@media (max-width: 1000px) {
    .editorial-simple-list {
        column-count: 2;
    }
}

@media (max-width: 640px) {
    .editorial-simple-list {
        column-count: 1;
    }
}

/* Disable prior editorial card UI */
.editorial-grid-wrap,
.editorial-grid,
.editorial-card,
.editorial-card-title,
.editorial-card-arrow {
    all: unset;
}

/* Editorial taxonomy: prevent nested multi-column layout (3x3 issue) */
.term-editorial .index-container {
    column-count: 1 !important;
    column-gap: 0 !important;
}

.editorial-lead {
    margin-bottom: 3.2rem;
}

.editorial-lead p {
    max-width: 980px;
}

/* Divider used for quote-style snippets (Bits and Pieces) */
.article-body .quote-divider {
    border: 0;
    border-top: 1px solid #d9d9d9;
    margin: 1.1rem 0;
    height: 0;
}

/* Books taxonomy: prevent nested multi-column layout (3x3 issue) */
.term-book .index-container {
    column-count: 1 !important;
    column-gap: 0 !important;
}

/* Homepage-only hero video */
.hero-section--video {
    background-image: none;
}

.hero-section--video .hero-bg-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center right;
    z-index: 0;
}

/* Search results page */
.search-results-page {
    max-width: 1100px;
    padding-bottom: 4rem;
}

.search-results-header {
    padding-top: 0.4rem;
    margin-bottom: 1.4rem;
}

.search-results-header h2 {
    margin: 0 0 0.3rem;
    font-size: clamp(1.7rem, 3.3vw, 2.25rem);
    line-height: 1.2;
}

.search-results-summary {
    margin: 0;
    font-family: var(--font-sans);
    color: var(--text-muted);
}

.search-results-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 1.2rem;
}

.search-result-card {
    border: 1px solid var(--border-light);
    border-radius: 14px;
    background: #fff;
    padding: 1rem 1.1rem 1.1rem;
}

.search-result-meta {
    display: flex;
    gap: 0.35rem;
    align-items: center;
    margin-bottom: 0.35rem;
    font-family: var(--font-sans);
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #5f6670;
}

.search-result-title {
    margin: 0 0 0.5rem;
    font-size: 1.32rem;
    line-height: 1.2;
}

.search-result-title a:hover {
    color: var(--accent-color);
}

.search-result-excerpt {
    margin: 0;
    color: #373737;
    line-height: 1.65;
}

.search-result-link {
    display: inline-flex;
    margin-top: 0.85rem;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent-color);
}

.search-result-link:hover {
    text-decoration: underline;
}

.search-results-pagination {
    margin-top: 1.4rem;
}

.search-results-pagination ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    font-family: var(--font-sans);
}

.search-results-pagination li a,
.search-results-pagination li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.1rem;
    height: 2.1rem;
    padding: 0 0.65rem;
    border: 1px solid var(--border-light);
    border-radius: 7px;
    font-size: 0.9rem;
}

.search-results-pagination li .current {
    border-color: var(--accent-color);
    background: var(--accent-color);
    color: #fff;
}

.search-no-results {
    border: 1px solid var(--border-light);
    border-radius: 14px;
    background: #fff;
    padding: 1rem 1.1rem;
}

.search-no-results h3 {
    margin-top: 0;
    margin-bottom: 0.4rem;
}

.search-no-results p {
    margin: 0;
}

@media (max-width: 900px) {
    .search-results-grid {
        grid-template-columns: 1fr;
    }
}

/* Search results: flat list style (no cards) */
.search-results-grid {
    display: block;
}

.search-result-card {
    border: 0;
    border-bottom: 1px solid var(--border-light);
    border-radius: 0;
    background: transparent;
    padding: 1rem 0 1.05rem;
}

.search-result-card:last-child {
    border-bottom: 0;
}

.search-result-relevance {
    font-family: var(--font-sans);
    color: #4b5563;
    letter-spacing: 0;
    text-transform: none;
    font-size: 0.84rem;
}

.search-no-results {
    border: 0;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    border-radius: 0;
    background: transparent;
    padding: 1rem 0;
}

/* Books by Author page */
.books-by-author-page {
    padding: 3.2rem 0 5.2rem;
}

.books-by-author-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
}

.books-author-block {
    min-width: 0;
}

.books-author-name {
    margin: 0 0 0.2rem;
    font-size: 1.45rem;
    line-height: 1.2;
}

.books-author-lastname {
    font-family: var(--font-sans);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    font-size: 0.72rem;
    margin-bottom: 0.9rem;
}

.books-author-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.books-author-list li {
    margin: 0 0 0.7rem;
}

.books-by-author-page .topic-link--book {
    font-size: 1.05rem;
    line-height: 1.28;
}

@media (max-width: 1000px) {
    .books-by-author-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .books-by-author-grid {
        grid-template-columns: 1fr;
    }
}


/* Books by Author: ensure single 3-col grid (no inherited columns) */
.books-by-author-page {
    column-count: 1 !important;
    column-gap: 0 !important;
}

/* Books archive: optional manual excerpt under author */
.alpha-section--books .book-archive-excerpt {
    margin: 0.3rem 0 0;
    color: #5f6670;
    font-family: var(--font-serif);
    font-size: 0.98rem;
    line-height: 1.45;
}

/* Contact + Report forms */
.agora-form-page {
    max-width: 860px;
}

.agora-form-card {
    margin-top: 1.2rem;
}

.agora-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 1.25rem;
}

.agora-field label {
    display: block;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    margin-bottom: 0.35rem;
    color: #3f4650;
}

.agora-field input,
.agora-field textarea {
    width: 100%;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    background: #fff;
    padding: 0.68rem 0.78rem;
    font-family: var(--font-sans);
    font-size: 0.98rem;
    color: var(--text-color);
}

.agora-field textarea {
    resize: vertical;
    min-height: 180px;
}

.agora-field--full {
    grid-column: 1 / -1;
}

.agora-form-alert {
    margin-top: 0.2rem;
    margin-bottom: 1rem;
    padding: 0.75rem 0.9rem;
    border-radius: 10px;
    font-family: var(--font-sans);
}

.agora-form-alert--success {
    border: 1px solid #b7d9b9;
    background: #eef8ef;
    color: #185f25;
}

.agora-form-alert--error {
    border: 1px solid #e8b9b9;
    background: #fdf0f0;
    color: #7a1f1f;
}

@media (max-width: 760px) {
    .agora-form-grid {
        grid-template-columns: 1fr;
    }
}

.why-agora-link {
    display: block;
    margin-top: 0.85rem;
    margin-bottom: 0.55rem;
    margin-left: 10px;
    font-family: var(--font-sans);
    font-size: 0.8em;
    font-weight: 600;
    color: #2c5f93;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.why-agora-link:hover { color: var(--accent-hover); }

/* Large book parts navigation (Studies in the Gospels, etc.) */
.book-part-list .book-chapter-current > .toc-link--chapter {
    color: var(--accent-color);
    font-weight: 700;
}

.toc-sublist--part {
    margin-top: 0.5rem;
    max-height: 260px;
    overflow-y: auto;
    padding-right: 6px;
}

.book-all-chapters-jump {
    margin-top: 1rem;
    border-top: 1px solid var(--border-light);
    padding-top: 0.8rem;
}

.book-all-chapters-jump > summary {
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    color: var(--text-muted);
    font-weight: 700;
    list-style: none;
}

.book-all-chapters-jump > summary::-webkit-details-marker {
    display: none;
}

.book-all-chapters-jump-grid {
    margin-top: 0.8rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem 0.65rem;
    max-height: 320px;
    overflow-y: auto;
    padding-right: 6px;
}

.book-all-chapters-jump-grid .toc-link {
    font-size: 0.84rem;
    line-height: 1.25;
}

@media (max-width: 900px) {
    .book-all-chapters-jump-grid {
        grid-template-columns: 1fr;
    }
}
