/**
 * Hero + Header — responsivo completo (mobile, tablet, desktop)
 * Carregar por último para consolidar regras.
 */

/* —— Header: logo maior, links centralizados no desktop —— */
.site-header .header-inner {
  width: 100%;
  min-width: 0;
}

.site-header .brand {
  flex-shrink: 0;
}

.site-header .header-actions {
  flex-shrink: 0;
}

@media (min-width: 1024px) {
  :root {
    --header-h: clamp(5rem, 6vw, 5.75rem);
    --logo-h: clamp(10.5rem, 13.6vw, 13rem);
    --header-offset: calc(var(--logo-h) + 0.5rem);
  }

  .site-header {
    --header-h: clamp(5rem, 6vw, 5.75rem);
    --logo-h: clamp(10.5rem, 13.6vw, 13rem);
    --header-offset: calc(var(--logo-h) + 0.5rem);
    overflow: visible;
  }

  .site-header .header-inner {
    position: relative;
    justify-content: center;
    align-items: center;
    gap: clamp(1rem, 2.2vw, 2rem);
    height: var(--header-h);
    min-height: var(--header-h);
    max-height: var(--header-h);
    overflow: visible;
    max-width: min(72rem, 100%);
    margin-inline: auto;
    padding-inline: clamp(1rem, 3vw, 2rem);
  }

  .site-header .brand {
    position: relative;
    z-index: 2;
    flex-shrink: 0;
    margin-left: clamp(-1.5rem, -3vw, -0.75rem);
  }

  .site-header .brand img {
    height: var(--logo-h);
    max-height: var(--logo-h);
    width: auto;
    max-width: min(36rem, 42vw);
    object-fit: contain;
  }

  .site-header .nav-desktop {
    display: flex;
    position: static;
    transform: none;
    margin: 0;
    flex-shrink: 1;
    min-width: 0;
    justify-content: center;
    align-items: center;
    gap: clamp(0.55rem, 1.1vw, 1.1rem);
    z-index: 1;
    max-width: none;
    pointer-events: auto;
  }

  .site-header .nav-link {
    font-size: clamp(0.78rem, 0.95vw, 0.95rem);
    text-align: center;
  }

  .site-header .header-actions {
    position: relative;
    z-index: 2;
    flex-shrink: 0;
    gap: 0.5rem;
    margin-left: 0;
  }

  .site-header .btn-header-cta,
  .theme-light .site-header .btn-header-cta {
    padding: 0.6rem 1.1rem;
    font-size: clamp(0.8rem, 1vw, 0.92rem);
  }
}

@media (min-width: 1280px) {
  :root {
    --header-h: 5.75rem;
    --logo-h: 13.5rem;
    --header-offset: calc(var(--logo-h) + 0.5rem);
  }

  .site-header {
    --header-h: 5.75rem;
    --logo-h: 13.5rem;
    --header-offset: calc(var(--logo-h) + 0.5rem);
  }

  .site-header .brand img {
    max-width: min(40rem, 38vw);
  }

  .site-header .header-inner {
    gap: clamp(1.25rem, 2.5vw, 2.25rem);
    max-width: min(76rem, 100%);
  }

  .site-header .nav-desktop {
    gap: 1.25rem;
  }

  .site-header .nav-link {
    font-size: 0.98rem;
  }
}

/* —— Hero: base —— */
.theme-light .hero--light {
  overflow-x: clip;
}

.theme-light .hero--light > .container {
  width: min(100% - (var(--gutter) * 2), var(--container));
  margin-inline: auto;
}

.theme-light .hero-layout {
  width: 100%;
  min-width: 0;
}

.theme-light .hero-copy,
.theme-light .hero-aside,
.theme-light .hero-form-wrap {
  min-width: 0;
}

