/* OnlineJA — Custom styles (refatorado + nova paleta baseada na logo) */

:root {
  /* Primary — azul da logo (royal / deep blue) */
  --primary-50: #eef4ff;
  --primary-100: #d9e7ff;
  --primary-200: #bcd4ff;
  --primary-300: #8eb8ff;
  --primary-400: #5994ff;
  --primary-500: #2f6dff;
  --primary-600: #0a4dcc;
  --primary-700: #083da8;
  --primary-800: #0a3285;
  --primary-900: #0c2b6b;
  --primary-950: #081a42;

  /* Accent — amarelo/dourado da logo */
  --accent-400: #facc15;
  --accent-500: #eab308;
  --accent-600: #ca8a04;
  --accent-700: #a16207;

  /* Navy */
  --navy-800: #0f2744;
  --navy-900: #0a1a2e;
  --navy-950: #06101c;
}

html {
  scroll-behavior: smooth;
}

/* Base / prevent horizontal scroll */
html,
body {
  overflow-x: hidden;
  max-width: 100vw;
}

img {
  max-width: 100%;
  height: auto;
}

/* Primary helpers */
.bg-primary-50 {
  background-color: var(--primary-50);
}
.bg-primary-100 {
  background-color: var(--primary-100);
}
.bg-primary-200 {
  background-color: var(--primary-200);
}
.bg-primary-300 {
  background-color: var(--primary-300);
}
.bg-primary-400 {
  background-color: var(--primary-400);
}
.bg-primary-500 {
  background-color: var(--primary-500);
}
.bg-primary-600 {
  background-color: var(--primary-600);
}
.bg-primary-700 {
  background-color: var(--primary-700);
}
.bg-primary-800 {
  background-color: var(--primary-800);
}
.bg-primary-900 {
  background-color: var(--primary-900);
}
.bg-primary-950 {
  background-color: var(--primary-950);
}

.text-primary-50 {
  color: var(--primary-50);
}
.text-primary-100 {
  color: var(--primary-100);
}
.text-primary-200 {
  color: var(--primary-200);
}
.text-primary-300 {
  color: var(--primary-300);
}
.text-primary-400 {
  color: var(--primary-400);
}
.text-primary-500 {
  color: var(--primary-500);
}
.text-primary-600 {
  color: var(--primary-600);
}
.text-primary-700 {
  color: var(--primary-700);
}
.text-primary-800 {
  color: var(--primary-800);
}
.text-primary-900 {
  color: var(--primary-900);
}
.text-primary-950 {
  color: var(--primary-950);
}

/* Accent helpers */
.bg-accent-50 {
  background-color: #fefce8;
}
.bg-accent-100 {
  background-color: #fef9c3;
}
.bg-accent-400 {
  background-color: var(--accent-400);
}
.bg-accent-500 {
  background-color: var(--accent-500);
}
.bg-accent-600 {
  background-color: var(--accent-600);
}
.bg-accent-700 {
  background-color: var(--accent-700);
}

.text-accent-400 {
  color: var(--accent-400);
}
.text-accent-500 {
  color: var(--accent-500);
}
.text-accent-600 {
  color: var(--accent-600);
}
.text-accent-700 {
  color: var(--accent-700);
}

/* Navy */
.bg-navy-800 {
  background-color: var(--navy-800);
}
.bg-navy-900 {
  background-color: var(--navy-900);
}
.bg-navy-950 {
  background-color: var(--navy-950);
}
.text-navy-900 {
  color: var(--navy-900);
}

/* Gradients */
.from-primary-300 {
  --tw-gradient-from: var(--primary-300);
}
.from-primary-500 {
  --tw-gradient-from: var(--primary-500);
}
.from-primary-600 {
  --tw-gradient-from: var(--primary-600);
}
.from-primary-700 {
  --tw-gradient-from: var(--primary-700);
}
.from-accent-400 {
  --tw-gradient-from: var(--accent-400);
}
.from-accent-500 {
  --tw-gradient-from: var(--accent-500);
}
.from-navy-950 {
  --tw-gradient-from: var(--navy-950);
}

.via-navy-900 {
  --tw-gradient-stops: var(--tw-gradient-from), var(--navy-900), var(--tw-gradient-to);
}
.via-primary-600 {
  --tw-gradient-stops: var(--tw-gradient-from), var(--primary-600), var(--tw-gradient-to);
}

.to-primary-300 {
  --tw-gradient-to: var(--primary-300);
}
.to-primary-600 {
  --tw-gradient-to: var(--primary-600);
}
.to-primary-800 {
  --tw-gradient-to: var(--primary-800);
}
.to-primary-900 {
  --tw-gradient-to: var(--primary-900);
}
.to-accent-400 {
  --tw-gradient-to: var(--accent-400);
}
.to-accent-500 {
  --tw-gradient-to: var(--accent-500);
}

