/* ==========================================================================
   CARIBE: capa de tema de PlayasdeCancun.com
   Se carga al final del <head> de todas las páginas (build.js), así gana a los estilos de cada página.

   Paleta
     Abismo   #08334D  tinta y superficies oscuras (mar profundo)
     Laguna   #0A7E92  color de marca, enlaces y botones
     Turquesa #1FC8D0  brillo, anillos de foco, detalles
     Espuma   #EEFAF9  fondos suaves
     Arena    #F6EAD3  fondos cálidos puntuales
     Sol      #FFC83D  acción principal sobre foto u oscuro
     Coral    #FF6F59  acentos (no para texto sobre blanco)

   Tipografía: Bricolage Grotesque (títulos, personalidad) + Figtree (texto, claridad).
   Un solo momento de movimiento: la ola que marca el borde de cada portada y el pie.
   ========================================================================== */

:root {
  --ink: #0A2B3D;
  --abismo: #08334D;
  --lagoon: #0A7E92;
  --lagoon-dark: #075D6E;
  --turquoise: #1FC8D0;
  --seaglass: #9AE8E2;
  --foam: #EEFAF9;
  --sand: #F6EAD3;
  --sun: #FFC83D;
  --sun-soft: #FFD968;
  --coral: #FF6F59;
  --surface: #FBFEFE;

  --secondary: #FF6F59;
  --secondary-light: #FF8A76;

  --font-sans: 'Figtree', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Caprasimo', 'Figtree', -apple-system, BlinkMacSystemFont, sans-serif;

  --radius-md: 0.625rem;
  --radius-lg: 0.9rem;
  --radius-xl: 1.25rem;
  --radius-2xl: 1.75rem;

  --shadow-sm: 0 1px 2px rgba(8, 51, 77, 0.06);
  --shadow: 0 2px 8px rgba(8, 51, 77, 0.07), 0 1px 2px rgba(8, 51, 77, 0.05);
  --shadow-md: 0 8px 18px -4px rgba(8, 51, 77, 0.11), 0 2px 6px -2px rgba(8, 51, 77, 0.06);
  --shadow-lg: 0 16px 32px -8px rgba(8, 51, 77, 0.15), 0 6px 12px -6px rgba(8, 51, 77, 0.08);
  --shadow-xl: 0 26px 50px -14px rgba(8, 51, 77, 0.24);
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
body {
  background: var(--surface);
  color: var(--gray-700);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.62;
}

body { font-synthesis-weight: none; font-variant-numeric: lining-nums; }
h1, h2 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.012em;
  line-height: 1.1;
  text-wrap: balance;
}
h3 { font-family: var(--font-sans); font-weight: 700; letter-spacing: -0.01em; line-height: 1.25; text-wrap: balance; }
table, .price, [class*="price"], [class*="stat"], time { font-variant-numeric: tabular-nums; }
h4, h5, h6 { font-family: var(--font-sans); font-weight: 700; }

::selection { background: var(--seaglass); color: var(--abismo); }
:focus-visible { outline: 3px solid var(--turquoise); outline-offset: 2px; border-radius: 6px; }
a { text-underline-offset: 3px; }

/* Texto largo: líneas cómodas */
.guide-section > p, .guide-section > ul, .guide-section > ol,
.article-content p, .article-content li, .blog-content p, .blog-content li,
.legal-content p, .legal-content li, .content .card p {
  max-width: 70ch;
}
.guide-section p, .article-content p, .blog-content p { line-height: 1.72; }

/* --------------------------------------------------------------------------
   Encabezado: cristal marino
   -------------------------------------------------------------------------- */
