/* EMAPAPC — identidad institucional sobre el starter */

.eg-btn {
  border-radius: 10px;
  color: #fff !important;
}

.eg-btn--secondary {
  background: var(--eg-navy);
  border-color: var(--eg-navy);
  color: #fff !important;
}

.eg-btn--secondary:hover {
  background: color-mix(in srgb, var(--eg-navy) 88%, #000);
  border-color: var(--eg-navy);
  color: #fff !important;
}

.eg-site-header__cta {
  color: #fff !important;
}

.eg-sec {
  padding: 88px 24px;
  background: #fff;
}

.eg-sec--soft {
  background: #F5F8FC;
}

.eg-page-sec.eg-sec,
.eg-contact-sec.eg-page-sec {
  padding-top: 64px;
  padding-bottom: 88px;
}

.eg-ph {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 180px;
  aspect-ratio: var(--eg-ph-ratio, 16 / 9);
  padding: 24px;
  border: 1px dashed color-mix(in srgb, var(--eg-navy) 28%, transparent);
  border-radius: 16px;
  background:
    repeating-linear-gradient(
      -45deg,
      color-mix(in srgb, var(--eg-navy) 4%, transparent),
      color-mix(in srgb, var(--eg-navy) 4%, transparent) 10px,
      color-mix(in srgb, var(--eg-primary) 6%, transparent) 10px,
      color-mix(in srgb, var(--eg-primary) 6%, transparent) 20px
    );
  color: var(--eg-navy);
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
}

.eg-media-frame {
  margin: 0;
  overflow: hidden;
  border-radius: 18px;
  background: var(--eg-bg-soft);
}

.eg-media-frame img,
.eg-media-frame .eg-ph {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.eg-split--manager {
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.7fr);
  align-items: center;
}

.eg-sec--photo .eg-media-frame--wide {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  overflow: hidden;
  aspect-ratio: 21 / 9;
  max-height: none;
}

.eg-sec--photo .eg-media-frame--wide img,
.eg-sec--photo .eg-media-frame--wide .eg-ph {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
}

.eg-sec--services-intro {
  padding-bottom: 28px;
}

.eg-sec--photo {
  padding-top: 8px;
  padding-bottom: 32px;
}

.eg-split--intro {
  grid-template-columns: minmax(0, 1fr) minmax(340px, 1.15fr);
  gap: clamp(28px, 5vw, 56px);
  align-items: center;
}

.eg-split--intro .eg-media-frame {
  min-height: 420px;
}

.eg-split--intro .eg-media-frame img,
.eg-split--intro .eg-media-frame .eg-ph {
  min-height: 420px;
}

.eg-split--intro.eg-split--image-left {
  grid-template-columns: minmax(340px, 1.15fr) minmax(0, 1fr);
}

.eg-split--intro.eg-split--image-left .eg-extra-section__content {
  grid-column: 2;
  grid-row: 1;
}

.eg-split--intro.eg-split--image-left .eg-media-frame {
  grid-column: 1;
  grid-row: 1;
}

.eg-hero-slider {
  position: relative;
  width: 100%;
  height: clamp(240px, 31.25vw, 600px);
  overflow: hidden;
  background: var(--eg-navy);
}

.eg-hero-slider__slides {
  position: absolute;
  inset: 0;
}

.eg-hero-slider__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.1s ease;
}

.eg-hero-slider__slide.is-active {
  opacity: 1;
}

.eg-hero-slider__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.eg-hero-slider__slide--empty .eg-ph {
  height: 100%;
  min-height: 0;
  aspect-ratio: auto;
  border: 0;
  border-radius: 0;
  color: #fff;
  background: var(--eg-navy);
}

.eg-page-hero {
  padding: 72px 24px 56px;
  background: var(--eg-navy);
  color: #fff;
}

.eg-page-hero.eg-page-hero--light {
  background: #fff;
  color: var(--eg-text);
}

.eg-page-hero.eg-page-hero--light .eg-sec__eyebrow {
  color: var(--eg-primary);
}

.eg-page-hero.eg-page-hero--light .eg-page-hero__title {
  color: var(--eg-navy);
}

.eg-page-hero.eg-page-hero--light .eg-page-hero__text {
  color: var(--eg-muted);
}

body.page-contacto,
body.page-contacto .eg-main {
  background: #fff;
}

body.page-contacto .eg-sec,
body.page-contacto .eg-sec--soft {
  background: #fff;
}

body.page-contacto .eg-page-hero {
  background: var(--eg-navy);
  color: #fff;
}

