/* ==========================================================================
   PROGRAMA HALLOWEEN LES CARPES 2026
   Web + botón de portada + versión imprimible
   ========================================================================== */

.agenda-page {
  background:
    radial-gradient(circle at 12% 8%, rgba(117, 44, 135, .24), transparent 31rem),
    radial-gradient(circle at 90% 24%, rgba(255, 105, 15, .13), transparent 25rem),
    #08070a;
}

.agenda-screen {
  width: min(100%, 840px);
  max-width: 840px;
  margin: 0 auto;
  padding: clamp(18px, 4vw, 34px);
}

/* --------------------------------------------------------------------------
   Botón en la portada
   -------------------------------------------------------------------------- */

.home-actions .agenda-home-action {
  display: grid;
  width: 100%;
  grid-template-columns: 58px minmax(0, 1fr) 30px;
  gap: 12px;
  align-items: center;
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 2px solid rgba(255, 123, 24, .76);
  border-radius: 18px;
  background:
    radial-gradient(circle at 8% 20%, rgba(255, 155, 45, .18), transparent 90px),
    linear-gradient(135deg, rgba(77, 32, 84, .98), rgba(40, 20, 35, .99) 60%, rgba(87, 34, 25, .98));
  box-shadow:
    0 10px 26px rgba(0, 0, 0, .30),
    inset 0 0 0 1px rgba(255, 255, 255, .04),
    0 0 22px rgba(255, 107, 18, .08);
  color: #fff4e5;
  text-decoration: none;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.home-actions .agenda-home-action:active {
  transform: scale(.985);
}

.agenda-home-icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 1px solid rgba(255, 168, 72, .42);
  border-radius: 15px;
  background: radial-gradient(circle, rgba(255, 145, 34, .30), rgba(49, 23, 55, .72));
  font-size: 1.75rem;
}

.agenda-home-copy {
  min-width: 0;
}

.agenda-home-copy strong {
  display: block;
  color: #ff9b32;
  font-family: Fraunces, Georgia, serif;
  font-size: 1.12rem;
  line-height: 1.05;
}

.agenda-home-copy small {
  display: block;
  margin-top: 4px;
  color: #d7c7d3;
  font-size: .64rem;
  line-height: 1.35;
}

.agenda-home-arrow {
  color: #ffb05b;
  font-family: Georgia, serif;
  font-size: 2rem;
  line-height: 1;
  text-align: center;
}

/* --------------------------------------------------------------------------
   Barra superior
   -------------------------------------------------------------------------- */

.agenda-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.agenda-topbar .back-button {
  margin-bottom: 0;
}

.agenda-download {
  display: inline-flex;
  min-height: 44px;
  padding: 9px 15px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(255, 138, 41, .52);
  border-radius: 999px;
  background: linear-gradient(135deg, #ffad32, #ff6812);
  color: #21101e;
  box-shadow: 0 7px 20px rgba(255, 101, 13, .18);
  font-size: .74rem;
  font-weight: 800;
  text-decoration: none;
}

.agenda-download span {
  font-size: 1.05rem;
  line-height: 1;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.agenda-hero {
  position: relative;
  grid-template-columns: minmax(0, 1fr) 178px;
  min-height: 260px;
  overflow: hidden;
  border: 1px solid rgba(255, 121, 24, .38);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(79, 31, 84, .97), rgba(29, 16, 34, .99) 55%, rgba(78, 29, 22, .96));
  box-shadow: 0 16px 42px rgba(0, 0, 0, .34);
}

.agenda-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 22% 17%, rgba(255, 164, 54, .20), transparent 18rem),
    linear-gradient(90deg, transparent 0 62%, rgba(0, 0, 0, .14));
}

.agenda-hero-copy {
  position: relative;
  z-index: 2;
  padding: clamp(26px, 6vw, 46px);
}

.agenda-kicker {
  margin: 0 0 8px;
  color: #ff9a32;
  font-size: .69rem;
  font-weight: 800;
  letter-spacing: .12em;
}

