/**
 * Horas Santas — modo verano integrado en el hero.
 * El toggle vive dentro del hero (.wp-block-cover) y, en modo verano, el fondo
 * del propio hero se transforma en una escena de playa animada.
 */

/* ===== Hero base ===== */
.hk-holy-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.hk-holy-hero .wp-block-cover__inner-container {
  position: relative;
  z-index: 3;
}

/* Toggle MODO VERANO, esquina superior derecha del hero */
.hk-holy-toggle {
  position: absolute;
  top: clamp(14px, 2.4vw, 24px);
  right: clamp(14px, 2.4vw, 28px);
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: #06222e;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(6px);
  box-shadow: 0 10px 26px rgba(6, 31, 44, 0.28);
  border: 1.5px solid rgba(255, 255, 255, 0.7);
  transition: transform 160ms ease, box-shadow 160ms ease, background 220ms ease;
}

.hk-holy-toggle:hover,
.hk-holy-toggle:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 16px 32px rgba(6, 31, 44, 0.34);
}

.hk-holy-toggle.is-on {
  color: #06222e;
  background: linear-gradient(135deg, #ffe46b 0%, #58d7f0 100%);
}

.hk-holy-toggle__label {
  font-size: 13px;
  white-space: nowrap;
}

.hk-holy-toggle__track {
  position: relative;
  width: 46px;
  height: 26px;
  border-radius: 999px;
  background: rgba(6, 31, 44, 0.28);
  box-shadow: inset 0 0 0 1px rgba(6, 31, 44, 0.12);
  transition: background 200ms ease;
}

.hk-holy-toggle__knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 3px 8px rgba(6, 31, 44, 0.3);
  transition: transform 200ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hk-holy-toggle.is-on .hk-holy-toggle__track {
  background: #0bbf7e;
}

.hk-holy-toggle.is-on .hk-holy-toggle__knob {
  transform: translateX(20px);
}

.hk-holy-toggle__state {
  min-width: 30px;
  font-size: 13px;
  text-align: center;
}

/* Legibilidad del texto del hero en modo verano (fondo claro) */
.hk-holy-hero--summer .wp-block-post-title,
.hk-holy-hero--summer .activities-nav {
  text-shadow: 0 2px 14px rgba(6, 31, 44, 0.5);
}

/* Botón "Ver horas santas" en verano: color cálido playero (el color base va inline,
   por eso !important). Texto blanco para contraste sobre el degradado coral. */
.hk-holy-hero--summer .open-map-btn,
.hk-holy-hero--summer #open-map-btn {
  background: linear-gradient(135deg, #ffab3d 0%, #ff5d6c 100%) !important;
  color: #ffffff !important;
  border-color: transparent !important;
}

/* ===== Escena de playa (solo modo verano) ===== */
.hk-holy-hero-scene {
  display: none;
}

.hk-holy-hero--summer .wp-block-cover__image-background {
  opacity: 0;
}

.hk-holy-hero--summer .wp-block-cover__background {
  background-color: transparent !important;
  opacity: 0.16;
}

.hk-holy-hero--summer .hk-holy-hero-scene {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  pointer-events: none;
  overflow: hidden;
}

.hk-holy-sky {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #6fd4ff 0%, #a6e6ff 42%, #ffe9a8 62%, #ffe9a8 64%);
}

.hk-holy-sun {
  position: absolute;
  top: 9%;
  right: 12%;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff3b0 0 40%, #ffd45b 41% 100%);
  box-shadow: 0 0 0 12px rgba(255, 222, 120, 0.28), 0 0 60px rgba(255, 205, 80, 0.7);
  animation: hk-holy-sun 6s ease-in-out infinite;
}

.hk-holy-cloud {
  position: absolute;
  height: 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  filter: drop-shadow(0 6px 10px rgba(8, 60, 90, 0.12));
}

.hk-holy-cloud::before,
.hk-holy-cloud::after {
  content: "";
  position: absolute;
  bottom: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
}

.hk-holy-cloud--one {
  top: 16%;
  width: 84px;
  animation: hk-holy-cloud 46s linear infinite;
}
.hk-holy-cloud--one::before { left: 14px; width: 34px; height: 34px; bottom: 2px; }
.hk-holy-cloud--one::after { right: 16px; width: 26px; height: 26px; bottom: 4px; }

.hk-holy-cloud--two {
  top: 26%;
  width: 60px;
  transform: scale(0.8);
  animation: hk-holy-cloud 64s linear 8s infinite;
}
.hk-holy-cloud--two::before { left: 10px; width: 26px; height: 26px; bottom: 2px; }
.hk-holy-cloud--two::after { right: 10px; width: 20px; height: 20px; bottom: 4px; }

.hk-holy-gull {
  position: absolute;
  width: 22px;
  height: 10px;
  background: transparent;
}
.hk-holy-gull::before,
.hk-holy-gull::after {
  content: "";
  position: absolute;
  top: 0;
  width: 11px;
  height: 10px;
  border-top: 2.5px solid rgba(20, 50, 66, 0.66);
  border-radius: 50%;
}
.hk-holy-gull::before { left: 0; transform: rotate(18deg); }
.hk-holy-gull::after { right: 0; transform: rotate(-18deg); }
.hk-holy-gull--one { top: 20%; left: 30%; animation: hk-holy-gull 22s linear infinite; }
.hk-holy-gull--two { top: 28%; left: 50%; transform: scale(0.7); animation: hk-holy-gull 30s linear 6s infinite; }

.hk-holy-sea {
  position: absolute;
  left: 0;
  right: 0;
  top: 46%;
  height: 30%;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.10) 0 3px, rgba(255,255,255,0) 3px 26px),
    linear-gradient(180deg, #1fa9d8 0%, #0d7fb4 100%);
  background-size: 240px 100%, auto;
  animation: hk-holy-waves 9s linear infinite;
}

