/* ===== HERO SECTION ===== */
.hero {
  background: linear-gradient(135deg, 
              rgba(45, 45, 45, 0.9) 0%, 
              rgba(45, 45, 45, 0.7) 50%,
              rgba(255, 94, 20, 0.1) 100%), 
              url('https://images.unsplash.com/photo-1546519638-68e109498ffc?ixlib=rb-4.0.3&auto=format&fit=crop&w=1400&q=80');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: var(--white);
  padding: calc(var(--space-20) + 4rem) 0 var(--space-20);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 80%, rgba(255, 94, 20, 0.1) 0%, transparent 50%),
              radial-gradient(circle at 80% 20%, rgba(0, 119, 204, 0.1) 0%, transparent 50%);
  animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 0.5;
  }
  50% {
    opacity: 0.8;
  }
}

.hero-title {
  font-size: var(--text-5xl);
  font-weight: 800;
  margin-bottom: var(--space-4);
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
  animation: fadeIn 1s ease-out;
  background: linear-gradient(135deg, var(--white) 0%, var(--primary-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: var(--text-xl);
  max-width: 600px;
  margin: 0 auto var(--space-8);
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.3);
  animation: fadeIn 1s ease-out 0.3s both;
  line-height: 1.6;
}

.hero-buttons {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  animation: fadeIn 1s ease-out 0.6s both;
}

.hero-buttons .btn {
  min-width: 180px;
  position: relative;
  overflow: hidden;
}

.hero-buttons .btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: var(--transition-slow);
}

.hero-buttons .btn:hover::after {
  left: 100%;
}

/* Mission & Introduction Section */
.intro-mission {
  background: var(--white);
  position: relative;
}

.intro-mission .section-title {
  font-size: var(--text-4xl);
  margin-bottom: var(--space-8);
}

.intro-content {
  max-width: 790px;
  margin: 0 auto;
  text-align: center;
}

.intro-text {
  font-size: var(--text-xl);
  color: var(--text-light);
  line-height: 1.8;
}

.intro-text p {
  margin-bottom: var(--space-6);
}

.intro-text strong {
  color: var(--secondary);
  font-weight: 700;
}

/* Movement Overview Section */
.movement-overview {
  background: var(--white);
  position: relative;
}

.movement-overview::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent), var(--primary));
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-8);
  margin-top: var(--space-8);
}

.overview-card {
  background: var(--white);
  padding: var(--space-8);
  border-radius: var(--radius-2xl);
  text-align: center;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  border: 1px solid var(--light-gray);
  position: relative;
  overflow: hidden;
}

.overview-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.overview-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

.overview-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--space-4);
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-2xl);
  color: var(--white);
  transition: var(--transition);
}

.overview-card:hover .overview-icon {
  transform: scale(1.1) rotate(5deg);
}

.overview-icon i {
  position: relative;
}

.overview-card h3 {
  color: var(--secondary);
  margin-bottom: var(--space-3);
  font-size: var(--text-xl);
}

.overview-card p {
  color: var(--text-light);
  line-height: 1.6;
}

/* Upcoming Events Section */
.upcoming-events {
  background: linear-gradient(135deg, var(--light) 0%, var(--white) 100%);
  position: relative;
}

.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: var(--space-6);
  margin-top: var(--space-8);
}

.event-card {
  background: var(--white);
  padding: var(--space-6);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  display: flex;
  gap: var(--space-5);
  align-items: center;
  transition: var(--transition);
  border: 1px solid var(--light-gray);
  position: relative;
  overflow: hidden;
}

.event-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
}

.event-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.event-date {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: var(--white);
  padding: var(--space-3);
  border-radius: var(--radius-lg);
  text-align: center;
  min-width: 70px;
  flex-shrink: 0;
}

.date-day {
  display: block;
  font-size: var(--text-2xl);
  font-weight: 700;
  line-height: 1;
}

.date-month {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.event-info {
  flex: 1;
}

.event-info h3 {
  color: var(--secondary);
  margin-bottom: var(--space-2);
  font-size: var(--text-lg);
}

.event-info p {
  color: var(--text-light);
  margin-bottom: var(--space-1);
  font-size: var(--text-sm);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.event-info i {
  color: var(--primary);
  width: 16px;
}

/* Quick Stats Section */
.quick-stats {
  background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-light) 100%);
  color: var(--white);
  padding: var(--space-12) 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-8);
  text-align: center;
}

