/* ============================================================
   Academia Saúde & Cia — Custom CSS
   Complementa o Tailwind CDN com animações e utilitários extras
   ============================================================ */

/* Scroll suave */
html {
  scroll-behavior: smooth;
}

/* Scrollbar customizada */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #F5F5F5; }
::-webkit-scrollbar-thumb { background: #3A6DB5; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #1E3F7A; }

/* ── Navbar ─────────────────────────────────────────────── */
#navbar {
  transition: box-shadow 0.3s ease, background-color 0.3s ease;
}

.navbar-scrolled {
  box-shadow: 0 2px 24px rgba(30, 63, 122, 0.12);
}

/* Link ativo na navegação */
.nav-link-active {
  color: #3A6DB5 !important;
  position: relative;
}

.nav-link-active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: #3A6DB5;
  border-radius: 2px;
}

/* ── Animações de entrada (scroll reveal) ────────────────── */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Delays escalonados para grids */
.animate-on-scroll:nth-child(2) { transition-delay: 0.08s; }
.animate-on-scroll:nth-child(3) { transition-delay: 0.16s; }
.animate-on-scroll:nth-child(4) { transition-delay: 0.24s; }
.animate-on-scroll:nth-child(5) { transition-delay: 0.32s; }
.animate-on-scroll:nth-child(6) { transition-delay: 0.40s; }
.animate-on-scroll:nth-child(7) { transition-delay: 0.48s; }
.animate-on-scroll:nth-child(8) { transition-delay: 0.56s; }

/* ── Hero ────────────────────────────────────────────────── */
.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 80% 50%, rgba(255,255,255,0.05) 0%, transparent 60%);
  pointer-events: none;
}

/* ── Cards de modalidade ─────────────────────────────────── */
.card-modalidade {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card-modalidade:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(58, 109, 181, 0.18);
}

/* ── Tabelas de horários ─────────────────────────────────── */
.tabela-horarios th {
  background-color: #3A6DB5;
  color: #ffffff;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.03em;
  padding: 0.75rem 1rem;
  text-align: left;
}

.tabela-horarios tr:nth-child(even) td {
  background-color: #F0F5FF;
}

.tabela-horarios tr:hover td {
  background-color: #E8F0FD;
}

.tabela-horarios td {
  padding: 0.65rem 1rem;
  font-family: 'Lato', sans-serif;
  font-size: 0.9rem;
  color: #374151;
  border-bottom: 1px solid #E5E7EB;
  transition: background-color 0.15s ease;
}

/* ── Tab de modalidades nos horários ─────────────────────── */
.tab-btn {
  transition: all 0.2s ease;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
}

.tab-btn.active {
  background-color: #3A6DB5;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(58, 109, 181, 0.3);
}

/* ── Botões ──────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: #3A6DB5;
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  border-radius: 1rem;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 0.9375rem;
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 14px rgba(58, 109, 181, 0.3);
}

.btn-primary:hover {
  background-color: #1E3F7A;
  transform: scale(1.03);
  box-shadow: 0 6px 20px rgba(30, 63, 122, 0.35);
}

.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: #25D366;
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  border-radius: 1rem;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 0.9375rem;
  transition: background-color 0.2s ease, transform 0.2s ease;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp:hover {
  background-color: #1DA851;
  transform: scale(1.03);
}

/* ── Section heroes internos ─────────────────────────────── */
.page-hero {
  background: linear-gradient(135deg, #1E3F7A 0%, #3A6DB5 100%);
  padding: 4rem 0;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 2px 2px, rgba(255,255,255,0.06) 1px, transparent 0);
  background-size: 36px 36px;
}

.page-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background-color: #CC1F2D;
}

/* ── Timeline (academia.html) ────────────────────────────── */
.timeline-item {
  position: relative;
  padding-left: 2.5rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: 0.5rem;
  top: 0;
  bottom: -2rem;
  width: 2px;
  background: linear-gradient(to bottom, #3A6DB5, #E5E7EB);
}

.timeline-item:last-child::before {
  display: none;
}

.timeline-dot {
  position: absolute;
  left: 0;
  top: 0.35rem;
  width: 1rem;
  height: 1rem;
  background-color: #3A6DB5;
  border: 3px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 0 3px #3A6DB5;
}


/* ── Focus visível (acessibilidade) ─────────────────────── */
a:focus-visible,
button:focus-visible {
  outline: 3px solid #3A6DB5;
  outline-offset: 3px;
  border-radius: 6px;
}
