/**
 * @file
 * Estilos para el componente Hero Section
 * Adaptación SIT Torrelavega
 */

:root {
  --component-nexods-hero-title-font-size-desktop: 58px;
  --component-nexods-hero-title-line-height-desktop: 62px;
  --component-nexods-hero-title-font-size-tablet: 46px;
  --component-nexods-hero-title-line-height-tablet: 50px;
  --component-nexods-hero-title-font-size-mobile: 34px;
  --component-nexods-hero-title-line-height-mobile: 38px;

  --hero-content-max-width: 1240px;
  --hero-content-padding-desktop-x: 48px;
  --hero-content-padding-tablet-x: 40px;
  --hero-content-padding-mobile-x: 24px;
}

/* =========================================================
   BASE
   ========================================================= */

.nexods-section-hero,
.nexods-section-hero__content,
.nexods-section-hero__explainer {
  box-sizing: border-box;
  max-width: 100vw;
}

.nexods-section-hero {
  position: relative;
  display: flex;
  width: 100%;
  min-height: var(--hero-min-height, 540px);
  padding: 0;
  overflow: hidden;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

/* Degradado oscuro inferior para legibilidad */
.nexods-section-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 30%,
    rgba(0, 0, 0, 0.28) 68%,
    rgba(0, 0, 0, 0.62) 100%
  );
}

/* Vídeo de fondo */
.nexods-section-hero__video {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Contenedor de contenido */
.nexods-section-hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: none;
  min-height: var(--hero-min-height, 540px);
  margin: 0;
  padding: 0;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  color: #ffffff;
}

/* Anula cualquier capa antigua heredada de Benicàssim */
.nexods-section-hero__content-bg,
.nexods-section-hero__content-bg::before,
.nexods-section-hero__content-bg::after {
  display: none !important;
  content: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  background: transparent !important;
  mix-blend-mode: normal !important;
}

/* =========================================================
   HERO HOME
   ========================================================= */

.nexods-section-hero--home {
  min-height: var(--hero-min-height, 540px);
  padding-left: 0;
  padding-right: 0;
}

.nexods-section-hero--home .nexods-section-hero__content {
  min-height: var(--hero-min-height, 540px);
  padding-top: 0;
}

/* Título principal home */
.nexods-section-hero__heading {
  position: relative;
  z-index: 3;

  width: var(--hero-content-max-width);
  max-width: calc(100vw - 96px);

  margin: 0;
  padding: 0 48px 72px;

  color: #ffffff;
  font-family: var(--typeface-title-display-font-family, inherit);
  font-size: clamp(
    44px,
    4.7vw,
    var(--component-nexods-hero-title-font-size-desktop)
  );
  line-height: clamp(
    48px,
    5vw,
    var(--component-nexods-hero-title-line-height-desktop)
  );
  font-weight: 700;
  letter-spacing: -0.035em;
  text-transform: none;
}

/* Todo el claim en blanco y con peso fuerte */
.nexods-section-hero__title,
.nexods-section-hero__subtitle {
  display: inline;
  color: #ffffff;
  font-size: inherit;
  line-height: inherit;
  font-weight: 700;
  letter-spacing: inherit;
  text-transform: none;
}

/* Espacio natural entre title y subtitle en home */
.nexods-section-hero--home .nexods-section-hero__title::after {
  content: " ";
}

/* =========================================================
   HERO PÁGINAS INTERIORES
   ========================================================= */

.nexods-section-hero--not-home {
  min-height: var(--hero-min-height, 460px);
  padding-left: 0;
  padding-right: 0;
}

.nexods-section-hero--not-home .nexods-section-hero__content {
  min-height: var(--hero-min-height, 460px);
  align-items: flex-end;
}

