/* Tema escuro + navegação moderna + mobile */

:root {
  --header-height: 84px;
  --bottom-bar-height: 0px;
}

[data-theme="dark"] {
  --color-bg: #14161c;
  --color-bg-soft: #1c1f28;
  --color-text: #f2f4f8;
  --color-text-muted: #c5cad4;
  --color-border: #2e3440;
  --color-brand-green-soft: rgba(50, 185, 71, 0.15);
  --color-brand-purple-soft: rgba(74, 41, 179, 0.2);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 6px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.45);
}

[data-theme="dark"] .site-header {
  background: rgba(20, 22, 28, 0.94);
}

[data-theme="dark"] .hero {
  background: linear-gradient(180deg, rgba(50, 185, 71, 0.08) 0%, var(--color-bg) 50%);
}

[data-theme="dark"] .brand-logo {
  filter: brightness(1.08) contrast(1.05);
}

[data-theme="dark"] .results-panel {
  background: #2a1f5c;
}

[data-theme="dark"] .cta-band {
  background: #268a35;
}

/* Header compacto */
.site-header {
  height: var(--header-height);
}

.brand {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}

.brand-logo {
  height: 54px;
  max-width: min(240px, 36vw);
  display: block;
}

.header-pills {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  min-width: 0;
  justify-content: flex-end;
  padding-right: 0.25rem;
}

.header-actions {
  margin-left: 0;
}

.nav-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.05rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-decoration: none;
  border-radius: var(--radius-full);
  border: 1.5px solid transparent;
  background: transparent;
  transition: background var(--transition), color var(--transition), border-color var(--transition), box-shadow var(--transition);
  white-space: nowrap;
  cursor: pointer;
}

.nav-pill:hover {
  color: var(--color-brand-purple);
  background: var(--color-brand-purple-soft);
  border-color: rgba(74, 41, 179, 0.15);
}

.nav-pill.is-active {
  color: var(--color-white);
  background: var(--color-brand-purple);
  border-color: var(--color-brand-purple);
}

.nav-pill--muted {
  opacity: 0.9;
}

.nav-pill--icon-only {
  padding: 0.6rem 0.7rem;
  gap: 0;
}

.nav-pill--icon-only .nav-pill-icon {
  width: 22px;
  height: 22px;
}

.nav-pill-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  opacity: 0.9;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

/* Dúvidas/FAQ: só ícone em desktop médio (ganha espaço em ES/EN) */
@media (min-width: 901px) and (max-width: 1440px) {
  .header-pills .nav-pill--faq .nav-pill-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .header-pills .nav-pill--faq {
    padding: 0.55rem 0.65rem;
    gap: 0;
  }
}

@media (min-width: 901px) and (max-width: 1320px) {
  .header-inner {
    gap: 0.5rem;
  }

  .brand-logo {
    height: 46px;
    max-width: min(180px, 32vw);
  }

  .nav-pill {
    padding: 0.5rem 0.7rem;
    font-size: 0.875rem;
    gap: 0.35rem;
  }

  .nav-pill--icon-only,
  .header-pills .nav-pill--faq {
    padding: 0.5rem 0.6rem;
  }

  .nav-pill-icon {
    width: 18px;
    height: 18px;
  }

  .btn-header-cta {
    padding: 0.55rem 0.85rem;
    font-size: 0.875rem;
    min-height: 2.75rem;
  }

  .lang-switch-btn {
    min-width: 2rem;
    padding: 0.3rem 0.4rem;
    font-size: 0.75rem;
  }

  .icon-btn {
    width: 2.75rem;
    height: 2.75rem;
  }
}

/* Espanhol e inglês: textos mais longos no menu */
@media (min-width: 901px) {
  html.sl-lang-es .nav-pill,
  html.sl-lang-en .nav-pill {
    padding: 0.5rem 0.65rem;
    font-size: 0.875rem;
  }

  html.sl-lang-es .btn-header-cta,
  html.sl-lang-en .btn-header-cta {
    padding: 0.55rem 0.8rem;
    font-size: 0.875rem;
  }

  html.sl-lang-es .brand-logo,
  html.sl-lang-en .brand-logo {
    max-width: min(170px, 30vw);
  }
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  padding: 0;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  color: var(--color-text);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.icon-btn:hover {
  border-color: var(--color-brand-purple);
  color: var(--color-brand-purple);
}

.theme-toggle .icon-moon {
  display: none;
}

[data-theme="dark"] .theme-toggle .icon-sun {
  display: none;
}

[data-theme="dark"] .theme-toggle .icon-moon {
  display: block;
}

.btn-header-cta {
  padding: 0.65rem 1.25rem;
  font-size: 1rem;
  min-height: 3rem;
  white-space: nowrap;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.2rem;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--color-border);
  background: var(--color-bg);
}

