/**
 * FASE RESPONSIVE-01 / 01C — Ajustes solo portada (sin rediseño).
 */

/* —— Hero: legibilidad móvil/tablet —— */
@media (max-width: 1023px) {
  .vsv-hero-slider.vsv-hero {
    min-height: min(78vh, 38rem);
    padding-bottom: calc(4.85rem + env(safe-area-inset-bottom, 0px)) !important;
    overflow: hidden;
  }

  .vsv-hero-slider__scrim {
    background: linear-gradient(
      180deg,
      rgb(23 55 46 / 0.28) 0%,
      rgb(23 55 46 / 0.58) 48%,
      rgb(23 55 46 / 0.78) 100%
    );
  }

  .vsv-hero-slider__content {
    z-index: 5;
    flex: 0 0 auto;
    width: 100%;
    max-width: none;
    padding-bottom: 0.35rem;
  }

  .vsv-hero-slider__panes {
    min-height: 0;
  }

  /* La diapositiva activa define la altura; evita recorte del copy/CTA */
  .vsv-hero-slider__pane.is-active:not(.is-leaving):not(.is-entering) {
    position: relative;
    inset: auto;
    height: auto;
  }

  .vsv-hero-slider[data-vsv-hero-transitioning] .vsv-hero-slider__panes {
    min-height: clamp(17.5rem, 62vw, 23.5rem);
  }

  .vsv-hero .vsv-kicker {
    font-size: clamp(0.72rem, 0.68rem + 0.35vw, 0.78rem);
  }

  .vsv-hero h1,
  .vsv-hero-slider__pane h2.wp-block-heading {
    font-size: clamp(1.85rem, 1.05rem + 5.2vw, 2.75rem);
    max-width: 16ch;
    line-height: 1.08;
  }

  .vsv-hero .vsv-lede {
    font-size: clamp(0.9rem, 0.86rem + 0.4vw, 1rem);
    line-height: 1.52;
    max-width: 34ch;
  }

  .vsv-hero .wp-block-buttons {
    margin-top: 1.1rem;
    gap: 0.65rem;
  }

  .vsv-hero .wp-block-button__link {
    min-height: 2.85rem;
    padding: 0.72rem 1.15rem;
    font-size: clamp(0.84rem, 0.82rem + 0.25vw, 0.92rem);
  }

  .vsv-hero-slider__dots {
    bottom: calc(0.85rem + env(safe-area-inset-bottom, 0px));
    z-index: 6;
    pointer-events: auto;
  }

  .vsv-hero-slider__arrow {
    top: 38%;
  }

  .vsv-hero-slider__content .vsv-hero__actions {
    margin-bottom: 0.15rem;
  }

  /* Evita texto invisible si la animación no corre aún */
  .vsv-hero-slider__pane.is-active .vsv-kicker,
  .vsv-hero-slider__pane.is-active h1,
  .vsv-hero-slider__pane.is-active h2.wp-block-heading,
  .vsv-hero-slider__pane.is-active .vsv-lede,
  .vsv-hero-slider__pane.is-active .vsv-hero__actions {
    opacity: 1;
  }
}

@media (max-width: 430px) {
  .vsv-hero-slider.vsv-hero {
    min-height: max(32rem, 72vh);
    padding-bottom: calc(5.35rem + env(safe-area-inset-bottom, 0px)) !important;
  }

  .vsv-hero h1,
  .vsv-hero-slider__pane h2.wp-block-heading {
    font-size: clamp(1.52rem, 5.4vw + 0.35rem, 1.95rem);
    max-width: 19ch;
    text-wrap: balance;
  }

  .vsv-hero .vsv-lede {
    max-width: none;
    font-size: clamp(0.86rem, 0.84rem + 0.35vw, 0.96rem);
  }

  .vsv-hero .wp-block-buttons {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.55rem;
  }

  .vsv-hero .wp-block-button,
  .vsv-hero .wp-block-button__link {
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
  }

  .vsv-hero-slider__arrow {
    top: 32%;
    width: 2rem;
    height: 2rem;
  }
}

/* —— Beneficios: 2×2 móvil, 4 columnas escritorio (ya en style.css) —— */
@media (max-width: 767px) {
  .vsv-benefit p {
    font-size: clamp(0.95rem, 0.9rem + 0.35vw, 1.03rem);
    max-width: 14ch;
  }
}

