/* CER Landing — refinado vs mock Cer LAnding Leads v5.html */

@font-face {
  font-family: "UniversLTStd";
  src: url("../fonts/UniversLTStd.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "UniversForHB";
  src: url("../fonts/UniversforHB-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "UniversForHB";
  src: url("../fonts/UniversforHB-Light.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

:root {
  --cer-blue-dark: #3d6372;
  --cer-blue-mid: #6a8fa0;
  --cer-blue-light: #96b8c8;
  --cer-header-footer: #86a9bc;
  --cer-orange: #bf4214;
  --cer-orange-light: #cd6a37;
  --cer-text-dark: #2f3f4d;
  --cer-text-mid: #6b7b88;
  --cer-caption-blue: #7c98ad;
  --cer-white: #ffffff;
  --cer-bg-soft: #f5f9fb;
  --cer-border: rgba(213, 232, 237, 0.6);

  /* Fuentes locales (UniversLTSd = Univers LT Std Regular) */
  --font-univers-ltsd: "UniversLTStd", sans-serif;
  --font-univers-forhb: "UniversForHB", sans-serif;
}

html {
  margin: 0;
}

body {
  margin: 0;  
  font-family: "Lato", sans-serif;
  font-size: 16px;
  color: var(--cer-text-dark);
  background-color: var(--cer-white);
}

h1,
h2,
h3 {
  font-family: "Montserrat", "Lato", sans-serif;
  font-weight: 700;
}

.hero-title {  
  font-family: var(--font-univers-ltsd), "Montserrat", "Lato", sans-serif;
}

p {
  line-height: 1.75;
}

h1.hero-title {
  line-height: 0.95;
  /*letter-spacing: -0.05em;*/
}


/* ─── Topbar (barra tipo mock: azul gris + texto blanco) ───── */

.cer-topbar {
  background-color: var(--cer-header-footer);
  border-bottom: none;
  z-index: 1000;
  box-shadow: 0 2px 12px rgba(35, 55, 70, 0.12);
}

.cer-contact-link {
  font-family: "Open Sans", sans-serif;
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.975rem;
  font-weight: 500;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.02em;
}

.cer-contact-link svg {
  flex-shrink: 0;
}

.cer-contact-link svg path {
  fill: currentColor;
}

.cer-contact-link:hover {
  color: var(--cer-white);
  opacity: 0.92;
}

.cer-contact-link:focus-visible {
  outline: 2px solid var(--cer-white);
  outline-offset: 3px;
  border-radius: 2px;
}

.cer-divider {
  color: rgba(255, 255, 255, 0.35);
  font-size: 1.25rem;
  font-weight: 300;
}

.cer-logo img {
  height: 46px;
  width: auto;
  display: block;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.12));
}

/* ─── Hero: overlay lateral + formulario tipo mock ───────────── */

#formulario {
  scroll-margin-top: var(--cer-topbar-offset);
}

.cer-hero {
  position: relative;
  min-height: 560px;
  display: flex;
  flex-direction: column;
  background-image: url("../img/hero-familia.jpg");
  background-size: cover;
  background-position: 40% bottom;
  overflow: hidden;
}


.cer-hero > .container {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  justify-content: space-between;
  min-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  align-items: center;
}

.cer-hero > .container > .row {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
}

/* Columnas a altura completa de la fila; título al pie con flex interno */
@media (min-width: 768px) {
  .cer-hero__text {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
  }

  .cer-hero__form-col {
    display: flex;
    flex-direction: column;
    align-self: stretch;
    min-height: 0;
  }

  .cer-hero__form-col .cer-form-card {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }

  .cer-hero__form-col .cer-form-card #cerLeadForm {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
  }

  .cer-hero__form-col .cer-form-card__footer {
    margin-top: auto;
  }
}

