.site-footer {
  --footer-bg: #F8F8F6;
  --footer-text: #111111;
  --footer-muted: #555550;
  --footer-accent: #8A8A87;
  box-sizing: border-box;
  width: 100%;
  background: var(--footer-bg);
  color: var(--footer-text);
  margin-top: 0;
  border-top: 1px solid #E5E5E2;
  padding: 0;
  font-family: inherit;
}

/* WordPress añade blockGap entre los hijos directos de .wp-site-blocks. */
body .wp-site-blocks > footer.wp-block-template-part:has(.site-footer) {
  margin-block-start: 0;
}

.site-footer *,
.site-footer *::before,
.site-footer *::after {
  box-sizing: border-box;
}

.site-footer-inner {
  width: 100%;
  max-width: 1440px !important;
  margin: 0 auto;
}

.site-footer-main-grid.wp-block-columns {
  display: grid;
  grid-template-columns: 1.15fr .95fr .9fr;
  gap: 0;
  margin: 0;
  border-bottom: 1px solid #E5E5E2;
}

.site-footer-main-grid > .wp-block-column,
.site-footer-sub-bar > .wp-block-column {
  min-width: 0;
  margin: 0;
}

.site-footer .site-footer-sub-col {
  display: flex;
  align-items: center;
  padding: 20px 48px;
}

.site-footer .site-footer-col {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 48px;
}

.site-footer-contact,
.site-footer-tickets {
  border-right: 1px solid #E5E5E2;
}

.site-footer-tickets,
.site-footer-brand {
  align-items: center;
  text-align: center;
}

.site-footer .footer-col-tag {
  display: block;
  margin: 0 0 12px;
  color: #8A8A87;
  font-family: 'Roboto', sans-serif;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .16em;
  line-height: 1.4;
  text-transform: uppercase;
}

.site-footer .footer-venue-title {
  margin: 0 0 4px;
  color: #111111;
  font-family: 'Archivo', sans-serif;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;
  text-transform: uppercase;
}

.site-footer .footer-address-line {
  margin: 0 0 14px;
  color: #555550;
  font-family: 'Archivo', sans-serif;
  font-size: 12.5px;
  line-height: 1.5;
}

.site-footer .footer-contact-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: #555550;
  font-family: 'Archivo', sans-serif;
  font-size: 12px;
  line-height: 1.5;
}

.site-footer .footer-contact-list li {
  display: block;
}

.site-footer .footer-contact-list strong {
  color: #222220;
  font-weight: 700;
  margin-right: 4px;
}

.site-footer .footer-contact-list a,
.site-footer .footer-sub-legal a {
  color: inherit;
  text-decoration: none;
  text-underline-offset: 3px;
  transition: color .15s ease;
}

.site-footer .footer-contact-list a:hover,
.site-footer .footer-sub-legal a:hover {
  color: #111111;
  text-decoration: underline;
}

.site-footer .footer-contact-list a:focus-visible,
.site-footer .footer-sub-legal a:focus-visible,
.site-footer .footer-tickets-logo a:focus-visible,
.site-footer .footer-back-to-top a:focus-visible {
  outline: 2px solid #111111;
  outline-offset: 3px;
}

.site-footer .footer-tickets-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.site-footer .footer-tickets-card > :last-child {
  margin-bottom: 0;
}

/* Insignia de entradas: es el propio botón, con enlace a la venta. */
.site-footer .footer-tickets-logo {
  margin: 0;
}

.site-footer .footer-tickets-logo a {
  display: block;
  line-height: 0;
}

.site-footer .footer-tickets-logo img {
  width: auto;
  height: 48px;
}

.site-footer .footer-tickets-logo a:focus-visible {
  outline: 2px solid #111111;
  outline-offset: 3px;
}

.site-footer .footer-tickets-badge-wrap {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border: 1px solid #E2E2DE;
  border-radius: 8px;
  background: #FFFFFF;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .03);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.site-footer .footer-tickets-card:hover .footer-tickets-badge-wrap {
  transform: translateY(-2px);
  border-color: #C8C8C4;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .08);
}

.site-footer .footer-tickets-subtext {
  margin: 0;
  color: #7A7A76;
  font-family: 'Archivo', sans-serif;
  font-size: 11.5px;
  line-height: 1.5;
}

.site-footer .footer-gob-card {
  display: flex;
  min-height: 108px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 14px 26px;
  border: 1px solid #E2E2DE;
  border-radius: 8px;
  background: #FFFFFF;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .03);
}

/*
 * El bloque de imagen nace vacío (así se puede subir el logotipo desde el
 * Editor del sitio) y en la web no imprime nada. Cuando hay imagen, el texto
 * del wordmark deja de mostrarse para no duplicar el nombre.
 */
.site-footer .footer-gob-logo {
  margin: 0;
}

.site-footer .footer-gob-logo img {
  width: auto;
  max-width: 100%;
  max-height: 58px;
  object-fit: contain;
}

.site-footer .footer-gob-card:has(.footer-gob-logo) .footer-gob-wordmark,
.site-footer .footer-gob-card:has(.footer-gob-logo) .footer-gob-ministry {
  display: none;
}

.site-footer .footer-gob-wordmark {
  margin: 0 0 4px;
  color: #111111;
  font-family: 'Archivo', sans-serif;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.3;
  text-transform: uppercase;
}

