/*
 * Fisenf: aspecto premium sobre Divi 4, respetando la identidad corporativa (logo, verde #73b434
 * y gris del logo). Solo actúa con body.fx-premium, que pone functions.php cuando la opción
 * fisenf_premium_enabled vale 1.
 */

@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/dm-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

body.fx-premium {
  --fx-verde: #73b434;          /* verde corporativo */
  --fx-verde-hover: #5f9a26;
  --fx-verde-texto: #3f7417;    /* verde legible sobre blanco (AA) */
  --fx-verde-suave: #e9f3df;
  --fx-verde-fondo: #f5f9f1;
  --fx-gris-logo: #8c8d8c;
  --fx-tinta: #20262a;
  --fx-texto: #4a5350;
  --fx-texto-suave: #6a7370;
  --fx-linea: #e3e9de;
  --fx-oscuro: #1d2320;
  --fx-radio: 20px;
  --fx-sombra: 0 22px 44px -30px rgba(31, 52, 24, .38), 0 2px 6px rgba(31, 52, 24, .05);
  --fx-sombra-grande: 0 34px 70px -34px rgba(31, 52, 24, .45), 0 4px 12px rgba(31, 52, 24, .06);
  --fx-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.6 6.3l2.1 2.1 4.7-4.8' fill='none' stroke='%233f7417' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");

  color: var(--fx-texto);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: #fff;
}

/* ---------- Tipografía ---------- */

body.fx-premium,
body.fx-premium input,
body.fx-premium textarea,
body.fx-premium select,
body.fx-premium button,
body.fx-premium h1, body.fx-premium h2, body.fx-premium h3,
body.fx-premium h4, body.fx-premium h5, body.fx-premium h6,
body.fx-premium .et_pb_module,
body.fx-premium .et_pb_button,
body.fx-premium #main-header,
body.fx-premium #top-header,
body.fx-premium #main-footer {
  font-family: "DM Sans", "Helvetica Neue", Arial, sans-serif !important;
}

body.fx-premium .et_pb_text,
body.fx-premium .et_pb_blurb_description,
body.fx-premium .et_pb_text p,
body.fx-premium .et_pb_text li {
  color: var(--fx-texto);
  font-size: 17px;
  line-height: 1.7;
}

/* El tema hijo justificaba los párrafos: mejor alineados a la izquierda o como diga el módulo */
body.fx-premium p { text-align: inherit; }

body.fx-premium a { color: var(--fx-verde-texto); transition: color .2s; }
body.fx-premium a:hover { color: var(--fx-verde-hover); }

body.fx-premium h1, body.fx-premium h2, body.fx-premium h3,
body.fx-premium h4, body.fx-premium h5, body.fx-premium h6,
body.fx-premium .et_pb_module_header,
body.fx-premium .et_pb_module_header a {
  color: var(--fx-tinta) !important;
  font-weight: 600 !important;
  letter-spacing: -0.02em;
  line-height: 1.15 !important;
  text-transform: none !important;
}

body.fx-premium h1 { font-size: clamp(34px, 3.6vw, 50px) !important; }
body.fx-premium h2 { font-size: clamp(27px, 2.5vw, 38px) !important; }
body.fx-premium h3 { font-size: clamp(20px, 1.6vw, 23px) !important; }
body.fx-premium h4 { font-size: 19px !important; }

/* Raya verde bajo los títulos de sección y de página */
body.fx-premium .et_pb_heading h1::after,
body.fx-premium .et_pb_heading h2::after {
  content: "";
  display: block;
  width: 56px;
  height: 3px;
  border-radius: 3px;
  background: var(--fx-verde);
  margin: 18px 0 0;
}
body.fx-premium .fx-seccion-intro .et_pb_heading h2::after,
body.fx-premium .fx-seccion-servicios .et_pb_heading h2::after,
body.fx-premium .fx-seccion-cita .et_pb_heading h1::after {
  margin: 18px auto 0;
}
body.fx-premium .fx-tarjetas .et_pb_heading h2::after,
body.fx-premium .fx-tarjetas .et_pb_heading h3::after {
  display: none;
}

/* Títulos centrados en las secciones y tarjetas centradas */
body.fx-premium .fx-seccion-intro .et_pb_heading *,
body.fx-premium .fx-seccion-servicios .et_pb_heading *,
body.fx-premium .fx-seccion-cita .et_pb_heading *,
body.fx-premium .fx-tarjetas .et_pb_heading * {
  text-align: center !important;
}

