/* ------------------------------------------------------------ */
/* 14. RESPONSIVE                                                */
/* ------------------------------------------------------------ */

/* Tablet: ≤ 1024px */
@media (max-width: 1024px) {
  .empresas__grid {
    grid-template-columns: 1fr;
    max-width: 540px;
    margin-inline: auto;
  }

  .institucional__grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .institucional__diagram {
    order: -1;
  }

  .certificaciones__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-sm);
  }

  .certificacion-item {
    border-right: none;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-sm);
    padding: var(--space-sm);
    min-height: 80px;
  }

  .certificacion-logo--emblem {
    max-height: 60px;
    max-width: 72px;
  }

  .certificacion-logo--wide {
    max-height: 44px;
    max-width: 135px;
  }

  .certificacion-logo--extra-wide {
    max-height: 40px;
    max-width: 160px;
  }

  .industrias__grid {
    grid-template-columns: repeat(3, 1fr);
  }



  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
  }
}

/* Mobile / Handheld: ≤ 991px */
@media (max-width: 991px) {
  :root {
    --text-hero: clamp(1.85rem, 6.5vw, 2.75rem); /* reduce tamaño tipográfico en mobile para evitar desbordes */
  }

  .site-header.menu-is-open {
    height: 100vh;
    background-color: var(--color-white);
  }

  .site-nav {
    display: none;
    position: fixed;
    top: 76px;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--color-white);
    flex-direction: column;
    align-items: stretch;
    padding: var(--space-md);
    gap: 0;
    overflow-y: auto;
    z-index: 999;
  }

  .site-nav.is-open {
    display: flex;
  }

  /* Inside the mobile overlay the dropdown is a plain indented list, always
     open — there is no hover to rely on. */
  .site-nav > ul > li,
  .site-nav li {
    display: block;
    width: 100%;
  }

  .site-nav .sub-menu {
    display: block;
    position: static;
    box-shadow: none;
    border: 0;
    padding-left: 1rem;
    background-color: transparent;
  }

  .nav-link {
    padding: 1em;
    border-bottom: 1px solid var(--color-light);
    font-size: var(--text-base);
  }

  .nav-link::after {
    display: none;
  }

  .nav-cta {
    margin: var(--space-md) 0 0;
    text-align: center;
    padding: 1em;
  }

  .nav-toggle {
    display: flex;
  }

  .hero__content {
    padding-top: 80px;
  }

  .hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero__actions .btn {
    text-align: center;
    justify-content: center;
  }

  .empresas__grid {
    max-width: 100%;
  }

  .industrias__grid {
    grid-template-columns: repeat(2, 1fr);
  }



  .certificaciones {
    padding-block: var(--space-md);
  }

  .certificaciones__grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xs);
  }

  .certificacion-item:nth-child(5) {
    grid-column: 1 / -1;
    max-width: 220px;
    justify-self: center;
    width: 100%;
  }

  .certificacion-logo--emblem {
    max-height: 52px;
    max-width: 65px;
  }

  .certificacion-logo--wide {
    max-height: 38px;
    max-width: 120px;
  }

  .certificacion-logo--extra-wide {
    max-height: 34px;
    max-width: 140px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

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

/* Responsivo Internas */
@media (max-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
  .hero-stats {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }
  .contact-form-card {
    padding: var(--space-md);
  }
}

