/* Day headers and lesson cells share the same track, padding and gaps. */
.timetable-layout {
  --day-padding: 20px;
  --day-gap: 12px;
  --period-width: 48px;
  --period-gap: 8px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
}

.timetable-body {
  display: contents;
}

.timetable-periods {
  grid-column: 1;
  grid-row: 2;
  width: calc(var(--period-width) + var(--period-gap));
}

/* The label shares its row's actual height, including wrapped lesson text. */
.timetable-row {
  position: relative;
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  column-gap: var(--day-gap);
}

.timetable-row-label {
  position: absolute;
  inset-block: 0;
  left: calc(-1 * (var(--day-padding) + var(--period-gap) + var(--period-width)));
  width: var(--period-width);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 500;
}

.timetable-layout .timetable-days,
.timetable-layout .timetable-cells {
  grid-column: 2;
  min-width: 0;
  padding-inline: var(--day-padding);
  column-gap: var(--day-gap);
}

.timetable-days {
  grid-row: 1;
}

.timetable-cells {
  grid-row: 2;
}

@media (max-width: 1023px) {
  .timetable-layout {
    --day-padding: 12px;
    --day-gap: 8px;
  }
}

@media (max-width: 767px) {
  .timetable-periods,
  .timetable-row-label {
    display: none;
  }

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

  .timetable-layout .timetable-days,
  .timetable-layout .timetable-cells {
    grid-column: 1;
  }
}

@media (max-width: 639px) {
  .timetable-layout {
    --day-gap: 3px;
  }
}

.hero-scene {
  height: clamp(360px, 45vw, 550px);
  background: #17201b;
}

.hero-scene-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 78% center;
}

.hero-scene-shade {
  background: linear-gradient(90deg, rgba(8, 12, 10, 0.7), transparent 65%),
    linear-gradient(0deg, rgba(8, 12, 10, 0.75), transparent 55%);
  pointer-events: none;
}

@media (max-width: 639px) {
  .hero-scene {
    height: clamp(240px, 75vw, 350px);
  }

  .hero-scene-image {
    object-position: 82% center;
  }

  .hero-scene-shade {
    background: linear-gradient(0deg, #0f0f0f, transparent 25%);
  }
}

.champion-banner {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: 32px;
  margin-top: 64px;
  padding: 28px 48px 0 24px;
  overflow: hidden;
  border-top: 3px solid #ff0004;
  border-radius: 24px 24px 0 0;
  background: radial-gradient(ellipse at 20% 85%, #542023 0%, #252122 40%, #191919 75%);
}

.champion-player {
  display: block;
  width: 100%;
  height: 360px;
  object-fit: contain;
  object-position: center bottom;
  align-self: end;
}

.champion-quote {
  margin: 0;
  padding: 28px 0 48px;
  color: #fff7ef;
  font-size: clamp(32px, 3.6vw, 48px);
  font-weight: 700;
  line-height: 1.15;
  text-wrap: balance;
}

@media (max-width: 767px) {
  .champion-banner {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    margin-top: 40px;
    padding: 32px 20px 0;
    background: radial-gradient(ellipse at 50% 90%, #542023 0%, #252122 45%, #191919 80%);
  }

  .champion-quote {
    grid-row: 1;
    padding: 0;
    text-align: center;
    font-size: clamp(28px, 7.5vw, 40px);
  }

  .champion-player {
    height: auto;
    max-height: 340px;
    max-width: 380px;
    justify-self: center;
  }
}

.dark-gradient {
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.7) 59.8%,
    rgba(0, 0, 0, 0.8) 73.3%,
    rgba(0, 0, 0, 0.9) 97.3%
  );
}

.mobile-dark-gradient {
  background: linear-gradient(
    180deg,
    rgba(15, 15, 15, 0) 0%,
    rgba(15, 15, 15, 0.77) 59.8%,
    rgba(15, 15, 15, 0.9) 73.3%,
    #0f0f0f 97.3%
  );
}

.arrow-bg {
  background: rgba(179, 179, 179, 0.2);
  backdrop-filter: blur(30px);
}

.text-rg {
  position: relative; /* Required for the pseudo-element to be positioned properly */
  border-radius: 10px;
  border: 1px solid rgba(179, 179, 179, 0.6);
  opacity: 0.6;

  background: linear-gradient(
    98deg,
    rgba(84, 84, 84, 0.6) 0%,
    rgba(84, 84, 84, 0.3) 102.04%
  ); /* Gradient stays in the background */

  box-shadow: 0px 8px 20px 0px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(30px);
  overflow: hidden; /* Ensures the pseudo-element stays within the boundaries */
}

.text-rg::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("assets/grid.svg"); /* Background image */
  background-size: cover;
  background-position: center;
  opacity: 0.05; /* Adjust this value to control the image opacity */
  z-index: 0;
  border-radius: inherit; /* Ensures the background image matches the border-radius */
}

.text-rg > * {
  position: relative; /* Ensures that the text and content are on top of the pseudo-element */
  z-index: 1;
}
