/* ============================================================
   La Cala de la Tía Antonia — Stylesheet
   Mobile-first · Variables CSS · Flexbox / Grid
   Breakpoints: 375px / 768px / 1024px / 1440px
   ============================================================ */

/* ===========================
   VARIABLES
   =========================== */
:root {
  /* Colores: la roca volcanica y el agua de Terreros, no el beige de
     catalogo. El acento es el verde del agua somera sobre la arena y
     aparece en pocos sitios; si se usa en todo deja de significar nada. */
  --color-black:      #0F2B33;   /* tinta marina */
  --color-white:      #FFFFFF;
  --color-bg:         #F4F6F5;   /* blanco salino, frio */
  --color-accent:     #2E8C86;   /* agua somera */
  --color-text:       #1C1C1A;
  --color-text-muted: #5E6B6B;
  --color-border:     #D8DEDC;

  /* Estos dos no cambian con el tema: el hero, la franja de equipamiento
     y el pie son oscuros de dia y de noche, y lo que va encima, blanco. */
  --color-deep:       #0F2B33;
  --color-on-deep:    #FFFFFF;

  /* Tipografia: Petrona para titulares -variable, con italica de verdad-
     y Karla para el texto. Antes decia 'Cormorant Garant', que no existe:
     Google Fonts devolvia un 400 y todo caia en Georgia. */
  --font-heading: 'Petrona', Georgia, serif;
  --font-body:    'Karla', system-ui, -apple-system, sans-serif;

  /* Layout */
  --container-max:  1200px;
  --container-wide: 1440px;
  --section-py:     clamp(4rem, 8vw, 7rem);
  --nav-h:          116px;

  /* Transiciones */
  --t:      0.3s ease;
  --t-slow: 0.7s ease;

  color-scheme: light;
}

/* ===========================
   NOCHE
   js/tema.js pone data-tema="noche" entre la puesta y la salida del sol
   en San Juan de los Terreros. Se invierten superficies y tinta: el
   blanco salino pasa a mar de noche y la tinta marina a luz de luna.
   El acento sube de luz para seguir leyendose sobre fondo oscuro.
   =========================== */
:root[data-tema="noche"] {
  --color-black:      #E6EEEC;   /* tinta: ahora clara */
  --color-white:      #0E1D22;   /* superficie: mar de noche */
  --color-bg:         #13262C;   /* superficie alterna */
  --color-accent:     #5CBDB5;
  --color-text:       #DCE4E2;
  --color-text-muted: #98A9A7;
  --color-border:     #24383E;

  color-scheme: dark;
}

/* El cambio de tema se nota como un fundido, no como un parpadeo. */
body,
.section,
#navbar.scrolled {
  transition: background-color 0.6s ease, color 0.6s ease;
}

/* ===========================
   RESET
   =========================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* El recuadro gris que iOS y Android pintan al tocar es la senal mas
     ruidosa de "esto es una web". Se quita y se responde con :active. */
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-white);
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

address {
  font-style: normal;
}

/* ===========================
   LAYOUT HELPERS
   =========================== */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container-wide {
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===========================
   BOTONES
   =========================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0;
  cursor: pointer;
  border: none;
  transition: background var(--t), color var(--t), transform var(--t), border-color var(--t);
  text-decoration: none;
}

.btn-primary {
  background: var(--color-black);
  color: var(--color-white);
}

.btn-outline {
  background: transparent;
  color: var(--color-on-deep);
  border: 1px solid rgba(255, 255, 255, 0.55);
}

.btn-whatsapp {
  background: #25D366;
  color: var(--color-on-deep);
}

/* ===========================
   SECCIONES — COMÚN
   =========================== */
.section {
  padding: var(--section-py) 0;
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 4rem;
}

.section-header h2 {
  font-family: var(--font-heading);
  font-size: clamp(2.25rem, 5.5vw, 3.9rem);
  font-weight: 450;
  line-height: 1.08;
  letter-spacing: -0.015em;
  color: var(--color-black);
  margin-bottom: 1.25rem;
}

.section-intro {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  line-height: 1.7;
  max-width: 58ch;
  margin: 0 auto;
}

/* ===========================
   NAVEGACIÓN
   =========================== */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  transition: background var(--t), box-shadow var(--t);
}

