/* Events Calendar Styles */

:root {
  --event-blue: #1D4ED8;
  --event-amber: #F59E0B;
  --event-gray: #9CA3AF;
  --event-green: #10B981;
  --event-purple: #8B5CF6;
}

/* Events Container */
.events-container {
  min-height: 100vh;
  background: linear-gradient(135deg, #f5f7fa 0%, #f0f4ff 100%);
}

.events-hero {
  background: linear-gradient(135deg, #183B6B 0%, #0E2145 100%);
  color: white;
  padding: 60px 20px;
  text-align: center;
}

.events-hero .hero-content h1 {
  font-size: clamp(24px, 4vw, 40px);
  font-weight: 600;
  margin-bottom: 12px;
}

.events-hero .hero-content p {
  font-size: clamp(13px, 1.8vw, 16px);
  opacity: 0.95;
  max-width: 600px;
  margin: 0 auto;
}

/* Main Layout */
.events-main {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  max-width: 1400px;
  margin: 40px auto;
  padding: 0 20px;
}

/* Sidebar */
.events-sidebar {
  position: sticky;
  top: 20px;
  height: fit-content;
}

.filters-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(14, 33, 69, 0.08);
  border: 1px solid rgba(29, 78, 216, 0.1);
}

.filters-card h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 16px;
}

.filter-group {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e5e7eb;
}

.filter-group:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.filter-group label {
  display: block;
  font-weight: 500;
  font-size: 12px;
  color: var(--ink);
  margin-bottom: 8px;
}

.filter-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 13px;
  color: #6b7280;
  font-weight: 400;
  user-select: none;
}

.checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-right: 8px;
  cursor: pointer;
  accent-color: var(--event-blue);
}

.checkbox-label:hover {
  color: var(--ink);
}

.category-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 6px;
}

.search-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 14px;
  transition: all 0.2s;
}

.search-input:focus {
  outline: none;
  border-color: var(--event-blue);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.1);
}

.search-wrapper {
  position: relative;
}

.suggestions-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  list-style: none;
  margin: 0;
  padding: 4px 0;
  z-index: 200;
  max-height: 320px;
  overflow-y: auto;
}

.suggestion-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.15s;
}

.suggestion-item:hover {
  background: #f0f4ff;
}

.suggestion-title {
  font-size: 14px;
  font-weight: 500;
  color: #111827;
}

.suggestion-meta {
  font-size: 12px;
  color: #6b7280;
}

.suggestion-meta em {
  font-style: normal;
  color: var(--event-blue);
}

.view-toggle {
  display: flex;
  gap: 8px;
}

.view-btn {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #e5e7eb;
  background: white;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  color: #6b7280;
}

.view-btn:hover {
  border-color: var(--event-blue);
  color: var(--event-blue);
}

.view-btn.active {
  background: var(--event-blue);
  color: white;
  border-color: var(--event-blue);
}

/* Events Content */
.events-content {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 12px rgba(14, 33, 69, 0.1);
  min-height: 600px;
}

/* Calendar View */
.calendar-view {
  display: none;
}

.calendar-view.active {
  display: block;
}

.fc {
  font-family: inherit;
}

.fc .fc-button-primary {
  background-color: var(--event-blue);
  border-color: var(--event-blue);
}

.fc .fc-button-primary:hover {
  background-color: #1a3a8a;
  border-color: #1a3a8a;
}

.fc .fc-button-primary.fc-button-active {
  background-color: #0e2145;
  border-color: #0e2145;
}

.fc .fc-col-header-cell {
  background-color: #f3f4f6;
  color: var(--ink);
  font-weight: 600;
}

.fc .fc-daygrid-day:hover {
  background-color: #f9fafb;
}

.fc .fc-event {
  border: none;
  border-radius: 6px;
  padding: 3px 6px;
  font-size: 12px;
  font-weight: 600;
}

.fc .fc-event-title {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* List View */
.list-view {
  display: none;
}

.list-view.active {
  display: block;
}

#events-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

/* Event Cards */
.event-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.event-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(14, 33, 69, 0.15);
  border-color: var(--event-blue);
}

.event-card-image {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
}

.event-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.event-card-image.placeholder {
  background: linear-gradient(135deg, #1D4ED8 0%, #0E2145 100%);
}

.event-card-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.event-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge[data-status="upcoming"] {
  background-color: #DBEAFE;
  color: #1D4ED8;
}

.badge[data-status="in_progress"] {
  background-color: #FEF3C7;
  color: #92400E;
}

.badge[data-status="past"] {
  background-color: #E5E7EB;
  color: #6B7280;
}

.badge-featured {
  background-color: #FCD34D;
  color: #92400E;
}

.badge-category {
  background-color: white;
  border: 1px solid #e5e7eb;
  color: var(--ink);
  padding: 4px 10px;
}

.event-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
  line-height: 1.4;
  flex-grow: 1;
}

.event-card-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 8px;
}

