/* ============================================================
   CHD CONSTRUCCIONES - BASE DEL NUEVO DISEÑO
   Compartido por las páginas rediseñadas (body.chd). Las páginas
   que aún usan el diseño anterior no cargan este archivo.

   Sistema
   - Tema: claro u oscuro para toda la página. Por defecto sigue
     al sistema; el selector del header guarda la elección en
     localStorage ('chd-tema') y la aplica como html[data-theme].
   - Neutros: grises con tinte verde (familia del chevrón gris del logo).
   - Acento único: verde CHD (#4C8900 en claro, #8DBB1D en oscuro).
     --h-danger solo para errores de formularios.
   - Tipografía: Geist (auto-alojada), una sola familia.
   - Radios: controles 6px, medios y paneles 12px.
   - Capas (z-index): contenido 1-2, header 1000 (estilo.css),
     chatbot 900/950, modal 2500, skip-link 3000, visor 3500, telón 4000.
   - Header: sólido por defecto. body.chd--overlay-header lo vuelve
     transparente sobre una foto hasta que se hace scroll.
   - Movimiento: [data-reveal] con IntersectionObserver (chd-base.js).
     Todo se desactiva con prefers-reduced-motion.
   ============================================================ */

@font-face {
  font-family: 'Geist';
  src: url('../fonts/geist/Geist-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ── Tokens: tema claro ── */
:root {
  color-scheme: light;
  --h-bg:           #F5F6F3;
  --h-surface:      #FBFBFA;
  --h-tint:         #ECEEE9;
  --h-line:         #DDE1DA;
  --h-line-strong:  #C4CAC1;
  --h-heading:      #0E1B14;
  --h-text:         #2E3630;
  --h-muted:        #5F6760;
  --h-accent:       #4C8900;
  --h-accent-text:  #3A6A00;
  --h-danger:       #9F2F2D;
  --h-btn-bg:       #0E1B14;
  --h-btn-bg-hover: #1D2E23;
  --h-btn-fg:       #FAFAF8;
  --h-on-photo:     #FAFAF8;
  --h-selection:    #D6E6B8;
  --h-shadow:       14, 27, 20;
  --h-header-solid: rgba(251, 251, 250, 0.9);
  --h-photo-filter: saturate(0.92) contrast(1.02);
  --h-logo-filter:  grayscale(1) contrast(1.1);
  --h-logo-blend:   multiply;
  /* Logo visible sobre superficies del tema (header sólido y telón) */
  --h-show-logo-white: none;
  --h-show-logo-dark:  block;
}

/* ── Tokens: tema oscuro (sistema, salvo que se elija claro) ── */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --h-bg:           #0C120E;
    --h-surface:      #121A15;
    --h-tint:         #17211B;
    --h-line:         #243029;
    --h-line-strong:  #34423A;
    --h-heading:      #EEF1EC;
    --h-text:         #C7CEC6;
    --h-muted:        #939C94;
    --h-accent:       #8DBB1D;
    --h-accent-text:  #A6CF45;
    --h-danger:       #F2A09A;
    --h-btn-bg:       #EEF1EC;
    --h-btn-bg-hover: #D5DBD3;
    --h-btn-fg:       #0C120E;
    --h-selection:    #3A5214;
    --h-shadow:       0, 0, 0;
    --h-header-solid: rgba(12, 18, 14, 0.88);
    --h-photo-filter: saturate(0.9) brightness(0.94);
    --h-logo-filter:  grayscale(1) invert(1) contrast(1.1);
    --h-logo-blend:   screen;
    --h-show-logo-white: block;
    --h-show-logo-dark:  none;
  }
}

/* ── Tokens: tema oscuro elegido manualmente ── */
:root[data-theme="dark"] {
  color-scheme: dark;
  --h-bg:           #0C120E;
  --h-surface:      #121A15;
  --h-tint:         #17211B;
  --h-line:         #243029;
  --h-line-strong:  #34423A;
  --h-heading:      #EEF1EC;
  --h-text:         #C7CEC6;
  --h-muted:        #939C94;
  --h-accent:       #8DBB1D;
  --h-accent-text:  #A6CF45;
  --h-danger:       #F2A09A;
  --h-btn-bg:       #EEF1EC;
  --h-btn-bg-hover: #D5DBD3;
  --h-btn-fg:       #0C120E;
  --h-selection:    #3A5214;
  --h-shadow:       0, 0, 0;
  --h-header-solid: rgba(12, 18, 14, 0.88);
  --h-photo-filter: saturate(0.9) brightness(0.94);
  --h-logo-filter:  grayscale(1) invert(1) contrast(1.1);
  --h-logo-blend:   screen;
  --h-show-logo-white: block;
  --h-show-logo-dark:  none;
}