#navbar.scrolled {
  background: var(--color-white);
  box-shadow: 0 1px 24px rgba(0, 0, 0, 0.08);
}

.nav-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo: blanco sobre hero, normal al hacer scroll */
.nav-logo img {
  width: 200px;
  height: auto;
  filter: brightness(0) invert(1);
  transition: filter var(--t);
}

#navbar.scrolled .nav-logo img {
  filter: none;
}

/* De noche la barra es oscura: el logo sigue en blanco. */
[data-tema="noche"] #navbar.scrolled .nav-logo img {
  filter: brightness(0) invert(1);
}

/* Links */
.nav-links {
  display: none;
  gap: 1.75rem;
  align-items: center;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0;
  color: rgba(255, 255, 255, 0.9);
  transition: color var(--t);
}

#navbar.scrolled .nav-links a {
  color: var(--color-text);
}

.nav-links a:hover,
/* Botón CTA en nav */
.nav-cta {
  background: var(--color-black) !important;
  color: var(--color-white) !important;
  padding: 0.55rem 1.4rem;
  transition: background var(--t) !important, transform var(--t) !important;
}

/* Hamburger */
.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 110;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: rgba(255, 255, 255, 0.9);
  transition: background var(--t), transform var(--t), opacity var(--t);
}

#navbar.scrolled .nav-toggle span {
  background: var(--color-black);
}

/* Menú mobile abierto */
#navbar.menu-open .nav-links {
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: var(--nav-h) 0 0 0;
  background: var(--color-white);
  justify-content: center;
  align-items: center;
  gap: 2.75rem;
}

#navbar.menu-open .nav-links a {
  font-size: 1.05rem;
  color: var(--color-text);
}

#navbar.menu-open .nav-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

#navbar.menu-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}

#navbar.menu-open .nav-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Desktop nav: con siete enlaces y el logo no cabe antes de 1100 px */
@media (min-width: 1100px) {
  .nav-toggle {
    display: none;
  }

  .nav-links {
    display: flex !important;
    position: static;
    background: none;
    flex-direction: row;
  }
}

/* ===========================
   HERO
   =========================== */
.hero {
  position: relative;
  height: 100svh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: var(--color-on-deep);
}

.hero-slides {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.4s ease;
}

.hero-slide.active {
  opacity: 1;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.28) 0%,
    rgba(0, 0, 0, 0.38) 60%,
    rgba(0, 0, 0, 0.6) 100%
  );
  z-index: 1;
  transition: background-color 0.6s ease;
}

/* De noche las fotos se apagan un poco, como la luz de la calle. */
[data-tema="noche"] .hero-overlay {
  background-color: rgba(5, 18, 24, 0.3);
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 1.5rem;
  max-width: 860px;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(3rem, 10vw, 7rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.025em;
  margin-bottom: 1.25rem;
}

/* Entrada unica de la pagina. Quien pida menos movimiento no la ve. */
.hero-content > * {
  animation: entrada 0.9s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}
.hero-title    { animation-delay: 0.1s; }
.hero-subtitle { animation-delay: 0.25s; }
.hero-actions  { animation-delay: 0.4s; }

@keyframes entrada {
  from { opacity: 0; transform: translateY(16px); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-content > * { animation: none; }
  html { scroll-behavior: auto; }
}

.hero-subtitle {
  font-family: var(--font-heading);
  font-size: clamp(1.05rem, 3vw, 1.45rem);
  font-weight: 300;
  font-style: italic;
  line-height: 1.45;
  max-width: 34ch;
  margin: 0 auto 2.5rem;
  opacity: 0.88;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Scroll indicator */
.hero-scroll {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

.hero-scroll span {
  display: block;
  width: 1px;
  height: 54px;
  background: rgba(255, 255, 255, 0.45);
  animation: scrollLine 2.2s ease infinite;
}

@keyframes scrollLine {
  0%   { transform: scaleY(0); transform-origin: top;    opacity: 0; }
  50%  { transform: scaleY(1);                            opacity: 1; }
  100% { transform: scaleY(0); transform-origin: bottom; opacity: 0; }
}

/* Indicadores de slide */
.hero-indicators {
  position: absolute;
  bottom: 2rem;
  right: 1.5rem;
  z-index: 2;
  display: flex;
  gap: 0.45rem;
}

.hero-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background var(--t), transform var(--t);
}

.hero-dot.active {
  background: var(--color-on-deep);
  transform: scale(1.4);
}

/* ===========================
   SOBRE EL APARTAMENTO
   =========================== */
.sobre {
  background: var(--color-white);
}

.sobre-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}

.sobre-image {
  overflow: hidden;   /* el parallax mueve la foto por dentro del marco */
}

.sobre-image img {
  width: 100%;
  height: 360px;
  object-fit: cover;
}

.sobre-features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.feature-card {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 1.5rem;
  border: 1px solid var(--color-border);
  transition: border-color var(--t), transform var(--t);
}

.feature-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent);
}

