/* ============================================================================
   Mahara - Minimalist Event Calendar
   Modern, 1-column, mobile-first, temporal elegance
   ============================================================================ */

/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #1a1a1a;
  background: #ffffff;
  line-height: 1.6;
}

a {
  color: #0066cc;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

a:focus-visible {
  outline: 2px solid #0066cc;
  outline-offset: 2px;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
}

/* ============================================================================
   Layout: Container
   ============================================================================ */

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 640px) {
  .container {
    padding: 0 24px;
  }
}

/* ============================================================================
   Navigation Bar (Tab-Style)
   ============================================================================ */

.navbar {
  border-bottom: 1px solid #e0e0e0;
  padding: 16px 0;
  position: relative;
}

.navbar .container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand {
  font-size: 14px;
  font-weight: 600;
  color: #1a1a1a;
  white-space: nowrap;
}

.brand-sub {
  color: #666666;
  font-weight: 400;
}

.brand-sep {
  color: #e0e0e0;
  margin: 0 4px;
}

/* Aktiver Tag in Navbar */
.active-day {
  font-weight: 700;
  color: #1a1a1a;
  background: #ffe066;
  border-radius: 4px;
  padding: 2px 8px;
  margin: 0 2px;
}

/* Tab-Style Toggle: Heute vs Morgen */
.brand-toggle {
  font-size: 14px;
  color: #0066cc;
  font-weight: 400;
  margin-left: auto;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}

.brand-toggle:hover {
  color: #0052a3;
  text-decoration: none;
}

.brand-toggle:focus-visible {
  outline: 2px solid #0066cc;
  outline-offset: 2px;
  border-bottom-color: #0066cc;
}

/* ============================================================================
   Page Header
   ============================================================================ */

.page-header {
  margin: 32px 0 24px;
  padding: 0;
}

.page-header h1 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 8px;
}

@media (min-width: 640px) {
  .page-header h1 {
    font-size: 28px;
  }
}

.page-header .lead {
  font-size: 16px;
  color: #666666;
  margin: 0;
}

/* ============================================================================
   Filter Bar
   ============================================================================ */

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0;
  align-items: center;
}

.btn {
  padding: 8px 14px;
  border: 1px solid #ccc;
  background: #ffffff;
  color: #1a1a1a;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  white-space: nowrap;
  display: inline-block;
  cursor: pointer;
}

.btn:hover:not(.active) {
  background: #f9f9f9;
  border-color: #999;
}

.btn:focus-visible {
  outline: 2px solid #0066cc;
  outline-offset: 2px;
}

/* Active/Selected state */
.btn.active {
  background: #1a1a1a;
  color: #ffffff;
  border-color: #1a1a1a;
}

/* ============================================================================
   Event List
   ============================================================================ */

.event-list {
  margin: 24px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ============================================================================
   Event Card
   ============================================================================ */

.event-card {
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 14px;
  background: #ffffff;
  transition: background 0.2s;
  display: block;
}

.event-card:hover {
  background: #f9f9f9;
}

.event-card[style*="display: none"] {
  display: none !important;
}

/* Card Header: Icon, Category, Time */
.card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 14px;
  color: #666666;
}

.cat-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.cat-name {
  font-weight: 500;
  color: #1a1a1a;
}

.event-time {
  margin-left: auto;
  white-space: nowrap;
}

/* Card Body: Title & Location */
.card-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.event-title {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
  margin: 0;
}

.event-title a {
  color: #0066cc;
}

.event-title a:hover {
  text-decoration: underline;
}

.event-title a:focus-visible {
  outline: 2px solid #0066cc;
  outline-offset: 2px;
}

.event-location {
  font-size: 14px;
  color: #666666;
  margin: 0;
}

/* ============================================================================
   Footer
   ============================================================================ */

footer {
  border-top: 1px solid #e0e0e0;
  margin-top: 48px;
  padding: 24px 0;
  font-size: 13px;
  color: #666666;
  text-align: center;
}

footer p {
  margin: 0;
}

footer a {
  color: #0066cc;
}

footer a:hover {
  text-decoration: underline;
}

/* ============================================================================
   Utilities
   ============================================================================ */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ============================================================================
   Static Pages (API, Quellen)
   ============================================================================ */

.static-page {
  margin: 32px 0;
  font-size: 15px;
  line-height: 1.7;
}

.static-page h2 {
  font-size: 20px;
  font-weight: 600;
  margin: 28px 0 10px;
}

.static-page pre {
  background: #f5f5f5;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 12px;
  overflow-x: auto;
  font-size: 13px;
}

.static-page ul,
.static-page dl {
  margin: 8px 0 8px 20px;
}

.static-page dt {
  font-weight: 600;
  margin-top: 8px;
}

.static-page dd {
  margin-left: 16px;
}

.institution-list {
  columns: 2;
  column-gap: 24px;
}

.institution-list li {
  break-inside: avoid;
  padding: 2px 0;
}

/* ============================================================================
   Print Styles
   ============================================================================ */

@media print {
  .navbar,
  .filter-bar,
  footer {
    display: none;
  }

  .event-card {
    page-break-inside: avoid;
    border: none;
    box-shadow: 0 0 0 1px #e0e0e0;
  }
}
