/* Aguas Zarcas Stay — estilos (look Booking.com, versión pro)
   Paleta Booking: navy #003580 · azul #0071c2 · amarillo #febb02 · verde #008009 */

:root {
  --navy: #003580; --navy-deep: #00224f; --blue: #0071c2; --blue-dark: #005999;
  --yellow: #febb02; --green: #008009; --tint: #ebf3ff; --line: #e7e7e7;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
html { scroll-behavior: smooth; scroll-padding-top: 8.5rem; }
body { letter-spacing: -.005em; text-rendering: optimizeLegibility; }
::selection { background: var(--yellow); color: var(--navy-deep); }

/* ---------- Header ---------- */
#navbar { background-image: linear-gradient(180deg, #003a8c, #003580 60%, #002d6e); transition: box-shadow .3s; }
#navbar.is-scrolled { box-shadow: 0 8px 28px -10px rgba(0, 34, 79, .6); }
#scroll-progress { position: absolute; left: 0; bottom: 0; width: 100%; height: 3px; background: var(--yellow); transform-origin: left; transform: scaleX(var(--p, 0)); }
.brand { display: flex; align-items: baseline; gap: .3rem; white-space: nowrap; font-size: clamp(1.05rem, 4.8vw, 1.3rem); font-weight: 800; letter-spacing: -.03em; color: #fff; }
.brand-stay { color: var(--yellow); }
#navbar .btn-cta { background: #fff; color: var(--navy); box-shadow: none; }
#navbar .btn-cta:hover { background: var(--tint); }
#navbar .btn-cta::after { display: none; }

/* ---------- Tipografía ---------- */
.hero-title { font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.5rem); line-height: 1.1; font-weight: 800; letter-spacing: -.03em; color: var(--navy-deep); margin-bottom: .5rem; }
.section-title { font-size: 1.4rem; line-height: 1.2; font-weight: 800; letter-spacing: -.02em; color: var(--navy-deep); margin-bottom: 1rem; }
#resumen p { max-width: 62ch; font-size: 1.0625rem; line-height: 1.7; }

/* ---------- Badges ---------- */
.badge-info, .badge-new { display: inline-block; font-size: .75rem; font-weight: 700; padding: .3rem .75rem; border-radius: 999px; }
.badge-info { background: var(--tint); color: var(--blue-dark); }
.badge-new { background: var(--yellow); color: #1a1a1a; }

/* ---------- Galería: 2 arriba + 3 abajo (móvil) · 1 grande + 4 (escritorio) ---------- */
.gallery-wrap { display: grid; grid-template-columns: repeat(6, 1fr); grid-auto-rows: 6.5rem; gap: 4px; border-radius: 16px; overflow: hidden; box-shadow: 0 20px 40px -24px rgba(0, 34, 79, .45); }
.gallery-tile:nth-child(1), .gallery-tile:nth-child(2) { grid-column: span 3; grid-row: 1; }
.gallery-tile:nth-child(3), .gallery-tile:nth-child(4), .gallery-tile:nth-child(5) { grid-column: span 2; grid-row: 2; }
@media (min-width: 480px) { .gallery-wrap { grid-auto-rows: 8rem; } }
@media (min-width: 768px) {
  .gallery-wrap { grid-template-columns: 2fr 1fr 1fr; grid-template-rows: repeat(2, 11rem); grid-auto-rows: unset; gap: 6px; }
  .gallery-tile:nth-child(1) { grid-column: span 1; grid-row: span 2; }
  .gallery-tile:nth-child(2), .gallery-tile:nth-child(3), .gallery-tile:nth-child(4), .gallery-tile:nth-child(5) { grid-column: span 1; grid-row: span 1; }
}
@media (min-width: 1024px) { .gallery-wrap { grid-template-rows: repeat(2, 13rem); } }

/* Momento estrella: las fotos se revelan en cascada al cargar */
.gallery-tile { position: relative; cursor: pointer; overflow: hidden; background: #dfe9f5; animation: tile-wipe .9s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 90ms + 150ms); }
.gallery-tile img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .7s var(--ease); animation: img-settle 1.2s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 90ms + 150ms); }
@keyframes tile-wipe { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0); } }
@keyframes img-settle { from { transform: scale(1.18); } to { transform: scale(1); } }
.gallery-tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 34, 79, .4), transparent 55%); opacity: 0; transition: opacity .3s; pointer-events: none; }
.gallery-tile:hover img { transform: scale(1.06); }
.gallery-tile:hover::after { opacity: 1; }
.gallery-tile:focus-visible { outline-offset: -4px; }
.gallery-more-overlay { position: absolute; inset: 0; background: rgba(0, 34, 79, .6); backdrop-filter: blur(3px); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1rem; }
.gallery-fallback { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; text-align: center; padding: .75rem; font-size: .75rem; font-weight: 600; color: var(--blue-dark); background: linear-gradient(135deg, var(--tint), #f5f5f5); }

/* ---------- Sub-tabs sticky (vidrio esmerilado) ---------- */
#sub-tabs { background-color: rgba(255, 255, 255, .9); -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px); }
.sub-tab { position: relative; padding: .95rem .15rem; color: #5b6b7d; white-space: nowrap; transition: color .2s; }
.sub-tab::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--blue); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.sub-tab:hover, .sub-tab.active { color: var(--navy); }
.sub-tab:hover::after, .sub-tab.active::after { transform: scaleX(1); }

/* ---------- Highlights (chips) ---------- */
.highlight-item { display: flex; align-items: center; gap: .5rem; padding: .5rem .95rem .5rem .75rem; background: var(--tint); border-radius: 999px; font-size: .875rem; font-weight: 600; color: var(--navy); }
.highlight-item svg { width: 1.2rem; height: 1.2rem; color: var(--blue); flex-shrink: 0; }

/* ---------- Instalaciones ---------- */
.amenity-category { padding-top: 1rem; border-top: 1px solid var(--line); }
.amenity-category h3 { font-weight: 800; font-size: .95rem; margin-bottom: .6rem; color: var(--navy-deep); }
.amenity-row { display: flex; align-items: center; gap: .6rem; font-size: .9rem; color: #3d3d3d; padding: .25rem 0; }
.amenity-row svg.check { width: 1.35rem; height: 1.35rem; padding: .2rem; border-radius: 50%; background: #e6f4e6; color: var(--green); flex-shrink: 0; }

/* ---------- Tarjeta de reserva ---------- */
.booking-card { position: relative; background: #fff; border: 1px solid #d6e2f0; border-radius: 16px; overflow: hidden; box-shadow: 0 24px 48px -24px rgba(0, 34, 79, .35), 0 2px 6px rgba(0, 34, 79, .06); }
.booking-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, var(--navy), var(--blue) 70%, var(--yellow)); }
#price-block .price-amount { font-size: 2rem; font-weight: 800; letter-spacing: -.03em; color: #1a1a1a; }
#price-block .price-currency { font-size: 1.15rem; font-weight: 700; margin-right: .1rem; color: var(--navy); }
#price-block .price-unit { font-size: .85rem; color: #6b6b6b; font-weight: 500; }
#price-block .price-meta { font-size: .8rem; color: #6b6b6b; margin-top: .25rem; }

/* ---------- Botón principal (efecto de brillo al pasar el cursor) ---------- */
.btn-cta { position: relative; overflow: hidden; isolation: isolate; color: #fff; font-weight: 700; border-radius: 10px; background: linear-gradient(180deg, #0a82d8, var(--blue) 55%, var(--blue-dark)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 10px 22px -10px rgba(0, 113, 194, .8); transition: transform .2s var(--ease), box-shadow .2s; }
.btn-cta::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .35) 50%, transparent 70%); transform: translateX(-120%); transition: transform .7s var(--ease); }
.btn-cta:hover { transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 14px 26px -10px rgba(0, 113, 194, .9); }
.btn-cta:hover::after { transform: translateX(120%); }
.btn-cta:active { transform: scale(.98); }
.btn-cta-sm { padding: .55rem 1rem; font-size: .875rem; }

/* ---------- Modal ---------- */
#booking-modal { -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
#booking-modal.flex { display: flex; }
/* ---------- Hoja inferior (bottom sheet) ---------- */
#booking-modal { animation: fade-in .25s both; }
#booking-modal.closing { animation: fade-out .22s both; }
.sheet { display: flex; flex-direction: column; width: 100%; max-width: 32rem; max-height: 92vh; max-height: 92dvh; overflow: hidden; background: #fff; border-radius: 24px 24px 0 0; box-shadow: 0 -20px 60px -20px rgba(0, 34, 79, .55); padding-bottom: env(safe-area-inset-bottom, 0px); }
.sheet[hidden], .sheet-form[hidden] { display: none; }
.sheet[data-dir="up"] { animation: sheet-up .4s cubic-bezier(.2, 1, .3, 1); }
.sheet[data-dir="fwd"] { --x: 28px; animation: sheet-x .3s var(--ease); }
.sheet[data-dir="back"] { --x: -28px; animation: sheet-x .3s var(--ease); }
#booking-modal.closing .sheet { animation: sheet-down .22s ease-in both; }
@keyframes sheet-up { from { transform: translateY(100%); } }
@keyframes sheet-x { from { opacity: 0; transform: translateX(var(--x)); } }
@keyframes sheet-down { from { transform: translateY(var(--dy, 0px)); } to { transform: translateY(100%); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }
.sheet-grab { display: flex; justify-content: center; padding: .7rem 0 .35rem; cursor: grab; touch-action: none; flex-shrink: 0; }
.sheet-handle { width: 2.5rem; height: 5px; border-radius: 5px; background: #cfd8e3; }
.sheet-head { display: flex; align-items: center; gap: .6rem; padding: .25rem 1rem .75rem 1.25rem; flex-shrink: 0; }
.sheet-title { flex: 1; display: flex; align-items: center; gap: .5rem; font-size: 1.2rem; font-weight: 800; letter-spacing: -.02em; color: var(--navy-deep); }
.sheet-icon-btn { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 50%; background: var(--tint); color: var(--navy); font-size: 1.6rem; line-height: 1; flex-shrink: 0; }
.sheet-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 1.25rem 1.1rem; }
.sheet-form { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.sheet-foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem 1.25rem; border-top: 1px solid var(--line); flex-shrink: 0; }
.foot-label { display: block; font-size: .75rem; color: #6b6b6b; }
#foot-total { font-size: 1.4rem; font-weight: 800; letter-spacing: -.02em; color: var(--navy-deep); }
.foot-btn { padding: .8rem 1.4rem; font-size: .95rem; }
.deal-pill, .price-deal { background: var(--yellow); color: #1a1a1a; font-size: .75rem; font-weight: 800; padding: .2rem .6rem; border-radius: 999px; white-space: nowrap; }
.price-deal { display: block; width: fit-content; margin-top: .5rem; }
.direct-option { display: flex; align-items: center; gap: .8rem; width: 100%; padding: .9rem 1rem; text-align: left; background: var(--tint); border: 2px solid var(--blue); border-radius: 14px; transition: box-shadow .2s, transform .2s; }
.direct-option:hover { transform: translateY(-1px); box-shadow: 0 10px 22px -12px rgba(0, 113, 194, .8); }
.direct-ico { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 50%; background: var(--blue); color: #fff; flex-shrink: 0; }
.direct-ico svg { width: 1.25rem; height: 1.25rem; }
.direct-text { flex: 1; display: flex; flex-direction: column; }
.direct-text b { font-weight: 800; color: var(--navy-deep); }
.direct-text small { font-size: .8rem; color: #4a5b6e; }
.sheet-sep { display: flex; align-items: center; gap: .75rem; margin: 1rem 0; font-size: .8rem; color: #6b6b6b; }
.sheet-sep::before, .sheet-sep::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------- Formulario de reserva directa ---------- */
.field { margin-top: 1rem; padding: 0; border: 0; min-width: 0; }
.field > label, .field > legend { display: block; margin-bottom: .35rem; padding: 0; font-size: .8rem; font-weight: 700; color: var(--navy-deep); }
.field small { display: block; margin-top: .3rem; font-size: .75rem; color: #6b6b6b; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.input { width: 100%; min-height: 2.9rem; padding: .7rem .8rem; font: inherit; font-size: 1rem; color: #1a1a1a; background: #fff; border: 1.5px solid #cfd8e3; border-radius: 10px; transition: border-color .2s, box-shadow .2s; }
.input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0, 113, 194, .2); }
.input[aria-invalid="true"] { border-color: #d4111e; }
.stepper { display: flex; align-items: center; justify-content: space-between; padding: .55rem 0; }
.stepper + .stepper { border-top: 1px solid var(--line); }
.stepper b { font-size: .95rem; }
.stepper-ctl { display: flex; align-items: center; gap: .9rem; }
.stepper-ctl button { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border: 1.5px solid var(--blue); border-radius: 50%; color: var(--blue); font-size: 1.3rem; line-height: 1; transition: background .2s, color .2s; }
.stepper-ctl button:hover:not(:disabled) { background: var(--blue); color: #fff; }
.stepper-ctl button:disabled { border-color: #cfd8e3; color: #cfd8e3; cursor: not-allowed; }
.stepper-ctl output { min-width: 1.2rem; text-align: center; font-size: 1.05rem; font-weight: 800; }
.summary { margin-top: 1.1rem; padding: .9rem 1rem; background: #f6f9fd; border: 1px solid #d6e2f0; border-radius: 12px; font-size: .9rem; }
.summary .row { display: flex; justify-content: space-between; gap: 1rem; padding: .15rem 0; }
.summary small { display: block; font-size: .75rem; color: #6b6b6b; }
.summary .off { color: var(--green); font-weight: 700; }
.summary .tot { margin-top: .4rem; padding-top: .55rem; border-top: 1px dashed #b9c9dc; font-size: 1rem; font-weight: 800; color: var(--navy-deep); }
.pay-grid { display: grid; gap: .6rem; }
.pay-grid[data-invalid="true"] { outline: 2px solid #d4111e; outline-offset: 3px; border-radius: 12px; }
.pay-card { display: flex; align-items: center; gap: .75rem; padding: .8rem .9rem; border: 1.5px solid #cfd8e3; border-radius: 12px; cursor: pointer; transition: border-color .2s, background .2s; }
.pay-card:has(input:checked) { border-color: var(--blue); background: var(--tint); }
.pay-card input { flex-shrink: 0; width: 1.15rem; height: 1.15rem; accent-color: var(--blue); }
.pay-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pay-body b { font-weight: 800; color: var(--navy-deep); }
.pay-detail { font-size: .85rem; color: #3d3d3d; overflow-wrap: anywhere; }
.copy-btn { flex-shrink: 0; padding: .3rem .75rem; border: 1.5px solid var(--blue); border-radius: 999px; font-size: .78rem; font-weight: 700; color: var(--blue); transition: background .2s, color .2s; }
.copy-btn:hover { background: var(--blue); color: #fff; }
.sheet-note { margin-top: 1rem; font-size: .8rem; color: #5b6b7d; }
.form-error { margin-top: .75rem; font-size: .85rem; font-weight: 700; color: #d4111e; }
.done { text-align: center; padding-top: .5rem; padding-bottom: 1.5rem; }
.done .sheet-title { justify-content: center; }
.done-ico { display: grid; place-items: center; width: 3.5rem; height: 3.5rem; margin: 0 auto .75rem; border-radius: 50%; background: #e6f4e6; color: var(--green); }

.platform-link { display: flex; align-items: center; gap: .75rem; background: #fff; border: 1.5px solid var(--line); border-radius: 12px; padding: .85rem 1rem; transition: border-color .2s, box-shadow .2s, transform .2s; }
.platform-link:hover { border-color: var(--platform-color); box-shadow: 0 8px 20px -8px color-mix(in srgb, var(--platform-color) 55%, transparent); transform: translateY(-1px); }
.platform-badge { width: 2.25rem; height: 2.25rem; border-radius: 9999px; background: var(--platform-color, var(--blue)); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: .85rem; flex-shrink: 0; }
.platform-name { font-weight: 700; color: #1a1a1a; flex: 1; }
.platform-arrow { width: 1rem; height: 1rem; color: #6b6b6b; flex-shrink: 0; transition: transform .2s, color .2s; }
.platform-link:hover .platform-arrow { transform: translateX(3px); color: var(--platform-color); }

/* ---------- Barra móvil y footer ---------- */
#mobile-price-bar { background-color: rgba(255, 255, 255, .92); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); padding-bottom: calc(.75rem + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -10px 24px -14px rgba(0, 34, 79, .4); }
footer { background-image: linear-gradient(180deg, #00224f, #001a3d); border-top: 3px solid var(--yellow); }

/* ---------- Accesibilidad ---------- */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- Disponibilidad y aviso "pronto" ---------- */
.avail { margin-top: .6rem; font-size: .8rem; font-weight: 600; line-height: 1.4; }
.avail.info { color: #6b6b6b; font-weight: 500; }
.avail.ok { color: var(--green); }
.avail.bad { color: #d4111e; }
.avail a { text-decoration: underline; }
.soon { margin-top: 1rem; padding: .85rem 1rem; background: #fff8e1; border: 1px solid var(--yellow); border-radius: 12px; font-size: .875rem; }
.soon p { font-weight: 700; color: #1a1a1a; }
.soon button { margin-top: .4rem; font-size: .85rem; font-weight: 700; color: var(--blue); text-decoration: underline; }
.soon.pop { animation: soon-pop .35s var(--ease); }
@keyframes soon-pop { from { opacity: 0; transform: translateY(6px); } }
