/* ============================================================
   ACADEMIA VICTORY — Taekwondo & Pilates
   Design System + Estilos (CSS vanilla, sem framework)
   ============================================================ */

/* ---------- Design Tokens ---------- */
:root {
  /* Cores — identidade dojang / Taegeuk */
  --bg:            #ffffff;   /* base clara */
  --bg-2:          #f5f7f9;   /* superfície elevada */
  --bg-3:          #eef1f4;   /* cards */
  --line:          #e2e6ea;   /* bordas sutis */

  --red:           #e23744;   /* energia / Taegeuk vermelho */
  --red-dark:      #b8202c;
  --blue:          #2b7fc4;   /* Taegeuk azul */
  --gold:          #e9b949;   /* faixa / destaque */
  --gold-dark:     #a8790f;   /* dourado com contraste em fundo claro */
  --crest-blue:    #1f225d;   /* azul-marinho do anel do escudo (logo) */

  --text:          #1c2530;
  --text-muted:    #5b6b7a;
  --text-dim:      #8a97a4;
  --white:         #ffffff;

  --accent:        var(--red);

  /* Tipografia */
  --font: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  /* Espaçamento / layout */
  --container: 1160px;
  --radius:    14px;
  --radius-sm: 9px;

  /* Sombras */
  --shadow:    0 18px 50px rgba(15, 23, 32, .12);
  --shadow-sm: 0 6px 22px rgba(15, 23, 32, .08);

  /* Transições */
  --t: .28s cubic-bezier(.4, 0, .2, 1);
}

