.hero-section {
  background-image: url("/assets/design-images/school_team.jpg");
}

.subtitle {
  color: #7f8c8d;
  font-size: clamp(0.9rem, 2vw, 1.1rem);
}

.calendar-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.calendar-sidebar {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  order: 2;
}

.calendar-main {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  order: 1;
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background-color: var(--primary);
  color: white;
  gap: 10px;
}

.month-year {
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  font-weight: 600;
  flex-grow: 1;
  text-align: center;
}

.calendar-header button {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: clamp(35px, 8vw, 40px);
  height: clamp(35px, 8vw, 40px);
  border-radius: 50%;
  cursor: pointer;
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  transition: background 0.3s;
  flex-shrink: 0;
}

.calendar-header button:hover {
  background: rgba(255, 255, 255, 0.3);
}

.weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background-color: #f8f9fa;
  padding: 12px 0;
  font-weight: 600;
  color: #495057;
  text-align: center;
  border-bottom: 1px solid #e9ecef;
  font-size: clamp(0.75rem, 1.8vw, 1rem);
}

.weekdays div {
  padding: 0 2px;
}

.days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background-color: #e9ecef;
}

.day {
  min-height: clamp(60px, 15vw, 120px);
  background-color: white;
  padding: clamp(5px, 1.5vw, 10px);
  position: relative;
  transition: background-color 0.2s;
}

.day:hover {
  background-color: #f8f9fa;
}

.day-number {
  font-weight: 600;
  margin-bottom: 3px;
  color: #495057;
  font-size: clamp(0.8rem, 2vw, 1rem);
}

.today .day-number {
  background-color: #3498db;
  color: white;
  width: clamp(24px, 5vw, 30px);
  height: clamp(24px, 5vw, 30px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.other-month {
  background-color: #f8f9fa;
  color: #adb5bd;
}

.event {
  font-size: clamp(0.6rem, 1vw, 0.1rem);
  padding: clamp(3px, 1vw, 4px) clamp(5px, 1.2vw, 8px);
  border-radius: 4px;
  margin-bottom: 3px;
  color: white;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  cursor: pointer;
}

.event:hover {
  opacity: 0.9;
}

/* Event indicators for mobile */
.event-indicators {
  display: none;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: 5px;
}

.event-indicator {
  width: 20px;
  height: 3px;
  border-radius: 2px;
}

/* Day details popup */
.day-details {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.15);
  max-height: 70vh;
  overflow-y: auto;
  z-index: 1000;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  padding: 20px;
}

.day-details.active {
  transform: translateY(0);
}

.day-details-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid #e9ecef;
}

.day-details-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: #2c3e50;
}

.close-details {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #7f8c8d;
  cursor: pointer;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.close-details:hover {
  background: #f8f9fa;
}

.day-details-events {
  list-style: none;
}

.day-details-event {
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 12px;
  border-left: 5px solid;
  background-color: #f8f9fa;
}

.day-details-event-title {
  font-weight: 600;
  margin-bottom: 5px;
  font-size: 1.05rem;
}

.day-details-event-desc {
  font-size: 0.9rem;
  color: #6c757d;
}

.day-details-event-type {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.8rem;
  margin-top: 8px;
  color: white;
  font-weight: 500;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.event-reminder {
  background-color: #3498db;
}

.event-deadline {
  background-color: #2ecc71;
}

.event-holiday {
  background-color: #e74c3c;
}

.event-meeting {
  background-color: #9b59b6;
}

.event-celebration {
  background-color: #f39c12;
}

.legend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.legend-item {
  display: flex;
  align-items: center;
  font-size: clamp(0.8rem, 1.8vw, 0.9rem);
}

.legend-color {
  width: 15px;
  height: 15px;
  border-radius: 3px;
  margin-right: 8px;
  flex-shrink: 0;
}

.sidebar-title {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  margin-bottom: 15px;
  color: #2c3e50;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

.event-list {
  list-style: none;
  margin-bottom: 25px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ------------------------- */
/*        HERO SECTION       */
/* ------------------------- */
/* EVENT CARD */
.event-list-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  background: rgba(233, 233, 233, 0.6);
  backdrop-filter: blur(6px);
  border-radius: 8px;
  width: 100%;
}

/* DATE BOX */
.event-date {
  background: rgba(var(--primary), 0.1);
  color: var(--primary);
  padding: 0.5rem 1rem;
  border-radius: 0.9rem;
  min-width: 80px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(var(--primary), 0.15);
}

.event-month {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.event-day {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;
}

/* CONTENT */
.event-content {
  flex: 1;
}

.event-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 0.25rem;
}

.event-time {
  color: #4b5563;
  font-size: 0.95rem;
}

.event-location {
  font-weight: 500;
  color: #374151;
}

.event-description {
  margin-top: 0.25rem;
  color: #6b7280;
  font-size: 0.85rem;
  line-height: 1.3;
}

@media (max-width: 768px) {
  .event-card {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.5rem;
  }

  .event-day {
    font-size: 1.5rem;
  }

  .event-time {
    font-size: 0.7rem;
  }

  .event-title {
    font-size: 0.865rem;
  }

  .event-location {
    font-size: 0.8rem;
  }

  .event-description {
    font-size: 0.8rem;
  }
}

.holiday-list {
  list-style: none;
}

.holiday-list-item {
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 10px;
  background-color: #fff5f5;
  border-left: 5px solid #e74c3c;
}

.holiday-title {
  font-weight: 600;
  color: #c0392b;
  margin-bottom: 3px;
  font-size: clamp(0.9rem, 2vw, 1rem);
}

.holiday-date {
  font-size: clamp(0.8rem, 1.8vw, 0.9rem);
  color: #e74c3c;
}

/* Tablet and Desktop */
@media (min-width: 768px) {

  .calendar-container {
    grid-template-columns: 1fr 2fr;
  }

  .calendar-sidebar {
    order: 1;
  }

  .calendar-main {
    order: 2;
  }

  .weekdays div {
    padding: 0;
  }
}

@media (min-width: 1024px) {
  .calendar-container {
    grid-template-columns: 1fr 2fr;
  }
}

/* Mobile optimizations */
@media (max-width: 767px) {
  .weekdays div:not(:first-child):not(:last-child) {
    font-size: clamp(0.7rem, 1.5vw, 0.85rem);
  }

  .day {
    min-height: clamp(55px, 12vw, 70px);
    cursor: pointer;
  }

  .day:active {
    background-color: #e9ecef;
  }

  /* Hide event text on mobile, show indicators instead */
  .event {
    display: none;
  }

  .event-indicators {
    display: flex;
  }

  .calendar-header {
    padding: 12px 15px;
  }
}

/* Very small screens */
@media (max-width: 380px) {
  h1 i {
    display: none;
  }

  .weekdays {
    padding: 8px 0;
  }

  .day {
    padding: 3px;
  }

  .event {
    display: block;
    max-width: 100%;
  }
}

/* Print styles */
@media print {
  .calendar-header button {
    display: none;
  }

  .calendar-sidebar {
    page-break-inside: avoid;
  }
}
