/* ==========================================================================
   CENTRO EDUCACIONAL PORTO SEGURO — FOLHA DE ESTILO PRINCIPAL
   --------------------------------------------------------------------------
   Este arquivo complementa o Bootstrap 5 (que vem por CDN no index.html).
   Você raramente vai precisar mexer aqui. Se quiser trocar as CORES do site,
   altere APENAS o bloco ":root" logo abaixo — tudo no site usa essas cores.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1) CORES E VARIÁVEIS DO SITE  (edite aqui para mudar a identidade visual)
   -------------------------------------------------------------------------- */
:root {
  --ps-azul: #0a3d62;          /* Azul principal (cabeçalho, títulos, botões) */
  --ps-azul-escuro: #06283d;   /* Azul mais escuro (rodapé, barra superior)   */
  --ps-azul-claro: #1b7fa8;    /* Azul de apoio (links, detalhes)             */
  --ps-turquesa: #12a5a5;      /* Cor de destaque 1 (mar de Garopaba)         */
  --ps-amarelo: #f2a007;       /* Cor de destaque 2 (botões de ação, ênfases) */
  --ps-areia: #f6f4ef;         /* Fundo claro das seções alternadas           */
  --ps-cinza: #5b6b7a;         /* Texto secundário                            */

  --ps-raio: 16px;             /* Arredondamento padrão dos cards             */
  --ps-sombra: 0 10px 30px rgba(6, 40, 61, .08);
  --ps-sombra-forte: 0 18px 45px rgba(6, 40, 61, .16);
  --ps-transicao: all .3s ease;

  /* Sobrescreve variáveis do próprio Bootstrap para casar com a marca */
  --bs-primary: var(--ps-azul);
  --bs-body-color: #23323f;
  --bs-body-font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* --------------------------------------------------------------------------
   2) BASE
   -------------------------------------------------------------------------- */
html { scroll-behavior: smooth; }

body {
  font-family: var(--bs-body-font-family);
  color: var(--bs-body-color);
  overflow-x: hidden;
}

/* Evita que o menu fixo cubra o título ao rolar até uma seção (links com #) */
section[id], header[id], div[id="agenda"] { scroll-margin-top: 100px; }

h1, h2, h3, h4, h5, .fonte-titulo {
  font-family: "Poppins", var(--bs-body-font-family);
  font-weight: 700;
  color: var(--ps-azul-escuro);
  letter-spacing: -.02em;
}

a { color: var(--ps-azul-claro); text-decoration: none; transition: var(--ps-transicao); }
a:hover { color: var(--ps-azul); }

