/* Ajustes visuales de EspaiNET sobre la base exportada. */
:root {
  --espainet-ink: #203047;
  --espainet-blue: #1762a0;
  --espainet-paper: #f4f8fc;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--espainet-ink);
  line-height: 1.65;
}

#main-content p { line-height: 1.7; }
#main-header { box-shadow: 0 1px 0 rgb(32 48 71 / 12%); }
#main-content .et_pb_button { border-radius: 8px; }
#main-content .et_pb_button:focus-visible,
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 3px solid #1685d0;
  outline-offset: 3px;
}

.home #main-content .et_pb_blog_grid .et_pb_post {
  border-radius: 14px;
  overflow: hidden;
  border-color: #e0e8ef;
  box-shadow: 0 8px 24px rgb(32 48 71 / 7%);
}

.static-panel {
  margin: 3rem auto;
  width: min(80%, 68rem);
  padding: clamp(1.25rem, 4vw, 3rem);
  border-radius: 14px;
  background: var(--espainet-paper);
}
.static-panel li { margin-block: .75rem; }
.static-panel a, .static-note a { color: var(--espainet-blue); text-decoration: underline; }
.static-note {
  padding: 1rem !important;
  margin-block: 1rem;
  background: var(--espainet-paper);
  color: var(--espainet-ink);
  border-radius: 8px;
}

.espainet-contact-form { margin-left: -3%; }
.espainet-contact-form .static-note { margin-left: 3%; clear: both; }

/* Cabecera y pie compartidos con la portada. */
#top-header, #main-footer, #footer-bottom { background-color: #101b32 !important; }
#footer-bottom { border-top: 1px solid #384862; }
#footer-info, #footer-info a, #footer-bottom .et-social-icon a { color: #d3dded !important; }
#footer-widgets .footer-widget h4 { color: #8de7ff; }

/* Cabecera compartida por las páginas exportadas. */
body.et_secondary_nav_enabled #page-container #top-header {
  background: #101b32 !important;
  color: #d3dded;
}
body #top-header #et-info {
  padding-block: .6rem;
  font-size: .875rem;
  font-weight: 600;
  line-height: 1.45;
}
#top-header #et-info a { color: #e7eef9; }
#top-header #et-info a:hover { color: #8de7ff; }

body #main-header {
  background: #fff;
  box-shadow: 0 1px 0 rgb(16 27 50 / 12%);
}
#main-header .et_menu_container,
#top-header > .container { width: min(1180px, calc(100% - clamp(2rem, 8vw, 7rem))); max-width: none; }
#main-header #logo { max-width: min(192px, 42vw); height: auto; }
#main-header #top-menu > li > a { color: #33435a; font-weight: 650; }
#main-header #top-menu > li > a:hover,
#main-header #top-menu > li.current-menu-item > a { color: #12589d; opacity: 1; }
#main-header #top-menu > li:last-child > a {
  background: #142a47;
  color: #fff;
  border-radius: .55rem;
  padding: .7rem .95rem;
}
#main-header #top-menu > li:last-child > a:hover { background: #12589d; color: #fff; }
#main-header :is(#et_search_icon, .mobile_menu_bar)::before { color: #192f4c; }
#main-header #top-menu .sub-menu,
#main-header .et_mobile_menu {
  border-top: 2px solid #2783ba;
  border-radius: 0 0 .75rem .75rem;
  box-shadow: 0 12px 26px rgb(16 27 50 / 14%);
}
#main-header #top-menu .sub-menu a:hover,
#main-header .et_mobile_menu a:hover { color: #12589d; background: #eff6fc; opacity: 1; }
@media (min-width: 981px) {
  #main-header #top-menu > li { padding-right: clamp(12px, 1.55vw, 24px); }
  #main-header #top-menu > li:last-child { padding-right: 0; }
  #main-header #et_top_search { margin-left: clamp(12px, 1.55vw, 24px); }
  #main-header #top-menu li:focus-within > .sub-menu { visibility: visible; opacity: 1; }
}
@media (max-width: 980px) {
  #main-header .et_menu_container { min-height: 64px; }
  #main-header #logo { max-width: min(176px, 54vw); }
  #main-header .et_mobile_menu { padding: .8rem 1rem; }
}
@media (max-width: 480px) {
  body #top-header #et-info { font-size: .8rem; }
  #top-header #et-info #et-info-phone { margin-right: .55rem; }
}

