/* ==========================================================================
   COMPONENTS — Reusable patterns across pages
   Design System: Tokens -> Layout -> Components -> Pages
   ========================================================================== */

/* --- wpautop fix: hide empty <p> and <br> inside shortcode components --- */
.gallery-airbnb > p,
.gallery-airbnb > br,
.gallery-airbnb__grid > p,
.gallery-airbnb__grid > br,
.sedes-grid > p,
.sedes-grid > br,
.sede-card > p:empty,
.agent-card > p:empty {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  height: 0 !important;
  line-height: 0 !important;
}

/* ==========================================================================
   1. DARK HERO (.dhero)
   Full-width hero on dark primary background with subtle gradients.
   ========================================================================== */

.dhero {
  background:
    radial-gradient(ellipse 70% 55% at 80% 40%, rgba(var(--color-accent), 0.05) 0%, transparent 70%),
    var(--color-primary);
  padding: var(--space-xl) var(--space-s) var(--space-2xl);
  text-align: center;
  position: relative;
}

.dhero__inner {
  max-width: 800px;
  margin: 0 auto;
}

.dhero__badge {
  display: inline-block;
  padding: 6px 18px;
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-accent);
  background: var(--white-8);
  border: 1px solid var(--white-12);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-s);
}

.dhero__title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
  margin: 0 0 var(--space-s) 0;
  text-wrap: balance;
}

.dhero__highlight {
  color: var(--color-accent);
}

.dhero__subtitle {
  font-size: var(--text-l);
  color: var(--white-72);
  line-height: 1.6;
  margin: 0 auto;
  max-width: 600px;
}

.dhero__actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: var(--space-m);
}

.dhero__btn {
  display: inline-flex;
  align-items: center;
  font-size: var(--text-m);
  font-weight: 600;
  padding: 14px 32px;
  border-radius: var(--radius-m);
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.dhero__btn--primary {
  background: var(--color-accent);
  color: var(--color-primary);
}
.dhero__btn--primary:hover {
  transform: translateY(-2px);
}

.dhero__btn--secondary {
  background: var(--white-8);
  color: #fff;
  border: 1px solid var(--white-18);
}
.dhero__btn--secondary:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.dhero__meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: var(--space-s);
  font-size: var(--text-s);
  color: var(--white-50);
}

.dhero__tags {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: var(--space-s);
}

.dhero__tag {
  display: inline-block;
  padding: 4px 14px;
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--white-72);
  background: var(--white-8);
  border: 1px solid var(--white-12);
  border-radius: var(--radius-full);
}

@media (max-width: 768px) {
  .dhero {
    padding: var(--space-l) var(--space-xs) var(--space-xl);
  }
  .dhero__title {
    font-size: clamp(1.75rem, 6vw, 2.5rem);
  }
  .dhero__actions {
    flex-direction: column;
    align-items: center;
  }
  .dhero__btn {
    width: 100%;
    max-width: 320px;
    justify-content: center;
  }
}

/* ==========================================================================
   2. BADGE PILL (.badge-pill)
   ========================================================================== */

.badge-pill {
  display: inline-block;
  padding: 6px 18px;
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-primary);
  background: rgba(var(--color-accent), 0.15);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-xs);
}

/* ==========================================================================
   3. CTA SECTION (.cta-section)
   ========================================================================== */

.cta-section {
  position: relative;
  background: var(--color-primary);
  padding: var(--space-2xl) var(--space-s);
  text-align: center;
}

.cta-section__inner {
  max-width: 700px;
  margin: 0 auto;
}

.cta-section__title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.15;
  margin: 0 0 var(--space-xs) 0;
  text-wrap: balance;
}

.cta-section__subtitle {
  font-size: var(--text-l);
  color: var(--white-72);
  line-height: 1.6;
  margin: 0 0 var(--space-m) 0;
  max-width: 550px;
  margin-left: auto;
  margin-right: auto;
}

/* ==========================================================================
   4. CTA BUTTONS (.cta-btn)
   ========================================================================== */

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 36px;
  font-size: var(--text-m);
  font-weight: 700;
  color: var(--color-primary);
  background: var(--color-accent);
  border-radius: var(--radius-m);
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.cta-btn:hover {
  transform: translateY(-2px);
}

.cta-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  flex-shrink: 0;
}

/* Primary: accent bg on dark backgrounds */
.cta-btn--primary {
  background: var(--color-accent);
  color: var(--color-primary);
  border: none;
}

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

/* Secondary: ghost on dark backgrounds */
.cta-btn--secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-white);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.cta-btn--secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Dark: solid dark on light backgrounds */
.cta-btn--dark {
  background: var(--color-secondary);
  color: var(--color-white);
  border: none;
}

