/* EventStyle */
.nav-links li a {
  text-decoration: none;
  color: black;
  font-weight: 500;
  position: relative;
  transition: color 0.3s ease;
  text-shadow: none;
}

body {
  background: rgb(62 61 61);  /* very light gray */
}

/* ================= EVENTS ================= */
section{
  padding:120px 100px;
}


@font-face {
  font-family: 'Lemon Jelly';
  src: url('../fonts/LemonJelly.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

.section-title {
  font-size: 80px;
  margin-bottom: 20px;
}

.section-title .cursive {
  font-family: 'Great Vibes', cursive; /* or any elegant cursive font */
  font-weight: normal;
  color: white;
}

.section-title .sans {
  font-family: 'Helvetica', Arial, sans-serif;
  /* font-weight: bold; */
  color: white;
}


.section-sub{
  margin:15px 0 40px;
  color:white;
  /* max-width:700px; */
}

/* GRID */
.events-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* always 3 per row */
  gap: 40px;
}

/* CARD */
.event-category {
    color: #1fd94b;          /* Make it blue */
    font-weight: bold;    /* Emphasize */
    margin-bottom: 5px;   /* Space before the title */
    text-transform: capitalize; /* Optional: make it stand out */
}

.event-card {
    cursor: pointer; 
    transition: transform 0.2s ease;
}

.event-card:hover {
    transform: scale(1.02); 
}


.event-card img{
  width:100%;
  height:376px;
  object-fit:cover;
  border-radius:18px;
  cursor: pointer; 
  transition: transform 0.2s ease;
}

.event-content{
  padding:25px;
}

.event-content h3{
  font-size:25px;
  margin-bottom:8px;
  color: white;
}

.event-meta{
  font-size:14px;
  color:white;
  margin-bottom: 1px;
  margin-top: -10px;
}

.event-content p{
  font-size:18px;
  color:white;
  margin-bottom:20px;
}

.event-btn{
  padding:10px 20px;
  background:#28a745;
  color:white;
  border:none;
  border-radius:6px;
  cursor:pointer;
}

/* ================= MODAL ================= */
/* ================= EVENT MODAL ================= */
#eventModal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.65);
  display: none;              /* hidden by default */
  justify-content: center;
  align-items: center;
  z-index: 3000;
}

#eventModal.active {
  display: flex;              /* show when active */
  animation: fadeIn .3s ease; /* smooth fade-in */
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

#eventModal .modal-box {
  background: #e8e8e8;
  width: 90%;
  height: 90%;
  max-width: 900px;
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  display: flex;
  scrollbar-width: thin;   /* Firefox */
  scrollbar-color: #888 #e8e8e8
}

#eventModal .modal-close {
  position: absolute;
  top: 12px;
  right: 18px;
  font-size: 28px;
  cursor: pointer;
  z-index: 2;
  color: #333;
  font-weight: bold;
  transition: .2s;
}

#eventModal .modal-close:hover {
  color: red;
}

.modal-body {
  display: flex;
  flex-direction: row;
  gap: 20px;
  padding: 20px;
}

/* Vertical gallery */
.modal-gallery {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 120px;
  overflow-y: auto;
  background: #e8e8e8;
  padding: 10px;
  border-radius: 12px;
  scrollbar-width: thin;   /* Firefox */
  scrollbar-color: #888 #e8e8e8
}

.modal-gallery img {
  width: 100%;
  height: 90px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  opacity: .6;
  transition: .3s;
}

.modal-gallery img.active,
.modal-gallery img:hover {
  opacity: 1;
  transform: scale(1.05);
}

/* Main image square */
.modal-image {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

#modalMainImg {
  width: 100%;
  height: 80%;
  aspect-ratio: 1 / 1; /* ensures square */
  object-fit: cover;   /* avoids cutting heads */
  border-radius: 12px;
}

/* Details below */
#eventModal .modal-content {
  /* padding: 20px 30px; */
  border-top: 1px solid #ddd;
}

.modal-content {
  background: none;
  margin: 0px;
  border-radius: 8px;
  width: 677px;
  max-width: 109%;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  
  /* Hide scrollbar for Chrome, Safari, and Opera */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none;  /* IE and Edge */
}

.modal-content::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

#modalDesc{
  padding-bottom: 25px;
}

.modal-content h3{
  margin-top: -44px;
}


/* Large screens (default styles already set) */

/* Medium screens (≤1060px) */
@media screen and (max-width: 1060px) {
  section {
    padding: 100px 60px;
  }
  
  .events-grid {
    grid-template-columns: repeat(2, 1fr); /* always 3 per row */
  }

  #eventModal .modal-box {
    flex-direction: column;
    height: auto;
    max-height: 90%;
  }

  .event-card img{
    height: 384px;
  }
  .modal-body {
    flex-direction: column;
    align-items: center;
  }
  .modal-gallery {
    flex-direction: row;
    width: 100%;
    height: auto;
    overflow-x: auto;
    overflow-y: hidden;
  }
  .modal-gallery img {
    height: 70px;
    width: auto;
  }
  .modal-content {
    width: 100%;
    padding: 20px;
  }
  .modal-content h3 {
      margin-top: 0px;
  }
}

/* Tablets (≤900px) */
@media screen and (max-width: 900px) {
  section {
    padding: 80px 40px;
  }
  .section-title {
    font-size: 55px;
  }
  .event-content h3 {
    font-size: 20px;
  }
  #modalMainImg {
    height: auto;
    max-height: 60vh;
  }
}

@media screen and (max-width: 700px) {
  .events-grid {
    grid-template-columns: repeat(1, 1fr); /* always 3 per row */
  }
}

/* Small phones (≤360px) */
@media screen and (max-width: 360px) {
  section {
    padding: 60px 20px;
  }
  .section-title {
    font-size: 34px;
  }

  .event-card img {
    height: 160px;
  }
  .event-content {
    padding: 15px;
  }
  .event-btn {
    width: 100%;
    text-align: center;
  }
  .modal-gallery img {
    height: 60px;
  }
}

/* Extra small devices (≤280px) */
@media screen and (max-width: 280px) {
  section {
    padding: 40px 10px;
  }
  .section-title {
    font-size: 25px;
  }
  .event-card img {
    height: 140px;
  }
  .modal-gallery img {
    height: 50px;
  }
}