/* ==========================================================================
   Event List Module - Event Listings with Filters
   ========================================================================== */

/* Main container */
.event-list-module {
  --bl-padding-top: 4rem;
  --bl-padding-bottom: 4rem;
  --bl-padding-sm-top: 2rem;
  --bl-padding-sm-bottom: 2rem;
}

.event-list-container {
  max-width: 100%;
  margin: 0 auto;
  background: white;
  padding-block: 0;
}

/* Layout */
.event-list-layout {
  display: flex;
  gap: 4rem;
  align-items: flex-start;
}

/* ==========================================================================
   Left Sidebar - Filters
   ========================================================================== */

.event-list-sidebar {
  flex: 0 0 25%;
  background: white;
  padding: 0;
  box-sizing: border-box;
}

/* Search Input */
.event-list-sidebar .search-input-wrapper {
  position: relative;
  width: 100%;
  margin-bottom: 1rem;
  box-sizing: border-box;
}

.event-list-sidebar .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 26px;
  pointer-events: none;
}

.event-list-sidebar .search-input {
  width: 100%;
  padding: 1rem 1rem 1rem 2.5rem;
  border: 2px solid #5006171A;
  font-family: 'Gotham', sans-serif;
  font-size: 16px;
  color: #82142C;
  font-weight: bold;
  outline: none;
  box-sizing: border-box;
}

.event-list-sidebar .search-input::placeholder {
  font-family: 'Gotham', sans-serif;
  font-size: 16px;
  color: #82142C;
  font-weight: bold;
}

/* Date Range Filters */
.date-range-filters {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1rem;
}

.date-input-wrapper {
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

.date-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  pointer-events: none;
  object-fit: contain;
}

.date-input {
  width: 100%;
  padding: 1rem 1rem 1rem 2.5rem;
  border: 2px solid #5006171A;
  font-family: 'Gotham', sans-serif;
  font-size: 16px;
  color: #82142C;
  font-weight: bold;
  outline: none;
  box-sizing: border-box;
}

.date-input::placeholder {
  font-family: 'Gotham', sans-serif;
  font-size: 16px;
  color: #82142C;
  font-weight: bold;
}

/* Sidebar Intro */
.sidebar-intro {
  margin-bottom: 2rem;
  margin-top: 1rem;
}

.sidebar-intro p {
  margin: 0;
  font-family: 'Gelasio', serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  color: #500617;
}

/* Filter Categories */
.filter-categories {
  margin-bottom: 2rem;
}

.filter-category {
  padding: 1.5rem 0;
  border-bottom: 1px solid #5006171A;
  transition: all 0.2s ease;
}

.filter-category:hover {
  color: #B40015;
  border-bottom-color: #FDB618;
}

.filter-category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.filter-category-label {
  font-family: 'Gotham', sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: #840029;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-arrow {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.filter-arrow circle,
.filter-arrow path {
  transition: all 0.3s ease;
}

/* Apply Filters Button */
.apply-filters-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: transparent;
  border: none;
  border-radius: 4px;
  text-decoration: none;
  color: #500617;
  font-family: 'Gelasio', serif;
  font-weight: 700;
  font-style: normal;
  font-size: 22px;
  line-height: 139%;
  letter-spacing: 0%;
  vertical-align: middle;
  transition: color 0.3s ease;
  cursor: pointer;
  padding: 0;
}

.apply-filters-btn span {
  font-family: 'Gelasio', serif;
  font-weight: 700;
  font-style: normal;
  font-size: 22px;
  line-height: 139%;
  letter-spacing: 0%;
  vertical-align: middle;
  color: #500617;
  transition: color 0.3s ease;
}

.apply-filters-btn:hover {
  color: #B40015;
  text-decoration: none;
}

.apply-filters-btn:hover span {
  color: #B40015;
}

.apply-filters-btn svg {
  width: 56px;
  height: 56px;
  transition: all 0.3s ease;
}

.apply-filters-btn:hover svg {
  transform: translateX(13px);
}

