/* EDA — estilos exclusivos de la portada */

.eda-parallax--finance {
  background-image: url("../img/eda-clinica-dental-en-santa-engracia-madrid.jpg");
}

.eda-home-stack {
  position: relative;
  overflow: visible;
}

.eda-hero {
  position: relative;
  width: 100%;
  min-height: 820px;
  max-height: 1100px;
  height: clamp(820px, 82vh, 1100px);
  overflow: hidden;
  z-index: 1;
}

.eda-hero__slides {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.eda-hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  opacity: 0;
  transition: opacity 1.35s ease-in-out;
  z-index: 0;
  pointer-events: none;
}

.eda-hero__img.is-active {
  opacity: 1;
  z-index: 1;
}

.eda-hero__img.is-leaving {
  opacity: 0;
  z-index: 2;
}

@media (prefers-reduced-motion: reduce) {
  .eda-hero__img {
    transition: none;
  }
}

.eda-hero__content {
  position: absolute;
  inset: 0;
  z-index: 2;
  max-width: var(--eda-container, 1300px);
  margin: 0 auto;
  padding: max(5.5rem, 11vh) 5% clamp(2rem, 4vh, 3rem);
  transform: translateY(-100px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 0.25rem;
  pointer-events: none;
}

.eda-hero__content a {
  pointer-events: auto;
}

.eda-hero__title {
  margin: 0 0 1.25rem;
  max-width: 18ch;
  font-family: var(--eda-font-heading);
  font-size: clamp(2rem, 5vw, 4.375rem);
  line-height: 1.15;
  font-weight: 400;
  text-transform: uppercase;
  color: var(--eda-teal);
  text-shadow: 1px 1px 0 var(--eda-black);
}

.eda-hero__text {
  margin: 0 0 1.5rem;
  max-width: 42rem;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--eda-black);
  text-shadow: 1px 1px 0 var(--eda-white);
}

.eda-hero__phones {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2.5rem;
  margin-bottom: 1.25rem;
  font-size: clamp(1.5rem, 3vw, 2.75rem);
  font-weight: 500;
}

.eda-hero__phones a {
  color: var(--eda-teal);
  text-decoration: none;
  text-shadow: 1px 1px 0 var(--eda-black);
}

.eda-hero__phones a:hover {
  text-decoration: underline;
}

.eda-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.eda-hero__title--mobile {
  display: none;
}

/*
 * Referencia: hero visible · fila beige full width · caja blanca centrada
 * con margin-top negativo (solo el panel sube; la franja beige NO sube).
 * flow-root evita que el margin del panel arrastre el fondo beige sobre el hero.
 */
.eda-features-band {
  display: flow-root;
  position: relative;
  z-index: 2;
  padding: 0 clamp(1.25rem, 4.5%, 3.5rem) 1px;
  background-color: var(--eda-beige, #f0efe6);
  overflow: visible;
}

.eda-features__panel {
  position: relative;
  z-index: 3;
  max-width: var(--eda-container, 1300px);
  margin: -100px auto -100px;
  padding: 60px clamp(1rem, 3%, 2rem);
  background-color: var(--eda-white);
  box-sizing: border-box;
}

.eda-features__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin: 0 auto;
  padding: 0 clamp(0.5rem, 3%, 2rem);
}

.eda-feature {
  padding: 0 8%;
  border-right: 1px solid var(--eda-teal-dark);
}

.eda-feature:last-child {
  border-right: none;
}

.eda-feature__label {
  margin: 0;
  font-family: var(--eda-font-heading);
  font-size: 0.875rem;
  color: var(--eda-teal);
}

.eda-feature__title {
  margin: 0 0 1rem;
  font-family: var(--eda-font-heading);
  font-size: 1.5rem;
  color: var(--eda-text);
}

.eda-feature__text {
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
}

/* Seguros — franja beige bajo el panel (espaciado de títulos en eda.css → .eda-section-head) */
.eda-seguros {
  position: relative;
  z-index: 2;
  max-width: var(--eda-container, 1300px);
  margin: 0 auto;
  padding: 0 clamp(0.5rem, 3%, 2rem) 80px;
}