.feature-icon svg {
  width: 26px;
  height: 26px;
}

.feature-card h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 500;
  margin-bottom: 0.2rem;
}

.feature-card p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

@media (min-width: 600px) {
  .sobre-features {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1024px) {
  /* La foto mide lo mismo que las cuatro cajas de al lado: ni sobra
     por arriba ni se queda corta por abajo. */
  .sobre-grid {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: stretch;
  }

  .sobre-image {
    position: relative;
  }

  .sobre-image img {
    position: absolute;
    inset: -8% 0;          /* margen para el parallax sin dejar hueco */
    height: 116%;
  }
}

/* ===========================
   EN CIFRAS
   =========================== */
.cifras {
  background: var(--color-bg);
}

.cifras-grid {
  display: grid;
  grid-template-columns: 1fr;
  max-width: 960px;
  margin: 0 auto;
  gap: 1px;
  background: var(--color-border);   /* las lineas entre cajas */
  border: 1px solid var(--color-border);
}

.cifra {
  background: var(--color-white);
  padding: 2rem 1.25rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.cifra-num {
  font-family: var(--font-heading);
  font-size: clamp(2.6rem, 7vw, 4rem);
  font-weight: 400;
  line-height: 1;
  color: var(--color-black);
  font-variant-numeric: tabular-nums;   /* que no baile al contar */
}

.cifra-num small {
  font-size: 0.4em;
  color: var(--color-text-muted);
  margin-left: 0.1em;
}

.cifra-etq {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  max-width: 22ch;
  margin: 0 auto;
}

@media (min-width: 1024px) {
  .cifras-grid {
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    grid-template-columns: none;
  }

  .cifra {
    padding: 2.75rem 1.5rem;
  }
}

@media (min-width: 600px) and (max-width: 1023px) {
  .cifras-grid {
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
  }
}

.cifra[hidden] {
  display: none;
}

/* ===========================
   ENTORNO
   =========================== */
.entorno {
  background: var(--color-white);
}

.entorno-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

.entorno-bloque h3 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 450;
  color: var(--color-black);
  padding-bottom: 0.75rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-border);
}

.entorno-bloque ul {
  display: grid;
  gap: 1.75rem;
}

.entorno-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.entorno-icono {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  color: var(--color-accent);
  background: var(--color-bg);
  border-radius: 50%;
}

.entorno-icono svg {
  width: 22px;
  height: 22px;
}

.entorno-item h4 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--color-black);
  line-height: 1.3;
}

.entorno-item p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

.entorno-item .entorno-dato {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-accent);
  margin: 0.15rem 0 0.35rem;
}

.entorno-nota {
  margin-top: 1.5rem;
  font-size: 0.82rem;
  font-style: italic;
  color: var(--color-text-muted);
}

@media (min-width: 900px) {
  .entorno-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 3.5rem;
  }
}

/* ===========================
   PREGUNTAS FRECUENTES
   =========================== */
.preguntas {
  background: var(--color-bg);
}

.faq-lista {
  max-width: 760px;
  margin: 0 auto;
  border-top: 1px solid var(--color-border);
}

.faq {
  border-bottom: 1px solid var(--color-border);
}

.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 0.25rem;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 450;
  color: var(--color-black);
  touch-action: manipulation;
}

.faq summary::-webkit-details-marker {
  display: none;
}

/* Un + que gira a x al abrir */
.faq summary::after {
  content: '+';
  flex-shrink: 0;
  font-family: var(--font-body);
  font-size: 1.5rem;
  font-weight: 300;
  line-height: 1;
  color: var(--color-accent);
  transition: transform var(--t);
}

