/* ==========================================
   ROCKY MOUNTAIN BIBLE
   MERGED THEME (THEME A BASE + MAP & UI)
   ========================================== */

:root {
    --primary: #603B26;
    --secondary: #98613D;
    --accent: #C69A5B;
    --background: #FFFFFF;
    --surface: #FFFFFF;
    --text: #352C25;
    --border: #D8C4A8;
    --link: #89501F;
    --hover: #75482C;
}

/* ---------------- PAGE BASE ---------------- */

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
    background: #ffffff !important;   
    color: var(--text);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 15px;
    line-height: 1.65;
}

main {
    width: 96%;
    max-width: 1800px;
    margin: 5px auto;
}

h1, h2, h3, h4 {
    color: var(--primary);
}

h3 {
    font-size: 2rem;
    margin: 2px 0;
}

a {
    color: var(--link);
    text-decoration: none;
}

a:hover {
    color: var(--primary);
    text-decoration: underline;
}

/* ---------------- NAVIGATION BAR ---------------- */
/* ---------------- NAVIGATION BAR ---------------- */

.head_nav {
    background: #F5EDDF; /* matches primary body text */
    padding: 2px 4px; 
    border-bottom: 3px solid #D8C4A8; /* matches card/border tone */
}

.head_nav ul {
    display: flex; 
    flex-wrap: wrap; 
    align-items: center; 
    justify-content: center;
    gap: 10px; 
    padding: 0; 
    margin: 0; 
    list-style: none; 
}

/* BUTTONS */

.head_nav button {
    background: #826640; /* subtle lighter tint of the body text */
    border: 1px solid #D8C4A8; /* clean parchment border */
    border-radius: 4px;
    padding: 0; 
    margin: 0; 
    box-shadow: none;
    cursor: pointer; 
    transition: background 0.2s, border-color 0.2s; 
}

.head_nav button a {
    display: block; 
    padding: 8px 14px;
    color: #F6F1E7; /* warm off-white reading text */
    font-family: Arial, sans-serif; 
    font-size: 0.85rem; 
    font-weight: 600; 
    text-decoration: none; 
}

/* HOVER / ACTIVE */

.head_nav button:hover {
    background: #5E4E42;
    border-color: #C69A5B; /* warm gold accent on hover */
}

.head_nav button:hover a {
    color: #FFFFFF; /* crisp white on hover */
    text-decoration: none; 
}

.head_nav button:focus-within {
    outline: 2px solid #C69A5B;
    outline-offset: 1px;
}

.head_nav .nav-btn {
    display: block;
    background: #826640;
    color: #F6F1E7;
    border: 1px solid #D8C4A8;
    border-radius: 4px;
    padding: 8px 14px;
    font-family: Arial, sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    line-height: 1.4;
    transition: background 0.2s, border-color 0.2s;
}

.head_nav .nav-btn:hover {
    background: #5E4E42;
    border-color: #C69A5B;
    color: #FFFFFF;
    text-decoration: none;
}

.head_nav .nav-btn:focus-visible {
    outline: 2px solid #C69A5B;
    outline-offset: 2px;
}

@media (max-width: 600px) {
    .head_nav .nav-btn {
        padding: 7px 10px;
        font-size: 0.75rem;
    }
}




/* ---------------- CONCORDANCE CONTAINER ---------------- */

#mainm.container {
    width: 98%;
    max-width: none;
    margin: 0 auto;
    padding: 0;
}

#mainm-conc {
    margin-left: 6% !important;
    margin-right: 6% !important;
    width: auto !important;
    max-width: none !important;
}

.concordance, #concordance {
    padding: 0 0 50px 0;
    margin: 10px;
}

/* ---------------- VERSE ROWS & COLUMNS ---------------- */

#mainm > .row {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    margin: 0 0 14px 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 7px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(65,40,20,0.05);
}

/* ALL LANGUAGE COLUMNS */

#mainm > .row > div {
    box-sizing: border-box;
    padding: 16px 18px;
    margin: 0;
    border-right: 1px solid var(--border);
    border-left: none;
    text-align: left;
    overflow-wrap: anywhere;
    line-height: 1.65;
    color: var(--text);
    font-weight: normal;
    min-width: 0;
}

#mainm > .row > div:last-child {
    border-right: none;
}

/* LATIN */

#mainm .col-lg-2 {
    background: #FFF9EF;
    font-family: Georgia, serif;
    font-size: 1rem;
}