:root {
  --h-font: 'Geist', 'Helvetica Neue', Arial, sans-serif;
  --h-wrap:      1280px;
  --h-wrap-wide: 1440px;
  --h-gutter:    clamp(20px, 5vw, 64px);
  --h-header-h:  76px;
  --h-space-t:   clamp(88px, 11vw, 152px);
  --h-space-b:   clamp(96px, 12vw, 168px);
  --h-r-control: 6px;
  --h-r-media:   12px;
  --h-ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --h-ease-curtain: cubic-bezier(0.76, 0, 0.24, 1);
  --h-intro:     1.05s;
  scroll-padding-top: 96px;
  scrollbar-color: var(--h-line-strong) var(--h-bg);
}

.intro-seen { --h-intro: 0s; }

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--h-bg); }
::-webkit-scrollbar-thumb { background: var(--h-line-strong); border-radius: 8px; }

.chd {
  background: var(--h-bg);
  color: var(--h-text);
  font-family: var(--h-font);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  transition: background-color 0.3s, color 0.3s;
}
.chd ::selection { background: var(--h-selection); color: var(--h-heading); }
.chd :focus-visible { outline: 2px solid var(--h-accent); outline-offset: 3px; }

/* ── Utilidades ── */
.ch-wrap {
  max-width: var(--h-wrap);
  margin: 0 auto;
  padding-inline: var(--h-gutter);
}

.ch-h2 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.035em;
  color: var(--h-heading);
  text-wrap: balance;
}
.ch-accent { color: var(--h-accent); }

.ch-lead {
  font-size: clamp(1.0625rem, 1.2vw, 1.1875rem);
  line-height: 1.65;
  color: var(--h-text);
  max-width: 60ch;
  text-wrap: pretty;
}

.ch-photo { filter: var(--h-photo-filter); }

.ch-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.ch-skip {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 3000;
  background: var(--h-btn-bg);
  color: var(--h-btn-fg);
  padding: 10px 16px;
  border-radius: var(--h-r-control);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: top 0.2s;
}
.ch-skip:focus { top: 16px; }

/* ── Botones y enlaces ── */
.ch-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  padding: 0 24px;
  border: 1px solid var(--h-btn-bg);
  border-radius: var(--h-r-control);
  background: var(--h-btn-bg);
  color: var(--h-btn-fg);
  font-family: var(--h-font);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.25s var(--h-ease-out), border-color 0.25s var(--h-ease-out), transform 0.15s;
}
.ch-btn i { font-size: 13px; transition: transform 0.3s var(--h-ease-out); }
.ch-btn:hover { background: var(--h-btn-bg-hover); border-color: var(--h-btn-bg-hover); }
.ch-btn:hover i { transform: translateX(3px); }
.ch-btn:active { transform: scale(0.98); }

.ch-btn--on-photo {
  background: var(--h-on-photo);
  border-color: var(--h-on-photo);
  color: #0E1B14;
}
.ch-btn--on-photo:hover { background: #E6E9E3; border-color: #E6E9E3; }
.ch-btn--on-photo:hover i { transform: translateY(2px); }

.ch-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 500;
  color: var(--h-heading);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
  transition: color 0.2s, text-underline-offset 0.2s;
}
.ch-link:hover { color: var(--h-accent-text); text-underline-offset: 4px; }
.ch-link i { font-size: 14px; }