.agenda-hero h1 {
  max-width: 540px;
  margin: 0;
  color: #fff4e6;
  font-family: Fraunces, Georgia, serif;
  font-size: clamp(2.5rem, 8vw, 4.35rem);
  line-height: .9;
  letter-spacing: -.055em;
}

.agenda-hero-subtitle {
  max-width: 520px;
  margin: 16px 0 0;
  color: #ded0db;
  font-size: .86rem;
  line-height: 1.5;
}

.agenda-hero-hours {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.agenda-hero-hours span {
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 999px;
  background: rgba(8, 7, 10, .40);
  color: #fff0de;
  font-size: .66rem;
  font-weight: 700;
}

.agenda-hero-character {
  position: relative;
  z-index: 1;
  align-self: end;
  height: 100%;
  overflow: hidden;
}

.agenda-hero-character img {
  position: absolute;
  right: -32px;
  bottom: -31px;
  width: 222px;
  max-width: none;
  height: 294px;
  object-fit: cover;
  object-position: 50% 74%;
  border-radius: 0;
}

/* --------------------------------------------------------------------------
   Introducción
   -------------------------------------------------------------------------- */

.agenda-intro {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 14px;
  margin: 18px 0 12px;
  padding: 13px 15px;
  border: 1px solid rgba(255, 255, 255, .05);
  border-radius: 14px;
  background: rgba(45, 28, 50, .76);
}

.agenda-intro strong {
  color: #ff9b31;
  font-family: Fraunces, Georgia, serif;
  font-size: .94rem;
}

.agenda-intro span {
  align-self: center;
  color: #cbbdcc;
  font-size: .69rem;
}

/* --------------------------------------------------------------------------
   Timeline
   -------------------------------------------------------------------------- */

.agenda-timeline {
  position: relative;
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.agenda-timeline::before {
  content: "";
  position: absolute;
  top: 18px;
  bottom: 18px;
  left: 49px;
  width: 2px;
  background: linear-gradient(#ff7a18, #c975ff 68%, #5d3a7d);
  opacity: .65;
}

.agenda-item {
  position: relative;
  display: grid;
  grid-template-columns: 86px 66px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 104px;
  padding: 12px 14px 12px 0;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(35, 23, 40, .96), rgba(15, 11, 18, .98));
  box-shadow: 0 8px 22px rgba(0, 0, 0, .20);
}

.agenda-item time {
  position: relative;
  z-index: 2;
  display: grid;
  min-height: 52px;
  place-items: center;
  align-content: center;
  margin-left: 10px;
  padding: 8px 7px;
  border: 2px solid #ff7a18;
  border-radius: 13px;
  background: #160f18;
  color: #ffb049;
  font-family: Fraunces, Georgia, serif;
  font-size: 1.24rem;
  font-weight: 700;
  line-height: .95;
  text-align: center;
}

.agenda-item time span {
  color: #d6b2e7;
  font-size: .69rem;
}

.agenda-item-character {
  width: 62px;
  height: 76px;
  overflow: hidden;
  border-radius: 14px;
  background: radial-gradient(circle, rgba(255, 128, 25, .15), rgba(43, 22, 48, .6));
}

.agenda-item-character img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 72%;
}

.agenda-item-content {
  min-width: 0;
  padding: 3px 0;
}

.agenda-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 6px;
}

.agenda-tags span {
  display: inline-flex;
  min-height: 21px;
  padding: 3px 7px;
  align-items: center;
  border-radius: 999px;
  font-size: .57rem;
  font-weight: 700;
}

.agenda-audience {
  background: rgba(255, 125, 24, .14);
  color: #ffb15a;
}

.agenda-location {
  background: rgba(196, 117, 230, .13);
  color: #deb5ef;
}

.agenda-live {
  background: rgba(255, 81, 81, .13);
  color: #ff9b9b;
}