.faq[open] summary::after {
  transform: rotate(45deg);
}

.faq summary:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.faq p {
  padding: 0 2.5rem 1.4rem 0.25rem;
  color: var(--color-text-muted);
  line-height: 1.7;
}

.faq[open] p {
  animation: faq-abre 0.35s ease;
}

@keyframes faq-abre {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: none; }
}

@media (hover: hover) and (pointer: fine) {
  .faq summary:hover {
    color: var(--color-accent);
  }
}

@media (prefers-reduced-motion: reduce) {
  .faq[open] p { animation: none; }
}

/* ===========================
   MOVIMIENTO AL BAJAR
   Solo si hay JS (main.js pone .anima en <html>) y la persona no ha
   pedido menos movimiento. Sin eso, todo se ve quieto y entero.
   Se anima transform y opacity: lo unico que no obliga a recolocar
   la pagina en cada fotograma.
   =========================== */
.anima .aparece {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--retraso, 0s);
}

.anima .aparece.dentro {
  opacity: 1;
  transform: none;
}

/* Las fotos entran con un leve zoom hacia atras, como al abrir la puerta. */
.anima .aparece-foto {
  clip-path: inset(6% 6% 6% 6%);
  transition: clip-path 1.1s cubic-bezier(0.22, 1, 0.36, 1);
}

.anima .aparece-foto.dentro {
  clip-path: inset(0 0 0 0);
}

.parallax {
  will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
  .anima .aparece,
  .anima .aparece-foto {
    opacity: 1;
    transform: none;
    clip-path: none;
    transition: none;
  }

  .parallax {
    transform: none !important;
  }
}

/* ===========================
   AMENITIES STRIP
   =========================== */
.amenities-strip {
  background: var(--color-deep);
  padding: 2.25rem 0;
}

.amenities-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem 3.5rem;
  list-style: none;
}

.amenity-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  text-align: center;
}

.amenity-item svg {
  width: 34px;
  height: 34px;
  color: var(--color-accent);
  flex-shrink: 0;
}

.amenity-item span {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.6);
  white-space: nowrap;
}

@media (min-width: 768px) {
  .amenities-list {
    flex-wrap: nowrap;
    gap: 0;
    justify-content: space-between;
  }

  .amenity-item {
    flex: 1;
  }
}

/* ===========================
   ESTANCIAS
   =========================== */
.estancias {
  background: var(--color-white);
}

.rooms-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.room-card {
  overflow: hidden;
  border: 1px solid var(--color-border);
  transition: transform var(--t), border-color var(--t), box-shadow var(--t);
}

.room-card-img {
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.room-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s ease;
}

.room-card-body {
  padding: 1.5rem;
}

.room-card-body h3 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 500;
  margin-bottom: 0.65rem;
  color: var(--color-black);
}

.room-card-body p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.75;
  margin-bottom: 1rem;
}

.room-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.room-tag {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  color: var(--color-accent);
  border: 1px solid rgba(139, 115, 85, 0.35);
  padding: 0.2rem 0.65rem;
}

@media (min-width: 600px) {
  .rooms-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .rooms-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .room-card:first-child {
    grid-column: span 2;
  }

  .room-card:first-child .room-card-img {
    aspect-ratio: 16 / 7;
  }
}

/* ===========================
   SERVICIOS
   =========================== */
.servicios {
  background: var(--color-white);
}

.servicios-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.servicio-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 2rem;
  background: var(--color-bg);
  transition: transform var(--t);
}

.servicio-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent);
  margin-bottom: 1.25rem;
}

.servicio-icon svg {
  width: 28px;
  height: 28px;
}

.servicio-item h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 500;
  margin-bottom: 0.45rem;
  color: var(--color-black);
}

.servicio-item p {
  font-size: 0.91rem;
  color: var(--color-text-muted);
  line-height: 1.75;
}

.servicio-item a {
  color: var(--color-accent);
  transition: opacity var(--t);
}