.nav { gap: 2px; }
.nav a {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--ink);
  border-radius: 999px;
  padding: 9px 14px;
}
.nav a:hover { background: var(--foam); color: var(--lagoon-dark); }
.nav a.active { color: var(--lagoon-dark); background: var(--foam); }
.nav a.nav-highlight {
  background: var(--sun);
  color: var(--abismo);
  box-shadow: 0 6px 12px -6px rgba(8, 51, 77, 0.4);
}
.nav a.nav-highlight:hover { background: var(--sun-soft); box-shadow: 0 9px 16px -7px rgba(8, 51, 77, 0.45); transform: translateY(-1px); }
.lang-switch { background: var(--foam); color: var(--lagoon-dark); border-radius: 999px; padding: 8px 14px; font-size: 0.8125rem; }
.lang-switch:hover { background: var(--lagoon); color: #fff; }
.menu-btn { background: var(--foam); }

/* --------------------------------------------------------------------------
   Portadas: foto con luz de mar y un borde de ola
   -------------------------------------------------------------------------- */
.hero-bg img,
.beach-hero-bg img { opacity: 1; filter: saturate(1.18) contrast(1.05); }
.hero-overlay,
.beach-hero-overlay {
  background:
    linear-gradient(180deg, rgba(8, 51, 77, 0.34) 0%, rgba(8, 51, 77, 0.22) 45%, rgba(8, 51, 77, 0.80) 100%);
}
.hero-title,
.beach-hero-title,
.hero-guide h1,
.page-hero h1 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.012em;
  line-height: 1.04;
  text-shadow: 0 2px 18px rgba(8, 51, 77, 0.35);
}
.hero-title { font-size: clamp(2.5rem, 6.4vw, 4.6rem); }
.live-widget { margin-top: 0.25rem; }
.hero-subtitle { font-size: clamp(1.0625rem, 2vw, 1.3rem); color: rgba(255, 255, 255, 0.92); text-shadow: 0 1px 10px rgba(8, 51, 77, 0.35); }

.hero-badge,
[class$="-hero-badge"] {
  background: rgba(8, 51, 77, 0.38);
  border: 1px solid rgba(154, 232, 226, 0.45);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: #fff;
  font-weight: 600;
}

/* La ola (build.js la inserta tras la portada y antes del pie) */
.wave-divider {
  --wave: var(--surface);
  position: relative;
  height: 64px;
  margin-top: -63px;
  z-index: 3;
  pointer-events: none;
  background: var(--wave);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 80' preserveAspectRatio='none'%3E%3Cpath d='M0,40 C180,72 360,8 540,36 C720,64 900,12 1080,34 C1260,56 1380,52 1440,40 L1440,80 L0,80 Z'/%3E%3C/svg%3E") 0 100% / 1440px 100% repeat-x;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 80' preserveAspectRatio='none'%3E%3Cpath d='M0,40 C180,72 360,8 540,36 C720,64 900,12 1080,34 C1260,56 1380,52 1440,40 L1440,80 L0,80 Z'/%3E%3C/svg%3E") 0 100% / 1440px 100% repeat-x;
  animation: caribe-drift 46s linear infinite;
}
.wave-divider::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  transform: translateY(-13px);
  background: rgba(154, 232, 226, 0.55);
  -webkit-mask: inherit;
  mask: inherit;
  -webkit-mask-position: 700px 100%;
  mask-position: 700px 100%;
  animation: caribe-drift-back 64s linear infinite;
}
@keyframes caribe-drift { to { -webkit-mask-position: -1440px 100%; mask-position: -1440px 100%; } }
@keyframes caribe-drift-back { to { -webkit-mask-position: -740px 100%; mask-position: -740px 100%; } }
.wave-divider.wave-footer { --wave: var(--abismo); height: 48px; margin-top: -47px; }
.wave-divider.wave-footer::before { background: rgba(31, 200, 208, 0.35); }
@media (max-width: 640px) { .wave-divider { height: 40px; margin-top: -39px; } .wave-divider.wave-footer { height: 34px; margin-top: -33px; } }
@media (prefers-reduced-motion: reduce) { .wave-divider, .wave-divider::before { animation: none; } }

/* --------------------------------------------------------------------------
   Botones: píldoras con carácter
   -------------------------------------------------------------------------- */
