/* ===========================================================
   Topbar, Header/Nav, Seções, Hero, Cards, Parceiros e Footer
   =========================================================== */

/* Topbar */
.topbar {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1rem;
  background: var(--topbar-bg);
  color: var(--topbar-text);
  font-size: 0.92rem;
  flex-wrap: wrap;
}

.topbar-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  flex: 1 1 auto;
  min-width: 0;
}


.topbar span {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: clamp(0.75rem, 2vw, 0.92rem);
}

.topbar .material-symbols-outlined {
  font-size: 1.05rem;
  opacity: 0.95;
  flex-shrink: 0;
}

.topbar a {
  color: var(--topbar-text);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  white-space: nowrap;
}

.topbar a:hover {
  border-bottom-color: rgba(255, 255, 255, 0.65);
}

/* ===============
   responsividade da topbar (mobile-first, ajustes para telas menores):
   =============== */

@media (max-width: 768px) {
  .topbar {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
  }

  .topbar-left,
  .images-topbar-center {
    width: 100%;
    justify-content: center;
  }

  .topbar span {
    font-size: 0.85rem;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .topbar {
    padding: 0.4rem 0.5rem;
    gap: 0.3rem;
  }

  .topbar span {
    font-size: 0.75rem;
  }

  .header-actions {
    width: 100%;
    justify-content: center;
  }
}

/* Header / Navbar */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  justify-content: flex-start;
  padding: 0.7rem 1rem;
  background: var(--header-nav-bg);
  border-bottom: 2px solid rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  flex-wrap: nowrap;
  min-height: 60px;
  transition: box-shadow 250ms ease;
}

.header.scrolled {
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.28);
}

/* CORRIGIDO: altura responsiva da logo — era clamp(180px, 6vw, 180px) fixo */
.logo {
  height: clamp(48px, 7vw, 72px);
  width: auto;
  flex-shrink: 0;
  transition: transform 220ms ease;
}

.header a:hover .logo {
  transform: scale(1.04);
}

/* Nav container */
nav {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 1rem;
}

nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  min-width: 0;
  gap: 2px;
  padding: 0;
  margin: 0;
}

nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 0.85rem;
  font-size: clamp(0.75rem, 1.5vw, 0.95rem);
  font-weight: 700;
  letter-spacing: 0.3px;
  line-height: 1;
  color: var(--color-text-nav);
  border-radius: 999px;
  text-decoration: none;
  outline: none;
  white-space: nowrap;
  transition: color 200ms ease, background 200ms ease;
  flex-shrink: 0;
}

nav a::after {
  display: none;
}

nav a:hover {
  color: var(--color-text-nav-hover);
  background: rgba(255, 255, 255, 0.12);
}

nav a:hover::after,
nav a:focus-visible::after {
  display: none;
}

nav a.active {
  background: var(--brand-yellow);
  color: #000;
}

nav a.active::after,
nav a[aria-current="page"]::after {
  display: none;
}


/* Ações à direita (sociais + tema) */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
  margin-left: auto;
}

.social-links {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.social-links a {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: var(--color-text-nav);
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, color 160ms ease;
  flex-shrink: 0;
}

.social-links a:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.0);
  background: var(--social-hover, var(--color-primary));
  color: var(--brand-white);
}

