/* ============================================================
   Grace Mission Church — Bible Page Styles (bible.html)
   ============================================================ */

/* --- Bible Full-Bleed Widescreen Video Hero --- */
.page-header--hero-video-bg {
    position: relative;
    min-height: 520px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: var(--sp-12) 0 var(--sp-10);
    border-bottom: 1px solid var(--border-delicate);
    background: #17130f;
    width: 100%;
    box-sizing: border-box;
}

.bible-hero-bg-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 1;
    pointer-events: none;
    filter: saturate(0.78) contrast(1.04) brightness(0.88);
}


.bible-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    background:
        linear-gradient(180deg, rgba(23, 19, 15, 0.45) 0%, rgba(23, 19, 15, 0.65) 55%, rgba(23, 19, 15, 0.95) 100%),
        radial-gradient(circle at center, rgba(23, 19, 15, 0.2) 0%, rgba(23, 19, 15, 0.8) 100%);
    pointer-events: none;
}

.hero-container-centered {
    position: relative;
    z-index: 3;
    display: flex;
    justify-content: center;
    text-align: center;
    width: 100%;
}

.page-header--hero-video-bg .hero-content {
    max-width: 680px;
    margin: 0 auto;
    text-align: center;
    color: #FAF8F2;
    width: 100%;
}

.page-header--hero-video-bg .hero-content h1 {
    font-family: var(--font-heading);
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    color: #FAF8F2;
    margin: var(--sp-3) 0 var(--sp-2);
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.6);
    letter-spacing: 0.02em;
    line-height: 1.15;
}

.page-header--hero-video-bg .hero-content p {
    font-size: clamp(1.05rem, 2vw, 1.35rem);
    color: #E8DDC9;
    margin: 0 auto var(--sp-6);
    max-width: 540px;
    text-align: center;
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.7);
    line-height: 1.6;
}

.page-header--hero-video-bg .hero-actions {
    display: flex;
    justify-content: center;
    gap: var(--sp-4);
    flex-wrap: wrap;
}

.page-header--hero-video-bg .gold-badge {
    background: rgba(201, 169, 106, 0.22);
    border: 1px solid rgba(201, 169, 106, 0.6);
    color: #E8DDC9;
    backdrop-filter: blur(8px);
}

.page-header--hero-video-bg .btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(232, 221, 201, 0.35);
    color: #FAF8F2;
    backdrop-filter: blur(8px);
}

.page-header--hero-video-bg .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: var(--accent-gold);
    color: #FAF8F2;
}

/* Quiet any accidental autoplay-with-sound overlay */
.bible-hero-bg-video::-webkit-media-controls-overlay-play-button {
    display: none;
}

/* Respect reduced-motion: hold on first frame */
@media (prefers-reduced-motion: reduce) {
    .bible-hero-bg-video {
        animation: none;
    }
}

@media (max-width: 768px) {
    .page-header--hero-video-bg {
        min-height: 380px;
        padding: var(--sp-8) var(--sp-3) var(--sp-6);
    }

    .page-header--hero-video-bg .hero-content {
        padding: 0 var(--sp-2);
    }

    .page-header--hero-video-bg .hero-content h1 {
        font-size: clamp(1.9rem, 7vw, 2.6rem);
    }

    .page-header--hero-video-bg .hero-content p {
        font-size: 0.95rem;
        margin-bottom: var(--sp-5);
    }

    .page-header--hero-video-bg .hero-actions {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        max-width: 290px;
        margin: 0 auto;
        gap: var(--sp-3);
    }

    .page-header--hero-video-bg .hero-actions .btn {
        width: 100%;
        max-width: 100%;
        justify-content: center;
    }
}


/* --- Bible Page Layout --- */
.bible-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--sp-5);
}

.search-box {
    background: var(--bg-paper-light);
    border: 1px solid var(--border-delicate);
    border-radius: var(--radius-card);
    padding: var(--sp-5) var(--sp-6);
    box-shadow: var(--shadow-card);
    scroll-margin-top: 110px;
    max-width: 640px;
    margin: 0 auto;
    width: 100%;
}

#bibleSearchSection,
#searchBox,
#bibleSearch {
    scroll-margin-top: 110px;
}

.search-box h2 {
    font-size: 1.6rem;
    margin-bottom: var(--sp-2);
    color: var(--accent-mahogany);
    line-height: 1.2;
    text-align: center;
}

.search-type-toggle {
    display: inline-flex;
    justify-content: center;
    gap: var(--sp-2);
    margin: 0 auto var(--sp-3);
}