.secao { padding: 84px 0; }                 /* espaçamento padrão das seções */
.secao-clara { background: var(--ps-areia); }
.secao-azul { background: var(--ps-azul); color: #fff; }
.secao-azul h1, .secao-azul h2, .secao-azul h3, .secao-azul h4 { color: #fff; }

/* Etiqueta pequena que aparece acima dos títulos de seção */
.rotulo-secao {
  display: inline-block;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ps-turquesa);
  margin-bottom: .6rem;
}
.secao-azul .rotulo-secao { color: var(--ps-amarelo); }

.titulo-secao { font-size: clamp(1.7rem, 3.2vw, 2.5rem); margin-bottom: 1rem; }
.texto-apoio { color: var(--ps-cinza); font-size: 1.05rem; line-height: 1.75; }
.secao-azul .texto-apoio { color: rgba(255, 255, 255, .82); }

/* --------------------------------------------------------------------------
   3) BOTÕES
   -------------------------------------------------------------------------- */
.btn { border-radius: 999px; font-weight: 600; padding: .7rem 1.6rem; transition: var(--ps-transicao); }

.btn-ps {                                   /* botão principal (azul)   */
  background: var(--ps-azul);
  color: #fff;
  border: 2px solid var(--ps-azul);
}
.btn-ps:hover { background: var(--ps-azul-escuro); border-color: var(--ps-azul-escuro); color: #fff; transform: translateY(-2px); }

.btn-ps-amarelo {                           /* botão de ação (amarelo)  */
  background: var(--ps-amarelo);
  color: var(--ps-azul-escuro);
  border: 2px solid var(--ps-amarelo);
}
.btn-ps-amarelo:hover { background: #d98d00; border-color: #d98d00; color: #fff; transform: translateY(-2px); }

.btn-ps-contorno {                          /* botão vazado (branco)    */
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, .7);
}
.btn-ps-contorno:hover { background: #fff; color: var(--ps-azul); border-color: #fff; }

/* --------------------------------------------------------------------------
   4) BARRA SUPERIOR + MENU
   -------------------------------------------------------------------------- */
.barra-topo {
  background: var(--ps-azul-escuro);
  color: rgba(255, 255, 255, .85);
  font-size: .87rem;
  padding: .45rem 0;
}
.barra-topo a { color: rgba(255, 255, 255, .85); }
.barra-topo a:hover { color: var(--ps-amarelo); }

.navbar-ps {
  background: #fff;
  box-shadow: 0 2px 20px rgba(6, 40, 61, .07);
  padding: .7rem 0;
  transition: var(--ps-transicao);
}
.navbar-ps .navbar-brand img { height: 54px; transition: var(--ps-transicao); }
.navbar-ps.encolhido { padding: .3rem 0; }
.navbar-ps.encolhido .navbar-brand img { height: 44px; }

.navbar-ps .nav-link {
  font-weight: 600;
  color: var(--ps-azul-escuro);
  padding: .6rem 1rem !important;
  font-size: .95rem;
}
.navbar-ps .nav-link:hover,
.navbar-ps .nav-link.ativo { color: var(--ps-turquesa); }

.navbar-ps .dropdown-menu {
  border: none;
  border-radius: 14px;
  box-shadow: var(--ps-sombra);
  padding: .5rem;
  margin-top: .4rem;
}
.navbar-ps .dropdown-item { border-radius: 10px; font-size: .93rem; padding: .55rem .9rem; font-weight: 500; }
.navbar-ps .dropdown-item:hover { background: var(--ps-areia); color: var(--ps-azul); }

/* Faixa de aviso (fica logo abaixo do menu — texto editado em conteudo/dados.js) */
.faixa-aviso {
  background: linear-gradient(90deg, var(--ps-turquesa), var(--ps-azul-claro));
  color: #fff;
  font-size: .9rem;
  padding: .55rem 0;
  text-align: center;
}
.faixa-aviso a { color: #fff; text-decoration: underline; font-weight: 600; }

/* --------------------------------------------------------------------------
   5) HERO (banner principal)
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  background:
    linear-gradient(115deg, rgba(6, 40, 61, .92) 0%, rgba(10, 61, 98, .82) 45%, rgba(18, 165, 165, .55) 100%),
    url("../img/fundo.jpg") center/cover no-repeat;
  color: #fff;
  padding: 90px 0 120px;
}
.hero h1 {
  color: #fff;
  font-size: clamp(2.1rem, 5vw, 3.7rem);
  line-height: 1.1;
  margin-bottom: 1.2rem;
}
.hero .destaque-hero { color: var(--ps-amarelo); }
.hero p.chamada { font-size: 1.15rem; color: rgba(255, 255, 255, .9); max-width: 620px; }

.selo-hero {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .25);
  backdrop-filter: blur(6px);
  border-radius: 999px;
  padding: .45rem 1.1rem;
  font-size: .85rem;
  font-weight: 600;
  margin-bottom: 1.4rem;
}

/* --------------------------------------------------------------------------
   6) ATALHOS RÁPIDOS (cards que "sobem" por cima do hero)
   -------------------------------------------------------------------------- */
.faixa-atalhos { margin-top: -70px; position: relative; z-index: 5; }
.card-atalho {
  background: #fff;
  border-radius: var(--ps-raio);
  box-shadow: var(--ps-sombra);
  padding: 1.6rem 1rem;
  text-align: center;
  height: 100%;
  transition: var(--ps-transicao);
  display: block;
  color: var(--ps-azul-escuro);
}
.card-atalho:hover { transform: translateY(-6px); box-shadow: var(--ps-sombra-forte); color: var(--ps-azul); }
.card-atalho i { font-size: 1.9rem; color: var(--ps-turquesa); display: block; margin-bottom: .6rem; }
.card-atalho span { font-weight: 600; font-size: .95rem; display: block; line-height: 1.3; }

/* --------------------------------------------------------------------------
   7) CARDS DE NÍVEIS DE ENSINO
   -------------------------------------------------------------------------- */
.card-nivel {
  position: relative;
  border-radius: var(--ps-raio);
  overflow: hidden;
  height: 380px;
  display: flex;
  align-items: flex-end;
  box-shadow: var(--ps-sombra);
  transition: var(--ps-transicao);
}
.card-nivel img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.card-nivel::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(6, 40, 61, .93) 12%, rgba(6, 40, 61, .25) 60%, transparent 100%);
}
.card-nivel:hover { transform: translateY(-6px); box-shadow: var(--ps-sombra-forte); }
.card-nivel:hover img { transform: scale(1.07); }
.card-nivel .conteudo { position: relative; z-index: 2; padding: 1.6rem; color: #fff; }
.card-nivel .conteudo h3 { color: #fff; font-size: 1.3rem; margin-bottom: .35rem; }
.card-nivel .conteudo .idade { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ps-amarelo); font-weight: 700; }
.card-nivel .conteudo p { font-size: .93rem; color: rgba(255, 255, 255, .85); margin: .5rem 0 0; }

/* --------------------------------------------------------------------------
   8) DIFERENCIAIS
   -------------------------------------------------------------------------- */
.card-diferencial {
  background: #fff;
  border-radius: var(--ps-raio);
  padding: 2rem 1.6rem;
  height: 100%;
  border: 1px solid rgba(10, 61, 98, .08);
  transition: var(--ps-transicao);
}
.card-diferencial:hover { transform: translateY(-6px); box-shadow: var(--ps-sombra); border-color: transparent; }
.card-diferencial .icone {
  width: 56px; height: 56px;
  border-radius: 14px;
  display: grid; place-items: center;
  background: rgba(18, 165, 165, .12);
  color: var(--ps-turquesa);
  font-size: 1.5rem;
  margin-bottom: 1.1rem;
}
.card-diferencial h3 { font-size: 1.12rem; margin-bottom: .5rem; }
.card-diferencial p { color: var(--ps-cinza); font-size: .95rem; margin: 0; line-height: 1.65; }

/* --------------------------------------------------------------------------
   9) NÚMEROS / ESTATÍSTICAS
   -------------------------------------------------------------------------- */
.numero-destaque { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; color: var(--ps-amarelo); line-height: 1; font-family: "Poppins", sans-serif; }
.numero-legenda { font-size: .9rem; color: rgba(255, 255, 255, .8); margin-top: .4rem; }

/* --------------------------------------------------------------------------
   10) NOTÍCIAS
   -------------------------------------------------------------------------- */
.card-noticia {
  background: #fff;
  border-radius: var(--ps-raio);
  overflow: hidden;
  height: 100%;
  box-shadow: var(--ps-sombra);
  transition: var(--ps-transicao);
  display: flex;
  flex-direction: column;
}
.card-noticia:hover { transform: translateY(-6px); box-shadow: var(--ps-sombra-forte); }
.card-noticia .capa { height: 200px; overflow: hidden; background: var(--ps-areia); }
.card-noticia .capa img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.card-noticia:hover .capa img { transform: scale(1.06); }
.card-noticia .corpo { padding: 1.4rem; display: flex; flex-direction: column; flex: 1; }
.card-noticia h3 { font-size: 1.08rem; line-height: 1.4; margin-bottom: .6rem; }
.card-noticia p { color: var(--ps-cinza); font-size: .93rem; line-height: 1.6; flex: 1; }

.etiqueta {
  display: inline-block;
  background: rgba(18, 165, 165, .12);
  color: var(--ps-turquesa);
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: .3rem .7rem;
  border-radius: 999px;
  margin-bottom: .7rem;
}
.data-noticia { font-size: .82rem; color: var(--ps-cinza); }

.card-evento {
  background: #fff;
  border-radius: var(--ps-raio);
  overflow: hidden;
  height: 100%;
  box-shadow: var(--ps-sombra);
  transition: var(--ps-transicao);
  display: flex;
  flex-direction: column;
}
.card-evento:hover { transform: translateY(-6px); box-shadow: var(--ps-sombra-forte); }
.card-evento .data-evento {
  display: flex;
  align-items: baseline;
  gap: .55rem;
  background: var(--ps-azul);
  color: #fff;
  padding: 1.2rem 1.4rem;
}
.card-evento .data-evento .dia { font: 800 2.4rem/1 "Poppins", sans-serif; color: var(--ps-amarelo); }
.card-evento .data-evento .mes { font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.card-evento .data-evento .ano { margin-left: auto; color: rgba(255, 255, 255, .72); font-size: .85rem; }
.card-evento .corpo { padding: 1.4rem; display: flex; flex-direction: column; flex: 1; }
.card-evento h3 { font-size: 1.08rem; line-height: 1.4; margin-bottom: 1rem; }
.detalhes-evento { display: grid; gap: .45rem; color: var(--ps-cinza); font-size: .9rem; margin-top: auto; }
.detalhes-evento i { color: var(--ps-turquesa); }

/* --------------------------------------------------------------------------
   11) AGENDA
   -------------------------------------------------------------------------- */
.item-agenda {
  display: flex;
  gap: 1rem;
  align-items: center;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 14px;
  padding: 1rem 1.2rem;
  margin-bottom: .8rem;
}
.item-agenda .bloco-data {
  background: var(--ps-amarelo);
  color: var(--ps-azul-escuro);
  border-radius: 12px;
  min-width: 62px;
  text-align: center;
  padding: .5rem .3rem;
  font-weight: 800;
  line-height: 1.05;
}
.item-agenda .bloco-data .dia { font-size: 1.4rem; display: block; }
.item-agenda .bloco-data .mes { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; }
.item-agenda h4 { font-size: 1rem; color: #fff; margin: 0 0 .15rem; }
.item-agenda small { color: rgba(255, 255, 255, .7); }

/* --------------------------------------------------------------------------
   12) DEPOIMENTOS
   -------------------------------------------------------------------------- */
.card-depoimento {
  background: #fff;
  border-radius: var(--ps-raio);
  padding: 2rem;
  height: 100%;
  box-shadow: var(--ps-sombra);
}
.card-depoimento .aspas { font-size: 2.4rem; color: var(--ps-turquesa); line-height: 1; opacity: .35; }
.card-depoimento p { color: var(--ps-cinza); font-style: italic; line-height: 1.75; }
.card-depoimento .autor { font-weight: 700; color: var(--ps-azul-escuro); margin: 0; }
.card-depoimento .autor-info { font-size: .85rem; color: var(--ps-cinza); }

/* --------------------------------------------------------------------------
   13) CHAMADA FINAL (matrículas)
   -------------------------------------------------------------------------- */
.faixa-matricula {
  background: linear-gradient(120deg, var(--ps-azul-escuro), var(--ps-azul) 55%, var(--ps-turquesa) 130%);
  border-radius: 24px;
  padding: 3.2rem;
  color: #fff;
}
.faixa-matricula h2 { color: #fff; }
.faixa-matricula .rotulo-secao { color: var(--ps-amarelo); }
.faixa-matricula .texto-apoio { color: rgba(255, 255, 255, .85); }

/* --------------------------------------------------------------------------
   14) RODAPÉ
   -------------------------------------------------------------------------- */
.rodape { background: var(--ps-azul-escuro); color: rgba(255, 255, 255, .7); padding: 64px 0 0; }
.rodape h5 { color: #fff; font-size: 1rem; margin-bottom: 1.1rem; }
.rodape a { color: rgba(255, 255, 255, .7); display: inline-block; padding: .18rem 0; font-size: .93rem; }
.rodape a:hover { color: var(--ps-amarelo); }
.rodape .redes a {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  display: inline-grid; place-items: center;
  margin-right: .5rem;
  font-size: 1.05rem;
}
.rodape .redes a:hover { background: var(--ps-amarelo); color: var(--ps-azul-escuro); }
.rodape-base { border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 48px; padding: 20px 0; font-size: .85rem; }

/* --------------------------------------------------------------------------
   15) BOTÕES FLUTUANTES (WhatsApp e voltar ao topo)
   -------------------------------------------------------------------------- */
.botao-whatsapp {
  position: fixed; right: 20px; bottom: 20px; z-index: 999;
  width: 58px; height: 58px; border-radius: 50%;
  background: #25d366; color: #fff;
  display: grid; place-items: center;
  font-size: 1.7rem;
  box-shadow: 0 8px 24px rgba(37, 211, 102, .45);
}
.botao-whatsapp:hover { color: #fff; transform: scale(1.08); }

.botao-topo {
  position: fixed; right: 22px; bottom: 90px; z-index: 999;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--ps-azul); color: #fff; border: none;
  display: grid; place-items: center;
  opacity: 0; visibility: hidden;
  transition: var(--ps-transicao);
}
.botao-topo.visivel { opacity: 1; visibility: visible; }

/* --------------------------------------------------------------------------
   16) ANIMAÇÃO SUAVE DE ENTRADA DAS SEÇÕES
   -------------------------------------------------------------------------- */
.animar { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.animar.visivel { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .animar { opacity: 1; transform: none; transition: none; }
  * { scroll-behavior: auto !important; }
}

/* --------------------------------------------------------------------------
   17) AJUSTES PARA CELULAR
   -------------------------------------------------------------------------- */
@media (max-width: 991.98px) {
  .hero { min-height: auto; padding: 70px 0 100px; text-align: center; }
  .hero p.chamada { margin-left: auto; margin-right: auto; }
  .faixa-atalhos { margin-top: -50px; }
  .secao { padding: 60px 0; }
  .faixa-matricula { padding: 2.2rem 1.5rem; text-align: center; }
  .navbar-ps .dropdown-menu { box-shadow: none; padding-left: .5rem; }
}