/* ══════════════════════════════════════════
   HEADER
   Sólido por defecto con el color del tema y el logo que
   corresponde (texto negro en claro, texto blanco en oscuro).
   Con body.chd--overlay-header es transparente sobre la foto
   hasta que chd-base.js le agrega .is-solid al hacer scroll.
══════════════════════════════════════════ */
.chd .contenedor-header {
  --hd-fg:      var(--h-heading);
  --hd-fg-soft: var(--h-muted);
  --hd-line:    var(--h-line);
  background: var(--h-header-solid);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid var(--hd-line);
  transition: background 0.35s, border-color 0.35s;
}
.chd--overlay-header .contenedor-header:not(.is-solid):not(:has(nav.responsive)) {
  --hd-fg:      var(--h-on-photo);
  --hd-fg-soft: rgba(250, 250, 248, 0.8);
  --hd-line:    rgba(250, 250, 248, 0.16);
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.chd .contenedor-header header { max-width: var(--h-wrap-wide); padding: 0 var(--h-gutter); }

.chd .contenedor-header .logo a { display: block; }
.chd .contenedor-header .logo img { filter: none; }
.chd .contenedor-header .logo img:not(.logo-oscuro) { display: var(--h-show-logo-white); }
.chd .contenedor-header .logo .logo-oscuro { display: var(--h-show-logo-dark); }
.chd--overlay-header .contenedor-header:not(.is-solid):not(:has(nav.responsive)) .logo img:not(.logo-oscuro) { display: block; }
.chd--overlay-header .contenedor-header:not(.is-solid):not(:has(nav.responsive)) .logo .logo-oscuro { display: none; }

.chd .contenedor-header nav a {
  font-family: var(--h-font);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--hd-fg-soft);
  padding: 8px 12px;
}
.chd .contenedor-header nav a::after {
  background: var(--hd-fg);
  height: 1px;
  bottom: 3px;
}
.chd .contenedor-header nav a:hover { color: var(--hd-fg); background: transparent; }
.chd .contenedor-header nav a:hover::after { width: 18px; }
.chd .contenedor-header nav a[aria-current="page"] { color: var(--hd-fg); }
.chd .contenedor-header nav a[aria-current="page"]::after { width: 18px; }

.chd .contenedor-header .info-contacto a {
  font-family: var(--h-font);
  font-size: 13px;
  letter-spacing: 0;
  color: var(--hd-fg-soft);
}
.chd .contenedor-header .info-contacto a:hover { color: var(--hd-fg); }
.chd .hamburger span { background: var(--hd-fg); height: 2px; }
.chd #page-overlay { background: rgba(14, 27, 20, 0.45); backdrop-filter: blur(4px); }

/* ── Selector de tema ── */
.theme-switch { position: relative; }
.theme-switch__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--hd-line);
  border-radius: var(--h-r-control);
  background: transparent;
  color: var(--hd-fg);
  font-family: var(--h-font);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.theme-switch__btn:hover { border-color: var(--hd-fg-soft); }
.theme-switch__btn:active { transform: scale(0.98); }
.theme-switch__caret { font-size: 10px; transition: transform 0.25s var(--h-ease-out); }
.theme-switch__btn[aria-expanded="true"] .theme-switch__caret { transform: rotate(180deg); }

.theme-switch__menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 184px;
  padding: 6px;
  display: grid;
  gap: 2px;
  background: var(--h-surface);
  border: 1px solid var(--h-line);
  border-radius: var(--h-r-media);
  box-shadow: 0 16px 40px rgba(var(--h-shadow), 0.1);
  animation: menuIn 0.2s var(--h-ease-out) both;
}
.theme-switch__menu[hidden] { display: none; }
@keyframes menuIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.theme-switch__menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--h-r-control);
  background: transparent;
  color: var(--h-text);
  font-family: var(--h-font);
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.theme-switch__menu button > i:first-child { width: 16px; font-size: 14px; color: var(--h-muted); }
.theme-switch__menu button:hover,
.theme-switch__menu button:focus-visible { background: var(--h-tint); color: var(--h-heading); outline: none; }
.theme-switch__menu button[aria-checked="true"] { color: var(--h-heading); }
.theme-switch__check { margin-left: auto; font-size: 12px; color: var(--h-accent); visibility: hidden; }
.theme-switch__menu button[aria-checked="true"] .theme-switch__check { visibility: visible; }

