/* Events List Page Styles */

/* Hero Section */
.events-hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 4rem 0 3rem;
  text-align: center;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-description {
  font-size: 1.2rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
}

/* Controls Section */
.events-controls {
  background: #f8f9fa;
  padding: 2rem 0;
  border-bottom: 1px solid #e9ecef;
}

.controls-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
  justify-content: space-between;
}

/* Search */
.search-container {
  position: relative;
  flex: 1;
  min-width: 250px;
  max-width: 400px;
}

.search-input {
  width: 100%;
  padding: 0.75rem 3rem 0.75rem 1rem;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.search-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-icon {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #6c757d;
  font-size: 1.2rem;
}

/* Filters */
.filters-container {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.filter-select {
  padding: 0.75rem 1rem;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  background: white;
  font-size: 0.9rem;
  cursor: pointer;
  transition: border-color 0.3s ease;
  min-width: 150px;
}

.filter-select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* View Toggle */
.view-toggle {
  display: flex;
  background: white;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  overflow: hidden;
}

.view-btn {
  padding: 0.75rem 1rem;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1.2rem;
}

.view-btn:hover {
  background: #f8f9fa;
}

.view-btn.active {
  background: #667eea;
  color: white;
}

/* Events Section */
.events-section {
  padding: 3rem 0;
  min-height: 60vh;
}

.events-count {
  margin-bottom: 2rem;
  font-weight: 600;
  color: #495057;
}

/* Loading State */
.loading-state {
  text-align: center;
  padding: 4rem 0;
  color: #6c757d;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Events Container */
.events-container {
  transition: all 0.3s ease;
}

/* Grid View */
.events-container.grid-view {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
}

/* List View */
.events-container.list-view {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Event Card - Grid View */
.event-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
  border: 2px solid transparent;
}

.event-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  border-color: #667eea;
}

.event-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: linear-gradient(45deg, #f8f9fa, #e9ecef);
}

.event-card-content {
  padding: 1.5rem;
}

.event-status {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.event-status.upcoming {
  background: #d1ecf1;
  color: #0c5460;
}

.event-status.ongoing {
  background: #d4edda;
  color: #155724;
}

.event-status.completed {
  background: #e2e3e5;
  color: #383d41;
}

.event-status.cancelled {
  background: #f8d7da;
  color: #721c24;
}

.event-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 0.75rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.event-date {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #667eea;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.event-description {
  color: #6c757d;
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.event-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid #f1f3f4;
  font-size: 0.85rem;
  color: #6c757d;
}

.event-participants {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.event-location {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Event Card - List View */
.list-view .event-card {
  display: flex;
  padding: 0;
  max-height: 160px;
}

.list-view .event-card-image {
  width: 200px;
  height: 160px;
  flex-shrink: 0;
}

.list-view .event-card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.5rem;
}

.list-view .event-title {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  -webkit-line-clamp: 1;
}

.list-view .event-description {
  -webkit-line-clamp: 2;
  margin-bottom: 0.75rem;
}

/* No Results */
.no-results {
  text-align: center;
  padding: 4rem 2rem;
  color: #6c757d;
}

.no-results-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.no-results h3 {
  color: #495057;
  margin-bottom: 0.5rem;
}

/* Pagination */
.pagination-container {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #e9ecef;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.pagination-btn {
  padding: 0.75rem 1rem;
  border: 2px solid #e9ecef;
  background: white;
  color: #495057;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
}

.pagination-btn:hover:not(:disabled) {
  border-color: #667eea;
  color: #667eea;
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.page-numbers {
  display: flex;
  gap: 0.25rem;
}

.page-number {
  width: 40px;
  height: 40px;
  border: 2px solid #e9ecef;
  background: white;
  color: #495057;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
}

.page-number:hover {
  border-color: #667eea;
  color: #667eea;
}

.page-number.active {
  background: #667eea;
  border-color: #667eea;
  color: white;
}

.pagination-info {
  text-align: center;
  color: #6c757d;
  font-size: 0.9rem;
}

/* Event Modal */
.event-modal-content {
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-event-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.modal-event-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
}

.modal-meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.modal-meta-label {
  font-size: 0.8rem;
  color: #6c757d;
  text-transform: uppercase;
  font-weight: 600;
}

.modal-meta-value {
  font-weight: 600;
  color: #333;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
  }

  .controls-wrapper {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .search-container {
    max-width: none;
  }

  .filters-container {
    flex-direction: column;
  }

  .filter-select {
    min-width: auto;
  }

  .events-container.grid-view {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .list-view .event-card {
    flex-direction: column;
    max-height: none;
  }

  .list-view .event-card-image {
    width: 100%;
    height: 200px;
  }

  .pagination {
    flex-wrap: wrap;
  }

  .page-numbers {
    order: 3;
    width: 100%;
    justify-content: center;
    margin-top: 0.5rem;
  }
}

@media (max-width: 480px) {
  .events-hero {
    padding: 2rem 0;
  }

  .hero-title {
    font-size: 1.75rem;
  }

  .hero-description {
    font-size: 1rem;
  }

  .events-controls {
    padding: 1rem 0;
  }

  .event-card-content {
    padding: 1rem;
  }

  .modal-event-meta {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
}