/* =========================================
   VARIÁVEIS DE CORES
========================================= */
:root {
    --cor-castanho: #5E4134;
    --cor-verde: #8DC24A;
    --cor-vermelho: #D9231D;
    --cor-amarelo: #E5B224;
    --cor-fundo: #FDFCF9;
    --cor-branco: #FFFFFF;
}

/* =========================================
   REGRAS GERAIS
========================================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html {
    scroll-padding-top: 150px; 
}

body {
    background-color: var(--cor-fundo);
    color: var(--cor-castanho);
    line-height: 1.6;
}

h1, h2, h3 {
    font-family: 'Georgia', serif;
    margin-bottom: 15px;
}

/* --- LÓGICA DE TRADUÇÃO CSS --- */
html[lang="pt"] .en { display: none !important; }
html[lang="en"] .pt { display: none !important; }

/* =========================================
   IMAGENS
========================================= */
img.foto-real {
    width: 100%;
    height: 250px; 
    object-fit: cover; 
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

img.hero-img {
    width: 100%;
    object-fit: contain;
    border-radius: 12px;
    margin-top: 30px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

img.logo-real {
    width: 300px; 
    height: auto;
    margin: 0 auto 20px;
    display: block;
    border-radius: 50%; 
    background-color: var(--cor-branco); 
    padding: 15px; 
    box-shadow: 0 6px 15px rgba(0,0,0,0.1); 
}

img.capa-livro {
    width: 100%;
    height: 350px; 
    object-fit: contain; 
    background-color: #eee; 
    border-radius: 5px;
    margin-bottom: 15px;
}

img.banner-total {
    width: 100%;
    height: 500px; 
    object-fit: cover; 
    display: block;
}

/* =========================================
   NAVEGAÇÃO (HEADER)
========================================= */
nav {
    background-color: var(--cor-castanho);
    padding: 15px 5%;
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav .logo-text {
    color: var(--cor-branco);
    font-weight: bold;
    font-size: 1.2rem;
    text-decoration: none;
}

.nav-direita {
    display: flex;
    align-items: center;
    gap: 30px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
    align-items: center;
}

nav ul li a {
    color: var(--cor-branco);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

nav ul li a:hover { color: var(--cor-amarelo); }

/* --- BOTÕES DE IDIOMA --- */
.lang-switch {
    display: flex;
    background-color: rgba(255, 255, 255, 0.2); 
    border-radius: 20px; 
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.lang-switch button {
    background: transparent;
    border: none;
    color: var(--cor-branco);
    padding: 8px 15px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: bold;
    transition: all 0.3s ease;
}

.lang-switch button:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.lang-switch button.active {
    background: var(--cor-amarelo);
    color: var(--cor-castanho);
}

/* =========================================
   SECÇÕES GERAIS E BOTÕES
========================================= */
section {
    padding: 60px 5%;
    max-width: 1200px;
    margin: 0 auto;
}

#inicio {
    text-align: center;
    padding: 80px 5%;
    background-color: var(--cor-amarelo);
    color: var(--cor-castanho);
}

#inicio h1 { font-size: 3rem; color: var(--cor-castanho); }

#inicio p.subtitle {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 30px;
    color: var(--cor-branco);
}

.botoes-topo {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap; 
    margin-top: 20px;
}

.botoes-topo .btn {
    margin-top: 0; 
}

.btn {
    display: inline-block;
    background-color: var(--cor-verde);
    color: var(--cor-branco);
    padding: 12px 25px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    margin-top: 20px;
    transition: background 0.3s;
}

.btn:hover { background-color: #79a73e; }
.btn-red { background-color: var(--cor-vermelho); }
.btn-red:hover { background-color: #ba1d18; }
.btn-blue { background-color: #1877F2; }
.btn-blue:hover { background-color: #145dbf; }

/* =========================================
   GRELHAS (CARTÕES)
========================================= */
.grid-colecoes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.card {
    background: var(--cor-branco);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border-top: 4px solid var(--cor-verde);
    display: flex;
    flex-direction: column;
}

.card:nth-child(even) { border-top-color: var(--cor-vermelho); }
.card:nth-child(3n) { border-top-color: var(--cor-amarelo); }

/* --- GRELHA DA SECÇÃO MÉDIA E VÍDEO --- */
.grid-media {
    display: grid;
    grid-template-columns: repeat(2, 1fr); 
    gap: 30px;
    margin-top: 40px;
}

.video-destaque {
    grid-column: span 2;
    align-items: center;
    text-align: center;
}

.card-noticia-img {
    height: 250px;
    background-color: var(--cor-amarelo);
    border-radius: 8px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
}

.fb-video-wrapper {
    position: relative;
    width: 100%;
    max-width: 650px;
    margin: 0 auto 20px auto;
    background-color: #f0f2f5; 
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #eaeaea;
    aspect-ratio: 560 / 429;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fb-video-fallback {
    position: absolute;
    padding: 20px;
    text-align: center;
    color: #666;
    font-size: 0.95rem;
    z-index: 0;
}

.fb-video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    z-index: 1; 
}

.youtube-video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* Proporção 16:9 */
    height: 0;
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
}

.youtube-video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

hr.divisor {
    border: 0;
    height: 2px;
    background: var(--cor-castanho);
    opacity: 0.1;
    margin: 40px 0;
}

/* =========================================
   CITAÇÃO (JOÃO AMADO) E SLIDESHOW
========================================= */
.citacao-destaque {
    max-width: 900px;
    margin: 40px auto 0 auto;
    padding: 25px 40px;
    background-color: var(--cor-branco);
    border-left: 5px solid var(--cor-amarelo);
    border-radius: 0 8px 8px 0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    text-align: left;
}

.citacao-destaque p.texto-citacao {
    margin-bottom: 15px;
    line-height: 1.6;
}

.citacao-destaque cite {
    display: block;
    text-align: right;
    font-style: normal;
    font-weight: normal;
    color: var(--cor-verde);
}

.slideshow-container {
    position: relative;
    width: 100%;
    height: 250px; 
    margin-bottom: 15px;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.slideshow-container .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1s ease-in-out; 
}

.slideshow-container .slide.active {
    opacity: 1;
}

/* =========================================
   RODAPÉ (FOOTER)
========================================= */
footer {
    background-color: var(--cor-castanho);
    color: var(--cor-branco);
    padding: 30px 5%;
    overflow: visible;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center; 
    max-width: 1200px;
    margin: 0 auto;
    gap: 20px;
}

.logo-esquerda {
    max-height: 100px; 
    width: auto;
    object-fit: contain;
    display: block;
    transform: scale(2); 
    transform-origin: left center;
}

.footer-text {
    flex: 1;
    text-align: center;
}

.logo-direita-container {
    display: flex;
    align-items: center;
}

.logo-direita {
    max-width: 210px; 
    max-height: 140px; 
    width: auto;
    height: auto;
    object-fit: contain;
}

footer blockquote {
    font-style: italic;
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--cor-amarelo);
}

/* =========================================
   DESIGN PARA TELEMÓVEIS (RESPONSIVO)
========================================= */
@media (max-width: 768px) {
    nav { flex-direction: column; gap: 15px; }
    .nav-direita { flex-direction: column; gap: 15px; }
    nav ul { flex-wrap: wrap; justify-content: center; gap: 10px; }
    #inicio h1 { font-size: 2rem; }
    
    .grid-media { grid-template-columns: 1fr; }
    .video-destaque { grid-column: span 1; }

    .footer-content {
        flex-direction: column;
        align-items: center;
        gap: 40px; 
    }
    .logo-esquerda {
        max-height: 80px;
        transform-origin: center center;
    }
    .logo-direita { max-height: 85px; }

    .citacao-destaque {
        padding: 15px 20px;
    }
}