:root {
  --home-ink: #26313a;
  --home-muted: #61707b;
  --home-paper: #fffdf8;
  --home-red: #b32935;
  --home-red-dark: #7f1f2a;
  --home-gold: #e8b44f;
  --home-green: #31745c;
  --home-blue: #315f86;
  --home-line: #dfded7;
  --home-geometry-pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='340' height='240' viewBox='0 0 340 240'%3E%3Cg fill='none' stroke-linecap='round'%3E%3Ccircle cx='34' cy='38' r='11' stroke='%23656f78' stroke-opacity='.22' stroke-width='1.4'/%3E%3Ccircle cx='281' cy='201' r='4' fill='%23878f96' fill-opacity='.24' stroke='none'/%3E%3Crect x='126' y='25' width='16' height='16' rx='2' transform='rotate(24 134 33)' stroke='%234a5660' stroke-opacity='.18' stroke-width='1.3'/%3E%3Crect x='300' y='80' width='10' height='10' transform='rotate(45 305 85)' fill='%23727c84' fill-opacity='.18' stroke='none'/%3E%3Cpath d='M58 178l14-23 14 23z' stroke='%238f979d' stroke-opacity='.2' stroke-width='1.3'/%3E%3Cpath d='M198 119h24M210 107v24' stroke='%23545f68' stroke-opacity='.17' stroke-width='1.4'/%3E%3Cpath d='M310 18l13 8-13 8-13-8z' stroke='%237b848b' stroke-opacity='.2' stroke-width='1.2'/%3E%3Cpath d='M148 210l9-9 9 9-9 9z' fill='%23646f78' fill-opacity='.17' stroke='none'/%3E%3Ccircle cx='239' cy='52' r='2.6' fill='%2346525c' fill-opacity='.26' stroke='none'/%3E%3Cpath d='M18 106h18' stroke='%23949ba1' stroke-opacity='.22' stroke-width='1.3'/%3E%3C/g%3E%3C/svg%3E");
}

.home-page {
  padding-top: 0 !important;
  background: #f5f3ee;
  color: var(--home-ink);
}

.home-page .fiesta-header {
  position: sticky;
  top: 0;
  left: auto;
  z-index: 40;
  width: 100%;
  max-width: none;
  height: auto;
  margin: 0;
  padding: 14px 16px 8px;
  overflow: visible;
  background-color: #f5f3ee;
  background-image: var(--home-geometry-pattern), linear-gradient(180deg, rgba(245, 243, 238, 0.98) 0%, rgba(245, 243, 238, 0.82) 72%, transparent 100%);
  background-repeat: repeat, no-repeat;
  background-position: center top, center top;
}

.home-page .fiesta-header__bar {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(14px, 2vw, 30px);
  width: min(1180px, 100%);
  min-height: 70px;
  margin: 0 auto;
  padding: 9px 10px 9px 22px;
  overflow: hidden;
  color: #fffaf0;
  background: linear-gradient(112deg, rgba(88, 18, 34, 0.97), rgba(127, 31, 42, 0.95) 52%, rgba(87, 23, 45, 0.97));
  border: 1px solid rgba(255, 232, 185, 0.3);
  border-radius: 20px;
  box-shadow: 0 17px 42px rgba(72, 22, 31, 0.2), inset 0 1px rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(18px) saturate(135%);
}

.home-page .fiesta-header__bar::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(circle at 12% 20%, rgba(255, 205, 99, 0.13), transparent 24%), radial-gradient(circle at 85% 80%, rgba(255, 243, 213, 0.09), transparent 28%);
}

.home-page .fiesta-header__canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.9;
}

.home-page .fiesta-header__brand {
  position: relative;
  z-index: 1;
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.05rem, 1.8vw, 1.38rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
}

.home-page .fiesta-header__brand span {
  color: var(--home-gold);
}