.cta-btn--dark:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

/* Outline: bordered on light backgrounds */
.cta-btn--outline {
  background: transparent;
  color: var(--color-secondary);
  border: 2px solid var(--color-secondary);
}

.cta-btn--outline:hover {
  background: var(--color-secondary);
  color: var(--color-white);
}

/* Full width modifier */
.cta-btn--full {
  width: 100%;
  justify-content: center;
}

/* ==========================================================================
   5. SECTION INNER (.section-inner)
   ========================================================================== */

.section-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-s);
}

.section-inner--narrow {
  max-width: 800px;
}

/* ==========================================================================
   6. SECTION HEADER (.section-header)
   ========================================================================== */

.section-header {
  margin-bottom: var(--space-l);
}

.section-header--center {
  text-align: center;
}

.section-header__title {
  font-size: var(--text-4xl);
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.15;
  margin: 0 0 var(--space-xs) 0;
  text-wrap: balance;
}

.section-header__highlight {
  color: var(--color-accent);
}

.section-header__subtitle {
  font-size: var(--text-l);
  color: var(--color-text-light);
  line-height: 1.6;
  margin: 0;
  max-width: 600px;
}

.section-header--center .section-header__subtitle {
  margin-left: auto;
  margin-right: auto;
}

/* ==========================================================================
   7. CARD HOVER (.card-hover)
   ========================================================================== */

.card-hover {
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-m);
}

/* ==========================================================================
   8. CURVE TRANSITION (.curve-after)
   ========================================================================== */

.curve-after {
  position: absolute;
  top: -1px;
  left: 0;
  width: 100%;
  height: 40px;
  clip-path: ellipse(55% 100% at 50% 0%);
}

.curve-after--primary {
  background: var(--color-primary);
}

.curve-after--white {
  background: var(--color-bg);
}

/* ==========================================================================
   9. SERVICIO CARD (.servicio-card)
   ========================================================================== */

.servicios-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-m);
}

.servicio-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 32px 28px;
  background-color: var(--color-bg);
  border-radius: var(--radius-m);
  border: 1px solid rgba(0, 0, 0, 0.06);
  text-decoration: none;
  color: inherit;
  transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}
.servicio-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
  border-color: transparent;
}
.servicios-grid:has(.servicio-card:hover) .servicio-card:not(:hover) {
  opacity: 0.4;
  transform: scale(0.97);
}

.servicio-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-s);
}

.servicio-card__icono {
  font-size: var(--text-2xl);
  line-height: 1;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-muted);
  border-radius: var(--radius-m);
  transition: all 0.3s;
}
.servicio-card:hover .servicio-card__icono {
  background-color: var(--color-primary);
}

.servicio-card__titulo {
  display: block;
  font-size: var(--text-l);
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.3;
  margin: 0;
}

.servicio-card__desc {
  font-size: var(--text-s);
  color: var(--color-text-light);
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 767px) {
  .servicios-grid {
    grid-template-columns: 1fr;
    gap: var(--space-s);
  }
}

/* ==========================================================================
   10. blockGap RESET — global :where() selector
   Kills WordPress auto-generated blockGap margin on named sections.
   ========================================================================== */

.is-layout-flow > :where(
  [class*="-section"],
  [class*="-page"],
  [class*="-archive"],
  [class*="-landing"],
  [class*="-hero"],
  [class*="-cta"],
  .site-footer,
  .dhero,
  .wp-block-cover
) {
  margin-block: 0 !important;
}

/* ==========================================================================
   AGENT CARD — CTA de contacto con comercial
   ========================================================================== */
.agent-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-l);
  padding: var(--space-m);
  max-width: 420px;
}

.agent-card__header {
  display: flex;
  align-items: center;
  gap: var(--space-s);
  margin-bottom: var(--space-m);
}

.agent-card__photo {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-full);
  object-fit: cover;
  flex-shrink: 0;
}

.agent-card__avatar {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-full);
  background: var(--color-secondary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.agent-card__info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.agent-card__name {
  font-size: var(--text-l);
  font-weight: 700;
  color: var(--color-foreground);
}

.agent-card__role {
  font-size: var(--text-s);
  color: var(--color-foreground-light);
}

.agent-card__location {
  font-size: var(--text-xs);
  color: var(--color-foreground-light);
  font-weight: 500;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.agent-card__location:hover {
  color: var(--color-primary);
}

.agent-card__actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
}

.agent-card__wa {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2xs);
  padding: var(--space-xs) var(--space-m);
  background: #25D366;
  color: #fff;
  font-size: var(--text-m);
  font-weight: 700;
  text-decoration: none;
  border-radius: var(--radius-m);
  transition: background var(--transition-fast);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.agent-card__wa:hover {
  background: #1da851;
}

.agent-card__email {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3xs);
  padding: var(--space-3xs) var(--space-m);
  color: var(--color-foreground-light);
  font-size: var(--text-s);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.agent-card__email:hover {
  color: var(--color-foreground);
}

/* Multiple agents side by side */
.agent-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-m);
}