.eg-page-hero .eg-sec__eyebrow {
  color: #9ad4f0;
}

.eg-page-hero__title {
  margin: 0 0 14px;
  color: #fff;
  font-size: clamp(32px, 4.4vw, 48px);
  letter-spacing: -0.035em;
}

.eg-page-hero__text {
  margin: 0 auto;
  max-width: 62ch;
  color: rgba(255, 255, 255, 0.86);
  font-size: 17px;
  line-height: 1.65;
}

.eg-page-hero__text p {
  margin: 0 0 12px;
}

.eg-page-hero__text p:last-child {
  margin-bottom: 0;
}

.eg-sec__header {
  max-width: 760px;
  margin-inline: auto;
  margin-bottom: clamp(32px, 5vw, 56px);
  text-align: center;
}

.eg-sec__header .eg-sec__title,
.eg-sec__header .eg-sec__text {
  margin-inline: auto;
}

.eg-page-hero .eg-sec__inner {
  text-align: center;
}

.eg-page-hero__text {
  margin-inline: auto;
}

.eg-lead {
  margin: 0;
  font-size: 18px;
  line-height: 1.7;
  color: var(--eg-text);
}

a[x-apple-data-detectors],
a[href^="x-apple-data-detectors:"],
.eg-sec__text a[href*="maps."],
.eg-page-hero__text a[href*="maps."] {
  color: inherit !important;
  text-decoration: none !important;
  font-weight: inherit !important;
  pointer-events: none;
}

.eg-card {
  background: #fff;
  border: 0;
  box-shadow: 0 18px 44px rgba(7, 41, 106, 0.08);
}

.eg-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin-bottom: 16px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--eg-primary) 16%, #fff);
  color: var(--eg-navy);
  line-height: 0;
  overflow: visible;
}

.eg-card__icon svg {
  display: block;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  overflow: visible;
}

.eg-steps .eg-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.eg-card--link,
.eg-hub-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-decoration: none !important;
  color: inherit;
}

.eg-card__more {
  margin-top: auto;
  padding-top: 12px;
  color: var(--eg-primary);
  font-size: 14px;
  font-weight: 700;
}

.eg-person__name {
  margin: 0 0 4px;
  color: var(--eg-navy);
  font-size: 22px;
  font-weight: 700;
}

.eg-person__role {
  margin: 0 0 16px;
  color: var(--eg-primary);
  font-size: 14px;
  font-weight: 600;
}

.eg-mission-grid,
.eg-hours-grid,
.eg-hub-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.eg-card--quote p {
  font-size: 16px;
  line-height: 1.7;
}

