/* Event Calendar Styles */

.event-calendar-wrapper {
  font-family: "Mulish", Arial, Helvetica, sans-serif;
}

/* Apply Mulish font to specific elements within event calendar only */
.event-calendar-wrapper h1,
.event-calendar-wrapper h2,
.event-calendar-wrapper h3,
.event-calendar-wrapper h4,
.event-calendar-wrapper h5,
.event-calendar-wrapper h6,
.event-calendar-wrapper p,
.event-calendar-wrapper span,
.event-calendar-wrapper div,
.event-calendar-wrapper label,
.event-calendar-wrapper input,
.event-calendar-wrapper button,
.event-calendar-wrapper a {
  font-family: "Mulish", Arial, Helvetica, sans-serif;
}


/* Hero Banner Styles */
.event-calendar-banner {
  position: relative;
  min-height: 400px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  background-color: #f8f9fa;
}

.event-calendar-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1;
}

.basic-page-banner-container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.event-calendar-banner .inner-container {
  text-align: center;
  color: white;
}

.basic-page-banner-title {
  margin-bottom: 20px;
}

.basic-page-banner-title span {
  font-size: 3.5rem;
  line-height: 1.2;
  font-weight: 800;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  display: inline-block;
}

.basic-page-banner-body {
  font-size: 1.2rem;
  line-height: 1.6;
  max-width: 600px;
  margin: 0 auto;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Override for banner without image */
.event-calendar-banner:not([style*="background-image"]) {
  background: linear-gradient(135deg, #C05010, #E06515);
  min-height: 300px;
}

.event-calendar-banner:not([style*="background-image"])::before {
  display: none;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Featured Events Section */
.featured-events-section {
  background: #f8f9fa;
  padding: 60px 0;
}

.featured-title {
  text-align: center;
  font-size: 2rem;
  line-height: 2.5rem;
  font-weight: 800;
  margin-bottom: 2rem;
  color: #C05010;
}

.featured-events-carousel {
  position: relative;
}

.carousel-container {
  position: relative;
  overflow: hidden;
  margin-bottom: 30px;
  /* Dynamic height will be set by JavaScript */
}

.carousel-slide {
  display: none;
  width: 100%;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  pointer-events: none;
}

.carousel-slide.active {
  display: flex;
  gap: 30px;
  opacity: 1;
  position: relative;
  z-index: 1;
  pointer-events: auto;
}

.featured-event-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
  cursor: pointer;
  flex: 1;
  min-width: 0;
  display: block;
  text-decoration: none !important;
  color: inherit;
}

.featured-event-card:hover {
  transform: translateY(-5px);
  text-decoration: none !important;
}

.featured-event-card * {
  text-decoration: none !important;
}

.featured-event-card:hover .event-title,
.featured-event-card:hover .cta-link {
  text-decoration: underline !important;
}

/* Ensure hover works on all carousel slides regardless of positioning */
.carousel-slide .featured-event-card * {
  text-decoration: none !important;
}

.carousel-slide .featured-event-card:hover .event-title,
.carousel-slide .featured-event-card:hover .cta-link {
  text-decoration: underline !important;
}

.featured-event-card .event-image,
.featured-event-card .placeholder-image {
  width: 100%;
  height: 200px;
  max-width: 500px;
  background: #e9ecef;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6c757d;
  overflow: hidden;
  position: relative;
}

.featured-event-card .event-image .blur-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  filter: blur(10px);
  transform: scale(1.1);
  z-index: 1;
}

.featured-event-card .event-image > * {
  width: 100%;
  height: 100%;
}

.featured-event-card .event-image > div > div {
  width: 100%;
  height: 100%;
}

.featured-event-card .event-image > div > div > div {
  width: 100%;
  height: 100%;
}

.featured-event-card .event-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  position: relative;
  z-index: 2;
}

.featured-event-card .event-content {
  padding: 20px;
}

.event-meta {
  font-size: 0.8rem;
  color: #666;
  margin-bottom: 18px;
}

.event-title {
  font-size: 1.2rem;
  margin: 10px 0;
  color: #333;
}