body.fx-premium .fx-antetitulo {
  font-size: 13px !important;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--fx-verde-texto) !important;
  margin: 0 0 14px;
  padding: 0;
  line-height: 1.4;
}

body.fx-premium .fx-entradilla {
  font-size: clamp(18px, 1.35vw, 20px) !important;
  line-height: 1.6 !important;
  color: var(--fx-texto);
}

/* Anchura de contenido algo mayor y más aire */
body.fx-premium .container,
body.fx-premium .et_pb_row {
  max-width: 1180px;
}

/* ---------- Barra superior ---------- */

body.fx-premium #top-header {
  background: var(--fx-verde) !important;
}
body.fx-premium #top-header,
body.fx-premium #top-header a,
body.fx-premium #top-header #et-info,
body.fx-premium #top-header #et-info span {
  color: #fff !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  letter-spacing: .01em;
}

/* ---------- Cabecera y menú ---------- */

body.fx-premium #main-header {
  box-shadow: 0 1px 0 var(--fx-linea) !important;
}
body.fx-premium #main-header.et-fixed-header {
  box-shadow: 0 12px 30px -20px rgba(0, 0, 0, .28) !important;
}
body.fx-premium #main-header #top-menu > li {
  padding-right: 26px;
}
body.fx-premium #main-header #top-menu > li > a {
  font-size: 15px !important;
  font-weight: 500 !important;
  color: var(--fx-tinta) !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  opacity: 1 !important;
}
body.fx-premium #main-header #top-menu > li > a:hover,
body.fx-premium #main-header #top-menu > li.current-menu-item > a {
  color: var(--fx-verde-texto) !important;
}

/* «Cita previa», el último elemento del menú, como botón */
body.fx-premium #main-header #top-menu > li:last-child {
  padding-right: 0;
}
body.fx-premium #main-header #top-menu > li:last-child > a,
body.fx-premium #main-header #top-menu > li.current-menu-item:last-child > a {
  display: inline-block;
  background: var(--fx-verde);
  color: #fff !important;
  border-radius: 999px;
  padding: 12px 22px !important;
  margin-top: -12px;
  transition: background .2s, box-shadow .2s;
}
body.fx-premium #main-header #top-menu > li:last-child > a:hover {
  background: var(--fx-verde-hover);
  box-shadow: 0 10px 22px -12px rgba(79, 138, 31, .7);
}

/* ---------- Botones ---------- */

body.fx-premium .et_pb_button,
body.fx-premium .et_pb_contact_submit {
  display: inline-block;
  font-size: 16px !important;
  font-weight: 600 !important;
  letter-spacing: .005em;
  line-height: 1.2 !important;
  border: 2px solid var(--fx-verde) !important;
  border-radius: 999px !important;
  background: var(--fx-verde) !important;
  color: #fff !important;
  padding: 14px 28px !important;
  transition: background .2s, border-color .2s, transform .2s, box-shadow .2s;
}
body.fx-premium .et_pb_button:hover,
body.fx-premium .et_pb_contact_submit:hover {
  background: var(--fx-verde-hover) !important;
  border-color: var(--fx-verde-hover) !important;
  padding: 14px 28px !important;
  transform: translateY(-1px);
  box-shadow: 0 12px 24px -14px rgba(79, 138, 31, .8);
}
body.fx-premium .et_pb_button::after,
body.fx-premium .et_pb_button::before,
body.fx-premium .et_pb_contact_submit::after {
  display: none !important;
}
body.fx-premium .et_pb_button.fx-boton-secundario {
  background: transparent !important;
  color: var(--fx-tinta) !important;
  border-color: #cdd7c5 !important;
}
body.fx-premium .et_pb_button.fx-boton-secundario:hover {
  background: #fff !important;
  border-color: var(--fx-verde) !important;
  color: var(--fx-verde-texto) !important;
  box-shadow: none;
}

/* ---------- Portada: cabecera ---------- */