/* ==========================================================================
   SEDES GRID + SEDE CARD — Reutilizable en home, single-location, archive
   ========================================================================== */
.sedes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-l);
}

.sede-card {
  background: var(--color-white, #fff);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-l);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--transition-base), border-color var(--transition-base);
}

.sede-card:hover {
  box-shadow: var(--shadow-l);
  border-color: var(--color-primary);
}

.sede-card__image {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.sede-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.sede-card:hover .sede-card__img {
  transform: scale(1.05);
}

.sede-card__body {
  padding: var(--space-m);
  display: flex;
  flex-direction: column;
  gap: var(--space-s);
  flex: 1;
}

.sede-card__header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-3xs);
  padding: var(--space-m) var(--space-m) var(--space-s);
  border-bottom: 1px solid var(--color-border);
}

.sede-card__title {
  font-size: var(--text-2xl) !important;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin: 0 !important;
}

.sede-card__title a {
  color: var(--color-secondary);
  text-decoration: none;
}

.sede-card__title a:hover {
  color: var(--color-primary);
}

.sede-card__description {
  font-size: var(--text-s);
  color: var(--color-foreground-light);
  line-height: 1.5;
  margin: 0;
}

.sede-card__info {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
}

.sede-card__address,
.sede-card__phone {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: var(--text-s);
  color: var(--color-foreground);
  line-height: 1.5;
}

.sede-card__address svg,
.sede-card__phone svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--color-primary);
}

.sede-card__phone a {
  color: var(--color-foreground);
  text-decoration: none;
  font-weight: 600;
}

.sede-card__phone a:hover {
  color: var(--color-primary);
}

.sede-card__actions {
  display: flex;
  gap: var(--space-xs);
  margin-top: auto;
  padding-top: var(--space-xs);
}

.sede-card__actions .cta-btn {
  flex: 1;
  text-align: center;
  font-size: var(--text-s);
  padding: 10px 16px;
}

/* Horario badge — shared between sede-card and location-detail */
.location-horario {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
}

.location-horario__label {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  background: var(--color-muted);
  color: var(--color-foreground-light);
}

.location-horario--abierto .location-horario__label {
  background: #dcfce7;
  color: #15803d;
}

.location-horario--cerrado .location-horario__label {
  background: #fee2e2;
  color: #b91c1c;
}

.location-horario__detail {
  font-size: var(--text-s);
  font-weight: 400;
  color: var(--color-foreground-light);
  margin-left: var(--space-2xs);
}

/* --- Sedes responsive -------------------------------------------------- */
@media (max-width: 768px) {
  .sedes-grid {
    grid-template-columns: 1fr;
  }

  .sede-card__actions {
    flex-direction: column;
  }
}

/* ==========================================================================
   GALLERY — Airbnb-style grid (1 large + 4 small)
   Reusable: locations, any CPT con galería
   ========================================================================== */
/*
 * GALERÍA AIRBNB
 *
 * BUG CONOCIDO: imágenes con fondo blanco + border-radius del contenedor
 * crea artefacto en esquinas. NO añadir border ni background al contenedor.
 * El ::after con box-shadow inset maneja el borde sutil por celda.
 */
/*
 * GALERÍA AIRBNB
 *
 * Sin overflow:hidden en el contenedor. Cada celda de esquina tiene
 * su propio border-radius + overflow:hidden. Esto evita que el gap
 * desaparezca en las esquinas redondeadas.
 */
.gallery-airbnb {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 4px;
  margin-bottom: var(--space-l);
  aspect-ratio: 16 / 7;
}

.gallery-airbnb__main,
.gallery-airbnb__cell {
  position: relative;
  overflow: hidden;
  border-radius: 0;
}

/* Esquinas redondeadas solo en las celdas exteriores */
.gallery-airbnb__main {
  border-radius: var(--radius-l) 0 0 var(--radius-l);
}

/* Celdas del grid derecho: radius en esquinas exteriores */
.gallery-airbnb__grid .gallery-airbnb__cell {
  border-radius: 0;
}

.gallery-airbnb__grid .gallery-airbnb__cell:nth-child(2) {
  border-radius: 0 var(--radius-l) 0 0;
}

.gallery-airbnb__grid .gallery-airbnb__cell:last-child {
  border-radius: 0 0 var(--radius-l) 0;
}

