/* --------------------
   Calendar page
-------------------- */

.calendar-page {
  background: var(--bg);
  color: var(--ink);
}

/* HERO */

.calendar-hero {
  background: linear-gradient(135deg, var(--blue-700), var(--blue-900));
  color: #fff;
  padding: 40px 0 30px;
  position: relative;
  overflow: hidden;
}

.calendar-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right,
    rgba(255, 255, 255, 0.08),
    transparent 55%);
  pointer-events: none;
}

.calendar-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.1fr);
  gap: 24px;
  align-items: center;
}

.calendar-title {
  margin: 0 0 8px;
  font-size: 2rem;
}

.calendar-lead {
  margin: 0;
  max-width: 620px;
  color: #e3ecff;
}

.calendar-hero-meta {
  text-align: right;
  font-size: 0.9rem;
}

.calendar-timezone {
  margin: 0 0 6px;
}

.calendar-note {
  margin: 0;
  color: #d2ddff;
}

/* --------------------
   Legend
-------------------- */

.calendar-legend {
  margin-bottom: 24px;
}

.calendar-legend .section-title {
  margin-bottom: 14px;
}

.legend-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.legend-item {
  padding: 14px 14px 12px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: flex-start;
}

.legend-item h3 {
  margin: 0 0 4px;
  font-size: 0.9rem;
  text-transform: none;
  letter-spacing: normal;
  color: var(--blue-800);
}

.legend-item p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.legend-color {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px #f9fafb, 0 0 0 4px rgba(15, 23, 42, 0.05);
}

/* Colors from your guide */
.legend-yellow { background: #facc15; }  /* Yellow - 5-side one day */
.legend-green  { background: #22c55e; }  /* Green  - 5-side championship */
.legend-blue   { background: #3b82f6; }  /* Blue   - 7-side one day */
.legend-grey   { background: #6b7280; }  /* Grey   - 11-side one day */
.legend-orange { background: #fb923c; }  /* Orange - 7-side championship */

/* Small hover micro-interaction */
.legend-item {
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.legend-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(15, 47, 106, 0.14);
}

/* --------------------
   Calendar embed
-------------------- */

.calendar-embed-section {
  margin-top: 8px;
}

.calendar-embed-wrapper {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: #ffffff;
  padding: 10px;
}

.calendar-embed-inner {
  position: relative;
  width: 100%;
  /* ~16:10 ratio for Luma embed */
  padding-top: 85%;
  border-radius: 12px;
  overflow: hidden;
}

/* Make iframe fill the wrapper / responsive */
.calendar-embed-inner iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}


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

@media (max-width: 960px) {
  .calendar-hero-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .calendar-hero-meta {
    text-align: left;
  }

  .legend-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .calendar-hero {
    padding: 30px 0 22px;
  }

  .calendar-title {
    font-size: 1.6rem;
  }

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

  .calendar-embed-inner {
    padding-top: 100%; /* a bit taller on mobile */
  }
}