.toggle-btn {
    padding: 0.35rem 1rem;
    border: 1px solid var(--border-delicate);
    border-radius: var(--radius-pill);
    background: transparent;
    color: var(--ink-muted);
    font-family: var(--font-body);
    font-size: 0.825rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 36px;
    line-height: 1;
}

.toggle-btn.active {
    background: var(--accent-mahogany);
    color: var(--bg-paper-light);
    border-color: var(--accent-mahogany);
    box-shadow: 0 1px 4px rgba(74, 18, 14, 0.15);
}

.search-help {
    font-size: 0.825rem;
    color: var(--ink-muted);
    margin: 0 auto var(--sp-3);
    line-height: 1.4;
    text-align: center;
    max-width: 480px;
}

.bible-search-form {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 540px;
    gap: var(--sp-2);
    margin: 0 auto;
}

#bibleSearch,
.bible-search-form input {
    flex: 1 1 auto;
    padding: 0.7rem 1.15rem;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.5;
    color: var(--ink-primary);
    background: #FFFFFF;
    border: 2px solid var(--accent-gold);
    border-radius: var(--radius-soft);
    box-shadow: 0 2px 8px rgba(74, 18, 14, 0.07), inset 0 1px 2px rgba(43, 35, 31, 0.04);
    min-height: 46px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

#bibleSearch::placeholder,
.bible-search-form input::placeholder {
    color: #7A6F66;
    font-weight: 400;
    opacity: 0.85;
}

#bibleSearch:hover,
.bible-search-form input:hover {
    border-color: var(--accent-mahogany);
    box-shadow: 0 3px 12px rgba(74, 18, 14, 0.12), inset 0 1px 2px rgba(43, 35, 31, 0.04);
}

#bibleSearch:focus,
.bible-search-form input:focus {
    border-color: var(--accent-mahogany);
    background: #FFFFFF;
    box-shadow: 0 0 0 3.5px rgba(197, 160, 89, 0.35), 0 4px 16px rgba(74, 18, 14, 0.14);
    outline: none;
}

.bible-search-form .btn-primary {
    padding: 0.7rem 1.5rem;
    font-size: 0.925rem;
    font-weight: 600;
    min-height: 46px;
    white-space: nowrap;
    flex-shrink: 0;
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-btn);
    transition: all 0.2s ease;
}

.bible-search-form .btn-primary:hover {
    box-shadow: var(--shadow-btn-hover);
    transform: translateY(-1px);
}

.search-syntax-hint {
    margin: var(--sp-2) 0 0;
    font-size: 0.76rem;
    color: var(--ink-muted);
    text-align: center;
    line-height: 1.35;
}

.verse-content {
    background: var(--bg-paper-light);
    border: 1px solid var(--border-delicate);
    border-radius: var(--radius-card);
    padding: var(--sp-6);
}

.verse-reference {
    font-size: 1.5rem;
    margin-bottom: var(--sp-4);
}

.verse-text {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    line-height: 1.85;
    color: var(--ink-primary);
}

.verse-item {
    margin-bottom: var(--sp-3);
}

.verse-number {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent-gold);
    vertical-align: super;
    margin-right: 0.15em;
}

.quick-links,
.table-of-contents {
    background: var(--bg-paper-light);
    border: 1px solid var(--border-delicate);
    border-radius: var(--radius-card);
    padding: var(--sp-6);
    box-shadow: var(--shadow-card);
}

.quick-link-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-2);
}

.quick-link-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-delicate);
    border-radius: var(--radius-pill);
    background: transparent;
    color: var(--accent-mahogany);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 44px;
}

.quick-link-btn:hover {
    border-color: var(--accent-gold);
    background: var(--bg-parchment);
}

.chapter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: var(--sp-2);
}

.chapter-btn {
    padding: 0.5rem;
    border: 1px solid var(--border-faint);
    border-radius: var(--radius-soft);
    background: transparent;
    color: var(--accent-mahogany);
    font-family: var(--font-body);
    font-size: 0.825rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 44px;
    text-align: center;
}

.chapter-btn:hover {
    background: var(--accent-mahogany);
    color: var(--bg-paper-light);
    border-color: var(--accent-mahogany);
}

/* --- Bible Page Layout: Centered Below HERO --- */
/* All sections below the HERO (scoped to .bible-layout) are centered to
   match the paper/card aesthetic. Tighter specificity keeps the HERO
   and site-wide elements untouched. */
