/* =========================
   BASIS
========================= */

body {
  font-family: Arial, sans-serif;
  margin: 0;
  background: #ffffff;
  color: #333;
}

/* =========================
   HEADER (MODERN GLASS)
========================= */

.header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;

  background: rgb(255, 255, 255);
  backdrop-filter: blur(14px);
 border-bottom: 5px solid #2a6f2a;
  
  box-shadow: 0 10px 100px rgba(0,0,0,0.25);
}

.header-inner {
  max-width: 1100px;
  margin: auto;
  padding: 12px 16px 20px;

  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* =========================
   NAV + BUTTONS
========================= */

.week-nav {
  display: flex;
  gap: 8px;
}

.week-nav button,
.day-buttons button {
  padding: 10px 16px;
  border-radius: 10px;
  border: none;

  background: rgba(0,0,0,0.05);
  cursor: pointer;

  transition: all 0.25s ease;
}

.week-nav button:hover,
.day-buttons button:hover {
  background: rgba(42,111,42,0.12);
  color: #2a6f2a;

  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.day-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.day-buttons .active {
  background: #2a6f2a;
  color: #fff;
  box-shadow: 0 4px 12px rgba(42,111,42,0.3);
}

/* =========================
   WEEK LABEL
========================= */

#weekLabel {
  flex: 1;
  padding: 8px 16px;
  border-radius: 10px;

  background: #2a6f2a;
  color: #ffffff;

  font-weight: 600;
  text-align: center;
}

/* =========================
   SEARCH
========================= */

.search-container {
  display: flex;
  justify-content: center;
}

#programSearch {
  width: 100%;
  max-width: 400px;

  padding: 12px 18px;
  border-radius: 999px;

  border: none;
  outline: none;

  background: rgba(0,0,0,0.05);

  transition: 0.25s;
}

#programSearch:focus {
  background: #fff;
  box-shadow: 0 0 0 3px rgba(42,111,42,0.2);
}

/* =========================
   TIMELINE
========================= */

main {
  padding-top: 180px;
  padding-bottom: 120px;
}

#timeline {
  margin: auto;
  padding: 100px;
}

/* =========================
   WEEK VIEW COLUMNS
========================= */

.day-container {
  display: inline-block; /* naast elkaar */
  vertical-align: top;
  width: 13%; /* 7 dagen => 100% / 7 ≈ 14% */
  margin-right: 1%;
  box-sizing: border-box;
}

.day-container h2 {
  font-size: 16px;
  text-align: center;
  margin-bottom: 8px;
}

.day-container .program {
  margin-bottom: 8px;
  padding: 6px 8px;
  border-left: 4px solid #2a6f2a;
}

.day-container .program .time,
.day-container .program .title {
  display: block;
  font-size: 13px;
}

.day-container .program .desc,
.day-container .program .progress {
  display: none; /* alleen tijd en titel tonen */
}

/* Pas hover wat compacter */
.day-container .program:hover {
  transform: translateY(-2px);
  background: #2a6f2a17;
}

/* =========================
   PROGRAM BLOKKEN
========================= */

.program {
  background: #fff;
  margin-bottom: 12px;
  padding: 10px;

  border-radius: 12px;
  border-left: 5px solid #2a6f2a;

  box-shadow: 0 4px 10px rgba(0,0,0,0.06);

  cursor: pointer;
  transition: all 0.25s ease;
}

.program:hover {
  transform: translateY(-3px);
  background: #2a6f2a17;
}

/* ACTIEF */

.program.now {
  background: #2a6f2a;
  color: #fff;
  border-left: 5px solid #b30000;
}

