.overlay-text-dates-and-quiz {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 100;
  color: white;
  font-family: var(--body-font); /* font de la versió original */
  text-shadow: 2px 2px 6px rgba(0,0,0,0.8); /* text visible sobre imatge */

  width: 90%;
  height: 90%;
  /* max-height: 100%; */
  display: flex;
  flex-direction: column;
  justify-content: space-evenly; /* reparteix l'espai entre els blocs segons el text */
  align-items: flex-end; /* alineació per defecte: dreta */

  padding: 1rem;
  box-sizing: border-box;
  overflow: hidden;
  text-align: right; /* text alineat a la dreta per pantalla gran */
}

.location-block {
  flex: 1 1 auto; /* ocupa espai com un sol bloc */
  display: flex;
  flex-direction: column;
  align-items: flex-end; /* alineació desktop */
  gap: 0.5vh;
}

/* Els títols i paràgrafs ara ocupen un % de l'altura disponible */
.overlay-text-dates-and-quiz h1 {
  flex: 0 0 auto; /* no creix més del necessari */
  font-size: calc(4vh + 2vw); /* depèn tant de l'altura com de l'amplada */
  line-height: 1.1;
  margin: 0;
}

.overlay-text-dates-and-quiz p.date-location {
  flex: 0 0 auto; /* ocupa l'espai disponible */
  font-size: calc(1.5vh + 0.8vw);
  margin: 1rem 0 0 0; /* margin-top de 1rem per separar del h1, margin-right i margin-left 0 */
  font-weight: bold;
}

.overlay-text-dates-and-quiz h2 {
  flex: 0 0 auto;
  font-size: calc(3vh + 1vw);
}

.overlay-text-dates-and-quiz p.date-time {
  flex: 0 0 auto;
  font-size: calc(1.5vh + 0.8vw);
  font-weight: 900;
  color: #fff;
  margin: 0 0 1rem 0;
}

.overlay-text-dates-and-quiz p.provisional-date {
  flex: 0 0 auto;
  font-size: calc(1.5vh + 0.5vw);
  font-weight: bolder;
  font-style: italic;
  margin: 1rem 0;
  color: rgb(160,160,160);
}


.circuit-logo-overlay {
  flex: 0 0 auto; /* no força creixement */
  display: flex;
  justify-content: flex-end; /* coherent amb desktop */
  width: 100%;
  margin-top: 0.5vh;
}

.circuit-logo-overlay img {
  height: calc(6vh + 2vw); /* clau: depèn de viewport */
  max-height: 120px;
  min-height: 40px;
  width: auto;
  opacity: 1.0;
  filter: drop-shadow(2px 2px 6px rgba(0,0,0,0.7));
}



/* ================= Media Queries ================= */

/* Pantalla petita (mobil vertical, tablet estreta) */
@media screen and (max-width: 768px) {
  
  .location-block {
    align-items: center;
  }

  .overlay-text-dates-and-quiz {
    align-items: center; /* centra el text */
    text-align: center;  /* centra el contingut textual */
    padding: 0.5rem 1rem;
  }

  .circuit-logo-overlay {
    justify-content: center;
    margin-top: 1vh;
  }

  .circuit-logo-overlay img {
    height: calc(5vh + 4vw);
    max-height: 100px;
  }
}




/* ================= BEING: REGISTRATION/QUIZ BUTTON ================= */

.cover-actions-panel,
.quiz-registration-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
  margin-top: 1rem;
  padding: clamp(0.9rem, 2vh, 1.3rem) clamp(0.9rem, 2vw, 1.3rem);
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.50), rgba(255, 255, 255, 0.25));
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.cover-actions-title {
  margin: 0 0 0.2rem 0;
  font-size: clamp(1.05rem, calc(1.4vh + 0.8vw), 1.6rem);
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #c71313;
  text-transform: uppercase;
  text-shadow: 0 0 14px rgba(0, 0, 0, 0.25);
}

.cover-action-btn,
.quiz-register-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: clamp(170px, 21vw, 250px);
  padding: clamp(0.5rem, 1.1vh, 0.82rem) clamp(1rem, 2.6vw, 1.45rem);
  font-size: clamp(0.72rem, calc(0.8vh + 0.45vw), 0.98rem);
  text-align: center;
  background: linear-gradient(115deg, rgba(199, 19, 19, 0.96), rgba(232, 40, 40, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: white;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1.2;
  border-radius: 999px;
  box-shadow: 0 10px 22px rgba(199, 19, 19, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.12) inset;
  text-decoration: none;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease, opacity 0.2s ease;
}

.cover-action-btn::before,
.quiz-register-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.0) 25%, rgba(255, 255, 255, 0.28) 45%, rgba(255, 255, 255, 0.0) 65%);
  transform: translateX(-130%);
  transition: transform 0.6s ease;
}

.cover-action-btn:hover,
.quiz-register-btn:hover {
  transform: translateY(-2px) scale(1.01);
  filter: brightness(1.08);
  box-shadow: 0 14px 26px rgba(199, 19, 19, 0.45), 0 0 20px rgba(232, 40, 40, 0.25);
}

.cover-action-btn:hover::before,
.quiz-register-btn:hover::before {
  transform: translateX(130%);
}

.cover-action-btn:focus-visible,
.quiz-register-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.55), 0 0 0 6px rgba(232, 40, 40, 0.5);
}

.cover-action-item {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
}

.cover-action-btn.is-disabled {
  background: transparent;
  border: none;
  box-shadow: none;
  color: rgba(255, 255, 255, 0.92);
  cursor: not-allowed;
  pointer-events: none;
  opacity: 0.88;
}

.cover-action-btn.is-disabled::before {
  display: none;
}

.cover-action-note,
.quiz-requirement-text {
  margin: 0.2rem 0 0;
  max-width: 520px;
  font-size: clamp(0.7rem, calc(0.9vh + 0.42vw), 0.95rem);
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.88);
}

@media screen and (max-width: 768px) {
  .cover-actions-panel,
  .quiz-registration-block {
    align-items: center;
    text-align: center;
    width: min(92vw, 520px);
    margin-top: 0.75rem;
  }

  .cover-action-btn,
  .quiz-register-btn {
    min-width: min(76vw, 280px);
  }

  .cover-action-item {
    align-items: center;
  }

  .cover-action-note,
  .quiz-requirement-text {
    max-width: 100%;
  }
}

/* ================= END: COVER ACTION PANEL ================= */
