/* -----------------------------------------------------------
   Sancta Maria – Algemene site styling
----------------------------------------------------------- */

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f5f7fb;
  color: #003366;
}

.calendar {
  width: 90%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 1rem 2rem;
}

.calendar-footer {
    text-align: center;
    font-size: 0.75rem;
    color: #666;
    margin: 2rem 0 1rem;
}

/* Dagheader in de desktop grid */
.day-header-grid {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.3rem;
}

.day-title-grid {
    font-size: 1.1rem;
    font-weight: 700;
    color: #003366;
}

.day-week-grid {
    font-size: 0.75rem;
    font-weight: 500;
    color: #666;
    text-transform: lowercase;
}

/* -----------------------------------------------------------
   Nieuwe header met rode balk + rode capsule
----------------------------------------------------------- */

.calendar-header {
  margin-bottom: 1.5rem;
}

.header-bar {
  background: #b30000; /* rode balk */
  padding: 1.2rem;
  border-radius: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

/* De capsule met de maand */
.month-pill {
  background: #cc0000; /* iets lichter/donkerder dan de balk */
  padding: 0.5rem 1.4rem;
  border-radius: 999px;
  color: white;
  font-size: 1.4rem;
  font-weight: 700;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: -0.8rem; /* laat hem boven de balk uitsteken */
  box-shadow: 0 2px 4px rgba(0,0,0,0.25);
}

.month-text {
  color: white;
}

/* Navigatieknoppen */
.nav-btn {
  color: white;
  text-decoration: none;
  font-size: 1.6rem;
  font-weight: 700;
  padding: 0.4rem 0.8rem;
  border: 2px solid white;
  border-radius: 8px;
}

.nav-btn:hover {
  background: white;
  color: #b30000;
}

/* -----------------------------------------------------------
   Mobiel
----------------------------------------------------------- */
@media (max-width: 700px) {

  .header-bar {
    padding-top: 2rem; /* ruimte voor de capsule */
  }

  .month-pill {
    top: -0.8rem;
    font-size: 1.1rem;     /* was 1.2rem */
    padding: 0.3rem 0.7rem;/* iets minder padding */
    white-space: nowrap;   /* op één regel houden */
  }

  .nav-btn {
    font-size: 1.4rem;
    padding: 0.3rem 0.6rem;
  }
}

/* Dagheader mobiel */
.day-header-mobile {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.4rem;
}

.day-title-mobile {
    font-size: 1.4rem;
    font-weight: 700;
    color: #003366;
}

.day-week-mobile {
    font-size: 0.8rem;
    font-weight: 500;
    color: #666;
    text-transform: lowercase;
}

/* Mobiel stacking */
@media (max-width: 500px) {
    .day-header-mobile {
        flex-direction: row;      /* naast elkaar */
        justify-content: space-between;
        align-items: baseline;
        gap: 0;
    }

    .day-title-mobile {
        font-size: 1.25rem;       /* iets kleiner */
    }

    .day-week-mobile {
        font-size: 0.75rem;       /* klein houden */
    }
}


/* -----------------------------------------------------------
   Navigatie & knoppen
----------------------------------------------------------- */

.sancta-button {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 6px;
  border: 2px solid #003366;
  background: white;
  color: #003366;
  font-weight: 600;
  text-decoration: none;
  transition: 0.2s;
}

.sancta-button:hover {
  background: #003366;
  color: white;
}

/* Desktop navigatie: knoppen links/rechts, maandnaam gecentreerd */
/* BOVEN- EN ONDERNAVIGATIE */
.nav-month {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.nav-month-buttons {
  width: 100%;
  display: flex;
  justify-content: space-between;
}

.nav-bottom {
  margin-top: 1.5rem;
}

.month-title {
  text-align: center;
  font-size: 1.6rem;
  font-weight: 700;
  color: #003366;
}

/* -----------------------------------------------------------
   Filters (onder de kalender)
----------------------------------------------------------- */

.filters {
  text-align: center;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  position: relative;
  z-index: 10;
}

.filters label {
  display: inline-block;
  text-align: center;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
#filter-category {
    display: none !important;
}
label[for="filter-category"],
#filter-category {
    display: none !important;
}


/* -----------------------------------------------------------
   Kalender grid (desktop)
----------------------------------------------------------- */

.calendar-grid {
  min-width: 700px; /* voorkomt dat desktop te vroeg inklapt */
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  position: relative;
  z-index: 1;
}

.day {
  background: #ffffff;
  border-radius: 8px;
  min-height: 120px;
  padding: 6px 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  color: #000;

  flex: 1 0 0;
  min-width: 0;

  overflow-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
}

.day--other-month {
  background: #e9edf5;
  color: #7a869a;
}

.day--today {
  border: 2px solid #003366;
  box-shadow: 0 0 6px rgba(0, 51, 102, 0.4);
}

/* Daglabel links, dagnummer rechts (desktop) */
.day-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.day-label {
  font-weight: 700;
  font-size: 0.95rem;
  color: #003366;
}

.day-number {
  font-weight: 600;
  font-size: 0.95rem;
  color: #000;
}

.day-events {
  flex: 1;
}

/* -----------------------------------------------------------
   Events
----------------------------------------------------------- */

.event {
  border-radius: 4px;
  padding: 4px 6px;
  margin-bottom: 4px;
  font-size: 0.85rem;
  color: #000;
}

.event-title {
  display: block;
  font-weight: 600;
  margin-bottom: 2px;
}

.event-time,
.event-location {
  font-size: 0.78rem;
  opacity: 0.9;
}

/* Alleen klikbare events krijgen hover-effect */
.event--clickable {
    cursor: pointer;
    position: relative;
    transition: all 0.15s ease;
}

/* Oplichten + subtiele lift */
.event--clickable:hover {
    filter: brightness(1.15);
    transform: translateY(-2px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* Extra hint: icoontje rechtsboven */
.event--clickable::after {
    content: "↗";
    position: absolute;
    top: 4px;
    right: 6px;
    font-size: 0.75rem;
    opacity: 0.0;
    transition: opacity 0.15s ease;
}

/* Icoontje wordt zichtbaar bij hover */
.event--clickable:hover::after {
    opacity: 0.9;
}

/* Tekst-hint bij hover */
.event--clickable:hover .event-title::after {
    content: " * klik/open *";
    font-weight: 500;
    opacity: 0.9;
    font-size: 0.8rem;
}


/* -----------------------------------------------------------
   Zoekresultatenlijst (schooljaar)
----------------------------------------------------------- */

.search-results {
  margin-top: 2rem;
  padding: 1rem;
  background: #f5f7fb;
  border-radius: 8px;
}

.search-results h2 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.2rem;
  color: #003366;
}

.search-day {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.search-day-header {
  font-weight: 600;
  margin-bottom: 8px;
  color: #000;
  font-size: 1.05rem;
}

.search-event {
  margin-bottom: 6px;
  padding: 8px 10px;
  border-radius: 6px;
  color: #000;
  font-size: 0.95rem;
}

.search-event .event-title {
  font-size: 1rem;
  margin-bottom: 2px;
}

/* -----------------------------------------------------------
   Mobiele layout (bestaande)
----------------------------------------------------------- */

@media (max-width: 700px) {

  .calendar-grid {
    display: block;
  }

  .day {
    margin-bottom: 12px;
    min-height: auto;
    padding: 12px;
  }

  .day-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 2px;
  }

  .day-label {
    font-size: 1rem;
  }

  .day-number {
    font-size: 1.2rem;
  }

  .event {
    font-size: 1rem;
    padding: 8px 10px;
  }

  .nav-month {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .nav-month .month-title {
    margin-bottom: 0.5rem;
    display: block;
  }

  .nav-month-buttons {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
  }

  .nav-month a {
    width: 48%;
    text-align: center;
  }

  .filters {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

/* -----------------------------------------------------------
   SPECIFIEKE DESKTOP SETTINGS
------------------------------------------------------------*/
@media (min-width: 769px) {
    .calendar-header {
        margin-top: 1.5rem; /* of 2rem als je meer ruimte wilt */
    }
}

/* -----------------------------------------------------------
   MOBIELE MAANDWEERGAVE — VERBETERDE UI
----------------------------------------------------------- */

@media (max-width: 768px) {

  /* Container spacing */
  .calendar-mobile {
    padding: 0 10px;
  }

  .calendar-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #fff;
    padding: 0.5rem 0;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid #ddd;
  }

  /* Dagblok */
  .day--mobile {
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 14px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  }

  /* Dagkop */
  .day--mobile .day-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid #f0f0f0;
  }

  .day--mobile .day-label {
    font-size: 1.05rem;
    font-weight: 600;
    color: #333;
  }

  .day--mobile .day-number {
    font-size: 1.3rem;
    font-weight: 700;
    color: #111;
  }

  /* Events */
  .day--mobile .day-events .event {
    padding: 8px 10px;
    border-radius: 6px;
    margin-bottom: 6px;
    font-size: 0.95rem;
    position: relative; /* nodig voor icoontje */
  }

  .day--mobile .event-title {
    font-weight: 600;
  }

  .day--mobile .event-time,
  .day--mobile .event-location {
    font-size: 0.85rem;
    opacity: 0.85;
  }

  /* Vandaag highlight */
  .day--mobile.day--today {
    border-color: #0077cc;
    box-shadow: 0 0 0 2px rgba(0,119,204,0.15);
    scroll-margin-top: 8rem;
  }

  /* -----------------------------------------------------------
     MOBIEL: CLICKABLE EVENTS (basis)
  ----------------------------------------------------------- */

  .day--mobile .event--clickable {
    cursor: pointer;
  }

  /* Icoontje voor klikbare events op mobiel */
  .day--mobile .event--clickable::after {
    content: "↗";
    position: absolute;
    top: 6px;
    right: 8px;
    font-size: 0.8rem;
    opacity: 0.6;
  }

  /* Tap-feedback (active state) */
  .day--mobile .event--clickable:active {
    filter: brightness(0.9);
    transform: scale(0.98);
    box-shadow: 0 0 0 2px rgba(0,0,0,0.15);
    transition: none;
  }
}

/* -----------------------------------------------------------
   TOUCH-DEVICES: hover-effect uitschakelen
   (zodat desktop-hover niet stoort op mobiel)
----------------------------------------------------------- */

@media (hover: none) and (pointer: coarse) {
  .event--clickable:hover {
    filter: none;
    transform: none;
    box-shadow: none;
  }

  .event--clickable:hover .event-title::after {
    content: "";
  }
}

.event--tap {
    filter: brightness(0.9) !important;
    transform: scale(0.97) !important;
    box-shadow: 0 0 0 2px rgba(0,0,0,0.15) !important;
    transition: all 0.12s ease !important;
}