/* —— Tarjetas: apilado estrecho —— */
@media (max-width: 719px) {
  .vsv-card__media {
    min-height: auto;
  }

  .vsv-card__image {
    aspect-ratio: 5 / 4.2;
  }

  .vsv-card__body {
    padding: 1.05rem 1.1rem 1.25rem;
  }

  .vsv-card h2 {
    font-size: clamp(1.55rem, 1.2rem + 2vw, 1.85rem) !important;
  }
}

/* —— Espacios: copy primero, carril táctil (anula grid del tema) —— */
@media (max-width: 767px) {
  .vsv-spaces__shell {
    display: flex !important;
    flex-direction: column;
    gap: 0.25rem;
  }

  .vsv-spaces__copy {
    order: 1;
  }

  .vsv-spaces .wp-block-group.vsv-spaces__photos,
  .vsv-spaces__photos.is-layout-flow,
  .vsv-spaces__photos.is-layout-flex {
    order: 2;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 0.65rem !important;
    margin-top: 1.15rem !important;
    margin-inline: 0 !important;
    padding: 0 0 0.45rem;
    padding-inline: 0.15rem;
    scroll-padding-inline: 0.15rem;
    width: 100%;
    max-width: 100%;
    grid-template-columns: unset !important;
    --wp--style--block-gap: 0.65rem;
  }

  .vsv-spaces .wp-block-group.vsv-spaces__photos > figure,
  .vsv-spaces__photos > figure.vsv-space-photo {
    flex: 0 0 calc(100% - 2.75rem);
    max-width: calc(100% - 2.75rem);
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  .vsv-spaces .vsv-space-photo {
    aspect-ratio: 4 / 4.35;
    min-height: 10.5rem;
    width: 100%;
  }

  .vsv-spaces__title {
    font-size: clamp(1.95rem, 1.35rem + 3.5vw, 2.45rem);
    max-width: 14ch;
  }

  .vsv-spaces__lede {
    font-size: clamp(0.94rem, 0.9rem + 0.35vw, 1.02rem);
    max-width: 32ch;
  }
}

/* —— Galería portada —— */
@media (max-width: 899px) {
  .vsv-gallery__grid {
    gap: 0.65rem;
  }

  .vsv-gallery__grid > .wp-block-column:nth-child(5) {
    grid-column: 1 / -1;
    justify-self: center;
    width: min(100%, calc(50% - 0.35rem));
  }

  .vsv-gallery__item {
    aspect-ratio: 4 / 4.15;
    min-height: 8.5rem;
    background: rgb(23 55 46 / 0.06);
  }
}

@media (min-width: 900px) and (max-width: 1199px) {
  .vsv-gallery__item {
    aspect-ratio: 4 / 4.6;
  }
}

/* —— CTA inferior —— */
@media (max-width: 767px) {
  .vsv-quote__title,
  .vsv-quote h2 {
    font-size: clamp(1.45rem, 1.1rem + 2.8vw, 1.75rem) !important;
    padding-inline: 0.5rem;
  }

  .vsv-quote__lede {
    font-size: clamp(0.88rem, 0.85rem + 0.35vw, 0.94rem);
    padding-inline: 0.25rem;
  }

  .vsv-quote::before,
  .vsv-quote::after {
    opacity: 0.2;
    width: 2.5rem;
    height: 2.5rem;
  }
}

/* —— Footer + flotantes (solo home) —— */
body.home {
  padding-bottom: calc(4.75rem + env(safe-area-inset-bottom, 0px));
}

body.home .vsv-footer {
  padding-bottom: calc(2.25rem + env(safe-area-inset-bottom, 0px)) !important;
}

@media (max-width: 767px) {
  .vsv-footer__inner {
    gap: 1.1rem;
    padding-inline: 0.75rem;
  }

  .vsv-footer .wp-block-navigation-item__content {
    font-size: 0.88rem;
    padding: 0.35rem 0.5rem;
  }
}

/* —— Monitores grandes: no expandir contenido —— */
@media (min-width: 1600px) {
  .home .vsv-benefits,
  .home .vsv-cards,
  .home .vsv-gallery,
  .home .vsv-quote__band {
    max-width: 1360px;
    margin-inline: auto;
    width: 100%;
  }

  .home .vsv-spaces__shell {
    max-width: 1360px;
  }
}

/* Imágenes de contenido: reserva de espacio antes de cargar */
.vsv-card__image,
.vsv-space-photo,
.vsv-gallery__item {
  background-color: rgb(248 245 239 / 0.85);
}

.vsv-card__image img,
.vsv-space-photo img,
.vsv-gallery__item img {
  background-color: transparent;
}