.btn {
  border-radius: 999px;
  font-weight: 700;
  padding: 0.8rem 1.6rem;
  letter-spacing: 0;
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}
.btn-lg { padding: 1rem 2rem; font-size: 1.0625rem; }
.btn-primary { background: var(--lagoon); color: #fff; box-shadow: 0 8px 18px -6px rgba(8, 51, 77, 0.45); }
.btn-primary:hover { background: #0C8CA2; transform: translateY(-2px); box-shadow: 0 12px 22px -8px rgba(8, 51, 77, 0.5); }
.btn-primary:active { transform: translateY(0); box-shadow: 0 4px 10px -4px rgba(8, 51, 77, 0.45); }
.hero .btn-primary, .beach-hero .btn-primary, .hero-guide .btn-primary, .page-hero .btn-primary,
[class*="-cta"] .btn-primary, .cta-section .btn-primary {
  background: var(--sun); color: var(--abismo); box-shadow: 0 10px 20px -8px rgba(8, 51, 77, 0.55);
}
.hero .btn-primary:hover, .hero-guide .btn-primary:hover, [class*="-cta"] .btn-primary:hover, .cta-section .btn-primary:hover { background: var(--sun-soft); }
.btn-secondary { background: var(--coral); color: var(--abismo); }
.btn-secondary:hover { background: var(--secondary-light); }
.btn-outline { border-width: 2px; border-color: rgba(255, 255, 255, 0.75); color: #fff; }
.btn-outline:hover { background: rgba(255, 255, 255, 0.16); }
.btn-white { color: var(--abismo); }

/* --------------------------------------------------------------------------
   Encabezados de sección: sin etiqueta en mayúsculas, con una ola pequeña
   -------------------------------------------------------------------------- */
.section-header { max-width: 720px; }
.section-overline { display: none; }
.section-title { font-weight: 400; font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.012em; line-height: 1.08; color: var(--ink); }
.section-desc { font-size: 1.125rem; color: var(--gray-600); max-width: 60ch; margin-left: auto; margin-right: auto; }

/* --------------------------------------------------------------------------
   Tarjetas: postales de playa
   -------------------------------------------------------------------------- */
.beach-card {
  padding: 8px;
  border-radius: 1.75rem;
  border: 1px solid rgba(10, 126, 146, 0.12);
  background: #fff;
  box-shadow: var(--shadow-md);
  transition: transform 220ms ease, box-shadow 220ms ease;
}
.beach-card:hover { transform: translateY(-5px) rotate(-0.4deg); box-shadow: var(--shadow-xl); }
.beach-card-image { border-radius: 1.3rem; }
.beach-card-image img { filter: saturate(1.1); }
.beach-card-body { padding: 1.1rem 0.9rem 0.9rem; }
.beach-card-title { font-family: var(--font-display); font-weight: 400; font-size: 1.3rem; letter-spacing: -0.005em; }
.beach-card-score { background: var(--sun); color: var(--abismo); border: 3px solid #fff; font-family: var(--font-display); font-weight: 400; }
.beach-card-badge { background: rgba(255, 255, 255, 0.94); color: var(--abismo); font-weight: 700; }
.tag { background: var(--foam); color: var(--lagoon-dark); border-radius: 999px; padding: 0.25rem 0.7rem; font-weight: 600; }
.beach-card-link { color: var(--lagoon-dark); }

.tip-card, .zone-card, .amen-card, .rules-card, .sidebar-card, .category-card {
  border-color: rgba(10, 126, 146, 0.14);
}
.category-card { background: var(--foam); border-radius: 1.5rem; }
.category-card:hover { background: #fff; border-color: var(--turquoise); }

/* --------------------------------------------------------------------------
   Pie: noche en el mar
   -------------------------------------------------------------------------- */
.footer {
  background:
    radial-gradient(900px 360px at 88% -8%, rgba(31, 200, 208, 0.20), transparent 62%),
    radial-gradient(700px 300px at 5% 110%, rgba(154, 232, 226, 0.10), transparent 60%),
    var(--abismo);
  color: rgba(246, 234, 211, 0.82);
  padding-top: 4.5rem;
}
.footer-title { font-family: var(--font-display); font-size: 1.0625rem; letter-spacing: -0.01em; color: var(--sand); }
.footer-links a, .footer-tools a { color: rgba(246, 234, 211, 0.78); }
.footer-links a:hover, .footer-tools a:hover, .footer a:hover { color: var(--sun); }
.footer-bottom, .footer-tools { border-color: rgba(246, 234, 211, 0.14); }

/* --------------------------------------------------------------------------
   Aparición al desplazar: solo opacidad (sin deslizamiento)
   -------------------------------------------------------------------------- */
.js-animate .animate-on-scroll { transform: none; transition: opacity 0.5s ease; }

/* Inputs */
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(31, 200, 208, 0.45); outline-offset: 1px; border-color: var(--lagoon); }

/* Portadas de playa: escrim más fuerte arriba y abajo para que miga de pan y datos se lean sobre fotos claras */
.beach-hero-overlay {
  background:
    linear-gradient(180deg, rgba(8, 51, 77, 0.58) 0%, rgba(8, 51, 77, 0.16) 30%, rgba(8, 51, 77, 0.22) 52%, rgba(8, 51, 77, 0.86) 100%);
}
.beach-hero a, .beach-hero .breadcrumb, .beach-hero-meta, .beach-hero-subtitle { text-shadow: 0 1px 10px rgba(8, 51, 77, 0.55); }

/* Portadas de categoría (degradado liso): un sol bajo y un velo de mar para darles luz */
:is(.pf-hero, .pfi-hero, .ps-hero, .ppf-hero, .pp-hero, .pb-hero, .pt-hero, .bf-hero) { position: relative; isolation: isolate; }
:is(.pf-hero, .pfi-hero, .ps-hero, .ppf-hero, .pp-hero, .pb-hero, .pt-hero, .bf-hero)::after {
  content: "";
  position: absolute;
  right: -8%;
  top: -55%;
  width: min(62vw, 560px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 42% 42%, rgba(255, 200, 61, 0.50), rgba(255, 200, 61, 0.12) 46%, transparent 68%);
  z-index: -1;
  pointer-events: none;
}

/* Cabecera transparente sobre portadas (páginas con .header.scrolled): al desplazar vuelve el cristal marino */
.header.scrolled { background: rgba(251, 254, 254, 0.92); -webkit-backdrop-filter: saturate(1.5) blur(14px); backdrop-filter: saturate(1.5) blur(14px); border-bottom: 1px solid rgba(10, 126, 146, 0.16); }
.header.scrolled .nav a.nav-highlight { background: var(--sun); color: var(--abismo); }

/* El botón del planificador mantiene su sol también sobre portadas transparentes */
.header .nav a.nav-highlight { background: var(--sun); color: var(--abismo); }

/* Pie: logo legible y una sola línea de separación */
.footer-brand img, .footer .logo img { height: 64px; width: auto; }
.footer-tools { border-bottom: 0; padding-bottom: var(--space-6); margin-bottom: var(--space-4); }

/* --------------------------------------------------------------------------
   Contraste: colores semánticos de texto sobre superficies claras (AA ≥ 4.5)
   -------------------------------------------------------------------------- */
:is(.yes, .pf-yes, .pb-yes, .ps-yes, .pfi-yes, .pp-yes, .ppf-yes, .pt-yes, .bf-yes, .price, .transport-card-price, .info-value, .feature-desc, .beach-rating, .month-badge, .activity-card-price, .zone-card-subtitle, .pp-maybe, .pf-maybe) { --_ok: 1; }
[style*="color: #22c55e" i]:not([style*="background" i]):not([style*="border" i]),
[style*="color:#22c55e" i]:not([style*="background" i]):not([style*="border" i]),
[style*="color: #16a34a" i]:not([style*="background" i]):not([style*="border" i]),
[style*="color:#16a34a" i]:not([style*="background" i]):not([style*="border" i]) { color: #15803D !important; }
[style*="color: #10b981" i]:not([style*="background" i]):not([style*="border" i]),
[style*="color:#10b981" i]:not([style*="background" i]):not([style*="border" i]) { color: #0B7A57 !important; }
[style*="color: #059669" i]:not([style*="background" i]):not([style*="border" i]),
[style*="color:#059669" i]:not([style*="background" i]):not([style*="border" i]) { color: #047857 !important; }
[style*="color: #f59e0b" i]:not([style*="background" i]):not([style*="border" i]),
[style*="color:#f59e0b" i]:not([style*="background" i]):not([style*="border" i]),
[style*="color: #d97706" i]:not([style*="background" i]):not([style*="border" i]),
[style*="color:#d97706" i]:not([style*="background" i]):not([style*="border" i]) { color: #B45309 !important; }
[style*="color: #eab308" i]:not([style*="background" i]):not([style*="border" i]),
[style*="color:#eab308" i]:not([style*="background" i]):not([style*="border" i]) { color: #A16207 !important; }
[style*="color: #ca8a04" i]:not([style*="background" i]):not([style*="border" i]),
[style*="color:#ca8a04" i]:not([style*="background" i]):not([style*="border" i]) { color: #854D0E !important; }
[style*="color: #f97316" i]:not([style*="background" i]):not([style*="border" i]),
[style*="color:#f97316" i]:not([style*="background" i]):not([style*="border" i]) { color: #C2410C !important; }
[style*="color: #ef4444" i]:not([style*="background" i]):not([style*="border" i]),
[style*="color:#ef4444" i]:not([style*="background" i]):not([style*="border" i]) { color: #DC2626 !important; }
[style*="color: #3b82f6" i]:not([style*="background" i]):not([style*="border" i]),
[style*="color:#3b82f6" i]:not([style*="background" i]):not([style*="border" i]) { color: #1D4ED8 !important; }
/* …pero no sobre fondos de color intencionados ni dentro de insignias oscuras */
:is(.beach-hero, .live-bar, .footer, [class*="hero"]) [style*="color"] { color: revert-layer; }

.yes, .pf-yes, .pb-yes, .ps-yes, .pfi-yes, .pp-yes, .ppf-yes, .pt-yes, .bf-yes { color: #0B7A57; }
.info-value, .price, .transport-card-price { --ok: 1; }
.info-value.free, .info-value.gratis { color: #0B7A57; }
.beach-rating { color: #B45309; }
.month-badge { font-weight: 700; }
.activity-card-price { color: var(--lagoon-dark); }
.zone-card-subtitle { filter: none; }
.zc-norte { --zc: #087384; }
.zc-sur { --zc: #1D4ED8; }
.zc-centro { --zc: #B45309; }
.zc-isla { --zc: #047857; }
.share-btn { color: #0E7A3D; border-color: #0E7A3D; }
.live-item-label { color: rgba(255, 255, 255, 0.72); }
.price, .transport-card-price, .live-indicator { color: #0B7A57; }
[style*="color: var(--success)" i]:not([style*="background" i]) { color: #0B7A57 !important; }
[style*="color: #0ea5e9" i]:not([style*="background" i]) { color: #0369A1 !important; }
.price, .transport-card-price { color: #0B7A57 !important; }
.live-indicator span:not(.live-dot) { color: #0B7A57 !important; }
.hero-guide h1, .hero-guide p, .hero-guide .breadcrumb { text-shadow: 0 1px 14px rgba(8, 51, 77, 0.55); }

/* --------------------------------------------------------------------------
   Vacío de plantilla: sin etiquetas sobre títulos, sin filas de métricas en portadas, sin cristal decorativo
   -------------------------------------------------------------------------- */
[class$="-hero-badge"]:not(.hero-badge):not(.live-badge-hero),
.calc-hero-badge,
:is(.pf-hero, .pfi-hero, .ps-hero, .ppf-hero, .pp-hero, .pb-hero, .pt-hero, .bf-hero) [class$="-hero-stats"],
.mp-stats, .stats-banner, .stats-grid { display: none !important; }
.hero-badge { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(8, 51, 77, 0.55); }

/* --------------------------------------------------------------------------
   Superficies del navegador: lo que no dibujamos también lleva el diseño
   -------------------------------------------------------------------------- */
html { scrollbar-color: var(--lagoon) var(--foam); scrollbar-width: thin; }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--foam); }
::-webkit-scrollbar-thumb { background: var(--lagoon); border-radius: 999px; border: 3px solid var(--foam); }
::-webkit-scrollbar-thumb:hover { background: var(--lagoon-dark); }
input, textarea, select { caret-color: var(--lagoon); accent-color: var(--lagoon); }
::placeholder { color: var(--gray-400); opacity: 1; }

/* --------------------------------------------------------------------------
   Iconos dibujados (Lucide): un solo trazo y peso en toda la web
   -------------------------------------------------------------------------- */
.ico { display: inline-block; flex: none; width: 1.15em; height: 1.15em; vertical-align: -0.2em; }
.dot { display: inline-block; width: 0.7em; height: 0.7em; border-radius: 50%; vertical-align: 0.02em; margin-right: 0.2em; }
.dot-green { background: #16A34A; }
.dot-yellow { background: #EAB308; }
.dot-red { background: #DC2626; }
.dot-black { background: #12394C; }
:is(.tip-card-icon, .amen-icon, .category-card-icon, .zone-card-icon, .live-stat-icon, .feature-icon, .info-icon, .tool-icon, .act-icon) { color: var(--lagoon); }
:is(.tip-card-icon, .amen-icon, .zone-card-icon) .ico { width: 1.35em; height: 1.35em; stroke-width: 1.75; }
.category-card-icon .ico, .live-stat-icon .ico { width: 1.2em; height: 1.2em; stroke-width: 1.6; }

/* --------------------------------------------------------------------------
   Marca: sol sobre dos olas + el nombre en la tipografía de títulos
   -------------------------------------------------------------------------- */
.logo-lockup { display: inline-flex; align-items: center; gap: 0.6rem; line-height: 1; }
.logo-mark { width: 38px; height: 38px; flex: none; }
.logo-word { font-family: var(--font-display); font-size: 1.4rem; letter-spacing: -0.01em; color: var(--ink); white-space: nowrap; }
@media (max-width: 767px) { .logo-mark { width: 32px; height: 32px; } .logo-word { font-size: 1.2rem; } }
@media (max-width: 380px) { .logo-word { font-size: 1.05rem; } }
.mobile-menu-header .logo-word { color: #fff; }
.footer .logo-word { color: var(--sand); }
.footer .logo-mark { width: 44px; height: 44px; }
.header:not(.scrolled) .logo-word { color: inherit; }
.header--over:not(.scrolled) .logo-word { color: #fff; }