/* ---------- Reset enxuto ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

::selection { background: var(--red); color: #fff; }

h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; }

/* ---------- Utilitários ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 22px;
}

.section { padding: 96px 0; }
.section--tight { padding: 64px 0; }

.eyebrow {
  display: inline-block;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 14px;
}

.section-title {
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.section-title em { font-style: normal; color: var(--blue); }

.section-head { text-align: center; max-width: 640px; margin: 0 auto 56px; }
.section-head p { color: var(--text-muted); margin-top: 14px; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform var(--t), background var(--t), box-shadow var(--t), border-color var(--t);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn svg { width: 19px; height: 19px; }

.btn--primary { background: var(--red); color: #fff; box-shadow: 0 10px 26px rgba(226, 55, 68, .35); }
.btn--primary:hover { background: var(--red-dark); }

.btn--wa { background: #25d366; color: #07301a; }
.btn--wa:hover { background: #1fb858; }

.btn--ghost { border-color: var(--line); color: var(--text); }
.btn--ghost:hover { border-color: var(--text); background: rgba(28, 37, 48, .05); }

/* Sobre foto escura (hero) o ghost precisa de contraste claro */
.hero .btn--ghost { border-color: rgba(255, 255, 255, .4); color: #fff; }
.hero .btn--ghost:hover { border-color: #fff; background: rgba(255, 255, 255, .1); }

.btn--gold { background: var(--gold); color: #2a2100; }
.btn--gold:hover { background: #f3c75f; }

/* ============================================================
   HEADER
   ============================================================ */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background var(--t), box-shadow var(--t), padding var(--t);
  padding: 18px 0;
}
.header.scrolled {
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--line), 0 8px 24px rgba(15, 23, 32, .06);
  padding: 12px 0;
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: .5px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand { color: #fff; }
.brand em { font-style: normal; color: var(--blue); }
.brand img { width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--white); }
.header.scrolled .brand { color: var(--text); }

.nav-links__list {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-links__crest { display: none; } /* visível apenas no menu full-screen mobile */
.nav-links a:not(.btn) {
  padding: 9px 14px;
  font-weight: 500;
  font-size: .95rem;
  color: rgba(255, 255, 255, .78);
  border-radius: 8px;
  transition: color var(--t), background var(--t);
}
.nav-links a:not(.btn):hover,
.nav-links a.active { color: #fff; }
.nav-links a.active { color: var(--gold); }

.header.scrolled .nav-links a:not(.btn) { color: var(--text-muted); }
.header.scrolled .nav-links a:not(.btn):hover { color: var(--text); }
.header.scrolled .nav-links a.active { color: var(--red); }

.menu-toggle {
  display: none;
  position: relative;
  z-index: 201; /* sempre acima do overlay .nav-links (200) */
  background: none;
  border: 0;
  color: #fff;
  cursor: pointer;
  width: 42px; height: 42px;
}
.menu-toggle svg { width: 26px; height: 26px; }
.menu-toggle .icon-close { display: none; }
.menu-toggle.is-open .icon-menu { display: none; }
.menu-toggle.is-open .icon-close { display: block; }
.header.scrolled .menu-toggle,
.menu-toggle.is-open { color: var(--text); }

/* Fundo escurecido atrás do menu mobile — clicar nele fecha o menu */
/* Trava o scroll da página quando o menu mobile está aberto */
html.nav-open, html.nav-open body { overflow: hidden; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 120px 0 80px;
  overflow: hidden;
  color: #fff; /* fica sobre foto com véu escuro, independente do tema claro do site */
}
/* ---------- Slideshow de fundo (crossfade + Ken Burns) ---------- */
.hero__slides {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  background: var(--bg); /* evita flash em branco antes do 1º slide decodificar */
}
.hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.8s ease;
}
.hero__slide.is-active { opacity: 1; z-index: 1; }
.hero__slide picture,
.hero__slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  filter: saturate(1.08) contrast(1.03);
}
/* Ken Burns: zoom lento e contínuo enquanto o slide está ativo — a leve
   movimentação constante disfarça eventual perda de nitidez das fotos de origem. */
.hero__slide img { transform-origin: center; }
.hero__slide:nth-child(odd).is-active img { animation: kenburns-in 7s ease-out forwards; }
.hero__slide:nth-child(even).is-active img { animation: kenburns-out 7s ease-out forwards; }
@keyframes kenburns-in  { from { transform: scale(1);    } to { transform: scale(1.1); } }
@keyframes kenburns-out { from { transform: scale(1.1);  } to { transform: scale(1);   } }

/* Textura sutil de grão — unifica o estilo entre fotos de fontes diferentes */
.hero__slides::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: .05;
  mix-blend-mode: overlay;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(160deg, rgba(43,127,196,.22) 0%, rgba(43,127,196,0) 48%),
    radial-gradient(120% 80% at 50% 0%, rgba(13,17,23,.55), transparent 60%),
    linear-gradient(180deg, rgba(13,17,23,.78) 0%, rgba(13,17,23,.72) 45%, rgba(13,17,23,.95) 100%);
}
.hero__inner { max-width: 760px; padding-inline: 22px; }

.hero__crest {
  width: 256px; height: 256px;
  border-radius: 50%;
  margin: 0 auto 26px;
  border: 4px solid var(--white);
  box-shadow: var(--shadow);
}
.hero h1 {
  font-size: clamp(2.4rem, 7vw, 4.4rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  line-height: 1.05;
}
.hero h1 em { font-style: normal; color: var(--blue); }
.hero__sub {
  color: rgba(255, 255, 255, .82);
  font-size: clamp(1rem, 2.4vw, 1.2rem);
  max-width: 540px;
  margin: 20px auto 34px;
}
.hero__actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}
.hero__scroll {
  position: absolute;
  bottom: 26px; left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, .7);
  animation: bob 2s ease-in-out infinite;
}
.hero__scroll svg { width: 28px; height: 28px; }
@keyframes bob { 0%,100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 8px); } }

/* ============================================================
   SOBRE / GRÃO-MESTRE
   ============================================================ */
.about { background: var(--bg-2); }
.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.about__media { position: relative; }
.about__media img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}
.about__badge {
  position: absolute;
  bottom: -22px; right: -16px;
  background: var(--red);
  color: #fff;
  padding: 16px 22px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  font-weight: 700;
  line-height: 1.2;
}
.about__badge span { display: block; font-size: .72rem; font-weight: 500; opacity: .85; text-transform: uppercase; letter-spacing: 1px; }

.about__body h2 { font-size: clamp(1.6rem, 3.6vw, 2.3rem); text-transform: uppercase; margin-bottom: 18px; }
.about__body h2 em { font-style: normal; color: var(--blue); }
.about__body p { color: var(--text-muted); margin-bottom: 16px; }

/* 5 Princípios */
.principles {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-top: 30px;
}
.principle {
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 18px 12px;
  text-align: center;
  transition: transform var(--t), border-color var(--t);
}
.principle:hover { transform: translateY(-4px); border-color: var(--gold); }
.principle b { display: block; color: var(--gold-dark); font-size: 1.4rem; }
.principle span { font-size: .82rem; color: var(--text-muted); display: block; margin-top: 6px; }

/* ============================================================
   MODALIDADES
   ============================================================ */