.apply-filters-btn:hover svg circle {
  fill: #B40015;
  stroke: #B40015;
}

.apply-filters-btn:hover svg path {
  stroke: white;
}

/* ==========================================================================
   Right Main Content
   ========================================================================== */

.event-list-main {
  flex: 1;
  padding: 0;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

/* Event Listings */
.event-listings {
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 3rem;
  box-sizing: border-box;

  .no-results-message {
    padding-block: 0;
  }
}

.event-card {
  display: flex;
  gap: 4rem;
  align-items: center;
  background: white;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.event-card:nth-child(odd) {
  background-color: #F5F3F1;
}

.event-card:nth-child(even) {
  background-color: #FFFFFF;
}

.event-image-placeholder {
  flex: 1;
  width: 100%;
  height: 350px;
  min-width: 350px;
  background-color: #E5E5E5;
  display: flex;
  align-items: center;
  justify-content: center;
}

.event-image-placeholder svg {
  width: 48px;
  height: 48px;
}

.event-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.event-title {
  font-family: 'Gotham', sans-serif;
  font-weight: 700;
  font-size: 22px;
  line-height: 120%;
  color: #840029;
  margin: 0;
}

.event-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

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

.event-title a:visited {
  color: #840029;
}

.event-date,
.event-time,
.event-location {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Gelasio', serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  color: #500617;
}

.event-date span,
.event-time span,
.event-location span {
  font-family: 'Gelasio', serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  color: #500617;
}

.event-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.event-location .event-icon {
  width: 16px;
  height: 20px;
}

.event-summary {
  font-family: 'Gelasio', serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.62;
  color: #500617;
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.event-list-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 4rem;
}

.pagination-prev,
.pagination-next {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: transparent;
  border: none;
  border-radius: 4px;
  text-decoration: none;
  color: #500617;
  font-family: 'Gelasio', serif;
  font-weight: 700;
  font-style: normal;
  font-size: 22px;
  line-height: 139%;
  letter-spacing: 0%;
  vertical-align: middle;
  transition: color 0.3s ease;
  cursor: pointer;
}

.pagination-prev .pagination-text,
.pagination-next .pagination-text {
  font-family: 'Gelasio', serif;
  font-weight: 700;
  font-style: normal;
  font-size: 22px;
  line-height: 139%;
  letter-spacing: 0%;
  vertical-align: middle;
  color: #500617;
  transition: transform 0.3s ease;
}

.pagination-prev:hover,
.pagination-next:hover {
  color: #B40015;
  text-decoration: none;
}

.pagination-prev:hover .pagination-text {
  transform: translateX(13px);
}

.pagination-next:hover .pagination-text {
  transform: translateX(-13px);
}

.pagination-arrow-circle {
  display: flex;
  align-items: center;
  justify-content: center;
}

.pagination-prev .pagination-arrow-circle svg,
.pagination-next .pagination-arrow-circle svg {
  width: 56px;
  height: 56px;
  transition: all 0.3s ease;
}

.pagination-prev:hover .pagination-arrow-circle svg circle,
.pagination-next:hover .pagination-arrow-circle svg circle {
  fill: #B40015;
  stroke: #B40015;
}

.pagination-prev:hover .pagination-arrow-circle svg path,
.pagination-next:hover .pagination-arrow-circle svg path {
  stroke: white;
}

.pagination-numbers {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pagination-number {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  font-family: 'Gotham', sans-serif;
  font-weight: bold;
  font-size: 16px;
  color: #500617;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pagination-number--active {
  background-color: #FFC107;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 1024px) {
  .event-list-layout {
    flex-direction: column;
    gap: 3rem;
  }

  .event-list-sidebar {
    flex: 1;
    width: 100%;
    padding-bottom: 1rem;
  }

  .event-card {
    gap: 2rem;
  }

  .event-list-main {
    padding: 0;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .event-image-placeholder {
    min-width: 300px;
  }
}

@media (max-width: 768px) {
  .event-card {
    gap: 1.5rem;
  }

  .event-image-placeholder {
    width: 100%;
    height: 250px;
    min-width: 250px;
  }

  .event-card .event-date span,
  .event-card .event-time span,
  .event-card .event-location span {
    font-size: 14px;
  }

  .event-card .event-title {
    font-size: 18px;
  }

  .event-card .event-summary {
    font-size: 14px;
  }

  .event-list-module .pagination-number {
    gap: 0.2rem;
  }

  .event-list-module .pagination-prev .pagination-arrow-circle svg,
  .event-list-module .pagination-next .pagination-arrow-circle svg {
    width: 46px;
    height: 46px;
  }

  .event-list-module .pagination-prev .pagination-text,
  .event-list-module .pagination-next .pagination-text {
    font-size: 18px;
  }


  .event-list-sidebar .apply-filters-btn span {
    font-size: 20px;
  }

  .event-list-sidebar .apply-filters-btn svg {
    width: 46px;
    height: 46px;
  }
}

@media (max-width: 567px) {

  .event-list-module {
    padding: 1.5rem;
  }

  .filter-category-label {
    font-size: 14px;
  }

  .event-card {
    flex-direction: column;
    gap: 1rem;
    padding-bottom: 1rem;
    align-items: start;
  }

  .event-details {
    padding: 1rem !important;
  }

  .event-image-placeholder {
    width: 100%;
    min-height: 250px;
    height: 250px;
    min-width: 250px;
  }

  .event-list-sidebar {

    .search-input,
    .date-input {
      font-size: 14px;
    }

    .filter-category-label {
      font-size: 14px;
    }

    .sidebar-intro {
      margin-bottom: 1rem;

      p {
        font-size: 14px;
      }
    }

    .filter-categories {
      .filter-category {
        padding: 1rem 0;
      }
    }

  }

  .event-list-main {
    padding: 1rem;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .event-list-pagination {
    gap: 0.5rem;
  }
}

@media (max-width: 480px) {
  .event-list-pagination {
    gap: 0.25rem;
    margin-top: 3rem;
    justify-content: center;
  }

  .event-list-module .pagination-prev,
  .event-list-module .pagination-next,
  .event-list-pagination .pagination-prev,
  .event-list-pagination .pagination-next {
    display: none !important;
  }

  .pagination-number {
    min-width: 32px;
    height: 32px;
    font-size: 14px;
  }

  .pagination-numbers {
    gap: 0.25rem;
  }
}

/* Dynamic Filter Styles */
.filter-category.is-collapsed .filter-options {
  display: none;
}

/* Open State (Default) */
.filter-category:not(.is-collapsed) {
  border-bottom-color: #FDB618;
}

.filter-category:not(.is-collapsed) .filter-arrow circle {
  fill: #B40015;
  stroke: #B40015;
}

.filter-category:not(.is-collapsed) .filter-arrow path {
  stroke: #ffffff;
}

.filter-category:not(.is-collapsed) .filter-arrow {
  transform: rotate(-180deg);
}

/* Collapsed State */
.filter-category.is-collapsed .filter-arrow {
  transform: rotate(0deg);
}

.filter-category.is-collapsed .filter-arrow circle {
  fill: transparent;
  stroke: #B40015;
}

.filter-category.is-collapsed .filter-arrow path {
  stroke: #B40015;
}

/* Hover State overrides */
.filter-category-header:hover .filter-arrow circle {
  fill: #B40015;
  stroke: #B40015;
}

.filter-category-header:hover .filter-arrow path {
  stroke: #ffffff;
}

.filter-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-top: 1rem;
}

.filter-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
}

.filter-option input[type="checkbox"] {
  width: 20px;
  height: 20px;
  border: 2px solid #500617;
  border-radius: 4px;
  cursor: pointer;
}

.filter-option-label {
  font-family: 'Gelasio', serif;
  font-size: 16px;
  color: #500617;
}

/* Loading State */
.event-list-loading {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.7);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 100px;
  z-index: 10;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid #f3f3f3;
  border-top: 5px solid #B40015;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.event-listings-wrapper {
  position: relative;
  min-height: 200px;
}