/* Public responsive layout layer. Loaded after the legacy stylesheet so that
   page layouts follow one consistent set of breakpoints. */

html {
  overflow-x: clip;
}

body:not(.admin-body) {
  overflow-x: clip;
}

body:not(.admin-body) :is(img, video, iframe, svg, canvas) {
  max-width: 100%;
}

body:not(.admin-body) :is(input, select, textarea, button) {
  max-width: 100%;
}

body:not(.admin-body) :is(h1, h2, h3, p, a, span, li) {
  overflow-wrap: anywhere;
}

@media (max-width: 1180px) {
  .services-hero {
    min-height: auto;
    padding-bottom: clamp(3rem, 8vw, 5rem);
  }

  .services-editorial-row__image {
    display: block;
    opacity: .32;
  }

  .article-editorial-grid,
  .article-editorial-page .article-editorial-grid,
  .article-modern-layout,
  .blog-magazine-layout,
  .blog-category-featured,
  .blog-archive-row,
  .contact-visual-hero,
  .contact-main-grid,
  .contact-service-links,
  .service-detail-page,
  .services-hero,
  .services-bridge,
  .services-editorial__heading,
  .services-final-cta {
    grid-template-columns: minmax(0, 1fr);
  }

  .article-editorial-grid > *,
  .blog-magazine-layout > *,
  .contact-visual-hero > *,
  .contact-main-grid > *,
  .contact-service-links > *,
  .services-hero > *,
  .services-bridge > * {
    min-width: 0;
  }

  .article-seo-rail,
  .article-side-rail,
  .blog-newsletter-rail {
    position: static;
    width: 100%;
  }
}