.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}
.card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--t), border-color var(--t), box-shadow var(--t);
}
.card:hover { transform: translateY(-6px); border-color: var(--accent); box-shadow: var(--shadow); }
.card__img { position: relative; aspect-ratio: 16/10; overflow: hidden; }
.card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .card__img img { transform: scale(1.06); }
.card__tag {
  position: absolute; top: 14px; left: 14px;
  background: var(--red); color: #fff;
  padding: 5px 14px; border-radius: 999px;
  font-size: .76rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1px;
}
.card__tag.is-blue { background: var(--blue); }
.card__body { padding: 26px 26px 28px; display: flex; flex-direction: column; flex: 1; }
.card__body h3 { font-size: 1.45rem; margin-bottom: 12px; }
.card__body p { color: var(--text-muted); font-size: .95rem; margin-bottom: 22px; flex: 1; }
.card .btn { align-self: flex-start; }

/* ============================================================
   INSTAGRAM
   ============================================================ */
.ig { background: var(--bg-2); }
.ig-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.ig-grid .post { min-width: 0; }
.ig-grid iframe, .ig-grid .instagram-media { border-radius: var(--radius-sm) !important; margin: 0 auto !important; }
.ig-cta { text-align: center; margin-top: 44px; }

/* ============================================================
   HORÁRIOS
   ============================================================ */
