/* ==========================================================================
   UNTERRICHTSZEITEN – APPLE SETTINGS-GRADE LIST
   Emil Kowalski Design Engineering Applied

   Principles enforced:
   - Taste is trained: Apple-grade subtle depth, continuous corners, clear hierarchy
   - CSS transitions for interruptible UI; exact properties, never 'all'
   - Feedback: subtle scale(0.995) on :active press, hover gated behind pointer query
   - Never animate from scale(0): subtle translateY(6px) on reveal
   - Speed under 300ms, custom ease-out curves
   - prefers-reduced-motion: skip movement, keep opacity and color
   ========================================================================== */

:root {
  --uz-font: 'TheSansOffice', 'TheSans', -apple-system, sans-serif;

  /* Emil Kowalski custom easing curves */
  --uz-ease-out: cubic-bezier(0.23, 1, 0.32, 1);       /* Punchy ease-out for UI */
  --uz-ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);   /* Natural on-screen motion */
  --uz-ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1); /* Apple-like subtle spring */

  --uz-primary: #a60032;
  --uz-green: #95c11f; /* Säule 4 */
}

/* ==========================================================================
   1. SECTION
   ========================================================================== */

.uz-section {
  padding-block: clamp(3rem, 5vw, 4.5rem);
  font-family: var(--uz-font);
  color: var(--text-color, #1d1d1f);
}

/* ==========================================================================
   2. SCHEDULE CONTAINER (Full Width, Vertical Stack)
   ========================================================================== */

.uz-schedules {
  display: flex;
  flex-direction: column;
  gap: clamp(2.25rem, 4vw, 3.25rem);
  width: 100%;
  max-width: 100%;
  margin-inline: auto;
}

/* ==========================================================================
   3. GROUP (Vollzeit / Teilzeit)
   Apple Liquid Glass: blur + subtle border + inner specular highlight
   ========================================================================== */

.uz-group {
  width: 100%;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  overflow: hidden;
  box-shadow:
    0 4px 20px -2px rgba(0, 0, 0, 0.04),
    0 1px 3px rgba(0, 0, 0, 0.02),
    inset 0 1px 0 rgba(255, 255, 255, 1);
  /* Emil: GPU-accelerated enter transition */
  transition: opacity 280ms var(--uz-ease-out), transform 280ms var(--uz-ease-out);
}

/* Scroll reveal initial state (driven by IntersectionObserver in JS) */
.uz-group.uz-reveal-init {
  opacity: 0;
  transform: translateY(10px);
}

.uz-group.uz-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* --- Group Head (Zwischenüberschrift wie im Artikel) --- */

.uz-group__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.5rem 1.75rem 1.15rem;
  background: rgba(255, 255, 255, 0.5);
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.uz-group__title {
  font-family: var(--uz-font);
  font-size: clamp(1.375rem, 1rem + 1.5vw, 1.75rem); /* Exakt wie .section-subheadline */
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--color-text-black, #1d1d1f);
  text-transform: none;
  margin: 0;
  text-wrap: pretty;
}

.uz-group__range {
  font-family: var(--uz-font);
  font-size: 0.9375rem; /* 15px */
  font-weight: 500;
  color: #86868b;
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "lnum" 1, "onum" 0, "tnum" 1;
  white-space: nowrap;
}

/* ==========================================================================
   4. LIST & ROW
   Emil: exact transition properties, button feedback, subtle hover
   ========================================================================== */

.uz-list {
  display: flex;
  flex-direction: column;
}

/* --- Lesson Row --- */

.uz-row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.85rem 1.75rem;
  border-top: 1px solid rgba(0, 0, 0, 0.04);
  background-color: transparent;
  /* Emil: exact properties. Color changes -> ease. Transform -> ease-out. */
  transition: background-color 160ms ease, transform 120ms var(--uz-ease-out), box-shadow 160ms ease;
  cursor: default;
}

.uz-row:first-child {
  border-top: none;
}

/* Emil: hover gated behind pointer query to prevent sticky tap states on mobile */
@media (hover: hover) and (pointer: fine) {
  .uz-row:hover {
    background-color: rgba(0, 0, 0, 0.022);
  }
}

