/*
Theme Name: Príncipe da Paz
Theme URI: https://principedapaz.com.br
Author: Sua Empresa
Description: Tema customizado para estudos bíblicos.
Version: 1.2
Requires at least: 6.0
Requires PHP: 7.4
*/

/* --- VARIÁVEIS GLOBAIS --- */
:root {
    --cor-primaria: #0f172a; /* Azul Marinho Profundo */
    --cor-secundaria: #cba660; /* Dourado Sóbrio */
    --cor-fundo: #f8f9fa; /* Cinza muito claro */
    --cor-texto: #333333;
    --cor-texto-suave: #666666;
    --branco: #ffffff;
    --sombra-card: 0 4px 6px rgba(0,0,0,0.05);
    --sombra-hover: 0 10px 15px rgba(0,0,0,0.1);
    --cinza-inativo: #e0e0e0;
    --verde-sucesso: #2ecc71;
    --vermelho-erro: #e74c3c;
}

/* --- RESET BÁSICO --- */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Merriweather', serif;
    background-color: var(--cor-fundo);
    color: var(--cor-texto);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6, nav, button, .book-title, .theme-tag, .link-arrow, .btn-cta, .psalm-number {
    font-family: 'Montserrat', sans-serif;
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }
img { max-width: 100%; height: auto; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* =========================================
   CORREÇÃO VISUAL: HEADER, MENU E LUPA
   ========================================= */

/* Container Principal do Header */
.site-header {
    background-color: #fff;
    padding: 15px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    
    /* O SEGREDO DO MENU FIXO: */
    position: sticky;  /* Torna o elemento "pegajoso" */
    top: 0;            /* Gruda assim que encostar no topo da tela */
    z-index: 1000;     /* Garante que ele passe POR CIMA do resto do site */
    width: 100%;       /* Garante que ocupe a largura total */
}

/* Flexbox: O Segredo do Alinhamento Horizontal */
.header-flex {
    display: flex !important;
    justify-content: space-between; /* Distribui: Esq - Meio - Dir */
    align-items: center; /* Alinha verticalmente no centro */
    flex-wrap: nowrap; /* PROIBIDO quebrar linha */
}

/* 1. ESTILO DO LOGO */
.site-logo {
    margin-right: 40px; /* Afasta um pouco do menu */
    flex-shrink: 0; /* Garante que o logo não seja esmagado */
}
.site-logo a {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 1.6rem;
    color: #1a1a1a;
    text-decoration: none;
    white-space: nowrap; /* <--- ISSO CONSERTA O LOGO QUEBRADO EM DUAS LINHAS */
}
.site-logo span { color: #d4a017; } /* Cor do "DaPaz" */

/* 2. ESTILO DO MENU */
.main-navigation {
    flex-grow: 1; /* Ocupa todo o espaço vazio no meio */
    text-align: right; /* Empurra os itens para a direita, perto da lupa */
}
.main-navigation ul {
    display: inline-flex; /* Itens em linha */
    gap: 30px; /* Espaço entre os links */
    list-style: none;
    margin: 0;
    padding: 0;
}
.main-navigation a {
    text-decoration: none;
    color: #333;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    font-family: 'Montserrat', sans-serif;
    transition: color 0.3s;
}
.main-navigation a:hover { color: #d4a017; }

/* 3. ESTILO DA LUPA */
.header-search-icon {
    margin-left: 35px; /* Espaço entre o Menu e a Lupa */
    padding-left: 20px;
    border-left: 1px solid #eee; /* Uma linha vertical sutil separando */
}
.header-search-icon a {
    color: #333;
    font-size: 1.2rem;
    cursor: pointer;
}
.header-search-icon a:hover { color: #d4a017; }

/* 4. A JANELA DE BUSCA (OVERLAY) */
.search-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(255,255,255,0.98); /* Fundo branco quase opaco */
    z-index: 9999;
    
    /* Começa invisível */
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    
    /* Centralização */
    display: flex; align-items: center; justify-content: center;
}

/* Só aparece quando tem a classe .active (clicou na lupa) */
.search-overlay.active {
    opacity: 1;
    visibility: visible;
}

.search-content {
    position: relative;
    width: 90%; max-width: 700px;
    text-align: center;
}
.search-field {
    width: 100%;
    border: none;
    border-bottom: 3px solid #333;
    font-family: 'Merriweather', serif;
    font-size: 2rem;
    padding: 15px 0;
    background: transparent;
    outline: none;
    text-align: center;
    color: #333;
}
.search-submit { display: none; } 
.close-search {
    position: absolute; top: -60px; right: 0;
    background: none; border: none; font-size: 2.5rem; cursor: pointer; color: #999;
}
.close-search:hover { color: #333; }

/* Responsividade (Mobile) */
@media (max-width: 768px) {
    .main-navigation { display: none; } /* Esconde menu no celular por enquanto */
    .header-flex { justify-content: space-between; }
}


/* --- HERO SECTION (HOME) --- */
.hero {
    background: linear-gradient(rgba(15, 23, 42, 0.8), rgba(15, 23, 42, 0.8)), url('https://images.unsplash.com/photo-1507434965515-61970f2bd7c6?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80');
    background-size: cover;
    background-position: center;
    color: var(--branco);
    padding: 100px 0;
    text-align: center;
}

.hero h1 { font-size: 3rem; margin-bottom: 20px; font-weight: 700; }
.hero p { font-size: 1.2rem; max-width: 700px; margin: 0 auto 40px; font-weight: 300; opacity: 0.9; }

.btn-cta {
    background-color: var(--cor-secundaria);
    color: var(--cor-primaria);
    padding: 15px 40px;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    display: inline-block;
}
.btn-cta:hover { background-color: #e0bb70; }

/* --- GRID DE LIVROS (HOME) --- */
.section-books { padding: 80px 0; background-color: var(--branco); }
.section-header { text-align: center; margin-bottom: 50px; }
.section-header h2 { font-size: 2rem; color: var(--cor-primaria); margin-bottom: 10px; }
.section-header p { color: var(--cor-texto-suave); }

.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.book-card {
    background: var(--branco);
    border: 1px solid #e0e0e0;
    padding: 25px;
    border-radius: 6px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 160px;
}

.book-card:hover { transform: translateY(-5px); box-shadow: var(--sombra-hover); border-color: var(--cor-secundaria); }

.book-card::before {
    content: '';
    position: absolute; top: 0; left: 0; width: 100%; height: 4px;
    background-color: var(--cor-secundaria); /* Dourado (Padrão AT) */
}
.book-card.nt::before { background-color: #94a3b8; /* Cinza Azulado (NT) */ }

.book-abbr {
    font-size: 3rem;
    font-weight: 700;
    color: #f3f3f3;
    position: absolute;
    top: 10px; right: 10px;
    z-index: 1;
}

.book-title { font-weight: 700; font-size: 1.1rem; color: var(--cor-primaria); z-index: 2; position: relative; }
.book-meta { font-size: 0.8rem; color: var(--cor-texto-suave); z-index: 2; margin-top: 10px; position: relative; }

/* --- RODAPÉ --- */
footer { background-color: var(--cor-primaria); color: var(--branco); padding: 60px 0 20px; margin-top: auto; }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-col h4 { color: var(--cor-secundaria); margin-bottom: 20px; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col a:hover { color: var(--cor-secundaria); padding-left: 5px; }
.copyright { text-align: center; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; font-size: 0.85rem; color: rgba(255,255,255,0.6); }

/* --- ESTILOS DA PÁGINA DE CATEGORIA (LIVRO) --- */

.hero-book { text-align: center; padding: 60px 0 40px; background: var(--branco); }
.hero-book h1 { font-size: 2.5rem; color: var(--cor-primaria); margin-bottom: 10px; }
.hero-book p { color: var(--cor-texto-suave); max-width: 600px; margin: 0 auto 30px; }

.intro-card {
    background: linear-gradient(135deg, var(--cor-primaria) 0%, #1e293b 100%);
    color: var(--branco); padding: 20px 30px; border-radius: 8px;
    display: inline-flex; align-items: center; gap: 15px; margin-bottom: 40px;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.2); transition: 0.3s;
    text-decoration: none;
}
.intro-card:hover { transform: translateY(-3px); box-shadow: 0 15px 25px rgba(15, 23, 42, 0.3); }
.intro-icon { font-size: 1.5rem; color: var(--cor-secundaria); }
.intro-text { text-align: left; }
.intro-text h3 { font-family: 'Montserrat', sans-serif; font-size: 1.1rem; margin-bottom: 2px; color: #fff; }
.intro-text span { font-size: 0.85rem; opacity: 0.8; color: #fff; }

.chapters-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 15px; padding-bottom: 80px;
}

.chapter-card {
    background-color: #fff; border: 1px solid #e0e0e0; border-radius: 8px;
    height: 100px; display: flex; flex-direction: column;
    justify-content: center; align-items: center; color: #ccc;
    cursor: default; transition: 0.3s; position: relative; text-decoration: none;
}

.chapter-number { font-family: 'Montserrat', sans-serif; font-size: 1.5rem; font-weight: 700; margin-bottom: 5px; }
.chapter-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1px; }

.chapter-card.active {
    border-color: var(--cor-secundaria); background-color: #fffbf0; color: var(--cor-primaria);
    cursor: pointer; box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.chapter-card.active:hover {
    transform: translateY(-5px); background-color: var(--cor-primaria); color: var(--branco);
    border-color: var(--cor-primaria);
}

.chapter-card.active::after {
    content: '\f00c'; font-family: 'Font Awesome 5 Free'; font-weight: 900;
    position: absolute; top: 5px; right: 5px; font-size: 0.8rem; color: var(--cor-secundaria);
}
.chapter-card.active:hover::after { color: var(--branco); }

/* --- ESTILOS DA PÁGINA DE ESTUDO (SINGLE) --- */

.study-hero { background: var(--branco); padding: 60px 0 40px; text-align: center; }
.study-hero h1 { font-size: 2.2rem; color: var(--cor-primaria); margin-bottom: 10px; line-height: 1.2; }
.study-meta { font-family: 'Montserrat', sans-serif; color: var(--cor-texto-suave); font-size: 0.9rem; margin-bottom: 30px; }

/* Resource Dock */
.resource-dock { display: flex; justify-content: center; gap: 15px; flex-wrap: wrap; margin-bottom: 40px; }
.resource-tag {
    display: flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 30px;
    font-family: 'Montserrat', sans-serif; font-size: 0.8rem; font-weight: 600;
    background-color: var(--branco); color: var(--cor-primaria);
    border: 1px solid #e0e0e0; cursor: pointer; box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    text-decoration: none;
}
.resource-tag:hover { border-color: var(--cor-secundaria); color: var(--cor-secundaria); transform: translateY(-2px); }

/* Conteúdo do Post */
.study-content { background: var(--branco); padding: 50px; border-radius: 8px; box-shadow: var(--sombra-card); margin-bottom: 80px; }
.text-block p { margin-bottom: 25px; font-size: 1.1rem; }
.text-block h2 { margin: 40px 0 20px; color: var(--cor-primaria); font-size: 1.8rem; }
.text-block blockquote { 
    border-left: 4px solid var(--cor-secundaria); margin: 30px 0; background: #fafafa; padding: 20px; font-style: italic; 
}

/* Player de Áudio */
.audio-box {
    background-color: #f8f9fa; border: 1px solid #e9ecef; border-radius: 8px; padding: 20px; margin-bottom: 40px;
    display: flex; align-items: center; gap: 20px;
}
.audio-icon { background: var(--cor-primaria); color: var(--branco); width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.audio-info h4 { font-size: 0.95rem; margin-bottom: 5px; color: var(--cor-primaria); margin-top: 0; }
.audio-info p { font-size: 0.8rem; color: #666; margin-bottom: 10px; margin-top: 0; }

/* Vídeo Responsivo */
.video-container { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: 8px; box-shadow: var(--sombra-card); margin: 30px 0; }
.video-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }

/* Downloads Grid */
.downloads-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 20px 0; }
.download-card {
    background: #fffbf0; border: 1px solid #e0d0a0; padding: 20px; border-radius: 8px;
    display: flex; align-items: center; gap: 15px; transition: 0.3s; text-decoration: none;
}
.download-card:hover { transform: translateY(-3px); background: var(--cor-secundaria); }
.download-card:hover * { color: var(--cor-primaria); }
.dl-icon { font-size: 2rem; color: var(--cor-secundaria); }
.dl-info h4 { font-size: 1rem; color: var(--cor-primaria); margin-bottom: 4px; margin-top: 0; }
.dl-info span { font-size: 0.75rem; text-transform: uppercase; font-weight: 700; color: #888; }

/* Share Bar */
.share-bar {
    position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%);
    background: var(--branco); padding: 10px 25px; border-radius: 50px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2); display: flex; gap: 20px; z-index: 100;
    align-items: center; border: 1px solid #eee;
}
.share-text { font-family: 'Montserrat', sans-serif; font-size: 0.8rem; font-weight: 700; }
.share-icons { display: flex; gap: 15px; }
.share-icons a { font-size: 1.2rem; color: var(--cor-primaria); cursor: pointer; }
.share-icons a:hover { color: var(--cor-secundaria); transform: scale(1.2); }
.close-share-btn { background: none; border: none; color: #999; cursor: pointer; border-left: 1px solid #eee; padding-left: 15px; }

/* Responsividade Geral */
@media (max-width: 768px) {
    .hero h1 { font-size: 2rem; }
    .footer-grid { grid-template-columns: 1fr; }
    .header-right { gap: 15px; }
    .hero-book h1 { font-size: 1.8rem; }
    .chapters-grid { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); }
    .downloads-grid { grid-template-columns: 1fr; }
    .study-content { padding: 25px; }
    .share-text { display: none; }
}

/* --- ESTILOS DO SPOTIFY E LOUVOR --- */
.spotify-box {
    background-color: #f8f9fa; 
    border: 1px solid #e9ecef; 
    border-radius: 12px; 
    padding: 20px; 
    margin-bottom: 40px;
}
.audio-info-header {
    display: flex; align-items: center; gap: 10px; margin-bottom: 15px;
}
.audio-info-header h4 { margin: 0; color: var(--cor-primaria); font-size: 1rem; }

/* Caixa de Louvor no Final */
.louvor-box {
    background: #fffbf0; 
    border: 1px solid #e0d0a0; 
    padding: 30px; 
    border-radius: 12px;
}
.louvor-header {
    display: flex; gap: 15px; align-items: flex-start; margin-bottom: 20px;
}
.louvor-header h3 { margin: 0 0 5px; color: var(--cor-primaria); font-size: 1.4rem; }
.louvor-header p { margin: 0; font-size: 0.9rem; color: #666; }
.louvor-header i { font-size: 1.5rem; margin-top: 5px; }

/* Ajuste Geral para Iframes do Spotify */
.spotify-embed-container iframe {
    width: 100%;
    min-height: 152px; /* Altura padrão do player horizontal do Spotify */
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

/* --- AJUSTE DE TÍTULO E VERSÍCULO --- */

/* Título Principal */
.post-real-title {
    font-size: 2.5rem;
    color: var(--cor-primaria);
    margin-bottom: 15px;
    font-weight: 800;
}

/* Subtítulo do Versículo */
.verse-subtitle {
    font-family: 'Merriweather', serif;
    font-style: italic;
    font-size: 1.2rem;
    color: #555;
    max-width: 800px;
    margin: 0 auto 30px;
    line-height: 1.6;
}

/* Ajuste Mobile */
@media (max-width: 768px) {
    .post-real-title { font-size: 2rem; }
    .verse-subtitle { font-size: 1rem; }
}

/* =========================================
   QUIZ INTERATIVO (FLASHCARDS)
   ========================================= */

.quiz-section-wrapper {
    margin: 60px 0;
    padding: 40px;
    background: #f9f9f9;
    border-radius: 16px;
    border: 1px solid #eee;
}

.quiz-container {
    max-width: 600px;
    margin: 40px auto;
    perspective: 1000px;
}

.quiz-stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    color: #555;
    font-weight: 600;
}

/* O Cartão */
.flashcard {
    background-color: transparent;
    width: 100%;
    min-height: 350px; /* Altura mínima confortável */
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s;
    cursor: pointer;
}

.flashcard.flipped {
    transform: rotateY(180deg);
}

.card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden; /* Esconde as costas */
    -webkit-backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    text-align: center;
}

/* Frente (Pergunta) - Azul Escuro */
.card-front {
    background-color: var(--cor-primaria);
    color: var(--branco);
}

/* Verso (Resposta) - Branco com borda */
.card-back {
    background-color: var(--branco);
    color: var(--cor-texto);
    transform: rotateY(180deg);
    border: 2px solid var(--cor-primaria);
}

.card-label {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 2px;
    margin-bottom: 20px;
    opacity: 0.8;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
}

.card-content {
    font-size: 1.3rem;
    font-weight: 600;
    font-family: 'Merriweather', serif;
    line-height: 1.6;
}

/* Controles e Botões */
.quiz-controls {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 15px;
    min-height: 50px;
}

.btn-quiz {
    padding: 12px 30px;
    border: none;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.btn-quiz:hover { transform: translateY(-2px); box-shadow: 0 6px 12px rgba(0,0,0,0.15); }

.btn-reveal {
    background-color: var(--cor-secundaria);
    color: var(--cor-primaria);
}

.btn-correct {
    background-color: var(--verde-sucesso);
    color: white;
}

.btn-wrong {
    background-color: var(--vermelho-erro);
    color: white;
}

.hidden { display: none !important; }

/* =========================================
   FORMULÁRIO DE CONTATO (CONTACT FORM 7)
   ========================================= */

/* A caixa branca do formulário */
div.wpcf7 {
    background: #ffffff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08); /* Sombra suave */
    border: 1px solid #eee;
    max-width: 700px; /* Largura máxima */
    margin: 0 auto;   /* Centraliza na tela */
}

/* Grid de duas colunas (Nome e Email lado a lado) */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; 
    gap: 20px;
}

/* Espaçamento dos campos */
.form-group { margin-bottom: 20px; }

/* Rótulos (Nome, Email, etc) */
.form-group label {
    font-weight: 700;
    color: #0f172a; /* Azul escuro */
    margin-bottom: 8px;
    display: block;
    font-size: 0.9rem;
    font-family: 'Montserrat', sans-serif;
}

/* O campo de digitar (input) */
.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    background: #f9f9f9;
    transition: 0.3s;
    font-family: 'Merriweather', serif;
}

/* Efeito ao clicar no campo */
.form-control:focus {
    background: #fff;
    border-color: #cba660; /* Dourado */
    outline: none;
    box-shadow: 0 0 0 3px rgba(203, 166, 96, 0.2);
}

/* Botão de Enviar */
.btn-submit {
    background-color: #0f172a;
    color: #fff;
    padding: 15px 40px;
    border: none;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    transition: 0.3s;
    width: 100%;
    margin-top: 10px;
}

.btn-submit:hover {
    background-color: #cba660;
    color: #0f172a;
    transform: translateY(-2px);
}

/* Responsividade para celular */
@media (max-width: 768px) {
    .form-grid { grid-template-columns: 1fr; } /* Empilha Nome e Email */
    div.wpcf7 { padding: 25px; }
}