/* Calendar Page Styles */
.calendar-page {
  padding: 60px 0;
  background: var(--light-grey);
}

.banner-subtitle {
  font-size: 1.2rem;
  opacity: 0.9;
  margin-top: 10px;
}

.calendar-layout {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 40px;
  align-items: start;
}

/* Calendar Grid */
.calendar-grid-container {
  background: white;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}

.semester-label {
  grid-column: 1 / -1;
  font-family: 'Stoke', serif;
  font-size: 1.3rem;
  color: var(--dark-green);
  padding: 15px 0 5px;
  border-bottom: 2px solid var(--gold);
  margin-bottom: 10px;
}

.semester-label:first-child {
  padding-top: 0;
}

.calendar-month {
  background: #fafafa;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #eee;
}

.month-header {
  background: var(--dark-green);
  color: white;
  padding: 10px;
  text-align: center;
  font-weight: 600;
  font-size: 0.95rem;
}

.month-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  padding: 8px;
}

.day-header {
  text-align: center;
  font-size: 0.7rem;
  font-weight: 600;
  color: #888;
  padding: 4px 0;
}

.day {
  text-align: center;
  padding: 6px 2px;
  font-size: 0.8rem;
  border-radius: 4px;
  transition: all 0.2s;
  border: 1px solid var(--grey);
}

.day.empty {
  background: transparent;
}

.day.start {
  background: var(--dark-green);
  color: white;
  font-weight: 600;
  border: 1px solid var(--dark-green);
}

.day.holiday {
  background: var(--gold);
  color: var(--dark-green);
  font-weight: 600;
  border: 1px solid var(--gold);
}

.day.break {
  background: #e8f5e9;
  color: var(--dark-green);
  border: 1px solid #81c784;
}

.day.end {
  background: var(--red);
  color: white;
  font-weight: 600;
  border: 1px solid var(--red);
}

/* Dates Sidebar */
.dates-sidebar {
  background: white;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  position: sticky;
  top: 100px;
}

.sidebar-header h2 {
  font-size: 1.5rem;
  color: var(--dark-green);
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--gold);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 25px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eee;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: #666;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.legend-dot.start { background: var(--dark-green); }
.legend-dot.holiday { background: var(--gold); }
.legend-dot.break { background: #e8f5e9; border: 1px solid #a5d6a7; }
.legend-dot.end { background: var(--red); }

.dates-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.date-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  padding: 15px 0;
  border-bottom: 1px solid #f0f0f0;
  transition: all 0.2s ease;
}

.date-item:last-child {
  border-bottom: none;
}

.date-marker {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-top: 4px;
  flex-shrink: 0;
}

.date-item.start .date-marker { background: var(--dark-green); }
.date-item.holiday .date-marker { background: var(--gold); }
.date-item.break .date-marker { background: #81c784; }
.date-item.end .date-marker { background: var(--red); }

.date-content {
  flex: 1;
}

.date-title {
  font-weight: 600;
  color: var(--dark-green);
  margin-bottom: 2px;
}

.date-date {
  font-size: 0.9rem;
  color: #666;
}

.download-section {
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid #eee;
  text-align: center;
}

.download-section .btn {
  margin: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* Hover highlight effect */
.day[data-event] {
  cursor: pointer;
}

.day[data-event]:hover {
  transform: scale(1.15);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  z-index: 10;
  position: relative;
}

.date-item.highlighted {
  border-radius: 8px;
  margin: 0 -10px;
  padding: 15px 10px;
  transform: scale(1.02);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.date-item.start.highlighted,
.date-item.break.highlighted {
  background: var(--dark-green);
}

.date-item.start.highlighted .date-title,
.date-item.start.highlighted .date-date,
.date-item.break.highlighted .date-title,
.date-item.break.highlighted .date-date {
  color: white;
}

.date-item.holiday.highlighted {
  background: var(--gold);
}

.date-item.holiday.highlighted .date-title,
.date-item.holiday.highlighted .date-date {
  color: var(--dark-green);
}

.date-item.end.highlighted {
  background: var(--red);
}

.date-item.end.highlighted .date-title,
.date-item.end.highlighted .date-date {
  color: white;
}

/* Responsive */
@media (max-width: 1200px) {
  .calendar-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 1024px) {
  .calendar-layout {
    grid-template-columns: 1fr;
  }

  .dates-sidebar {
    position: static;
    order: -1;
  }

  .calendar-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .calendar-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .calendar-grid-container {
    padding: 20px;
  }

  .dates-sidebar {
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .calendar-grid {
    grid-template-columns: 1fr;
  }

  .legend {
    flex-direction: column;
    gap: 8px;
  }
}
