/* ============================================================
   MÓDULO · HERO ESPECIALIDAD
   - Fuerza el header blanco en toda la página
   - Fondo con el color del área
   - Imagen a la derecha con degradado de mezcla
   - Breadcrumb Roboto + título DMSerif + icono
   ============================================================ */


/* ============================================================
   1) HEADER SIEMPRE BLANCO (sobreescribe cualquier theme del JS)
   ============================================================ */
.site-header,
.site-header.header-white,
.site-header.header-black,
.site-header.header-orange,
.site-header.header-transparent {
    --header-bg:            #ffffff;
    --header-text:          #000000;
    --header-active:        var(--color-primary, #ff5a00);

    --header-cta-bg:        var(--color-primary, #ff5a00);
    --header-cta-text:      #ffffff;

    --header-cta-bg-hover:  var(--color-primary-dark, #e64f00);
    --header-cta-text-hover:#ffffff;
}

/* Si el header no tenía sombra, se la damos para que destaque sobre el hero */
.site-header {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

/* Logo por defecto → siempre el de colores (porque el fondo es blanco) */
.header-logo__img--default { display: none !important; }
.header-logo__img--alt     { display: block  !important; }


/* ============================================================
   2) HERO ESPECIALIDAD
   ============================================================ */
.hero-esp {
  --esp-heading:   #ffffff;
  --esp-font-dsp:  'DMSerif', Georgia, serif;
  --esp-font-sans: 'roboto', 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
  --esp-header-h:  110px;   /* ajusta si tu header mide otra cosa */
  
  position: relative;
  width: 100%;
  min-height: 400px;
  background-color: var(--esp-color, #42af9d);
  overflow: hidden;
  display: flex;
  align-items: center;

  /* Se mete debajo del header fijo */
  margin-top: 1.6rem;
  padding: calc(var(--esp-header-h) + 3rem) 5vw 3rem;
  box-sizing: border-box;
  z-index: 1;
}

/* ---------- Foto derecha con blend hacia el color ---------- */
.hero-esp__photo {
  position: absolute;
  top: 0;
  right: 0;
  width: 60%;
  height: 100%;
  z-index: 1;
  overflow: hidden;
}

.hero-esp__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Degradado que funde el borde izquierdo de la foto con el color de fondo */
.hero-esp__photo::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(
    to right,
    var(--esp-color, #42af9d) 0%,
    color-mix(in srgb, var(--esp-color, #42af9d) 60%, transparent) 25%,
    rgba(0, 0, 0, 0) 55%
  );
  pointer-events: none;
}

@supports not (background: color-mix(in srgb, red, transparent)) {
  .hero-esp__photo::before {
    background: linear-gradient(
      to right,
      var(--esp-color, #42af9d) 0%,
      rgba(0, 0, 0, 0) 55%
    );
  }
}

/* ---------- Contenido izquierdo ---------- */
.hero-esp__content {
  position: relative;
  z-index: 3;
  width: 50%;
  max-width: 640px;
  color: var(--esp-heading);
}

/* ---------- Breadcrumb (Roboto) ---------- */
.hero-esp__breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-family: var(--esp-font-sans);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.2px;
  color: var(--esp-heading);
  margin-bottom: 2rem;
}

.hero-esp__breadcrumb a {
  color: var(--esp-heading);
  text-decoration: none;
  opacity: 0.9;
  transition: opacity 0.2s ease;
}

.hero-esp__breadcrumb a:hover {
  opacity: 1;
  text-decoration: underline;
}

.hero-esp__sep     { opacity: 0.6; }
.hero-esp__current { opacity: 0.9; }

/* ---------- Título (DMSerif) ---------- */
.hero-esp__title {
  font-family: var(--esp-font-dsp);
  font-size: clamp(2rem, 4vw, 3.6rem);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.5px;
  color: var(--esp-heading);
  margin: 0 0 2rem 0;
}

/* ---------- Icono debajo del título ---------- */
.hero-esp__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
}

.hero-esp__icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: brightness(0) invert(1);   /* forzar a blanco */
}


/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 800px) {
  .hero-esp { --esp-header-h: 80px; }
}

@media (max-width: 900px) {
  .hero-esp {
    flex-direction: column;
    align-items: flex-start;
    padding: calc(var(--esp-header-h) + 2rem) 1.5rem 0;
    min-height: auto;
  }

  .hero-esp__content {
    width: 100%;
    max-width: 100%;
  }

  .hero-esp__breadcrumb {
    margin-bottom: 1.5rem;
  }

  .hero-esp__title {
    margin-bottom: 1.5rem;
  }

  .hero-esp__photo {
    position: relative;
    width: 100%;
    height: 260px;
    margin-top: 2.5rem;
    order: 2;
  }

  .hero-esp__photo::before {
    background: linear-gradient(
      to top,
      var(--esp-color, #42af9d) 0%,
      rgba(0, 0, 0, 0) 45%
    );
  }
}

@media (max-width: 500px) {
  .hero-esp__title {
    font-size: 1.9rem;
  }

  .hero-esp__icon {
    width: 42px;
    height: 42px;
  }

  .hero-esp__photo {
    height: 200px;
  }
}