@media (max-width: 1040px) {
  .nav-links {
    gap: 14px;
    font-size: 0.88rem;
  }

  .sense-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .cards-grid,
  .contact-grid,
  .balance-photo-grid,
  .learning-photo-grid,
  .location-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .learning-photo-layout,
  .learning-photo-grid {
    grid-template-rows: auto;
  }

  .learning-photo-layout {
    grid-template-columns: 1fr;
  }

  .learning-photo-grid,
  .learning-photo-grid .photo-card {
    align-items: stretch;
  }

  .learning-photo-grid img {
    aspect-ratio: 1;
    height: auto;
    min-height: 0;
  }

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

@media (max-width: 860px) {
  .menu-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    inset: 79px 0 auto 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 14px 20px 24px;
    border-bottom: 1px solid var(--linea);
    background: #ffffff;
    box-shadow: 0 20px 45px rgba(23, 108, 168, 0.15);
  }

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

  .nav-links a {
    padding: 14px 0;
  }

  .nav-links .button {
    margin-top: 8px;
  }

  .hero {
    min-height: auto;
  }

  .hero-grid,
  .split-grid,
  .profile-hero-grid,
  .section-heading,
  .quick-contact-panel,
  .location-panel {
    grid-template-columns: 1fr;
  }

  .services-grid,
  .team-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .profile-meta {
    grid-template-columns: 1fr;
  }

  .location-section {
    min-height: auto;
    padding-bottom: 54px;
  }

  .location-map {
    height: 390px;
  }

  .cta-band .container,
  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  .site-header,
  .section,
  .hero,
  .page-hero,
  .split-section,
  .cta-band,
  .return-home-strip {
    max-width: 100vw;
    overflow-x: hidden;
  }

  .container,
  .split-grid,
  .services-grid,
  .cards-grid,
  .sense-grid,
  .learning-photo-layout,
  .learning-photo-grid,
  .visual-card,
  .photo-card,
  .service-card,
  .card {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .nav-wrap,
  .container {
    width: calc(100% - 64px);
    max-width: var(--max);
  }

  .brand img {
    width: 44px;
    height: 44px;
  }

  .brand span {
    max-width: 180px;
  }

  h1 {
    font-size: 1.48rem;
    line-height: 1.12;
    overflow-wrap: anywhere;
  }

  h2 {
    font-size: 1.22rem;
    line-height: 1.16;
    overflow-wrap: anywhere;
  }

  h1,
  h2,
  h3,
  p {
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  h3 {
    font-size: 0.96rem;
    line-height: 1.22;
  }

  p {
    font-size: 0.94rem;
  }

  .hero-actions,
  .cta-actions,
  .card-actions,
  .button,
  .form-button,
  .location-actions {
    width: 100%;
  }

  .sense-grid,
  .cards-grid,
  .balance-photo-grid,
  .learning-photo-layout,
  .contact-grid,
  .quick-actions,
  .location-cards,
  .learning-photo-grid,
  .steps-grid,
  .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .page-hero .container,
  .split-section .container,
  .section .container {
    min-width: 0;
  }

  .page-hero h1,
  .split-grid h2,
  .service-card h3,
  .service-card p {
    width: 100%;
    max-width: 296px;
    white-space: normal;
  }

  .page-hero p,
  .split-grid p,
  .card h3,
  .card p {
    max-width: 296px;
  }

  .visual-card,
  .photo-card,
  .service-card,
  .card {
    max-width: 326px;
    margin-left: auto;
    margin-right: auto;
  }

  .location-panel {
    width: min(100% - 28px, var(--max));
    margin-top: -82px;
    padding: 20px;
  }

  .location-card {
    min-height: auto;
  }

  .quick-contact-panel {
    padding: 20px;
  }

  .quick-action {
    min-height: 78px;
  }

  .profile-strip {
    grid-template-columns: 1fr;
  }

  .profile-strip img {
    width: 100%;
    height: auto;
    aspect-ratio: 1.2;
  }

  .card,
  .service-card,
  .step-card,
  .contact-card,
  .team-content {
    padding: 18px;
  }

  .visual-card,
  .photo-card {
    padding: 12px;
  }
}
