/* Cabecera blanca en flujo: no tapa el contenido ni depende de JavaScript. */
.wp-site-blocks > header.wp-block-template-part { position: relative; z-index: 20; }
.site-header { background: var(--color-white); color: var(--color-secondary); border-bottom: 1px solid var(--color-border); padding: var(--space-s) var(--gutter); }
.site-header__inner { max-width: 90rem; margin-inline: auto; display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-xs); }
.site-logo-link { display: inline-flex; margin-right: auto; flex-shrink: 0; }
.site-logo { display: block; width: clamp(7rem, 12vw, 11rem); height: auto; }
.site-logo-text { color: var(--color-primary); font-size: var(--text-xl); font-weight: 700; }
.site-header__nav { display: none; gap: var(--space-s); align-items: center; }
.header-nav__link { display: inline-flex; align-items: center; min-height: 2.75rem; color: var(--color-secondary); font-size: var(--text-s); text-decoration: none; }
.header-nav__link:hover, .header-nav__link[aria-current] { color: var(--color-primary); text-decoration: underline; text-underline-offset: .35em; }
.site-header__actions { display: flex; align-items: center; gap: var(--space-s); }
.header-phone { color: var(--color-secondary); font-size: var(--text-s); font-weight: 700; font-variant-numeric: tabular-nums; }
.site-header__actions .header-phone { display: none; }
.header-cta-btn { display: inline-flex; align-items: center; min-height: 2.75rem; padding: var(--space-2xs) var(--space-xs); background: var(--color-primary); color: var(--color-white); font-size: var(--text-xs); text-decoration: none; }
.header-cta-btn:hover { background: var(--color-primary-dark); color: var(--color-white); }
.header-menu { margin-left: auto; }
.header-menu > summary { display: flex; align-items: center; gap: var(--space-2xs); min-height: 2.75rem; cursor: pointer; list-style: none; font-size: var(--text-s); }
.header-menu > summary::-webkit-details-marker { display: none; }
.header-menu__mark { width: 1rem; height: .5rem; border-block: 1px solid currentColor; }
.header-menu[open] .header-menu__mark { height: 1px; border-bottom: 0; }
.header-menu[open] { width: 100%; }
.header-menu[open] > summary { justify-content: flex-end; }
.header-menu__panel { padding-top: var(--space-s); background: var(--color-white); display: flex; flex-direction: column; }
.header-menu__panel .header-nav__link { border-top: 1px solid var(--color-border); font-size: var(--text-l); padding-block: var(--space-xs); }
.header-menu__panel .header-phone { padding-block: var(--space-s); }
/* Enlace al archivo y control nativo independiente: Tab, Enter y Espacio, sin JS. */
.header-nav__group { position: relative; }
.header-nav__group > .header-nav__link { display: flex; padding-right: 2.75rem; }
.header-submenu > summary { position: absolute; inset: 0 0 auto auto; display: flex; align-items: center; justify-content: center; min-height: 2.75rem; width: 2.75rem; cursor: pointer; list-style: none; }
.header-submenu > summary::-webkit-details-marker { display: none; }
.header-submenu__mark { width: .5rem; height: .5rem; border-right: 1px solid currentColor; border-bottom: 1px solid currentColor; transform: rotate(45deg); }
.header-submenu[open] .header-submenu__mark { transform: rotate(225deg); }
.header-submenu__list { list-style: none; margin: 0; padding: 0; }
.header-submenu__list .header-nav__link { display: flex; padding: var(--space-xs); }
.header-menu__panel .header-submenu > summary { min-height: calc(2.75rem + 2 * var(--space-xs)); }
.header-menu__panel .header-submenu__list { padding-left: var(--space-s); border-left: 1px solid var(--color-border); }
.header-menu__panel .header-submenu__list .header-nav__link { font-size: var(--text-s); }
@media (min-width: 48rem) { .site-header__actions .header-phone { display: flex; } }
@media (min-width: 75rem) {
  .site-header__nav, .site-header__actions .header-phone { display: flex; }
  .header-menu { display: none; }
  .site-header__inner { flex-wrap: nowrap; gap: var(--space-m); }
  .header-submenu__list { position: absolute; top: 100%; left: 0; width: 20rem; max-height: 70svh; overflow-y: auto; background: var(--color-white); border: 1px solid var(--color-border); }
  .header-submenu__list li + li { border-top: 1px solid var(--color-border); }
  .header-submenu__list .header-nav__link:focus-visible { outline-offset: -.3rem; }
}
@media (max-width: 23rem) {
  .site-header__inner { column-gap: var(--space-2xs); }
  .header-menu { width: 100%; }
  .header-menu > summary { justify-content: flex-end; }
}

