/* ==================================================================
   PÁGINA DE INICIO
   ================================================================== */

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: flex; align-items: flex-end;
  min-height: min(86svh, 760px);
  padding-block: 120px 40px;
  color: #fff;
  isolation: isolate;
  overflow: hidden;
}
.hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: var(--sea-700);
  overflow: hidden;
}

/* Video de fondo del Hero */
.hero__video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  pointer-events: none;
}

/* Slides del Hero (fallback) */
.hero__slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  z-index: 1;
  transition: opacity 1.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 1.4s;
  will-change: opacity, transform;
  overflow: hidden;
}
.hero__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.0);
}

.hero__slide.is-prev {
  opacity: 1;
  visibility: visible;
  z-index: 1;
}

.hero__slide.is-active {
  opacity: 1;
  visibility: visible;
  z-index: 2;
}

/* Efecto Ken Burns cinemático para cada foto */
@keyframes heroKenZoomIn {
  0% { transform: scale(1.0); }
  100% { transform: scale(1.08); }
}
@keyframes heroKenPanRight {
  0% { transform: scale(1.06) translateX(-2%); }
  100% { transform: scale(1.06) translateX(1.5%); }
}
@keyframes heroKenZoomOut {
  0% { transform: scale(1.08); }
  100% { transform: scale(1.01); }
}
@keyframes heroKenPanLeft {
  0% { transform: scale(1.06) translateX(1.5%); }
  100% { transform: scale(1.06) translateX(-2%); }
}

.hero__slide:nth-child(1).is-active img {
  animation: heroKenZoomIn 6.5s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}
.hero__slide:nth-child(2).is-active img {
  animation: heroKenPanRight 6.5s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}
.hero__slide:nth-child(3).is-active img {
  animation: heroKenZoomOut 6.5s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}
.hero__slide:nth-child(4).is-active img {
  animation: heroKenPanLeft 6.5s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

/* Indicadores de diapositivas */
.hero__indicators {
  position: absolute;
  bottom: 24px;
  right: 28px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 3;
}
.hero__indicator {
  width: 28px;
  height: 4px;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.35);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.3s, transform 0.3s, width 0.3s;
}
.hero__indicator:hover {
  background: rgb(255 255 255 / 0.7);
}
.hero__indicator.is-active {
  background: #fff;
  width: 44px;
  box-shadow: 0 0 10px rgb(255 255 255 / 0.5);
}

@media (max-width: 768px) {
  .hero__indicators {
    bottom: 12px;
    right: 50%;
    transform: translateX(50%);
  }
}

.hero__shade {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgb(8 39 44 / 0.25) 0%, rgb(8 39 44 / 0.1) 30%, rgb(8 39 44 / 0.6) 75%, rgb(8 39 44 / 0.85) 100%);
}
.hero h1 { max-width: 15ch; text-shadow: 0 2px 24px rgb(0 0 0 / 0.3); }
.hero__lead { max-width: 560px; margin-top: 16px; font-size: clamp(1.02rem, 1.6vw, 1.2rem); color: rgb(255 255 255 / 0.95); text-shadow: 0 1px 12px rgb(0 0 0 / 0.25); }

/* ---------- Buscador ---------- */
.search {
  display: grid; gap: 10px;
  margin-top: 32px; padding: 12px;
  background: #fff; color: var(--ink);
  border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
}
.search__field {
  position: relative;
  padding: 10px 16px; border-radius: 14px;
  background: var(--tint);
  transition: background-color 0.2s;
}
.search__field:hover { background: #f1eee8; }
.search__field label {
  display: block; font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink);
}
.search__field select {
  width: 100%; padding: 2px 24px 2px 0; border: 0; background: transparent;
  color: var(--ink-2); font-size: 1rem; cursor: pointer;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23455154' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right center; background-size: 18px;
}
.search__field select:focus { outline: none; }
.search__field:focus-within { outline: 3px solid var(--coral); outline-offset: 1px; }
.search__submit { min-height: 54px; border-radius: 14px; }

@media (min-width: 860px) {
  .search {
    grid-template-columns: 1fr 1.15fr 1fr auto;
    align-items: center; gap: 0;
    max-width: 920px; padding: 8px 8px 8px 8px;
    border-radius: 999px;
  }
  .search__field { background: transparent; border-radius: 999px; padding: 10px 26px; }
  .search__field + .search__field::before {
    content: ""; position: absolute; left: 0; top: 22%; bottom: 22%;
    width: 1px; background: var(--line);
  }
  .search__field:hover { background: var(--tint); }
  .search__submit { border-radius: 999px; min-height: 58px; padding: 0 28px; }
}

/* ---------- Destacado ---------- */
.featured__body { display: grid; gap: 24px; margin-top: 28px; }
.featured__title { font-family: var(--font-display); font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 600; letter-spacing: -0.01em; }
.featured__title a { color: inherit; text-decoration: none; }
.featured__title a:hover { color: var(--sea); }
.featured__loc { display: flex; align-items: center; gap: 6px; margin: 8px 0 20px; color: var(--muted); }
.featured__summary { margin: 20px 0; font-size: 1.08rem; color: var(--ink-2); max-width: 78ch; line-height: 1.6; }
.featured__actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 10px; }

@media (min-width: 960px) {
  .featured__body { margin-top: 32px; }
}