/* —— Mobile: coluna única, sem spacer da 1ª dobra —— */
@media (max-width: 767px) {
  .theme-light .hero--light {
    padding: 0.75rem 0 1.5rem;
  }

  .theme-light .hero-layout::before,
  .theme-light .hero-layout::after {
    display: none !important;
  }

  .theme-light .hero-layout {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    gap: clamp(1rem, 4vw, 1.35rem) !important;
    padding-bottom: 0.5rem;
  }

  .theme-light .hero-copy {
    order: 1;
    width: 100%;
    max-width: 100%;
    margin-inline: auto;
    align-self: stretch;
  }

  .theme-light .hero-aside {
    order: 2;
    width: 100%;
    max-width: min(28rem, 100%);
    margin-top: 0 !important;
    margin-inline: auto;
    align-self: center;
    gap: clamp(1rem, 3vw, 1.25rem);
  }

  .theme-light .hero-form-wrap,
  .theme-light .hero-form-wrap .lead-card--compact {
    width: 100%;
    max-width: 100%;
  }

  .theme-light .hero-title__line {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .theme-light .btn-whatsapp--hero {
    width: 100%;
    max-width: 100%;
    justify-content: center;
    text-align: center;
    line-height: 1.25;
  }

  .theme-light .package-picker {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .theme-light .package-option {
    flex-direction: row;
    justify-content: flex-start;
    padding: 0.65rem 0.75rem;
    text-align: left;
  }

  .theme-light .package-option__label {
    text-align: left;
    font-size: 0.75rem;
  }

  .wa-panel__topics {
    grid-template-columns: 1fr;
    padding-inline: 0.85rem;
  }

  .wa-topic {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    padding: 0.7rem 0.75rem;
    gap: 0.5rem;
  }

  .wa-topic__label {
    flex: 1;
    text-align: left;
  }

  .wa-topic__badge {
    margin-left: auto;
  }

  .wa-panel__cta {
    margin-inline: 0.85rem;
    width: calc(100% - 1.7rem);
    max-width: none;
    justify-content: center;
  }

  .lead-card__footer-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .lead-card__footer-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

@media (min-width: 400px) and (max-width: 767px) {
  .wa-panel__topics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* —— Tablet —— */
@media (min-width: 768px) and (max-width: 1023px) {
  .theme-light .hero--light {
    padding: 1.25rem 0 2rem;
  }

  .theme-light .hero-layout::before,
  .theme-light .hero-layout::after {
    display: none !important;
  }

  .theme-light .hero-layout {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: clamp(1.25rem, 3vw, 1.75rem);
    max-width: min(36rem, 100%);
    margin-inline: auto;
    justify-items: center;
  }

  .theme-light .hero-copy {
    order: 1;
    width: 100%;
    max-width: 100%;
    justify-self: center;
  }

  .theme-light .hero-aside {
    order: 2;
    width: 100%;
    max-width: min(32rem, 100%);
    margin-inline: auto;
    justify-self: center;
  }

  .theme-light .package-picker {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .wa-panel__topics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hero-risks {
    max-width: 100%;
  }
}

/* —— Desktop —— */
@media (min-width: 1024px) {
  .theme-light .hero--light {
    padding: clamp(1.5rem, 3vw, 2.75rem) 0 clamp(2rem, 4vw, 3rem);
    min-height: auto;
  }

  .theme-light .hero-layout {
    display: grid !important;
    grid-template-columns: minmax(20rem, 28rem) minmax(0, 1fr);
    gap: clamp(1.5rem, 3vw, 3rem);
    align-items: start;
    justify-items: stretch;
    padding-bottom: clamp(1.5rem, 3vw, 2.5rem);
    width: 100%;
    max-width: min(76rem, 100%);
    margin-inline: auto;
    padding-inline: clamp(1.25rem, 3vw, 2.5rem);
  }

  .theme-light .hero-aside {
    justify-self: start;
    align-self: start;
    width: 100%;
    max-width: min(28rem, 100%);
    margin-inline: 0;
    order: 1;
  }

  .theme-light .hero-copy {
    justify-self: end;
    align-self: start;
    width: 100%;
    max-width: min(38rem, 100%);
    margin-inline: 0;
    margin-left: auto;
    order: 2;
  }

  .theme-light .hero-form-wrap .lead-card--compact {
    width: 100%;
  }

  .theme-light .btn-whatsapp--hero {
    width: 100%;
    max-width: 20rem;
  }

}

@media (min-width: 1280px) {
  .theme-light .hero-layout {
    grid-template-columns: minmax(22rem, 30rem) minmax(0, 1.15fr);
    gap: clamp(2rem, 4vw, 3.5rem);
    padding-inline: clamp(1.5rem, 4vw, 3rem);
  }

  .theme-light .hero-copy {
    max-width: min(40rem, 100%);
  }

  .theme-light .hero-aside {
    max-width: min(30rem, 100%);
  }
}

/* Painel WA — tablets estreitos no desktop pequeno */
@media (min-width: 1024px) and (max-width: 1150px) {
  .wa-panel__topics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.45rem;
    padding-inline: 0.85rem;
  }

  .wa-topic__label {
    font-size: 0.82rem;
  }

  .wa-topic__badge {
    font-size: 0.58rem;
  }
}

/* Botões WhatsApp — área de toque */
.btn-whatsapp,
.btn-header-cta--wa,
.sticky-cta__wa,
.wa-panel__cta,
.mobile-nav-cta {
  min-height: 2.75rem;
}

@media (max-width: 767px) {
  .sticky-cta__wa {
    min-width: 2.75rem;
    min-height: 2.75rem;
  }
}

/* Header mobile: logo + CTA sem estourar a barra */
@media (max-width: 1023px) {
  .site-header .brand {
    margin-left: clamp(-0.85rem, -4vw, -0.35rem);
  }

  .site-header .header-inner {
    gap: clamp(0.35rem, 2vw, 0.65rem);
  }

  .site-header {
    --header-h: clamp(4.15rem, 11vw, 4.85rem);
    --logo-h: clamp(7rem, 20vw, 8.7rem);
    --header-offset: calc(var(--logo-h) + 0.5rem);
    overflow: visible;
  }

  .site-header .header-inner {
    overflow: visible;
  }

  .site-header .brand img {
    height: var(--logo-h);
    max-height: var(--logo-h);
    max-width: min(72vw, 29rem);
    width: auto;
    object-fit: contain;
  }

  .site-header .btn-header-cta {
    padding: 0.5rem clamp(0.55rem, 2.5vw, 0.9rem);
    font-size: clamp(0.68rem, 2.6vw, 0.82rem);
    white-space: nowrap;
    max-width: min(42vw, 10.5rem);
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .site-header .btn-header-cta .wa-icon {
    flex-shrink: 0;
  }
}

@media (max-width: 380px) {
  .site-header .btn-header-cta {
    font-size: 0.65rem;
    padding: 0.45rem 0.5rem;
    gap: 0.25rem;
  }
}

