/* ============================================================
   NOVO HEADER + CAROUSEL — Colégio De Ághape
   Todas as classes usam o prefixo "agh-" para não conflitar
   com o CSS existente (main.css, style.css, responsive.css).
============================================================ */

:root {
  --agh-navy: #1d2560;
  --agh-navy-dark: #14183f;
  --agh-white: #ffffff;
  --agh-cream: #f7f6f2;
  --agh-gold: #FCCA00;
  --agh-text-muted: #c7cae6;
  --agh-radius: 10px;
  --agh-header-h: 130px;
  --agh-topbar-h: 40px;
  --agh-transition: 0.25s ease;
}

/* Reset local, escopado às novas classes */
.agh-header, .agh-header * ,
.agh-hero, .agh-hero * {
  box-sizing: border-box;
}

/* ------------------------------------------------------------
   HEADER — estrutura geral
------------------------------------------------------------ */
.agh-header {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  font-family: 'Open Sans', Arial, sans-serif;
  box-shadow: 0 2px 14px rgba(20, 24, 63, 0.12);
}

/* Barra utilitária superior */
.agh-topbar {
  background: var(--agh-navy-dark);
  color: var(--agh-text-muted);
  font-size: 13px;
}

.agh-topbar__inner {
  max-width: 1280px;
  margin: 0 auto;
  height: var(--agh-topbar-h);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.agh-topbar__contact {
  display: flex;
  align-items: center;
  gap: 20px;
  white-space: nowrap;
}

.agh-topbar__link {
  color: var(--agh-text-muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color var(--agh-transition);
}
.agh-topbar__link:hover {
  color: var(--agh-gold);
}

.agh-topbar__aside {
  display: flex;
  align-items: center;
  gap: 18px;
}

.agh-topbar__social {
  display: flex;
  gap: 10px;
}
.agh-topbar__social a {
  color: var(--agh-text-muted);
  transition: color var(--agh-transition);
}
.agh-topbar__social a:hover {
  color: var(--agh-gold);
}

.agh-topbar__cta {
  background: var(--agh-gold);
  color: var(--agh-navy-dark);
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
  transition: filter var(--agh-transition);
}
.agh-topbar__cta:hover {
  filter: brightness(1.08);
}

/* Barra principal */
.agh-navbar {
  background: var(--agh-navy);
}

.agh-navbar__inner {
  max-width: 1280px;
  margin: 0 auto;
  height: var(--agh-header-h);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.agh-navbar__brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
.agh-navbar__logo {
  height: 52px;
  width: auto;
  display: block;
}

/* Toggle (hamburguer) — visível só no mobile */
.agh-navbar__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}
.agh-navbar__toggle-bar {
  width: 100%;
  height: 3px;
  border-radius: 3px;
  background: var(--agh-white);
  transition: transform var(--agh-transition), opacity var(--agh-transition);
}
.agh-navbar__toggle[aria-expanded="true"] .agh-navbar__toggle-bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.agh-navbar__toggle[aria-expanded="true"] .agh-navbar__toggle-bar:nth-child(2) {
  opacity: 0;
}
.agh-navbar__toggle[aria-expanded="true"] .agh-navbar__toggle-bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Navegação */
.agh-nav__list {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
}

.agh-nav__item {
  position: relative;
}

.agh-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--agh-white);
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: var(--agh-radius);
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: background var(--agh-transition), color var(--agh-transition);
  white-space: nowrap;
}
.agh-nav__link:hover,
.agh-nav__item--dropdown.is-open > .agh-nav__link {
  background: rgba(255, 255, 255, 0.1);
  color: var(--agh-gold);
}

.agh-nav__link--cta {
  background: var(--agh-gold);
  color: var(--agh-navy-dark);
}
.agh-nav__link--cta:hover {
  background: var(--agh-gold);
  filter: brightness(1.08);
  color: var(--agh-navy-dark);
}

/* Dropdown desktop */
.agh-nav__dropdown {
  list-style: none;
  margin: 0;
  padding: 8px;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 230px;
  background: var(--agh-white);
  border-radius: var(--agh-radius);
  box-shadow: 0 10px 30px rgba(20, 24, 63, 0.18);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity var(--agh-transition), transform var(--agh-transition), visibility var(--agh-transition);
  z-index: 10;
}
.agh-nav__item--dropdown.is-open .agh-nav__dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.agh-nav__dropdown-link {
  display: block;
  padding: 9px 12px;
  border-radius: 6px;
  color: var(--agh-navy-dark);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: background var(--agh-transition), color var(--agh-transition);
}
.agh-nav__dropdown-link:hover {
  background: var(--agh-cream);
  color: var(--agh-navy);
}