.program.now .progress-bar {
  background: linear-gradient(90deg, #b30000, #ff4d4d);
}


/* TITELS */

.program .title {
  font-size: 18px;
  font-weight: bold;
}

.program .time {
  font-size: 13px;
  background: #e6f3e6;
  display: inline-block;
  padding: 4px 8px;
  border-radius: 6px;
  margin-bottom: 5px;
}

.program.now .time {
  background: #092400;
  color: #fff;
}

/* BESCHRIJVING */

.program .desc {
  display: none;
  margin-top: 10px;
}

.program.open .desc {
  display: block;
}

/* =========================
   PROGRESS BAR
========================= */

.progress {
  height: 4px;
  background: #ddd;
  border-radius: 3px;
  margin-top: 6px;
}

.progress-bar {
  height: 100%;
 background: #ccc; /* grijs standaard */
}




/* =========================
   LIVE BADGE
========================= */

.live-badge {
  position: absolute;
  top: 10px;
  right: 10px;

  background: #b30000;
  color: #fff;

  font-size: 10px;
  padding: 4px 8px;
  border-radius: 6px;
}

/* =========================
   FOOTER
========================= */

.footer {
  position: fixed;
  bottom: 0;
  width: 100%;
  background: rgb(255, 255, 255);
  backdrop-filter: blur(14px);
 border-top: 5px solid #2a6f2a;
  

  box-shadow: 0 -30px 100px rgba(0,0,0,0.1);
}

.live-bar {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 10px 20px;
}

.live-item {
  flex: 1;
  text-align: center;

  background: rgba(0,0,0,0.05);
  border-radius: 10px;
  padding: 8px;

  transition: 0.3s;
}

.live-item:hover {
  transform: translateY(-2px);
}

.live-item.now {
  background: #2a6f2a;
  color: #fff;
}

.live-label {
  font-size: 10px;
  opacity: 0.7;
}

.footer-logo img {
  max-width: 90px;
}

/* =========================
   FOOTER WAVE
========================= */

.footer-wave {
  position: absolute;
  top: -45px;
  width: 100%;
  height: 45px;
}

/* =========================
   WEEK VIEW COLUMNS (responsive)
========================= */

.day-container {
  display: inline-block;
  vertical-align: top;
  width: 13%; /* 7 kolommen standaard */
  margin-right: 1%;
  box-sizing: border-box;
}

.day-container:last-child {
  margin-right: 0;
}

.day-container h2 {
  font-size: 16px;
  text-align: center;
  margin-bottom: 8px;
}

.day-container .program {
  margin-bottom: 8px;
  padding: 6px 8px;
  border-left: 4px solid #2a6f2a;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.day-container .program:hover {
  transform: translateY(-2px);
  background: #2a6f2a17;
}

/* Alleen tijd + titel tonen */
.day-container .program .time,
.day-container .program .title {
  display: block;
  font-size: 13px;
}

.day-container .program .desc,
.day-container .program .progress {
  display: none;
}

/* =========================
   RESPONSIVE MEDIA QUERIES
========================= */

/* 5 kolommen op breedte < 1200px */
@media screen and (max-width: 1200px) {
  .day-container {
    width: 18%;
  }
}

/* 3 kolommen op breedte < 900px */
@media screen and (max-width: 900px) {
  .day-container {
    width: 30%;
    margin-right: 3.3%;
  }
  .day-container:nth-child(3n) {
    margin-right: 0;
  }
}

/* 2 kolommen op breedte < 600px */
@media screen and (max-width: 600px) {
  .day-container {
    width: 48%;
    margin-right: 4%;
  }
  .day-container:nth-child(2n) {
    margin-right: 0;
  }
}

/* 1 kolom op mobiel < 400px */
@media screen and (max-width: 400px) {
  .day-container {
    width: 100%;
    margin-right: 0;
  }
}

/* =========================
   DARK MODE
========================= */

body.dark-mode {
  background: #121212;
  color: #e0e0e0;
}

body.dark-mode .header,
body.dark-mode .footer {
  background: rgba(20,20,20,0.85);
  border-color: #2a6f2a;
  box-shadow: 0 10px 100px rgba(0,0,0,0.5);
}

body.dark-mode #weekLabel {
  background: #2a6f2a;
  color: #fff;
}

body.dark-mode .program {
  background: #1e1e1e;
  color: #e0e0e0;
  border-left-color: #2a6f2a;
}

body.dark-mode .program.now {
  background: #2a6f2a;
  color: #fff;
}

body.dark-mode .program .time {
  background: #2a6f2a22;
  color: #fff;
}

body.dark-mode .search-container input {
  background: #2a2a2a;
  color: #fff;
}

body.dark-mode .live-item {
  background: #1e1e1e;
  color: #e0e0e0;
}

body.dark-mode .live-item.now {
  background: #2a6f2a;
  color: #fff;
}

body.dark-mode .day-buttons button,
body.dark-mode .week-nav button {
  background: #2a2a2a;
  color: #e0e0e0;
}

body.dark-mode .day-buttons button.active {
  background: #2a6f2a;
  color: #fff;
}


/* =========================
   ANIMATIES
========================= */