body.fx-premium .fx-hero {
  background: linear-gradient(180deg, var(--fx-verde-fondo) 0%, #fff 100%) !important;
  padding: 76px 0 48px !important;
}
body.fx-premium .fx-hero-texto { margin-bottom: 18px !important; }
body.fx-premium .fx-titular {
  font-size: clamp(38px, 4.4vw, 60px) !important;
  line-height: 1.05 !important;
  margin: 0 0 22px;
  padding: 0;
}
body.fx-premium .fx-titular strong {
  color: var(--fx-verde) !important;
  font-weight: 700;
}
body.fx-premium .fx-hero .fx-entradilla { max-width: 32em; }
body.fx-premium .fx-hero .et_pb_button_module_wrapper {
  display: inline-block;
  margin: 8px 12px 0 0 !important;
}

body.fx-premium .fx-confianza { margin-top: 30px !important; }
body.fx-premium .fx-confianza ul {
  list-style: none !important;
  padding: 0 !important;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}
body.fx-premium .fx-confianza li {
  position: relative;
  padding-left: 26px;
  font-size: 15px;
  color: var(--fx-texto-suave);
}
body.fx-premium .fx-confianza li::before,
body.fx-premium .fx-valores li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .3em;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--fx-verde-suave) var(--fx-check) center / 11px no-repeat;
}

body.fx-premium .fx-hero-imagen {
  position: relative;
  isolation: isolate;
  margin-bottom: 0 !important;
}
body.fx-premium .fx-hero-imagen::before {
  content: "";
  position: absolute;
  right: -22px;
  bottom: -22px;
  width: 62%;
  height: 62%;
  border-radius: 28px;
  background: var(--fx-verde-suave);
  z-index: -1;
}
body.fx-premium .fx-hero-imagen .et_pb_image_wrap {
  display: block;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--fx-sombra-grande);
}
body.fx-premium .fx-hero-imagen img {
  display: block;
  width: 100%;
  aspect-ratio: 5 / 4;
  object-fit: cover;
  object-position: 55% 50%;
}

/* ---------- Portada: presentación ---------- */

body.fx-premium .fx-seccion-intro {
  background: #fff !important;
  padding: 48px 0 72px !important;
}
body.fx-premium .fx-seccion-intro .fx-entradilla {
  max-width: 40em;
  margin: 0 auto;
}
body.fx-premium .fx-chips {
  list-style: none !important;
  padding: 0 !important;
  margin: 30px auto 0 !important;
  max-width: 920px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
body.fx-premium .fx-chips li {
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--fx-verde-fondo);
  border: 1px solid var(--fx-linea);
  color: var(--fx-tinta);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.3;
}

/* ---------- Portada: cómo te ayudamos ---------- */

body.fx-premium .fx-seccion-servicios {
  background: var(--fx-verde-fondo) !important;
  padding: 80px 0 !important;
}
body.fx-premium .fx-servicios .et_pb_column {
  background: #fff;
  border: 1px solid var(--fx-linea);
  border-radius: var(--fx-radio);
  overflow: hidden;
  box-shadow: var(--fx-sombra);
  transition: transform .25s, box-shadow .25s;
}
body.fx-premium .fx-servicios .et_pb_column:hover {
  transform: translateY(-4px);
  box-shadow: var(--fx-sombra-grande);
}
body.fx-premium .fx-servicio-imagen { margin: 0 !important; }
body.fx-premium .fx-servicio-imagen .et_pb_image_wrap { display: block; }
body.fx-premium .fx-servicio-imagen img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}
body.fx-premium .fx-servicio-texto {
  padding: 26px 28px 30px;
  margin: 0 !important;
}
body.fx-premium .fx-servicio-texto h3 {
  margin: 0 0 10px;
  padding: 0;
  font-size: 21px !important;
}
body.fx-premium .fx-servicio-texto p { font-size: 16px; }
body.fx-premium .fx-enlace {
  font-weight: 600;
  text-decoration: none;
}
body.fx-premium .fx-enlace::after {
  content: "  →";
}

/* ---------- Tarjetas de información (portada y cita previa) ---------- */

body.fx-premium .fx-seccion-info {
  background: #fff !important;
  padding: 80px 0 !important;
}
body.fx-premium .fx-tarjetas .et_pb_column {
  box-sizing: border-box;
  background: var(--fx-verde-fondo);
  border: 1px solid var(--fx-linea);
  border-radius: var(--fx-radio);
  padding: 40px 32px 36px;
}
body.fx-premium .fx-tarjetas .et_pb_icon { margin-bottom: 16px !important; }
body.fx-premium .fx-tarjetas .et-pb-icon {
  color: var(--fx-verde) !important;
  font-size: 40px !important;
}
body.fx-premium .fx-tarjetas h2,
body.fx-premium .fx-tarjetas h3 {
  font-size: 22px !important;
}
body.fx-premium .fx-tarjetas .et_pb_text { margin-bottom: 22px !important; }

/* ---------- Cita previa ---------- */

body.fx-premium .fx-seccion-cita { padding: 72px 0 88px !important; }
body.fx-premium .fx-seccion-cita .fx-entradilla {
  max-width: 36em;
  margin: 0 auto;
}