.hero-title {
  font-size: clamp(1.85rem, 2.15vw + 1.35rem, 2.5rem);
  line-height: 1.28;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.22),
    0 3px 14px rgba(0, 0, 0, 0.16),
    0 6px 28px rgba(0, 0, 0, 0.1);
  font-weight: 700;
  /*letter-spacing: 0.02em;*/
  /*max-width: 16ch;*/
}

.cer-form-card {
  background: rgba(134, 169, 188, 0.65);
  backdrop-filter: blur(8px);  
  padding: 26px 26px 22px;
  border-radius: 0px;
}

.cer-form-card__intro {
  font-size: 1.5rem;
  font-family: var(--font-univers-forhb), "Montserrat", "Lato", sans-serif;
  font-weight: 700;
  color: var(--cer-white);
  margin-bottom: 18px;
  line-height: 1.2;
  text-wrap: balance;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.22),
    0 3px 10px rgba(0, 0, 0, 0.14);
}

.cer-form-card .alert {
  font-size: 0.88rem;
  border-radius: 8px;
}

.cer-form-card .alert-success {
  background: rgba(255, 255, 255, 0.93);
  color: var(--cer-text-dark);
  border-color: rgba(106, 143, 160, 0.35);
}

.cer-form-card .alert-danger {
  background: rgba(255, 240, 240, 0.97);
  border-color: rgba(193, 84, 35, 0.35);
  color: #5c2a1f;
}

.cer-input {
  border: 1px solid rgba(200, 210, 216, 0.95);
  border-radius: 0;
  font-size: 0.9rem;
  padding: 11px 14px;
  color: var(--cer-text-dark);
  background-color: var(--cer-white);
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.cer-input::placeholder {
  color: #8c9aa3;
}

.cer-input:focus {
  border-color: var(--cer-blue-light);
  box-shadow: 0 0 0 3px rgba(150, 184, 200, 0.28);
  outline: none;
}

textarea.cer-input {
  resize: vertical;
  min-height: 96px;
}

.cer-form-card__note {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.88);
}

.cer-btn-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background-color: var(--cer-orange);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-family: "Montserrat", "Lato", sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 11px 32px;
  min-height: 42px;
  transition:
    background 0.2s,
    transform 0.1s,
    box-shadow 0.2s;
}

.cer-submit__busy {
  display: none;
  align-items: center;
  gap: 0.45rem;
}

.cer-submit__spinner {
  width: 1em;
  height: 1em;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: cer-submit-spin 0.7s linear infinite;
  box-sizing: border-box;
  flex-shrink: 0;
}

.cer-submit__busy-text {
  letter-spacing: 0.06em;
}

.cer-btn-submit.is-loading .cer-submit__label {
  display: none;
}

.cer-btn-submit.is-loading .cer-submit__busy {
  display: inline-flex;
}

@keyframes cer-submit-spin {
  to {
    transform: rotate(360deg);
  }
}

.cer-btn-submit:hover {
  background-color: var(--cer-orange-light);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(193, 84, 35, 0.35);
}

.cer-btn-submit:active {
  transform: translateY(0);
}

/* Modal de mensajes (JS: showModalMessage) */

.cer-msg-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1050;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background-color: rgba(47, 63, 77, 0.52);
  box-sizing: border-box;
}

.cer-msg-modal__dialog {
  width: 100%;
  max-width: 420px;
}

.cer-msg-modal__body {
  background: var(--cer-white);
  padding: 1.75rem 1.75rem 1.5rem;
  border-radius: 4px;
  box-shadow:
    0 4px 24px rgba(35, 55, 70, 0.14),
    0 12px 48px rgba(35, 55, 70, 0.12);
}

.cer-msg-modal__title {
  font-family: "Montserrat", "Lato", sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--cer-blue-dark);
  margin: 0 0 1rem;
  letter-spacing: 0.02em;
}

.cer-msg-modal__text {
  font-size: 0.95rem;
  color: var(--cer-text-dark);
  line-height: 1.65;
  margin-bottom: 1.35rem;
}

.cer-msg-modal__text p:last-child {
  margin-bottom: 0;
}