/* ══════════════════════════════════════════
   BLOQUE DE CONTACTO (cierre de página)
══════════════════════════════════════════ */
.ch-cta {
  margin-top: var(--h-space-t);
  background: var(--h-tint);
  padding-block: var(--h-space-t) var(--h-space-b);
  transition: background-color 0.3s;
}
.ch-cta .ch-h2 {
  font-size: clamp(2.25rem, 5.4vw, 4.5rem);
  letter-spacing: -0.045em;
  max-width: 16ch;
}
.ch-cta .ch-lead { margin-top: 24px; max-width: 48ch; }
.ch-cta__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px 36px;
  margin-top: 44px;
}
.ch-cta__channels {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
}
.ch-cta__channels .ch-link { font-variant-numeric: tabular-nums; }
.ch-cta__channels i { color: var(--h-accent-text); }

/* ══════════════════════════════════════════
   TARJETA DE PAQUETE (templates/tarjeta-paquete.php)
   La usan el listado de paquetes y "Otros paquetes" en la ficha.
══════════════════════════════════════════ */
/* Tarjeta: superficie apenas distinta al fondo, borde fino y
   elevación muy leve al pasar el cursor (mismo lenguaje que los tipos) */
.pq-card { height: 100%; }
.pq-card__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 10px;
  border: 1px solid var(--h-line);
  border-radius: var(--h-r-media);
  background: var(--h-surface);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.25s, box-shadow 0.3s, transform 0.3s var(--h-ease-out), background-color 0.3s;
}
.pq-card__link:hover {
  border-color: var(--h-line-strong);
  box-shadow: 0 14px 34px rgba(var(--h-shadow), 0.06);
  transform: translateY(-3px);
}
.pq-card__link:active { transform: translateY(-1px) scale(0.995); }
.pq-card__link:focus-visible { outline: 2px solid var(--h-accent); outline-offset: 3px; }

.pq-card__media {
  display: block;
  aspect-ratio: 4 / 3;
  border-radius: var(--h-r-control);
  background: var(--h-tint);
}
/* El telón de la foto usa el color de la tarjeta, no el del fondo */
.js .chd .pq-card[data-reveal="media"] .ch-media::after { background: var(--h-surface); }
.pq-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.9s var(--h-ease-out);
}
.pq-card__link:hover .pq-card__media img,
.js .chd .pq-card[data-reveal="media"].is-visible .pq-card__link:hover .ch-media img {
  transform: scale(1.03);
  transition-delay: 0s;
}

.pq-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px 14px 14px;
}
.pq-card__type {
  font-size: 14px;
  font-weight: 500;
  color: var(--h-accent-text);
}
.pq-card__title {
  font-size: clamp(1.5rem, 2.2vw, 1.875rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--h-heading);
  text-wrap: balance;
}
.pq-card__specs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 2px;
  font-size: 15px;
  color: var(--h-text);
}
.pq-card__specs span { display: inline-flex; align-items: center; gap: 8px; }
.pq-card__specs i { width: 16px; font-size: 13px; color: var(--h-muted); text-align: center; }

.pq-card__foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--h-line);
}
.pq-card__price { display: flex; flex-direction: column; gap: 2px; }
.pq-card__price small { font-size: 13px; color: var(--h-muted); }
.pq-card__price strong {
  font-size: clamp(1.375rem, 2vw, 1.75rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
  color: var(--h-heading);
}
.pq-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 4px;
  font-size: 15px;
  font-weight: 500;
  color: var(--h-heading);
  white-space: nowrap;
}
.pq-card__cta i { font-size: 13px; transition: transform 0.3s var(--h-ease-out); }
.pq-card__link:hover .pq-card__cta i { transform: translateX(4px); }
.pq-card__link:hover .pq-card__title { color: var(--h-heading); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; }

/* Texto de la tarjeta aparece tras descubrirse la foto */
.js .chd .pq-card[data-reveal="media"] .pq-card__body {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.6s var(--h-ease-out), transform 0.6s var(--h-ease-out);
  transition-delay: calc(var(--i, 0) * 90ms + 400ms);
}
.js .chd .pq-card[data-reveal="media"].is-visible .pq-card__body { opacity: 1; transform: none; }

