/**
 * Ajustes visuales compartidos, cargados después de los estilos distribuidos.
 * Conserva los colores de marca configurados en el personalizador.
 */
:root {
  --astro-bg-2: #f4f7fb;
  --astro-bg-3: #edf2f8;
  --astro-txt-2: #526278;
  --astro-txt-3: #64748b;
  --astro-border-1: #dce5ef;
  --astro-border-2: #c5d2e1;
  --astro-color-text-muted: #526278;
  --astro-color-border: #dce5ef;
  --astro-shadow-sm: 0 2px 8px rgb(22 46 91 / 4%);
  --astro-shadow-md: 0 8px 24px rgb(22 46 91 / 8%);
}

html {
  scroll-padding-top: 7rem;
}

.astro-wrapper {
  background: var(--astro-bg-2);
}

.astro-wrapper :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid #185fa5;
  outline-offset: 4px;
}

.astro-wrapper :where(h1, h2, h3, p, dd, a) {
  overflow-wrap: break-word;
}

.astro-nav {
  min-height: 76px;
  gap: 24px;
  padding: 16px max(24px, calc((100% - 1200px) / 2));
  border-bottom: 1px solid rgb(255 255 255 / 12%);
  box-shadow: 0 4px 18px rgb(15 29 48 / 8%);
}

.admin-bar .astro-nav {
  top: 32px;
}

.astro-nav__logo {
  flex-shrink: 0;
}

.astro-nav .astro-nav__site-name {
  font-size: 20px;
  font-weight: 750;
  letter-spacing: -.035em;
}

.astro-nav__logo .custom-logo-link img {
  display: block;
  max-width: 220px;
  max-height: 42px;
  height: auto;
  object-fit: contain;
}

.astro-nav__links {
  min-width: 0;
  margin-left: auto;
}

.astro-nav__menu {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
}

.astro-nav__menu > li > a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 12px;
  color: #e2eaf5;
  font-size: 14px;
  line-height: 1.4;
}

.astro-nav__menu li:focus-within > .sub-menu {
  display: block;
}

.astro-nav__menu .sub-menu {
  padding: 8px;
  border: 1px solid rgb(255 255 255 / 12%);
  border-radius: 12px;
}

.astro-nav__menu .sub-menu li a {
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 6px;
  white-space: normal;
}

.astro-nav__actions {
  flex-shrink: 0;
}

.astro-nav__hamburger,
.astro-nav__search-toggle,
.astro-drawer__close {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 10px;
  color: #fff;
}

.astro-nav__hamburger svg,
.astro-nav__search-toggle svg,
.astro-drawer__close svg {
  width: 20px;
  height: 20px;
}

.astro-nav :where(a, button):focus-visible,
.astro-drawer__header :where(a, button):focus-visible,
.astro-footer a:focus-visible {
  outline-color: #fff;
}

.astro-drawer {
  width: min(340px, calc(100vw - 32px));
  visibility: hidden;
  pointer-events: none;
}

.astro-drawer.is-open {
  visibility: visible;
  pointer-events: auto;
}

.astro-drawer__header {
  min-height: 80px;
  gap: 12px;
  padding: 16px 20px;
}

.astro-drawer__logo {
  min-width: 0;
}

.astro-drawer__logo .custom-logo-link img {
  display: block;
  max-width: 210px;
  max-height: 40px;
  height: auto;
  object-fit: contain;
}

.astro-drawer__nav {
  padding: 16px 12px;
}

.astro-drawer__menu li a {
  min-height: 48px;
  padding: 12px 16px;
  border-radius: 8px;
  color: var(--astro-txt-1);
  font-size: 15px;
  line-height: 1.5;
}

.astro-drawer__menu .sub-menu li a {
  padding-left: 30px;
  color: var(--astro-txt-2);
  font-size: 14px;
}

footer.astro-footer {
  min-height: 0;
  padding: 36px max(20px, calc((100% - 1200px) / 2)) 28px;
  border-top: 1px solid rgb(255 255 255 / 12%);
}

.astro-footer__widgets {
  gap: 32px;
  margin-bottom: 28px;
}

.astro-footer__col .astro-widget__title {
  font-size: 15px;
  line-height: 1.5;
}

.astro-footer__col .astro-widget ul li {
  font-size: 14px;
  line-height: 1.7;
}

.astro-footer__col .astro-widget ul li a {
  display: inline-block;
  padding-block: 4px;
}

.astro-footer__menu {
  gap: 4px 24px;
}

.astro-footer__menu li a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #e2eaf5;
  font-size: 14px;
  line-height: 1.5;
}

.astro-footer__bottom p {
  color: #d0dcec;
  font-size: 13px;
  line-height: 1.75;
}

.astro-breadcrumb {
  padding-block: 20px 16px;
}

.astro-breadcrumb__list {
  row-gap: 6px;
  font-size: 12px;
  line-height: 1.6;
}

@media (max-width: 1023px) {
  .astro-nav {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    gap: 12px;
    min-height: 76px;
    padding: 14px 20px;
  }

  .astro-nav__logo {
    position: static;
    left: auto;
    min-width: 0;
    max-width: 100%;
    justify-self: center;
    transform: none;
  }

  .astro-nav .astro-nav__site-name {
    font-size: clamp(15px, 3.5vw, 20px);
  }

  .astro-nav__logo .custom-logo-link img {
    max-width: 100%;
    max-height: 40px;
  }

  .astro-nav__logo .custom-logo-link {
    min-width: 0;
    max-width: 100%;
  }

  .astro-nav__links {
    display: none;
  }

  .astro-nav__hamburger {
    display: flex;
  }

  .astro-nav__actions {
    justify-self: end;
  }
}

/* El menú compacto también se usa en tablets: el CSS anterior corta en 768px. */
@media (min-width: 768px) and (max-width: 1023px) {
  .astro-drawer {
    display: flex !important;
  }

  .astro-drawer-overlay.is-open {
    display: block !important;
  }
}

@media (max-width: 782px) {
  .admin-bar .astro-nav {
    top: 46px;
  }
}

@media (max-width: 600px) {
  .admin-bar .astro-nav {
    top: 0;
  }

  .astro-nav {
    gap: 10px;
    min-height: 72px;
    padding: 12px 16px;
  }

  footer.astro-footer {
    padding: 28px 20px 24px;
  }

  .astro-footer__menu {
    gap: 2px 20px;
  }
}
