/* ===== EVENT TICKETS SECTION ===== */
/* Interactive ticket-style cards with photo carousels */

.event-tickets-section {
  background: var(--map-surface-alt);
  position: relative;
  overflow-x: clip;
  overflow-y: visible;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  padding-left: 0;
  padding-right: 0;
}

/* Animated background system */
.event-tickets-section::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  
  /* Grayscale filter + low opacity for subtlety */
  filter: grayscale(100%) blur(2px);
  opacity: 0.4;
  
  /* Radial gradient mask - adjusted for full section coverage */
  -webkit-mask-image: radial-gradient(
    ellipse 70% 60% at center,
    rgba(0,0,0,0.05) 0%,
    rgba(0,0,0,0.15) 30%,
    rgba(0,0,0,0.5) 60%,
    rgba(0,0,0,0.85) 100%
  );
  mask-image: radial-gradient(
    ellipse 70% 60% at center,
    rgba(0,0,0,0.05) 0%,
    rgba(0,0,0,0.15) 30%,
    rgba(0,0,0,0.5) 60%,
    rgba(0,0,0,0.85) 100%
  );
  
  /* Smooth transitions when background changes */
  transition: opacity 0.8s ease-in-out, filter 0.8s ease-in-out;
}

/* Theme-aware blending */
:root[data-bs-theme="light"] .event-tickets-section::before {
  mix-blend-mode: multiply;
  opacity: 0.35;
}

:root[data-bs-theme="dark"] .event-tickets-section::before {
  mix-blend-mode: overlay;
  opacity: 0.45;
}

/* Background image variants (set via JS based on active ticket) */
.event-tickets-section.bg-world-of-concrete::before {
  background-image: url('../img/events/world-of-concrete/photo-1.jpg');
}

.event-tickets-section.bg-midyear-meeting::before {
  background-image: url('../img/events/generation-next/photo-1.jpg');
}

.event-tickets-section.bg-speed-dating::before {
  background-image: url('../img/events/speed-dating/photo-1.jpg');
}

.event-tickets-section.bg-golf-outing::before {
  background-image: url('../img/events/networking-2026/photo-1.jpg');
}

/* Ensure content stays above background */
.event-tickets-section .container {
  position: relative;
  z-index: 1;
}

.event-tickets-section .section-intro {
  position: relative;
  z-index: 1;
}

/* Reduced motion: disable background transitions */
@media (prefers-reduced-motion: reduce) {
  .event-tickets-section::before {
    transition: none !important;
    animation: none !important;
  }
}

/* Desktop: Horizontal carousel layout */
@media (min-width: 1200px) {
  .event-tickets-grid {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-top: 3rem;
    padding: 4rem 0;
    position: relative;
    min-height: 400px;
    width: 100%;
  }
}

/* Tablet & Mobile: Grid layout */
@media (max-width: 1199px) {
  .event-tickets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    padding: 0 1rem;
  }
}

/* Individual ticket card */
.event-ticket {
  position: relative;
  background: transparent;
  border-radius: 0;
  overflow: visible;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  cursor: pointer;
}

/* Tablet & Mobile: Vertical cards */
@media (max-width: 1199px) {
  .event-ticket {
    flex-direction: column;
    height: auto;
    min-height: 500px;
  }
}

/* Desktop: Horizontal cards */
@media (min-width: 1200px) {
  .event-ticket {
    flex-direction: row;
    width: 75%;
    max-width: 1100px;
    height: 420px;
    position: absolute;
    transform-origin: center center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  }
  
  /* Bezel cut on bottom-left corner */
  .event-ticket::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 0 40px 40px;
    border-color: transparent transparent var(--map-surface-alt) transparent;
    z-index: 20;
  }
}

