/* =========================================================
   BASE.CSS — Reset + Variables + Tipografía + Layout Global
   ========================================================= */

/* -------- RESET MODERNO -------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* -------- TIPOGRAFÍAS -------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Lato:wght@300;400;700&family=Merriweather:wght@300;400;700&family=Libre+Baskerville:wght@400;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');

/* -------- VARIABLES GLOBALES -------- */
:root {
    /* Colors */
    --gold: #D4AF37;
    --deep-blue: #0A1A2F;
    --off-white: #F5F4EF;

    --text-dark: #1b1b1b;
    --text-light: #f0f0f0;
    --gray-light: #d6d6d6;

    /* Typography */
    --title-font: 'Poppins';
    --body-font: 'Inter';

    /* Layout */
    --sidebar-width: 80px;
    --content-padding: 2rem;

    /* Animation */
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.35s ease;
}

/* -------- BODY -------- */
body {
    font-family: var(--body-font);
    background: var(--off-white);
    color: var(--text-dark);

    display: flex;          /* GLOBAL LAYOUT */
    min-height: 100vh;
}

/* -------- TITLES -------- */
h1, h2, h3 {
    font-family: var(--title-font);
}

/* =========================================================
   GLOBAL LAYOUT — applies to all pages
   ========================================================= */

.content {
    flex: 1;
    padding: var(--content-padding);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

/* ======== SIDEBAR (Global) ======== */
.sidebar {
    width: var(--sidebar-width);
    background: var(--deep-blue);
    color: var(--text-light);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 1rem;
}

.sidebar-header {
    text-align: center;
    margin-bottom: 2rem;
}

.book-cover {
    width: 48px;
    margin-bottom: 0.5rem;
}

.app-title {
    font-size: 0.9rem;
}

.nav {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.nav-icon {
    width: 32px;
    filter: brightness(0) invert(1);
    transition: transform var(--transition-fast);
}

.nav-icon:hover {
    transform: scale(1.15);
}

/* =========================================================
   GLOBAL COMPONENTS
   ========================================================= */

.book-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    width: 120px;
    padding: 10px;
    border-radius: 10px;
    cursor: pointer;
    text-align: center;

    background: linear-gradient(180deg, rgba(255,255,255,0.8), rgba(250,250,250,0.95));
    box-shadow: 0 6px 18px rgba(18,34,48,0.08);

    transition: transform 160ms ease, box-shadow 160ms ease;
}

.book-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(11,85,96,0.08);
}

.book-card img {
    width: 100%;
    border-radius: 6px;
}

.book-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--deep-blue);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 800px) {
    .book-name {
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
    }
}

/* -------- UTILS -------- */
.hidden { display: none !important; }
.fade-in { animation: fadeIn 0.4s ease forwards; }

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ======== RESPONSIVE (GLOBAL) ======== */
@media (max-width: 800px) {
    .content {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   DARK MODE GLOBAL
   ========================================================= */

body.dark {
    background: #1a1a1a;
    color: var(--text-light);
}

body.dark .sidebar {
    background: #0d1117;
}

body.dark .content {
    background: #1a1a1a;
}

/* Home - Dark Mode */
body.dark .progress-card,
body.dark .quote-card,
body.dark .book-card {
    background: rgba(30, 30, 30, 0.95);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}

body.dark .book-name,
body.dark h2,
body.dark h3 {
    color: var(--gold);
}

body.dark .quote-card blockquote,
body.dark .quote-author {
    color: var(--text-light);
}

/* Reader - Dark Mode */
body.dark .scripture-container,
body.dark .reading-content,
body.dark .toolbar {
    background: rgba(30, 30, 30, 0.95);
    border-color: #333;
}

body.dark .scripture-item {
    background: rgba(40, 40, 40, 0.9);
}

body.dark .scripture-item:hover {
    background: rgba(212, 175, 55, 0.2);
}

body.dark .scripture-name,
body.dark .book-item,
body.dark .chapter-button {
    color: var(--text-light);
}

body.dark .book-item,
body.dark .chapter-button {
    background: rgba(40, 40, 40, 0.9);
}

body.dark .book-item:hover,
body.dark .chapter-button:hover {
    background: rgba(212, 175, 55, 0.2);
}

body.dark .verse {
    color: var(--text-light);
}

body.dark .verse:hover {
    background: rgba(40, 40, 40, 0.5);
}

body.dark .nav-btn {
    background: linear-gradient(135deg, var(--gold), #C49B33);
}

body.dark .breadcrumb {
    background: rgba(212, 175, 55, 0.1);
}

body.dark .breadcrumb-item {
    color: var(--gold);
}
