/* Botões (Buttons) */
.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  border-radius: 50px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  border: none;
  min-height: 48px; /* accessibility touch area */
}

.btn-primary {
  padding: 16px 32px;
  font-size: 16px;
  min-width: 200px;
  width: 100%;
  background: var(--purple-dark);
  color: var(--white-pure);
}

.btn-primary:hover {
  background: var(--purple-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(77, 43, 140, 0.4);
}

.btn-ghost {
  padding: 14px 30px; /* compensated for border */
  border: 2px solid var(--white-pure);
  color: var(--white-pure);
  background: transparent;
  font-size: 16px;
  width: 100%;
}

.btn-ghost:hover {
  background: var(--white-pure);
  color: var(--black);
}

@media (min-width: 1024px) {
  .btn-primary {
    padding: 16px 40px;
    font-size: 18px;
    width: auto;
  }
  .btn-ghost {
    padding: 14px 38px;
    font-size: 18px;
    width: auto;
  }
}

/* Header */
.main-header {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  transition: background 0.4s ease;
  padding: 16px 20px;
}

.main-header.scrolled-header {
  position: fixed;
  background: rgba(1, 14, 63, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 12px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1280px;
  margin: 0 auto;
}

.logo-main {
  max-height: 40px;
  width: auto;
  display: block;
}

/* Mobile Menu & Hamburger */
.hamburger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 1001; /* Above overlay */
  position: relative;
}

.hamburger svg {
  width: 24px;
  height: 24px;
  fill: var(--white-pure);
}

.hamburger .line {
  transform-origin: center;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s ease;
}

.hamburger.is-active .line-top {
  transform: translateY(8px) rotate(45deg);
}

.hamburger.is-active .line-middle {
  opacity: 0;
  transform: scaleX(0);
}

.hamburger.is-active .line-bottom {
  transform: translateY(-8px) rotate(-45deg);
}

.nav-menu {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(1, 14, 63, 0.98);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 32px;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  z-index: 1000;
}

.nav-menu.is-open {
  opacity: 1;
  pointer-events: all;
}

.nav-link {
  font-family: 'DM Sans', sans-serif;
  font-size: 24px;
  text-decoration: none;
  color: var(--white-pure);
  font-weight: 500;
  transition: color 0.3s;
}

.nav-link:hover {
  color: var(--purple-light);
}

/* Dropdown Menu */
.nav-item.dropdown {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  width: 100%;
}
.dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.dropdown-toggle svg {
  width: 16px; height: 16px;
  transition: transform 0.3s;
}
.nav-item.dropdown.is-active .dropdown-toggle svg {
  transform: rotate(180deg);
}
.dropdown-menu {
  display: flex;
  flex-direction: column;
  background: transparent;
  width: 100%;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
  padding: 0;
  gap: 16px;
  align-items: center;
}
.nav-item.dropdown.is-active .dropdown-menu {
  max-height: 400px;
  padding-top: 16px;
}
.dropdown-link {
  font-family: 'DM Sans', sans-serif;
  font-size: 18px;
  text-decoration: none;
  color: rgba(229,229,229,0.8);
  transition: color 0.3s;
  text-align: center;
}
.dropdown-link:hover {
  color: var(--purple-light);
}

.btn-header-cta { display: none; }
.desktop-only-cta { display: none; }

/* Desktop overrides */
@media (min-width: 1024px) {
  .main-header { position: fixed; padding: 24px 48px; }
  .main-header.scrolled-header { padding: 16px 48px; }
  
  .hamburger { display: none; }
  
  .nav-menu {
    position: static;
    background: transparent;
    backdrop-filter: none;
    flex-direction: row;
    opacity: 1;
    pointer-events: auto;
    padding: 0;
    gap: 24px; /* Aproximado do CTA */
  }
  
  .mobile-nav-cta { display: none; } /* Ocultar botão mobile no desktop */
  
  .nav-link { font-size: 16px; font-weight: 400; }
  
  .btn-header-cta {
    display: inline-flex;
    padding: 12px 24px;
    font-size: 15px;
    min-width: auto;
    width: auto;
  }
  
  .desktop-only-cta {
    display: inline-flex;
    align-items: center;
    border-radius: 50px;
    padding: 12px 28px;
    font-size: 15px;
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    min-width: auto;
    width: auto;
    cursor: pointer;
  }

  /* Desktop Dropdown Overrides */
  .nav-item.dropdown {
    width: auto;
    cursor: pointer;
  }
  /* Expande o hitbox do parent para baixo cobrindo o gap */
  .nav-item.dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: -20px;
    right: -20px;
    height: 32px;
  }
  .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    width: 280px;
    background: rgba(1, 14, 63, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 16px;
    padding: 24px;
    gap: 16px;
    align-items: flex-start;
    max-height: none;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  }
  /* Ponte invisível para segurar o hover ao descer o mouse */
  .dropdown-menu::before {
    content: '';
    position: absolute;
    top: -24px;
    left: 0;
    right: 0;
    height: 24px;
  }
  /* Hover intent on parent to keep open */
  .nav-item.dropdown:hover .dropdown-menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(16px);
    padding-top: 24px; /* remove mobile override */
  }
  .nav-item.dropdown:hover .dropdown-toggle svg {
    transform: rotate(180deg);
  }
  .dropdown-link {
    font-size: 15px;
    width: 100%;
    text-align: left;
    color: var(--white-pure);
  }
}