/* Opacity helpers */
.bg-primary-500\/30 {
  background-color: rgba(47, 109, 255, 0.3);
}
.bg-primary-600\/20 {
  background-color: rgba(10, 77, 204, 0.2);
}
.bg-accent-500\/10 {
  background-color: rgba(234, 179, 8, 0.1);
}
.bg-accent-500\/20 {
  background-color: rgba(234, 179, 8, 0.2);
}
.bg-accent-500\/25 {
  background-color: rgba(234, 179, 8, 0.25);
}
.bg-accent-500\/30 {
  background-color: rgba(234, 179, 8, 0.3);
}

.border-primary-200 {
  border-color: var(--primary-200);
}
.border-navy-900 {
  border-color: var(--navy-900);
}
.border-accent-500 {
  border-color: var(--accent-500);
}

.shadow-accent-500\/25 {
  box-shadow: 0 10px 25px rgba(234, 179, 8, 0.25);
}
.shadow-accent-500\/30 {
  box-shadow: 0 12px 30px rgba(234, 179, 8, 0.3);
}
.shadow-primary-600\/30 {
  box-shadow: 0 12px 30px rgba(10, 77, 204, 0.3);
}

/* Mobile menu animado */
#mobile-menu {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition:
    max-height 0.35s ease,
    opacity 0.25s ease;
}

#mobile-menu.is-open {
  max-height: 480px; /* alto o suficiente pro conteúdo */
  opacity: 1;
}

/* Header */
#header {
  background-color: rgba(238, 244, 255, 0.95);
  transition:
    background-color 0.3s ease,
    box-shadow 0.3s ease,
    backdrop-filter 0.3s ease;
}

#header.scrolled {
  background-color: rgba(238, 244, 255, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.12);
  border-bottom-color: rgba(226, 232, 240, 0.5);
}

/* Header logo safe size */
#header img {
  max-height: 56px;
  width: auto;
}

@media (min-width: 768px) {
  #header img {
    max-height: 64px;
  }

  .gallery-prev {
    left: -12px;
  }
  .gallery-next {
    right: -12px;
  }
}

/* FAQ accordion */
.faq-content {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  padding-bottom: 0;
  transition:
    max-height 0.35s ease,
    opacity 0.25s ease,
    padding-bottom 0.25s ease;
}

.faq-item.open .faq-content {
  max-height: 300px;
  opacity: 1;
  padding-bottom: 1.25rem;
}

.faq-icon {
  transition: transform 0.3s ease;
}

.faq-item.open .faq-icon {
  transform: rotate(180deg);
}

/* Focus */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent-500);
  outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* Hero mobile polish */
@media (max-width: 639px) {
  .hero-title {
    font-size: 1.75rem !important;
    line-height: 1.2 !important;
  }
  .hero-buttons a {
    width: 100%;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
    font-size: 1rem !important;
  }
  .hero-visual {
    width: 100% !important;
    max-width: 280px;
    margin-left: auto;
    margin-right: auto;
  }
  .hero-checks {
    flex-direction: column !important;
    align-items: center !important;
    gap: 0.75rem !important;
  }

  .gallery-swiper-nav {
    width: 40px;
    height: 40px;
  }
  .gallery-prev {
    left: 4px;
  }
  .gallery-next {
    right: 4px;
  }
}

@media (min-width: 640px) and (max-width: 1023px) {
  .hero-title {
    font-size: 2.25rem !important;
  }

  #beneficios .benefit-card {
    width: calc(50% - 0.75rem);
  }
}

/* Softer section padding on small screens */
@media (max-width: 767px) {
  section {
    scroll-margin-top: 5rem;
  }
}

/* Floating WhatsApp + onda pulsante */
.wa-float {
  position: fixed;
  z-index: 40;
  bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
  right: calc(1.25rem + env(safe-area-inset-right, 0px));
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: #20bd5a; /* seu verde escuro como cor normal */
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45); /* verde claro na sombra */
  transition:
    background-color 0.25s ease,
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.wa-float:hover {
  background-color: #1aa34d; /* levemente mais escuro no hover */
  transform: scale(1.08);
  box-shadow: 0 12px 32px rgba(37, 211, 102, 0.55);
}

/* Ondas (animação do primeiro exemplo) */
.wa-float::before,
.wa-float::after {
  content: '';
  position: absolute;
  left: -10px;
  top: -10px;
  right: -10px;
  bottom: -10px;
  border-radius: 50%;
  border: 3px solid #25d366; /* verde claro na onda */
  opacity: 0;
  animation: WaveWhatsApp 1.8s ease infinite;
  pointer-events: none;
  z-index: -1;
}

.wa-float::after {
  animation-delay: 0.6s;
}

@keyframes WaveWhatsApp {
  0% {
    transform: scale(0.55);
    opacity: 0.7;
  }
  70% {
    opacity: 0.25;
  }
  100% {
    transform: scale(1.35);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wa-float::before,
  .wa-float::after {
    animation: none;
  }
}

/* ========== HERO SLIDER (Swiper + Ken Burns) ========== */
.hero-swiper {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-swiper .swiper-slide {
  position: relative;
  overflow: hidden;
  background-color: #06101c;
}

.hero-slide-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1);
  transition: none;
}

/* Ken Burns — slow subtle zoom while slide is active */
.hero-swiper .swiper-slide-active .hero-slide-bg {
  animation: kenburns 12s ease-out forwards;
}

