html {
  background-color: var(--level-color);
}

:root {
  --header-background-color: var(--level-color);
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--secondary-color);
}

::-webkit-scrollbar {
  width: 0px;
  background: transparent;
}

.header {
  background-color: var(--level-color) !important;
  color: var(--text-color) !important;
}

.start {
  width: 100%;
  position: relative;
  overflow: hidden;
  color: var(--text-color);
  padding-bottom: 32px;
}

.container {
  width: 100%;
  max-width: 1170px;
  overflow: hidden;
  margin: 0 auto;
}

.startheaderWrapper {
  position: relative;
  display: flex;
  align-items: flex-end;
  height: 120px;
  margin-top: calc(60px + 18px);
  margin-bottom: 16px;
}

.starttitle {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  padding-right: 16px;
  white-space: nowrap;
  margin-bottom: 0;
}

.startimageWrapper {
  position: relative;
  flex: 1 1 auto;
  height: 100%;
  min-width: 0;
}

.startimage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  border-radius: 12px;
}

.starteindtermen {
  position: absolute;
  bottom: -16px;
  left: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 2;
}

.startsubtitle {
  color: var(--text-color);
  line-height: 1.2;
  margin: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.startsubtitle.expanded {
  display: block;
}

.starteindterm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--level-color);
  font-size: 0.925rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
  appearance: none;
  outline: none;
  border: solid 2px white;
}

.starteindterm:hover {
  background: var(--level-color);
  color: white;
  transform: translateY(-2px);
}

.starteindterm:active {
  transform: translateY(0);
}

.eindterm-description {
  display: none;
}

.start-load-more {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
  background-color: transparent;
  border: none;
  color: inherit;
}

.start-load-more-text {
  margin: 0;
  font-weight: 700;
}

.weken {
  flex: 1;
}

.weektitle {
  color: var(--text-color);
  border-color: #3535352b;
  margin-top: 24px;
  margin-bottom: 0px;
  z-index: 1;
}

.go-content {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  position: relative;
  overflow: hidden;
  margin-left: 0;
  gap: 16px;
  padding: 16px;
  padding-top: 8px;
  padding-bottom: 16px;
}

.go-week {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 150px;
  border-radius: var(--border-radius);
  background-color: #ffffff;
  z-index: 1;
  cursor: pointer;
  justify-items: center;
  filter: drop-shadow(0px 4px 4px rgba(0, 0, 0, 0.25));
  will-change: transform;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.go-week:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2);
}

.week-video {
  display: none;
  width: 100%;
  align-self: top;
  justify-self: top;
  object-fit: cover;
  z-index: 0;
  border-radius: var(--border-radius);
}

.week-title {
  background-color: #ffffff;
  display: none;
  padding: 4px 16px 0 16px;
  margin-bottom: 0;
  margin-top: 0;
  text-wrap: wrap;
  border-radius: var(--border-radius) var(--border-radius) 0 0;
  position: relative;
  bottom: -4px;
  z-index: 2;
  font-weight: 700;
}

.week-title.visible {
  display: inline-block;
}

.week-text {
  position: relative;
  align-items: left;
  justify-content: left;
  text-align: left;
}

.week-pg-wrapper {
  width: calc(100% - 32px);
  padding: 8px 16px 16px 16px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
  background-color: #ffffff;
  margin: 0;
  position: relative;
  max-height: max-content;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.week-pg {
  margin: 0;
  flex: 1;
  min-height: 0;
}

.pg-clamped {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  line-clamp: 6;
  -webkit-line-clamp: 6;
  overflow: hidden;
  text-overflow: ellipsis;
}

.week-banner {
  display: flex;
  width: 100%;
  overflow: hidden;
  padding-top: 16px;
}

.week-banner-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.week-banner-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 16px; /* Horizontal padding */
  box-sizing: border-box;
}

.week-banner-text {
  margin: 12px 0 0;
  font-size: var(--medium-text);
  font-weight: 700;
  text-align: center;

  /* Wrapping improvements */
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: auto;
}

.week-banner-num {
  background-color: rgb(238, 220, 219);
  width: 80px;
  height: 80px;
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
}

.week-banner-num-text {
  margin: 0;
  margin-bottom: 0;
  font-size: 3.625rem;
  font-weight: 900;
  color: var(--level-color);
  text-align: center;
}

.week-banner-text {
  font-size: var(--medium-text);
  font-weight: 700;
}

.week-image {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  width: 100%;
  aspect-ratio: 16/10;
  border-radius: var(--border-radius);
  overflow: hidden;
  object-fit: cover;
  cursor: pointer;
  border: none;
  grid-column: span 2;
}

.week-pdf {
  width: 100%;
  height: 100%;
  border-radius: var(--border-radius);
}