.gallery-airbnb__main::after,
.gallery-airbnb__cell::after {
  content: '';
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
  pointer-events: none;
  z-index: 1;
  border-radius: inherit;
}


.gallery-airbnb__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 6px;
}

.gallery-airbnb__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: pointer;
  transition: filter var(--transition-fast);
}

.gallery-airbnb__img:hover {
  filter: brightness(0.85);
}

.gallery-airbnb__cell {
  position: relative;
  overflow: hidden;
}

.gallery-airbnb__more {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: #fff;
  color: var(--color-foreground);
  border: 1px solid var(--color-foreground);
  border-radius: var(--radius-m);
  padding: 6px 14px;
  font-size: var(--text-s);
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition-fast);
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.gallery-airbnb__more:hover {
  background: var(--color-surface);
}

/* Simple gallery (< 5 photos) */
.gallery-simple {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 6px;
  border-radius: var(--radius-l);
  overflow: hidden;
  margin-bottom: var(--space-l);
}

.gallery-simple__img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
}

/* ==========================================================================
   LIGHTBOX — Full-screen photo viewer
   ========================================================================== */
.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-lightbox[hidden] {
  display: none;
}

.gallery-lightbox__img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius-m);
}

.gallery-lightbox__close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  color: #fff;
  font-size: 36px;
  cursor: pointer;
  z-index: 2;
  line-height: 1;
  padding: 8px;
}

.gallery-lightbox__prev,
.gallery-lightbox__next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  font-size: 36px;
  cursor: pointer;
  padding: 12px 16px;
  border-radius: var(--radius-m);
  transition: background var(--transition-fast);
  z-index: 2;
}

.gallery-lightbox__prev { left: 16px; }
.gallery-lightbox__next { right: 16px; }

.gallery-lightbox__prev:hover,
.gallery-lightbox__next:hover {
  background: rgba(255, 255, 255, 0.3);
}

.gallery-lightbox__counter {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.7);
  font-size: var(--text-s);
  font-weight: 600;
}

/* --- Gallery responsive ------------------------------------------------ */
@media (max-width: 768px) {
  .gallery-airbnb {
    grid-template-columns: 1fr;
    aspect-ratio: auto;
    gap: 3px;
  }

  .gallery-airbnb__main {
    aspect-ratio: 4 / 3;
    border-radius: var(--radius-m) var(--radius-m) 0 0;
  }

  .gallery-airbnb__grid {
    grid-template-columns: 1fr 1fr;
    gap: 3px;
  }

  .gallery-airbnb__grid .gallery-airbnb__cell {
    aspect-ratio: 4 / 3;
    border-radius: 0;
  }

  .gallery-airbnb__grid .gallery-airbnb__cell:nth-child(2) {
    border-radius: 0;
  }

  .gallery-airbnb__grid .gallery-airbnb__cell:last-child {
    border-radius: 0 0 var(--radius-m) 0;
  }

  .gallery-airbnb__grid .gallery-airbnb__cell:nth-last-child(2) {
    border-radius: 0 0 0 var(--radius-m);
  }

  .gallery-lightbox__prev,
  .gallery-lightbox__next {
    padding: 8px 12px;
    font-size: 28px;
  }
}

/* ==========================================================================
   SERVICIOS GRID + SERVICIO-CARD — Reutilizable en home, sede, archive
   ========================================================================== */

.servicios-grid-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xs);
}

.servicios-grid-cards .servicio-card { aspect-ratio: 16 / 9; }
.servicios-grid-cards:has(.servicio-card:hover) .servicio-card:not(:hover) { opacity: 0.92; }

.servicio-card {
  position: relative;
  display: flex;
  align-items: flex-end;
  border-radius: var(--radius-l);
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  background-color: var(--color-secondary);
  transition: opacity 0.4s ease, filter 0.4s ease;
}

.servicio-card__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.servicio-card--image:hover .servicio-card__img { transform: scale(1.05); }

.servicio-card--image .servicio-card__overlay {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.55) 35%, rgba(0,0,0,0.25) 60%, rgba(0,0,0,0.05) 80%, transparent 100%);
  transition: background 0.4s ease;
}

.servicio-card--image:hover .servicio-card__overlay {
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.6) 40%, rgba(0,0,0,0.35) 70%, rgba(0,0,0,0.2) 100%);
}

.servicio-card--icon { background: var(--color-secondary); }
.servicio-card--icon:hover { background: var(--color-primary); }
.servicio-card__icon { display: none; }

