/* ═══════════════════════════════════════════════
   NSS TSEC — Home Page Events Section Tabbed CSS
   ═══════════════════════════════════════════════ */

/* --- Tabs --- */
.events-tabs-container {
  display: flex;
  justify-content: center;
  margin-bottom: var(--s-8);
  margin-top: -12px;
}

.events-tabs {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 6px;
  border-radius: 50px;
  backdrop-filter: var(--glass);
}

.events-tab-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  padding: 10px 32px;
  border-radius: 40px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
  letter-spacing: 1px;
}

.events-tab-btn.active {
  background: #d32f2f; /* Red branding accent */
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(211, 47, 47, 0.3);
}

.events-tab-btn:hover:not(.active) {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

/* --- Tab Panes --- */
.events-tab-pane {
  display: none;
}

.events-tab-pane.active {
  display: block;
  animation: tabFadeIn 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

@keyframes tabFadeIn {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Calendar Widget Styles --- */
.calendar-widget {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--s-4);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  padding: var(--s-4);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  backdrop-filter: var(--glass);
}

/* --- Calendar Grid Area --- */
.calendar-grid-side {
  display: flex;
  flex-direction: column;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-md);
  padding: 20px;
}

/* Calendar Header / Nav */
.calendar-nav-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 15px;
}

.calendar-month-label {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 1px;
}

.calendar-month-label span {
  color: #d32f2f;
}

.calendar-arrow-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #ffffff;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: var(--transition-smooth);
}

.calendar-arrow-btn:hover:not(:disabled) {
  background: #d32f2f;
  border-color: #d32f2f;
  box-shadow: 0 4px 10px rgba(211, 47, 47, 0.3);
}

.calendar-arrow-btn:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}

/* Weekday Labels */
.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  margin-bottom: 12px;
}

.weekday {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Days Grid */
.calendar-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.calendar-day-cell {
  aspect-ratio: 1/1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: default;
  position: relative;
  transition: all 0.25s ease;
}

/* Day states */
.calendar-day-cell.empty {
  opacity: 0;
  pointer-events: none;
}

.calendar-day-cell.active-day {
  color: #ffffff;
  cursor: pointer;
}

.calendar-day-cell.has-event {
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.calendar-day-cell.has-event::after {
  content: '';
  position: absolute;
  bottom: 6px;
  width: 5px;
  height: 5px;
  background-color: #d32f2f;
  border-radius: 50%;
  box-shadow: 0 0 6px #d32f2f;
}

.calendar-day-cell.has-event:hover {
  background: rgba(211, 47, 47, 0.15);
  border-color: rgba(211, 47, 47, 0.4);
}

.calendar-day-cell.selected-day {
  background: #d32f2f !important;
  color: #ffffff !important;
  border-color: #d32f2f !important;
  box-shadow: 0 4px 12px rgba(211, 47, 47, 0.4);
}

.calendar-day-cell.selected-day::after {
  background-color: #ffffff;
  box-shadow: none;
}

/* --- Event Detail Side Card --- */
.calendar-detail-side {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.calendar-event-detail-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  transition: var(--transition-smooth);
  opacity: 0;
  transform: scale(0.97);
}

.calendar-event-detail-card.active {
  opacity: 1;
  transform: scale(1);
}

.cal-detail-img-wrap {
  width: 100%;
  height: 200px;
  position: relative;
  overflow: hidden;
}

.cal-detail-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.calendar-event-detail-card:hover .cal-detail-img {
  transform: scale(1.05);
}

.cal-detail-content {
  padding: var(--s-3) var(--s-4);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.cal-detail-date-badge {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 800;
  color: #d32f2f;
  background: rgba(211, 47, 47, 0.1);
  padding: 3px 12px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
  width: fit-content;
  margin-bottom: 12px;
}

.cal-detail-title {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1.45rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.35;
  margin-bottom: 8px;
  text-transform: none;
  letter-spacing: 0px;
}

.cal-detail-category {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
}

.cal-detail-btn {
  margin-top: auto;
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
  padding: 8px 20px;
  border-radius: 24px;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: var(--transition-smooth);
}

.cal-detail-btn:hover {
  background: #d32f2f;
  border-color: #d32f2f;
  box-shadow: 0 5px 15px rgba(211, 47, 47, 0.3);
}

/* Empty State Detail Card */
.cal-detail-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: 100%;
  padding: var(--s-4);
  color: var(--text-muted);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.01);
}

.cal-detail-empty-icon {
  font-size: 2.2rem;
  margin-bottom: 12px;
  opacity: 0.5;
}

.cal-detail-empty-text {
  font-family: var(--font-body);
  font-size: 0.9rem;
}

/* --- Upcoming / Placeholder grid style --- */
.upcoming-placeholder-card {
  border: 1px dashed rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.01) !important;
  box-shadow: none !important;
  cursor: default !important;
}

.upcoming-placeholder-card .card-slide-overlay {
  background: transparent !important;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--s-4);
}

.upcoming-placeholder-card .placeholder-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
  display: block;
  opacity: 0.5;
}

.upcoming-placeholder-card .placeholder-text {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* --- Media Queries --- */
@media (max-width: 992px) {
  .calendar-widget {
    grid-template-columns: 1fr;
    gap: var(--s-4);
  }
  
  .cal-detail-img-wrap {
    height: 250px;
  }
}

@media (max-width: 500px) {
  .calendar-days-grid {
    gap: 4px;
  }
  
  .calendar-day-cell {
    font-size: 0.8rem;
  }
  
  .events-tab-btn {
    padding: 8px 18px;
    font-size: 0.85rem;
  }
}

/* --- Accessibility Preferred Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  .events-tab-pane.active {
    animation: none;
  }
  .calendar-event-detail-card {
    transition: none;
  }
  .cal-detail-img {
    transition: none;
  }
}
