/* Events Navigation */
.events-nav-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 10px 0;
    opacity: 50%;
}

.events-nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    gap: 15px;
}

.events-nav-back,
.events-nav-home {
    color: #D3D3D3;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 8px 15px;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    /* background: rgba(255, 255, 255, 0.1); */
}

.events-nav-back i,
.events-nav-home i {
    margin-right: 8px;
}

.events-nav-back:hover,
.events-nav-home:hover {
    color: #fff;
    /* background: rgba(255, 255, 255, 0.2); */
    transform: translateY(-2px);
    border-left-color: rgba(255, 255, 255, 0.2);
}

/* Responsive Styles */
@media (max-width: 768px) {
    .events-nav-container {
        padding: 0 15px;
        justify-content: center;
    }
    
    .events-nav-back,
    .events-nav-home {
        font-size: 13px;
        padding: 6px 12px;
    }
}

/* Navbar scroll behavior */
.events-nav-header {
    transition: transform 0.3s ease-in-out;
}

.events-nav-header.scroll-up {
    transform: translateY(0);
}

.events-nav-header.scroll-down {
    transform: translateY(-100%);
}
/* Events Grid Layout */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    padding: 0 15px;
    max-width: 1400px;
    margin: 0 auto;
}

.event-card {
    width: 100%;
    padding: 18px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 25px rgba(0,0,0,0.25);
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    margin-bottom: 0;
  width: 100%;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 8px 25px rgba(0,0,0,0.25);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  margin-bottom: 0;
}

.event-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 35px rgba(0,0,0,0.35);
}

.event-image {
  width: 100%;
  height: 180px;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 15px;
}

.event-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.event-card:hover .event-image img {
  transform: scale(1.05);
}

.event-content {
  padding: 0 5px;
}

.event-title {
  margin: 0 0 10px 0;
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}

.event-date,
.event-location {
  margin: 4px 0;
  color: rgba(255,255,255,0.85);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
}

.event-date:before {
  content: '\f017';
  font-family: 'FontAwesome';
  margin-right: 8px;
  color: #ffce4e;
}

.event-location:before {
  content: '\f041';
  font-family: 'FontAwesome';
  margin-right: 8px;
  color: #ffce4e;
}

.event-btn {
  display: inline-block;
  margin-top: 14px;
  padding: 10px 20px;
  background: linear-gradient(135deg, #595858, #272727);
  color: #fff !important;
  font-weight: 700;
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  width: 100%;
  text-align: center;
}

.event-btn:hover {
  opacity: 0.9;
  transform: translateY(-3px);
  box-shadow: 0 4px 15px rgba(232, 161, 0, 0.3);
  color: #000;
  text-decoration: none;
}

/* Responsive Adjustments */
@media (max-width: 1500px) {
  #eventsContainer {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    padding: 0 20px;
  }
  .load-more-container{
    display:none;
  }
}

@media (max-width: 1200px) {
  #eventsContainer {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 901px) {
  #eventsContainer {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 15px;
    padding: 0 15px;
  }
  .load-more-container {
        display: none !important;
    }
    /* .event-item {
        display: block !important;   Override any inline styles 
    } */
}

@media (max-width: 600px) {
  #eventsContainer {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding: 0 10px;
  }
  
  .event-card {
    max-width: 100%;
  }
  
  .event-title {
    font-size: 1.4rem;
  }
  
  .event-date,
  .event-location {
    font-size: 1.1rem;
  }
  
  .event-btn {
    padding: 8px 16px;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
    .events-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 0 10px;
        width: 100%;
        box-sizing: border-box;
    }
    
    .load-more-container {
        margin: 25px auto;
        padding: 0 10px;
    }
    
    .load-more-btn {
        padding: 10px 20px;
        font-size: 0.8rem;
    }
    
    .event-card {
        width: 100% !important;
        margin: 0 !important;
        padding: 12px;
        box-sizing: border-box;
        max-width: none !important;
    }
    
    .event-title {
        font-size: 0.9rem;
        margin: 8px 0 6px 0;
        line-height: 1.2;
        min-height: 2.4em;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .event-date,
    .event-location {
        font-size: 0.75rem;
        margin: 4px 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .event-btn {
        padding: 6px 10px;
        font-size: 0.75rem;
        margin-top: 8px;
    }
    
    .event-image {
        height: 140px !important;
    }
}

/* Animation for newly loaded items */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.event-card {
  animation: fadeInUp 0.5s ease-out forwards;
  opacity: 0;
}

/* Load More Button */
.load-more-container {
  text-align: center;
  margin: 30px auto;
  padding: 0 15px;
  width: 100%;
  max-width: 300px;
  display: block !important; /* Force display on mobile */
}

.load-more-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 25px;
  background: linear-gradient(135deg, #595858, #272727);
  color: #fff !important;
  font-weight: 600;
  border-radius: 30px;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.85rem;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  width: 100%;
  max-width: 280px;
  margin: 0 auto;
}

.load-more-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(232, 161, 0, 0.3);
  color: #000;
  text-decoration: none;
}

.load-more-btn i {
  margin-left: 8px;
  transition: transform 0.3s ease;
}

.load-more-btn:hover i {
  transform: translateY(2px);
}
/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg,#595858, #272727);
    color: white;
    border: none;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    transition: all 0.3s ease;
    z-index: 9999; /* Increased z-index to ensure it's above other elements */
    opacity: 0;
    transform: translateY(20px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    /* Ensure it's not being hidden by other elements */
    pointer-events: auto !important;
}

.scroll-to-top.visible {
    display: flex !important; /* Force display flex */
    opacity: 1;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background: rgba(0, 0, 0, 0.1);
    transform: translateY(-3px) !important; /* Ensure hover transform works */
    box-shadow: 0 4px 15px rgba(232, 161, 0, 0.3);
}