@media (max-width: 980px) {
  body:not(.admin-body) {
    padding-top: 104px;
  }

  .site-header {
    padding: 12px 16px 0;
  }

  .site-header__inner {
    width: 100%;
    background: linear-gradient(135deg, #87ceeb, #1e3a5f);
  }

  .site-header__inner:has(.primary-nav.is-open) {
    border-radius: 22px;
  }

  .primary-nav {
    width: 100%;
  }

  .primary-nav.is-open {
    max-height: min(70dvh, 620px);
    overflow-y: auto;
  }

  .page-hero,
  .home-hero,
  .intro-section,
  .split-section,
  .contact-cta,
  .contact-layout,
  .about-redesign-hero,
  .about-editorial-grid,
  .about-data-layout,
  .about-training-flow,
  .about-closing,
  .blog-editorial-grid,
  .blog-magazine-hero,
  .announcements-hero,
  .announcement-timeline__item,
  .gallery-editorial,
  .video-editorial,
  .announcement-editorial,
  .youtube-feed-card,
  .faq-page__grid,
  .contact-dual-info {
    grid-template-columns: minmax(0, 1fr);
  }

  .home-contact-cta,
  .home-contact-cta__image {
    min-height: 0;
  }

  .home-contact-cta__image {
    position: relative;
    inset: auto;
    height: min(68vw, 360px);
  }

  .article-editorial-grid,
  .article-modern-page,
  .blog-magazine-hero,
  .blog-category-filter,
  .blog-magazine-layout,
  .blog-magazine-pagination,
  .blog-category-page,
  .announcements-hero,
  .announcement-timeline,
  .media-hero,
  .gallery-editorial,
  .video-editorial,
  .announcement-editorial,
  .video-feed-hero,
  .youtube-feed,
  .contact-hero,
  .contact-main-grid,
  .contact-local-copy,
  .contact-dual-info,
  .contact-service-links,
  .contact-faq,
  .faq-page__grid {
    width: min(100% - 32px, 980px);
  }

  .footer-inner,
  .footer-legal {
    width: min(100% - 32px, 760px);
  }

  .footer-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-brand-block,
  .footer-contact-card,
  .footer-map-card {
    grid-column: 1 / -1;
  }
}

@media (max-width: 680px) {
  .site-header {
    padding-inline: 12px;
  }

  .site-header__inner {
    gap: .5rem;
    padding-inline: .75rem;
  }

  .site-brand {
    gap: .5rem;
  }

  .site-brand small {
    display: none;
  }

  .site-brand strong {
    font-size: clamp(.95rem, 4.6vw, 1.08rem);
  }

  .site-brand img,
  .nav-toggle,
  .header-mobile-appointment {
    width: 42px;
    height: 42px;
  }

  .section-block,
  .page-shell,
  .container,
  .article-page-modern,
  .article-editorial-page .article-editorial-grid {
    width: min(100% - 32px, 720px);
  }

  .page-hero,
  .article-modern-hero,
  .contact-request-form,
  .service-atmosphere-section,
  .service-story__item,
  .training-dialog {
    padding: 1.25rem;
  }

  .action-row,
  .hero-actions,
  .home-faq__actions,
  .article-newsletter-form,
  .blog-newsletter-band__form {
    align-items: stretch;
    flex-direction: column;
  }

  .action-row > *,
  .hero-actions > *,
  .home-faq__actions > *,
  .article-newsletter-form > *,
  .blog-newsletter-band__form > * {
    width: 100%;
  }

  .video-heading-actions {
    display: grid;
    grid-template-columns: 42px 42px minmax(0, 1fr);
    align-items: center;
    gap: .55rem;
  }

  .video-archive-link {
    justify-self: end;
    text-align: right;
  }

  .blog-category-filter,
  .category-pagination,
  .blog-magazine-pagination,
  .footer-legal nav {
    gap: .5rem;
  }

  .blog-category-filter a,
  .category-pagination a {
    min-width: 0;
  }

  .youtube-feed-card,
  .youtube-feed-card__player,
  .youtube-facade,
  .youtube-facade img,
  .video-iframe {
    min-height: 0;
  }

  .youtube-feed-card {
    width: 100%;
    min-width: 0;
    overflow: hidden;
  }

  .youtube-feed-card__player {
    width: 100%;
    aspect-ratio: 9 / 16;
    max-height: none;
    overflow: hidden;
  }

  .youtube-feed .video-iframe,
  .youtube-facade,
  .youtube-facade img {
    height: 100%;
    max-height: inherit;
  }

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

  .services-editorial-row__link {
    min-height: 0;
    display: grid;
    grid-template-columns: 1fr;
    align-content: start;
    gap: .8rem;
    padding: 164px 1.2rem 1.2rem;
    overflow: hidden;
    border: 1px solid rgb(30 58 95 / 14%);
    border-radius: 14px;
    background: var(--white);
    box-shadow: 0 14px 34px rgb(30 58 95 / 9%);
  }

  .services-editorial-row__image {
    display: block;
    inset: 0 0 auto;
    width: auto;
    height: 146px;
    aspect-ratio: auto;
    opacity: 1;
    filter: none;
    transform: none;
  }

  .services-editorial-row:hover .services-editorial-row__image {
    opacity: 1;
    transform: none;
  }

  .services-editorial-row__label,
  .services-editorial-row__body,
  .services-editorial-row__action {
    z-index: 1;
  }

  .services-editorial-row__label {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: .38rem .65rem;
    border-radius: 999px;
    background: rgb(30 58 95 / 82%);
    color: var(--white);
    font-size: .68rem;
  }

  .services-editorial-row__title {
    font-size: clamp(1.8rem, 8vw, 2.35rem);
  }

  .services-editorial-row__summary {
    font-size: .96rem;
  }

  .services-editorial-row__action {
    grid-column: 1;
    justify-self: start;
    margin-top: .2rem;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-legal {
    align-items: flex-start;
    flex-direction: column;
  }

  .floating-whatsapp {
    right: .75rem;
    bottom: .75rem;
    width: 52px;
    height: 52px;
  }
}

@media (max-width: 390px) {
  body:not(.admin-body) {
    padding-top: 96px;
  }

  .site-header__inner {
    min-height: 72px;
  }

  .site-brand strong {
    font-size: .94rem;
  }

  .site-brand img,
  .nav-toggle,
  .header-mobile-appointment {
    width: 38px;
    height: 38px;
  }

  .page-hero,
  .article-modern-hero,
  .service-story__item,
  .training-dialog {
    padding: 1rem;
  }
}
