:root {
  --background: #210025;
  --foreground: #fff9ff;
  --purple: #4d0a58;
  --purple-deep: #24002b;
  --purple-light: #c7a6ce;
  --paper: #fffafd;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: Arial, Helvetica, sans-serif;
}

.page-shell {
  width: 100%;
}

.hero {
  position: relative;
  display: grid;
  min-height: 100svh;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(0, 29, 18, 0.82) 0%, rgba(5, 49, 30, 0.2) 52%, rgba(0, 30, 19, 0.55) 100%),
    url("/images/fondo-fam.jpeg") center / cover no-repeat;
  isolation: isolate;
}

.hero-overlay {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 34, 17, 0.08), rgba(0, 49, 25, 0.58));
}

.hero-content {
  align-self: center;
  width: min(630px, calc(100% - 48px));
  margin: 80px 0 96px clamp(24px, 9vw, 145px);
}

.hero-kicker,
.section-kicker {
  margin: 0 0 12px;
  color: var(--purple-light);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero h1,
.map-intro h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
}

.hero h1 {
  max-width: 660px;
  font-size: clamp(3.8rem, 9vw, 8.4rem);
  line-height: 0.83;
  letter-spacing: -0.075em;
  text-wrap: balance;
}

.hero-copy {
  max-width: 410px;
  margin: 30px 0;
  color: #f3e8f4;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.1rem, 1.8vw, 1.4rem);
  line-height: 1.5;
}