.bible-layout .search-box,
.bible-layout .bible-result,
.bible-layout .quick-links,
.bible-layout .table-of-contents {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.bible-layout .search-box h2,
.bible-layout .quick-links h3,
.bible-layout .table-of-contents h3 {
    width: 100%;
    text-align: center;
}

@media (max-width: 640px) {
    .search-box {
        padding: var(--sp-4) var(--sp-3) !important;
    }

    .search-box h2 {
        font-size: 1.35rem !important;
        margin-bottom: 0.35rem !important;
    }

    .search-type-toggle {
        margin-bottom: 0.35rem !important;
        gap: 0.35rem !important;
    }

    .toggle-btn {
        padding: 0.3rem 0.85rem !important;
        font-size: 0.78rem !important;
        min-height: 32px !important;
    }

    .search-help {
        font-size: 0.78rem !important;
        margin-bottom: 0.45rem !important;
        line-height: 1.35 !important;
    }

    .bible-layout .bible-search-form {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        width: 100% !important;
        gap: 0.4rem !important;
    }

    .bible-layout .bible-search-form input {
        flex: none !important;
        width: 100% !important;
        min-width: 0 !important;
        min-height: 44px !important;
        padding: 0.65rem 0.95rem !important;
        font-size: 0.95rem !important;
        box-sizing: border-box !important;
    }

    .bible-layout .bible-search-form button {
        width: 100% !important;
        min-height: 44px !important;
        font-size: 0.925rem !important;
        justify-content: center !important;
    }

    .bible-layout .chapter-grid {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 6px !important;
        width: 100% !important;
    }

    .chapter-btn {
        padding: 0.35rem 0.2rem !important;
        font-size: 0.8rem !important;
        min-height: 40px !important;
    }

    .quick-links,
    .table-of-contents,
    .verse-content {
        padding: var(--sp-4) !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
}

/* Popular Passages button row centered */
.bible-layout .quick-link-buttons {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--sp-2);
}

.bible-layout #randomVerse {
    display: inline-block;
    margin: var(--sp-4) auto 0;
}

/* Acts chapter grid centered + capped */
.bible-layout .chapter-grid {
    display: inline-grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: var(--sp-2);
    justify-content: center;
    max-width: 560px;
    margin: 0 auto;
}

/* Verse reference + drop-cap text centered as a block.
   The drop-cap stays floated; centering the parent text flows it naturally. */
.bible-layout .scripture-block .reference {
    text-align: center;
    display: block;
}

.bible-layout .scripture-block .verse-body {
    text-align: center;
}

.chapter-navigation {
    display: flex;
    justify-content: space-between;
    margin: var(--sp-4) 0;
}

.nav-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-delicate);
    border-radius: var(--radius-pill);
    background: transparent;
    color: var(--accent-mahogany);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    min-height: 44px;
}


/* --- Bible Result / Search Results / Verse Meta --- */
.bible-result {
    min-height: 120px;
}

/* --- Verse Share Panel --- */
.share-panel {
    margin-top: var(--sp-4);
    padding: var(--sp-3) var(--sp-4);
    background: var(--bg-parchment);
    border: 1px solid var(--border-delicate);
    border-radius: var(--radius-soft);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--sp-3);
    font-size: 0.85rem;
}

.share-panel-icon {
    color: var(--accent-gold);
}

.share-panel-label {
    color: var(--ink-muted);
    font-weight: 500;
}

.share-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--sp-2);
}

.share-btn {
    padding: 0.4rem 0.95rem;
    border: 1px solid var(--border-delicate);
    border-radius: var(--radius-pill);
    background: transparent;
    color: var(--accent-mahogany);
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 40px;
}

.share-btn:hover {
    border-color: var(--accent-gold);
    background: var(--bg-paper-light);
}

.share-btn.share-native {
    background: var(--accent-mahogany);
    color: var(--bg-paper-light);
    border-color: var(--accent-mahogany);
}

.share-btn.share-native:hover {
    background: var(--accent-mahogany-hover);
}

.share-feedback {
    min-height: 1em;
    color: var(--accent-gold);
    font-size: 0.78rem;
}

/* --- Lexical Search UI (Phase 2) --- */
.search-scope {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--ink-primary);
    background: #FFFFFF;
    border: 2px solid var(--accent-gold);
    border-radius: var(--radius-soft);
    padding: 0.55rem 0.75rem;
    min-height: 46px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(74, 18, 14, 0.07);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-scope:hover {
    border-color: var(--accent-mahogany);
    box-shadow: 0 3px 12px rgba(74, 18, 14, 0.12);
}

