.partidas-page {
  background: #f4f4f4;
  color: #151515;
  min-height: calc(100vh - 90px);
}

.partidas-header {
  max-width: 920px;
}

.partidas-kicker {
  color: #df1f29;
  display: block;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .16em;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.partidas-header h1 {
  font-size: 52px;
  line-height: 1;
  margin-bottom: 18px;
}

.partidas-header p {
  color: #555;
  max-width: 620px;
}

.partidas-layout {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
}

.partidas-calendar,
.partidas-panel {
  background: #fff;
  border: 1px solid rgba(21, 21, 21, .1);
  border-radius: 8px;
  box-shadow: 0 18px 40px rgba(21, 21, 21, .08);
}

.partidas-calendar {
  padding: 24px;
}

.partidas-toolbar {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 20px;
}

.partidas-toolbar h2 {
  font-size: 28px;
  margin: 0;
  text-align: center;
}

.partidas-nav {
  align-items: center;
  background: #151515;
  border: 0;
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-size: 22px;
  height: 42px;
  justify-content: center;
  transition: background .2s ease;
  width: 42px;
}

.partidas-nav:hover {
  background: #df1f29;
}

.partidas-weekdays,
.partidas-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.partidas-weekdays {
  color: #666;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  margin-bottom: 10px;
  text-align: center;
  text-transform: uppercase;
}

.partidas-day {
  align-items: stretch;
  aspect-ratio: 1 / 1;
  background: #fafafa;
  border: 1px solid rgba(21, 21, 21, .08);
  border-radius: 8px;
  color: #151515;
  display: flex;
  flex-direction: column;
  font-size: 15px;
  font-weight: 700;
  min-height: 86px;
  overflow: hidden;
  padding: 10px;
  position: relative;
  text-align: left;
}

.partidas-day.is-empty {
  background: transparent;
  border-color: transparent;
}

.partidas-day.is-today {
  background: rgba(223, 31, 41, .12);
  border-color: rgba(223, 31, 41, .45);
  box-shadow: inset 0 0 0 1px rgba(223, 31, 41, .18), 0 0 18px rgba(223, 31, 41, .18);
}

.partidas-day.has-event {
  background: #fff;
  border-color: rgba(21, 21, 21, .12);
  box-shadow: 0 0 0 3px rgba(21, 21, 21, .06);
  color: #151515;
}

.partidas-day.has-event.is-today {
  border-color: rgba(223, 31, 41, .55);
  box-shadow: inset 0 0 0 3px rgba(223, 31, 41, .24), 0 0 20px rgba(223, 31, 41, .2);
}

.partidas-event-card:hover {
  border-color: #df1f29;
  transform: translateY(-2px);
}

.partidas-day-number {
  line-height: 1;
  position: relative;
  z-index: 2;
}

.partidas-day.has-event .partidas-day-number {
  align-self: flex-start;
  background: transparent;
  border-radius: 0;
  color: #151515;
  font-size: 13px;
  min-width: 0;
  padding: 0;
  position: relative;
}

.partidas-event-stack {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 0;
  height: auto;
  margin-top: 10px;
  min-width: 0;
  overflow: hidden;
  width: 100%;
}

.partidas-event-slice {
  border: 0;
  border-radius: 4px;
  box-sizing: border-box;
  color: #fff;
  cursor: pointer;
  display: block;
  flex: 0 0 auto;
  font-family: 'Yantramanav', Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.15;
  max-width: 100%;
  min-height: 18px;
  overflow: hidden;
  padding: 3px 6px;
  text-align: left;
  text-overflow: ellipsis;
  transition: filter .2s ease;
  white-space: nowrap;
  width: 100%;
}

.partidas-event-slice small {
  display: block;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  margin-top: 3px;
  opacity: .9;
}

.partidas-event-slice.is-full {
  filter: saturate(.7);
}

.partidas-event-slice:hover,
.partidas-event-slice:focus {
  filter: brightness(.92);
}

.partidas-event-slice.is-manana {
  background: #000;
  color: #fff;
}

.partidas-event-slice.is-tarde {
  background: #dd0000;
  color: #fff;
}

.partidas-event-slice.is-noche {
  background: #ffce00;
  color: #151515;
}

.partidas-panel {
  align-self: start;
  padding: 24px;
}

.partidas-panel h2 {
  font-size: 24px;
  margin-bottom: 18px;
}

.partidas-events {
  display: grid;
  gap: 12px;
}

.partidas-event-card {
  background: #fafafa;
  border: 1px solid rgba(21, 21, 21, .1);
  border-radius: 8px;
  color: #151515;
  cursor: pointer;
  display: grid;
  gap: 8px;
  padding: 16px;
  text-align: left;
  transition: border-color .2s ease, transform .2s ease;
}

.partidas-event-card strong {
  font-size: 16px;
}

.partidas-event-card span {
  color: #555;
  font-size: 14px;
}

.partidas-event-card .partidas-event-capacity {
  color: #151515;
  font-weight: 700;
}

.partidas-event-card .partidas-event-capacity.is-full {
  color: #df1f29;
}

.partidas-empty {
  color: #555;
}

@media only screen and (max-width: 900px) {
  .partidas-layout {
    grid-template-columns: 1fr;
  }

  .partidas-header h1 {
    font-size: 38px;
  }
}

@media only screen and (max-width: 640px) {
  .partidas-page .partidas-calendar-section {
    margin-left: 0;
    margin-right: 0;
    width: 100%;
  }

  .partidas-layout,
  .partidas-calendar {
    box-sizing: border-box;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    width: 100%;
  }

  .partidas-calendar {
    padding: 16px 0;
  }

  .partidas-toolbar {
    padding: 0 12px;
  }

  .partidas-weekdays {
    padding: 0 2px;
  }

  .partidas-weekdays,
  .partidas-grid {
    gap: 2px;
    grid-template-columns: repeat(7, calc((100% - 12px) / 7));
    max-width: 100%;
    overflow: hidden;
    width: 100%;
  }

  .partidas-weekdays span {
    overflow: hidden;
    min-width: 0;
    text-overflow: ellipsis;
  }

  .partidas-day {
    align-items: stretch;
    aspect-ratio: auto;
    box-sizing: border-box;
    border-radius: 6px;
    font-size: 13px;
    height: clamp(70px, 19vw, 88px);
    max-width: 100%;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    padding: 7px;
    width: 100%;
  }

  .partidas-day.has-event {
    padding: 7px;
  }

  .partidas-day.has-event .partidas-day-number {
    align-self: flex-start;
    background: transparent;
    border-radius: 0;
    color: #151515;
    font-size: 11px;
    left: auto;
    min-width: 0;
    padding: 0;
    position: static;
    top: auto;
  }

  .partidas-day.has-event.is-today .partidas-day-number {
    background: #df1f29;
    border-radius: 999px;
    color: #fff;
    min-width: 20px;
    padding: 4px 6px;
    text-align: center;
  }

  .partidas-event-stack {
    flex: 0 0 auto;
    gap: 0;
    height: auto;
    margin-top: 6px;
    min-width: 0;
    overflow: hidden;
    width: 100%;
  }

  .partidas-event-slice {
    border-radius: 3px;
    box-sizing: border-box;
    display: block;
    flex: 0 0 auto;
    font-size: 10px;
    line-height: 1.15;
    max-width: 100%;
    min-height: 14px;
    overflow: hidden;
    padding: 2px 4px;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
  }
}
