/* Bible Study Site — Shared Styles */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg-primary: #faf8f5;
    --bg-secondary: #f5f0e8;
    --bg-sidebar: #ece5da;
    --bg-card: #ffffff;
    --text-primary: #2c2420;
    --text-secondary: #3d342e;
    --text-muted: #5c5248;
    --accent-gold: #8b6914;
    --accent-gold-light: #c49a2a;
    --accent-brown: #6b4c3b;
    --border-light: #e8e0d6;
    --border-medium: #d4c9bc;
    --shadow-sm: 0 1px 3px rgba(44,36,32,0.06);
    --shadow-md: 0 4px 12px rgba(44,36,32,0.08);
    --shadow-lg: 0 8px 24px rgba(44,36,32,0.1);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --sidebar-width: 260px;
    --right-panel-width: 280px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* TOP NAV BAR */
.top-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 56px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    padding: 0 20px;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.nav-brand {
    font-family: 'Cinzel', serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--accent-brown);
    text-decoration: none;
}

.nav-center {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.nav-book-select, .nav-chapter-select {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    padding: 6px 12px;
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-sm);
    background: var(--bg-primary);
    color: var(--text-primary);
    cursor: pointer;
}

.nav-translation {
    font-size: 0.85rem;
    padding: 7px 14px;
    border: 2px solid #8b3a2a;
    border-radius: var(--radius-sm);
    background: #8b3a2a;
    color: #fff;
    cursor: pointer;
    font-weight: 600;
}

.hamburger {
    display: none;
    background: none;
    border: none;
    font-size: 1.3rem;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px;
}

.nav-home-btn {
    display: none;
    font-size: 1.1rem;
    color: var(--accent-brown);
    padding: 8px;
    text-decoration: none;
    transition: color 0.2s;
}

.nav-home-btn:hover {
    color: var(--accent-gold);
}

.sidebar-home {
    font-weight: 600;
    color: var(--accent-brown);
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 12px;
    margin-bottom: 4px;
}

/* LEFT SIDEBAR */
.left-sidebar {
    position: fixed;
    top: 56px; left: 0;
    width: var(--sidebar-width);
    height: calc(100vh - 56px);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-light);
    overflow-y: auto;
    padding: 16px 0;
    z-index: 900;
    transition: transform 0.3s ease;
}

.sidebar-section { margin-bottom: 8px; }

.sidebar-section-title {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    padding: 8px 20px 4px;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 20px;
    font-size: 0.88rem;
    color: var(--text-secondary);
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.sidebar-item:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.sidebar-item.active {
    background: #efe8dc;
    color: var(--accent-brown);
    font-weight: 500;
    border-right: 3px solid var(--accent-gold);
}

.sidebar-item i {
    width: 18px;
    text-align: center;
    font-size: 0.85rem;
    color: var(--accent-gold-light);
}

.chapter-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
    padding: 8px 20px;
}

.chapter-btn {
    width: 36px; height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    border: 1px solid #d4c4a8;
    border-radius: var(--radius-sm);
    background: #faf5ed;
    color: var(--accent-brown);
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
    font-weight: 500;
}

.chapter-btn:hover { background: #f0e4d4; color: var(--text-primary); border-color: #c9a96e; }
.chapter-btn.active {
    background: #8b3a2a;
    color: #faf5ed;
    border-color: #8b3a2a;
    font-weight: 700;
}

/* RIGHT PANEL */
.right-panel {
    position: fixed;
    top: 56px; right: 0;
    width: var(--right-panel-width);
    height: calc(100vh - 56px);
    background: var(--bg-sidebar);
    border-left: 1px solid var(--border-light);
    overflow-y: auto;
    padding: 16px;
    z-index: 900;
    transition: transform 0.3s ease;
}

.topic-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 14px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: box-shadow 0.2s, transform 0.15s;
    text-decoration: none;
    display: block;
}

.topic-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.topic-card-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.topic-card-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.topic-card-icon {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--accent-gold-light);
}

/* MAIN CONTENT */
.main-content {
    margin-left: var(--sidebar-width);
    margin-right: 0;
    margin-top: 56px;
    padding: 32px 40px;
    max-width: 100%;
}

.book-header {
    text-align: center;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-light);
}

.book-header h1 {
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    font-weight: 600;
    color: var(--accent-brown);
    margin-bottom: 4px;
}

.book-header .subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-style: italic;
}

/* SCRIPTURE */
.scripture-container {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 32px 36px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 32px;
    color: #8b3a2a;
}

.verse {
    font-family: 'Merriweather', serif;
    font-size: 1.05rem;
    line-height: 2;
    color: inherit;
    margin-bottom: 4px;
}

.verse-num {
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--accent-gold);
    vertical-align: super;
    margin-right: 4px;
}

/* STUDY NOTES TABS */
.study-section { margin-top: 32px; }

.study-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 24px;
}

.study-tab {
    padding: 10px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #7a6b5f;
    cursor: pointer;
    border: 1px solid var(--border-light);
    background: var(--bg-primary);
    transition: color 0.2s, background 0.2s;
    border-radius: var(--radius-sm);
}