.hk-holy-sea::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -6px;
  height: 8px;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,0.85) 0 10px, transparent 10px 26px);
}

.hk-holy-boat {
  position: absolute;
  width: 30px;
  height: 12px;
  background: #fff;
  border-radius: 0 0 12px 12px;
  box-shadow: inset 0 -4px 0 #e9594f;
}
.hk-holy-boat::before {
  content: "";
  position: absolute;
  left: 14px;
  bottom: 11px;
  border-left: 16px solid transparent;
  border-bottom: 26px solid #fff;
}
.hk-holy-boat::after {
  content: "";
  position: absolute;
  left: 12px;
  bottom: 11px;
  width: 2px;
  height: 26px;
  background: #c2543f;
}
.hk-holy-boat--one { top: 50%; left: -60px; animation: hk-holy-boat 19s linear infinite; }
.hk-holy-boat--two { top: 64%; left: -120px; transform: scale(0.72); animation: hk-holy-boat 27s linear 6s infinite; }

.hk-holy-swimmer {
  position: absolute;
  width: 16px;
  height: 16px;
}
.hk-holy-swimmer::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #c98a5b;
  box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.4);
}
.hk-holy-swimmer::after {
  content: "";
  position: absolute;
  left: -10px;
  top: 5px;
  width: 14px;
  height: 4px;
  border-radius: 999px;
  background: #b5764a;
  transform-origin: right center;
  animation: hk-holy-stroke 1.6s ease-in-out infinite;
}
.hk-holy-swimmer--one { top: 58%; left: 40%; animation: hk-holy-bob 3s ease-in-out infinite; }
.hk-holy-swimmer--two { top: 68%; left: 62%; transform: scale(0.82); animation: hk-holy-bob 3.6s ease-in-out 0.8s infinite; }