.cta-link {
  color: #C05010;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}

.cta-link:hover {
  color: #E06515;
  text-decoration: underline;
}

/* Override for featured event cards - must come after general cta-link:hover */
.featured-event-card .cta-link:hover {
  text-decoration: none !important;
}

.carousel-slide .featured-event-card .cta-link:hover {
  text-decoration: none !important;
}

/* Carousel Navigation - identical to partner testimonial carousel */
.carousel-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  height: 50px;
}

.carousel-btn {
  background: #C05010;
  border: none;
  border-radius: 50%;
  width: 25px;
  height: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
}

.carousel-btn:hover {
  background: #C05010;
  transform: scale(1.1);
}

.carousel-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
}

.carousel-dots {
  display: flex;
  gap: 10px;
}

.carousel-dot {
  width: 12px;
  height: 12px;
  border: 0px;
  border-radius: 50%;
  background: #ddd;
  cursor: pointer;
  transition: background 0.3s ease;
}

.carousel-dot.active {
  background: #2073A2;
}

/* Legacy dot styles for existing HTML */
.dot {
  height: 12px;
  width: 12px;
  margin: 0 5px;
  background-color: #bbb;
  border-radius: 50%;
  display: inline-block;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.dot.active,
.dot:hover {
  background-color: #C05010;
}

/* Main Content Section */
.events-content-section {
  padding: 60px 0;
}

.content-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 40px;
}

/* Filter Sidebar */
.filter-sidebar {
  background: #f8f9fa;
  padding: 30px;
  border-radius: 8px;
  height: fit-content;
}

#event-filters-form {
  padding-top: 0;
}

.filter-sidebar h3 {
  margin-top: 0;
  margin-bottom: 25px;
  color: #C05010;
  font-size: 1.3rem;
}

.filter-group {
  margin-bottom: 30px;
}

.filter-group > label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
  color: #555;
}

/* Collapsible filter toggle */
.filter-toggle {
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  width: 100%;
  position: relative;
}

.filter-toggle:hover {
  color: #C05010;
}

.toggle-icon {
  font-size: 0.8rem;
  transition: transform 0.3s ease;
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

.filter-toggle.collapsed .toggle-icon {
  transform: translateY(-50%) rotate(-90deg);
}

/* Collapsible content */
.collapsible {
  overflow: hidden;
  transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
  max-height: 500px;
  opacity: 1;
}

.collapsible.collapsed {
  max-height: 0;
  opacity: 0;
}

.search-input,
.filter-select {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

.search-input:focus,
.filter-select:focus {
  outline: none;
  border-color: #007bff;
}

/* Topics multi-select dropdown */
#topics-filter {
  min-height: 120px;
  background: white;
}

#topics-filter option {
  padding: 8px;
  margin: 1px 0;
}

#topics-filter option:hover {
  background-color: #f8f9fa;
}

#topics-filter option:checked {
  background-color: #007bff;
  color: white;
}

.filter-help {
  margin: 5px 0;
  color: #666;
  font-style: italic;
}

.filter-checkboxes {
  margin-top: 10px;
}

.filter-checkboxes label {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
  font-weight: normal;
  cursor: pointer;
}

.filter-checkboxes input[type="checkbox"] {
  margin-right: 8px;
}

.clear-btn {
  background: none;
  border: none;
  color: #007bff;
  cursor: pointer;
  font-size: 14px;
  text-decoration: underline;
  margin-top: 5px;
}

.clear-btn:hover {
  color: #0056b3;
}

/* Events Grid */
.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(370px, 370px));
  gap: 30px;
  margin-bottom: 40px;
  justify-content: start;
}

.event-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
  cursor: pointer;
  display: block;
  text-decoration: none !important;
  color: inherit;
}

.event-card:hover {
  transform: translateY(-3px);
  text-decoration: none !important;
}

.event-card * {
  text-decoration: none !important;
}

.event-card:hover .event-title,
.event-card:hover .cta-link {
  text-decoration: underline !important;
}

.event-card-image,
.event-card .placeholder-image {
  width: 100%;
  height: 200px;
  max-width: 500px;
  background: #e9ecef;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6c757d;
  overflow: hidden;
  position: relative;
}

.event-card-image .blur-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  filter: blur(10px);
  transform: scale(1.1);
  z-index: 1;
}

.event-card-image > * {
  width: 100%;
  height: 100%;
}