@media (min-width: 600px) {
  .servicios-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .servicios-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ===========================
   RESEÑAS
   =========================== */
.resenas {
  background: var(--color-bg);
}

.reviews-header {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  padding: 2.5rem;
  background: var(--color-white);
  margin-bottom: 3rem;
}

@media (min-width: 768px) {
  .reviews-header {
    grid-template-columns: 200px 1fr;
    gap: 4rem;
    align-items: center;
  }

  .platform-scores {
    flex-direction: column;
    gap: 0;
  }

  .platform-score {
    padding: 1.25rem 0;
  }
}

.platform-scores {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.platform-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  text-align: center;
  padding: 1rem 0;
  border-bottom: 1px solid var(--color-border);
}

.platform-score:last-child {
  border-bottom: none;
}

.platform-score img {
  height: 20px;
  width: auto;
  object-fit: contain;
}

.platform-score-value {
  display: flex;
  align-items: baseline;
  gap: 0.1rem;
}

.score-number {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 6vw, 3.5rem);
  font-weight: 300;
  line-height: 1;
  color: var(--color-black);
}

.score-max {
  font-size: 1rem;
  color: var(--color-text-muted);
  font-weight: 400;
}

#globalStars {
  display: flex;
  gap: 3px;
}

.star {
  color: var(--color-border);
}

.star.star-filled {
  color: var(--color-accent);
}

.score-badge {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--color-accent);
}

.score-count {
  font-size: 0.73rem;
  color: var(--color-text-muted);
  letter-spacing: 0.05em;
}

.reviews-breakdown {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  justify-content: center;
}

.breakdown-item {
  display: grid;
  grid-template-columns: 120px 1fr 2.5rem;
  gap: 0.75rem;
  align-items: center;
}

.breakdown-label {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.breakdown-bar-track {
  height: 2px;
  background: var(--color-border);
  border-radius: 1px;
  overflow: hidden;
}

.breakdown-bar-fill {
  height: 100%;
  background: var(--color-black);
  border-radius: 1px;
}

.breakdown-score {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-text);
  text-align: right;
}

.reviews-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 3rem;
}

@media (min-width: 640px) {
  .reviews-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .reviews-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.review-card {
  background: var(--color-white);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: transform var(--t), box-shadow var(--t);
}

.review-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.review-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--color-accent);
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 500;
  flex-shrink: 0;
}

.review-meta {
  flex: 1;
  min-width: 0;
}

.review-name {
  font-weight: 500;
  font-size: 0.88rem;
  color: var(--color-black);
  line-height: 1.3;
}

.review-origin {
  font-weight: 400;
  color: var(--color-text-muted);
}

.review-date {
  font-size: 0.73rem;
  color: var(--color-text-muted);
  margin-top: 0.15rem;
}

.review-stars {
  display: flex;
  gap: 2px;
}

.review-text {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  line-height: 1.8;
  flex: 1;
}

.review-score-badge {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--color-black);
  line-height: 1;
}

.review-score-label {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  font-weight: 400;
}

.review-platform {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.68rem;
  color: var(--color-text-muted);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding-top: 0.75rem;
  border-top: 1px solid var(--color-border);
}

.review-platform img {
  height: 12px;
  width: auto;
  object-fit: contain;
}

.reviews-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===========================
   UBICACIÓN
   =========================== */
.ubicacion {
  background: var(--color-bg);
}

.map-wrapper {
  margin: 2rem 0;
  line-height: 0;
  overflow: hidden;
}

.map-wrapper iframe {
  width: 100%;
  height: 380px;
  border: 0;
  display: block;
}

/* Google no da mapa oscuro embebido: se invierte y se devuelve el tono,
   asi el agua sigue azul y la tierra no deslumbra. */
[data-tema="noche"] .map-wrapper iframe {
  filter: invert(0.9) hue-rotate(180deg) brightness(0.95);
}

/* Logos de plataformas sobre fondo oscuro: en blanco, como en el pie.
   Los QR no se tocan, que tienen que leerse. */
[data-tema="noche"] .platform-score img,
[data-tema="noche"] .plataforma-logo,
[data-tema="noche"] .review-platform img {
  filter: brightness(0) invert(1);
  opacity: 0.85;
}

.ubicacion-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  padding-top: 3rem;
}