.study-tab:hover { color: #3d2b1f; background: var(--bg-secondary); border-color: var(--border-medium); }
.study-tab.active {
    color: #fff;
    background: #8b3a2a;
    border-color: #8b3a2a;
}

.tab-content {
    display: none;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 28px 32px;
    box-shadow: var(--shadow-sm);
}

.tab-content.active { display: block; }

.tab-content h3 {
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    color: var(--accent-brown);
    margin-bottom: 16px;
}

.tab-content p, .tab-content li {
    font-size: 0.92rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.tab-content ul { padding-left: 20px; list-style: none; }
.tab-content li::before { content: "✦ "; color: var(--accent-gold-light); }
.tab-content a { color: var(--accent-brown); text-decoration: underline; text-decoration-color: var(--border-medium); }
.tab-content a:hover { color: var(--accent-gold); }

.video-card {
    display: flex;
    gap: 14px;
    padding: 14px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    transition: box-shadow 0.2s;
}

.video-card:hover { box-shadow: var(--shadow-md); }

.video-card-icon {
    width: 44px; height: 44px;
    background: #fee;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.video-card-icon i { color: #c0392b; font-size: 1.1rem; }

.video-card-info h4 { font-size: 0.88rem; font-weight: 600; color: var(--text-primary); margin-bottom: 4px; }
.video-card-info p { font-size: 0.78rem; color: var(--text-muted); margin: 0; }

/* KEY VERSE HIGHLIGHT */
.key-verse {
    background: linear-gradient(135deg, #fdf8ee, #faf3e0);
    border-left: 3px solid var(--accent-gold);
    padding: 12px 16px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin-bottom: 12px;
}

.key-verse .ref { font-weight: 600; color: var(--accent-brown); font-size: 0.82rem; }
.key-verse .text { font-family: 'Merriweather', serif; font-size: 0.9rem; font-style: italic; color: var(--text-primary); margin-top: 4px; }

/* MOBILE RESPONSIVE */
@media (max-width: 1024px) {
    .main-content { max-width: 900px; }
}

@media (max-width: 768px) {
    .left-sidebar { transform: translateX(-100%); }
    .left-sidebar.open { transform: translateX(0); }
    .right-panel { display: none; }
    .main-content { margin-left: 0; margin-right: 0; padding: 20px 16px; }
    .hamburger { display: block; }
    .nav-home-btn { display: block; }
    .nav-brand { display: none; }
    .top-nav { padding: 0 10px; height: auto; min-height: 56px; flex-wrap: wrap; padding-top: 6px; padding-bottom: 6px; }
    .nav-center { gap: 4px; justify-content: flex-start; flex-wrap: wrap; }
    .nav-book-select, .nav-chapter-select { font-size: 0.8rem; padding: 5px 6px; max-width: 110px; }
    .nav-translation { font-size: 0.75rem; padding: 5px 8px; }
    .scripture-container { padding: 20px 18px; }
    .verse { font-size: 0.95rem; line-height: 1.85; }
    .book-header h1 { font-size: 1.5rem; }
    .study-tabs { gap: 4px; }
    .study-tab { padding: 7px 10px; font-size: 0.75rem; }
    .tab-content { padding: 20px 18px; }
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 56px; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.3);
    z-index: 850;
}

.sidebar-overlay.show { display: block; }

/* TRANSLATION SWITCHER */
.translation-block { display: none; }
.translation-block.active { display: block; }

/* TRANSLATION INFO POPUP */
.trans-info-btn {
    background: none;
    border: 1px solid var(--border-medium);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 0.7rem;
    color: var(--text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}
.trans-info-btn:hover { background: var(--accent-brown); color: #fff; border-color: var(--accent-brown); }

.trans-popup {
    display: none;
    position: fixed;
    top: 60px;
    right: 20px;
    width: 320px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 20px;
    z-index: 2000;
    font-size: 0.82rem;
    line-height: 1.6;
}
.trans-popup.show { display: block; }
.trans-popup h4 { font-family: 'Cinzel', serif; font-size: 1rem; color: var(--accent-brown); margin-bottom: 12px; }
.trans-popup .trans-item { margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--border-light); }
.trans-popup .trans-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.trans-popup .trans-name { font-weight: 700; color: var(--text-primary); }
.trans-popup .trans-desc { color: var(--text-muted); font-size: 0.78rem; }
.trans-popup .close-btn { position: absolute; top: 10px; right: 14px; background: none; border: none; font-size: 1.2rem; color: var(--text-muted); cursor: pointer; }
@media (max-width: 768px) { .trans-popup { width: calc(100% - 40px); right: 20px; } }

/* AUTHORSHIP & BACKGROUND — Enhanced styling */
.auth-item {
    font-size: 0.92rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 14px;
    padding-left: 12px;
    border-left: 3px solid transparent;
}

.auth-label {
    font-weight: 700;
    color: #8b3a2a;
    font-size: 0.95rem;
}

.auth-sublist {
    list-style: none;
    padding-left: 16px;
    margin: 8px 0 14px;
    border-left: 3px solid var(--accent-gold-light);
}

.auth-sublist li {
    font-size: 0.88rem;
    line-height: 1.6;
    color: var(--text-secondary);
    padding: 4px 0 4px 12px;
    position: relative;
}

.auth-sublist li::before {
    content: ">";
    color: var(--accent-gold);
    font-weight: 700;
    position: absolute;
    left: -4px;
}
