:root {
    --primary: #00003a;
    --green: rgb(86, 185, 77);
    --secondary: rgb(244, 193, 41);
    --tertiary: rgb(246, 137, 38);
    --lightGreen: rgb(134, 197, 72);
    --lightBlue: rgb(54, 114, 185);
    --blueGrey: rgb(39, 174, 228);
    --lightGrey: rgb(211, 211, 211);
  }

  body {
    font-family: sans-serif;
  }
  
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }

  .resources-hero {
    padding: 10rem 10rem;
    margin: 0 auto;
    background-color: var(--primary); 
    color: var(--white);
    padding: 80px 0; 
    text-align: center; /* Changed from centlefter to center for consistency */
    background-image: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url('../assets/img/acceleratorsHeroBg.jpg'); 
    background-size: cover;
    background-position: top;
  }

  .pageTitle {
    color: var(--green);
    text-align: center;
  }

  .pageTitle span {
    color: var(--secondary);
  }

  /* --- Upcoming Events Section --- */
.upcoming-events-section {
  padding: 30px 20px;
  background-color: #f9f9f9; /* Light background for contrast */
  text-align: center;
}

.upcoming-events-section .section-title {
  color: var(--primary); /* Dark blue from your variables */
  font-size: 1.6rem;
  margin-bottom: 10px;
}

.upcoming-events-section .section-subtitle {
  color: #555;
  font-size: 1.2em;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.event-card {
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  padding: 30px;
  text-align: left;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.event-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}

.event-icon {
  font-size: 3em;
  margin-bottom: 15px;
  text-align: center;
}

/* Event type specific colors */
.event-card.webinar .event-icon {
  color: var(--lightBlue); /* Blue for webinars */
}
.event-card.seminar .event-icon {
  color: var(--tertiary); /* Orange for seminars */
}
.event-card.online-training .event-icon {
  color: var(--green); /* Green for online training */
}

.event-title {
  font-size: 1.2em;
  color: var(--primary);
  margin-bottom: 10px;
  min-height: 50px; /* Ensure consistent height for titles */
}

.event-date-time {
  font-size: 0.95em;
  color: #666;
  margin-bottom: 10px;
}

.event-date-time i {
  margin-right: 5px;
  color: var(--secondary); /* Yellow for icons */
}

.event-type {
  font-size: 0.9em;
  font-weight: bold;
  color: var(--primary);
  background-color: var(--lightGrey);
  padding: 5px 10px;
  border-radius: 5px;
  display: inline-block;
  margin-bottom: 15px;
}

.event-description {
  font-size: 1em;
  color: #444;
  line-height: 1.5;
  margin-bottom: 20px;
  flex-grow: 1; /* Allows description to take up available space */
}

.event-link {
  display: inline-block;
  background-color: var(--secondary);
  color: var(--primary);
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.3s ease, transform 0.2s ease;
  align-self: flex-start; /* Aligns button to the left */
}

.event-link:hover {
  background-color: var(--tertiary); /* Slightly darker yellow/orange on hover */
  transform: translateY(-2px);
  color: #fff; /* White text on hover */
}

.event-link i {
  margin-left: 8px;
  font-size: 0.9em;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .upcoming-events-section {
    padding: 40px 15px;
  }

  .upcoming-events-section .section-title {
    font-size: 1.5em;
  }

  .upcoming-events-section .section-subtitle {
    font-size: 1em;
    margin-bottom: 30px;
  }

  .event-card {
    padding: 25px;
  }

  .event-title {
    font-size: 1.2em;
  }

  .event-link {
    padding: 10px 20px;
    font-size: 0.9em;
  }
}

@media (max-width: 480px) {
  .events-grid {
    grid-template-columns: 1fr; /* Stack cards vertically on very small screens */
  }  
}

/* --- Modal Styles --- */
.modal {
  display: none; /* This is the only display property it should have initially */
  position: fixed; /* Stay in place */
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.6);
}

.show-modal {
  display: flex; /* Now, this will only apply when the class is present */
  align-items: center;
  justify-content: center;
}

.modal-content {
  background-color: #fefefe;
  padding: 40px;
  border-radius: 15px;
  width: 90%;
  max-width: 600px; /* Slightly narrower for a 'brief' feel */
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  animation: fadeIn 0.3s ease-out;
  transform: translateY(0);
}

/* Modal animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

.close-button {
  color: #aaa;
  font-size: 35px;
  font-weight: bold;
  position: absolute;
  top: 15px;
  right: 25px;
  cursor: pointer;
  transition: color 0.3s ease;
}

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

.modal-title {
  font-size: 1.8em; /* Slightly smaller for 'brief' */
  color: var(--primary);
  margin-bottom: 15px;
  text-align: center;
}

