/* ============================================================
   1. VARIÁVEIS E CONFIGURAÇÕES GERAIS
   ============================================================ */
:root {
    --cor-primaria: #23ad11;
    --cor-primaria-clara: #f1f8e9;
    --cor-secundaria: #ffd700;
    --fonte-principal: 'Montserrat', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--fonte-principal);
    line-height: 1.6;
    color: #333;
    background-color: #fff;
    overflow-x: hidden;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================================
   2. CABEÇALHO E NAVEGAÇÃO
   ============================================================ */
.header-principal {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    top: 0;
    z-index: 1000;
    padding: 10px 0;
}

.container-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    flex-wrap: wrap;
}

.logo-img {
    width: 180px;
    height: auto;
    max-height: 100px;
    display: block;
    object-fit: contain;
}

.navegacao ul {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 20px;
}

.navegacao a {
    text-decoration: none;
    color: #555;
    font-weight: 600;
    font-size: 0.9rem;
    transition: 0.3s;
}

.navegacao a:hover {
    color: var(--cor-primaria);
}

/* ============================================================
   3. HERO E BANNER (SLIDER)
   ============================================================ */
.hero {
    background-size: cover;
    background-position: center;
    height: 80vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-overlay {
    background: rgba(0, 0, 0, 0.5);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
}

.hero-conteudo h1 {
    font-size: 3.5rem;
    margin-bottom: 15px;
    padding: 0 10px;
}

.banner-escola {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
}

.slide-foto {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.slide-foto.active {
    opacity: 1;
}

.dots-container {
    position: absolute;
    bottom: 20px;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 10px;
    z-index: 5;
}

.dot {
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: 0.3s;
}

.dot.active {
    background: var(--cor-primaria);
    transform: scale(1.2);
}

/* ============================================================
   4. SEÇÕES E GRIDS (SERVIÇOS E EVENTOS)
   ============================================================ */
.secao {
    padding: 80px 0;
    text-align: center;
}

.secao-cinza {
    background-color: #f4f7f6;
    padding: 80px 0;
    text-align: center;
}

#quemsomos {
    position: relative;
    z-index: 10;
    background-color: #fff;
}

/* Grid em linha para Serviços e Calendário */
.grid-servicos, .calendario-grade {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.card {
    background: #fff;
    padding: 40px 20px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border-bottom: 5px solid transparent;
}

.card:hover {
    transform: translateY(-10px);
    border-bottom-color: var(--cor-secundaria);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    background-color: var(--cor-primaria-clara);
}

/* Eventos do Calendário */
.evento-card {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    border-left: 5px solid #ddd;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    text-align: left;
    transition: 0.3s;
}

.evento-card:hover {
    background-color: #f9f9f9;
    border-left-color: var(--cor-secundaria);
    transform: translateY(-5px);
}

.evento-proximo {
    border-left-color: var(--cor-primaria);
    background-color: var(--cor-primaria-clara);
}

.evento-data {
    display: block;
    font-weight: bold;
    color: var(--cor-primaria);
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.evento-titulo {
    font-size: 1rem;
    color: #333;
    font-weight: 700;
}

/* ============================================================
   5. BOTÕES
   ============================================================ */
.btn-saiba-mais, .btn-calendario-completo {
    display: inline-block;
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s;
    border-radius: 5px;
}

.btn-saiba-mais {
    margin-top: 20px;
    padding: 12px 30px;
    background-color: var(--cor-secundaria);
    color: #000;
}

.btn-saiba-mais:hover {
    transform: scale(1.05);
}

.btn-calendario-completo {
    padding: 8px 18px;
    background-color: var(--cor-primaria);
    color: white;
    font-size: 0.85rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-right: 10px;
}

.btn-calendario-completo:hover {
    background-color: var(--cor-secundaria);
    color: #000;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.2);
}
.container-link-calendario {
    margin-top: 60px;
    margin-bottom: 20px;
    text-align: center;
}

/* ============================================================
   6. TURMAS E BILHETES
   ============================================================ */
.container-turno {
    margin-bottom: 100px;
    text-align: left;
}

.titulo-turno {
    color: var(--cor-primaria);
    border-bottom: 2px solid #ddd;
    display: inline-block;
    padding-bottom: 5px;
    margin-bottom: 25px;
    font-size: 1.5rem;
}

.grid-turmas {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
}

.btn-turma {
    cursor: pointer;
    background: white;
    color: #333;
    border: 1px solid #ddd;
    padding: 15px;
    font-family: inherit; /* Mantém a fonte Montserrat */
    font-weight: bold;    /* Mantém o peso do número */
    font-size: 1rem;      /* Tamanho original */
    border-radius: 8px;
    transition: 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn-turma:hover {
    background-color: var(--cor-primaria);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* ============================================================
   7. MODAL E SISTEMA DE LOGIN
   ============================================================ */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
}

.modal-conteudo {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    position: relative;
    border-top: 8px solid var(--cor-primaria);
    text-align: left;
    max-height: 85vh;
    overflow-y: auto;
}

/* Custom Scrollbar */
.modal-conteudo::-webkit-scrollbar { width: 8px; }
.modal-conteudo::-webkit-scrollbar-thumb { background: var(--cor-primaria); border-radius: 10px; }

#areaConteudo, #listaBilhetes { height: auto; overflow: visible; }

.fechar {
    position: absolute;
    right: 20px; top: 10px;
    font-size: 28px;
    cursor: pointer;
    color: #888;
}

.bilhete-item {
    background: var(--cor-primaria-clara);
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    border-left: 4px solid var(--cor-primaria);
}

.bilhete-item ul { list-style-type: disc; margin-left: 25px; margin-top: 10px; }
.bilhete-item li { margin-bottom: 5px; }

#campoSenha {
    width: 80%;
    padding: 12px;
    margin-bottom: 20px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    text-align: center;
    outline: none;
}

#btnConfirmarSenha {
    width: 80%;
    cursor: pointer;
    background-color: var(--cor-primaria);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: bold;
    transition: 0.3s;
}

.input-erro {
    border-color: #ff0000 !important;
    background-color: #fff0f0;
    animation: shake 0.3s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* ============================================================
   8. RODAPÉ E REDES SOCIAIS
   ============================================================ */
.rodape {
    background-color: #333;
    color: #fff;
    padding: 60px 0 0;
    margin-top: 80px;
}

.container-rodape {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
}

.logo-rodape { width: 210px; filter: brightness(0) invert(1); margin-bottom: 20px; }
.rodape-info p { color: #ccc; font-size: 0.85rem; max-width: 300px; }
.rodape h4 { color: var(--cor-secundaria); margin-bottom: 20px; font-size: 1.1rem; }
.rodape-contatos ul { list-style: none; }
.rodape-contatos a { color: var(--cor-secundaria) !important; text-decoration: none !important; }

.icones-sociais a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px; height: 45px;
    background: #444;
    color: #fff;
    border-radius: 50%;
    margin-right: 10px;
    text-decoration: none;
    font-size: 1.2rem;
    transition: 0.3s;
}

.icones-sociais a[title="Facebook"]:hover { background: #1877F2; }
.icones-sociais a[title="Instagram"]:hover { background: #E4405F; }
.icones-sociais a[title="WhatsApp"]:hover { background: #25D366; }

.direitos-autorais {
    background-color: #222;
    padding: 20px 0;
    text-align: center;
    font-size: 0.8rem;
    border-top: 1px solid #444;
}

.dev-credito strong { color: var(--cor-primaria); }

/* ============================================================
   9. UTILITÁRIOS (BOTÃO TOPO)
   ============================================================ */
#btnTopo {
    display: none;
    position: fixed;
    bottom: 30px; right: 30px;
    z-index: 999;
    background-color: var(--cor-primaria);
    color: white;
    width: 50px; height: 50px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    font-size: 20px;
    transition: 0.3s;
}

#btnTopo:hover {
    background-color: var(--cor-secundaria);
    color: #000;
    transform: translateY(-5px);
}

/*História fundação */
.bloco-historia {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-top: 60px;
    text-align: left;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.bloco-historia.inverter {
    flex-direction: row-reverse;
}

.bloco-historia.aparecer {
    opacity: 1;
    transform: translateY(0);
}

.historia-texto {
    flex: 1.2; 
}

.historia-texto h3 {
    color: var(--cor-primaria);
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.historia-imagem {
    flex: 1;
    text-align: center;
}

.historia-imagem img {
    width: 100%;
    max-height: 350px; /* Impede que a foto fique gigante na tela */
    object-fit: cover; /* Corta a imagem proporcionalmente se necessário */
    border-radius: 15px;
    box-shadow: 10px 10px 0px var(--cor-secundaria); 
    transition: 0.3s;
}

.historia-imagem img:hover {
    transform: scale(1.02);
}

.legenda-foto {
    font-size: 0.85rem;
    color: #666;
    margin-top: 12px;
    text-align: center;
    font-style: italic;
    border-top: 1px solid #ddd;
    padding-top: 8px;
}

/* Responsividade (Celular) */
@media (max-width: 768px) {
    .bloco-historia, 
    .bloco-historia.inverter {
        flex-direction: column; 
        text-align: center;
        gap: 20px;
        margin-top: 40px;
    }

    .historia-imagem img {
        max-height: 250px; 
    }
}

.sobre-paragrafo {
    max-width: 800px;
    margin: 20px auto 40px;
    font-size: 1.1rem;
    color: #555;
    line-height: 1.8;
}

#quemsomos h2 {
    font-size: 2.5rem;
    color: var(--cor-primaria);
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

#quemsomos h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--cor-secundaria);
    margin: 10px auto 0;
    border-radius: 2px;
}
.navegacao-bilhetes {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 15px;
}

.btn-seta {
    background: var(--cor-primaria);
    color: white;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    cursor: pointer;
    transition: 0.3s;
}

.btn-seta:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.5;
}

.contador-avisos {
    text-align: center;
    font-size: 0.85rem;
    color: #666;
    margin-top: 10px;
}
.data-postagem {
    display: block;
    color: #888;
    font-weight: bold;
    margin-bottom: 10px;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.texto-bilhete {
    line-height: 1.6;
    color: #333;
}

/* Animação suave ao trocar de aviso */
.animate-fade {
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   10. RESPONSIVIDADE
   ============================================================ */
@media (max-width: 768px) {
    .secao, .secao-cinza { padding: 40px 0; }
    .container-header { flex-direction: column; gap: 10px; }
    .logo-img { width: 140px; }
    .navegacao ul { gap: 8px; justify-content: center; }
    .navegacao a { font-size: 0.75rem; }
    .hero { height: 45vh; }
    .hero-conteudo h1 { font-size: 1.8rem; }
    .grid-servicos, .container-rodape { grid-template-columns: 1fr; }
    .grid-turmas { grid-template-columns: repeat(4, 1fr); gap: 8px; }
    .modal-conteudo { width: 95%; margin: 20% auto; padding: 20px; }
    .rodape-info p { margin: 0 auto; }
    #btnTopo { bottom: 20px; right: 20px; width: 45px; height: 45px; }
    .bloco-historia, .bloco-historia.inverter {
        flex-direction: column;
        text-align: center;
    }
}