/* =================================================================
   TERMINE-KOMPONENTEN CSS
   Spielmannszug Rhede 2025 - Moderne Event-Darstellung
   ================================================================= */

/* === TERMINE HEADER === */
.termine-header {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  margin-bottom: var(--space-12);
  text-align: center;
  align-items: center;
  justify-content: center;
}


.termine-subtitle {
  font-size: var(--text-lg);
  color: var(--color-gray-600);
  line-height: var(--leading-relaxed);
  max-width: 600px;
  margin: var(--space-4) auto 0;
}

@media (min-width: 768px) {
  .termine-subtitle {
    margin: var(--space-4) 0 0;
  }
}

/* === MONTH NAVIGATION === */
.month-nav {
  margin-bottom: var(--space-8);
}

/* Mobile Navigation - nur auf Mobile sichtbar */
.month-nav.mobile-only {
  display: flex;
  gap: var(--space-2);
  justify-content: center;
}

/* Desktop Navigation - nur auf Desktop sichtbar */
.month-nav.tablet-up {
  display: none; /* Standardmäßig versteckt */
  gap: var(--space-3);
  justify-content: flex-start;
  flex-wrap: wrap;
}

@media (min-width: 768px) {
  .month-nav.mobile-only {
    display: none; /* Mobile Navigation verstecken */
  }
  
  .month-nav.tablet-up {
    display: flex; /* Desktop Navigation zeigen */
    justify-content: center;
  }
}

/* Mobile scrollable navigation */
.month-nav__scroll {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  padding: var(--space-2) 0;
  scroll-snap-type: x mandatory;
}

.month-nav__scroll::-webkit-scrollbar {
  display: none;
}

.month-nav__item {
  background: var(--color-white);
  color: var(--color-primary);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-lg);
  text-decoration: none;
  font-weight: var(--font-semibold);
  font-size: var(--text-sm);
  border: 2px solid var(--color-primary);
  transition: all var(--transition-fast);
  white-space: nowrap;
  scroll-snap-align: start;
}

@media (min-width: 768px) {
  .month-nav__item {
    padding: var(--space-3) var(--space-5);
    font-size: var(--text-base);
  }
}

.month-nav__item:hover,
.month-nav__item.active {
  background: var(--color-primary);
  color: var(--color-white);
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* === MONTH SECTIONS === */
.month-section {
  margin-bottom: var(--space-16);
  scroll-margin-top: 100px; /* Account for fixed header */
}

.month-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-8);
  padding-bottom: var(--space-4);
  border-bottom: 3px solid var(--color-primary-pale);
}

.month-header h2 {
  color: var(--color-primary);
  font-size: var(--text-2xl);
  margin: 0;
  border-bottom: none; /* Entfernt doppelte Unterstreichung */
  padding-bottom: 0; /* Entfernt doppelten Padding */
}

.event-count {
  background: var(--color-primary-pale);
  color: var(--color-primary-dark);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
}

/* === EVENT TABLES (Desktop) === */
.events-table {
  background: var(--color-white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  margin-bottom: var(--space-8);
}

.events-table table {
  width: 100%;
  margin: 0;
  border-radius: 0;
  box-shadow: none;
}

.events-table thead {
  background: var(--color-primary);
}

.events-table th {
  color: var(--color-white);
  font-weight: var(--font-semibold);
  text-align: left;
  padding: var(--space-4) var(--space-5);
  border-bottom: none;
}

.events-table tbody tr {
  border-bottom: 1px solid var(--color-gray-100);
  transition: background-color var(--transition-fast);
}

.events-table tbody tr:hover {
  background: var(--color-gray-50);
}

.events-table tbody tr:last-child {
  border-bottom: none;
}

.events-table td {
  padding: var(--space-4) var(--space-5);
  vertical-align: top;
}

.event-date {
  min-width: 120px;
}

.event-date strong {
  display: block;
  color: var(--color-primary-dark);
  font-size: var(--text-base);
  margin-bottom: var(--space-1);
}

.event-weekday {
  font-size: var(--text-sm);
  color: var(--color-gray-500);
  font-weight: var(--font-medium);
}

.event-time {
  color: var(--color-primary);
  font-weight: var(--font-semibold);
  min-width: 100px;
}

.event-time i {
  color: var(--color-primary);
  margin-right: var(--space-1);
}

.event-title {
  padding-right: var(--space-4);
}

.event-name {
  font-weight: var(--font-semibold);
  color: var(--color-gray-900);
  margin-bottom: var(--space-2);
  line-height: var(--leading-tight);
}

.event-location {
  color: var(--color-gray-600);
}

.event-location i {
  color: var(--color-primary);
  margin-right: var(--space-1);
}

.event-actions {
  text-align: center;
  width: 60px;
}

/* === RESPONSIVE DESIGN === */
@media (max-width: 767px) {
  .month-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
  }
  
  .month-header h2 {
    font-size: var(--text-xl);
  }
}

@media (min-width: 768px) {
  .events-table {
    display: block;
  }
}

@media (max-width: 767px) {
  .events-table {
    display: none;
  }

}

/* === ACCESSIBILITY === */
.month-nav__item:focus {
  outline: 3px solid rgba(52, 98, 63, 0.3);
  outline-offset: 2px;
}

/* === ANIMATIONS === */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.month-section {
  animation: slideInUp 0.6s ease-out;
}

/* === PRINT STYLES === */
@media print {
  .month-nav,
  .event-actions,
  .termine-cta {
    display: none !important;
  }
  
  .events-table,
  .month-section {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}

.info-card .btn--primary, .info-card .btn--primary i {
  color: var(--color-white);
}