.program {
  opacity: 0;
  transform: translateY(10px);
  animation: fadeInUp 0.4s ease forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.program.now {
  transition: background 0.4s ease, color 0.4s ease, transform 0.3s ease;
}

.progress-bar {
  transition: width 0.5s linear;
}

.program .desc {
  display: none;
  margin-top: 10px;
  max-height: 0;
  overflow: hidden;
  transition: all 0.35s ease;
}

.program.open .desc {
  display: block;
  max-height: 300px;
}

.program.now {
  transition: background 0.4s ease, color 0.4s ease, transform 0.3s ease;
}

/* =========================
   MOBILE OPTIMALISATIE
========================= */

@media screen and (max-width: 600px) {

  /* HEADER compacter */
  .header-inner {
    padding: 8px 10px 12px;
    gap: 8px;
  }

  /* WEEK NAV knoppen kleiner */
  .week-nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  .week-nav button {
    padding: 6px 10px;
    font-size: 12px;
    border-radius: 8px;
  }

  #weekLabel {
    font-size: 12px;
    padding: 6px;
  }

  /* DAG knoppen compacter */
  .day-buttons button {
    padding: 6px 8px;
    font-size: 12px;
  }

  /* SEARCH kleiner */
  #programSearch {
    padding: 8px 12px;
    font-size: 13px;
  }

  /* TIMELINE minder padding */
  main {
    padding-top: 140px;
    padding-bottom: 80px;
  }

  #timeline {
    padding: 10px;
  }

  /* PROGRAM blokken compacter */
  .program {
    padding: 8px;
    border-radius: 10px;
  }

  .program .title {
    font-size: 15px;
  }

  .program .time {
    font-size: 11px;
    padding: 3px 6px;
  }

  /* WEEK VIEW: 1 kolom op mobiel */
  .day-container {
    width: 100% !important;
    margin-right: 0 !important;
  }
 }



/* EXTRA: super kleine schermen */
@media screen and (max-width: 400px) {

  /* Footer volledig verbergen (optioneel) */
  .footer {
    display: none;
  }

  main {
    padding-bottom: 20px;
  }
}

@media screen and (max-width: 600px) {

  .week-nav button {
    padding: 6px;
    font-size: 0; /* tekst verbergen */
    width: 32px;
    height: 32px;
  }

  #prevWeek::after {
    content: "◀";
    font-size: 14px;
  }

  #nextWeek::after {
    content: "▶";
    font-size: 14px;
  }

  #toggleView::after {
    content: "📅";
    font-size: 14px;
  }

  #toggleDarkMode::after {
    content: "🌙";
    font-size: 14px;
  }

  #weekLabel {
    font-size: 10px;
  }
}

/* =========================
   NATIVE MOBILE UPGRADE
========================= */

/* 1️⃣ iOS HEADER */
.header {
  backdrop-filter: blur(20px);
  background: rgba(255,255,255,0.75);
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

body.dark-mode .header {
  background: rgba(20,20,20,0.75);
}

.header.compact {
  padding: 4px 0;
}

.header.compact .header-inner {
  gap: 6px;
}


/* 3️⃣ NATIVE FOOTER */
.footer {
  height: 55px;
  padding: 0;
}

.live-bar {
  height: 100%;
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.live-item {
  background: none;
  font-size: 11px;
  padding: 2px;
}

.live-item.now {
  font-weight: bold;
}

/* Verberg op kleine schermen */
@media (max-width: 500px) {
  .footer {
    display: none;
  }
}


/* 4️⃣ ANIMATIES */
.program {
  transition: transform 0.2s ease, background 0.2s ease;
}

.program:active {
  transform: scale(0.97);
}

html {
  scroll-behavior: smooth;
}

body {
  -webkit-overflow-scrolling: touch;
}


/* 6️⃣ SEARCH */
#programSearch {
  border-radius: 12px;
  font-size: 14px;
}

#programSearch::placeholder {
  opacity: 0.6;
}


/* 7️⃣ POLISH */
* {
  -webkit-tap-highlight-color: transparent;
}

button {
  touch-action: manipulation;
}

::selection {
  background: #2a6f2a;
  color: #fff;
}


/* Dark mode knop standaard verbergen */
#toggleDarkMode {
  display: none;
}

/* Enkel tonen op mobiel */
@media screen and (max-width: 600px) {
  #toggleDarkMode {
    display: inline-block;
  }
}