@media (max-width: 768px) {
  .pq-card__title { font-size: 1.5rem; }
}
@media (max-width: 560px) {
  .pq-card__foot { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  .js .chd .pq-card[data-reveal="media"] .pq-card__body { opacity: 1; transform: none; }
}

/* ══════════════════════════════════════════
   CHATBOT
══════════════════════════════════════════ */
.chd .chatbot-button {
  bottom: 24px !important;
  right: 24px !important;
  width: auto !important;
  background: var(--h-btn-bg) !important;
  color: var(--h-btn-fg) !important;
  border: 0 !important;
  border-radius: var(--h-r-control) !important;
  font-family: var(--h-font) !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  padding: 14px 20px !important;
  box-shadow: 0 12px 32px rgba(var(--h-shadow), 0.18) !important;
  z-index: 900;
}
.chd .chatbot-button i { margin-right: 4px; }
.chd .chatbot-button:hover {
  background: var(--h-btn-bg-hover) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 14px 36px rgba(var(--h-shadow), 0.2) !important;
}
.chd .chatbot-button:active { transform: scale(0.98) !important; }

.chd .chatbot-window {
  bottom: 84px;
  right: 24px;
  width: min(360px, calc(100vw - 32px));
  background: var(--h-surface) !important;
  border: 1px solid var(--h-line) !important;
  border-radius: var(--h-r-media) !important;
  box-shadow: 0 24px 60px rgba(var(--h-shadow), 0.12) !important;
  z-index: 950;
}
.chd .chatbot-header {
  background: var(--h-bg) !important;
  color: var(--h-heading);
  border-bottom: 1px solid var(--h-line) !important;
  border-radius: 0;
  padding: 16px 20px !important;
}
.chd .chatbot-header h4 {
  font-family: var(--h-font) !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  line-height: 1.3;
  color: var(--h-heading) !important;
}
.chatbot-status {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  font-weight: 400;
  color: var(--h-muted);
}
.chd #close-chatbot {
  width: 36px;
  height: 36px;
  border-radius: var(--h-r-control);
  color: var(--h-heading);
  font-size: 15px;
  transition: background 0.2s;
}
.chd #close-chatbot:hover { background: var(--h-tint); }

.chd .chatbot-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 8px;
  padding: 16px;
}
.chd #chatbot-messages {
  grid-column: 1 / -1;
  min-height: 160px;
  max-height: 300px;
  margin: 0 0 4px;
  padding: 12px;
  background: var(--h-bg);
  border-radius: var(--h-r-control);
}
.chd .chatbot-body input {
  height: 44px;
  margin: 0;
  padding: 0 14px;
  border: 1px solid var(--h-line);
  border-radius: var(--h-r-control);
  background: var(--h-surface);
  color: var(--h-heading);
  font-family: var(--h-font);
  font-size: 15px;
}
.chd .chatbot-body input::placeholder { color: var(--h-muted); }
.chd .chatbot-body input:focus-visible { outline-offset: 0; }
.chd .chatbot-body button#send-button {
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border-radius: var(--h-r-control);
  background: var(--h-btn-bg);
  transition: background 0.2s;
}
.chd .chatbot-body button#send-button i { color: var(--h-btn-fg) !important; }
.chd .chatbot-body button#send-button:hover { background: var(--h-btn-bg-hover); }

.chd .user-message p,
.chd .bot-message p {
  font-size: 14px;
  line-height: 1.5;
  max-width: 80%;
  border-radius: var(--h-r-control);
}
.chd .user-message p { background: var(--h-btn-bg); color: var(--h-btn-fg); }
.chd .bot-message p { background: var(--h-surface); color: var(--h-heading); border: 1px solid var(--h-line); }

/* ══════════════════════════════════════════
   FOOTER (sigue el tema de la página, sin tocar templates/footer.php)
══════════════════════════════════════════ */
body.chd footer {
  background: var(--h-bg) !important;
  border-top: 1px solid var(--h-line);
  transition: background-color 0.3s;
}
.chd footer .footer-brand .footer-logo {
  font-family: var(--h-font);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--h-heading);
}
.chd footer .footer-brand p,
.chd footer .footer-links a,
.chd footer .footer-contact-item a,
.chd footer .footer-contact-item span {
  font-family: var(--h-font);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--h-muted);
}
.chd footer .footer-links a:hover,
.chd footer .footer-contact-item a:hover { color: var(--h-heading); }
.chd footer .footer-col-title {
  font-family: var(--h-font);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--h-heading);
}
.chd footer .footer-col-title::before { display: none; }
.chd footer .footer-contact-item i { color: var(--h-accent-text); }
.chd footer .footer-bottom { border-top-color: var(--h-line); }
.chd footer .footer-bottom p {
  font-family: var(--h-font);
  font-size: 13px;
  letter-spacing: 0;
  color: var(--h-muted);
}
.chd footer .footer-bottom .footer-socials a {
  border-color: var(--h-line);
  border-radius: var(--h-r-control);
  color: var(--h-heading);
}
.chd footer .footer-bottom .footer-socials a:hover {
  background: var(--h-btn-bg);
  border-color: var(--h-btn-bg);
  color: var(--h-btn-fg);
}

