/* Ajustes comunes para conservar la composición sin desbordamientos. */
*, *::before, *::after {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  max-width: 100%;
}

/* El desplazamiento pertenece a la ventana. «hidden» en body lo convertía en
   un contenedor con scroll propio (window.scrollY siempre en 0). «clip» evita
   el desbordamiento horizontal sin crear ese contenedor. */
html {
  overflow-x: hidden;
}

body {
  height: auto;
  min-height: 100%;
  overflow-x: clip;
}

body {
  margin: 0;
  -webkit-text-size-adjust: 100%;
}

main,
section,
.block,
.block-layout,
.layout-element,
.text-box,
.image-wrapper {
  min-width: 0;
  max-width: 100%;
}

.text-box,
.text-box p,
.text-box h1,
.text-box h2,
.text-box h3,
.text-box h4,
.text-box h5,
.text-box h6,
.contact-details a {
  overflow-wrap: anywhere;
}

.image-wrapper img,
.image__image,
.social-icons,
.grid-button {
  max-width: 100%;
}

.image-wrapper img,
.image__image {
  object-fit: cover;
}

.grid-button,
.burger,
.local-menu button {
  min-height: 44px;
}

.local-menu {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  padding: 80px max(24px, env(safe-area-inset-right)) 40px max(24px, env(safe-area-inset-left));
}

.local-menu a {
  display: flex;
  align-items: center;
  min-height: 48px;
  width: fit-content;
  max-width: 100%;
  text-decoration: none;
}

.local-menu__close {
  min-width: 48px;
}

body.menu-open {
  overflow: hidden;
}

.instagram-posts article {
  position: relative;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.instagram-posts .instagram-media,
.instagram-posts iframe.instagram-media,
.instagram-posts iframe {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  margin: 0 !important;
}

@media (min-width: 761px) and (max-width: 1100px) {
  .instagram-posts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-columns {
    gap: 40px;
  }
}

@media (max-width: 920px) {
  main h1:not(.baseline-hero__heading):not(.contact-hero__title) {
    font-size: clamp(2.25rem, 11vw, 3.25rem) !important;
    line-height: 1.08 !important;
  }

  main h2 {
    font-size: clamp(1.75rem, 8vw, 2.25rem) !important;
    line-height: 1.15 !important;
  }

  main h3 {
    font-size: clamp(1.4rem, 6.5vw, 1.8rem) !important;
    line-height: 1.2 !important;
  }

  .text-box p,
  .text-box li,
  .contact-details a,
  .contact-form label,
  .contact-form input,
  .contact-form textarea {
    font-size: 1rem !important;
  }

  .grid-button {
    white-space: normal;
    line-height: 1.25;
    padding-inline: 20px;
  }

  .block-header-logo__image {
    max-width: min(24vw, 88px);
    height: auto;
  }

  .burger {
    min-width: 44px;
  }

  .contact-columns {
    padding-inline: max(20px, env(safe-area-inset-left));
  }
}

@media (max-width: 760px) {
  .instagram-posts {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .instagram-posts article {
    width: 100%;
  }

  .contact-form button,
  .contact-whatsapp {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}

@media (max-width: 380px) {
  main h1:not(.baseline-hero__heading):not(.contact-hero__title) {
    font-size: 2.15rem !important;
  }

  main h2 {
    font-size: 1.7rem !important;
  }

  .instagram-updated,
  .contact-columns {
    padding-left: 16px;
    padding-right: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