.nexods-section-hero__content-text-not-home {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: var(--hero-content-max-width);
  margin: 0;
  padding: 0 var(--hero-content-padding-desktop-x) 72px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.nexods-section-hero--not-home .nexods-section-hero__title {
  margin: 0;
  color: #ffffff;
  font-family: var(--typeface-title-display-font-family, inherit);
  font-size: clamp(36px, 4vw, 56px);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-transform: none;
}

.nexods-section-hero--not-home .nexods-section-hero__subtitle {
  margin: 0;
  max-width: 720px;
  color: #ffffff;
  font-family: var(--typeface-body-font-family, inherit);
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.25;
  font-weight: 400;
  text-transform: none;
}

/* =========================================================
   EXPLAINER
   ========================================================= */

.nexods-section-hero__explainer {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  color: var(--nexo-color-text-default, #111111);
}

.nexods-section-hero__explainer .nexods-container {
  max-width: var(--hero-content-max-width);
  margin: 0;
  padding: 48px var(--hero-content-padding-desktop-x);
  background: transparent;
}

.nexods-section-hero__explainer p {
  margin: 0;
  color: var(--nexo-color-text-default, #111111);
  font-size: var(--typeface-subtitle-400-font-size-400, 20px);
  line-height: 1.35;
  font-weight: 400;
}

.nexods-section-hero__explainer p + p {
  margin-top: 1em;
}

.nexods-section-hero__explainer :is(strong, b) {
  font-weight: 700;
}

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

@media (max-width: 1023px) {
  .nexods-section-hero,
  .nexods-section-hero--home {
    min-height: var(--hero-min-height, 500px);
  }

  .nexods-section-hero__content,
  .nexods-section-hero--home .nexods-section-hero__content {
    min-height: var(--hero-min-height, 500px);
  }

  .nexods-section-hero__heading {
    width: 100%;
    max-width: none;
    min-height: auto;
    margin: 0;
    padding: 0 var(--hero-content-padding-tablet-x) 64px;
    font-size: var(--component-nexods-hero-title-font-size-tablet);
    line-height: var(--component-nexods-hero-title-line-height-tablet);
    font-weight: 700;
  }

  .nexods-section-hero__content-text-not-home {
    padding-right: var(--hero-content-padding-tablet-x);
    padding-left: var(--hero-content-padding-tablet-x);
    padding-bottom: 56px;
  }
}

/* =========================================================
   RESPONSIVE MÓVIL
   ========================================================= */

@media (max-width: 768px) {
  .nexods-section-hero,
  .nexods-section-hero--home {
    min-height: var(--hero-min-height, 430px);
  }

  .nexods-section-hero__content,
  .nexods-section-hero--home .nexods-section-hero__content {
    min-height: var(--hero-min-height, 430px);
  }

  .nexods-section-hero::after {
    background: linear-gradient(
      180deg,
      rgba(0, 0, 0, 0) 18%,
      rgba(0, 0, 0, 0.45) 68%,
      rgba(0, 0, 0, 0.72) 100%
    );
  }

  .nexods-section-hero__heading {
    width: 100%;
    max-width: none;
    min-height: auto;
    margin: 0;
    padding: 0 var(--hero-content-padding-mobile-x) 44px;
    font-size: var(--component-nexods-hero-title-font-size-mobile);
    line-height: var(--component-nexods-hero-title-line-height-mobile);
    font-weight: 700;
    letter-spacing: -0.025em;
  }

  .nexods-section-hero__content-text-not-home {
    padding: 0 var(--hero-content-padding-mobile-x) 40px;
  }

  .nexods-section-hero--not-home {
    min-height: var(--hero-min-height, 360px);
  }

  .nexods-section-hero--not-home .nexods-section-hero__content {
    min-height: var(--hero-min-height, 360px);
  }

  .nexods-section-hero--not-home .nexods-section-hero__title {
    font-size: 34px;
    line-height: 38px;
  }

  .nexods-section-hero--not-home .nexods-section-hero__subtitle {
    font-size: 18px;
    line-height: 1.3;
  }

  .nexods-section-hero__explainer .nexods-container {
    padding: 32px var(--hero-content-padding-mobile-x);
  }
}