.agenda-item h2 {
  margin: 0 0 5px;
  color: #fff2df;
  font-family: Fraunces, Georgia, serif;
  font-size: 1.12rem;
  line-height: 1.02;
  letter-spacing: -.02em;
}

.agenda-item p {
  margin: 0;
  color: #c9bbc7;
  font-size: .68rem;
  line-height: 1.45;
}

.agenda-item--kids {
  border-color: rgba(194, 112, 232, .22);
}

.agenda-item--family {
  border-color: rgba(255, 125, 24, .22);
}

.agenda-item--highlight {
  border-color: rgba(255, 172, 48, .48);
  background: linear-gradient(145deg, rgba(70, 31, 36, .96), rgba(32, 17, 36, .98));
}

.agenda-item--highlight-costume {
  border-color: rgba(213, 114, 255, .48);
  background: linear-gradient(145deg, rgba(60, 31, 74, .98), rgba(31, 17, 37, .98));
}

.agenda-item--highlight time,
.agenda-item--highlight-costume time {
  box-shadow: 0 0 18px rgba(255, 121, 24, .18);
}

.agenda-item--night {
  border-color: rgba(133, 91, 194, .38);
  background: linear-gradient(145deg, rgba(32, 23, 47, .98), rgba(12, 10, 18, .99));
}

/* --------------------------------------------------------------------------
   Créditos
   -------------------------------------------------------------------------- */

.agenda-credits {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  margin: 18px 0 8px;
}

.agenda-organizer,
.agenda-collaboration {
  min-height: 82px;
  padding: 13px 15px;
  border: 1px solid rgba(255, 126, 24, .18);
  border-radius: 14px;
  background: rgba(27, 18, 31, .82);
  margin:auto;
  display: block;
}