/* Desktop: Carousel positioning */
@media (min-width: 1200px) {
  .event-ticket {
    position: absolute;
    width: 75%;
    max-width: 1100px;
    height: 380px;
    transform-origin: center center;
  }
  
  /* Active ticket - centered and focused */
  .event-ticket.ticket-active {
    filter: none;
    opacity: 1;
    transform: scale(1);
    z-index: 10;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    pointer-events: auto;
  }
  
  /* Position tickets edge-to-edge - FIXED POSITIONS */
  .event-ticket.ticket-left {
    left: 0;
    transform: translateX(-15%) scale(0.9);
    filter: blur(4px);
    opacity: 1; /* Keep opaque */
    pointer-events: none;
  }
  
  .event-ticket.ticket-center {
    left: 50%;
    transform: translateX(-50%) scale(1);
    opacity: 1;
  }
  
  .event-ticket.ticket-right {
    right: 0;
    transform: translateX(15%) scale(0.9);
    filter: blur(4px);
    opacity: 1; /* Keep opaque */
    pointer-events: none;
  }
  
  /* Far left/right (completely hidden in background) */
  .event-ticket.ticket-hidden-left {
    left: -100%;
    opacity: 0; /* Only fade when completely hidden */
    opacity: 0;
    transform: translateX(-50%) scale(0.8);
    pointer-events: none;
  }
  
  .event-ticket.ticket-hidden-right {
    right: -100%;
    opacity: 0; /* Only fade when completely hidden */
    transform: translateX(50%) scale(0.8);
    pointer-events: none;
  }
}

/* Tablet & Mobile: Grid layout (no carousel) */
@media (max-width: 1199px) {
  .event-ticket {
    position: relative;
    width: 100%;
    filter: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ===== BARCODE COLUMN (Left) ===== */
.ticket-barcode {
  background: #f5f5f5; /* Off-white/light gray */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  position: relative;
}

@media (max-width: 1199px) {
  .ticket-barcode {
    display: none; /* Hide on tablet and mobile */
  }
}

@media (min-width: 1200px) {
  .ticket-barcode {
    width: 80px;
    height: 100%;
  }
}

.ticket-barcode .barcode-image {
  width: 100%;
  height: auto;
  max-height: 300px;
  object-fit: contain;
}

/* ===== PHOTO CAROUSEL (Center) ===== */
.ticket-image-carousel {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  flex-direction: column;
}

/* Tablet & Mobile: Full width on top */
@media (max-width: 1199px) {
  .ticket-image-carousel {
    width: 100%;
    height: 250px;
  }
}

/* Desktop: Center section of horizontal ticket */
@media (min-width: 1200px) {
  .ticket-image-carousel {
    flex: 1;
    height: 100%;
    flex-shrink: 0;
    padding: 12px 8px; /* Top/bottom padding for title space, left/right to show barcode color */
  }
}

.ticket-carousel-slides {
  position: relative;
  width: 100%;
  flex: 1;
}

.ticket-carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.ticket-carousel-slide.active {
  opacity: 1;
}

/* Image within carousel slide */
.ticket-slide-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Carousel navigation - REMOVED (no indicator dots on photo carousels) */

/* Carousel arrows */
.ticket-carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease;
  z-index: 10;
}

.ticket-carousel-arrow:active {
  background: rgba(0, 0, 0, 0.7);
}

.ticket-carousel-arrow.prev {
  left: 12px;
}

.ticket-carousel-arrow.next {
  right: 12px;
}

/* Event title at bottom of carousel */
.ticket-carousel-title {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  z-index: 9;
}

.ticket-carousel-title h4 {
  font-family: var(--font-heading); /* Zuume */
  font-size: 1.75rem;
  font-weight: 700;
  color: white;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: center;
}

@media (max-width: 1199px) {
  .ticket-carousel-title h4 {
    font-size: 1.25rem;
  }
}

/* ===== TICKET CONTENT (Right) ===== */
.ticket-content {
  padding: 2rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  background: #fafafa; /* Off-white for details */
}

/* Desktop: Adjust content padding for horizontal layout */
@media (min-width: 1200px) {
  .ticket-content {
    padding: 2.5rem 2rem;
    width: 40%;
    min-width: 320px;
    height: 100%;
    overflow-y: hidden;
  }
}

/* Ticket header */
.ticket-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.25rem;
  gap: 1rem;
}