.live-button {
  display: inline-flex;
  align-items: center;
  gap: 34px;
  padding: 17px 20px 17px 22px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  background: var(--paper);
  color: #31003a;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-decoration: none;
  text-transform: uppercase;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.live-button span {
  font-size: 1.2rem;
  line-height: 0;
}

.live-button:hover,
.live-button:focus-visible {
  background: #aa76b4;
  color: #fff;
  outline: 0;
  transform: translateY(-3px);
}

.live-button[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.7;
}

.live-button[aria-disabled="true"]:hover,
.live-button[aria-disabled="true"]:focus-visible {
  background: var(--paper);
  color: #31003a;
  outline: 0;
  transform: none;
}

.day-nav {
  position: absolute;
  top: 90px;
  left: 50%;
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  gap: clamp(8px, 2vw, 24px);
  width: min(1040px, calc(100% - 48px));
  max-width: none;
  transform: translateX(-50%);
}

.day-link {
  min-width: 0;
  min-height: 44px;
  flex: 1 1 0;
  padding: 11px 12px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 9px 0 #050006;
  color: #3d0646;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(0.85rem, 1.55vw, 1.45rem);
  font-weight: 500;
  letter-spacing: -0.06em;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.day-link:hover,
.day-link:focus-visible,
.day-link.is-active {
  background: #e9d7eb;
  color: #3d0646;
  outline: 0;
  transform: translateY(-3px);
}

.day-nav[hidden],
.day-link[hidden] {
  display: none !important;
}

.hero-instruction {
  position: absolute;
  right: clamp(24px, 8vw, 125px);
  bottom: 35px;
  max-width: 350px;
  margin: 0;
  color: #f2ddf5;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  line-height: 1.45;
  text-align: right;
}

.map-intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 50px clamp(24px, 9vw, 145px) 32px;
  background: var(--purple-deep);
}

.map-intro h2 {
  font-size: clamp(2.3rem, 4vw, 4.2rem);
  line-height: 0.95;
}

.back-to-top {
  color: var(--purple-light);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-decoration: none;
  text-transform: uppercase;
}

.back-to-top:hover,
.back-to-top:focus-visible {
  color: #fff;
  outline: 0;
}

.map-section {
  position: relative;
  height: min(850px, 100svh);
}

.leaflet-map {
  width: 100%;
  height: 100%;
}

.vector-map {
  width: 100%;
  height: 100%;
}

.map-unavailable {
  position: absolute;
  z-index: 2;
  top: 80px;
  right: 24px;
  width: min(340px, calc(100% - 370px));
  margin: 0;
  border: 1px solid #3d0746;
  padding: 14px 16px;
  background: var(--paper);
  box-shadow: 5px 5px 0 #3d0746;
  color: #210025;
  line-height: 1.4;
  text-align: center;
}

.map-location {
  margin: 0;
  padding: 9px 16px;
  color: #3d0746;
  font-size: 0.82rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.maplibregl-ctrl-group {
  overflow: hidden;
  border: 1px solid #6f3578 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.maplibregl-ctrl-group button {
  width: 32px;
  height: 32px;
}

.maplibregl-ctrl-group button + button {
  border-top: 1px solid #c7a6ce;
}

.maplibregl-ctrl-attrib {
  background: rgba(255, 255, 255, 0.88) !important;
  color: #000 !important;
}

.live-location-marker {
  width: 56px;
  height: 70px;
  background: url('/images/puntero-corona-temporal.png') center / contain no-repeat;
  filter: drop-shadow(0 1px 2px #fff);
  pointer-events: none;
}

.leaflet-control-zoom a {
  border-color: #6f3578 !important;
  background: #fff !important;
  color: #3d0746 !important;
}

.leaflet-control-zoom a:hover,
.leaflet-control-attribution {
  background: #f4f4f4 !important;
  color: #000 !important;
}

.leaflet-control-attribution {
  background: rgba(255, 255, 255, 0.88) !important;
  color: #000 !important;
}

.leaflet-control-attribution a {
  color: #0050a4 !important;
}

.procession-stack {
  position: absolute;
  z-index: 1000;
  top: 24px;
  left: 24px;
  width: min(320px, calc(100% - 48px));
}

.procession-card {
  border: 1px solid #3d0746;
  background: var(--paper);
  box-shadow: 7px 7px 0 #3d0746;
  color: #210025;
}

.procession-card h1,
.procession-card h2 {
  margin: 0;
  padding: 15px 16px 4px;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
}

.procession-name {
  margin: 0;
  border-bottom: 2px solid #3d0746;
  padding: 0 16px 13px;
  font-size: 0.95rem;
  font-weight: 700;
}

.procession-empty {
  margin: 0;
  padding: 18px 16px;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.last-procession-card {
  margin-top: 18px;
}

.procession-card dl {
  margin: 0;
}

.procession-card dl div {
  display: grid;
  gap: 4px;
  border-bottom: 1px solid #c7a6ce;
  padding: 12px 16px;
}

.procession-card dl div:last-child {
  border-bottom: 0;
}

.procession-card dt {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.procession-card dd {
  margin: 0;
  font-size: 0.95rem;
}

@media (max-width: 600px) {
  .map-unavailable {
    top: 78px;
    right: 20px;
    left: 20px;
    width: auto;
  }

  .hero {
    min-height: 760px;
    background-position: 58% center;
  }

  .hero-content {
    align-self: end;
    margin: 120px 24px 130px;
  }

  .hero h1 {
    font-size: clamp(3.8rem, 20vw, 5.5rem);
  }

  .hero-copy {
    margin: 22px 0;
  }

  .day-nav {
    top: 18px;
    right: 18px;
    left: 18px;
    justify-content: flex-start;
    max-width: none;
    gap: 7px;
  }

  .day-link {
    min-width: 0;
    flex: 1 1 54px;
    padding: 10px 8px;
  }

  .hero-instruction {
    right: 24px;
    bottom: 28px;
    left: 24px;
    max-width: none;
    font-size: 1rem;
    text-align: left;
  }

  .map-intro {
    align-items: start;
    flex-direction: column;
    padding: 38px 24px 26px;
  }

  .map-section {
    height: 680px;
  }

  .procession-stack {
    top: auto;
    bottom: 18px;
    left: 14px;
    width: calc(100% - 28px);
  }

  .procession-card {
    box-shadow: 5px 5px 0 #000;
  }

  .last-procession-card {
    display: none;
  }
}

/* Portada separada del mapa. */
body {
  overflow-x: hidden;
}

.map-page {
  overflow: hidden;
}

.landing-page,
.landing-page .hero {
  min-height: 100svh;
}

.landing-page .hero {
  background:
    linear-gradient(180deg, rgba(0, 26, 14, 0.55) 0%, rgba(4, 51, 27, 0.18) 46%, rgba(0, 38, 21, 0.86) 100%),
    url("/images/fondo-fam.jpeg") center / cover no-repeat;
}

.landing-page .hero-content {
  align-self: end;
  width: min(610px, calc(100% - 48px));
  margin: 0 auto clamp(62px, 11vh, 110px);
  text-align: center;
}

.landing-page .hero h1 {
  font-size: clamp(2.7rem, 5.4vw, 5.4rem);
  line-height: 0.95;
}

.landing-page .hero-copy {
  margin: 19px auto 28px;
}

.landing-page .live-button span {
  font-size: 1.25rem;
}

.landing-page .day-nav {
  top: 30px;
  left: 50%;
  display: grid;
  grid-template-columns: repeat(5, minmax(84px, 110px));
  justify-content: initial;
  gap: clamp(12px, 3vw, 46px);
  width: min(720px, calc(100% - 48px));
  max-width: none;
  transform: translateX(-50%);
}

.landing-page .day-link {
  min-width: 0;
  padding: 12px 10px;
  border: 0;
  background: var(--paper);
  color: #16001a;
  font-size: 0.87rem;
  font-weight: 500;
}

.landing-page .day-link:hover,
.landing-page .day-link:focus-visible {
  background: #d8acd9;
  color: #330039;
}

.map-page,
.map-page-shell,
.map-page .map-section,
.map-page .leaflet-map {
  height: 100%;
}

.map-page .map-section {
  position: relative;
}

.map-home {
  position: absolute;
  z-index: 1001;
  top: 17px;
  right: 17px;
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 10px 13px;
  background: var(--paper);
  color: #300037;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

.map-home:hover,
.map-home:focus-visible {
  background: #d8acd9;
  outline: 0;
}

.brand-logos {
  position: absolute;
  right: clamp(24px, 6vw, 100px);
  bottom: clamp(28px, 6vh, 70px);
  left: clamp(24px, 6vw, 100px);
  display: flex;
  align-items: end;
  justify-content: space-between;
  pointer-events: none;
}

.brand-logos img {
  display: block;
  width: auto;
  height: auto;
  object-fit: contain;
}

.logo-fifty {
  width: clamp(86px, 10vw, 155px) !important;
  max-height: 145px;
}

.logo-milagros {
  width: clamp(145px, 18vw, 290px) !important;
  max-height: 155px;
}

@media (max-width: 700px) {
  .landing-page .hero {
    min-height: 700px;
    background-position: 56% center;
  }

  .landing-page .day-nav {
    top: 18px;
    grid-template-columns: repeat(5, 1fr);
    gap: 7px;
    width: calc(100% - 28px);
  }

  .landing-page .day-link {
    padding: 10px 4px;
    font-size: 0.67rem;
  }

  .landing-page .hero-content {
    width: calc(100% - 42px);
    margin-bottom: 58px;
  }

  .landing-page .hero h1 {
    font-size: clamp(2.8rem, 14vw, 4.1rem);
  }

  .map-home {
    top: 14px;
    right: 14px;
    bottom: auto;
  }

  .brand-logos {
    right: 18px;
    bottom: 18px;
    left: 18px;
    align-items: center;
  }

  .logo-fifty {
    width: clamp(62px, 22vw, 88px) !important;
    max-height: 82px;
  }

  .logo-milagros {
    width: clamp(115px, 40vw, 165px) !important;
    max-height: 88px;
  }
}

.day-context {
  display: none;
}

.mobile-hero-heading {
  position: absolute;
  z-index: 1;
  top: 30px;
  right: 24px;
  left: 24px;
  display: block;
  margin: 0;
  color: #fff;
  font-size: clamp(1rem, 2.1vw, 1.8rem);
  font-weight: 700;
  letter-spacing: 0.42em;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
}

@media (max-width: 600px) {
  .hero {
    min-height: 100svh;
    background:
      linear-gradient(180deg, rgba(0, 30, 16, 0.42) 0%, rgba(5, 51, 27, 0.09) 44%, rgba(0, 36, 20, 0.88) 100%),
      url("/images/fondo-fam.jpeg") 50% center / cover no-repeat;
  }

  .mobile-hero-heading {
    position: absolute;
    z-index: 1;
    top: 38px;
    right: 12px;
    left: 12px;
    display: block;
    margin: 0;
    color: #fff;
    font-size: clamp(0.65rem, 3.8vw, 0.9rem);
    font-weight: 700;
    letter-spacing: 0.42em;
    line-height: 1;
    text-align: center;
    text-transform: uppercase;
  }

  .hero-content {
    position: absolute;
    z-index: 1;
    right: 0;
    bottom: 142px;
    left: 0;
    width: auto;
    margin: 0;
    text-align: center;
  }

  .hero-kicker,
  .hero h1,
  .hero-copy {
    display: none;
  }

  .live-button {
    gap: 0;
    min-width: 212px;
    justify-content: center;
    padding: 15px 22px;
    border: 0;
    border-radius: 999px;
    color: #3d0646;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.15rem;
    letter-spacing: -0.03em;
    line-height: 0.9;
    text-transform: uppercase;
  }

  .live-button span {
    display: none;
  }

  .day-nav {
    z-index: 1;
    top: 76px;
    right: 10px;
    left: 10px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    width: auto;
    max-width: none;
    transform: none;
  }

  .day-link {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 6px 3px;
    border: 0;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 7px 0 #050006;
    color: #3d0646;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(0.65rem, 2.8vw, 0.78rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1;
    text-align: center;
    text-transform: uppercase;
  }

  .brand-logos {
    z-index: 1;
    right: 24px;
    bottom: 24px;
    left: 24px;
  }

  .logo-fifty {
    width: clamp(67px, 23vw, 93px) !important;
    max-height: 88px;
  }

  .logo-milagros {
    width: clamp(125px, 42vw, 175px) !important;
    max-height: 95px;
  }
}
.tracking-status {
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.5;
  background: #eaf6ec;
  color: #20582d;
}
.tracking-status[data-state="stale"] {
  background: #fff3d6;
  color: #754b00;
}

@media (max-width: 600px) {
  .hero {
    min-height: max(100svh, 560px);
  }

  .map-page .procession-stack {
    max-height: min(44svh, 380px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .map-page .last-procession-card:not([hidden]) {
    display: block;
  }
}

@media (min-width: 601px) and (max-height: 600px) {
  .hero {
    min-height: 600px;
  }
}
