/* El título queda fuera del alto de pantalla reservado a la galería. */
#galeria-proyecto {
  box-sizing: border-box;
  height: auto;
  padding-top: clamp(24px, 4dvh, 48px);
  padding-bottom: clamp(16px, 2dvh, 24px);
  background: #fff;
  scroll-margin-top: var(--header-h, 64px);
  overflow: visible;
}
#galeria-proyecto > .wrap {
  display: flex;
  flex-direction: column;
  height: auto;
  min-height: 0;
}
#galeria-proyecto > .wrap > p { flex: none; margin: 0 0 6px; line-height: 1.4; }
#galeria-proyecto #pg-title {
  flex: none;
  margin: 0 0 clamp(10px, 2dvh, 20px);
  font-size: clamp(22px, 3vw, 36px);
  line-height: 1.15;
}
#galeria-proyecto .project-gallery,
#galeria-proyecto .project-gallery > .f-carousel {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  height: auto;
}
/* Reducir ambas dimensiones un 20% conserva la proporción del marco. */
#galeria-proyecto .project-gallery {
  flex: 0 0 auto;
  width: 80%;
  height: 80vh;
  height: 80dvh;
  margin-inline: auto;
  scroll-margin-top: var(--header-h, 64px);
}
/* En celular se reduce menos para conservar una foto cómoda de recorrer. */
@media (max-width: 767px) {
  #galeria-proyecto .project-gallery {
    width: 92%;
    height: 92vh;
    height: 92dvh;
  }
}
#galeria-proyecto .project-gallery .f-carousel {
  --f-arrow-pos: 10px;
  --f-arrow-width: 38px;
  --f-arrow-height: 38px;
  --f-arrow-svg-width: 16px;
  --f-arrow-svg-height: 16px;
  --f-arrow-svg-stroke-width: 2.5;
  --f-arrow-color: #475569;
  --f-arrow-shadow: 0 6px 12px -2px rgb(50 50 93 / 25%), 0 3px 7px -3px rgb(0 0 0 / 30%);
  --f-arrow-border-radius: 50%;
  --f-arrow-bg: #fff;
  --f-arrow-hover-bg: #f9f9f9;
  --f-arrow-active-bg: #f0f0f0;
  --f-carousel-slide-height: 100%;
  --f-transition-duration: .5s;
  --f-transition-easing: cubic-bezier(.4, 0, .2, 1);
}
#galeria-proyecto .project-gallery > .f-carousel > .f-carousel__viewport {
  flex: 1 1 0;
  min-height: 0;
  min-width: 0;
  height: auto;
  aspect-ratio: auto;
  background: #f4f2ee;
}
#galeria-proyecto .project-gallery .f-carousel__slide {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: zoom-in;
}
#galeria-proyecto .project-gallery .f-carousel__slide img {
  display: block;
  flex: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
#galeria-proyecto .project-gallery-caption {
  flex: 0 0 auto;
  min-width: 0;
  height: 20px;
  margin: 8px 0 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
  color: #4b5563;
  font: 13px/20px Inter, sans-serif;
}
#galeria-proyecto .project-gallery > .f-carousel > .f-thumbs {
  flex: 0 0 auto;
  min-height: 0;
  --f-thumb-height: clamp(44px, 8dvh, 76px);
  --f-thumbs-padding-y: 6px;
}
@media (max-height: 600px) {
  #galeria-proyecto { padding-top: 16px; padding-bottom: 8px; }
  #galeria-proyecto > .wrap > p { margin-bottom: 3px; font-size: 12px; }
  #galeria-proyecto #pg-title { margin-bottom: 8px; font-size: 22px; }
  #galeria-proyecto .project-gallery-caption { margin: 4px 0 0; }
  #galeria-proyecto .project-gallery > .f-carousel > .f-thumbs { --f-thumb-height: 40px; --f-thumbs-padding-y: 4px; }
}

/* Un marco uniforme para todas las fotos del carrusel de Residencias. */
#residencias .residencias-swiper { height: 320px; min-height: 0; }
#residencias .residencias-swiper .swiper-wrapper,
#residencias .residencias-swiper .swiper-slide { height: 100%; }
#residencias .residencias-swiper .swiper-slide img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
@media (min-width: 768px) { #residencias .residencias-swiper { height: 540px; } }
@media (min-width: 1024px) { #residencias .residencias-swiper { height: 600px; } }