/* ==========================================================================
   SITE FOOTER
   ========================================================================== */

.is-layout-flow > .site-footer,
.wp-site-blocks > footer .site-footer {
  margin-block-start: 0 !important;
  margin-block-end: 0 !important;
}

.site-footer {
  position: relative;
  background: var(--color-secondary);
  color: rgba(255, 255, 255, 0.7);
  padding: var(--space-2xl) var(--space-s) var(--space-l);
}

.site-footer__inner {
  max-width: var(--wide-width);
  margin: 0 auto;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

/* Brand column */
.site-footer__logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  margin-bottom: var(--space-s);
}
.site-footer__logo-img {
  height: 28px;
  width: auto;
  display: block;
}
.site-footer__logo-text {
  color: #fff;
  font-size: var(--text-xl);
  font-weight: 700;
}

.site-footer__tagline {
  font-size: var(--text-s);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.5);
  margin: 0 0 var(--space-m) 0;
  max-width: 300px;
}

/* Social */
.site-footer__social {
  display: flex;
  gap: 12px;
}
.site-footer__social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.6);
  transition: background 0.2s ease, color 0.2s ease;
}
.site-footer__social-link:hover {
  background: var(--color-primary);
  color: #fff;
}

/* Link columns */
.site-footer__heading {
  font-size: var(--text-s);
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 var(--space-s) 0;
}

.site-footer__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.site-footer__list a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-size: var(--text-s);
  transition: color 0.2s ease;
}
.site-footer__list a:hover {
  color: var(--color-primary);
}

/* Bottom bar */
.site-footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-s);
  padding-top: var(--space-m);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.site-footer__copy,
.site-footer__legal,
.site-footer__credit {
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.4);
  margin: 0;
}
.site-footer__legal a,
.site-footer__credit a {
  color: rgba(255, 255, 255, 0.4);
  text-decoration: none;
  transition: color 0.2s ease;
}
.site-footer__legal a:hover {
  color: rgba(255, 255, 255, 0.7);
}
.site-footer__credit a:hover {
  color: var(--color-primary);
}

/* Contact list with icons */
.site-footer__contact-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.site-footer__contact-row svg {
  flex-shrink: 0;
  opacity: 0.6;
}

/* Horario realtime */
.footer-horario__status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
  margin-bottom: 12px;
  font-size: var(--text-xs);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
}

.footer-horario__dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  flex-shrink: 0;
}
.footer-horario--abierto .footer-horario__dot {
  background: #4ade80;
}
.footer-horario--abierto .footer-horario__dot::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: rgba(74, 222, 128, 0.5);
  z-index: -1;
  animation: horarioPulse 2.5s ease-in-out infinite;
}
.footer-horario--cerrado .footer-horario__dot {
  background: #f87171;
}

@keyframes horarioPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.footer-horario__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.footer-horario__day {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
  padding: 2px 0;
  border-radius: 4px;
}
.footer-horario__day--hoy {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 6px;
  margin: 0 -6px;
}
.footer-horario__day--cerrado .footer-horario__day-hours {
  color: rgba(255, 255, 255, 0.25);
  font-style: italic;
}
.footer-horario__day-name {
  flex-shrink: 0;
}
.footer-horario__day-hours {
  text-align: right;
  white-space: nowrap;
}
.footer-horario__next {
  margin-top: 8px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
}

/* Responsive footer */
@media (max-width: 959px) {
  .site-footer__grid {
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: var(--space-l);
  }
  .site-footer__col--horario {
    grid-column: 1 / -1;
  }
  .footer-horario__list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px 24px;
  }
}

@media (max-width: 767px) {
  .site-footer__grid {
    grid-template-columns: 1fr;
    gap: var(--space-l);
  }
  .site-footer__col--horario {
    grid-column: auto;
  }
  .footer-horario__list {
    grid-template-columns: 1fr;
  }
  .site-footer__bottom {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}