.eda-seguros__carousel {
  position: relative;
  z-index: 2;
  padding: 0;
}

/* Intro clínica — 50/50 texto + carrusel (referencia Elementor col-50) */
.eda-clinic-intro {
  position: relative;
  z-index: 2;
  padding: 60px clamp(1.25rem, 4.5%, 3.5rem) 98px;
  background-color: var(--eda-beige, #f0efe6);
  scroll-margin-top: var(--eda-header-h);
}

.eda-clinic-intro__grid {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  max-width: var(--eda-container, 1300px);
  margin: 0 auto;
}

.eda-clinic-intro__text {
  flex: 0 0 50%;
  width: 50%;
  min-width: 0;
  box-sizing: border-box;
  padding-right: clamp(1rem, 4vw, 3rem);
}

.eda-clinic-intro__text .eda-section-head {
  margin-bottom: 10px;
}

.eda-clinic-intro__actions {
  margin: 2rem 0 0;
}

.eda-clinic-intro__media {
  flex: 0 0 50%;
  width: 50%;
  min-width: 0;
  box-sizing: border-box;
  padding-top: 0;
  overflow: hidden;
}

/* Cuadrícula ajedrez — imagen | texto alternado */
.eda-checkerboard {
  background-color: var(--eda-beige, #f0efe6);
}

.eda-checkerboard__row {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  width: 100%;
}

.eda-checkerboard__media {
  flex: 0 0 50%;
  width: 50%;
  min-width: 0;
  overflow: hidden;
  line-height: 0;
}

.eda-checkerboard__media img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
  object-position: center;
}

.eda-checkerboard__content {
  flex: 0 0 50%;
  width: 50%;
  min-width: 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: clamp(2.5rem, 5%, 3.5rem) clamp(1.75rem, 6%, 4rem);
  background-color: var(--eda-white);
}

.eda-checkerboard__content .eda-section-head {
  margin-bottom: 10px;
}

.eda-checkerboard__content .eda-section-head__title a {
  color: inherit;
  text-decoration: none;
}

.eda-checkerboard__content .eda-section-head__title a:hover {
  text-decoration: underline;
}

.eda-checkerboard__content .eda-prose {
  margin-top: 0.75rem;
}

.eda-checkerboard__brand {
  margin: 1.25rem 0 0;
}

.eda-checkerboard__brand img {
  display: block;
  max-width: 300px;
  width: 100%;
  height: auto;
}

.eda-checkerboard__actions {
  margin: 2rem 0 0;
}

@media (max-width: 900px) {
  .eda-clinic-intro__grid {
    flex-direction: column;
    flex-wrap: wrap;
  }

  .eda-clinic-intro__text,
  .eda-clinic-intro__media {
    flex: 0 0 100%;
    width: 100%;
    padding-right: 0;
  }

  .eda-clinic-intro {
    padding-top: 48px;
    padding-bottom: 80px;
  }

  .eda-clinic-intro__media {
    padding-top: 0;
  }

  .eda-checkerboard__row {
    flex-direction: column;
  }

  .eda-checkerboard__media,
  .eda-checkerboard__content {
    flex: 0 0 100%;
    width: 100%;
  }

  .eda-checkerboard__media {
    min-height: 220px;
    aspect-ratio: 1100 / 688;
  }

  /* Filas con texto primero en el DOM: imagen arriba en móvil */
  .eda-checkerboard__row:nth-child(2) .eda-checkerboard__media {
    order: -1;
  }

  .eda-features__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .eda-feature {
    border-right: none;
    border-bottom: 1px solid var(--eda-teal-dark);
    padding: 0 0 2rem;
  }

  .eda-feature:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }
}

@media (max-width: 778px) {
  .eda-hero {
    min-height: 700px;
    height: clamp(700px, 75vh, 920px);
  }

  .eda-hero__title--desktop {
    display: none;
  }

  .eda-hero__title--mobile {
    display: inline;
  }

  .eda-hero__content {
    transform: translateY(-60px);
    padding-top: max(5rem, 9vh);
    padding-bottom: 1.5rem;
  }

  .eda-features__panel {
    margin: -60px auto -60px;
  }
}