/* ---------- Columnas de igual altura en escritorio ---------- */

@media (min-width: 981px) {
  body.fx-premium .fx-hero-fila,
  body.fx-premium .fx-servicios,
  body.fx-premium .fx-tarjetas,
  body.fx-premium.page-id-132 .et_pb_row_1,
  body.fx-premium.page-id-132 .et_pb_row_2 {
    display: flex;
  }
  body.fx-premium .fx-hero-fila { align-items: center; }
}

/* ---------- Páginas interiores ---------- */

/* Especialidades: cada bloque como tarjeta */
body.fx-premium.page-id-132 .et_pb_blurb {
  box-sizing: border-box;
  height: 100%;
  background: #fff;
  border: 1px solid var(--fx-linea);
  border-radius: var(--fx-radio);
  padding: 34px 32px;
  box-shadow: var(--fx-sombra);
}
body.fx-premium.page-id-132 .et_pb_blurb .et_pb_module_header {
  font-size: 22px !important;
  margin-bottom: 14px;
}
body.fx-premium.page-id-132 .et_pb_blurb .et-pb-icon {
  font-size: 28px !important;
  width: 60px;
  height: 60px;
  line-height: 60px !important;
  text-align: center;
  border-radius: 50%;
  background: var(--fx-verde-suave);
  color: var(--fx-verde) !important;
  padding: 0 !important;
}
body.fx-premium.page-id-132 .et_pb_blurb .et_pb_main_blurb_image { margin-bottom: 18px; }
body.fx-premium .et_pb_blurb ul {
  list-style: none !important;
  padding-left: 0 !important;
}
body.fx-premium .et_pb_blurb ul li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 8px;
}
body.fx-premium .et_pb_blurb ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .68em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--fx-verde);
}
body.fx-premium .et_pb_blurb .et_pb_main_blurb_image { margin-bottom: 22px; }
body.fx-premium .et_pb_blurb .et_pb_main_blurb_image img {
  border-radius: var(--fx-radio);
}
body.fx-premium.page-id-132 .et_pb_image .et_pb_image_wrap {
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--fx-sombra-grande);
}

/* Quiénes somos */
body.fx-premium.page-id-2 .et_pb_text h3 { margin: 38px 0 12px; }
body.fx-premium.page-id-2 .et_pb_text h3:first-child { margin-top: 0; }
body.fx-premium .fx-valores {
  list-style: none !important;
  padding: 0 !important;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px 32px;
}
body.fx-premium .fx-valores li {
  position: relative;
  padding-left: 30px;
}
body.fx-premium .fx-cargo {
  color: var(--fx-verde-texto) !important;
  font-weight: 600;
  font-size: 15px !important;
  margin-bottom: 12px;
}
body.fx-premium.page-id-2 .et_pb_blurb .et_pb_module_header { font-size: 23px !important; }
body.fx-premium.page-id-2 .et_pb_blurb .et_pb_main_blurb_image .et_pb_image_wrap {
  border-radius: var(--fx-radio);
  overflow: hidden;
  box-shadow: var(--fx-sombra);
}

/* El centro */
body.fx-premium .fx-figura { margin: 0 0 34px; }
body.fx-premium .fx-figura img {
  display: block;
  width: 100%;
  max-width: 760px;
  aspect-ratio: 725 / 560;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: var(--fx-sombra-grande);
}

/* Contacto: formulario */
body.fx-premium .et_pb_contact_form_container {
  background: #fff;
  border: 1px solid var(--fx-linea) !important;
  border-radius: var(--fx-radio);
  padding: 34px !important;
  box-shadow: var(--fx-sombra);
}
body.fx-premium .et_pb_contact_form_container .et_pb_contact_main_title { margin-bottom: 20px; }