.agenda-organizer {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.agenda-organizer span,
.agenda-collaboration > span:first-child {
  display: block;
  color: #a998a8;
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.agenda-organizer strong {
  display: block;
  margin-top: 4px;
  color: #ff9b31;
  font-family: Fraunces, Georgia, serif;
  font-size: 1rem;
}

.agenda-collaboration {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.agenda-collaboration-logo {
  display: grid;
  min-width: 128px;
  min-height: 50px;
  padding: 7px 10px;
  border-radius: 10px;
}

.agenda-collaboration-logo img {
  display: block;
  width: 100px;
  max-width: 100%;
  height: auto;
  border-radius:20px;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 560px) {
  .agenda-topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .agenda-topbar .back-button {
    align-self: flex-start;
  }

  .agenda-download {
    width: 100%;
  }

  .agenda-hero {
    grid-template-columns: 1fr 108px;
    min-height: 245px;
  }

  .agenda-hero-copy {
    padding: 26px 18px 28px;
  }

  .agenda-hero-character img {
    right: -54px;
    bottom: -22px;
    width: 182px;
    height: 264px;
  }

  .agenda-intro {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .agenda-timeline::before {
    left: 42px;
  }

  .agenda-item {
    grid-template-columns: 72px 52px minmax(0, 1fr);
    gap: 8px;
    min-height: 100px;
    padding-right: 9px;
  }

  .agenda-item time {
    margin-left: 6px;
    font-size: 1.05rem;
  }

  .agenda-item-character {
    width: 50px;
    height: 66px;
  }

  .agenda-item h2 {
    font-size: .98rem;
  }

  .agenda-item p {
    font-size: .61rem;
  }

  .agenda-location {
    display: none !important;
  }

  .agenda-credits {
    grid-template-columns: 1fr;
  }

  .home-actions .agenda-home-action {
    grid-template-columns: 48px minmax(0, 1fr) 24px;
    gap: 10px;
    padding: 10px 11px;
  }

  .agenda-home-icon {
    width: 46px;
    height: 46px;
    font-size: 1.5rem;
  }

  .agenda-home-copy strong {
    font-size: 1rem;
  }
}

/* --------------------------------------------------------------------------
   PDF / impresión
   -------------------------------------------------------------------------- */

@page {
  size: A4 portrait;
  margin: 7mm;
}

@media print {
  html,
  body,
  .agenda-page {
    background: #0a080d !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  body {
    margin: 0;
  }

  .agenda-screen {
    width: auto;
    max-width: none;
    min-height: 0;
    padding: 0;
  }

  .agenda-topbar,
  .agenda-intro {
    display: none !important;
  }

  .agenda-hero {
    grid-template-columns: 1fr 96px;
    min-height: 106px;
    border-radius: 11px;
    box-shadow: none;
  }

  .agenda-hero-copy {
    padding: 12px 16px;
  }

  .agenda-kicker {
    margin-bottom: 2px;
    font-size: 5.7pt;
  }

  .agenda-hero h1 {
    font-size: 24pt;
  }

  .agenda-hero-subtitle {
    margin-top: 5px;
    font-size: 6.6pt;
    line-height: 1.28;
  }

  .agenda-hero-hours {
    margin-top: 6px;
  }

  .agenda-hero-hours span {
    padding: 2.5px 6px;
    font-size: 5pt;
  }

  .agenda-hero-character img {
    right: -23px;
    bottom: -25px;
    width: 132px;
    height: 172px;
  }

  .agenda-timeline {
    gap: 3.5px;
    margin-top: 6px;
  }

  .agenda-timeline::before {
    left: 34px;
    top: 10px;
    bottom: 10px;
  }

  .agenda-item {
    grid-template-columns: 59px 39px minmax(0, 1fr);
    gap: 6px;
    min-height: 52px;
    padding: 4px 7px 4px 0;
    border-radius: 8px;
    box-shadow: none;
    break-inside: avoid;
  }

  .agenda-item time {
    min-height: 34px;
    margin-left: 4px;
    padding: 3px;
    border-radius: 7px;
    font-size: 9.5pt;
  }

  .agenda-item time span {
    font-size: 5.2pt;
  }

  .agenda-item-character {
    width: 37px;
    height: 43px;
    border-radius: 7px;
  }

  .agenda-tags {
    gap: 2px;
    margin-bottom: 1px;
  }

  .agenda-tags span {
    min-height: 0;
    padding: 1px 4px;
    font-size: 4.5pt;
  }

  .agenda-item h2 {
    margin-bottom: 1px;
    font-size: 8.4pt;
  }

  .agenda-item p {
    font-size: 5.2pt;
    line-height: 1.2;
  }

  .agenda-credits {
    grid-template-columns: 1fr 1.25fr;
    gap: 6px;
    margin: 6px 0 0;
  }

  .agenda-organizer,
  .agenda-collaboration {
    min-height: 42px;
    padding: 5px 8px;
    border-radius: 7px;
  }

  .agenda-organizer span,
  .agenda-collaboration > span:first-child {
    font-size: 4.5pt;
  }

  .agenda-organizer strong {
    margin-top: 2px;
    font-size: 7.2pt;
  }

  .agenda-collaboration {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .agenda-collaboration-logo {
    min-width: 88px;
    min-height: 31px;
    padding: 3px 6px;
    border-radius: 5px;
  }

  .agenda-collaboration-logo img {
    width: 88px;
  }
}

/* ==========================================================================
   Ajustes de compatibilidad para motores PDF basados en WeasyPrint
   ========================================================================== */
@media print {
  .agenda-hero {
    display: flex;
    min-height: 126px;
  }

  .agenda-hero-copy {
    flex: 1 1 auto;
    min-width: 0;
    padding: 14px 18px;
  }

  .agenda-hero h1 {
    max-width: none;
    font-size: 28pt;
    white-space: nowrap;
  }

  .agenda-hero-subtitle {
    max-width: 520px;
    font-size: 7.3pt;
  }

  .agenda-hero-character {
    position: relative;
    flex: 0 0 118px;
    width: 118px;
    height: 126px;
  }

  .agenda-hero-character img {
    right: -10px;
    bottom: -28px;
    width: 142px;
    height: 176px;
  }

  .agenda-timeline {
    gap: 5px;
    margin-top: 8px;
  }

  .agenda-item {
    grid-template-columns: 66px 45px minmax(0, 1fr);
    gap: 7px;
    min-height: 64px;
    padding: 5px 8px 5px 0;
    border-radius: 9px;
  }

  .agenda-item time {
    min-height: 40px;
    margin-left: 5px;
    padding: 4px;
    font-size: 10.8pt;
  }

  .agenda-item time span {
    font-size: 5.8pt;
  }

  .agenda-item-character {
    width: 43px;
    height: 52px;
  }

  .agenda-tags {
    margin-bottom: 2px;
  }

  .agenda-tags span {
    font-size: 5pt;
  }

  .agenda-item h2 {
    margin-bottom: 2px;
    font-size: 9.5pt;
  }

  .agenda-item p {
    font-size: 5.9pt;
    line-height: 1.25;
  }

  .agenda-credits {
    gap: 7px;
    margin-top: 7px;
  }

  .agenda-organizer,
  .agenda-collaboration {
    min-height: 49px;
    padding: 6px 9px;
  }

  .agenda-organizer span,
  .agenda-collaboration > span:first-child {
    font-size: 4.9pt;
  }

  .agenda-organizer strong {
    font-size: 8pt;
  }

  .agenda-collaboration-logo {
    min-width: 104px;
    min-height: 35px;
  }

  .agenda-collaboration-logo img {
    width: 104px;
  }
}

@media print {
  .agenda-hero {
    min-height: 150px;
  }

  .agenda-hero-copy {
    padding: 18px 20px;
  }

  .agenda-kicker {
    font-size: 6.4pt;
  }

  .agenda-hero h1 {
    font-size: 31pt;
  }

  .agenda-hero-subtitle {
    margin-top: 7px;
    font-size: 8pt;
  }

  .agenda-hero-hours {
    margin-top: 8px;
  }

  .agenda-hero-hours span {
    font-size: 5.8pt;
    padding: 3px 7px;
  }

  .agenda-hero-character {
    flex-basis: 135px;
    width: 135px;
    height: 150px;
  }

  .agenda-hero-character img {
    right: -10px;
    bottom: -30px;
    width: 165px;
    height: 205px;
  }

  .agenda-timeline {
    gap: 6px;
    margin-top: 9px;
  }

  .agenda-item {
    grid-template-columns: 74px 55px minmax(0, 1fr);
    gap: 8px;
    min-height: 76px;
    padding: 6px 9px 6px 0;
    border-radius: 10px;
  }

  .agenda-timeline::before {
    left: 40px;
  }

  .agenda-item time {
    min-height: 46px;
    margin-left: 6px;
    font-size: 12pt;
  }

  .agenda-item time span {
    font-size: 6.3pt;
  }

  .agenda-item-character {
    width: 52px;
    height: 62px;
    border-radius: 9px;
  }

  .agenda-tags span {
    font-size: 5.6pt;
    padding: 1.5px 5px;
  }

  .agenda-item h2 {
    margin-bottom: 2px;
    font-size: 10.8pt;
  }

  .agenda-item p {
    font-size: 6.4pt;
    line-height: 1.24;
  }

  .agenda-credits {
    gap: 8px;
    margin-top: 8px;
  }

  .agenda-organizer,
  .agenda-collaboration {
    min-height: 60px;
    padding: 8px 10px;
  }

  .agenda-organizer span,
  .agenda-collaboration > span:first-child {
    font-size: 5.4pt;
  }

  .agenda-organizer strong {
    font-size: 9pt;
  }

  .agenda-collaboration-logo {
    min-width: 118px;
    min-height: 42px;
    padding: 4px 7px;
  }

  .agenda-collaboration-logo img {
    width: 118px;
  }
}