.cer-msg-modal__footer {
  display: flex;
  justify-content: flex-end;
}

.cer-msg-modal__footer .cer-btn-submit {
  min-width: 7.5rem;
  letter-spacing: 0.08em;
}

/* ─── Institucional ────────────────────────────────────────── */

.cer-about {
  background-color: var(--cer-white);
}

.cer-about__heading {
  font-family: var(--font-univers-forhb), "Montserrat", "Lato", sans-serif;
  font-weight: 700;
  color: #86a9bc;
  text-transform: uppercase;
  letter-spacing: -0.05rem;
  text-wrap: pretty;
}

.cer-about__body {  
  color: #a4a2a2;
}

.cer-about__body--highlight {
  color: var(--cer-orange);
  font-weight: 500;
}

.cer-about__accent {
  color: var(--cer-orange);
  font-weight: 400;
}

.cer-stat-box {
  background-image: url("../img/stat-box-bg.jpg");
  background-size: cover;
  background-position: center;
  /*border-radius: 14px;*/
  width: 335px;
  height: 436px;
  /*max-height: 320px;*/
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  /*box-shadow: 0 8px 26px rgba(45, 70, 85, 0.15);*/
}


.cer-stat-box__number,
.cer-stat-box__text {
  position: relative;
  z-index: 1;
  color: var(--cer-white);
}

.cer-stat-box__number {  
  font-weight: 700;
  line-height: 1.06;
}

.cer-stat-box__text {
  font-size: 1.02rem;
  line-height: 1.5;
  margin: 0;
  margin-top: 0.55rem;
  font-weight: 500;
}

/* ─── Tratamientos ─────────────────────────────────────────── */

.cer-treatments {
  background-color: var(--cer-white);
}

.cer-treatments__box {
  position: relative;
  border: 2px solid var(--cer-orange);
  border-radius: 12px;
  padding: 2.85rem 1.75rem 1.65rem;
  margin-top: 1.65rem;
  background-color: rgba(255, 255, 255, 0.55);
  
}

@media (max-width: 991px) {
  .cer-treatments__box {
    max-width: 600px;
  }
}

.cer-treatments__title-row {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -52%);
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: center;
  background: var(--cer-white);
  padding: 0 18px;
  max-width: calc(100% - 48px);
}

.cer-treatments__title {
  font-family: "Montserrat", "Lato", sans-serif;
  font-size: clamp(0.76rem, 0.55vw + 0.62rem, 0.93rem);
  font-weight: 700;
  color: var(--cer-orange);
  letter-spacing: 0.28em;
  white-space: nowrap;
  margin: 0;
  text-transform: uppercase;
}

@media (max-width: 767px) {
  .cer-treatments__title {
    white-space: normal;
    text-align: center;
    letter-spacing: 0.14em;
    line-height: 1.35;
  }
}

.cer-treatments__title-line {
  flex-shrink: 0;
  width: 48px;
  height: 1px;
  background-color: var(--cer-orange);
}

@media (min-width: 767px) {
  .cer-treatments__title-line {
    width: 72px;
    max-width: 100px;
  }
}

.cer-treatment-circle {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px;
  cursor: default;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
  margin-bottom: 1rem;
}

.cer-treatment-circle:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 32px rgba(35, 55, 70, 0.18);
}

.cer-treatment-circle span {
  color: var(--cer-white);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.38;
  text-transform: uppercase;
  letter-spacing: 0.55px;
}

.cer-treatment-circle small {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1rem;
  font-style: italic;
  /*margin-top: 5px;*/
  display: block;
}

/* orden de tonalidades según mock (oscuro → medio → más claro → gris medio) */

.cer-treatment-circle--fecundacion {
  background-color: #8f9ba1;
}

.cer-treatment-circle--preservacion {
  background-color: #5e7785;
}

.cer-treatment-circle--ovodonacion {
  background-color: #86a9bc;
}

.cer-treatment-circle--pgt {
  background-color: #8f9ba1;
}