.site-footer .footer-gob-ministry {
  margin: 0;
  color: #555550;
  font-family: 'Archivo', sans-serif;
  font-size: 12px;
  line-height: 1.5;
}

.site-footer-sub-bar.wp-block-columns {
  display: grid;
  grid-template-columns: 1.15fr .95fr .9fr;
  align-items: center;
  gap: 0;
  margin: 0;
  min-height: 80px;
}

.site-footer .footer-sub-copy p,
.site-footer .footer-sub-legal p {
  margin: 0;
}

.site-footer .footer-sub-copy {
  color: #777773;
  font-family: 'Archivo', sans-serif;
  font-size: 12px;
  line-height: 1.5;
}

.site-footer .footer-sub-legal {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 20px;
  border-right: 1px solid #E5E5E2;
  border-left: 1px solid #E5E5E2;
  color: #555550;
  font-family: 'Archivo', sans-serif;
  font-size: 12px;
  line-height: 1.7;
  flex-wrap: wrap;
  gap: 0 8px;
}

.site-footer .footer-sub-sep {
  color: #A0A09C;
}

.site-footer .footer-sub-social {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 48px;
  gap: 16px;
}

/* Iconos de redes sociales del bloque nativo de Gutenberg. */
.site-footer .footer-social-links {
  gap: 14px;
  margin: 0;
}

/*
 * El color va en el propio elemento de la red y no sólo en el enlace: WordPress
 * pinta cada icono con el color de su marca («logos only») y esa regla llega al
 * enlace por `currentColor`. Fijándolo aquí, el icono toma la paleta del pie.
 */
.site-footer .footer-social-links .wp-social-link,
.site-footer .footer-social-links .wp-social-link .wp-block-social-link-anchor {
  margin: 0;
  color: #555550;
}

.site-footer .footer-social-links .wp-block-social-link-anchor {
  padding: 4px;
  transition: color .2s ease, transform .2s ease;
}

.site-footer .footer-social-links svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.site-footer .footer-social-links .wp-social-link:hover,
.site-footer .footer-social-links .wp-social-link:hover .wp-block-social-link-anchor,
.site-footer .footer-social-links .wp-social-link .wp-block-social-link-anchor:hover {
  color: #111111;
}

.site-footer .footer-social-links .wp-social-link .wp-block-social-link-anchor:hover {
  transform: translateY(-2px);
}

.site-footer .footer-social-links .wp-block-social-link-anchor:focus-visible {
  outline: 2px solid #111111;
  outline-offset: 3px;
}

.site-footer .footer-social-links .wp-block-social-link-label {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/*
 * Botón de volver arriba: aunque vive en el pie, se muestra flotando en la
 * esquina inferior derecha en cuanto se hace scroll. Sin JavaScript se queda
 * oculto, que es exactamente el estado inicial previsto.
 */
.site-footer .footer-back-to-top {
  position: fixed;
  left: 15px;
  bottom: 24px;
  z-index: 150;
  margin: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity .3s ease, transform .3s ease;
}

.site-footer .footer-back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  /*left: 15px;*/
}

/*
 * En las fichas del histórico hay una pestaña fija pegada al borde derecho, a
 * esa misma altura: el botón se aparta para no pisarla.
 */
body:has(.historico-tab) .site-footer .footer-back-to-top {
  right: 76px;
}

.site-footer .footer-back-to-top .wp-block-button__link {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #111111;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .1);
  color: #FFFFFF;
  font-size: 0;
  text-decoration: none;
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}

.site-footer .footer-back-to-top .wp-block-button__link::before {
  width: 8px;
  height: 8px;
  border-top: 2px solid currentColor;
  border-left: 2px solid currentColor;
  content: '';
  transform: translateY(2px) rotate(45deg);
}

.site-footer .footer-back-to-top .wp-block-button__link:hover {
  transform: translateY(-2px);
  background: #333330;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .18);
  color: #FFFFFF;
}

/* Con movimiento reducido, el botón aparece sin transición. */
@media (prefers-reduced-motion: reduce) {
  .site-footer .footer-back-to-top {
    transition: none;
    transform: none;
  }
}

@media (max-width: 980px) {
  .site-footer-main-grid.wp-block-columns {
    grid-template-columns: minmax(0, 1fr);
  }

  .site-footer .site-footer-contact,
  .site-footer .site-footer-tickets {
    border-right: 0;
    border-bottom: 1px solid #E5E5E2;
  }

  .site-footer-sub-bar.wp-block-columns {
    grid-template-columns: minmax(0, 1fr);
  }

  .site-footer .site-footer-col {
    padding: 28px 24px;
  }

  .site-footer .site-footer-sub-col {
    padding: 16px 24px;
  }

  .site-footer .footer-sub-legal {
    justify-content: flex-start;
    border-top: 1px solid #E5E5E2;
    border-right: 0;
    border-bottom: 1px solid #E5E5E2;
    border-left: 0;
    text-align: left;
  }

  .site-footer .footer-sub-social {
    justify-content: space-between;
  }
}

@media (max-width: 480px) {
  .site-footer {
    padding: 0;
  }

  .site-footer .footer-sub-copy {
    max-width: 28ch;
  }
}