/* Hover por app (cor oficial do ícone/logo) */
.social-links a[aria-label="LinkedIn"] { --social-hover: #0A66C2; }
.social-links a[aria-label="Instagram"] { --social-hover: #E1306C; }
.social-links a[aria-label="Facebook"] { --social-hover: #1877F2; }
.social-links a[aria-label="GitHub"] { --social-hover: #24292E; }
.social-links a[aria-label="YouTube"] { --social-hover: #FF0000; }
.social-links a[aria-label="WhatsApp"] { --social-hover: #25D366; }


.social-links svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  color: var(--color-text-nav);
  display: block;
  margin: 0;
}


/* menu toggle Mobile de navbar */
#menuToggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
  color: var(--brand-white);
  font-size: 1.35rem;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

#menuToggle:hover {
  transform: scale(1.07);
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.5);
}

/* responsividade do menu mobile/navbar */
@media (max-width: 1200px) {
  nav {
    position: relative;
    left: auto;
    transform: none;
    flex: 1 1 auto;
    justify-content: flex-end;
    min-width: 0;
  }
  #menuToggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
  }

  nav ul {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: min(250px, calc(100vw - 2rem));
    padding: 0;
    background: var(--header-nav-bg);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.28);
    z-index: 1000;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: max-height 300ms cubic-bezier(0.4, 0, 0.2, 1),
                opacity 220ms ease;
  }

  nav ul.open {
    max-height: 600px;
    opacity: 1;
    pointer-events: auto;
    padding: 0.75rem;
  }

  nav a::after {
    display: none;
  }

  nav a {
    justify-content: flex-start;
    border-radius: var(--radius-sm);
    padding: 0.75rem 0.9rem;
    color: var(--brand-white);
    border-bottom: none;
  }

  nav a:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--brand-yellow);
    border-bottom: none;
  }

  nav a.active {
    background: var(--brand-yellow);
    color: #000;
    border-bottom: none;
  }
}

/* Seções / Containers */
.section {
  padding: clamp(1.5rem, 3.2vw, 3.2rem) clamp(0.75rem, 2vw, 1rem);
  max-width: var(--container);
  margin: 0 auto;
  width: 100%;
}

.section > h2 {
  margin: 0;
  font-size: clamp(1.3rem, 4vw, 2rem);
  word-break: break-word;
}

.section > p {
  margin-top: 0.8rem;
  color: var(--color-muted-text);
  word-break: break-word;
}

.section > ul, li {
  margin-top: 0.8rem;
  color: var(--color-muted-text);
}

/* =============================================
   Hero / Page Hero — responsivo (estilo fsdown)
   ============================================= */
.hero,
.page-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: clamp(320px, 55vh, 620px);
  padding: clamp(3rem, 8vw, 6rem) var(--gutter);
  text-align: center;
  background-color: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  background-image: url('../assets/img/hero/fundo_hero.jpg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  overflow: hidden;
}

/* Overlay escuro para garantir legibilidade sobre a foto */
.hero::before,
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.42);
  pointer-events: none;
}

/* Conteúdo acima do overlay — cobre tanto filhos diretos quanto .hero-content */
.hero > *,
.page-hero > * {
  position: relative;
  z-index: 1;
}

/* Mobile: altura proporcional à largura da tela */
@media (max-width: 768px) {
  .hero,
  .page-hero {
    min-height: clamp(220px, 48vw, 380px);
    background-position: center top;
  }
}

/* hero-content é o wrapper centralizado usado em .hero e .page-hero */
.hero-content {
  max-width: 840px;
  width: 100%;
  margin: 0 auto;
}

/* h1 e p dentro de qualquer hero — via hero-content ou filhos diretos */
.hero-content h1,
.hero-content p {
  /* herda o z-index do pai via .hero > * / .page-hero > * */
}

.hero h1,
.page-hero h1,
.hero-content h1 {
  margin: 0;
  font-size: clamp(1.5rem, 5vw, 3.2rem);
  letter-spacing: -0.6px;
  word-break: break-word;
  color: var(--brand-white);
  text-shadow: 0 2px 12px rgba(0,0,0,0.4);
}

.hero p,
.page-hero p,
.hero-content p {
  margin: 1rem auto 1.6rem;
  max-width: 60ch;
  font-size: clamp(0.9rem, 2vw, 1.05rem);
  word-break: break-word;
  color: rgba(255, 255, 255, 0.88);
}

/* Cards */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-top: 1.8rem;
  width: 100%;
}

.card {
  padding: clamp(0.85rem, 2vw, 1.25rem);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
  word-break: break-word;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
}

.card h3 {
  margin: 0.35rem 0 0.6rem;
}

.card p {
  margin: 0 0 0.8rem;
  color: var(--color-muted-text);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.35px;
  text-transform: uppercase;
  background: rgba(255, 255, 0, 0.16);
  color: var(--color-heading);
}

/* Cards da seção Áreas (links) */
.cards.areas .card {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-weight: 800;
  letter-spacing: 0.2px;
  min-height: 120px;
  background: rgba(0, 129, 186, 0.08);
  border-radius: var(--radius-md);
  font-size: clamp(0.8rem, 2vw, 0.95rem);
  padding: clamp(0.5rem, 1vw, 0.75rem);
  word-break: break-word;
}