@keyframes kenburns {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(1.08);
  }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(6, 16, 28, 0.88) 0%, rgba(10, 26, 46, 0.75) 50%, rgba(8, 61, 168, 0.55) 100%);
  z-index: 1;
  pointer-events: none;
}

.hero-content-layer {
  position: relative;
  z-index: 10;
  pointer-events: none;
}

.hero-content-layer > * {
  pointer-events: auto;
}

.hero-swiper-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  width: 44px;
  height: 44px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    background 0.25s ease,
    transform 0.2s ease;
  backdrop-filter: blur(6px);
}

.hero-swiper-nav:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-50%) scale(1.05);
}

.hero-swiper-prev {
  left: 12px;
}

.hero-swiper-next {
  right: 12px;
}

@media (min-width: 768px) {
  .hero-swiper-prev {
    left: 24px;
  }
  .hero-swiper-next {
    right: 24px;
  }
}

.hero-swiper-pagination {
  position: absolute !important;
  bottom: 20px !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 20;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.hero-swiper-pagination .swiper-pagination-bullet {
  width: 10px;
  height: 10px;
  background: rgba(255, 255, 255, 0.4);
  opacity: 1;
  transition:
    background 0.3s ease,
    transform 0.3s ease;
}

.hero-swiper-pagination .swiper-pagination-bullet-active {
  background: var(--accent-400);
  transform: scale(1.2);
}

/* ========== GALERIA CARROSSEL (Swiper) ========== */
.gallery-section-inner {
  position: relative;
}

.gallery-swiper {
  width: 100%;
  overflow: hidden; /* não mostra slides cortados */
  padding-bottom: 48px !important;
}

.gallery-swiper .swiper-slide {
  height: auto;
  box-sizing: border-box;
}

.gallery-card {
  display: block;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(15, 39, 68, 0.12);
  border: 1px solid rgba(15, 39, 68, 0.06);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  background: #fff;
}

.gallery-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(10, 77, 204, 0.18);
}

.gallery-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease;
}

.gallery-card:hover img {
  transform: scale(1.04);
}

/* Botões laterais — bem visíveis, fora da área dos slides */
.gallery-swiper-nav {
  position: absolute;
  top: calc(50% - 24px);
  transform: translateY(-50%);
  z-index: 20;
  width: 48px;
  height: 48px;
  border-radius: 9999px;
  background: #0a4dcc;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 3px solid #fff;
  box-shadow:
    0 6px 16px rgba(0, 0, 0, 0.25),
    0 2px 6px rgba(0, 0, 0, 0.15);
  transition:
    background 0.25s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.gallery-swiper-nav:hover {
  background: #083da8;
  transform: translateY(-50%) scale(1.08);
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.3),
    0 4px 8px rgba(0, 0, 0, 0.18);
}

.gallery-prev {
  left: -8px;
}

.gallery-next {
  right: -8px;
}

.gallery-swiper .swiper-pagination-bullet {
  background: var(--primary-300);
  opacity: 1;
}

.gallery-swiper .swiper-pagination-bullet-active {
  background: var(--accent-500);
}

/* ========== BENEFÍCIOS CARDS ========== */
#beneficios .benefits-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
}

#beneficios .benefit-card {
  background: var(--navy-800);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 32px rgba(6, 16, 28, 0.35);
  width: 100%;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease;
}

#beneficios .benefit-card:hover {
  background: var(--navy-800);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-6px) scale(1.03) !important;
  box-shadow: 0 20px 48px rgba(6, 16, 28, 0.55);
}

#beneficios .benefit-card h3 {
  color: #ffffff;
}

#beneficios .benefit-card p {
  color: #cbd5e1;
}

#beneficios .benefit-card .benefit-icon {
  transition:
    transform 0.2s ease,
    background 0.3s ease;
}

#beneficios .benefit-card:hover .benefit-icon {
  transform: scale(1.1);
}

#beneficios .benefit-card .benefit-icon.icon-primary,
#beneficios .benefit-card .benefit-icon.icon-accent {
  background-color: #ffffff;
}

#beneficios .benefit-card .benefit-icon.icon-primary svg,
#beneficios .benefit-card .benefit-icon.icon-accent svg {
  color: var(--navy-950);
}

#beneficios .benefit-card:hover .benefit-icon.icon-primary,
#beneficios .benefit-card:hover .benefit-icon.icon-accent {
  background-color: var(--primary-100);
}

#beneficios .benefit-card:hover .benefit-icon.icon-primary svg,
#beneficios .benefit-card:hover .benefit-icon.icon-accent svg {
  color: var(--primary-700);
}

@media (min-width: 1024px) {
  #beneficios .benefits-grid {
    gap: 2rem;
  }

  #beneficios .benefit-card {
    width: calc(33.333% - 1.34rem);
  }
}

/* ========== MARKER ANIMATION ========== */
.marker-pulando {
  animation: markerBounce 1.5s ease-in-out infinite;
  transform-origin: bottom center;
}

@keyframes markerBounce {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  50% {
    transform: translateY(-14px) scale(1.05);
  }
}