.search-scope:focus {
    border-color: var(--accent-mahogany);
    box-shadow: 0 0 0 3.5px rgba(197, 160, 89, 0.35), 0 4px 16px rgba(74, 18, 14, 0.14);
    outline: none;
}

.search-syntax-hint {
    margin: var(--sp-3) 0 0;
    font-size: 0.78rem;
    color: var(--ink-muted);
    text-align: center;
}

.search-syntax-hint code {
    background: var(--bg-parchment);
    border: 1px solid var(--border-faint);
    border-radius: 4px;
    padding: 0.05em 0.35em;
    font-size: 0.9em;
    color: var(--accent-mahogany);
}

.search-suggest {
    text-align: center;
    color: var(--ink-muted);
    font-size: 0.9rem;
    margin: var(--sp-2) 0 var(--sp-4);
}

.suggest-btn {
    background: none;
    border: none;
    color: var(--accent-mahogany);
    font-weight: 600;
    font-size: inherit;
    cursor: pointer;
    text-decoration: underline;
    padding: 0 2px;
}

.suggest-btn:hover {
    color: var(--accent-gold);
}

.search-hint {
    text-align: center;
    color: var(--ink-muted);
    font-size: 0.85rem;
    font-style: italic;
    margin-top: var(--sp-3);
}

.result-loading,
.result-error {
    background: var(--bg-paper-light);
    border: 1px solid var(--border-delicate);
    border-radius: var(--radius-card);
    padding: var(--sp-8) var(--sp-6);
    text-align: center;
}

.result-loading p {
    color: var(--ink-muted);
    font-style: italic;
}

.result-error {
    border-color: rgba(139, 20, 20, 0.35);
}

.result-error p {
    color: #8b1414;
}

.verse-translation {
    margin-top: var(--sp-5);
    padding-top: var(--sp-4);
    border-top: 1px solid var(--border-faint);
    font-size: 0.8rem;
    color: var(--ink-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}

.search-result-count {
    color: var(--ink-muted);
    font-size: 0.9rem;
    margin-bottom: var(--sp-4);
}

.search-results-list {
    display: flex;
    flex-direction: column;
    gap: var(--sp-4);
}

.search-result-item {
    border-left: 3px solid var(--accent-gold);
    padding: var(--sp-3) var(--sp-4);
    background: var(--bg-parchment);
    border-radius: 0 var(--radius-soft) var(--radius-soft) 0;
}

.search-result-ref {
    font-family: var(--font-heading);
    color: var(--accent-mahogany);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--sp-1);
}

.search-result-text {
    font-family: var(--font-heading);
    font-size: 1rem;
    line-height: 1.8;
    color: var(--ink-primary);
}


/* Lexicon Slide-over Panel */
.lexicon-panel {
    position: fixed;
    top: 0;
    right: -450px;
    width: 400px;
    max-width: 85vw;
    height: 100%;
    background: var(--bg-light);
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.2);
    z-index: 2000;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.lexicon-panel.active {
    right: 0;
}

.lexicon-header {
    padding: 25px;
    background: var(--bg-dark);
    color: var(--text-primary);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.lexicon-badge {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gold-primary);
    font-weight: 700;
    margin-bottom: 5px;
    display: block;
}

.lexicon-header h2 {
    margin: 0;
    font-size: 1.8rem;
    font-family: var(--font-heading);
}

.lexicon-close {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}

.lexicon-content {
    flex: 1;
    overflow-y: auto;
    padding: 25px;
    background: var(--bg-light);
    color: var(--bg-dark);
}

.lex-loading {
    text-align: center;
    color: #666;
    margin-top: 50px;
    font-style: italic;
}

.lex-word {
    cursor: pointer;
    border-bottom: 1px dotted var(--gold-primary);
    transition: background 0.2s;
}

.lex-word:hover {
    background: rgba(139, 105, 20, 0.1);
}

.lex-id {
    display: inline-block;
    background: var(--gold-primary);
    color: var(--bg-dark);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.lex-translit {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--bg-dark);
}

.lex-section-title {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    color: #888;
    margin: 20px 0 5px 0;
    border-bottom: 1px solid #eee;
    padding-bottom: 3px;
}

.lex-def {
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 15px;
}

.lex-kjv {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #444;
}

.lex-error {
    color: #b00;
    text-align: center;
    margin-top: 50px;
}