/* GREEK */

#mainm .greek-text {
    background: #F3E9D9;
    font-family: Georgia, serif;
    font-size: 1.15rem;
    line-height: 1.75;
}

/* ENGLISH */

#mainm .eng-text {
    background: #FFFCF7;
    font-family: Georgia, serif;
    font-size: 1rem;
    line-height: 1.7;
}

/* HEBREW */

#mainm .hebrew {
    background: #F5EDDF;
    font-size: 1.5rem;
    line-height: 1.8;
    direction: rtl;
    text-align: right;
}

/* VERSE REFERENCE BUTTONS */

#mainm .col-lg-2 a {
    display: block;
    width: fit-content;
    max-width: 100%;
    color: #694021;
    background: #F1E0C6;
    border: 2px solid #C6A477;
    border-radius: 5px;
    padding: 2px 2px;
    margin-bottom: 2px;
    font-family: Arial, sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 2px 3px rgba(65,40,20,0.08);
}

#mainm .col-lg-2 a:hover {
    background: #98613D;
    border-color: #603B26;
    color: white;
    text-decoration: none;
}

/* LATIN VERSE LINK — INLINE */

#mainm .latin-text a,
#mainm .row > .latin-text a,
#mainm .row > .latin-text a:visited {
    display: inline;
    width: auto;
    max-width: none;
    padding: 0;
    margin: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    color: #1457A0;
    font-family: inherit;
    font-size: inherit;
    font-weight: 700;
    text-decoration: none;
}

#mainm .latin-text a:hover,
#mainm .row > .latin-text a:hover {
    background: transparent;
    border: none;
    color: #003D80;
    text-decoration: underline;
}

#mainm .row span:hover {
    cursor: pointer;
}

.verse-block {
    margin-bottom: 1.5rem;
}

/* ---------------- PARSER INSTRUCTIONS ---------------- */

#puthere {
    background: #F3E6D0;
    border: 1px solid #D7BC91;
    border-left: 5px solid #98613D;
    border-radius: 6px;
    padding: 12px 18px;
    margin-bottom: 20px;
}

#puthere h4 {
    font-family: Arial, sans-serif;
    font-size: 0.9rem;
    font-weight: normal;
    line-height: 1.2;
    margin: 0;
    color: #62472E;
}

/* ---------------- COMMENTARY / USER BARS / FOOTNOTES ---------------- */

.haydock {
    background: #FFF9EF;
    color: var(--text);
    padding: 0px;
}

.user-barr {
    background: #F3E6D0;
    color: var(--text);
    border: 1px solid var(--border);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 6px 12px;
    z-index: 1000;
    font-size: 1.1rem;
}

.footnote {
    background: #FFFCF7;
    color: #352C25;
    border: 1px solid #D8C4A8;
    border-left: 3px solid #98613D;
    border-radius: 6px;
    padding: 2px 6px;
    margin: 4px 0 2px;
    font-family: Georgia, serif;
    font-size: 0.9rem;
    font-weight: normal;
    line-height: 1.5;
}

.footnote a {
    color: #89501F;
    text-decoration: none;
}

.footnote a:hover {
    text-decoration: underline;
}

/* ---------------- SUMMA CONTROLS ---------------- */

.summa-row {
    margin-top: -6px !important;
    margin-bottom: 10px !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.summa-details {
    margin: 0;
    padding: 0;
}

.summa-summary {
    display: list-item;
    background: #F3E6D0;
    color: #513321;
    border: 1px solid #D8C4A8;
    border-radius: 10px;
    padding: 2px 8px;
    font-family: Georgia, serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}

.summa-summary:hover {
    background: #EAD9BC;
    border-color: #C6A477;
}

.summa-details[open] > .summa-summary {
    margin-bottom: 2px;
}

.summa-article {
    margin-bottom: 1px;
    border: 1px solid #D8C4A8;
    border-radius: 10px;
    overflow: hidden;
    background: #FFFCF7;
}

.summa-article > summary {
    background: #F3E6D0;
    color: #513321;
    padding: 1px 1px;
    cursor: pointer;
    font-weight: 600;
}

.summa-article .summa-text {
    padding: 4px 8px;
    font-family: Georgia, serif;
    font-weight: normal;
    line-height: 1.65;
    color: #352C25;
}

.summa-article .summa-text p {
    margin: 0 0 1em;
}

/* ---------------- LEAFLET & MAP LAYOUT ---------------- */

.map-label {

    color: #000055;
    text-align: center;
    white-space: nowrap;
    font-size: 1rem;
    font-weight: 150;
    margin: 0;
    padding: 0;
    padding: 1px 3px;
    border-radius: 4px;

}


.location-label {
    background: transparent;
    border: none;
    font-size: 12px;
    font-weight: 600;
    color: #ffffff;
    text-align: center;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
    white-space: nowrap;
    pointer-events: none;
}

.my-label {
    background-color: white;
    padding: 1px 3px;
    border: 1px solid #666;
    border-radius: 4px;
    font-size: 12px;
    color: #333;
}

.attribution {
    font-size: 12px;
}

.leaflet-control-layers {
    font-size: 14px !important;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    border-radius: 8px !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2) !important;
}