/* ------------------------------------------------------------
   RESPONSIVO — Header
------------------------------------------------------------ */
@media (max-width: 991px) {
  .agh-topbar__contact {
    display: none;
  }
  .agh-topbar__inner {
    justify-content: flex-end;
  }
}

@media (max-width: 860px) {

  .agh-navbar__toggle {
    display: flex;
  }

  .agh-navbar__logo {
    height: 42px;
  }

  .agh-nav {
    position: fixed;
    top: calc(var(--agh-header-h) + var(--agh-topbar-h));
    left: 0;
    width: 100%;
    max-height: calc(100vh - var(--agh-header-h) - var(--agh-topbar-h));
    overflow-y: auto;
    background: var(--agh-navy);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity var(--agh-transition), transform var(--agh-transition), visibility var(--agh-transition);
    box-shadow: 0 12px 24px rgba(20, 24, 63, 0.2);
  }
  .agh-nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
  }

  .agh-nav__list {
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    gap: 2px;
  }

  .agh-nav__link {
    width: 100%;
    justify-content: space-between;
    padding: 13px 14px;
  }

  .agh-nav__dropdown {
    position: static;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    background: rgba(255, 255, 255, 0.06);
    display: none;
    margin-top: 2px;
  }
  .agh-nav__item--dropdown.is-open .agh-nav__dropdown {
    display: block;
  }
  .agh-nav__dropdown-link {
    color: var(--agh-white);
  }
  .agh-nav__dropdown-link:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--agh-gold);
  }

  .agh-nav__item--highlight {
    margin-top: 8px;
  }
  .agh-nav__link--cta {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .agh-navbar__inner,
  .agh-topbar__inner {
    padding: 0 14px;
  }
}

/* ============================================================
   HERO / CAROUSEL
   Proporção garantida em qualquer largura via aspect-ratio +
   object-fit: cover (a imagem preenche o quadro sem distorcer).
============================================================ */
.agh-hero {
  position: relative;
  width: 100%;
  background: var(--agh-navy-dark);
  overflow: hidden;
}
 
.agh-hero__viewport {
  position: relative;
  width: 100%;
  overflow: hidden;
  /* altura inicial "palpite" só pra evitar salto de layout antes do JS medir
     a imagem real; é sobrescrita em JS assim que a imagem carrega. */
  height: 42vw;
  max-height: 620px;
  transition: height 0.3s ease;
}
 
.agh-hero__track {
  display: flex;
  align-items: flex-start;
  list-style: none;
  margin: 0;
  padding: 0;
  transition: transform 0.6s cubic-bezier(0.65, 0, 0.35, 1);
  will-change: transform;
}
 
.agh-hero__slide {
  flex: 0 0 100%;
  width: 100%;
}
 
.agh-hero__link {
  display: block;
  width: 100%;
}
 
/* Sem aspect-ratio fixa e sem object-fit: cover.
   A imagem usa sua proporção NATURAL (largura 100%, altura automática),
   então ela nunca é cortada nem distorcida — ela simplesmente encolhe/cresce
   mantendo a mesma relação largura/altura do arquivo original, em
   qualquer largura de tela. A altura do container (.agh-hero__viewport)
   é recalculada via JS (novo-header-carousel.js) para acompanhar a
   imagem do slide ativo. */
.agh-hero__img {
  display: block;
  width: 100%;
  height: auto;
  background: var(--agh-navy-dark);
}
 
/* Setas */
.agh-hero__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(20, 24, 63, 0.45);
  color: var(--agh-white);
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--agh-transition);
  z-index: 5;
}
.agh-hero__arrow:hover {
  background: var(--agh-navy-dark);
}
.agh-hero__arrow--prev {
  left: 16px;
}
.agh-hero__arrow--next {
  right: 16px;
}
 
@media (max-width: 600px) {
  .agh-hero__arrow {
    width: 36px;
    height: 36px;
    font-size: 15px;
  }
  .agh-hero__arrow--prev { left: 8px; }
  .agh-hero__arrow--next { right: 8px; }
}
 
/* Indicadores (dots) */
.agh-hero__dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 5;
}
 
.agh-hero__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 2px solid var(--agh-white);
  background: transparent;
  padding: 0;
  cursor: pointer;
  transition: background var(--agh-transition), transform var(--agh-transition);
}
.agh-hero__dot.is-active {
  background: var(--agh-white);
  transform: scale(1.15);
}

.hero-logo-wrap {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.hero-logo-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 16px 50px rgba(26,95,180,0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.hero-logo-circle::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 4px solid transparent;
    background: linear-gradient(135deg, var(--azul-escola), var(--verde-escola)) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

.hero-logo-circle img {
    width: 70px;
    height: 70px;
    object-fit: contain;
}