.hk-holy-sand {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 26%;
  background: linear-gradient(180deg, #ffe7a8 0%, #f4cf7f 100%);
  box-shadow: inset 0 6px 14px rgba(255, 255, 255, 0.4);
}

.hk-holy-palm {
  position: absolute;
  left: 5%;
  bottom: 16%;
  width: 6px;
  height: 92px;
  background: linear-gradient(90deg, #9c6b35, #7d5226);
  border-radius: 6px;
  transform: rotate(-6deg);
  transform-origin: bottom center;
  animation: hk-holy-sway 5s ease-in-out infinite;
}
.hk-holy-palm::before,
.hk-holy-palm::after {
  content: "";
  position: absolute;
  top: -8px;
  left: -30px;
  width: 66px;
  height: 30px;
  border-radius: 0 0 60px 60px;
  background: radial-gradient(circle at 50% 0, #2fae5e 0 60%, #1f8f49 100%);
  clip-path: polygon(0 0, 100% 0, 84% 100%, 50% 56%, 16% 100%);
}
.hk-holy-palm::after { transform: rotate(52deg); transform-origin: 50% 0; }

.hk-holy-parasol {
  position: absolute;
  left: 24%;
  bottom: 17%;
  width: 84px;
  height: 42px;
  border-radius: 84px 84px 0 0;
  background: repeating-conic-gradient(from 180deg at 50% 100%, #ff6b6b 0 24deg, #fff6d6 24deg 48deg);
  filter: drop-shadow(0 8px 10px rgba(8, 60, 90, 0.18));
}
.hk-holy-parasol::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 40px;
  width: 4px;
  height: 40px;
  margin-left: -2px;
  border-radius: 999px;
  background: #7c5a32;
}

.hk-holy-resting {
  position: absolute;
  left: 32%;
  bottom: 9%;
  width: 96px;
  height: 16px;
  border-radius: 6px;
  background: linear-gradient(90deg, #ff9f6b 0 50%, #ffd76b 50% 100%);
  transform: rotate(-3deg);
  box-shadow: 0 6px 10px rgba(8, 60, 90, 0.14);
}
.hk-holy-resting::before {
  content: "";
  position: absolute;
  left: -6px;
  top: -16px;
  width: 78px;
  height: 18px;
  border-radius: 999px;
  background: #d79a6a;
}
.hk-holy-resting::after {
  content: "";
  position: absolute;
  left: -16px;
  top: -18px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #c98a5b;
}

.hk-holy-ball {
  position: absolute;
  right: 26%;
  bottom: 22%;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: conic-gradient(from 20deg, #ff6b6b 0 20%, #fff 0 40%, #42c8ff 0 60%, #fff 0 80%, #ffd166 0 100%);
  box-shadow: inset -4px -4px 8px rgba(0, 0, 0, 0.15), 0 6px 12px rgba(8, 60, 90, 0.2);
  animation: hk-holy-ball 2.6s cubic-bezier(0.3, 0, 0.5, 1) infinite;
}

.hk-holy-glasses {
  position: absolute;
  right: 14%;
  bottom: 11%;
  width: 58px;
  height: 20px;
}
.hk-holy-glasses::before,
.hk-holy-glasses::after {
  content: "";
  position: absolute;
  top: 0;
  width: 24px;
  height: 20px;
  border-radius: 50% 50% 60% 60%;
  background: linear-gradient(160deg, #14323f 0 40%, #00c2d9 100%);
  box-shadow: 0 3px 6px rgba(8, 60, 90, 0.25);
}
.hk-holy-glasses::before { left: 0; }
.hk-holy-glasses::after { right: 0; }

/* ===== Animaciones ===== */
@keyframes hk-holy-sun {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 12px rgba(255,222,120,0.28), 0 0 60px rgba(255,205,80,0.7); }
  50% { transform: scale(1.06); box-shadow: 0 0 0 18px rgba(255,222,120,0.22), 0 0 80px rgba(255,205,80,0.85); }
}
@keyframes hk-holy-cloud {
  from { transform: translateX(-140px); }
  to { transform: translateX(calc(100vw + 140px)); }
}
@keyframes hk-holy-gull {
  from { transform: translateX(0) translateY(0); }
  50% { transform: translateX(40vw) translateY(-10px); }
  to { transform: translateX(80vw) translateY(0); }
}
@keyframes hk-holy-waves {
  from { background-position: 0 0, 0 0; }
  to { background-position: -240px 0, 0 0; }
}
@keyframes hk-holy-boat {
  from { transform: translateX(0) rotate(0deg); }
  50% { transform: translateX(50vw) rotate(2deg); }
  to { transform: translateX(calc(100vw + 160px)) rotate(0deg); }
}
@keyframes hk-holy-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}
@keyframes hk-holy-stroke {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(-38deg); }
}
@keyframes hk-holy-ball {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-46px) rotate(180deg); }
}
@keyframes hk-holy-sway {
  0%, 100% { transform: rotate(-6deg); }
  50% { transform: rotate(-1deg); }
}

@media (prefers-reduced-motion: reduce) {
  .hk-holy-sun,
  .hk-holy-cloud,
  .hk-holy-gull,
  .hk-holy-sea,
  .hk-holy-boat,
  .hk-holy-swimmer,
  .hk-holy-swimmer::after,
  .hk-holy-ball,
  .hk-holy-palm {
    animation: none !important;
  }
}

@media (max-width: 680px) {
  /* El toggle deja de flotar sobre el menú: pasa a su propia fila, alineado a la
     derecha, y el nav "Horas Santas / Revolcaderos…" fluye debajo sin solaparse. */
  .hk-holy-hero .hk-holy-toggle {
    position: static;
    margin: 0 0 12px auto;
    padding: 7px 12px;
    gap: 8px;
  }
  .hk-holy-toggle__label { font-size: 12px; }
  /* Fondo de playa limpio: cielo, sol, nubes, gaviotas, mar y arena con barcos.
     Se ocultan los objetos del primer plano (sombrilla, palmera, balón, etc.) que
     en pantalla pequeña se apelmazaban y pisaban el título/botón. */
  .hk-holy-sun { width: 52px; height: 52px; top: 7%; right: 9%; }
  .hk-holy-sea { top: 46%; height: 30%; }
  .hk-holy-sand { height: 22%; }
  .hk-holy-palm,
  .hk-holy-parasol,
  .hk-holy-resting,
  .hk-holy-ball,
  .hk-holy-glasses,
  .hk-holy-swimmer {
    display: none;
  }
}

/* =====================================================================
   INTRO "A GAS": barco que cruza creciendo + balonazo que rompe la pantalla.
   Overlay a pantalla completa, se dispara con .is-playing (JS, 1 vez/sesión).
   ===================================================================== */
.hk-summer-intro {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  pointer-events: none;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
}

.hk-summer-intro.is-playing {
  visibility: visible;
  opacity: 1;
  animation: hk-intro-fade 6.6s ease forwards;
}

/* ---- Barco que atraviesa creciendo y "saliendo" de la pantalla ---- */
.hk-summer-intro__boat {
  position: absolute;
  left: -16vw;
  top: 50%;
  width: 150px;
  height: 110px;
  transform: translate(0, -50%) scale(0.2);
  opacity: 0;
  will-change: transform, opacity;
}
.hk-summer-intro.is-playing .hk-summer-intro__boat {
  animation: hk-intro-boat 3.6s linear forwards;
}
/* Casco */
.hk-summer-intro__boat::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 18px;
  width: 150px;
  height: 42px;
  background: linear-gradient(180deg, #ff5a4d 0 55%, #c8362b 55% 100%);
  border-radius: 8px 14px 60px 60px / 8px 14px 70px 70px;
  box-shadow: inset 0 6px 0 rgba(255, 255, 255, 0.5);
}
/* Vela */
.hk-summer-intro__boat::after {
  content: "";
  position: absolute;
  left: 64px;
  bottom: 58px;
  width: 0;
  height: 0;
  border-left: 14px solid #1f6f86;
  border-right: 66px solid transparent;
  border-bottom: 96px solid #ffffff;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.18));
  transform-origin: left bottom;
  animation: hk-intro-sail 0.5s ease-in-out infinite alternate;
}

/* Estela / salpicaduras de agua */
.hk-summer-intro__splash {
  position: absolute;
  left: -16vw;
  top: 50%;
  width: 10px;
  height: 10px;
  opacity: 0;
}
.hk-summer-intro.is-playing .hk-summer-intro__splash {
  animation: hk-intro-boat 3.6s linear forwards;
}
.hk-summer-intro__splash::before,
.hk-summer-intro__splash::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.95) 0 60%, rgba(120,220,255,0.6) 100%);
  box-shadow:
    -30px 14px 0 -2px rgba(255,255,255,0.85),
    -64px -4px 0 -4px rgba(186,240,255,0.8),
    -96px 20px 0 -3px rgba(255,255,255,0.7),
    -130px 2px 0 -5px rgba(186,240,255,0.7),
    -50px 34px 0 -6px rgba(255,255,255,0.75);
}
.hk-summer-intro__splash::before { width: 16px; height: 16px; left: -10px; top: 30px; }
.hk-summer-intro__splash::after { width: 10px; height: 10px; left: -4px; top: 8px; }