/* Contacto: correo y teléfono en lugar del formulario (fisenf_formulario_enabled = 0) */
body.fx-premium .fx-sin-formulario {
  background: #fff;
  border: 1px solid var(--fx-linea);
  border-radius: var(--fx-radio);
  padding: 34px;
  box-shadow: var(--fx-sombra);
}
body.fx-premium .fx-sin-formulario h2 { margin: 0 0 8px; padding: 0; }
body.fx-premium .fx-sin-formulario p { margin: 0 0 22px; padding: 0; }
body.fx-premium .fx-sin-formulario .fx-dato {
  display: block;
  padding: 16px 0;
  border-top: 1px solid var(--fx-linea);
  text-decoration: none;
}
body.fx-premium .fx-sin-formulario .fx-dato span {
  display: block;
  font-size: 14px;
  color: var(--fx-tinta);
  opacity: .7;
}
body.fx-premium .fx-sin-formulario .fx-dato strong {
  display: block;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--fx-verde-texto);
  overflow-wrap: anywhere;
}
body.fx-premium .fx-sin-formulario .fx-dato:hover strong { text-decoration: underline; }
body.fx-premium .et_pb_contact_form .input,
body.fx-premium .et_pb_contact_form textarea.input {
  background: #fff !important;
  border: 1px solid #d6ded0 !important;
  border-radius: 12px !important;
  padding: 14px 16px !important;
  font-size: 16px !important;
  color: var(--fx-tinta) !important;
}
body.fx-premium .et_pb_contact_form .input:focus {
  border-color: var(--fx-verde) !important;
  box-shadow: 0 0 0 3px rgba(115, 180, 52, .2);
  outline: none;
}

/* Páginas legales: columna de lectura */
body.fx-premium .fx-seccion-legal .et_pb_row { max-width: 860px; }
body.fx-premium .fx-legal h2 { font-size: 24px !important; margin: 34px 0 12px; }
body.fx-premium .fx-legal h3 { font-size: 20px !important; margin: 26px 0 10px; }
body.fx-premium .fx-legal h4 { font-size: 18px !important; margin: 22px 0 8px; }
body.fx-premium .fx-legal ul { margin: 0 0 18px; }
body.fx-premium .fx-legal a { word-break: break-word; }

/* Enlaces legales del pie */
body.fx-premium #footer-info a { text-decoration: none; }
body.fx-premium #footer-info a:hover { color: #fff !important; }

/* ---------- Pie ---------- */

body.fx-premium #main-footer { background: var(--fx-oscuro) !important; }
body.fx-premium #footer-widgets { padding: 64px 0 36px !important; }
body.fx-premium #main-footer .footer-widget h4,
body.fx-premium #main-footer .footer-widget .title {
  color: var(--fx-verde) !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  letter-spacing: .12em !important;
  text-transform: uppercase !important;
}
body.fx-premium #main-footer .footer-widget,
body.fx-premium #main-footer .footer-widget p,
body.fx-premium #main-footer .footer-widget li,
body.fx-premium #main-footer .footer-widget a {
  color: rgba(255, 255, 255, .78) !important;
  font-size: 15px !important;
}
body.fx-premium #main-footer .footer-widget a:hover { color: #fff !important; }
body.fx-premium #footer-widgets .footer-widget { border-color: rgba(255, 255, 255, .1) !important; }
body.fx-premium #footer-bottom { background: rgba(0, 0, 0, .25) !important; }
body.fx-premium #footer-info,
body.fx-premium #footer-info a {
  color: rgba(255, 255, 255, .55) !important;
  font-size: 14px;
}

/* ---------- Móvil y tableta ---------- */

/* Icono del menú móvil en el verde corporativo */
body.fx-premium .mobile_menu_bar::before,
body.fx-premium .mobile_menu_bar:before {
  color: var(--fx-verde) !important;
}

/* Formulario de contacto: en móvil, un campo por fila (Divi 5 los deja en dos columnas) */
@media (max-width: 767px) {
  body.fx-premium .et_pb_contact_form .et_pb_contact_field,
  body.fx-premium .et_pb_contact_form .et_pb_contact_field_half,
  body.fx-premium .et_pb_contact_form .et_pb_contact_field_last {
    width: 100% !important;
    flex-basis: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    float: none !important;
  }
}

@media (max-width: 980px) {
  body.fx-premium .fx-hero { padding: 40px 0 56px !important; }
  body.fx-premium .fx-hero-imagen { margin-top: 36px !important; }
  body.fx-premium .fx-hero-imagen::before { right: -10px; bottom: -10px; }
  body.fx-premium .fx-hero .et_pb_button_module_wrapper {
    display: block;
    margin: 12px 0 0 !important;
  }
  body.fx-premium .fx-hero .et_pb_button {
    display: block;
    text-align: center;
  }
  body.fx-premium .fx-seccion-intro,
  body.fx-premium .fx-seccion-servicios,
  body.fx-premium .fx-seccion-info { padding: 56px 0 !important; }
  body.fx-premium .fx-servicios .et_pb_column,
  body.fx-premium .fx-tarjetas .et_pb_column,
  body.fx-premium.page-id-132 .et_pb_column { margin-bottom: 22px !important; }
}
