/* ==========================================
   VARPHI CLUB - EVENTS PAGE COMPLETE STYLES
   ========================================== */

/* Events Hero Section */
.events-hero {
  padding: 140px 24px 60px;
  text-align: center;
  background: linear-gradient(180deg, rgba(0, 163, 255, 0.1), transparent);
}

.page-title {
  font-size: clamp(48px, 8vw, 72px);
  font-weight: 700;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-subtitle {
  font-size: clamp(18px, 3vw, 24px);
  color: var(--text-secondary);
  max-width: 800px;
  margin: 0 auto;
}

/* Highlighted Event */
.highlight-event {
  padding: 40px 24px 80px;
}

.highlight-card {
  background: var(--bg-card);
  border: 2px solid var(--primary-color);
  border-radius: var(--radius-lg);
  padding: 40px;
  position: relative;
  overflow: hidden;
}

.highlight-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.highlight-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 24px;
}

.highlight-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.highlight-title {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
}
.highlight-title span {
  color: var(--hackphinight);
}
.highlight-description {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 24px;
}

.highlight-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 32px;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 14px;
}

.meta-item svg {
  color: var(--primary-color);
}

/* Countdown */
.countdown {
  display: flex;
  gap: 16px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.countdown-item {
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  min-width: 80px;
}

.countdown-value {
  display: block;
  font-size: 32px;
  font-weight: 700;
  color: var(--primary-color);
  line-height: 1;
  margin-bottom: 4px;
}

.countdown-label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.countdown-ended {
  font-size: 1.5rem;
  color: var(--primary-color);
  text-align: center;
  padding: 2rem;
}

.register-button {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  border: none;
  padding: 16px 40px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: var(--transition);
}

.register-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 163, 255, 0.4);
}

.highlight-image {
  border-radius: var(--radius-md);
  overflow: hidden;
}

.highlight-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* Filters */
.events-filters {
  padding: 40px 24px;
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.filters-bar {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
}

.filter-group {
  flex: 1;
  min-width: 200px;
}

.filter-select,
.search-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: "Inter", sans-serif;
  font-size: 14px;
  transition: var(--transition);
}

.filter-select:focus,
.search-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 163, 255, 0.1);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Events Grid Section */
.events-grid-section {
  padding: 80px 24px;
  min-height: 400px;
}

.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
}

/* Loading Indicator */
.loading-indicator {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--border-color);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* No Events Message */
.no-events-message {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}

.no-events-message svg {
  margin-bottom: 20px;
  opacity: 0.5;
}

.no-events-message p {
  font-size: 18px;
  color: var(--text-secondary);
}

/* No Match Message */
.no-match-message {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}

.no-match-message svg {
  margin-bottom: 20px;
  opacity: 0.5;
}

.no-match-message p {
  font-size: 18px;
  margin-bottom: 20px;
}

.reset-filters-btn {
  padding: 12px 24px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
}

.reset-filters-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

/* Error Message */
.error-message {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}

.error-message h3 {
  color: #ef4444;
  margin-bottom: 16px;
  font-size: 24px;
}

.error-message p {
  margin-bottom: 12px;
  font-size: 16px;
}

.retry-button {
  padding: 12px 24px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  margin-top: 20px;
  transition: var(--transition);
}

.retry-button:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

/* Event Card */
.event-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.event-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.event-card-image {
  position: relative;
  height: 200px;
  overflow: hidden;
  background: var(--bg-dark);
}

.event-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.event-card:hover .event-card-image img {
  transform: scale(1.05);
}

.event-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  color: white;
  text-transform: capitalize;
}

.event-badge.workshop {
  background: #10b981;
}

.event-badge.competition {
  background: #f59e0b;
}

.event-badge.lecture {
  background: #8b5cf6;
}

.event-badge.seminar {
  background: #ef4444;
}

.event-card-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.event-card-date {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: white;
  margin-bottom: 16px;
  width: fit-content;
}

.date-day {
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
}

.date-month {
  font-size: 12px;
  text-transform: uppercase;
}

.event-card-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-primary);
  line-height: 1.3;
}

.event-card-description {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 16px;
  flex: 1;
}

.event-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  font-size: 13px;
  gap: 8px;
  flex-wrap: wrap;
}

.meta-level {
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  text-transform: capitalize;
}

.meta-level.beginner {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.meta-level.intermediate {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
}

.meta-level.advanced {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.meta-seats {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
}

.event-details-btn {
  width: 100%;
  padding: 12px;
  background: transparent;
  border: 1px solid var(--primary-color);
  border-radius: var(--radius-sm);
  color: var(--primary-color);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-size: 14px;
}

.event-details-btn:hover {
  background: var(--primary-color);
  color: white;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2000;
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  max-width: 700px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  z-index: 2001;
}

.modal-close {
  position: absolute;
  top: 16px;
  left: 16px;
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-primary);
  transition: var(--transition);
  z-index: 2002;
}

.modal-close:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

.modal-body {
  padding: 40px;
}

.modal-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-primary);
  padding-right: 40px;
}

.modal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
}

.modal-meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 14px;
}

.modal-meta-item svg {
  color: var(--primary-color);
}

.modal-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
}

.modal-info-item {
  font-size: 14px;
  color: var(--text-secondary);
}

.modal-info-item strong {
  color: var(--text-primary);
  display: block;
  margin-bottom: 4px;
}

.modal-section {
  margin-bottom: 24px;
}

.modal-section-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.modal-description {
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 15px;
}

.modal-list {
  list-style: none;
  padding: 0;
}

.modal-list li {
  padding: 8px 0;
  padding-left: 24px;
  position: relative;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

.modal-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--primary-color);
}

.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.modal-register-btn,
.modal-calendar-btn {
  flex: 1;
  min-width: 150px;
  padding: 14px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.modal-register-btn {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  border: none;
  color: white;
}

.modal-register-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 163, 255, 0.4);
}

.modal-calendar-btn {
  background: transparent;
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
}

.modal-calendar-btn:hover {
  background: var(--primary-color);
  color: white;
}

/* Responsive */
@media (max-width: 768px) {
  .events-hero {
    padding: 120px 16px 40px;
  }

  .highlight-event {
    padding: 40px 16px 60px;
  }

  .highlight-card {
    padding: 24px;
  }

  .highlight-content {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .highlight-image {
    order: -1;
  }

  .countdown {
    justify-content: center;
  }

  .countdown-item {
    min-width: 70px;
    padding: 12px;
  }

  .countdown-value {
    font-size: 24px;
  }

  .events-filters {
    padding: 24px 16px;
  }

  .filters-bar {
    flex-direction: column;
  }

  .filter-group {
    min-width: 100%;
  }

  .events-grid-section {
    padding: 60px 16px;
  }

  .events-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .modal-content {
    width: 95%;
    max-height: 95vh;
  }

  .modal-body {
    padding: 24px;
  }

  .modal-title {
    font-size: 24px;
  }

  .modal-actions {
    flex-direction: column;
  }

  .modal-register-btn,
  .modal-calendar-btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .page-title {
    font-size: 36px;
  }

  .page-subtitle {
    font-size: 16px;
  }

  .highlight-title {
    font-size: 24px;
  }

  .countdown {
    gap: 8px;
  }

  .countdown-item {
    min-width: 60px;
    padding: 10px;
  }

  .countdown-value {
    font-size: 20px;
  }

  .countdown-label {
    font-size: 10px;
  }

  .event-card-title {
    font-size: 18px;
  }
}