/* ─── Banner CTA píldora ───────────────────────────────────── */

.cer-cta-banner {
  background-color: transparent;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

.cer-cta-banner__pill {
  width: 100%;
  background-color: #b3b2b2;
  border-radius: 999px;
  padding: 13px 32px;
  box-shadow: 0 8px 24px rgba(60, 80, 95, 0.12);
}


.cer-cta-banner__text {
  font-family: var(--font-univers-forhb), "Montserrat", "Lato", sans-serif;
  font-size: 1.1rem;
  font-weight: 300;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cer-white);
  margin: 0;
  text-align: center;
  line-height: 1.35;
}

/* ─── Valores propuestos ─────────────────────────────────────── */

.cer-features {
  background-color: var(--cer-white);
}

.cer-feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.cer-feature__icon {
  max-width: 109px;
  max-height: 109px;
}
.cer-feature__label {
  font-size: 1.1rem;
  color: var(--cer-caption-blue);
  font-family: var(--font-univers-forhb), "Montserrat", "Lato", sans-serif;
  font-weight: 300;
  text-align: center;
  line-height: 1.2;
  margin: 0;
  max-width: 17rem;
}

/* ─── Footer ───────────────────────────────────────────────── */

.cer-footer {
  background-color: var(--cer-header-footer);
  padding-top: 1.1rem;
  padding-bottom: 1.1rem;
  font-family: var(--font-univers-ltsd), "Montserrat", "Lato", sans-serif;
}

.cer-footer__copy {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.8);
}

.cer-footer__link {
  font-size: 1rem;
  color: var(--cer-white);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition:
    opacity 0.2s,
    transform 0.2s;
}

.cer-footer__link:hover {
  opacity: 0.92;
  color: var(--cer-white);
  transform: translateY(-1px);
}

.cer-footer__link svg {
  width: 15px;
  height: 15px;
  opacity: 0.92;
  flex-shrink: 0;
}

/* ─── Validación formulario ────────────────────────────────── */

.cer-field-error {
  font-size: 0.76rem;
  color: #ffb4a8;
  margin-top: 5px;
}

.cer-form-card .cer-input.is-invalid {
  border-color: #e07a62;
}

.cer-field-error.invalid-feedback {
  color: #ffffff;
}

/* ─── Responsive ───────────────────────────────────────────── */

@media (max-width: 991px) {
  .hero-title {
    max-width: none;
  }
}

@media (max-width: 767px) {
  .cer-hero {
    min-height: auto;
    padding: 32px 0 0;
  }

  .cer-hero > .container {
    min-height: 0;
    padding-top: 0;
    padding-bottom: 0;
  }

  .cer-hero > .container > .row {
    align-items: stretch;
  }

  .cer-hero__text {
    text-align: center;
    margin-bottom: 26px;
  }

  .hero-title {
    margin-inline: auto;
  }

  .cer-hero__form-col {
    padding-bottom: 0;
  }

  .cer-form-card {
    border-radius: 12px 12px 0px 0px;
    margin-inline: auto;
    max-width: 520px;
  }

  .cer-treatments__title-line {
    width: 32px;
  }
}

@media (max-width: 575px) {
  :root {
    /* Reserva hasta que JS mida el header apilado */
    --cer-topbar-offset: 132px;
  }

  .cer-treatment-circle {
    width: 132px;
    height: 132px;
    padding: 12px;
  }

  .cer-treatment-circle span, 
  .cer-treatment-circle small {
    font-size: 0.68rem;
  }

  .cer-cta-banner__pill {
    padding: 12px 20px;
  }

  .cer-cta-banner__text {
    letter-spacing: 0.16em;
  }

  header.cer-topbar .container {
    flex-direction: column;
    gap: 0.65rem;
  }

  .cer-topbar__contacts {
    width: 100%;
    justify-content: center !important;
    margin-inline: 0 !important;
  }

  header.cer-topbar .cer-logo {
    align-self: center;
  }
}
