/* bibliamobile/static/bibliamobile/css/site.css */
/* PROJETO BÍBLIA ONLINE — Paleta "Santuário" */

:root {
    --primary: #6B7A5E;      /* Verde-oliva suave */
    --secondary: #2C4A5E;    /* Azul profundo (Galileia) */
    --gold: #C9A15A;         /* Dourado envelhecido - destaque sagrado */
    --success: #6B7A5E;
    --danger: #a94442;
    --dark: #33322E;
    --light: #F7F3EC;
    --gray: #767267;
    --bg: #F7F3EC;
    --card-shadow: 0 8px 25px rgba(51,50,46,0.08);
    --border-radius: 16px;
    --border-radius-sm: 12px;
}

html, body {
    height: 100%;
    margin: 0;
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--dark);
}

body {
    display: flex;
    flex-direction: column;
}

.page-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
    padding: 2rem 0;
    padding-bottom: 5rem;
    margin-top: 64px; /* altura aproximada da navbar fixa, evita conteúdo escondido atrás dela */
}


footer {
    margin-top: auto;
    background: var(--dark);
    color: #cfcac0;
    padding: 2.5rem 0;
    font-size: 0.9rem;
}

/* Espaço extra no rodapé só no mobile, pra não ficar coberto pela bottom-nav fixa */
@media (max-width: 991.98px) {
    footer {
        padding-bottom: calc(2.5rem + 64px);
    }
}