.ubicacion-dato {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.ubicacion-dato strong {
  font-size: 0.7rem;
  letter-spacing: 0.01em;
  color: var(--color-accent);
}

.ubicacion-dato span {
  font-size: 0.93rem;
  color: var(--color-text-muted);
  line-height: 1.65;
}

@media (min-width: 768px) {
  .ubicacion-info {
    grid-template-columns: repeat(4, 1fr);
  }

  .map-wrapper iframe {
    height: 480px;
  }
}

/* ===========================
   RESERVAS
   =========================== */
.reservas {
  background: var(--color-white);
}

.reservas-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: 680px;
  margin: 0 auto 3.5rem;
}

.plataforma-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: inherit;
  gap: 1.75rem;
  padding: 2.5rem 2rem;
  border: 1px solid var(--color-border);
  text-align: center;
  transition: border-color var(--t), transform var(--t);
}

.plataforma-logo {
  height: 34px;
  width: auto;
  object-fit: contain;
}

.plataforma-qr {
  width: 130px;
  height: 130px;
  object-fit: contain;
}

.plataforma-card p {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

.reservas-contacto {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.reservas-contacto p {
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

@media (min-width: 580px) {
  .reservas-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ===========================
   FOOTER
   =========================== */
.footer {
  background: var(--color-deep);
  color: rgba(255, 255, 255, 0.65);
  padding: 4.5rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  margin-bottom: 3.5rem;
}

.footer-brand img {
  filter: brightness(0) invert(1);
  margin-bottom: 1rem;
  width: 200px;
  height: auto;
}

.footer-brand p {
  font-size: 0.88rem;
  line-height: 1.75;
}

.footer h4 {
  font-size: 0.68rem;
  letter-spacing: 0.01em;
  color: var(--color-on-deep);
  margin-bottom: 1.1rem;
}

.footer address {
  font-size: 0.88rem;
  line-height: 2;
}

.footer address a {
  color: rgba(255, 255, 255, 0.65);
  transition: color var(--t);
}

.footer-legal ul {
  font-size: 0.88rem;
  line-height: 2.1;
}

.footer-platform-logos {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.footer-platform-logos img {
  height: 22px;
  width: auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.6;
  transition: opacity var(--t);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 2rem;
  text-align: center;
  font-size: 0.78rem;
  opacity: 0.45;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
}

/* ===========================
   DISPONIBILIDAD — CALENDARIO
   =========================== */
.disponibilidad {
  background: var(--color-bg);
}

.calendar-wrapper {
  max-width: 860px;
  margin: 0 auto;
}

.calendar-months {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (min-width: 680px) {
  .calendar-months {
    grid-template-columns: repeat(2, 1fr);
  }
}

.cal-month {
  background: var(--color-white);
  padding: 1.75rem;
}

.cal-month-name {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 500;
  text-align: center;
  margin-bottom: 1.25rem;
  color: var(--color-black);
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.cal-day-name {
  text-align: center;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  padding: 0.5rem 0;
}

.cal-day {
  text-align: center;
  padding: 0.5rem 0;
  font-size: 0.85rem;
  border-radius: 2px;
  transition: background var(--t);
}

.cal-day.cal-past {
  color: var(--color-border);
}

.cal-day.cal-today {
  background: var(--color-accent);
  color: var(--color-white);
  font-weight: 600;
}

.cal-day.cal-weekend {
  color: var(--color-accent);
}

.cal-day.cal-past.cal-weekend {
  color: var(--color-border);
}

.calendar-legend {
  display: flex;
  gap: 2rem;
  justify-content: center;
  margin-bottom: 2rem;
  font-size: 0.82rem;
  color: var(--color-text-muted);
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.legend-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 2px;
  border: none;
  font-style: normal;
}

.legend-today {
  background: var(--color-accent);
}

.legend-available {
  background: var(--color-white);
  border: 1px solid var(--color-border) !important;
}

.calendar-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-outline-dark {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

/* ===========================
   CALENDARIO DE SMOOBU
   El widget trae dos iframes, uno estrecho y otro ancho. Se ensena el que
   toca segun el ancho de pantalla, en vez de cargar los dos y esconder uno
   con el CSS de Smoobu, que no siempre llega a tiempo.
   =========================== */
.smoobu-calendar {
  display: flex;
  justify-content: center;
  margin-inline: auto;
  max-width: 100%;
  overflow-x: auto;
}

.smoobu-calendar iframe {
  border: 0;
  max-width: 100%;
}

.smoobu-calendar .bigDevices { display: none; }
.smoobu-calendar .smallDevices { display: block; }

@media (min-width: 1024px) {
  .smoobu-calendar .bigDevices { display: block; }
  .smoobu-calendar .smallDevices { display: none; }
}

.calendar-aviso {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--color-text-muted, #6b7280);
}

/* ===========================
   FOTOS DE CADA ESTANCIA
   Las fotos van apiladas y se cruzan con opacidad cada 20 segundos. Se
   apilan en vez de cambiar el src para que no parpadee mientras la
   siguiente se descarga: ya estan todas cargadas.
   =========================== */
.room-card-img {
  position: relative;
  overflow: hidden;
}

.room-card-img .room-foto {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s ease;
}

.room-card-img .room-foto.is-visible { opacity: 1; }

/* La primera marca el alto de la caja; las demas van encima. */
.room-card-img .room-foto:first-child { position: relative; }

@media (prefers-reduced-motion: reduce) {
  .room-card-img .room-foto { transition: none; }
}


/* ===========================
   TACTIL
   Estas reglas no se ven en el navegador del ordenador: solo aparecen
   en un movil de verdad.
   =========================== */

/* touch-action: el navegador deja de esperar un segundo toque para hacer
   zoom, asi que el toque responde al instante en vez de 300 ms despues.
   user-select: mantener el dedo sobre un boton ya no selecciona su texto
   -solo en controles; el texto de la pagina se sigue pudiendo copiar-. */
.btn,
.nav-links a,
.nav-cta,
.nav-toggle,
.hero-indicators button {
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

/* Un boton nativo responde cuando el dedo entra, no cuando sale. Sin esto
   el toque parece lento aunque no se pierda un solo milisegundo. */
.btn {
  transition: background var(--t), color var(--t), transform 120ms ease-out, border-color var(--t);
}

.btn:active,
.nav-cta:active,
.plataforma-card:active {
  transform: scale(0.97);
}

.room-card:active {
  opacity: 0.86;
}

/* Las superficies que se pasan con el dedo se quedan el eje horizontal y
   le devuelven el vertical al navegador: sin esto la pagina tiembla
   hacia arriba mientras el carrusel se mueve. */
.hero {
  touch-action: pan-y;
}

/* El calendario de Smoobu scrollea en horizontal: que al llegar al final
   no arrastre la pagina de detras. */
.smoobu-calendar {
  overscroll-behavior-x: contain;
}

/* La barra fija pasa por debajo de la muesca con viewport-fit=cover:
   se aparta el contenido, no el fondo. */
#navbar {
  padding-top: env(safe-area-inset-top, 0px);
}

#navbar.menu-open .nav-links {
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* ===========================
   HOVER
   Solo donde el puntero puede posarse de verdad. En una pantalla tactil
   el :hover se queda pegado despues de tocar.
   =========================== */
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover {
    background: var(--color-accent);
    transform: translateY(-2px);
  }

  .btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--color-on-deep);
  }

  .btn-whatsapp:hover {
    background: #1DA851;
    transform: translateY(-2px);
  }

  #navbar.scrolled .nav-links a:hover {
    color: var(--color-accent);
  }

  .nav-cta:hover {
    background: var(--color-accent) !important;
    transform: translateY(-1px);
  }

  .feature-card:hover {
    border-color: var(--color-accent);
    transform: translateY(-2px);
  }

  .room-card:hover {
    transform: translateY(-4px);
    border-color: var(--color-accent);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  }

  .room-card:hover .room-card-img img {
    transform: scale(1.05);
  }

  .servicio-item:hover {
    transform: translateY(-4px);
  }

  .servicio-item a:hover {
    opacity: 0.75;
  }

  .review-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 28px rgba(0, 0, 0, 0.07);
  }

  .plataforma-card:hover {
    border-color: var(--color-accent);
    transform: translateY(-4px);
  }

  .footer address a:hover {
    color: var(--color-on-deep);
  }

  .footer-platform-logos img:hover {
    opacity: 1;
  }

  .btn-outline-dark:hover {
    border-color: var(--color-black);
  }
}