.servicio-card__content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  padding: var(--space-m) var(--space-m) var(--space-l);
  transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.servicio-card__title {
  font-size: var(--text-2xl) !important;
  font-weight: 800;
  color: #fff;
  margin: 0 !important;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.05;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.servicio-card__title::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 0.85em;
  background: var(--color-primary);
  margin-right: 10px;
  vertical-align: middle;
  border-radius: 2px;
  transition: background 0.3s ease;
}

.servicio-card--icon:hover .servicio-card__title::before { background: #fff; }

.servicio-card__excerpt,
.servicio-card__link {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s cubic-bezier(0.23, 1, 0.32, 1), opacity 0.3s ease 0.05s;
}

.servicio-card--image:hover .servicio-card__excerpt,
.servicio-card--image:hover .servicio-card__link { opacity: 1; }
.servicio-card--image:hover .servicio-card__excerpt { max-height: 120px; }
.servicio-card--image:hover .servicio-card__link { max-height: 50px; }

.servicio-card__excerpt {
  font-size: var(--text-s);
  color: rgba(255,255,255,0.8);
  line-height: 1.5;
  margin: var(--space-3xs) 0 0;
  max-width: 400px;
}

.servicio-card--icon .servicio-card__excerpt { color: rgba(255,255,255,0.6); }
.servicio-card--icon:hover .servicio-card__excerpt,
.servicio-card--icon:hover .servicio-card__link { opacity: 1; }
.servicio-card--icon:hover .servicio-card__excerpt { max-height: 120px; }
.servicio-card--icon:hover .servicio-card__link { max-height: 50px; }

.servicio-card__link {
  display: inline-block;
  margin-top: var(--space-xs);
  padding: 6px 0;
  font-size: var(--text-s);
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 2px solid rgba(255,255,255,0.6);
}

.servicio-card__link:hover { border-color: #fff; }

@media (max-width: 768px) {
  .servicios-grid-cards { grid-template-columns: 1fr; }
  .servicios-grid-cards .servicio-card { aspect-ratio: 16 / 9; }
  .servicio-card__excerpt { opacity: 1; transform: translateY(0); }
  .servicio-card__link { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .servicio-card,
  .servicio-card__overlay,
  .servicio-card__title,
  .servicio-card__excerpt,
  .servicio-card__link { transition: none; }
}

/* ==========================================================================
   PAGE BANNER — Dark hero banner for interior pages.
   Branded bg with stripes, continuous with the dark header.
   ========================================================================== */

.page-banner {
  background:
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 40px,
      rgba(255, 255, 255, 0.015) 40px,
      rgba(255, 255, 255, 0.015) 42px
    ),
    linear-gradient(180deg, var(--color-secondary) 0%, var(--color-secondary) 80px, #12151a 100%);
  color: var(--color-white);
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--section-space-m) + var(--header-height)) var(--gutter) var(--section-space-m);
  text-align: center;
}

.page-banner__inner {
  max-width: 768px;
}

.page-banner__badge {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-primary);
  margin-bottom: var(--space-xs);
}

/* Breadcrumb */
.page-banner__breadcrumb {
  margin-bottom: var(--space-xs);
}

.page-banner__breadcrumb-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0;
  font-size: var(--text-xs);
}

.page-banner__breadcrumb-item {
  color: rgba(255, 255, 255, 0.6);
}

.page-banner__breadcrumb-item + .page-banner__breadcrumb-item::before {
  content: "\203A";
  margin-inline: 0.5em;
  color: rgba(255, 255, 255, 0.35);
}

.page-banner__breadcrumb-item a {
  color: inherit;
  text-decoration: none;
}

.page-banner__breadcrumb-item a:hover {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: underline;
}

.page-banner__breadcrumb-item [aria-current="page"] {
  color: rgba(255, 255, 255, 0.9);
}

.page-banner__title {
  font-size: var(--text-5xl);
  font-weight: 800;
  line-height: 1.05;
  color: var(--color-white);
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
  margin: 0;
}

.page-banner__title .highlight {
  color: var(--color-primary);
}

.page-banner__subtitle {
  font-size: var(--text-l);
  color: rgba(255, 255, 255, 0.65);
  margin-top: var(--space-s);
  margin-bottom: 0;
  max-width: 640px;
  margin-inline: auto;
}

@media (max-width: 768px) {
  .page-banner {
    min-height: auto;
    padding: 100px var(--gutter) var(--space-l) !important;
    align-items: flex-start;
  }

  .page-banner__title {
    font-size: var(--text-3xl);
  }

  .page-banner__subtitle {
    font-size: var(--text-m);
  }
}

/* CTA buttons for dark backgrounds (hero, banners) */
.hero__cta {
  font-size: var(--text-m);
  padding: 16px 36px;
  min-width: 220px;
  justify-content: center;
  letter-spacing: 0.03em;
}