.schedule-tabs {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.schedule-tabs button {
  background: var(--bg-3);
  border: 1px solid var(--line);
  color: var(--text-muted);
  padding: 9px 20px;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 600;
  font-size: .85rem;
  cursor: pointer;
  transition: all var(--t);
}
.schedule-tabs button.active { background: var(--red); border-color: var(--red); color: #fff; }

.schedule {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}
.day-col {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.day-col__head {
  background: var(--bg-3);
  padding: 14px;
  text-align: center;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: .85rem;
  border-bottom: 1px solid var(--line);
}
.day-col__body { padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.slot {
  padding: 10px 12px;
  border-radius: 8px;
  border-left: 3px solid var(--blue);
  background: rgba(43, 127, 196, .08);
  font-size: .82rem;
  transition: opacity var(--t);
}
.slot.tkd { border-left-color: var(--red); background: rgba(226, 55, 68, .09); }
.slot b { display: block; font-size: .8rem; }
.slot span { color: var(--text-muted); font-size: .78rem; }
.slot.hidden { display: none; }

/* Abas de dia: apenas no mobile (no desktop todos os dias aparecem) */
#day-tabs { display: none; }

/* ============================================================
   FAQ
   ============================================================ */
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  overflow: hidden;
  transition: border-color var(--t);
}
.faq-item[open] { border-color: var(--blue); }
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  list-style: none;
  transition: color var(--t);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--blue); }
.faq-icon {
  position: relative;
  flex-shrink: 0;
  width: 18px; height: 18px;
}
.faq-icon::before, .faq-icon::after {
  content: "";
  position: absolute;
  background: var(--blue);
  transition: transform var(--t);
}
.faq-icon::before { top: 8px; left: 0; width: 18px; height: 2px; }
.faq-icon::after  { left: 8px; top: 0; width: 2px; height: 18px; }
.faq-item[open] .faq-icon::after { transform: scaleY(0); }
.faq-answer { padding: 0 22px 20px; }
.faq-answer p { color: var(--text-muted); font-size: .95rem; }

/* ============================================================
   CONTATO (CTA)
   ============================================================ */
.cta {
  text-align: center;
  color: #fff; /* fica sobre foto com véu escuro, independente do tema claro do site */
  background:
    linear-gradient(rgba(13,17,23,.86), rgba(13,17,23,.92)),
    url('../assets/img/taekwondo.webp') center/cover fixed;
  border-block: 1px solid rgba(255, 255, 255, .12);
}
.cta h2 { font-size: clamp(1.8rem, 4.5vw, 2.8rem); text-transform: uppercase; }
.cta h2 em { font-style: normal; color: var(--blue); }
.cta p { color: rgba(255, 255, 255, .78); max-width: 560px; margin: 18px auto 32px; }
.cta__actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ============================================================
   LOCALIZAÇÃO
   ============================================================ */
.map-wrap {
  margin-top: 12px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.map-wrap iframe { display: block; width: 100%; height: 460px; border: 0; filter: grayscale(.25) contrast(1.05); }
.address {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--text-muted); margin-top: 10px;
}
.address svg { width: 20px; height: 20px; color: var(--red); flex-shrink: 0; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { background: #fff; color: #3a4654; padding: 56px 0 30px; }
.footer__logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
  margin-bottom: 38px;
}
.footer__logos img { height: 64px; width: auto; object-fit: contain; }
.footer__bottom {
  text-align: center;
  color: #6b7785;
  font-size: .85rem;
  border-top: 1px solid #e6e9ed;
  padding-top: 26px;
}
.footer__bottom strong { color: #1c2530; }
.footer__bottom a { color: #3a4654; font-weight: 500; }
.footer__bottom a:hover { color: var(--red); }
.footer__social { display: flex; gap: 14px; justify-content: center; margin-bottom: 22px; }
.footer__social a {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border: 1px solid #d9dee4;
  border-radius: 50%;
  color: #4a5663;
  transition: all var(--t);
}
.footer__social a:hover { background: var(--red); border-color: var(--red); color: #fff; transform: translateY(-3px); }
.footer__social svg { width: 20px; height: 20px; }

/* ============================================================
   WHATSAPP FLUTUANTE
   ============================================================ */
.wa-float {
  position: fixed;
  right: 22px; bottom: 22px;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 12px;
}
.wa-float a {
  width: 60px; height: 60px;
  background: #25d366;
  border-radius: 50%;
  display: grid; place-items: center;
  box-shadow: 0 10px 30px rgba(37, 211, 102, .5);
  transition: transform var(--t);
  animation: pulse 2.4s infinite;
}
.wa-float a:hover { transform: scale(1.08); }
.wa-float svg { width: 32px; height: 32px; color: #fff; }
@keyframes pulse {
  0% { box-shadow: 0 10px 30px rgba(37,211,102,.5), 0 0 0 0 rgba(37,211,102,.5); }
  70% { box-shadow: 0 10px 30px rgba(37,211,102,.5), 0 0 0 16px rgba(37,211,102,0); }
  100% { box-shadow: 0 10px 30px rgba(37,211,102,.5), 0 0 0 0 rgba(37,211,102,0); }
}

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ============================================================
   RESPONSIVO
   ============================================================ */
@media (max-width: 940px) {
  .about__grid { grid-template-columns: 1fr; gap: 50px; }
  .about__media { max-width: 520px; margin-inline: auto; }
  .schedule { grid-template-columns: 1fr; gap: 12px; }
  .day-col { display: none; }
  .day-col.active { display: block; }
  #day-tabs { display: flex; }
  .principles { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .cards { grid-template-columns: 1fr; }
  .ig-grid { grid-template-columns: 1fr; max-width: 420px; margin-inline: auto; }
  .cta { background-attachment: scroll; }
}

/* Menu do header: breakpoint próprio, mais largo que o resto do layout,
   porque logo + 6 links + botão CTA precisam de mais espaço horizontal
   antes de quebrar linha (o que sobrepunha o conteúdo abaixo do header fixo). */
/* Menu mobile: overlay full-screen opaco (não uma barra lateral parcial).
   Evita qualquer sobreposição com o header translúcido/blur ao rolar —
   o overlay cobre 100% da tela com uma cor sólida, sem "costura" visível. */
@media (max-width: 1180px) {
  .menu-toggle { display: grid; place-items: center; }
  .nav-links {
    position: fixed;
    inset: 0;
    z-index: 200; /* acima de tudo, inclusive do .header (100) */
    width: 100%;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: var(--bg-2);
    opacity: 0;
    visibility: hidden;
    transform: none;
    transition: opacity var(--t), visibility 0s linear var(--t);
  }
  .nav-links.open {
    opacity: 1;
    visibility: visible;
    transition: opacity var(--t), visibility 0s;
  }
  .nav-links__crest {
    display: block;
    width: 72px; height: 72px;
    border-radius: 50%;
    border: 3px solid var(--crest-blue);
    box-shadow: var(--shadow-sm);
    margin-bottom: 30px;
  }
  .nav-links__list {
    flex-direction: column;
    align-items: center;
    gap: 4px;
  }
  .nav-links a:not(.btn) {
    padding: 14px 14px;
    font-size: 1.3rem;
    color: var(--text-muted); /* overlay do menu mobile é claro, precisa de texto escuro sempre */
  }
  .nav-links a:not(.btn):hover { color: var(--text); }
  .nav-links a.active { color: var(--red); }
  .nav-links .btn { justify-content: center; margin-top: 18px; padding: 16px 32px; }
}

@media (max-width: 480px) {
  .section { padding: 70px 0; }
  .principles { grid-template-columns: 1fr; }
  .hero__actions { flex-direction: column; }
  .hero__actions .btn { justify-content: center; }
}

/* Acessibilidade — respeitar preferência de movimento reduzido */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