/* Menú de servicios por familias. */
.en-mega-title {
  display: block;
  padding: .65rem .75rem .35rem;
  color: #172f50;
  font-size: .92rem;
  font-weight: 750;
}
#main-header #top-menu .en-mega-links,
#main-header .et_mobile_menu .en-mega-links {
  list-style: none;
  padding: 0;
}
@media (min-width: 981px) {
  #main-header #top-menu > .en-mega { position: static; }
  #main-header #top-menu .en-mega-panel {
    inset: 100% 0 auto auto;
    width: min(940px, 100%);
    padding: 1.15rem;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .75rem;
    background: #fff;
  }
  #main-header #top-menu .en-mega-group,
  #main-header #top-menu .en-mega-links > li {
    display: block;
    padding: 0;
    width: auto;
  }
  #main-header #top-menu .en-mega-links {
    position: static;
    width: auto;
    border: 0;
    box-shadow: none;
    opacity: 1;
    visibility: inherit;
    background: transparent;
  }
  #main-header #top-menu .en-mega-links a {
    display: block;
    width: auto;
    padding: .48rem .75rem;
    border-radius: .45rem;
    color: #384b64;
    line-height: 1.35;
  }
  #main-header #top-menu .en-mega-panel > li + li { border-left: 1px solid #e3eaf2; }
}
@media (max-width: 980px) {
  #main-header .et_mobile_menu .en-mega-panel {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
    gap: .5rem;
    padding: .5rem 0;
  }
  #main-header .et_mobile_menu .en-mega-panel li { padding-left: 0; }
  #main-header .et_mobile_menu .en-mega-links a { padding: .5rem .75rem; }
}

/* Lectura y controles de las páginas interiores. */
body:not(.home) #main-content:not(.en-service-page) h1 {
  color: #172541;
  font-size: clamp(2rem, 5vw, 3.65rem);
  font-weight: 750;
  letter-spacing: -.035em;
}
body:not(.home) #main-content:not(.en-service-page) .et_pb_bg_layout_dark h1 { color: #fff; }
body:not(.home) #main-content:not(.en-service-page) .entry-content,
body:not(.home) #main-content:not(.en-service-page) .post-content { color: #33465f; }
body:not(.home) #main-content .et_pb_blog_grid .et_pb_post {
  border-radius: .9rem;
  overflow: hidden;
  border-color: #dce5ef;
  box-shadow: 0 7px 22px rgb(16 27 50 / 6%);
}
body:not(.home) #main-content .espainet-contact-form :is(input,textarea) { border-radius: .55rem; }

/* El mantenimiento se ofrece en todas las familias de servicios. */
#main-header #top-menu .en-mega-maintenance,
#main-header .et_mobile_menu .en-mega-maintenance {
  grid-column: 1 / -1;
  width: auto;
  padding: 0;
  border: 0;
}
#main-header #top-menu .en-mega-maintenance > a,
#main-header .et_mobile_menu .en-mega-maintenance > a {
  display: flex;
  flex-wrap: wrap;
  gap: .15rem 1rem;
  align-items: baseline;
  padding: .65rem .8rem;
  width: auto;
  border-radius: .5rem;
  background: #eaf3fb;
  color: #172f50;
  font-weight: 750;
}
.en-mega-maintenance span { color: #405775; font-size: .86rem; font-weight: 500; }

/* Acentos de la identidad editorial en los elementos compartidos. */
body #main-header { background: #fdfcf8; }
#main-header #top-menu > li:last-child > a {
  background: #2148a1;
  border-radius: .2rem;
}
#main-header #top-menu > li:last-child > a:hover { background: #173575; }
#main-header #top-menu .sub-menu, #main-header .et_mobile_menu { border-top-color: #d6532c; }
#main-header #top-menu .en-mega-panel { background: #fdfcf8; }

