/* Estilos de la Biblia: se suman a style.css y reutilizan sus variables */

/* ---------- Barra superior del lector (siempre visible, 56px) ---------- */
.bible-bar {
    position: sticky;
    top: 0;
    z-index: 100;
    height: 56px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0 max(0.75rem, calc((100% - var(--max-width)) / 2 + var(--spacing)));
    background-color: var(--primary-light);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.bible-bar select {
    height: 38px;
    min-width: 0;
    padding: 0 0.4rem;
    font: inherit;
    font-size: 16px; /* evita el zoom automatico en iOS */
    color: var(--text-color);
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
}

.bible-bar select:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 1px;
}

#sel-version {
    flex: 0 0 5.25rem;
}

#sel-book {
    flex: 1 1 auto;
}

#sel-chapter {
    flex: 0 0 4.25rem;
}

.bible-bar-index {
    flex: 0 0 auto;
    padding: 0 0.25rem;
    font-size: 1.6rem;
    line-height: 1;
}

/* ---------- Texto del capitulo ---------- */
.bible-page h2 {
    margin-bottom: 0.25rem;
}

.bible-version {
    text-align: center;
    margin-bottom: 1.75rem;
    color: var(--text-light);
    font-size: 0.95rem;
}

.bible-text p {
    text-align: left;
    hyphens: manual;
    font-size: 1.1rem;
    line-height: 1.85;
}

.bible-text sup.v {
    margin-right: 0.2em;
    font-size: 0.7em;
    font-weight: 600;
    line-height: 0;
    color: var(--primary-hover);
}

.chapter-nav {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-color);
    font-weight: 600;
}

/* ---------- Indice (wizard) ---------- */
.wizard-crumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.95rem;
    color: var(--text-light);
}

.wizard-crumbs a::before {
    content: "\2190\00a0";
}

.wizard-step h2 {
    margin-bottom: 1.25rem;
}

.version-list {
    display: grid;
    gap: 1rem;
}

.version-list a {
    display: block;
    padding: 1.1rem 1.25rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.version-list a:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.version-list strong {
    display: block;
    font-size: 1.25rem;
}

.version-list span {
    color: var(--text-light);
    font-size: 0.95rem;
}

.book-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 1.5rem;
}

.book-cols h3 {
    margin: 0 0 0.75rem;
    font-size: 1.1rem;
    text-align: center;
    color: var(--text-light);
}

.book-list {
    list-style: none;
}

.book-list a {
    display: block;
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
}

.book-list a:hover {
    background-color: var(--primary-light);
}

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

.chapter-grid a {
    display: block;
    padding: 0.45rem 0;
    text-align: center;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.chapter-grid a:hover {
    background-color: var(--primary-light);
}

@media (max-width: 768px) {
    .bible-text p {
        font-size: 1.05rem;
    }
}

@media (max-width: 480px) {
    .bible-bar {
        gap: 0.35rem;
        padding: 0 0.5rem;
    }

    .bible-bar select {
        padding: 0 0.25rem;
    }

    #sel-version {
        flex-basis: 4.9rem;
    }

    #sel-chapter {
        flex-basis: 3.9rem;
    }

    .book-cols {
        gap: 0 0.75rem;
    }

    .book-list a {
        padding: 0.3rem 0.25rem;
        font-size: 0.95rem;
    }

    .chapter-grid {
        gap: 3px;
    }

    .chapter-grid a {
        padding: 0.4rem 0;
        font-size: 0.85rem;
    }

    .chapter-nav {
        font-size: 0.95rem;
    }
}

@media print {
    .bible-bar {
        display: none;
    }
}