.home-page .fiesta-header__links {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.home-page .fiesta-header__links a {
  position: relative;
  z-index: 2;
  padding: 12px clamp(8px, 1.15vw, 14px);
  color: rgba(255, 250, 240, 0.76);
  font-size: clamp(0.76rem, 1.05vw, 0.91rem);
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  transition: color 180ms ease, letter-spacing 260ms cubic-bezier(.22, 1, .36, 1), text-shadow 180ms ease;
}

.home-page .fiesta-header__links a:hover,
.home-page .fiesta-header__links a:focus-visible,
.home-page .fiesta-header__links a[aria-current="page"] {
  color: #fff;
  letter-spacing: 0.015em;
  text-shadow: 0 0 14px rgba(255, 205, 99, 0.34);
}

.home-page .fiesta-header__indicator {
  position: absolute;
  top: 50%;
  left: 0;
  z-index: 1;
  width: var(--indicator-width, 0);
  height: var(--indicator-height, 0);
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(180deg, rgba(255, 250, 235, 0.16), rgba(255, 205, 99, 0.07));
  border: 1px solid rgba(255, 220, 143, 0.42);
  border-radius: 12px;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.12), 0 0 17px rgba(255, 193, 63, 0.14);
  transform: translate3d(var(--indicator-x, 0), -50%, 0) skewX(var(--indicator-skew, 0deg)) scaleX(var(--indicator-stretch, 1));
  transform-origin: center;
  transition: opacity 180ms ease;
  will-change: transform, width, height;
}

.home-page .fiesta-header__indicator.is-visible {
  opacity: 1;
}

.home-page .fiesta-header__languages {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 6px;
}

.home-page .fiesta-header__languages a {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: rgba(255, 250, 240, 0.78);
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 232, 185, 0.24);
  border-radius: 11px;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.home-page .fiesta-header__languages a:hover,
.home-page .fiesta-header__languages a:focus-visible,
.home-page .fiesta-header__languages a[aria-current="page"] {
  color: #fff;
  background: rgba(255, 205, 99, 0.14);
  border-color: rgba(255, 220, 143, 0.6);
  box-shadow: 0 0 16px rgba(255, 193, 63, 0.16);
  transform: translateY(-1px);
}

.home-page .fiesta-header__languages a[aria-current="page"] {
  color: #48131f;
  background: var(--home-gold);
}

.home-page .layout {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

.home-page .layout main {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

.home-page .layout article {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  background: transparent;
}

.home-page .home-intro,
.home-page .layout article > section,
.home-page .layout article > .enlace-archivo-diario {
  box-sizing: border-box;
}

.home-page .home-intro {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: #f7fbfc;
  background: linear-gradient(118deg, #163f4d 0%, #205664 54%, #183f50 100%);
}

.home-page .home-intro::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(circle at 18% 22%, rgba(172, 204, 214, 0.1), transparent 28%), radial-gradient(circle at 82% 76%, rgba(137, 177, 191, 0.11), transparent 32%);
}

.home-page .home-intro__bubbles {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.82;
}

.home-page .home-intro > h1,
.home-page .home-intro > p {
  position: relative;
  z-index: 1;
}

.home-page .home-intro > h1 {
  margin: 0;
  padding: 58px max(24px, calc((100% - 1080px) / 2)) 10px;
  color: #fff;
  font-size: 1.8rem;
  line-height: 1.2;
}

.home-page .home-intro > p {
  margin: 0;
  padding: 8px max(24px, calc((100% - 1080px) / 2)) 54px;
  color: #e5f0f3;
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  line-height: 1.65;
}

.home-page .home-intro > p a {
  color: #fff;
  font-weight: 800;
  text-decoration-color: #a9cbd5;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.home-page .layout article > section {
  width: 100%;
  margin: 0;
  padding: 58px max(24px, calc((100% - 1080px) / 2));
  border: 0;
  border-bottom: 1px solid var(--home-line);
  background: var(--home-paper);
}

.home-page .layout article > section:nth-of-type(even) {
  background: #edf3f0;
}

.home-page .layout article > section:nth-of-type(3n) {
  background: #f2f4f6;
}

.home-page .layout article > section > h2 {
  max-width: 860px;
  margin: 0 0 24px;
  padding-top: 14px;
  color: var(--home-ink);
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  line-height: 1.2;
  border-top: 5px solid var(--home-gold);
}

.home-page .layout article > section > h3 {
  margin-top: 34px;
  color: var(--home-red-dark);
  font-size: 1.24rem;
}

.home-page .layout article > section p,
.home-page .layout article > section li {
  line-height: 1.72;
}

.home-page #hoy-en-el-calendario {
  position: relative;
  padding-top: 66px;
  background: #fff7e4;
}

.home-page #hoy-en-el-calendario::before,
.home-page #manana-en-el-calendario::before {
  display: inline-block;
  margin-bottom: 12px;
  padding: 6px 10px;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
  background: var(--home-red);
}