.event-card-image > div > div {
  width: 100%;
  height: 100%;
}

.event-card-image > div > div > div {
  width: 100%;
  height: 100%;
}

.event-card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  position: relative;
  z-index: 2;
}

.event-card-content {
  padding: 20px;
}

.event-excerpt {
  color: #666;
  line-height: 1.4;
  margin: 10px 0 15px 0;
  font-size: 0.85rem;
}

/* Filter Actions */
.filter-actions {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.filter-submit-btn {
  background: #C05010;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

.filter-submit-btn:hover {
  background: #E06515;
}

.clear-all-btn {
  background: #6c757d;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  transition: background-color 0.3s ease;
}

.clear-all-btn:hover {
  background: #5a6268;
}

/* Pagination */
.pagination-container {
  margin-top: 40px;
  text-align: center;
}

.pagination-container .pager {
  display: inline-flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 15px;
  align-items: center;
}

.pagination-container .pager li {
  margin: 0;
}

/* Clickable page links */
.pagination-container .pager a {
  display: inline-block;
  padding: 8px 0;
  text-decoration: underline;
  color: #333;
  background: none;
  border: none;
  font-size: 16px;
  line-height: 1.2;
  cursor: pointer;
}

.pagination-container .pager a:hover {
  color: #C05010;
  text-decoration: underline;
}

/* Active page (current page link) */
.pagination-container .pager .is-active a {
  display: inline-block;
  padding: 8px 0;
  text-decoration: none !important;
  color: #C05010 !important;
  background: none;
  border: none;
  font-size: 16px;
  line-height: 1.2;
  font-weight: 600;
  cursor: default;
  pointer-events: none;
}

.pagination-container .pager .is-active a:hover {
  color: #C05010 !important;
  text-decoration: none !important;
}

/* Previous/Next links - normal color with orange hover */
.pagination-container .pager .pager__item--previous a,
.pagination-container .pager .pager__item--next a {
  color: #333;
  text-decoration: underline;
}

.pagination-container .pager .pager__item--previous a:hover,
.pagination-container .pager .pager__item--next a:hover {
  color: #C05010;
  text-decoration: underline;
}

/* Hide verbose labels */
.pagination-container .visually-hidden {
  display: none !important;
}

/* No Events Message */
.no-events {
  text-align: center;
  padding: 60px 20px;
  color: #666;
}

/* AJAX Loading States */
.events-grid-container.loading {
  position: relative;
}

.events-grid-container.loading::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(248, 249, 250, 0.8);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.events-grid-container.loading::after {
  content: 'Loading...';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 11;
  font-size: 1.2rem;
  color: #C05010;
  font-weight: 600;
}

.ajax-error {
  text-align: center;
  padding: 40px 20px;
  color: #dc3545;
  background: #f8d7da;
  border-radius: 8px;
  margin: 20px 0;
}

/* Smooth transitions for AJAX updates */
.events-grid {
  transition: opacity 0.3s ease;
}

.pagination-container {
  transition: opacity 0.2s ease;
}

/* Dynamic flexbox layout based on number of events - Desktop */
.featured-events-carousel.events-num-1 .carousel-slide.active {
  justify-content: center;
  max-width: 400px;
  margin: 0 auto;
}

.featured-events-carousel.events-num-2 .carousel-slide.active {
  justify-content: center;
}

.featured-events-carousel.events-num-3 .carousel-slide.active,
.featured-events-carousel.events-num-4 .carousel-slide.active,
.featured-events-carousel.events-num-5 .carousel-slide.active,
.featured-events-carousel.events-num-6 .carousel-slide.active {
  /* Default flex behavior already set above */
}

/* Responsive Design */
@media (max-width: 768px) {
  .basic-page-banner-title span {
    font-size: 2.5rem;
  }
  
  .basic-page-banner-body {
    font-size: 1rem;
    padding: 0 15px;
  }
  
  .event-calendar-banner {
    min-height: 250px;
  }
  
  .carousel-container {
    /* Dynamic height on mobile too */
  }
  
  .carousel-slide.active {
    flex-direction: column;
  }
  
  .content-grid {
    grid-template-columns: 1fr;
  }
  
  .events-grid {
    grid-template-columns: 1fr;
  }
}