.hero__cta--primary {
  background: var(--color-primary);
  color: #fff;
  border: 2px solid var(--color-primary);
}

.hero__cta--primary:hover {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
}

.hero__cta--ghost {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(4px);
}

.hero__cta--ghost:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.7);
}

/* Location variant — info + horario status + CTAs */
.page-banner--location {
  text-align: center;
}

.page-banner__loc-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2xs);
}

.page-banner__loc-status {
  margin-top: var(--space-3xs);
}

.page-banner__loc-address,
.page-banner__loc-phone {
  display: flex;
  align-items: center;
  gap: var(--space-2xs);
  font-size: var(--text-s);
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
}

.page-banner__loc-address svg,
.page-banner__loc-phone svg {
  flex-shrink: 0;
  color: var(--color-primary);
}

.page-banner__loc-phone a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.page-banner__loc-phone a:hover {
  color: var(--color-white);
}

.page-banner__loc-actions {
  display: flex;
  justify-content: center;
  gap: var(--space-s);
  margin-top: var(--space-xs);
}

@media (max-width: 768px) {
  .page-banner__loc-actions {
    flex-direction: column;
  }
}

/* Search bar inside banner (blog archive) */
.page-banner__search {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  max-width: 480px;
  margin: var(--space-m) auto 0;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
  padding: 12px var(--space-xs);
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.page-banner__search:focus-within {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.15);
}

.page-banner__search svg {
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.5);
}

.page-banner__search input {
  flex: 1;
  border: none;
  background: transparent;
  padding: var(--space-3xs) var(--space-xs);
  font-size: var(--text-s);
  font-family: var(--font-primary);
  color: var(--color-white);
  outline: none;
}

.page-banner__search input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.page-banner__search button {
  background: var(--color-primary);
  color: var(--color-white);
  border: none;
  padding: var(--space-3xs) var(--space-s);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition-fast);
}

.page-banner__search button:hover {
  background: var(--color-primary-dark);
}

@media (max-width: 768px) {
  .page-banner {
    min-height: 200px;
    padding: var(--space-xl) var(--gutter);
  }

  .page-banner__title {
    font-size: var(--text-3xl);
  }

  .page-banner__search {
    max-width: 100%;
  }
}

/* ==========================================================================
   SIDEBAR SERVICE CARD — Reusable sidebar card with service rows
   Used in: blog single, location detail
   ========================================================================== */

.sidebar-service-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-l);
  overflow: hidden;
}

.sidebar-service-card__body {
  padding: var(--space-s) var(--space-m);
  display: flex;
  flex-direction: column;
  gap: 0;
}

.sidebar-service-card__body > * {
  margin-block: 0 !important;
}

.sidebar-service-card__label {
  display: block;
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-foreground-light);
  padding-top: var(--space-2xs);
  padding-bottom: var(--space-xs);
}

.sidebar-service-card__row {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 6px 0;
  border-bottom: 1px solid var(--color-border);
  text-decoration: none;
  color: var(--color-foreground);
  transition: color var(--transition-fast);
}

.sidebar-service-card__row:last-child {
  border-bottom: none;
}

.sidebar-service-card__row:hover {
  color: var(--color-primary);
}

.sidebar-service-card__icon {
  font-size: var(--text-l);
  flex-shrink: 0;
  width: 28px;
  text-align: center;
}

.sidebar-service-card__name {
  font-size: var(--text-s);
  font-weight: 600;
  flex: 1;
}

.sidebar-service-card__arrow {
  font-size: var(--text-s);
  color: var(--color-foreground-light);
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}

.sidebar-service-card__row:hover .sidebar-service-card__arrow {
  transform: translateX(4px);
  color: var(--color-primary);
}

/* ==========================================================================
   CLOUDFLARE TURNSTILE — Responsive widget
   ========================================================================== */

.cf-turnstile {
  max-width: 100%;
}

.cf-turnstile iframe {
  max-width: 100% !important;
}

@media (max-width: 400px) {
  .cf-turnstile {
    transform: scale(0.9);
    transform-origin: left center;
  }
}

/* ==========================================================================
   Página /sobre-mi/ — Enfermera en casa
   ========================================================================== */