.eg-req-list {
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.eg-req-list li {
  position: relative;
  padding: 14px 16px 14px 48px;
  border: 1px solid var(--eg-border);
  border-radius: 12px;
  background: #fff;
}

.eg-req-list li::before {
  counter-increment: req;
  content: counter(req, decimal-leading-zero);
  position: absolute;
  left: 14px;
  top: 14px;
  color: var(--eg-primary);
  font-size: 13px;
  font-weight: 700;
}

.eg-tramites {
  counter-reset: req;
}

.eg-callout {
  padding: 24px 28px;
  border-radius: 16px;
  background: var(--eg-navy);
  color: #fff;
}

.eg-callout h3,
.eg-callout p {
  color: #fff;
}

.eg-callout p {
  margin: 0;
}

.eg-comms-sec {
  overflow: hidden;
}

.eg-comms {
  overflow: hidden;
  width: 100%;
  margin-top: 8px;
}

.eg-comms__track {
  display: flex;
  gap: 18px;
  width: max-content;
  animation: eg-comms 38s linear infinite;
}

.eg-comms__track:hover {
  animation-play-state: running;
}

.eg-comms__item {
  flex: 0 0 260px;
  margin: 0;
  overflow: hidden;
  border-radius: 16px;
  background: #fff;
  aspect-ratio: 4 / 5;
}

.eg-comms__item img,
.eg-comms__item .eg-ph {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@keyframes eg-comms {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.eg-hub-card {
  padding: 32px 28px;
  border: 1px solid var(--eg-border);
  border-radius: 18px;
  background: #fff;
}

.eg-hub-card:hover {
  border-color: color-mix(in srgb, var(--eg-primary) 50%, transparent);
}

.eg-hub-card__kicker {
  color: var(--eg-primary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eg-hub-card h3 {
  margin: 0;
  color: var(--eg-navy);
  font-size: 28px;
}

.eg-hub-note {
  max-width: 68ch;
  margin: 32px auto 0;
  color: var(--eg-muted);
  text-align: center;
}

.eg-coming {
  max-width: 640px;
  padding: 36px 32px;
  border: 1px dashed color-mix(in srgb, var(--eg-navy) 24%, transparent);
  border-radius: 18px;
  background: #fff;
}

.eg-hours-sec {
  padding-bottom: 24px;
}

.eg-hours-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.eg-video-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.eg-video-card {
  position: relative;
  overflow: hidden;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 18px;
  aspect-ratio: 4 / 5;
  background: #0c1d4d;
  box-shadow: 0 18px 44px rgba(7, 41, 106, 0.12);
}

.eg-video-card__preview,
.eg-video-card__preview iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: none;
}

.eg-video-card__preview iframe {
  transform: scale(1.12);
  transform-origin: center top;
}

.eg-video-card__open {
  position: absolute;
  inset: 0;
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.eg-video-card__open:focus-visible {
  outline: 2px solid #fff;
  outline-offset: -6px;
}

.eg-cta-panel .eg-btn {
  flex-shrink: 0;
  white-space: nowrap;
}

.eg-fb-sec__cta {
  margin: 28px 0 0;
  text-align: center;
}

.eg-phone {
  display: flex;
  justify-content: center;
}

.eg-phone__bezel {
  width: min(340px, 100%);
  padding: 14px 12px 18px;
  border-radius: 36px;
  background: #111;
  box-shadow:
    0 30px 60px rgba(7, 41, 106, 0.2),
    inset 0 0 0 2px #2a2a2a;
}

.eg-phone__speaker {
  display: block;
  width: 92px;
  height: 8px;
  margin: 0 auto 12px;
  border-radius: 999px;
  background: #2b2b2b;
}

.eg-phone__screen {
  overflow: hidden;
  height: 560px;
  border-radius: 24px;
  background: #fff;
}

.eg-phone__screen iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

body.eg-lightbox-open {
  overflow: hidden;
}

.eg-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: grid;
  place-items: center;
  padding: 24px;
}

.eg-lightbox[hidden] {
  display: none;
}

.eg-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 41, 106, 0.78);
}

.eg-lightbox__dialog {
  position: relative;
  z-index: 1;
  width: min(420px, calc(100vw - 32px));
}

.eg-lightbox__close {
  position: absolute;
  top: -44px;
  right: 0;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--eg-navy);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.eg-lightbox__frame {
  overflow: hidden;
  width: 100%;
  height: min(74vh, 680px);
  border-radius: 16px;
  background: #000;
}

.eg-lightbox__frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

body.page-galeria .eg-main {
  background: #e9edf1;
}

body.page-galeria .eg-page-hero {
  background: var(--eg-navy);
  color: #fff;
}

.eg-gallery-sec {
  background: #e4e9ee;
}

.eg-gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.eg-gallery-item {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 16px;
  appearance: none;
  background: #d7dde4;
  cursor: zoom-in;
  aspect-ratio: 4 / 3;
}

.eg-gallery-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.eg-gallery-item:hover img,
.eg-gallery-item:focus-visible img {
  transform: scale(1.04);
}

.eg-gallery-item:focus-visible {
  outline: 3px solid var(--eg-primary);
  outline-offset: 3px;
}

.eg-gallery-empty {
  margin: 0;
  color: var(--eg-muted);
  font-size: 17px;
}

.eg-lightbox--image .eg-lightbox__dialog--photo {
  width: min(1080px, calc(100vw - 32px));
}

.eg-lightbox__photo {
  margin: 0;
  display: grid;
  place-items: center;
  max-height: 82vh;
}

.eg-lightbox__photo img {
  display: block;
  max-width: 100%;
  max-height: 82vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  background: #111;
}

.eg-lightbox__nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 44px;
  height: 44px;
  margin-top: -22px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--eg-navy);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.eg-lightbox__nav--prev {
  left: -8px;
}

.eg-lightbox__nav--next {
  right: -8px;
}

.eg-lightbox__count {
  position: absolute;
  right: 0;
  bottom: -36px;
  margin: 0;
  color: #fff;
  font-size: 13px;
}

.eg-lotaip__tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.eg-lotaip__tab {
  padding: 22px 18px;
  border: 1px solid var(--eg-border);
  border-radius: 16px;
  background: #fff;
  color: var(--eg-navy);
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 18px 44px rgba(7, 41, 106, 0.08);
}

.eg-lotaip__tab.is-active {
  border-color: var(--eg-primary);
  background: color-mix(in srgb, var(--eg-primary) 12%, #fff);
}

.eg-lotaip__years {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 8px 0 22px;
}

.eg-lotaip__chip {
  padding: 8px 16px;
  border: 1px solid var(--eg-border);
  border-radius: 999px;
  background: #fff;
  color: var(--eg-navy);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.eg-lotaip__chip.is-active {
  background: var(--eg-navy);
  border-color: var(--eg-navy);
  color: #fff;
}

.eg-lotaip__empty {
  margin: 8px 0 0;
  color: var(--eg-muted);
  text-align: center;
}

.eg-acc-group {
  display: grid;
  gap: 12px;
}

.eg-acc {
  scroll-margin-top: 110px;
  border: 1px solid var(--eg-border);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 14px 36px rgba(7, 41, 106, 0.06);
  overflow: hidden;
}

.eg-acc__trigger {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border: 0;
  background: #fff;
  color: var(--eg-navy);
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.eg-acc.is-open .eg-acc__trigger {
  background: color-mix(in srgb, var(--eg-primary) 10%, #fff);
}

.eg-acc__icon {
  display: inline-flex;
  color: var(--eg-primary);
  transition: transform 0.28s ease;
}

.eg-acc.is-open .eg-acc__icon {
  transform: rotate(180deg);
}

.eg-acc__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.32s ease;
}

.eg-acc.is-open .eg-acc__panel {
  grid-template-rows: 1fr;
}

.eg-acc__inner {
  overflow: hidden;
  min-height: 0;
}

.eg-acc__body {
  padding: 4px 20px 18px;
  border-top: 1px solid color-mix(in srgb, var(--eg-border) 70%, transparent);
}

.eg-acc__body h3 {
  margin: 12px 0 16px;
  color: var(--eg-navy);
  font-size: 18px;
}

.eg-acc-group--nested {
  gap: 10px;
  margin-top: 10px;
}

.eg-acc-group--nested .eg-acc {
  box-shadow: none;
}

.eg-acc-group--nested .eg-acc__trigger {
  padding: 12px 16px;
  font-size: 15px;
}

.eg-lotaip__list {
  margin: 0 0 8px;
  padding: 0;
  list-style: none;
}

.eg-lotaip__list li {
  padding: 8px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--eg-border) 70%, transparent);
}

.eg-lotaip__list a {
  color: var(--eg-navy);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.eg-lotaip__list span {
  color: var(--eg-muted);
}

@media (max-width: 900px) {
  .eg-mission-grid,
  .eg-hours-grid,
  .eg-hub-grid,
  .eg-split--manager,
  .eg-split--intro,
  .eg-split--intro.eg-split--image-left {
    grid-template-columns: 1fr;
  }

  .eg-split--intro.eg-split--image-left .eg-extra-section__content,
  .eg-split--intro.eg-split--image-left .eg-media-frame {
    grid-column: auto;
    grid-row: auto;
  }

  .eg-split--intro .eg-media-frame,
  .eg-split--intro .eg-media-frame img,
  .eg-split--intro .eg-media-frame .eg-ph {
    min-height: 280px;
  }

  .eg-video-grid,
  .eg-comms {
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .eg-video-grid {
    display: flex;
    gap: 14px;
  }

  .eg-video-grid::-webkit-scrollbar,
  .eg-comms::-webkit-scrollbar {
    display: none;
  }

  .eg-video-card {
    flex: 0 0 68%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  .eg-video-card__open {
    touch-action: pan-x;
  }

  .eg-comms__track {
    animation: none;
    width: max-content;
  }

  .eg-comms__item {
    flex: 0 0 calc((100vw - 48px) * 0.68);
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  .eg-comms__item img {
    pointer-events: none;
    -webkit-user-drag: none;
    user-select: none;
  }

  .eg-phone__bezel {
    width: min(100%, 340px);
  }

  .eg-lotaip__tabs {
    grid-template-columns: 1fr;
  }

  .eg-sec--photo .eg-media-frame--wide {
    aspect-ratio: 16 / 9;
  }

  .eg-gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .eg-lightbox__nav--prev {
    left: 8px;
  }

  .eg-lightbox__nav--next {
    right: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .eg-hero-slider__slide {
    transition: none;
  }

  .eg-comms__track {
    animation: none;
  }

  .eg-acc__panel {
    transition: none;
  }

  .eg-acc__icon {
    transition: none;
  }
}

@media (prefers-reduced-motion: reduce) and (min-width: 901px) {
  .eg-comms__track {
    flex-wrap: wrap;
    width: 100%;
    justify-content: center;
  }
}