/* Emil: active press confirmation (subtle 0.995 scale) */
.uz-row:active {
  transform: scale(0.995);
}

/* Time column (fixed-width tabular alignment) */
.uz-row__time {
  width: 82px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  font-family: var(--uz-font);
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "lnum" 1, "onum" 0, "tnum" 1;
  line-height: 1.25;
}

.uz-row__from {
  font-size: 1.1875rem; /* 19px — base font */
  font-weight: 600;
  color: #1d1d1f;
  transition: color 200ms ease;
}

.uz-row__to {
  font-size: 0.9375rem; /* 15px */
  font-weight: 400;
  color: #86868b;
}

.uz-row__body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-width: 0;
}

.uz-row__label {
  font-family: var(--uz-font);
  font-size: 1.1875rem; /* 19px — base font */
  font-weight: 500;
  color: #1d1d1f;
  transition: color 200ms ease;
}

.uz-row__dur {
  font-family: var(--uz-font);
  font-size: 0.9375rem; /* 15px */
  font-weight: 400;
  color: #86868b;
  white-space: nowrap;
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "lnum" 1, "onum" 0, "tnum" 1;
}

/* --- Active / Current Lesson Highlight --- */

.uz-row.is-current {
  background-color: rgba(166, 0, 50, 0.04);
  box-shadow: inset 3px 0 0 var(--uz-primary);
}

.uz-row.is-current .uz-row__from {
  color: var(--uz-primary);
  font-weight: 700;
}

.uz-row.is-current .uz-row__label {
  font-weight: 600;
  color: var(--uz-primary);
}

/* ==========================================================================
   5. BREAK ROW (Säule 4 Grün #95c11f)
   Quiet, recognizable, harmonious accent
   ========================================================================== */

.uz-break {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1.75rem 0.5rem calc(1.75rem - 3px);
  border-top: 1px solid rgba(0, 0, 0, 0.04);
  border-left: 3px solid var(--uz-green);
  background: linear-gradient(90deg, rgba(149, 193, 31, 0.18) 0%, rgba(149, 193, 31, 0.09) 100%);
  transition: background-color 160ms ease;
}

.uz-break__label {
  font-family: var(--uz-font);
  font-size: 0.875rem; /* 14px */
  font-weight: 500;
  color: #354a06;
}

.uz-break__dur {
  font-family: var(--uz-font);
  font-size: 0.8125rem; /* 13px */
  font-weight: 500;
  color: #45600b;
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "lnum" 1, "onum" 0, "tnum" 1;
}

/* Lunch break */
.uz-break--lunch {
  background: linear-gradient(90deg, rgba(149, 193, 31, 0.28) 0%, rgba(149, 193, 31, 0.14) 100%);
  border-left-color: #84ac1b;
}

.uz-break--lunch .uz-break__label {
  font-weight: 600;
  color: #273704;
}

/* ==========================================================================
   6. RESPONSIVE (< 700px)
   ========================================================================== */

@media (max-width: 700px) {
  .uz-schedules {
    gap: 1.75rem;
  }

  .uz-group {
    border-radius: 16px;
  }

  .uz-group__head {
    padding: 1.15rem 1.15rem 0.9rem;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .uz-row {
    padding: 0.7rem 1.15rem;
    gap: 0.85rem;
  }

  .uz-row__time {
    width: 68px;
  }

  .uz-row__from {
    font-size: 1.0625rem; /* 17px mobile */
  }

  .uz-break {
    padding: 0.4rem 1.15rem 0.4rem calc(1.15rem - 3px);
  }
}

/* ==========================================================================
   7. PREFERS-REDUCED-MOTION
   Emil: "Keep opacity and color, remove movement."
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  .uz-group,
  .uz-row,
  .uz-break {
    animation: none !important;
    transform: none !important;
  }

  .uz-group.uz-reveal-init {
    opacity: 1 !important;
    transform: none !important;
  }

  .uz-row:active {
    transform: none !important;
  }

  .uz-row {
    transition: background-color 160ms ease !important;
  }

  .uz-row__from,
  .uz-row__label {
    transition: color 200ms ease !important;
  }
}