.pdf-fullscreen {
  display: flex;
  align-items: center;
  background: none;
  border: none;
  color: var(--text-color, black);
  font-family: var(--font);
  cursor: pointer;
  z-index: 1001;
  padding: 10px;
  gap: 4px;
}

.pdf-fullscreen-text {
  margin: 0;
  font-weight: 700;
}

.week-videos {
  display: flex;
  flex-direction: column;
}

.week-video {
  width: 100%;
  aspect-ratio: 16/9;
}

.videopagination {
  display: flex;
  align-items: center;
  justify-content: center;
}

.week-files-container {
  max-height: 100%;
  overflow: scroll;
}

.week-content-wrapper {
  display: flex;
  gap: 8px;
  grid-column: span 1;
  flex-direction: column;
}

.week-video-leeg {
  display: flex;
  flex-direction: row;
  gap: 5px;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  text-align: center;
  border-radius: 10px;
  border-style: solid;
  border-width: 2px;
  background-color: #d8d8d86e;
  border-color: #c7c7c76e;
  height: fit-content;
  cursor: pointer;
  margin-bottom: 10px;
  text-decoration: none;
  color: var(--text-color);
  width: calc(100%-32px);

  div {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
  }
}

.week-files {
  display: flex;
  flex-direction: row;
  gap: 5px;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  text-align: center;
  border-radius: 10px;
  border-style: solid;
  border-width: 2px;
  background-color: #d8d8d86e;
  border-color: #c7c7c76e;
  height: fit-content;
  cursor: pointer;
  margin-bottom: 10px;
  text-decoration: none;
  color: var(--text-color);

  div {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
  }
}

.week-file-name {
  margin: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.2);
  width: 100%;
  text-align: left;
}

.week-file-description {
  margin: 0;
  width: 100%;
  text-align: left;
}

.week-files:hover {
  background-color: #c7c7c7a8;
}

.week-file-icon {
  width: 50px;
  height: 50px;
}

.week-content-container {
  display: none;
  grid-template-columns: repeat(3, 1fr);
  justify-content: center;
  grid-gap: 10px;
  width: 100%;
  min-height: 100%;
}

.week {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px;
  border-radius: var(--border-radius);
  width: 100%;
  height: 100%;
  cursor: grab;
}

.pagination {
  display: none;
  align-items: center;
  flex-direction: row;
  justify-content: center;
  text-align: center;
  width: 100%;
  height: 25px;
  gap: 10px;
  margin-top: 10px;
}

.pagination button {
  color: black;
  float: left;
  padding: 8px 16px;
  border: 2px solid #ddd;
  text-decoration: none;
  border-radius: var(--border-radius);
  background-color: var(--secondary-color);
  cursor: pointer;
  font-size: 0.925rem;
}

.pagination button.active {
  background-color: var(--primary-color);
  color: white;
  border: 2px solid var(--primary-color);
  font-weight: 700;
}

.pagination button:hover:not(.active) {
  background-color: #ddd;
}

.week-popup {
  display: none;
  flex-direction: column;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: calc(85vw - 40px);
  height: auto;
  max-height: calc(90vh - 20px);
  background-color: #ffffff;
  filter: drop-shadow(0px 4px 4px rgba(0, 0, 0, 0.25));
  border-radius: var(--border-radius);
  z-index: 2001;
  padding: 20px;
  overflow-y: auto;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.popup-content {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.popup-overlay {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: none;
  background-size: cover;
  background-position: center;
  overflow-y: auto;
  min-height: 100vh;
  padding: 0 0 40px 0;
}

.popup-overlay::before {
  content: '';
  position: fixed;
  top: -50vh;
  left: 0;
  right: 0;
  bottom: 0;
  -webkit-backdrop-filter: var(--header-blur, blur(16px));
  backdrop-filter: var(--header-blur, blur(16px));
  background-color: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.1));
  z-index: -1;
  width: 100%;
  height: 200vh;
}

.popup-footer-line {
  width: 100%;
  height: 2px;
  background-color: #3535352b;
  margin-bottom: 8px;
}

.popup-close {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 24px;
  z-index: 200011;
  cursor: pointer;
  background: none;
  border: none;
  color: var(--text-color);
}

.popup-close:hover {
  color: var(--primary-color);
}

.fullscreen-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.9);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  box-sizing: border-box;
}

.fullscreen-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.fullscreen-close {
  position: absolute;
  top: 16px;
  right: 16px;
  color: white;
  font-size: 2rem;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 3100;
}

