/* ===== Consistent, Green-Themed Modern Modal ===== */
.custom-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  justify-content: center;
  align-items: center;
  z-index: 9999;
  backdrop-filter: blur(6px);
}

.custom-modal.active {
  display: flex;
}
#modal-description{
    text-align: center !important;
    font-size: 1rem;
    margin-top: 15px;
}
.custom-modal-content {
  background: #ffffff;
  border-radius: 18px;
  max-width: 700px;
  width: 90%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  animation: fadeInScale 0.3s ease;
  position: relative;
  border-top: 6px solid #2e8b57;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 1rem; /* ✅ Unified base font size */
  line-height: 1.6;
  color: #2e2e2e;
}

/* Scroll inside modal when content exceeds height */
.custom-modal-body {
  padding: 20px;
  text-align: center;
  background: #f9fff9;
  overflow-y: auto;
  max-height: calc(85vh - 140px);
}

/* Close button */
.custom-modal-close {
  position: absolute;
  top: 10px;
  right: 14px;
  background: none;
  border: none;
  color: #2e8b57;
  cursor: pointer;
  transition: transform 0.2s ease, color 0.2s ease;
}
.custom-modal-close:hover {
  color: #1b5e20;
  transform: rotate(90deg);
}

/* Header */
.custom-modal-header {
  padding: 20px;
  border-bottom: 1px solid #e3f2e1;
  background: linear-gradient(90deg, #3ba55c, #1b5e20);
  color: #fff;
  text-align: center;
}
.custom-modal-header h2 {
  margin: 0;
  font-size: 1.8rem; /* ✅ Larger for hierarchy */
  letter-spacing: 0.5px;
}
.custom-modal-date {
  font-size: 1rem; /* ✅ Matches body font */
  opacity: 0.9;
  margin-top: 6px;
  font-style: italic;
}

/* Body content */
.custom-modal-body img {
  max-width: 100%;
  max-height: 280px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 15px;
  box-shadow: 0 4px 12px rgba(46, 139, 87, 0.3);
}
.custom-modal-body p {
  margin-bottom: 12px;
}

/* Details box */
.custom-modal-details {
  margin-top: 15px;
  text-align: left;
  background: #eafbea;
  padding: 12px 15px;
  border-radius: 10px;
  border-left: 4px solid #2e8b57;
  color: #2e7d32;
  font-size: 1rem; /* ✅ Consistent with body */
}
.custom-modal-details strong {
  font-weight: 800;
}


/* Animation */
@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

/* Responsive */
@media (max-width: 600px) {
  .custom-modal-content {
    width: 95%;
    max-height: 90vh;
  }
  .custom-modal-header h2 {
    font-size: 1.0rem;
  }
  .custom-modal-body p {
    font-size: 0.8rem;
  }
  .custom-modal-details {
      font-size: 0.8rem;
  }
}

/* Animation */
@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

/* Responsive */
@media (max-width: 480px) {
  .custom-modal-content {
    width: 95%;
  }
  .custom-modal-header h2 {
    font-size: 1.3rem;
  }
  .custom-modal-body p {
    font-size: 0.95rem;
  }
}

#event-modal.custom-modal,
.news-modal.custom-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  justify-content: center;
  align-items: center;
  z-index: 9999;
  backdrop-filter: blur(6px);
}

/* Active state */
#event-modal.custom-modal.active,
.news-modal.custom-modal.active {
  display: flex;
}

/* Modal content */
#event-modal .custom-modal-content,
.news-modal .custom-modal-content {
  background: #ffffff;
  border-radius: 18px;
  max-width: 600px;
  width: 90%;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  animation: fadeInScale 0.3s ease;
  position: relative;
  border-top: 6px solid #2e8b57;
}

/* Close button */
#event-modal .custom-modal-close,
.news-modal .custom-modal-close {
  position: absolute;
  top: 10px;
  right: 14px;
  background: none;
  border: none;
  font-size: 1.6rem;
  color: #2e8b57;
  cursor: pointer;
  transition: transform 0.2s ease, color 0.2s ease;
}

#event-modal .custom-modal-close:hover,
.news-modal .custom-modal-close:hover {
  color: #1b5e20;
  transform: rotate(90deg);
}

/* Header */
#event-modal .custom-modal-header,
.news-modal .custom-modal-header {
  padding: 20px;
  border-bottom: 1px solid #e3f2e1;
  background: linear-gradient(90deg, #3ba55c, #1b5e20);
  color: #fff;
  text-align: center;
}

#event-modal .custom-modal-header h2,
.news-modal .custom-modal-header h2 {
  margin: 0;
  font-size: 1.6rem;
  letter-spacing: 0.5px;
  
}

h2 {
  color: #fff;
}

#event-modal .custom-modal-date,
.news-modal .custom-modal-date {
  font-size: 0.9rem;
  opacity: 0.9;
  margin-top: 6px;
  font-style: italic;
}

/* Body */
#event-modal .custom-modal-body,
.news-modal .custom-modal-body {
  padding: 20px;
  text-align: center;
  background: #f9fff9;
}

#event-modal .custom-modal-body img,
.news-modal .custom-modal-body img {
  max-width: 100%;
  max-height: 300px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 15px;
  box-shadow: 0 4px 12px rgba(46, 139, 87, 0.3);
}

#event-modal .custom-modal-body p,
.news-modal .custom-modal-body p {
  color: #2e2e2e;
  line-height: 1.6;
  font-size: 1rem;
  text-align: justify;
}

/* Details box */
#event-modal .custom-modal-details,
.news-modal .custom-modal-details {
  margin-top: 15px;
  text-align: left;
  background: #eafbea;
  padding: 12px 15px;
  border-radius: 10px;
  font-size: 0.95rem;
  color: #2e7d32;
  border-left: 4px solid #2e8b57;
}

/* Animation */
@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

/* Responsive */
@media (max-width: 480px) {
  #event-modal .custom-modal-content,
  .news-modal .custom-modal-content {
    width: 95%;
  }
  #event-modal .custom-modal-header h2,
  .news-modal .custom-modal-header h2 {
    font-size: 1.3rem;
  }
  #event-modal .custom-modal-body p,
  .news-modal .custom-modal-body p {
    font-size: 0.95rem;
  }
}
