/* ============================================================
   responsive.css — Media queries centralizadas
   Breakpoints:
     - lg: até 1024px  (tablets landscape / notebooks pequenos)
     - md: até 768px   (tablets portrait)
     - sm: até 540px   (smartphones)
   ============================================================ */

/* =====================================================
   LG — até 1024px
   ===================================================== */
@media (max-width: 1024px) {
  :root {
    --container-pad: 4%;
  }

  /* Institucional: empilha em 1 coluna */
  .inst-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  /* Portfólio: 2 colunas, sem featured */
  .works-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .work-card--featured {
    grid-column: span 2;
    grid-row: span 1;
  }

  /* Stats: 2x2 */
  .stats-bar {
    flex-wrap: wrap;
  }

  .stat-item {
    flex: 1 1 50%;
    border-right: none;
    border-bottom: var(--border-faint);
  }

  .stat-item:nth-child(odd) {
    border-right: var(--border-faint);
  }

  .stat-item:last-child,
  .stat-item:nth-last-child(2):nth-child(odd) {
    border-bottom: none;
  }
}

/* =====================================================
   MD — até 768px
   ===================================================== */
@media (max-width: 768px) {
  :root {
    --container-pad: 5%;
    --spacing-2xl: 4rem;
    --spacing-xl: 2.5rem;
  }

  /* ---- Topbar: mostra só endereço e redes ---- */
  .topbar-item--hide-sm {
    display: none;
  }

  .topbar {
    padding: 8px var(--container-pad);
  }


  /* ---- Navbar mobile: links em coluna ---- */
  .nav-links {
    gap: 0;
  }

  .nav-link {
    padding: 16px 14px;
    font-size: 0.78rem;
  }

  /* ---- Hero ---- */
  .hero {
    min-height: 85vh;
    padding-top: 40px;
    padding-bottom: 40px;
    align-items: flex-end;
  }

  .hero__content {
    padding-bottom: 60px;
  }

  .hero__desc {
    font-size: 0.95rem;
  }

  .hero__list {
    grid-template-columns: 1fr;
  }

  /* ---- Portfólio: 1 coluna ---- */
  .works-grid {
    grid-template-columns: 1fr;
  }

  .work-card--featured {
    grid-column: span 1;
  }

  .work-card {
    aspect-ratio: 16 / 9;
  }

  /* ---- Contato: 1 coluna ---- */
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .contact-form {
    padding: 28px 24px;
  }

  /* ---- Section header ---- */
  .section__sub {
    max-width: 100%;
  }

  /* ---- Footer ---- */
  .footer__top {
    flex-direction: column;
    gap: 28px;
  }

  .footer__address {
    text-align: left;
  }

  .footer__bottom {
    flex-direction: column;
    text-align: center;
  }
}

/* =====================================================
   SM — até 540px
   ===================================================== */
@media (max-width: 540px) {
  /* ---- Topbar simplificado ---- */
  .topbar-left {
    gap: 10px;
    font-size: 0.72rem;
  }

  .topbar-item span:first-of-type {
    display: none; /* esconde o ícone para economizar espaço */
  }

  /* ---- Botões do hero ---- */
  .hero__ctas {
    flex-direction: column;
    align-items: flex-start;
  }

  .btn {
    width: 100%;
    text-align: center;
  }

  /* ---- Stats: 1 coluna ---- */
  .stat-item {
    flex: 1 1 100%;
    border-right: none;
    border-bottom: var(--border-faint);
  }

  .stat-item:last-child {
    border-bottom: none;
  }

  /* ---- Form: 1 coluna ---- */
  .form-row {
    grid-template-columns: 1fr;
  }

  /* ---- Institucional cards ---- */
  .inst-card {
    padding: 24px 20px;
  }

  /* ---- Logo menor ---- */
  .logo {
    font-size: 1.8rem;
  }

  .logo::after {
    display: none;
  }
}