.event-card-info .info-item {
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.event-card-description {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.5;
  margin-bottom: 12px;
  flex-grow: 1;
}

.event-card-footer {
  display: flex;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid #f3f4f6;
}

.closed-badge {
  display: inline-block;
  padding: 6px 10px;
  background-color: #FEE2E2;
  color: #991B1B;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--event-blue);
  color: white;
}

.btn-primary:hover {
  background-color: #1a3a8a;
  transform: translateY(-2px);
}

.btn-secondary {
  background-color: #f3f4f6;
  color: var(--ink);
  border: 1px solid #e5e7eb;
}

.btn-secondary:hover {
  background-color: #e5e7eb;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

/* Event Detail Page */
.event-detail-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.breadcrumb {
  margin-bottom: 24px;
}

.breadcrumb a {
  color: var(--event-blue);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.event-detail-container {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
}

.event-featured-image {
  width: 100%;
  max-height: 400px;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 24px;
  box-shadow: 0 12px 24px rgba(14, 33, 69, 0.15);
}

.event-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.event-meta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.event-status {
  display: inline-block;
  padding: 6px 12px;
  background-color: #DBEAFE;
  color: var(--event-blue);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
}

.event-category {
  display: inline-block;
  padding: 6px 12px;
  color: white;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
}

.event-featured {
  display: inline-block;
  padding: 6px 12px;
  background-color: #FCD34D;
  color: #92400E;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
}

.event-title {
  font-size: clamp(22px, 4vw, 34px);
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 24px;
  line-height: 1.2;
}

.event-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
  padding: 20px;
  background-color: #f9fafb;
  border-radius: 12px;
}

.info-item {
  display: flex;
  gap: 12px;
}

.info-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.info-content {
  flex: 1;
}

.info-content strong {
  display: block;
  font-size: 12px;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.info-content p {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.6;
}

.info-link {
  display: inline-block;
  margin-top: 4px;
  color: var(--event-blue);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}

.info-link:hover {
  text-decoration: underline;
}

.time {
  color: #6b7280;
  font-size: 13px;
}

.duration {
  color: #6b7280;
  font-size: 12px;
  margin-left: 4px;
}

.event-registration {
  margin-bottom: 24px;
}

.event-closed {
  padding: 12px 16px;
  background-color: #FEE2E2;
  color: #991B1B;
  border-radius: 6px;
  font-size: 14px;
  margin-bottom: 24px;
}

.event-description {
  margin-bottom: 24px;
}

.event-description h2 {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 12px;
}

.description-content {
  color: #4b5563;
  line-height: 1.8;
  font-size: 15px;
}

.description-content p {
  margin-bottom: 12px;
}

/* Sidebar */
.event-detail-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar-card {
  background: white;
  border-radius: 12px;
  padding: 16px;
  border: 1px solid #e5e7eb;
}

.sidebar-card h3 {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 12px;
}

.share-buttons {
  display: flex;
  gap: 8px;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: #f3f4f6;
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s;
}

.share-btn:hover {
  transform: translateY(-2px);
}

.share-btn.fb:hover {
  background-color: #1877F2;
  color: white;
}

.share-btn.twitter:hover {
  background-color: #000;
  color: white;
}

.share-btn.linkedin:hover {
  background-color: #0A66C2;
  color: white;
}

.share-btn.email:hover {
  background-color: var(--event-blue);
  color: white;
}

.related-events {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.related-event-item {
  padding: 8px 12px;
  border-radius: 6px;
  text-decoration: none;
  color: var(--event-blue);
  font-size: 13px;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}

.related-event-item:hover {
  background-color: #f3f4f6;
  border-left-color: var(--event-blue);
}

.related-event-item strong {
  display: block;
  font-weight: 500;
  margin-bottom: 2px;
}

.related-event-item .date {
  font-size: 12px;
  color: #6b7280;
}

.quick-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.quick-links li {
  margin-bottom: 8px;
}

.quick-links li:last-child {
  margin-bottom: 0;
}

.quick-links a {
  color: var(--event-blue);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}

.quick-links a:hover {
  text-decoration: underline;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  animation: fadeIn 0.2s;
}

.modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-content {
  background-color: white;
  padding: 0;
  border-radius: 12px;
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  animation: slideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: #6b7280;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s;
}

.modal-close:hover {
  background-color: #f3f4f6;
  color: var(--ink);
}

/* Responsive */
@media (max-width: 900px) {
  .events-main {
    grid-template-columns: 1fr;
  }

  .events-sidebar {
    position: static;
  }

  .event-detail-container {
    grid-template-columns: 1fr;
  }

  .event-detail-sidebar {
    order: -1;
  }

  #events-list {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

@media (max-width: 640px) {
  .events-hero {
    padding: 40px 16px;
  }

  .events-content {
    padding: 16px;
  }

  .event-card-image {
    height: 160px;
  }

  .event-info-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  #events-list {
    grid-template-columns: 1fr;
  }

  .event-detail-page {
    padding: 16px;
  }

  .share-buttons {
    gap: 6px;
  }

  .share-btn {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }
}