/* ---------- Comodidades ---------- */
@media (min-width: 1100px) {
  #amenities-showcase { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- Lechería (mosaico de lugares) ---------- */
.places {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 78%;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  margin-inline: calc(var(--gutter) * -1);
  padding: 4px var(--gutter) 12px;
  scrollbar-width: none;
}
.places::-webkit-scrollbar { display: none; }

.place {
  position: relative;
  min-height: 320px;
  border-radius: var(--r-lg); overflow: hidden;
  scroll-snap-align: start;
  color: #fff; isolation: isolate;
  display: flex; align-items: flex-end;
}

/* Slideshow interno para cada cuadro */
.place__slides {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  background: var(--sea-700);
}

.place__slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  z-index: 1;
  transition: opacity 1.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 1.3s;
  will-change: opacity, transform;
}

.place__slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.0);
  transition: transform 6s cubic-bezier(0.25, 1, 0.5, 1);
}

.place__slide.is-prev {
  opacity: 1;
  visibility: visible;
  z-index: 1;
}

.place__slide.is-active {
  opacity: 1;
  visibility: visible;
  z-index: 2;
}

.place__slide.is-active img {
  transform: scale(1.05);
}

.place:hover .place__slide.is-active img {
  transform: scale(1.1);
}

/* Indicadores de fotos en la esquina del cuadro */
.place__dots {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  gap: 5px;
  z-index: 2;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgb(0 0 0 / 0.28);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  pointer-events: none;
}

.place__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.45);
  transition: all 0.35s ease;
}

.place__dot.is-active {
  width: 16px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 0 6px rgb(255 255 255 / 0.6);
}

.place::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgb(8 39 44 / 0) 35%, rgb(8 39 44 / 0.82) 100%);
}
.place__content { padding: 22px; }
.place__icon {
  display: grid; place-items: center;
  width: 42px; height: 42px; margin-bottom: 12px; border-radius: 12px;
  background: rgb(255 255 255 / 0.2); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.place__icon .icon { width: 21px; height: 21px; }
.place h3 { font-family: var(--font-display); font-size: 1.35rem; font-weight: 600; }
.place p { margin-top: 6px; font-size: 0.93rem; color: rgb(255 255 255 / 0.88); max-width: 40ch; }

@media (min-width: 640px) {
  .places { grid-auto-columns: 46%; }
}
@media (min-width: 960px) {
  .places {
    grid-auto-flow: row;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 250px;
    overflow: visible; margin-inline: 0; padding: 0;
  }
  .place { min-height: 0; }
  .place--lg { grid-column: span 2; grid-row: span 2; }
  .place--lg h3 { font-size: 2rem; }
  .place--lg p { font-size: 1.05rem; }
  .place--wide { grid-column: span 2; }
}

/* ---------- CTA Y CUESTIONARIO DE CONTACTO ---------- */
.cta-band {
  padding-block: 20px var(--section-y);
  background: var(--sand);
  scroll-margin-top: calc(var(--header-h) + 20px);
}
.cta-band__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  align-items: center;
  padding: clamp(28px, 4vw, 52px);
  color: #fff;
  background: linear-gradient(145deg, #0e5a66 0%, #0a434c 100%);
  border-radius: var(--r-xl);
  max-width: calc(var(--container));
  width: calc(100% - var(--gutter) * 2);
  margin-inline: auto;
  box-shadow: 0 20px 48px -12px rgba(10, 67, 76, 0.28);
  position: relative;
  overflow: hidden;
}

/* Decoración sutil de fondo */
.cta-band__inner::after {
  content: "";
  position: absolute;
  right: -80px;
  bottom: -80px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.cta-band__header {
  position: relative;
  z-index: 1;
}
.cta-band__header .eyebrow {
  margin-bottom: 8px;
  color: #72d6df;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.8rem;
}
.cta-band h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.2vw, 2.5rem);
  line-height: 1.15;
  color: #fff;
}
.cta-band__lead {
  margin-top: 14px;
  color: rgb(255 255 255 / 0.88);
  font-size: 1.05rem;
  line-height: 1.55;
  max-width: 520px;
}

.cta-perks {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 26px;
}
.cta-perk {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.96rem;
  color: #f0f7f8;
  font-weight: 500;
}
.cta-perk__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(37, 211, 102, 0.22);
  color: #25d366;
  font-weight: 800;
  font-size: 0.78rem;
  flex-shrink: 0;
}

/* Tarjeta Formulario */
.contact-card {
  position: relative;
  z-index: 1;
  background: #ffffff;
  color: var(--ink);
  border-radius: var(--r-lg);
  padding: clamp(24px, 3.5vw, 36px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.16);
}
.contact-card__head {
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}
.contact-card__title {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
}
.contact-card__sub {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 0;
}

.contact-card__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 22px;
}
@media (min-width: 540px) {
  .contact-card__grid {
    grid-template-columns: 1fr 1fr;
  }
}
.field {
  display: flex;
  flex-direction: column;
}
.field--full {
  grid-column: 1 / -1;
}
.field label {
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 6px;
}
.field label .req {
  color: #e04f5f;
  font-weight: 700;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1.5px solid #dce4e6;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.92rem;
  font-family: inherit;
  color: var(--ink);
  background: #fafcfc;
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
  box-sizing: border-box;
}
.field input::placeholder,
.field textarea::placeholder {
  color: #9cb1b5;
}
.field select {
  appearance: auto;
  cursor: pointer;
}
.field textarea {
  resize: vertical;
  min-height: 72px;
  line-height: 1.4;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--sea);
  box-shadow: 0 0 0 3px rgba(14, 90, 102, 0.16);
  background: #ffffff;
}

.contact-card__submit {
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.35);
  cursor: pointer;
  border: none;
}
.contact-card__submit:hover {
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45);
}
.contact-card__submit .icon {
  width: 22px;
  height: 22px;
}

@media (min-width: 960px) {
  .cta-band__inner {
    grid-template-columns: 1fr 1.08fr;
    gap: 48px;
    padding: 52px 56px;
  }
}