/* ---- Balonazo: vuela, impacta en el centro y deja la rotura ---- */
.hk-summer-intro__ball {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 90px;
  height: 90px;
  margin: -45px 0 0 -45px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 30%, rgba(255,255,255,0.9) 0 12%, rgba(255,255,255,0) 32%),
    conic-gradient(from 18deg, #ff5d5d 0 20%, #fff 0 40%, #36c5ff 0 60%, #fff 0 80%, #ffd23f 0 100%);
  box-shadow: inset -10px -10px 18px rgba(0,0,0,0.18);
  opacity: 0;
  transform: scale(0.1);
}
.hk-summer-intro.is-playing .hk-summer-intro__ball {
  animation: hk-intro-ball 1.5s cubic-bezier(0.45, 0, 0.7, 0.2) 2.7s forwards;
}

/* Rotura: PNG real de cristal roto, GIGANTE (llena la pantalla y se sale) */
.hk-summer-intro__crack {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 150vmax;
  height: auto;
  max-width: none;
  transform: translate(-50%, -50%) scale(0) rotate(-10deg);
  opacity: 0;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.4));
  will-change: transform, opacity;
}
.hk-summer-intro.is-playing .hk-summer-intro__crack {
  animation: hk-intro-crack 2.9s cubic-bezier(0.18, 1.25, 0.3, 1) 3.55s forwards;
}

