/* ZEE — camada partilhada de apresentação
 * Mantém a paleta e a estrutura existentes; acrescenta apenas consistência,
 * acessibilidade e comportamento fluido entre larguras.
 */
:root {
  --zee-content-max: 1280px;
  --zee-gutter: clamp(16px, 3vw, 32px);
  --zee-motion: 240ms;
}

html {
  font-size: 100%;
  text-size-adjust: 100%;
}

body,
button,
input,
select,
textarea,
option {
  font-family: 'Poppins', Arial, sans-serif !important;
}

body {
  font-size: 1rem;
  line-height: 1.6;
}

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid #F26419;
  outline-offset: 3px;
}

img,
svg,
video {
  max-width: 100%;
}

/* O menu é escondido em larguras intermédias pelo CSS legado e aberto pelo JS
   com esta classe, evitando alterar a renderização PHP partilhada. */
@media (max-width: 1024px) {
  header .header-inner {
    min-height: 72px;
    height: auto;
    padding-block: 10px;
    gap: 16px;
  }

  header nav {
    display: none;
    width: 100%;
    order: 3;
    flex-basis: 100%;
  }

  header.is-mobile-open nav {
    display: block;
  }

  header .header-inner:has(+ nav) {
    flex-wrap: wrap;
  }

  header .nav-list {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 8px 0 4px;
  }

  header .nav-item,
  header .nav-link,
  header .nav-link-dropdown {
    width: 100%;
  }

  header .nav-link,
  header .nav-link-dropdown {
    min-height: 44px;
    justify-content: space-between;
    padding-inline: 12px;
  }

  header .dropdown {
    position: static;
    display: none;
    width: 100%;
    min-width: 0;
    margin: 0 0 4px;
    padding: 4px 8px 4px 20px;
    border: 0;
    border-left: 2px solid rgba(0, 71, 171, .2);
    border-radius: 0;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  header .nav-item.is-open > .dropdown {
    display: block;
  }

  header .dropdown a,
  header .dropdown .dropdown-heading {
    min-height: 42px;
    display: flex;
    align-items: center;
  }

  header .hamburger {
    display: inline-flex;
    margin-left: auto;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
  }
}

@media (min-width: 1181px) {
  header .hamburger {
    display: none !important;
  }
}

/* Cards de projectos: áreas clicáveis e altura consistente sem cortar conteúdo. */
#projectos-estruturantes .cards-grid {
  align-items: stretch;
}

#projectos-estruturantes .card {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

#projectos-estruturantes .card-icon-wrapper {
  display: grid;
  place-items: center;
  min-height: clamp(150px, 18vw, 220px);
  overflow: hidden;
  border-radius: 10px;
  background: rgba(0, 71, 171, .04);
}

#projectos-estruturantes .card-icon {
  width: 100%;
  height: clamp(150px, 18vw, 220px);
  object-fit: cover;
}

#projectos-estruturantes .card-description {
  overflow-wrap: anywhere;
}

#projectos-estruturantes .card[role="button"] {
  cursor: pointer;
}

/* Serviços ao investidor: separação visual clara da CTA azul seguinte. */
.services-grid {
  margin-bottom: clamp(32px, 5vw, 64px);
  align-items: stretch;
}

.services-grid .service-card {
  min-width: 0;
  min-height: 100%;
}

.portal-cta {
  clear: both;
  margin-top: clamp(24px, 4vw, 56px);
}

/* Carrossel institucional mais calmo e legível. */
.marquee-track {
  animation-duration: var(--zee-logos-duration, 70s) !important;
}

.marquee-container {
  touch-action: pan-x;
}

@media (max-width: 700px) {
  :root {
    --zee-gutter: 16px;
  }

  section {
    padding-block: clamp(52px, 10vw, 72px);
  }

  .section-inner,
  .topbar-inner {
    padding-inline: var(--zee-gutter);
  }

  .header-inner {
    padding-inline: var(--zee-gutter) !important;
  }

  .logo {
    max-width: calc(100% - 56px);
    gap: 6px;
  }

  .logo-img,
  .logo2-img {
    width: clamp(62px, 19vw, 100px);
    max-height: 48px;
  }

  .hero-inner {
    padding: 60px var(--zee-gutter) !important;
  }

  .hero h1 {
    font-size: clamp(34px, 10vw, 52px);
    letter-spacing: -1px;
  }

  .hero p {
    font-size: 1rem;
  }

  .hero-ctas .btn,
  .section-header > .btn {
    width: 100%;
    justify-content: center;
  }

  .hero-stats {
    gap: 8px;
  }

  .hero-stat strong {
    font-size: clamp(22px, 7vw, 28px);
  }

  .sectors-grid,
  .stats-grid,
  .services-grid {
    grid-template-columns: 1fr !important;
  }

  .services-grid .service-card {
    min-height: 0;
  }

  .simulator-card {
    padding: clamp(20px, 6vw, 32px) !important;
  }

  .marquee-container {
    height: 84px;
  }

  .marquee-track {
    animation-duration: var(--zee-logos-duration, 70s) !important;
  }

  .marquee-divider {
    margin-top: 1.5rem !important;
  }

  .project-modal-overlay {
    padding: 12px;
  }

  .project-modal {
    max-height: 88vh;
    border-radius: 12px;
  }

  .project-modal__image {
    max-height: 34vh;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }

  .fade-up {
    opacity: 1 !important;
    transform: none !important;
  }

  .marquee-track,
  .ticker-inner {
    animation: none !important;
  }
}