.page-sobre-mi {
  background-color: var(--color-background, #FAF7F0);
}

.page-sobre-mi__hero {
  padding-block: var(--wp--preset--spacing--xl);
}

.page-sobre-mi__hero-inner {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: var(--wp--preset--spacing--xl);
  align-items: center;
  padding-inline: var(--wp--preset--spacing--m);
}

.page-sobre-mi__hero-media {
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  max-height: 540px;
  background-color: var(--color-accent-light, #E8B689);
}
.page-sobre-mi__photo,
.page-sobre-mi__placeholder svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.page-sobre-mi__hero-content {
  --flow-space: var(--wp--preset--spacing--s);
}

.page-sobre-mi__kicker {
  font-size: var(--wp--preset--font-size--xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary, #1F5E7A);
  margin: 0;
}

.page-sobre-mi__title {
  font-family: var(--wp--preset--font-family--heading);
  font-size: var(--wp--preset--font-size--5-xl);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--color-primary-dark, #143E51);
  margin: 0;
}

.page-sobre-mi__subtitle {
  font-size: var(--wp--preset--font-size--l);
  line-height: 1.55;
  color: var(--color-foreground, #143E51);
  margin: 0;
}

.page-sobre-mi__credential {
  display: inline-block;
  padding: 6px 12px;
  background-color: var(--color-muted, #F2EDE0);
  border: 1px solid var(--color-border, #E0DAC9);
  border-radius: 999px;
  font-size: var(--wp--preset--font-size--s);
  color: var(--color-primary-dark, #143E51);
  margin: 0;
}

.page-sobre-mi__section {
  padding-block: var(--wp--preset--spacing--xl);
}
.page-sobre-mi__section--formacion {
  background-color: var(--color-surface, #FFFFFF);
}
.page-sobre-mi__section--cta {
  background-color: var(--color-primary, #1F5E7A);
  color: var(--color-background, #FAF7F0);
  text-align: center;
}
.page-sobre-mi__section--cta .page-sobre-mi__section-title,
.page-sobre-mi__section--cta p {
  color: var(--color-background, #FAF7F0);
}

.page-sobre-mi__section-inner {
  padding-inline: var(--wp--preset--spacing--m);
}
.page-sobre-mi__section-inner.flow {
  --flow-space: var(--wp--preset--spacing--s);
}

.page-sobre-mi__section-title {
  font-family: var(--wp--preset--font-family--heading);
  font-size: var(--wp--preset--font-size--3-xl);
  font-weight: 500;
  line-height: 1.2;
  margin: 0 0 var(--wp--preset--spacing--s);
}

.page-sobre-mi__valores {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--wp--preset--spacing--l);
  margin-top: var(--wp--preset--spacing--l);
}

.page-sobre-mi__valor {
  display: flex;
  flex-direction: column;
  gap: var(--wp--preset--spacing--xs);
}
.page-sobre-mi__valor svg {
  color: var(--color-accent, #D4843A);
}
.page-sobre-mi__valor h3 {
  font-family: var(--wp--preset--font-family--heading);
  font-size: var(--wp--preset--font-size--xl);
  font-weight: 500;
  margin: 0;
  color: var(--color-primary-dark, #143E51);
}
.page-sobre-mi__valor p {
  margin: 0;
  font-size: var(--wp--preset--font-size--m);
  line-height: 1.55;
  color: var(--color-foreground, #143E51);
}

@media (max-width: 767px) {
  .page-sobre-mi__hero-inner {
    grid-template-columns: 1fr;
    gap: var(--wp--preset--spacing--l);
  }
  .page-sobre-mi__hero-media {
    aspect-ratio: 4 / 3;
    max-height: 360px;
  }
  .page-sobre-mi__valores {
    grid-template-columns: 1fr;
    gap: var(--wp--preset--spacing--m);
  }
}

/* ==========================================================================
   Página /contacto/ — formulario + datos directos + mapa
   ========================================================================== */

.page-contacto {
  background-color: var(--color-background, #FAF7F0);
  padding-block: var(--wp--preset--spacing--xl);
}

.page-contacto__inner {
  padding-inline: var(--wp--preset--spacing--m);
}

.page-contacto__header {
  --flow-space: var(--wp--preset--spacing--s);
  text-align: center;
  max-width: 640px;
  margin-inline: auto;
  margin-bottom: var(--wp--preset--spacing--l);
}

.page-contacto__kicker {
  font-size: var(--wp--preset--font-size--xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary, #1F5E7A);
  margin: 0;
}

.page-contacto__title {
  font-family: var(--wp--preset--font-family--heading);
  font-size: var(--wp--preset--font-size--4-xl);
  font-weight: 500;
  margin: 0;
  color: var(--color-primary-dark, #143E51);
}

.page-contacto__lead {
  font-size: var(--wp--preset--font-size--l);
  color: var(--color-foreground-light, #5C7A88);
  margin: 0;
}

.page-contacto__grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--wp--preset--spacing--xl);
}

.page-contacto__form-wrap {
  background-color: var(--color-surface, #FFFFFF);
  border: 1px solid var(--color-border, #E0DAC9);
  border-radius: 12px;
  padding: var(--wp--preset--spacing--l);
}

.page-contacto__notice {
  padding: var(--wp--preset--spacing--s);
  border-radius: 8px;
  margin-bottom: var(--wp--preset--spacing--m);
  font-size: var(--wp--preset--font-size--m);
  line-height: 1.5;
}
.page-contacto__notice--success {
  background-color: #E0F2E9;
  color: #14532D;
}
.page-contacto__notice--error {
  background-color: #FCE7E7;
  color: #7F1D1D;
}

.page-contacto__form {
  display: flex;
  flex-direction: column;
  gap: var(--wp--preset--spacing--s);
}

.page-contacto__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.page-contacto__field label {
  font-size: var(--wp--preset--font-size--s);
  font-weight: 600;
  color: var(--color-primary-dark, #143E51);
}

.page-contacto__field input[type="text"],
.page-contacto__field textarea {
  font-family: var(--wp--preset--font-family--primary);
  font-size: var(--wp--preset--font-size--m);
  padding: 12px 14px;
  border: 1.5px solid var(--color-border, #E0DAC9);
  border-radius: 8px;
  background-color: var(--color-background, #FAF7F0);
  color: var(--color-foreground, #143E51);
  transition: border-color 0.15s ease;
}
.page-contacto__field input:focus,
.page-contacto__field textarea:focus {
  outline: none;
  border-color: var(--color-primary, #1F5E7A);
}

.page-contacto__field--check label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 400;
  color: var(--color-foreground, #143E51);
  font-size: var(--wp--preset--font-size--s);
  line-height: 1.45;
}
.page-contacto__field--check input {
  margin-top: 3px;
  flex-shrink: 0;
}
.page-contacto__field--check a {
  color: var(--color-primary, #1F5E7A);
  text-decoration: underline;
}

.page-contacto__honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.page-contacto__submit {
  align-self: flex-start;
  font-size: var(--wp--preset--font-size--m);
  padding: 14px 32px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  border: none;
}

.page-contacto__direct {
  display: flex;
  flex-direction: column;
  gap: var(--wp--preset--spacing--s);
}

.page-contacto__direct-title {
  font-family: var(--wp--preset--font-family--heading);
  font-size: var(--wp--preset--font-size--xl);
  font-weight: 500;
  margin: 0 0 var(--wp--preset--spacing--xs);
  color: var(--color-primary-dark, #143E51);
}

.page-contacto__direct-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background-color: var(--color-surface, #FFFFFF);
  border: 1px solid var(--color-border, #E0DAC9);
  border-radius: 10px;
  text-decoration: none;
  color: var(--color-foreground, #143E51);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.page-contacto__direct-row:hover {
  transform: translateY(-1px);
  border-color: var(--color-primary, #1F5E7A);
}
.page-contacto__direct-row svg { color: var(--color-accent, #D4843A); flex-shrink: 0; }
.page-contacto__direct-row--wa svg { color: #25D366; }
.page-contacto__direct-row span { display: flex; flex-direction: column; line-height: 1.3; }
.page-contacto__direct-row strong {
  font-size: var(--wp--preset--font-size--s);
  color: var(--color-primary-dark, #143E51);
}
.page-contacto__direct-row em {
  font-style: normal;
  font-size: var(--wp--preset--font-size--m);
  color: var(--color-foreground, #143E51);
}

.page-contacto__horario {
  font-size: var(--wp--preset--font-size--s);
  color: var(--color-foreground-light, #5C7A88);
  line-height: 1.55;
  margin: 0;
}

.page-contacto__map {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--color-border, #E0DAC9);
}
.page-contacto__map iframe { display: block; }

@media (max-width: 767px) {
  .page-contacto__grid {
    grid-template-columns: 1fr;
    gap: var(--wp--preset--spacing--l);
  }
}

/* ==========================================================================
   WhatsApp Floating Action Button
   Conversion-critical for mobile users searching local services.
   ========================================================================== */

.wa-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 70;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 12px 30px -10px rgba(37, 211, 102, 0.55),
    0 6px 14px rgba(0, 0, 0, 0.10);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wa-fab:hover,
.wa-fab:focus-visible {
  transform: scale(1.06);
  box-shadow:
    0 14px 36px -10px rgba(37, 211, 102, 0.65),
    0 8px 16px rgba(0, 0, 0, 0.12);
  outline: none;
}

.wa-fab svg { width: 26px; height: 26px; }

@media (max-width: 600px) {
  .wa-fab {
    bottom: 18px;
    right: 18px;
    width: 52px;
    height: 52px;
  }
  .wa-fab svg { width: 24px; height: 24px; }
}