/* Asistente de servicios. */
.en-assistant {
  position: fixed;
  inset: auto max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) auto;
  z-index: 100001;
  color: #172343;
  font: 1rem/1.45 system-ui, sans-serif;
}
.en-assistant > summary {
  display: block;
  width: max-content;
  margin-left: auto;
  padding: .7rem 1rem;
  background: #2148a1;
  color: #fff;
  border: 1px solid #fff;
  border-radius: .25rem;
  box-shadow: 0 5px 16px #17234340;
  font-weight: 700;
  cursor: pointer;
}
.en-assistant > summary::-webkit-details-marker { display: none; }
.en-assistant-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + .6rem);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(25rem, calc(100vw - 2rem));
  max-height: min(33rem, calc(100dvh - 5.5rem));
  background: #fdfcf8;
  border: 1px solid #aeb8cc;
  border-top: 3px solid #d6532c;
  box-shadow: 0 10px 24px #17234339;
}
.en-assistant-head { display: flex; justify-content: space-between; align-items: center; gap: .75rem; background: #142548; color: #fff; padding: .7rem .85rem; }
.en-assistant-body { padding: .9rem; overflow: auto; overscroll-behavior: contain; }
.en-assistant-body p { padding: 0; }
.en-assistant-topics { display: flex; flex-wrap: wrap; gap: .35rem; margin-block: .8rem 1rem; }
.en-assistant button { font: inherit; font-size: .9rem; padding: .35rem .55rem; background: #edf2fb; color: #193879; border: 1px solid #9caccc; border-radius: .2rem; cursor: pointer; }
.en-assistant button:hover { background: #dce8f9; }
.en-assistant .en-assistant-close { background: transparent; color: #fff; border-color: #9caccc; }
.en-assistant .en-assistant-close:hover { background: #253e69; }
.en-assistant-form div { display: flex; gap: .45rem; margin-top: .3rem; }
.en-assistant-form input {
  min-width: 0;
  flex: 1;
  padding: .45rem .55rem;
  border: 1px solid #9caccc;
  background: #fff;
  color: #172343;
  font: inherit;
}
.en-assistant-answer:not(:empty) { margin-top: 1rem; padding-top: .8rem; border-top: 1px solid #c8d1df; }
.en-assistant-answer h2 { font: 750 1.1rem/1.3 system-ui, sans-serif; color: #172343; padding-bottom: .35rem; }
.en-assistant-answer ul { list-style: none; margin-top: .45rem; }
.en-assistant-answer a { color: #2148a1; text-decoration: underline; text-underline-offset: .15em; }
.en-assistant :is(summary, button, input, a):focus-visible { outline: 2px solid #2478ad; outline-offset: 3px; }

.en-assistant-actions { display: flex; flex-wrap: wrap; gap: .45rem .8rem; margin-top: .75rem; }
.en-assistant-actions a { color: #2148a1; font-weight: 700; text-decoration: underline; text-underline-offset: .15em; }

/* Aviso de cookies y formularios de contacto. */
.en-cookie-box {
  position: fixed;
  inset: auto auto max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  z-index: 100010;
  width: min(37rem, calc(100vw - 2rem));
  max-height: calc(100dvh - 2rem);
  overflow: auto;
  padding: clamp(1rem, 3vw, 1.65rem);
  color: #172343;
  background: #fdfcf8;
  border: 1px solid #aeb8cc;
  border-top: 3px solid #d6532c;
  box-shadow: 0 10px 24px #17234339;
  font: 1rem/1.5 system-ui, sans-serif;
}
.en-cookie-box[hidden] { display: none; }
.en-cookie-box h2 { color: inherit; font: 750 1.35rem/1.2 system-ui, sans-serif; }
.en-cookie-box a { color: #2148a1; text-decoration: underline; }
.en-cookie-actions { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: .9rem; }
.en-cookie-actions button, .en-external-placeholder button {
  background: #edf2fb;
  color: #193879;
  border: 1px solid #9caccc;
  border-radius: .2rem;
  padding: .6rem .8rem;
  font: 650 .9rem/1.35 system-ui, sans-serif;
  cursor: pointer;
}
.en-cookie-actions button:hover, .en-external-placeholder button:hover { background: #dce8f9; }
.en-cookie-settings { border: 0; background: transparent; padding: 0; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; }
.en-cookie-box :focus-visible, .en-cookie-settings:focus-visible { outline: 2px solid #2478ad; outline-offset: 3px; }
.en-external-media { aspect-ratio: 16 / 9; max-width: 46rem; }
.en-external-media iframe, .et_pb_map iframe { width: 100%; height: 100%; border: 0; }
.en-external-placeholder { display: grid; align-content: center; justify-items: center; text-align: center; height: 100%; padding: 1rem; background: #f3f6fa; color: #172343; }
.en-form-trap { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.en-form-status:not(:empty) { clear: both; margin: .9rem 0 0 3%; padding: .8rem; color: #172343; background: #edf2fb; }
.espainet-contact-form button:disabled { opacity: .7; cursor: wait; }

/* Icono flotante de Epi. */
.en-assistant > summary {
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  padding: 0;
  border-radius: 50%;
  list-style: none;
}
.en-assistant > summary::marker { content: ""; }
.en-assistant > summary:hover, .en-assistant[open] > summary { background: #173575; }

/* Acceso directo a WhatsApp, frente a Epi. */
.en-whatsapp-shortcut {
  position: fixed;
  inset: auto auto max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  z-index: 100001;
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  color: #fff;
  background: #17684d;
  border: 1px solid #fff;
  border-radius: 50%;
  box-shadow: 0 5px 16px #17234340;
}
.en-whatsapp-shortcut:hover { background: #0e503a; color: #fff; }
.en-whatsapp-shortcut:focus-visible { outline: 2px solid #17684d; outline-offset: 3px; }
.en-cookie-box {
  bottom: calc(max(1rem, env(safe-area-inset-bottom)) + 4.15rem);
  max-height: calc(100dvh - max(1rem, env(safe-area-inset-bottom)) - 5.15rem);
}

/* Servicios con títulos de categoría y descripciones. */
.en-mega-title {
  color: #172f50;
  border-bottom: 1px solid #b9c9de;
  margin: 0 .65rem .45rem;
  padding: .5rem 0;
}
#main-header :is(#top-menu, .et_mobile_menu) .en-mega-links a {
  display: grid;
  gap: .16rem;
  color: #172f50;
  font-weight: 700;
}
.en-mega-links small { color: #465e7c; font-size: .83rem; font-weight: 400; line-height: 1.4; }
@media (min-width: 981px) {
  #main-header #top-menu .en-mega-panel {
    width: min(1110px, 100%);
    max-height: min(36rem, calc(100dvh - 9rem));
    overflow: auto;
    gap: .8rem 1rem;
    padding: 1.1rem 1.25rem 1.25rem;
  }
  #main-header #top-menu .en-mega-panel > .en-mega-group + .en-mega-group { border-left: 0; }
}
@media (max-width: 980px) {
  #main-header .et_mobile_menu { max-height: calc(100dvh - 8.5rem); overflow-y: auto; overscroll-behavior: contain; }
  #main-header .et_mobile_menu .en-mega-links small { font-size: .8rem; }
}

/* Epi, acceso con retrato digital. */
.en-assistant > summary.en-assistant-launcher {
  display: flex;
  align-items: center;
  gap: .5rem;
  width: auto;
  height: 3.5rem;
  padding: .24rem .85rem .24rem .24rem;
  border-radius: 2rem;
  background: #193879;
}
.en-assistant > summary.en-assistant-launcher:hover,
.en-assistant[open] > summary.en-assistant-launcher { background: #142548; }
.en-epi-avatar {
  display: block;
  width: 2.9rem;
  height: 2.9rem;
  flex: none;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid #9db6ed;
}
.en-assistant-label { display: grid; line-height: 1.13; }
.en-assistant-label small { color: #e2edff; font-size: .75rem; font-weight: 500; }
.en-assistant-head-title { display: flex; align-items: center; gap: .55rem; }
.en-assistant-head .en-epi-avatar { width: 2.15rem; height: 2.15rem; }