.lang-switch-btn {
  min-width: 2.35rem;
  padding: 0.4rem 0.55rem;
  border: none;
  border-radius: var(--radius-full);
  background: transparent;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.lang-switch-btn:hover {
  color: var(--color-brand-purple);
}

.lang-switch-btn.is-active {
  color: var(--color-white);
  background: var(--color-brand-purple);
}

[data-theme="dark"] .lang-switch-btn.is-active {
  background: var(--color-brand-green);
  color: #0f1410;
}

@media (max-width: 1100px) {
  .lang-switch {
    order: -1;
  }
}

@media (max-width: 900px) {
  .header-pills {
    display: none;
  }

  .lang-switch--desktop {
    display: none;
  }
}

.lang-switch--mobile {
  display: none;
  margin: var(--space-md) var(--space-lg) 0;
  width: calc(100% - 2 * var(--space-lg));
  justify-content: center;
}

.mobile-drawer.is-open .lang-switch--mobile,
.mobile-drawer .lang-switch--mobile {
  display: inline-flex;
}

.nav-toggle {
  display: none;
}

/* Esconder nav antigo */
.site-nav {
  display: none !important;
}

/* Hero — foto principal + badge */
.hero-figure--team img {
  object-position: center center;
  max-height: min(400px, 50vh);
  aspect-ratio: 16 / 10;
}

.hero-badge-label {
  display: block;
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--color-brand-purple);
  line-height: 1.2;
}

[data-theme="dark"] .hero-badge-label {
  color: var(--color-brand-green);
}

.hero-figure-badge {
  padding: var(--space-md) var(--space-lg);
}

.hero-figure-badge .hero-stat-label {
  font-size: var(--font-size-sm);
  margin-top: 0.25rem;
}

.section-gallery {
  padding-block: var(--space-3xl);
}

.section-gallery .section-header {
  margin-bottom: var(--space-xl);
}

.section-gallery .container {
  max-width: 1320px;
}

/* Drawer mobile */
.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  visibility: hidden;
}

.mobile-drawer.is-open {
  pointer-events: auto;
  visibility: visible;
}

.mobile-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-drawer.is-open .mobile-drawer-backdrop {
  opacity: 1;
}

.mobile-drawer-panel {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: min(100%, 360px);
  background: var(--color-bg);
  border-left: 1px solid var(--color-border);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: var(--space-lg);
}

.mobile-drawer.is-open .mobile-drawer-panel {
  transform: translateX(0);
}

.mobile-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
}

.mobile-drawer-title {
  font-size: var(--font-size-lg);
  font-weight: 700;
}

.mobile-menu {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  overflow-y: auto;
}

.mobile-menu-btn {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  min-height: 3.25rem;
  padding: var(--space-md) var(--space-lg);
  font-size: var(--font-size-base);
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--color-border);
  background: var(--color-bg-soft);
  transition: background var(--transition), border-color var(--transition), color var(--transition);
  cursor: pointer;
}

.mobile-menu-btn:hover,
.mobile-menu-btn:focus-visible {
  border-color: var(--color-brand-purple);
  background: var(--color-brand-purple-soft);
  color: var(--color-brand-purple);
}

.mobile-menu-btn--accent {
  background: var(--color-brand-purple);
  border-color: var(--color-brand-purple);
  color: var(--color-white);
}

.mobile-menu-btn--accent:hover {
  background: var(--color-brand-purple-hover);
  color: var(--color-white);
}

.mobile-menu-btn--whatsapp {
  background: var(--color-brand-green);
  border-color: var(--color-brand-green);
  color: var(--color-white);
}

.mobile-menu-btn--whatsapp:hover {
  background: var(--color-brand-green-hover);
  color: var(--color-white);
}

/* Barra inferior mobile */
.bottom-bar {
  display: none;
}

.float-whatsapp--desktop {
  display: flex;
}

/* Mobile */
@media (max-width: 900px) {
  .header-pills,
  .btn-header-cta {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  :root {
    --header-height: 68px;
    --bottom-bar-height: 72px;
  }

  .brand-logo {
    height: 46px;
    max-width: min(220px, 55vw);
  }

  .bottom-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 90;
    height: var(--bottom-bar-height);
    padding: 0.35rem 0.5rem calc(0.35rem + env(safe-area-inset-bottom, 0px));
    background: var(--color-bg);
    border-top: 1px solid var(--color-border);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
  }

  [data-theme="dark"] .bottom-bar {
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.35);
  }

  .bottom-bar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    padding: 0.25rem;
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-decoration: none;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: inherit;
    min-height: 3rem;
  }

  .bottom-bar-item span {
    line-height: 1.1;
  }

  .bottom-bar-item--accent {
    color: var(--color-brand-purple);
  }

  .bottom-bar-item--whatsapp {
    color: var(--color-brand-green-hover);
  }

  .bottom-bar-item.is-active {
    color: var(--color-brand-purple);
    background: var(--color-brand-purple-soft);
  }

  body {
    padding-bottom: var(--bottom-bar-height);
  }

  .float-whatsapp--desktop {
    display: none;
  }

  .scroll-top {
    right: var(--space-md);
    bottom: calc(var(--bottom-bar-height) + var(--space-md));
  }

  .hero-figure--team {
    order: -1;
  }

  .hero-figure--team img {
    max-height: min(280px, 45vh);
  }

  .hero-layout {
    gap: var(--space-xl);
  }

  .hero-actions .btn {
    width: 100%;
  }

  .section {
    padding-block: var(--space-3xl);
  }
}

@media (min-width: 901px) {
  .mobile-drawer {
    display: none;
  }
}

@media (min-width: 1024px) {
  .hero-figure--team img {
    max-height: 400px;
  }
}

.photo-showcase,
.gallery-scroll,
.gallery-compact {
  display: none;
}