/* Botões */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--color-primary), rgba(0, 129, 186, 0.88));
  color: var(--brand-white);
  padding: clamp(0.7rem, 1.5vw, 0.85rem) clamp(1rem, 2vw, 1.25rem);
  font-weight: 800;
  border-radius: var(--radius-md);
  border: 1px solid rgba(0, 73, 140, 0.30);
  box-shadow: var(--shadow-sm);
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
  font-size: clamp(0.85rem, 2vw, 1rem);
  white-space: nowrap;
}

.btn-primary:hover {
  transform: translateY(-2px);
  background: var(--color-primary-hover);
  color: var(--brand-black);
  border-color: rgba(255, 255, 0, 0.45);
  box-shadow: var(--shadow-md);
  filter: none;
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: transparent;
  color: var(--color-text);
  padding: clamp(0.7rem, 1.5vw, 0.85rem) clamp(1rem, 2vw, 1.25rem);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
  font-size: clamp(0.85rem, 2vw, 1rem);
  white-space: nowrap;
}

.btn-secondary:hover {
  transform: translateY(-2px);
  background: var(--color-surface-2);
  border-color: var(--color-primary);
}

.btn-secondary:active {
  transform: translateY(0);
}

/* Parceiros — carrossel infinito interativo */
.partners-carousel {
  overflow: hidden;
  cursor: grab;
  margin-top: 1.8rem;
  width: 100%;
  user-select: none;
  -webkit-user-select: none;
  mask-image: linear-gradient(to right, transparent, black 6%, black 94%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 6%, black 94%, transparent);
}

.partners-carousel.is-dragging {
  cursor: grabbing;
}

.partners-track {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: clamp(1rem, 3vw, 2rem);
  width: max-content;
  padding: 0.75rem clamp(0.5rem, 2vw, 1rem);
  will-change: transform;
}

.partner-item {
  flex-shrink: 0;
  width: 130px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.partner-item img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.6;
  transition: filter 220ms ease, opacity 220ms ease;
  pointer-events: none;
}

.partner-item:hover img {
  filter: grayscale(0%);
  opacity: 1;
}

/* Footer */
.footer {
  padding: clamp(1.5rem, 2.2vw, 2.2rem) clamp(0.75rem, 2vw, 1rem);
  background: var(--footer-bg);
  color: var(--footer-text);
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: clamp(0.75rem, 2vw, 1.25rem);
  width: 100%;
}

@media (max-width: 768px) {
  .footer {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

.footer p {
  margin: 0.35rem 0;
  color: inherit;
  opacity: 0.9;
}

/* Links do Footer */
.footer a {
  color: var(--footer-text);
  text-decoration: none;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.footer-links a {
  border-bottom: 1px solid transparent;
}

/* Hover específico (#FFFF00) */
.footer-links a:hover,
.footer a:hover {
  color: var(--footer-hover);
  border-bottom-color: var(--footer-hover);
}

/* Mobile-first: alvos de toque confortáveis */
button, .btn-primary, .btn-secondary, nav a, .social-links a {
  min-height: 44px;
}

/* ==========================================================
   AJUSTES DE LAYOUT (conteúdo centralizado + mobile-first)
   ========================================================== */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section,
.hero,
.page-hero {
  padding-inline: var(--gutter);
}

.topbar {
  padding: 0;
}

.topbar-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  justify-content: space-between;
  padding-block: 0.5rem;
}

@media (min-width: 561px) {
  .topbar-inner {
    flex-direction: row;
    align-items: center;
    gap: 1rem;
  }
}

.header {
  padding: 0;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: space-between;
  padding-block: 0.85rem;
  position: relative;
}

.footer {
  padding: 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.25rem;
  padding-block: 2.2rem;
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

@media (min-width: 760px) {
  .footer-inner {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
  }
}

.footer-columns {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 760px) {
  .footer-columns {
    grid-template-columns: repeat(2, minmax(240px, 1fr));
    gap: 1.2rem 2rem;
  }
}

.footer-col p {
  margin: 0.35rem 0;
}