.ticket-title {
  font-family: var(--font-body);
  font-size: 1.5rem;
  font-weight: 600;
  color: #000 !important; /* Static dark text for all themes */
  margin: 0;
  line-height: 1.3;
}

/* Ticket meta info */
.ticket-meta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.ticket-meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: #333 !important; /* Static dark text for all themes */
}

.ticket-meta-item .material-icons {
  font-size: 18px;
  color: var(--map-color-brand);
}

/* Ticket description */
.ticket-description {
  font-size: 0.95rem;
  color: #333 !important; /* Static dark text for all themes */
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex: 1;
}

/* Ticket footer */
.ticket-footer {
  display: flex;
  gap: 0.75rem;
  margin-top: auto;
}

.ticket-btn {
  flex: 1;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.ticket-btn-primary {
  background: var(--map-color-brand);
  color: white;
}

.ticket-btn-primary:active {
  background: var(--map-red-700);
}

.ticket-btn-secondary {
  background: transparent;
  color: var(--map-text);
  border: 1px solid var(--map-text);
  opacity: 0.7;
}

.ticket-btn-secondary:active {
  opacity: 1;
  border-color: var(--map-color-brand);
  color: var(--map-color-brand);
}

/* Dark mode adjustments */
:root[data-bs-theme="dark"] .event-ticket {
  background: var(--map-surface-alt);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

:root[data-bs-theme="dark"] .event-ticket::before {
  border-color: transparent var(--map-surface) transparent transparent;
}

:root[data-bs-theme="dark"] .ticket-meta {
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

:root[data-bs-theme="dark"] .ticket-btn-secondary {
  border-color: rgba(255, 255, 255, 0.3);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .event-tickets-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .event-ticket {
    height: auto;
    min-height: 480px;
  }
  
  .ticket-image-carousel {
    height: 200px;
  }
  
  .ticket-footer {
    flex-direction: column;
  }
  
  .ticket-btn {
    width: 100%;
  }
}

/* Main carousel navigation arrows */
.tickets-carousel-nav {
  display: none; /* Hidden on tablet and mobile */
}

@media (min-width: 1200px) {
  .tickets-carousel-nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    position: relative;
    z-index: 100;
  }
  
  /* Caret navigation buttons */
  .tickets-nav-caret {
    background: transparent;
    color: var(--map-text);
    border: 2px solid var(--map-text);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
  }
  
  .tickets-nav-caret:active {
    background: var(--map-color-brand);
    color: white;
    border-color: var(--map-color-brand);
  }
  
  .tickets-nav-caret .material-icons {
    font-size: 28px;
  }
  
  /* Event buttons container */
  .tickets-event-buttons {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    flex: 1;
    max-width: 800px;
  }
  
  /* Individual event button */
  .tickets-event-btn {
    background: var(--map-surface);
    color: var(--map-text);
    border: 2px solid var(--map-text);
    padding: 10px 20px;
    border-radius: 4px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
  }
  
  .tickets-event-btn.active {
    background: var(--map-color-brand);
    color: white;
    border-color: var(--map-color-brand);
  }
  
  .tickets-event-btn:active {
    transform: translateY(1px);
  }
}

/* Carousel indicators (dots) */
.tickets-carousel-indicators {
  display: none; /* Hidden on tablet and mobile */
}

@media (min-width: 1200px) {
  .tickets-carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 2rem;
    position: relative;
    z-index: 20;
  }
  
  .tickets-indicator-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.2);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
  }
  
  .tickets-indicator-dot.active {
    background: var(--map-color-brand);
    width: 32px;
    border-radius: 6px;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .event-ticket,
  .ticket-carousel-slide,
  .ticket-carousel-dot,
  .ticket-carousel-arrow,
  .ticket-btn {
    transition: none !important;
  }
}
