/* Subtly animated hero section */
.hero-section {
  padding: 4rem 0 2rem 0;
  position: relative;
  overflow: hidden;
}

@media (max-width: 768px) {
  .hero-section {
    padding: 2.5rem 0 1.5rem 0;
  }
}

/* hero title with a little apple style gradient */
.hero-title {
  font-weight: 700;
  font-size: 3.5rem;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, var(--hero-gradient-start) 0%, var(--hero-gradient-end) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }
}

/* Background soft decorative gradient */
.hero-glow::after {
  content: "";
  position: absolute;
  display: inline-block;
  top: 2vh;
  right: 60vw;
  width: 33vw;
  height: 33vw;
  background: radial-gradient(circle at 50% 50%, rgba(161, 108, 235, 0.15) 0%, transparent 60%);
  border-radius: 50%;
  z-index: -1;
}

/* Event Cards (Extended Bootstrap Card) */
.event-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(clamp(260px, 28vw, 380px), 1fr));
  gap: 1.5rem;
}

.event-item {
  min-width: 0;
  /* Prevents grid blowout */
}

.event-card {
  transition:
    transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1),
    border-color 0.25s ease,
    box-shadow 0.25s ease;
  height: 100%;
}

.event-card:hover {
  transform: translate3d(0, -5px, 0);
  border-color: var(--status-color);
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.3),
    0 0 15px rgba(var(--bs-primary-rgb), 0.1);
}

/* Status-specific accents */
.event-item.status-open {
  --status-color: var(--bs-success);
}

.event-item.status-soldout {
  --status-color: var(--bs-primary);
}

.event-item.status-inactive {
  --status-color: var(--bs-secondary-color);
}

.event-item.status-cancelled {
  --status-color: var(--bs-danger);
}

.event-item.status-owned {
  --status-color: var(--bs-secondary);
}

/* format the event cards image */
.event-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  background-color: var(--bs-secondary-bg);
}

/* Strike-through for events that arnt open */
.event-item:not(.status-open) .card-body .d-flex span:first-child {
  text-decoration: line-through;
  opacity: 0.6;
}

/* Floating status badges inside image */
.status-badge {
  position: absolute;
  top: 1rem;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
  z-index: 10;
}

/* Left align default badges  */
.status-badge.normal {
  left: 1rem;
}

/* Right align owner badges */
.status-badge.owner {
  right: 1rem;
}

/* Custom Filter Bar */
.filter-bar {
  background-color: var(--bs-secondary-bg);
  border-radius: 28px;
  padding: 1.25rem 1.75rem;
  border: 1px solid var(--bs-border-color);
  margin-bottom: 3rem;
}

.filter-bar h6 {
  font-size: 1.15rem;
}

.search-filter-container {
  position: relative;
  width: 200px;
  transition: width 0.25s ease-in-out;
}

.search-filter-container:focus-within {
  width: 270px;
}

.search-filter-container input {
  height: 38px;
  font-size: 1.02rem;
  background-color: var(--bs-body-bg);
}

.search-filter-container input:focus {
  background-color: var(--bs-body-bg);
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.15);
}

.filter-bar .form-check-input {
  width: 2.4em;
  height: 1.2em;
  cursor: pointer;
}

.filter-bar .form-check-label {
  font-size: 1.05rem !important;
  line-height: 1.2;
  cursor: pointer;
}

.event-item.search-hidden {
  display: none !important;
}

#noEventsClient {
  grid-column: 1 / -1;
}

@media (max-width: 768px) {
  .filter-bar {
    border-radius: 14px;
    padding: 1.25rem;
    margin-bottom: 2rem;
  }

  .search-filter-container {
    width: 100%;
  }

  .search-filter-container:focus-within {
    width: 100%;
  }
}

/* Image filter for inactive - grayscale and darken*/
.grayscale {
  filter: grayscale(95%) brightness(50%);
}

/* Image filter for cancelled - Sepia, left shift to red, dull and then blur*/
.red-filter {
  filter: sepia(100%) hue-rotate(-55deg) brightness(50%) blur(1px) saturate(180%);
}

/* --- Category logic for filtering (Served dynamically via /dynamic_filter.css endpoint) --- */

/* Hide non-open items with the open only button */
body:has(#filterOpen:checked) .event-item:not(.status-open) {
  display: none;
}

/* Display selected category pills */
.category-pill {
  cursor: pointer;
  font-size: 1.02rem;
  font-weight: 600;
  background-color: rgba(var(--bs-primary-rgb), 0.1);
  color: var(--bs-primary);
  border: 2px solid rgba(var(--bs-primary-rgb), 0.5);
  transition: all 0.25s ease-in-out;
  padding: 0.35rem 1rem;
}

/* Hover effect for pills */
.category-pill:hover {
  background-color: rgba(165, 29, 43, 0.15);
  color: rgba(244, 190, 195, 1);
  border-color: rgba(165, 29, 43, 1);
}

/* Premium floating animation */
.animate-float {
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  0% {
    transform: translateY(0px) rotate(0deg);
  }

  50% {
    transform: translateY(-10px) rotate(3deg);
  }

  100% {
    transform: translateY(0px) rotate(0deg);
  }
}
