/* ===================================================== */
/*                    GLOBAL RESET                     */
/* ===================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  /* Using an earthy, soft background and modern sans-serif font */
  font-family: 'Poppins', sans-serif;
  background: #F4F1E0; /* Soft earthy tone */
  color: #333;
  line-height: 1.6;
}

/* ===================================================== */
/*                   TYPOGRAPHY                        */
/* ===================================================== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  color: #2D2D2D;
  margin-bottom: 10px;
}

/* Main page title (for index.php, etc.) */
.page-title {
  text-align: center;
  font-size: 2.2rem;
  margin: 20px 0;
}

/* ===================================================== */
/*                INDEX PAGE - EVENT LISTING           */
/* ===================================================== */

/* Container for the entire event list */
.event-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  padding: 20px;
}

/* Each event is displayed as a modern "card" */
.event-card {
  background: #fff;
  width: 320px;
  border-radius: 20px;        /* More rounded corners for a "bubbled" effect */
  border: 1px solid #e0e0e0;    /* Light border */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}

/* Hover effect for event cards */
.event-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

/* Event image: full width, fixed height, with rounded top corners */
.event-image img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
}

/* Container for text inside the event card */
.event-info {
  padding: 15px;
  flex-grow: 1;
}

/* Event title in index listing - using a smaller, clean font */
.event-title a {
  font-size: 1rem;   /* Smaller than before */
  font-weight: bold;
  color: #1877F2;
  text-decoration: none;
}

.event-title a:hover {
  text-decoration: underline;
}

/* Date and price styling for each event */
.event-date,
.event-price {
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 5px;
}

/* If an event is in the past, display it faded */
.past-event {
  opacity: 0.6;
}

/* Message when no events are available */
.no-events {
  text-align: center;
  font-size: 1.2rem;
  color: #888;
}

/* ===================================================== */
/*               EVENT DETAIL PAGE (event.php)         */
/* ===================================================== */

/* Hero section: a large header image with overlay text */
.hero-section {
  position: relative;
  width: 100%;
  height: 50vh;  /* Fixed height for header image */
  overflow: hidden;
}

.hero-section img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.65); /* Dark filter for better text contrast */
}

/* Overlay for event title on hero section */
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hero-title {
  color: white;
  font-size: 2.2rem;
  font-weight: bold;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
  padding: 20px;
}

/* Content container for event details */
.event-content {
  max-width: 700px;
  margin: 30px auto;
  padding: 20px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  text-align: center;
}

/* Event Info section (date, price) */
.event-info-section {
  max-width: 500px;
  margin: 20px auto;
  padding: 15px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.event-info {
  font-size: 1rem;
  font-weight: bold;
  color: #4CAF50;
}

/* Event Description: styled similarly to GDPR popup windows */
.event-description-box {
  max-width: 550px;
  margin: 20px auto;
  padding: 15px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  text-align: left;
  font-size: 15px;
  line-height: 1.5;
  color: #333;
}

/* ===================================================== */
/*                    BUTTONS                        */
/* ===================================================== */

.register-section {
  text-align: center;
  margin-top: 20px;
}

.btn-primary {
  background-color: #1877F2;
  color: #fff;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 1.1rem;
  text-decoration: none;
  display: inline-block;
  transition: background-color 0.2s ease;
  border: none;
}

.btn-primary:hover {
  background-color: #145dc4;
}

/* ===================================================== */
/*                   FOOTER                          */
/* ===================================================== */

.footer-container {
  background: #fff;
  padding: 15px 0;
  text-align: center;
  font-size: 14px;
  margin-top: 20px;
}

/* Footer content */
.footer-container p {
  margin: 0;
  padding: 10px;
}

/* Footer links */
.footer-container a {
  color: #1877F2;
  text-decoration: none;
  font-weight: 500;
  padding: 5px;
  display: inline-block;
  transition: color 0.2s ease;
}

.footer-container a:hover {
  color: #145dc4;
  text-decoration: underline;
}

/* Center footer links using flexbox */
.footer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}
/* ----------------------------------------------------- */
/*           Back to Events List Link Styling            */
/* ----------------------------------------------------- */
.back-to-list {
    margin: 20px 0;
    text-align: center;
}

.back-to-list a {
    font-size: 0.9rem;
    color: #1877F2;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-bottom 0.2s;
}

.back-to-list a:hover {
    border-bottom: 1px solid #1877F2;
}

/* Back to Events List Link - Centered on all devices */
.back-to-list {
    margin: 20px 0;
    width: 100%;
    text-align: center;
}

.back-to-list a {
    display: inline-block; /* Ensure proper centering */
    font-size: 0.9rem;
    color: #1877F2;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-bottom 0.2s ease;
}

.back-to-list a:hover {
    border-bottom: 1px solid #1877F2;
}


/* ===================================================== */
/*                 RESPONSIVE DESIGN                 */
/* ===================================================== */
@media (max-width: 768px) {
  .event-list {
    flex-direction: column;
    align-items: center;
  }
  
  .event-card {
    width: 90%;
  }
  
  .hero-title {
    font-size: 2rem;
    padding: 10px;
  }
  
  .event-content,
  .event-description-box,
  .event-info-section {
    width: 90%;
  }
}