.modal-meta {
  font-size: 1em;
  color: #666;
  margin-bottom: 10px;
  text-align: center;
}

.modal-type {
  font-weight: bold;
  color: var(--tertiary);
}

.modal-datetime,
.modal-location {
  font-size: 0.95em;
  color: #555;
  margin-bottom: 8px;
  text-align: center;
}

.modal-location {
    font-weight: 500;
}

.modal-description {
  font-size: 1em; /* Slightly smaller for 'brief' */
  line-height: 1.5;
  color: #333;
  margin-top: 15px; /* Reduced margin */
  margin-bottom: 20px; /* Reduced margin */
  text-align: justify;
}

/* New styles for Attendee Selection */
.attendee-selection {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 15px 0;
  gap: 10px;
  padding-bottom: 15px; /* Add some space below */
  border-bottom: 1px dashed var(--lightGrey); /* Visual separator */
}

.attendee-selection label {
  font-size: 1em;
  color: var(--primary);
  font-weight: 600;
}

.attendee-selection input[type="number"] {
  width: 70px;
  padding: 8px 10px;
  border: 1px solid var(--lightGrey);
  border-radius: 5px;
  font-size: 1em;
  text-align: center;
}
/* Hide arrows for Chrome, Safari, Edge */
.attendee-selection input::-webkit-outer-spin-button,
.attendee-selection input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}


.modal-price,
.modal-total-price {
  font-size: 1.1em;
  color: var(--primary);
  font-weight: bold;
  text-align: center;
  margin-bottom: 5px;
}

.modal-price span,
.modal-total-price span {
  color: var(--green); /* Highlight prices */
}

/* New styles for Payment Systems */
.payment-systems {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px dashed var(--lightGrey); /* Visual separator */
  text-align: left;
}

.payment-systems h4 {
  color: var(--primary);
  font-size: 1.2em;
  margin-bottom: 10px;
  text-align: center;
}

.payment-systems ul {
  list-style: none; /* Remove default list bullet */
  padding: 0;
  margin: 0 0 15px 0;
  text-align: center; /* Center list items */
}

.payment-systems ul li {
  background-color: var(--lightGrey);
  padding: 8px 15px;
  border-radius: 5px;
  margin-bottom: 8px;
  font-size: 0.95em;
  color: #333;
  display: inline-block; /* Make list items behave like blocks but allow them to sit side by side */
  margin-right: 10px; /* Space between payment options */
  line-height: 1.4;
}
.payment-systems ul li:last-child {
    margin-right: 0;
}


.modal-contact {
  font-size: 0.9em;
  color: #666;
  text-align: center;
  margin-top: 15px;
}

.modal-contact a {
  color: var(--lightBlue);
  text-decoration: none;
  font-weight: 600;
}

.modal-contact a:hover {
  text-decoration: underline;
}

.modal-register-btn {
  display: block;
  width: fit-content;
  margin: 30px auto 0 auto;
  background-color: var(--green);
  color: white;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 1.2em;
  font-weight: 600;
  transition: background-color 0.3s ease, transform 0.2s ease;
  border: none; /* Ensure it looks like a button */
  cursor: pointer; /* Indicate it's clickable */
}

.modal-register-btn:hover {
  background-color: var(--lightGreen);
  transform: translateY(-2px);
}

/* Responsive adjustments for modal */
@media (max-width: 768px) {
  .modal-content {
    width: 95%;
    padding: 25px;
  }

  .modal-title {
    font-size: 1.8em;
  }

  .modal-meta,
  .modal-description,
  .modal-contact {
    font-size: 0.95em;
  }

  .attendee-selection label,
  .attendee-selection input[type="number"] {
    font-size: 0.9em;
  }

  .modal-register-btn {
    padding: 12px 25px;
    font-size: 0.8em;
  }

  .close-button {
    font-size: 30px;
    top: 10px;
    right: 20px;
  }
  .payment-systems ul li {
    font-size: 0.85em;
    margin-right: 5px;
    margin-bottom: 5px;
  }
}

@media (max-width: 480px) {
  .modal-content {
    padding: 20px;
  }

  .modal-title {
    font-size: 1.2em;
  }

  .modal-meta,
  .modal-description,
  .modal-contact {
    font-size: 0.9em;
  }
  .payment-systems ul li {
    display: block; 
    margin-right: 0;
  }
}