@keyframes hk-intro-fade {
  0%, 92% { opacity: 1; }
  100% { opacity: 0; visibility: hidden; }
}
@keyframes hk-intro-boat {
  0%   { transform: translate(-4vw, calc(-50% + 5vh)) scale(0.2) rotate(-4deg); opacity: 0; }
  7%   { opacity: 1; }
  16%  { transform: translate(14vw, calc(-50% - 12vh)) scale(0.6) rotate(7deg); }
  28%  { transform: translate(28vw, calc(-50% + 11vh)) scale(1.1) rotate(-8deg); }
  40%  { transform: translate(44vw, calc(-50% - 15vh)) scale(1.9) rotate(6deg); }
  52%  { transform: translate(58vw, calc(-50% + 9vh)) scale(2.9) rotate(-7deg); }
  64%  { transform: translate(73vw, calc(-50% - 11vh)) scale(4) rotate(8deg); }
  76%  { transform: translate(89vw, calc(-50% + 7vh)) scale(5.3) rotate(-6deg); }
  88%  { transform: translate(106vw, calc(-50% - 6vh)) scale(6.6) rotate(5deg); opacity: 1; }
  100% { transform: translate(132vw, calc(-50% + 3vh)) scale(7.8) rotate(-3deg); opacity: 0; }
}
@keyframes hk-intro-sail {
  from { transform: skewX(0deg); }
  to { transform: skewX(-6deg); }
}
@keyframes hk-intro-ball {
  0% { transform: scale(0.1) rotate(0deg); opacity: 0; left: 86%; top: 88%; }
  12% { opacity: 1; }
  42% { transform: scale(1.5) rotate(440deg); opacity: 1; left: 50%; top: 50%; }
  56% { transform: scale(12) rotate(540deg); opacity: 1; left: 50%; top: 50%; }
  86% { transform: scale(13.5) rotate(600deg); opacity: 1; left: 50%; top: 50%; }
  100% { transform: scale(15) rotate(620deg); opacity: 0; left: 50%; top: 50%; }
}
@keyframes hk-intro-crack {
  0% { transform: translate(-50%, -50%) scale(0) rotate(-10deg); opacity: 0; }
  10% { transform: translate(-50%, -50%) scale(1.14) rotate(2deg); opacity: 1; }
  20% { transform: translate(-50%, -50%) scale(0.97) rotate(0deg); opacity: 1; }
  28% { transform: translate(-50%, -50%) scale(1) rotate(0deg); opacity: 1; }
  68% { opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1.04) rotate(0deg); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .hk-summer-intro { display: none !important; }
}