/* ══════════════════════════════════════════
   APARICIÓN AL ENTRAR EN PANTALLA (ver chd-base.js)
   - [data-reveal]         aparece subiendo levemente
   - [data-reveal="words"] el título se revela palabra por palabra
   - [data-reveal="media"] + .ch-media: la imagen se descubre como telón
══════════════════════════════════════════ */
.js .chd [data-reveal=""] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s var(--h-ease-out), transform 0.7s var(--h-ease-out);
  transition-delay: calc(var(--i, 0) * 80ms);
}
.js .chd [data-reveal=""].is-visible { opacity: 1; transform: none; }

.ch-w {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-bottom: 0.12em;
  margin-bottom: -0.12em;
}
.ch-wi { display: inline-block; }
.js .chd .is-split .ch-wi {
  transform: translateY(110%);
  transition: transform 0.9s var(--h-ease-out);
  transition-delay: calc(var(--w, 0) * 70ms);
}
.js .chd .is-split.is-visible .ch-wi { transform: none; }

.ch-media { position: relative; overflow: hidden; }
.js .chd [data-reveal="media"] .ch-media::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: var(--h-bg);
  transform-origin: top;
  transition: transform 1.1s var(--h-ease-curtain);
  transition-delay: calc(var(--i, 0) * 90ms);
  pointer-events: none;
}
.js .chd [data-reveal="media"].is-visible .ch-media::after { transform: scaleY(0); }
.js .chd [data-reveal="media"] .ch-media img {
  transform: scale(1.12);
  transition: transform 1.4s var(--h-ease-out);
  transition-delay: calc(var(--i, 0) * 90ms);
}
.js .chd [data-reveal="media"].is-visible .ch-media img { transform: none; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ══════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════ */
@media (max-width: 1100px) {
  .chd .contenedor-header .info-contacto .numero-telefono { display: none; }
}

@media (max-width: 768px) {
  /* Menú móvil (se abre con toggleMenu() de script.js) */
  .chd .contenedor-header nav {
    background: var(--h-surface);
    border-bottom: 1px solid var(--h-line);
    padding: 12px 0 20px;
  }
  .chd .contenedor-header nav a {
    font-size: 18px;
    color: var(--h-heading);
    padding: 14px var(--h-gutter);
    text-align: left;
  }
  .chd .contenedor-header nav a:hover,
  .chd .contenedor-header nav a[aria-current="page"] { color: var(--h-heading); }
  .chd .contenedor-header nav a::after {
    background: var(--h-accent);
    left: var(--h-gutter);
    transform: none;
    bottom: 8px;
  }
  .chd .contenedor-header .info-contacto { order: 2; margin-left: auto; gap: 14px; }
  .chd .nav-responsive { order: 3; margin-left: 16px; }

  .theme-switch__btn { width: 36px; padding: 0; justify-content: center; }
  .theme-switch__label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .theme-switch__caret { display: none; }

  .chd .chatbot-button { bottom: 16px !important; right: 16px !important; padding: 12px 16px !important; }
  .chd .chatbot-window { bottom: 72px; right: 16px; }
}

@media (max-width: 560px) {
  .ch-cta__actions { flex-direction: column; align-items: flex-start; }
  .ch-cta__channels { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  .chd *,
  .chd *::before,
  .chd *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
  .js .chd [data-reveal=""] { opacity: 1; transform: none; }
  .js .chd [data-reveal="media"] .ch-media::after { display: none; }
  :root { scroll-behavior: auto; }
}