.stat-item {
  padding: var(--space-4);
  position: relative;
}

.stat-item::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.stat-number {
  font-size: var(--text-4xl);
  font-weight: 800;
  color: var(--primary);
  margin-bottom: var(--space-2);
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.stat-label {
  font-size: var(--text-lg);
  color: rgba(255,255,255,0.9);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ===== ALL EVENTS MODAL ===== */
.modal {
  display: none; /* Hidden by default */
  position: fixed; /* Stay in place */
  z-index: 1000; /* Sit on top */
  left: 0;
  top: 0;
  width: 100%; /* Full width */
  height: 100%; /* Full height */
  /* overflow: auto; */ /* Let modal-body handle scrolling */
  background-color: rgba(0,0,0,0.6); /* Black w/ opacity */
  animation: fadeIn 0.3s ease-out;
  /* Centering is now handled by .modal-content's position and transform */
}

.modal-content {
  background-color: var(--white);
  /* margin: auto; */ /* Replaced by position/transform centering */
  padding: var(--space-6);
  border-radius: var(--radius-xl);
  width: 90%;
  max-width: 800px;
  box-shadow: var(--shadow-xl);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: slideIn 0.4s ease-out;
}

@keyframes slideIn {
  from {
    transform: translate(-50%, -50%) translateY(-30px);
    opacity: 0;
  }
  to {
    transform: translate(-50%, -50%);
    opacity: 1;
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--light-gray);
  padding-bottom: var(--space-4);
  margin-bottom: var(--space-6);
}

.modal-header h2 {
  margin: 0;
  font-size: var(--text-2xl);
  color: var(--secondary);
}

.close-button {
  color: var(--text-light);
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.2s;
}

.close-button:hover,
.close-button:focus {
  color: var(--primary);
  text-decoration: none;
}

.modal-body {
  max-height: 60vh;
  overflow-y: auto;
  padding-right: var(--space-2); /* For scrollbar */
}

/* Custom scrollbar for modal body */
.modal-body::-webkit-scrollbar {
  width: 8px;
}
.modal-body::-webkit-scrollbar-track {
  background: var(--light);
}
.modal-body::-webkit-scrollbar-thumb {
  background: var(--primary-light);
  border-radius: var(--radius-md);
}
.modal-body::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

.modal-footer {
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: 1px solid var(--light-gray);
  text-align: right;
}

/* Loader for modal */
.modal-body .loader {
  border: 4px solid var(--light-gray);
  border-top: 4px solid var(--primary);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 40px auto;
}

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

.modal-month-header {
  font-size: var(--text-xl);
  color: var(--secondary);
  margin: var(--space-6) 0 var(--space-4);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--light-gray);
  font-weight: 700;
}

.modal-month-header:first-child {
  margin-top: 0;
}

.modal-events-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.modal-events-grid:last-child {
  margin-bottom: 0;
}

.modal-body .event-card {
  height: 100%; /* Ensure cards stretch to fill row height */
}

/* Responsive Design */
@media (max-width: 992px) {
  .hero {
    padding: calc(var(--space-16) + 4rem) 0 var(--space-16);
    background-attachment: scroll;
  }

  .hero-title {
    font-size: var(--text-4xl);
  }

  .hero-subtitle {
    font-size: var(--text-lg);
  }

  .overview-grid {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  .events-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .hero {
    padding: calc(var(--space-12) + 4rem) 0 var(--space-12);
  }

  .hero-title {
    font-size: var(--text-3xl);
  }

  .hero-subtitle {
    font-size: var(--text-base);
  }

  .hero-buttons {
    flex-direction: column;
    gap: var(--space-3);
  }

  .hero-buttons .btn {
    width: 100%;
    max-width: 280px;
  }

  .event-card {
    flex-direction: column;
    text-align: center;
    gap: var(--space-4);
  }

  .modal-content {
    padding: var(--space-4);
  }
  .modal-header h2 {
      font-size: var(--text-xl);
  }
  .modal-body {
      max-height: 70vh;
  }
  .modal-events-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  .stat-number {
    font-size: var(--text-3xl);
  }
}

@media (max-width: 576px) {
  .hero {
    padding: calc(var(--space-10) + 4rem) 0 var(--space-10);
  }

  .hero-title {
    font-size: var(--text-2xl);
  }

  .overview-card {
    padding: var(--space-5);
  }

  .event-card {
    padding: var(--space-4);
  }
}