.fullscreen-close:hover {
  color: var(--primary-color, #ff0000);
}

@media (width < 1200px) {
  .go-content {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (width < 900px) {
  .go-content {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (width < 550px) {
  .go-content {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (900px > width) {
  .week-title {
    padding: 4px 8px 0 8px;
  }

  .week-pg-wrapper {
    padding: 8px 8px 8px 8px;
  }

  .week-content-wrapper {
    grid-row: 2;
    grid-column: span 2;
  }

  .week-content-container {
    grid-template-columns: 1fr !important;
  }

  .go-week {
    flex: 0 0 calc(25% - 20px);
  }
}

/*Small specific styles*/
@media (550px > width) {
  .container {
    width: calc(100vw - 30px);
  }

  .startsubtitle {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .levels-container {
    flex-direction: column;
  }
  .cycle {
    width: 100%;
  }
  .mob-nav,
  .menu-toggle {
    display: flex;
  }

  .go-week {
    flex: 0 0 calc(50% - 20px);
  }

  .week-popup {
    max-height: calc(80vh - 20px);
    width: calc(95vw - 30px);
  }
}

/*Phone specific styles*/
@media (768px > width >= 550px) {
  .container {
    width: calc(100vw - 30px);
  }

  .levels-container {
    flex-direction: column;
  }
  .cycle {
    width: 100%;
  }
  .mob-nav,
  .menu-toggle {
    display: flex;
  }

  .week-content-wrapper {
    grid-row: 2;
  }

  .week-popup {
    max-height: calc(80vh - 20px);
    width: calc(95vw - 30px);
  }
}

/*Tablet specific styles*/
@media (1200px > width >= 768px) {
  .container {
    width: calc(100vw - 30px);
  }

  .pri-nav,
  .menu-toggle {
    display: flex;
  }

  .levels-container {
    flex-direction: column;
  }

  .week-image {
    grid-column: span 2;
  }

  .cycle {
    width: 100%;
  }
  .pri-nav-grid {
    display: none;
  }
}

/*PC specific styles*/
@media (width >= 1200px) {
  .container {
    width: calc(100vw - 30px);
  }

  .pc-nav {
    display: flex;
  }
}

.week-image.week-pdf {
  background-color: #f8f9fa;
  border: 1px solid #e0e0e0;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  height: auto;
}

canvas.week-pdf {
  width: 100% !important;
  height: auto !important;
  display: block;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  margin: auto;
}

.pdf-fullscreen {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
}

.pdf-fullscreen:hover {
  background-color: var(--level-color);
  color: white;
  transform: scale(1.05);
}

.types {
  width: 100%;
  background: linear-gradient(
    180deg,
    var(--level-color) 0% 50%,
    transparent 50% 100%
  );
  padding-bottom: 8px;
}

.types-container {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  padding: 10px;
}

.type-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex: 0 0 300px;
  width: 300px;
  min-height: 56px;
  border-radius: var(--border-radius);
  background-color: var(--card-color, var(--primary-color));
  color: #ffffff;
  cursor: pointer;
  padding: 18px 24px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  will-change: transform;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    filter 0.2s ease;
  text-decoration: none;
}

.type-card-row {
  flex: 1;
  width: none;
}

.type-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 5px 8px rgba(0, 0, 0, 0.2);
  filter: brightness(1.06);
}

.type-card-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.2px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.type-card-arrow {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  opacity: 0.9;
  transition: transform 0.2s ease;
}

.type-card:hover .type-card-arrow {
  transform: translateX(4px);
}

.type-card-description {
  display: none;
}

.type-popup {
  display: none;
  flex-direction: column;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(440px, 85vw);
  max-height: calc(90vh - 40px);
  overflow-y: auto;
  background-color: #ffffff;
  border-top: 8px solid var(--card-color, var(--primary-color));
  border-radius: var(--border-radius);
  filter: drop-shadow(0px 4px 4px rgba(0, 0, 0, 0.25));
  z-index: 2001;
  padding: 32px 28px 28px 28px;
}

.type-popup-title {
  margin: 0 0 12px 0;
  font-size: 1.6rem;
  font-weight: 800;
  color: #1a1a1a;
}

.type-popup-description {
  margin: 0;
  line-height: 1.55;
  color: #444;
}

.type-popup-close {
  position: absolute;
  top: 14px;
  right: 18px;
  font-size: 24px;
  background: none;
  border: none;
  cursor: pointer;
  color: #999;
  z-index: 1;
}

.type-popup-close:hover {
  color: var(--card-color, var(--primary-color));
}

.type-card-zenden {
  --card-color: #ffdc2d;
}

.type-card-ontvangen {
  --card-color: #ff975c;
}

.type-card-uitwisselen {
  --card-color: #e14d4d;
}

.type-card-starten {
  --card-color: #63c443;
}

.type-card-wedstrijd {
  --card-color: #4d9ee1;
}

.type-card-rust {
  --card-color: #4d9ee1;
  margin-left: 32px;
}

@media (550px > width) {
  .type-card {
    padding: 14px 18px;
    min-height: 48px;
    flex: 0 0 300px;
    width: 300px;
    margin: 0;
  }

  .type-card-title {
    font-size: 1.05rem;
  }

  .type-popup {
    padding: 26px 20px 22px 20px;
  }
}
