/* ====================
   CALENDAR SECTION
   ==================== */

.calendar {
  position: relative;
  z-index: 2;
  padding: 7.57% 5.556%;
}

/* Inner Container */
.calendar__inner {
  padding-bottom: 40px;
}

/* Title */
.calendar__title {
  font-size: 60px;
  font-weight: 300;
  color: #00a784;
  letter-spacing: 0.1em;
  line-height: 1.2;
  position: relative;
  padding-bottom: 15px;
  border-bottom: 1px solid #00a784;
}

.calendar__title::before {
  content: '';
  position: absolute;
  background-color: #333333;
  height: 5px;
  width: 30px;
  top: 98%;
}

.calendar__subtitle {
  display: inline-block;
  font-size: 16px;
  margin-left: 7px;
  font-weight: 500;
  color: #00a784;
  letter-spacing: 0;
}

/* Content Container */
.calendar__content {
  display: flex;
  gap: 30px;
  align-items: stretch;
}

/* Main Calendar Area */
.calendar__main {
  flex: 1;
  max-width: 50%;
  display: flex;
  flex-direction: column;
}

/* Controls */
.calendar__controls {
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  background-color: #00a784;
  padding: 15px;
  border-radius: 8px;
  position: relative;
  z-index: 10;
}

.calendar__button {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  background-color: transparent;
  border: none;
  cursor: pointer;
  padding: 5px 15px;
  transition: background-color 0.2s ease;
  border-radius: 4px;
  pointer-events: auto;
  position: relative;
  z-index: 9999;
}

.calendar__button:hover {
  background-color: rgba(255, 255, 255, 0.3) !important;
}

.calendar__button:active {
  background-color: rgba(255, 255, 255, 0.4) !important;
}

.calendar__month {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.05em;
  line-height: 1.2;
  text-align: center;
  flex: 1;
}

/* Grid */
.calendar__grid {
  background-color: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.calendar__weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0;
  background-color: #f5f5f5;
  border-radius: 4px;
  padding: 10px 0;
  margin-bottom: 10px;
}

.calendar__weekday {
  font-size: 14px;
  font-weight: 700;
  color: #666666;
  letter-spacing: 0;
  line-height: 1.2;
  text-align: center;
}

.calendar__days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

/* Calendar Cells */
.calendar__cell {
  min-height: 80px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 8px;
  background-color: #fff;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.calendar__cell--empty {
  background-color: #fafafa;
  border-color: #f0f0f0;
  cursor: default;
}

.calendar__cell--today {
  background-color: #e8f5f2;
  border-color: #00a784;
  border-width: 2px;
}

.calendar__cell--has-event:hover {
  opacity: 0.8;
}

.calendar__cell--selected {
  opacity: 0.9;
}

.calendar__cell--selected .calendar__number {
  color: #fff;
}

/* Category Colors */
.calendar__cell--has-event.calendar__cell--masterpiece-concert {
  background-color: #8B4513;
  border-color: #8B4513;
}

.calendar__cell--has-event.calendar__cell--special-performance {
  background-color: #FFD700;
  border-color: #FFD700;
}

.calendar__cell--has-event.calendar__cell--independent-performance {
  background-color: #BA55D3;
  border-color: #BA55D3;
}

.calendar__cell--has-event.calendar__cell--subscription {
  background-color: #4169E1;
  border-color: #4169E1;
}

.calendar__cell--has-event.calendar__cell--sponsored {
  background-color: #8B0000;
  border-color: #8B0000;
}

.calendar__cell--has-event.calendar__cell--request-performance {
  background-color: #4CAF50;
  border-color: #4CAF50;
}

.calendar__cell--has-event.calendar__cell--multiple {
  background: linear-gradient(135deg, #4169E1 0%, #BA55D3 50%, #FFD700 100%);
  border-color: #4169E1;
}

/* Cell Number */
.calendar__number {
  font-size: 16px;
  font-weight: 700;
  color: #333333;
  letter-spacing: 0;
  line-height: 1.2;
  text-align: center;
}

.calendar__cell--has-event .calendar__number {
  color: #fff;
  font-weight: 700;
}

.calendar__cell--today .calendar__number {
  color: #00a784;
}

/* Detail Panel */
.calendar__detail {
  flex: 1;
  max-width: 50%;
  background-color: #f5f5f5;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.calendar__placeholder {
  font-size: 16px;
  color: #999;
  text-align: center;
  padding: 60px 20px;
}

.calendar__events {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Event Item */
.calendar__event {
  background-color: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
}

.calendar__event-date {
  font-size: 14px;
  color: #666;
  margin-bottom: 8px;
}

.calendar__event-title {
  font-size: 20px;
  font-weight: 700;
  color: #333;
  margin-bottom: 12px;
  line-height: 1.4;
}

.calendar__event-venue {
  font-size: 14px;
  color: #666;
  margin-bottom: 8px;
}

.calendar__event-note {
  font-size: 14px;
  color: #999;
  margin-bottom: 16px;
}

.calendar__event-image {
  width: 100%;
  margin: 16px 0;
  border-radius: 8px;
  overflow: hidden;
}

.calendar__event-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.calendar__event-link {
  display: inline-block;
  background-color: #ff6600;
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  padding: 12px 24px;
  border-radius: 4px;
  text-decoration: none;
  text-align: center;
  transition: background-color 0.2s ease;
  margin-top: 20px;
}

.calendar__event-link:hover {
  background-color: #e55a00;
}

/* ====================
   RESPONSIVE: 768px
   ==================== */

@media screen and (max-width: 768px) {
  .calendar__content {
    flex-direction: column;
    align-items: stretch;
  }

  .calendar__main,
  .calendar__detail {
    max-width: 100%;
    width: 100%;
    flex: none;
  }

  .calendar__detail {
    min-height: auto;
  }

  .calendar {
    padding-left: 15px;
    padding-right: 15px;
  }

  .calendar__title {
    font-size: 36px;
  }

  .calendar__month {
    font-size: 20px;
  }

  .calendar__cell {
    min-height: 60px;
    padding: 6px;
  }

  .calendar__number {
    font-size: 14px;
  }
}

/* ====================
   RESPONSIVE: 480px
   ==================== */

@media screen and (max-width: 480px) {
  .calendar__title {
    font-size: 28px;
  }

  .calendar__grid {
    padding: 10px;
  }

  .calendar__days {
    gap: 4px;
  }

  .calendar__cell {
    min-height: 50px;
    padding: 4px;
  }

  .calendar__number {
    font-size: 12px;
  }

  .calendar__detail {
    padding: 20px;
  }

  .calendar__event-title {
    font-size: 18px;
  }
}
