/* Unique Styles for Events Page */

/* Events Section */
.ev-events-section {
  padding: 150px 20px;
  background: url("./images/eventsbg.jpg") no-repeat center center;
  background-size: cover;
  text-align: center;
  animation: fadeIn 1s ease-in-out;
  position: relative;
}

/* Responsive Background Image Adjustments */
@media screen and (max-width: 768px) {
  .ev-events-section {
    padding: 100px 15px; /* Reduced vertical padding for smaller screens */
    background-size: contain; /* Prevents image from being zoomed in */
    background-position: top center; /* Aligns image to the top */
    background-repeat: no-repeat;
  }
}

@media screen and (max-width: 480px) {
  .ev-events-section {
    padding: 80px 10px; /* Further reduced padding for very small screens */
    background-size: cover; /* Ensures the image still covers the container */
    background-position: top center; /* Maintains alignment to prevent cropping */
  }
}

/* Timeline Container */
.ev-timeline {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 0;
  transition: background-color 0.5s ease; /* Add transition for smooth color change */
}

/* The vertical line */
.ev-timeline::after {
  content: "";
  position: absolute;
  width: 6px;
  background-color: #64dafe;
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -3px;
  transition: background-color 0.5s ease; /* Transition for color change */
}

/* New Class to Change Timeline Color to Black */
.ev-timeline.timeline-black::after {
  background-color: #000000;
}

/* Container around content */
.ev-event {
  padding: 20px 30px;
  position: relative;
  background-color: inherit;
  width: 50%;
}

/* Position the containers to the left or right */
.ev-event:nth-child(odd) {
  left: 0;
}

.ev-event:nth-child(even) {
  left: 50%;
}

/* Add arrows to the left container (pointing right) */
.ev-event:nth-child(odd)::before {
  content: " ";
  height: 0;
  position: absolute;
  top: 15px;
  width: 0;
  z-index: 1;
  right: -15px;
  border: medium solid #64dafe;
  border-width: 10px 0 10px 10px;
  border-color: transparent transparent transparent #64dafe;
}

/* Add arrows to the right container (pointing left) */
.ev-event:nth-child(even)::before {
  content: " ";
  height: 0;
  position: absolute;
  top: 15px;
  width: 0;
  z-index: 1;
  left: -15px;
  border: medium solid #64dafe;
  border-width: 10px 10px 10px 0;
  border-color: transparent #64dafe transparent transparent;
}

/* Content inside the container */
.ev-event-content {
  padding: 20px 30px;
  background: rgba(0, 0, 0, 1);
  position: relative;
  border-radius: 6px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  animation: ev-slideUp 0.5s ease-in-out;
}

.ev-event-date {
  font-size: 16px;
  color: #64dafe;
  margin-bottom: 10px;
}

.ev-event-title {
  font-size: 24px;
  margin-bottom: 10px;
  color: #ffffff;
}

.ev-event-location {
  font-size: 16px;
  color: #ffffff;
  margin-bottom: 15px;
}

.ev-event-description {
  font-size: 16px;
  color: #ffffff;
  margin-bottom: 20px;
  text-align: left;
}

.ev-buy-tickets {
  display: inline-block;
  padding: 10px 20px;
  background-color: #64dafe;
  color: #fff;
  text-decoration: none;
  border-radius: 5px;
  transition: background 0.3s ease, transform 0.3s ease;
}

.ev-buy-tickets:hover {
  background-color: #4bbbe3;
  transform: scale(1.05);
}

/* Responsive Design */
@media screen and (max-width: 768px) {
  /* Make the timeline vertical on small screens */
  .ev-timeline::after {
    left: 31px;
  }

  .ev-event {
    width: 100%;
    padding-left: 70px;
    padding-right: 25px;
  }

  .ev-event:nth-child(odd),
  .ev-event:nth-child(even) {
    left: 0%;
  }

  /* Make sure all arrows are on the left */
  .ev-event:nth-child(odd)::before,
  .ev-event:nth-child(even)::before {
    left: 15px;
    border: medium solid #64dafe;
    border-width: 10px 10px 10px 0;
    border-color: transparent #64dafe transparent transparent;
  }

  .ev-event-content {
    text-align: left;
  }
}

@media screen and (max-width: 480px) {
  /* Further adjustments for very small screens */
  .ev-events-section {
    padding: 80px 10px; /* Adjusted in the previous media query */
    background-size: cover;
    background-position: top center;
  }

  .ev-event {
    padding-left: 50px;
    padding-right: 15px;
  }

  .ev-buy-tickets {
    padding: 8px 16px;
    font-size: 14px;
  }
}

/* Animations */
@keyframes ev-fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes ev-slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.ev-section-title {
  color: #64dafe;
}