/* HEADER & NAV */
.navbar {
    background: linear-gradient(135deg, var(--secondary), #1e3542) !important;
    box-shadow: 0 4px 15px rgba(44,74,94,0.2);
    padding: 0.75rem 0;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: white !important;
}

.nav-link {
    color: rgba(255,255,255,0.9) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: 8px;
    transition: all 0.3s ease;
}

    .nav-link:hover {
        background: rgba(255,255,255,0.15);
        color: white !important;
    }

/* CARDS GENÉRICOS */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

    .card:hover {
        transform: translateY(-6px);
        box-shadow: 0 16px 35px rgba(51,50,46,0.12);
    }

.card-header {
    background: linear-gradient(135deg, var(--primary), #5a6750);
    color: white;
    border-radius: var(--border-radius) var(--border-radius) 0 0 !important;
    padding: 1.5rem;
    text-align: center;
    font-weight: 700;
}

/* HERO CARD (status/progresso, estilo "saldo" bancário) */
.hero-card {
    background: linear-gradient(135deg, var(--secondary), #1e3542);
    border-radius: var(--border-radius);
    border: none;
}

.hero-card h2 {
    font-weight: 700;
    margin: 0;
}

/* CARDS DE OPÇÃO GRANDE (estilo ícone bancário — escolha da Bíblia) */
.option-card {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: var(--card-shadow);
    transition: all 0.25s ease;
    cursor: pointer;
    color: var(--dark);
}

    .option-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 28px rgba(51,50,46,0.14);
    }

.option-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(107,122,94,0.12);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

/* CARDS PEQUENOS (mais opções: quiz, IA, configurações) */
.option-card-sm {
    border-radius: var(--border-radius-sm);
    border: none;
    box-shadow: var(--card-shadow);
    transition: all 0.2s ease;
    color: var(--gray);
}

    .option-card-sm i {
        color: var(--secondary);
        font-size: 1.1rem;   /* reduzido de 1.3rem */
    }

    .option-card-sm .small {
        font-size: 0.7rem;   /* texto um pouco menor, cabe melhor em 4 colunas */
    }

    .option-card-sm:hover {
        background: rgba(107,122,94,0.06);
    }

/* DESTAQUE DOURADO — conquistas, streak, capítulos concluídos */
.badge-dourado,
.streak-badge {
    background: linear-gradient(135deg, var(--gold), #b08d4a) !important;
    color: white !important;
    border-radius: 50px;
    padding: 0.4rem 1rem;
    font-weight: 600;
}

.text-dourado {
    color: var(--gold) !important;
}

/* BOTÕES */
.btn {
    border-radius: 50px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #5a6750);
    border: none;
}

    .btn-primary:hover {
        background: linear-gradient(135deg, #5a6750, #4d5843);
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(107,122,94,0.3);
    }

.btn-dourado {
    background: linear-gradient(135deg, var(--gold), #b08d4a);
    border: none;
    color: white;
}

/* FORMULÁRIOS */
.form-control,
.form-select {
    border-radius: var(--border-radius-sm);
    padding: 0.75rem 1rem;
    border: 1.5px solid #ded7c9;
    transition: all 0.3s ease;
}

    .form-control:focus,
    .form-select:focus {
        border-color: var(--primary);
        box-shadow: 0 0 0 0.2rem rgba(107,122,94,0.2);
    }

/* PAGE HEADER (título de seção) */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(51,50,46,0.05);
    margin-bottom: 1.5rem;
}

.page-header-icon {
    background: linear-gradient(135deg, var(--primary), #5a6750);
    border-radius: 16px;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(107,122,94,0.3);
}


/* TOOLTIP CUSTOMIZADO (tradução de palavra durante leitura) */
.tooltip-link {
    position: relative;
    cursor: help;
}

    .tooltip-link::after {
        content: attr(data-tooltip);
        position: absolute;
        bottom: 120%;
        left: 50%;
        transform: translateX(-50%);
        background: var(--dark);
        color: white;
        padding: 8px 12px;
        border-radius: 8px;
        font-size: 0.85rem;
        white-space: nowrap;
        opacity: 0;
        visibility: hidden;
        transition: all 0.2s ease;
        z-index: 1000;
    }

    .tooltip-link:hover::after {
        opacity: 1;
        visibility: visible;
    }

/* HIGHLIGHT DE LEITURA (palavra sendo lida em voz alta) */
.reading-active {
    background-color: rgba(201,161,90,0.25);
    border-bottom: 2px solid var(--gold);
    border-radius: 3px;
    transition: all 0.15s ease;
}

/* COOKIE CONSENT */
.cookie-consent {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: rgba(51,50,46,0.97);
    color: white;
    padding: 1rem;
    z-index: 9999;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

/* BOTTOM NAV (mobile, estilo WhatsApp/bancário) */
.bottom-nav {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: #ffffff;
    border-top: 1px solid #ece6d8;
    display: flex;
    z-index: 1000;
}

.bottom-nav-item {
    flex: 1;
    text-align: center;
    padding: 0.6rem 0;
    color: var(--gray);
    text-decoration: none;
    font-size: 0.75rem;
}

    .bottom-nav-item i {
        display: block;
        font-size: 1.2rem;
        margin-bottom: 2px;
    }

    .bottom-nav-item.active {
        color: var(--primary);
    }

/* RESPONSIVIDADE */
@media (max-width: 576px) {
    .navbar-brand { font-size: 1.3rem; }
    .card-body { padding: 1.5rem; }
}

/* LOADING OVERLAY (tela cheia + blur) */
#div_loading {
    position: fixed;
    inset: 0;
    z-index: 9999999;
    background: rgba(247,243,236,0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
}

.loading-spinner {
    width: 56px;
    height: 56px;
    border: 5px solid rgba(107,122,94,0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Força esconder, vencendo o !important do Bootstrap (carregado antes) */
.d-none-search {
    display: none !important;
}

.book-progress {
    height: 6px;
    border-radius: 10px;
    background-color: rgba(107,122,94,0.12);
}

.book-progress .progress-bar {
    background: linear-gradient(90deg, var(--primary), var(--gold));
    border-radius: 10px;
}

#reading-pen {
    position: absolute;
    color: var(--gold);
    font-size: 1.1rem;
    transform: rotate(135deg) scaleX(1);
    transition: top 0.15s ease, left 0.15s ease;
    pointer-events: none;
    opacity: 0;
    z-index: 10;
}


#reading-pen.active {
    opacity: 1;
}

#verse-container {
    position: relative; /* necessário pro posicionamento absoluto da caneta funcionar certo */
}


.breadcrumb-item a {
    color: var(--secondary);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: var(--primary);
}

.breadcrumb-item.active {
    color: var(--gold);
    font-weight: 600;
}

.font-size-small { font-size: 0.9rem; }
.font-size-normal { font-size: 1rem; }
.font-size-large { font-size: 1.3rem; }


/* TOOLTIP DE VOCABULÁRIO (Tippy) — fundo amarelo claro estilo "post-it" */
.tippy-box[data-theme~='light-border'] {
    background-color: #FFF9DB;
    color: var(--dark);
    border: 1px solid var(--gold);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(51,50,46,0.18);
    font-family: 'Inter', sans-serif;
}

.tippy-box[data-theme~='light-border'] .tippy-content {
    padding: 10px 14px;
    font-size: 0.85rem;
    line-height: 1.4;
}

.tippy-box[data-theme~='light-border'] strong {
    color: var(--secondary);
}

.tippy-box[data-theme~='light-border'][data-placement^='top'] > .tippy-arrow::before {
    border-top-color: #FFF9DB;
}

.tippy-box[data-theme~='light-border'][data-placement^='bottom'] > .tippy-arrow::before {
    border-bottom-color: #FFF9DB;
}

.modal-dialog-scrollable .modal-content {
    max-height: 85vh;
}

.btn-icon-square {
    border-radius: 8px;
    padding: 0;
}