.leaflet-control-layers-overlays label, 
.leaflet-control-layers-base label {
    padding: 6px 5px;
    margin: 2px 0;
    display: block;
    cursor: pointer;
}

.leaflet-control-layers-selector {
    transform: scale(1.2);
    margin-right: 8px !important;
    vertical-align: middle;
}

.leaflet-control-layers-separator {
    height: 0;
    border-top: 1px solid #ddd;
    margin: 0 -10px 0 -6px;
}

.leaflet-popup-content {
    font-size: 15px;
}

.leaflet-popup-content img {
    max-width: 100%;
    display: block;
}

.popup-description {
    display: block;
    margin-top: 5px;
    font-size: 13px;
    color: #555;
    line-height: 1.4;
    font-weight: normal;
}

.fixed-layout {
    display: flex;
    flex-direction: column;
    width: 100vw;
}

.container-fluid.fixed-layout {
    padding: 0 !important;
    margin: 0 !important;
    width: 95vw;
}

.map-slider-container {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    margin: 4px 8px;
}

.map-slider-container label {
    white-space: nowrap;
    margin: 0;
    display: inline-block;
    flex-shrink: 0;
}

.map-slider-container input[type="range"] {
    display: inline-block;
    vertical-align: middle;
}

.map-panel {
    overflow: hidden;
    transition: height 0.05s ease-out;
}

#map {
    height: 100%;
    width: 100%;
}

.verse-panel, .pic-panel {
    order: 2;
    flex: none;
    padding: 1rem;
    background-color: #f8f9fa;
    overflow-y: visible;
}

.pic-panel img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.pic-popup-wrapper {
    overflow: hidden;
}

.pic-popup-pic {
    width: 100%;
    height: 320px;
    object-fit: cover;
    display: block;
    border-radius: 1px;
}

.pic-popup-title {
    margin: 0;
    font-size: .9rem;
    font-weight: bold;
}

.pic-popup-desc {
    margin: 0;
    font-size: .9rem;
    color: #333;
}

@media (min-width: 768px) {
    .fixed-layout {
        flex-direction: row;
        height: 100vh;
        overflow: hidden;
    }

    .verse-panel {
        order: 1;
        width: 33%;
        height: 100vh;
        overflow-y: auto;
        border-right: 1px solid var(--border);
    }
    
    .pic-panel {
        order: 1;
        width: 45%;
        height: 100vh;
        border-right: 1px solid var(--border);
    }

    .map-panel {
        order: 2;
        flex: 1;
        height: 10vh;
        position: static;
    }
    
    .map-panel-drb {
        order: 2;
        flex: 1;
        height: 80vh;
        position: static;
    }
}

/* ---------------- CONCORDANCE ALPHABET NAVIGATION ---------------- */

.alphabet-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.65rem 1.1rem;
    margin: 1.5rem auto 1.25rem;
    padding: 0 1rem;
    max-width: 960px;
    font-size: 1.5rem;
}

.alpha-link {
    text-decoration: none;
    text-transform: uppercase;
    font-family: inherit;
    font-size: 1.5rem;
    font-weight: 600;
    color: #6d4327;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.alpha-link:hover {
    color: #2b170b;
    background-color: rgba(109, 67, 39, 0.08);
}

.concordance-nav-letter {
    color: #000;
    text-transform: uppercase;
    font-size: 2rem;
    font-weight: bold;
}

.is-hidden {
    display: none !important;
}

/* ---------------- BILINGUAL 2-COLUMN VIEW ---------------- */

