/* ==========================================================================
   Dunas del Este - hoja de estilos única
   Réplica estática del sitio WordPress (theme Blocksy + bloques Stackable).
   Breakpoints originales: mobile <=689px, tablet 690-999px, desktop >=1000px.
   ========================================================================== */

/* --- Tipografías (self-hosted, sin llamadas a Google) --------------------- */
@font-face {
  font-family: 'ABeeZee';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/abeezee-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'ABeeZee';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/abeezee-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url(../fonts/playfair-900-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url(../fonts/playfair-900-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* --- Tokens -------------------------------------------------------------- */
:root {
  --amarillo: #ffdd44;
  --dorado: #ffb200;
  --texto: #6e6d76;
  --oscuro: #0e0c1b;
  --borde: #dfdfe2;
  --blanco: #ffffff;
  --link: #ffb580;
  --link-hover: #f3be36;
  --verde: #3b8524;
  --gris-suave: #f8f9fb;
  --gris-pie: #f4f5f8;

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  --serif: 'Playfair Display', serif;
  --display: 'ABeeZee', sans-serif;

  --ancho: 1290px;
  --alto-header: 100px;
  /* separación por defecto entre bloques, el block-gap de WordPress */
  --gap-bloque: 24px;
  /* espaciadores propios de las páginas de alojamiento */
  --sep-galeria: 13px;
  --sep-video: 27px;
}

/* --- Base ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--texto);
  background: var(--blanco);
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--link); text-decoration: none; transition: color .12s cubic-bezier(.455, .03, .515, .955); }
a:hover { color: var(--link-hover); }

h1, h2, h3, h4, h5 { margin: 0; color: var(--oscuro); font-weight: 900; }
h1, h2 { font-family: var(--display); font-size: 40px; line-height: 1.5; }
h3 { font-family: var(--serif); font-size: 30px; line-height: 1.5; }
h4 { font-family: var(--serif); font-size: 25px; line-height: 1.5; }
h5 { font-family: var(--serif); font-size: 20px; line-height: 1.5; }
p { margin: 0; }

::selection { background: var(--amarillo); color: var(--blanco); }

:focus-visible { outline: 2px solid var(--amarillo); outline-offset: 3px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.contenedor { width: min(var(--ancho), 90vw); margin-inline: auto; }

/* Bandas a todo el ancho con imagen de fondo y velo de color */
.banda { position: relative; background-size: cover; background-position: 50% 50%; background-repeat: no-repeat; }
.banda > .velo { position: absolute; inset: 0; background: var(--oscuro); opacity: .4; }
.banda > .contenedor { position: relative; }

/* --- Cabecera ------------------------------------------------------------ */
.header {
  position: absolute; inset: 0 0 auto; z-index: 100;
  height: var(--alto-header);
  display: flex; align-items: center;
}
.header .contenedor {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px;
}

.logo { display: inline-block; }
.logo img { height: 79px; width: auto; }

.nav-principal > ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; align-items: center; gap: 80px; justify-content: center;
}
.nav-principal a {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; line-height: 1.3; text-transform: uppercase;
  color: rgba(255, 255, 255, .8);
}
.nav-principal a:hover, .nav-principal .actual > a { color: var(--blanco); }
.nav-principal .actual > a { box-shadow: 0 2px 0 var(--borde); padding-bottom: 4px; }
.nav-principal svg { width: 8px; height: 8px; fill: currentColor; }

.tiene-hijos { position: relative; }
.submenu {
  position: absolute; top: calc(100% + 15px); left: 50%; transform: translateX(-50%) translateY(6px);
  min-width: 190px; margin: 0; padding: 0; list-style: none;
  background: rgb(18 21 25 / .98); border-radius: 2px;
  box-shadow: 0 10px 20px rgba(41, 51, 61, .1);
  opacity: 0; visibility: hidden; transition: opacity .16s ease, transform .16s ease;
}
.submenu::before { content: ""; position: absolute; inset: -15px 0 auto; height: 15px; }
.submenu li + li { border-top: 1px dashed rgba(255, 255, 255, .1); }
.submenu a { display: block; padding: 12px 20px; font-size: 12px; font-weight: 500; text-transform: none; color: var(--blanco); }
.submenu a:hover { color: var(--amarillo); }
.tiene-hijos:hover .submenu,
.tiene-hijos:focus-within .submenu { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }

.header-acciones { display: flex; align-items: center; justify-content: flex-end; gap: 20px; }

.redes { display: flex; align-items: center; gap: 10px; }
.redes a {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: var(--red); color: var(--blanco);
}
.redes a:hover { opacity: .85; color: var(--blanco); }
.redes svg { width: 20px; height: 20px; fill: currentColor; }

.boton-reservar {
  display: inline-flex; align-items: center; min-height: 40px; padding: 5px 20px;
  border: 1px solid rgba(255, 255, 255, .8); border-radius: 3px;
  font-size: 15px; font-weight: 500; color: rgba(255, 255, 255, .8);
}
.boton-reservar:hover { background: rgba(255, 255, 255, .8); color: var(--oscuro); }

.abrir-menu {
  display: none; align-items: center; gap: 10px; padding: 8px;
  background: none; border: 0; cursor: pointer;
  font: inherit; font-size: 12px; text-transform: uppercase; color: var(--borde);
}
.abrir-menu svg { width: 18px; height: 14px; fill: currentColor; }

/* Panel lateral móvil */
.panel {
  position: fixed; inset: 0 0 0 auto; z-index: 200; width: 500px; max-width: 100%;
  background: rgb(18 21 25 / .98);
  transform: translateX(100%); transition: transform .3s cubic-bezier(.455, .03, .515, .955);
  display: flex; flex-direction: column; padding: 30px;
  overflow-y: auto;
}
.panel[data-abierto="si"] { transform: translateX(0); }
.panel-tapa {
  position: fixed; inset: 0; z-index: 199; background: rgba(0, 0, 0, .5);
  opacity: 0; visibility: hidden; transition: opacity .3s ease;
}
.panel-tapa[data-abierto="si"] { opacity: 1; visibility: visible; }
.panel-cabecera { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.panel-cabecera img { height: 40px; width: auto; }
.cerrar-menu { background: none; border: 0; padding: 8px; cursor: pointer; color: var(--blanco); }
.cerrar-menu svg { width: 16px; height: 16px; fill: currentColor; }
.panel ul { list-style: none; margin: 30px 0 0; padding: 0; }
.panel > ul > li > a { display: block; padding: 10px 0; font-size: 20px; color: var(--blanco); }
.panel .submenu-movil { margin: 0 0 10px 16px; }
.panel .submenu-movil a { display: block; padding: 6px 0; font-size: 16px; color: rgba(255, 255, 255, .75); }
.panel .redes { margin-top: 30px; }
.panel .boton-reservar { margin-top: 20px; align-self: flex-start; }

/* --- Botones ------------------------------------------------------------- */
.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 16px; border-radius: 3px;
  color: var(--blanco); text-align: center;
  transition: filter .12s cubic-bezier(.455, .03, .515, .955);
}
.boton:hover { filter: brightness(.9); color: var(--blanco); }
.boton--oscuro { background: var(--oscuro); padding: 13px 40px; font-size: 1.15em; }
.boton--verde { display: flex; background: var(--verde); width: 100%; }
.boton--gris { display: flex; background: var(--texto); width: 100%; }

/* --- Portada: héroe ------------------------------------------------------ */
.hero-home { padding: 280px 35px 0; background-position: 0 0; }
.hero-home .contenedor { width: min(var(--ancho), 100%); }
.hero-home__texto { max-width: 55.04%; }
.hero-home h1 {
  font-family: var(--serif); font-weight: 800; font-size: 70px; line-height: 1.3em;
  color: var(--blanco);
}
.hero-home__bajada { margin-top: 20px; color: var(--blanco); }
.hero-home__cta { margin-top: 40px; }
.hero-home__cierre { height: 68px; }

/* --- Portada: tarjetas de alojamiento ------------------------------------ */
.alojamientos { margin-top: 40px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 35px; }
.alojamiento {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 450px; padding: 40px 20px; border-radius: 10px;
  background-size: cover; background-position: center;
  box-shadow: 0 4px 24px rgba(0, 0, 0, .04);
  overflow: hidden; text-align: center;
}
.alojamiento::before { content: ""; position: absolute; inset: 0; background: #000; opacity: .3; }
.alojamiento > * { position: relative; }
.alojamiento h2 { color: var(--blanco); }
.alojamiento__meta {
  margin-top: 10px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  color: var(--link); line-height: 1.65;
}
.alojamiento__meta svg { width: 32px; height: 32px; fill: currentColor; flex: none; margin-block: -3px; }
.alojamiento__enlace { position: absolute; inset: 0; z-index: 2; }
.alojamiento:hover::before { opacity: .45; }

/* --- Portada: dos ventajas ----------------------------------------------- */
.ventajas { margin-top: 50px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 60px; }
.ventaja { display: grid; grid-template-columns: 61px 1fr; gap: 25px; align-items: start; }
.ventaja img { width: 55px; }
.ventaja h4 + p { margin-top: 15px; }

/* --- Portada: servicios -------------------------------------------------- */
.servicios {
  margin-top: 37px; padding: 120px 24px;
  background: var(--gris-suave) url(../img/topography.svg) repeat center / 1000px;
}
.servicios .contenedor { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 60px 64px; }
.servicios__texto { flex: 0 0 44.03%; }
.servicios__media { flex: 0 0 48.68%; }
.servicios h2 { line-height: 1.2em; }
.servicios__lista { margin: 30px 0 0; }
.servicios__lista p + p { margin-top: 24px; }
.servicios__cierre { margin-top: 24px; }

.firma { margin-top: 30px; display: grid; grid-template-columns: 69px 1fr; gap: 20px; align-items: start; }
.firma img { width: 69px; height: 69px; border-radius: 50%; object-fit: cover; }
.firma h5 + p { margin-top: 5px; }
/* el botón sobresale del alto de la columna, igual que en el sitio original:
   así el video de la derecha queda centrado sobre el bloque de texto sin contarlo */
.firma .boton { margin-top: 24px; margin-bottom: -51px; }

/* Imagen con botón de play que abre el video */
.video-popup {
  position: relative; display: block; width: 100%; padding: 0; border: 0; cursor: pointer;
  border-radius: 20px; overflow: hidden; background: none;
}
.video-popup img { width: 100%; height: 400px; object-fit: cover; }
.video-popup::after { content: ""; position: absolute; inset: 0; background: #000; opacity: .2; transition: opacity .2s ease; }
.video-popup:hover::after { opacity: .35; }
.video-popup svg {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 2;
  width: 60px; height: 60px; fill: var(--blanco);
}
.cierre-home { height: 33px; }

/* --- Páginas de alojamiento --------------------------------------------- */
/* el fondo va fijo, como en el original: la imagen cubre la ventana, no la sección */
.hero-interior { padding: 75px 35px 200px; text-align: center; background-attachment: fixed; }
.hero-interior > .velo { opacity: .3; }
/* el título arranca 137.6px más abajo del padding, igual que en el original */
.hero-interior .contenedor::before { content: ""; display: block; height: 137.6px; }
.hero-interior h1 {
  font-family: var(--serif); font-weight: 800; font-size: 60px; line-height: 1em;
  color: var(--blanco);
}
.hero-interior p { margin: 20px auto 0; width: fit-content; max-width: 55%; color: var(--blanco); }

.datos { margin-top: 80px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 50px; text-align: center; }
.datos h5 { margin-top: 20px; }
.datos p { margin-top: 15px; }
.dato__icono {
  display: grid; place-items: center; width: 62px; height: 62px; margin-inline: auto;
  border-radius: 50%; background: var(--dorado); color: var(--blanco);
}
.dato__icono svg { width: 22px; height: 22px; fill: currentColor; }

.intro { margin-top: 20px; text-align: center; }
.intro strong { font-weight: 700; }
.bloque-cta { margin-top: var(--gap-bloque); }
.bloque-cta--pegado { margin-top: 0; }

/* Galería */
.galeria { margin-top: calc(var(--sep-galeria) + 24px); display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.galeria button {
  padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 9px; overflow: hidden;
  aspect-ratio: 1; display: block;
}
.galeria img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.galeria button:hover img { transform: scale(1.04); }

/* Videos y mapa embebidos, cargados sólo al hacer clic */
.embed { margin-top: calc(var(--sep-video) + 24px); position: relative; aspect-ratio: 16 / 9; background: var(--oscuro); overflow: hidden; }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.embed__poster { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; cursor: pointer; background: var(--oscuro); }
.embed__poster img { width: 100%; height: 100%; object-fit: cover; opacity: .75; }
.embed__poster svg { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 68px; height: 68px; fill: #fff; }
.embed__poster:hover img { opacity: .9; }

.embed--final { margin-top: 34px; }
.mapa { margin-top: var(--gap-bloque); height: 357px; }
.mapa iframe { width: 100%; height: 100%; border: 0; }

.servicios-detalle { margin-top: calc(var(--gap-bloque) + 1px); padding: 12px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 24px; }
.servicios-detalle ul { list-style: none; margin: 0; padding: 0; }
.servicios-detalle li { display: flex; align-items: center; gap: 12px; line-height: 1.65; }
.servicios-detalle li + li { margin-top: var(--gap-bloque); }
/* margen negativo para que el ícono no agrande la altura de la línea */
.servicios-detalle svg { width: 22px; height: 22px; margin-block: -4px; flex: none; fill: var(--dorado); }

.cierre-interior { height: 0; }

/* --- Visor de imágenes / video ------------------------------------------ */
.visor {
  position: fixed; inset: 0; z-index: 300; display: none;
  align-items: center; justify-content: center; padding: 24px;
  background: rgba(6, 5, 12, .92);
}
.visor[open], .visor[data-abierto="si"] { display: flex; }
.visor img { max-width: 100%; max-height: 90vh; width: auto; border-radius: 6px; }
.visor iframe { width: min(1100px, 100%); aspect-ratio: 16 / 9; border: 0; border-radius: 6px; }
.visor__cerrar {
  position: absolute; top: 20px; right: 24px; width: 44px; height: 44px;
  display: grid; place-items: center; border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(255, 255, 255, .12); color: #fff;
}
.visor__cerrar svg { width: 16px; height: 16px; fill: currentColor; }
.visor__nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px;
  display: grid; place-items: center; border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(255, 255, 255, .12); color: #fff;
}
.visor__nav svg { width: 16px; height: 16px; fill: currentColor; }
.visor__nav--prev { left: 20px; }
.visor__nav--next { right: 20px; }
.visor__cerrar:hover, .visor__nav:hover { background: rgba(255, 255, 255, .24); }

/* --- Pie ----------------------------------------------------------------- */
.footer { padding: 25px 0; background: var(--gris-pie); }
.footer p { font-size: 15px; line-height: 1.3; text-align: center; }

/* ==========================================================================
   Tablet: <= 999px
   ========================================================================== */
@media (max-width: 999px) {
  :root { --alto-header: 70px; --sep-galeria: 100px; --sep-video: 100px; }

  h1, h2 { font-size: 30px; }

  .logo img { height: 30px; }
  .nav-principal, .header-acciones .redes, .header-acciones .boton-reservar { display: none; }
  .abrir-menu { display: inline-flex; }
  .header .contenedor { grid-template-columns: 1fr auto; }
  .panel { width: 65vw; }

  .hero-home { padding: 180px 35px 100px; }
  .hero-home h1 { font-size: 50px; }
  .hero-home__texto { max-width: 100%; text-align: center; }
  .hero-home__cierre { height: 100px; }

  .alojamientos { grid-template-columns: repeat(2, 1fr); }
  .alojamiento { min-height: 420px; }
  .ventajas { margin-top: 90px; grid-template-columns: 1fr; gap: 60px; }

  .servicios { margin-top: 80px; padding: 80px 24px; }
  .servicios__texto, .servicios__media { flex: 0 0 100%; }
  .video-popup svg { width: 40px; height: 40px; }
  .cierre-home { height: 70px; }

  .hero-interior { padding: 210px 35px 140px; }
  .hero-interior h1 { font-size: 50px; }
  .hero-interior p { max-width: 100%; }
  .datos { margin-top: 30px; grid-template-columns: repeat(2, 1fr); }
  .intro { margin-top: 100px; }
}

/* ==========================================================================
   Móvil: <= 689px
   ========================================================================== */
@media (max-width: 689px) {
  :root { --gap-bloque: 16px; }

  .contenedor { width: min(var(--ancho), 88vw); }
  /* el CTA verde rompe el contenedor y ocupa todo el ancho, como en el original */
  .bloque-cta:not(.bloque-cta--pegado) { width: 100vw; margin-inline: calc(50% - 50vw); }
  .panel { width: 90vw; }

  .hero-home h1, .hero-interior h1 { font-size: 30px; }

  .hero-home { background-position: 50% 50%; }
  .hero-home__cierre { display: none; }

  .alojamientos { grid-template-columns: 1fr; }
  .ventajas { text-align: center; }
  .ventaja { grid-template-columns: 1fr; gap: 35px; justify-items: center; }
  .ventaja img { width: 70px; }

  .servicios .contenedor { gap: 60px; }
  .firma { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .footer { padding: 16px 0; }

  .datos { grid-template-columns: 1fr; }
  .galeria { grid-template-columns: repeat(2, 1fr); }
  .servicios-detalle { grid-template-columns: 1fr; }
  .visor__nav { width: 40px; height: 40px; }
  .visor__nav--prev { left: 8px; }
  .visor__nav--next { right: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