/* Footer Components */
.main-footer {
  background-color: var(--black);
  color: var(--gray);
  position: relative;
  overflow: hidden;
  padding: 80px 20px 40px;
}

.main-footer::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: 
    radial-gradient(ellipse at 15% 85%, rgba(77,43,140,0.25) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 15%, rgba(48,26,88,0.2) 0%, transparent 55%);
}

.footer-content {
  position: relative;
  z-index: 2;
}

.footer-logo { max-height: 48px; margin-bottom: 24px; }
.footer-tagline { font-size: 16px; margin-bottom: 32px; color: var(--gray); max-width: 300px; }

.footer-title {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  color: var(--white-pure);
  margin-bottom: 24px;
}

.footer-links { list-style: none; }
.footer-links li { margin-bottom: 12px; }
.footer-links a { color: var(--gray); text-decoration: none; transition: color 0.3s; }
.footer-links a:hover { color: var(--white-pure); }

.footer-contact { margin-top: 48px; }

.footer-bottom {
  position: relative;
  z-index: 2;
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-size: 14px;
}

/* Footer Mobile Accordions */
@media (max-width: 1023px) {
  .footer-widget details summary {
    font-family: 'Playfair Display', serif;
    font-size: 20px;
    color: var(--white-pure);
    padding: 16px 0;
    cursor: pointer;
    list-style: none; /* remove default arrow */
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }
  .footer-widget details summary::after {
    content: '+';
    font-size: 24px;
    font-family: 'DM Sans', sans-serif;
  }
  .footer-widget details[open] summary::after { content: '-'; }
  .footer-widget details summary::-webkit-details-marker { display: none; }
  .footer-widget-content { padding: 16px 0; }
}

@media (min-width: 1024px) {
  .footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
  }
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
  }
  .footer-contact { margin-top: 0; }
  /* Remove accordion behavior on desktop */
  .footer-widget details summary { pointer-events: none; }
  .footer-widget details summary::after { display: none; }
  .footer-widget details[open] summary::after { display: none; }
  .footer-widget details:not([open]) .footer-widget-content { display: block; }
}

/* Floating WhatsApp */
.wa-float {
  position: fixed;
  bottom: 20px;
  right: 16px;
  width: 56px;
  height: 56px;
  background-color: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  text-decoration: none;
  animation: waPulse 2.5s infinite;
}

.wa-float svg {
  width: 32px;
  height: 32px;
  fill: #fff;
}

@media (min-width: 1024px) {
  .wa-float {
    bottom: 32px;
    right: 32px;
    width: 60px;
    height: 60px;
  }
  .wa-float svg { width: 36px; height: 36px; }
}

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--white-pure);
  box-shadow: 0 -4px 24px rgba(0,0,0,0.1);
  padding: 20px 20px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transform: translateY(100%);
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  /* Garante que não seja clipado pelo overflow do body */
  will-change: transform;
}

.cookie-banner.is-visible { transform: translateY(0); }

/* Quando aceito: empurra bem para baixo e apaga */
.cookie-banner.is-dismissed {
  transform: translateY(300%) !important;
  opacity: 0;
  pointer-events: none;
}
.cookie-text { font-size: 14px; color: var(--gray); margin-bottom: 0; }
.cookie-actions { display: flex; gap: 12px; }

@media (min-width: 768px) {
  .cookie-banner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 20px 48px;
    bottom: 24px;
    left: 24px;
    right: 24px;
    border-radius: 12px;
  }
}

/* FAQ Accordions */
.faq-item {
  border-bottom: 1px solid rgba(0,0,0,0.1);
}
.bg-dark .faq-item {
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.faq-q {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  padding: 24px 0;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: 18px;
  color: var(--black);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.bg-dark .faq-q { color: var(--white-pure); }

.faq-q::after {
  content: '+';
  font-size: 24px;
  transition: transform 0.3s;
}
.faq-item.is-open .faq-q::after { transform: rotate(45deg); }

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.faq-a-inner {
  padding-bottom: 24px;
  color: var(--gray);
}