.bilingual-row {
    display: flex !important;
    flex-wrap: wrap !important;
    margin-bottom: 12px !important;
    background: var(--surface, #ffffff);
    border: 1px solid var(--border, #d8c4a8);
    border-radius: 6px;
    overflow: hidden;
}

.bilingual-latin,
.bilingual-french {
    box-sizing: border-box !important;
    padding: 12px 14px !important;
    min-width: 0 !important;
    line-height: 1.6;
}

.bilingual-latin {
    background: #e4e9dc;
    font-family: Georgia, serif;
}

.bilingual-french {
    background: #ffffff;
    font-family: Georgia, serif;
}

@media (min-width: 992px) {
    .bilingual-latin {
        flex: 0 0 50% !important;
        width: 50% !important;
        max-width: 50% !important;
        border-right: 1px solid var(--border, #d8c4a8) !important;
    }

    .bilingual-french {
        flex: 0 0 50% !important;
        width: 50% !important;
        max-width: 50% !important;
        border-right: none !important;
    }
}

@media (max-width: 991px) {
    .bilingual-latin,
    .bilingual-french {
        flex: 0 0 100% !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .bilingual-latin {
        border-right: none !important;
        border-bottom: 1px solid var(--border, #d8c4a8) !important;
    }
}

/* ---------------- MULTI-LANGUAGE CONCORDANCE OVERRIDES ---------------- */

#mainm .row {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    margin-bottom: 12px;
}

#mainm .row > .latin-text,
#mainm .row > .eng-text,
#mainm .row > .greek-text,
#mainm .row > .hebrew {
    box-sizing: border-box;
    flex: 0 0 25%;
    width: 25%;
    max-width: 25%;
    min-width: 0;
    margin: 0;
    padding: 12px 14px;
    align-self: stretch;
    border-right: 1px solid #d8c4a8;
    text-align: left;
}

#mainm .row > .latin-text {
    display: block;
    background: #e4e9dc;
    color: #352c25;
    font-family: Georgia, serif;
    font-size: 1rem;
    line-height: 1.6;
}

#mainm .row > .eng-text { 
    background: #FFFEF; 
}

#mainm .row > .greek-text { 
    background: #f3e9d9; 
}

#mainm .row > .hebrew {
    background: #e5e0d7;
    direction: rtl;
    text-align: right;
}

/* ---------------- RESPONSIVE BREAKPOINTS (THEME A PREFERENCE) ---------------- */

@media (max-width: 991px) {
    #mainm .row {
        display: flex !important;
        flex-direction: column !important;
        flex-wrap: nowrap !important;
    }

    #mainm .row > .latin-text,
    #mainm .row > .eng-text,
    #mainm .row > .greek-text,
    #mainm .row > .hebrew {
        flex: 0 0 auto !important;
        width: 100% !important;
        max-width: 100% !important;
        border-right: none;
        border-bottom: 1px solid #D8C4A8;
    }

    #mainm > .row:first-of-type {
        display: none !important;
    }

    #mainm .hebrew {
        font-size: 1.4rem;
    }
}

@media (max-width: 600px) {
    main {
        width: 98%;
        margin: 12px auto;
    }

    #mainm > .row:not(:first-of-type) {
        grid-template-columns: 1fr;
    }

    #mainm > .row:first-of-type {
        display: none;
    }

    #mainm > .row > div {
        padding: 14px;
    }

    .head_nav {
        padding: 10px;
    }

    .head_nav button a {
        padding: 7px 10px;
        font-size: 0.75rem;
    }

    #mainm .row > .latin-text,
    #mainm .row > .eng-text,
    #mainm .row > .greek-text,
    #mainm .row > .hebrew {
        flex: 0 0 100%; 
        width: 100%; 
        max-width: 100%;
    }
    
    .map-panel-drb {
        order: 2;
        flex: 1;
        height: 80vh;
        position: static;
    }
}




/* Reset Leaflet's default div-icon box */
.my-label-container {
    background: transparent !important;
    border: none !important;
}

/* Styled text box */
.my-label-place {
    display: inline-block;
    white-space: nowrap;
    background-color: rgba(255, 255, 255, 0.95);
    color: #352c25;
    border: 1px solid #98613d;
    border-radius: 4px;
    padding: 2px 4px;
    font-family: Arial, sans-serif;
    font-size: .8rem;
    font-weight: 300;
    line-height: 1.3;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
    transform: translate(-50%, 0); /* centers the label horizontally below the pin */
    pointer-events: auto;
}