html[lang="es"] .home-page #hoy-en-el-calendario::before { content: "Fiesta destacada"; }
html[lang="en-GB"] .home-page #hoy-en-el-calendario::before { content: "Featured celebration"; }
html[lang="es"] .home-page #manana-en-el-calendario::before { content: "Próxima fecha"; }
html[lang="en-GB"] .home-page #manana-en-el-calendario::before { content: "Coming next"; }

.home-page #hoy-en-el-calendario > h2 {
  max-width: 900px;
  padding-top: 0;
  font-size: clamp(1.9rem, 4vw, 3.25rem);
  border-top: 0;
}

.home-page #hoy-en-el-calendario p,
.home-page #manana-en-el-calendario p {
  max-width: 850px;
  font-size: 1.04rem;
}

.home-page .enlace-archivo-diario {
  margin: 0;
  padding: 20px max(24px, calc((100% - 1080px) / 2));
  text-align: right;
  background: #fff7e4;
  border-bottom: 1px solid #e5d8ba;
}

.home-page .enlace-archivo-diario a,
.home-page .layout article > section > p:last-child > a {
  display: inline-block;
  font-weight: 800;
  text-underline-offset: 3px;
}

.home-page #fiestas-populares-2026-cercanas {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 28px 0;
  padding: 0;
  list-style: none;
}

.home-page #fiestas-populares-2026-cercanas li {
  min-width: 0;
  padding: 16px;
  background: #fff;
  border: 1px solid #d9dedb;
  border-left: 4px solid var(--home-green);
  border-radius: 6px;
}

.home-page #fiestas-populares-2026-cercanas li a {
  font-weight: 800;
}

.home-page .fecha-habitual {
  color: var(--home-muted);
  font-size: 0.9rem;
}

.home-page .calendario-anual {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.home-page .mes-calendario {
  margin: 0;
  background: #fff;
  border: 1px solid #d7dce0;
  box-shadow: 0 5px 14px rgba(38, 49, 58, 0.06);
}

.home-page .mes-calendario caption {
  padding: 12px;
  color: #fff;
  font-weight: 800;
  background: var(--home-blue);
}

.home-page .mes-calendario th,
.home-page .mes-calendario td {
  padding: 8px 4px;
  text-align: center;
}

.home-page .mes-calendario td.festivo {
  color: #fff;
  background: var(--home-red);
}

.home-page .fuentes-contenido-diario {
  margin-top: 28px;
  padding: 16px 18px;
  color: #4f5c64;
  font-size: 0.94rem !important;
  background: rgba(255, 255, 255, 0.72);
  border-left: 4px solid var(--home-gold);
}

.home-page footer {
  margin-top: 0;
  border-top: 4px solid var(--home-red);
}

.home-page .layout article > section,
.home-page .layout article > .enlace-archivo-diario {
  background-image: var(--home-geometry-pattern) !important;
  background-repeat: repeat;
  background-position: center top;
}

@media (max-width: 820px) {
  .home-page #fiestas-populares-2026-cercanas,
  .home-page .calendario-anual {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-page .fiesta-header__bar {
    grid-template-columns: auto auto;
    gap: 8px 14px;
    padding: 9px 10px 8px 16px;
  }

  .home-page .fiesta-header__links {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .home-page .fiesta-header__links::-webkit-scrollbar {
    display: none;
  }

  .home-page .fiesta-header__languages {
    justify-self: end;
  }
}

@media (max-width: 560px) {
  .home-page .fiesta-header {
    padding: 8px 6px 5px;
  }

  .home-page .fiesta-header__bar {
    border-radius: 16px;
  }

  .home-page .fiesta-header__languages a {
    width: 37px;
    height: 37px;
  }

  .home-page .fiesta-header__links a {
    padding: 10px 9px;
    font-size: 0.76rem;
  }

  .home-page .home-intro > h1 {
    padding-top: 40px;
    font-size: 1.7rem;
  }

  .home-page .home-intro > p {
    padding-bottom: 40px;
  }

  .home-page .layout article > section {
    padding-top: 42px;
    padding-bottom: 42px;
  }

  .home-page #fiestas-populares-2026-cercanas,
  .home-page .calendario-anual {
    grid-template-columns: minmax(0, 1fr);
  }

  .home-page .mes-calendario th,
  .home-page .mes-calendario td {
    padding: 7px 3px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-page .fiesta-header__canvas {
    opacity: 0.42;
  }

  .home-page .home-intro__bubbles {
    opacity: 0.5;
  }

  .home-page .fiesta-header__links a,
  .home-page .fiesta-header__indicator,
  .home-page .fiesta-header__languages a {
    transition: none;
  }
}
