/* Events Page Styles */

/* Professional Commercial Color Scheme */
:root {
  /* Primary Brand Colors - Deep Professional Blues */
  --primary-navy: #0f172a;        /* Slate 900 - Deep professional navy */
  --primary-dark: #1e293b;        /* Slate 800 - Rich dark blue */
  --primary-medium: #334155;      /* Slate 700 - Medium professional blue */
  --primary-light: #f8fafc;       /* Slate 50 - Clean light background */
  --primary-lighter: #f1f5f9;     /* Slate 100 - Subtle background */
  
  /* Secondary Brand Colors - Modern Teals & Professional Greens */
  --secondary-teal: #0d9488;      /* Teal 600 - Professional teal */
  --secondary-emerald: #059669;   /* Emerald 600 - Success green */
  --secondary-cyan: #0891b2;      /* Cyan 600 - Info blue */
  
  /* Accent Colors - Professional Orange/Amber for CTAs */
  --accent-primary: #dc2626;      /* Red 600 - Important actions */
  --accent-secondary: #ea580c;    /* Orange 600 - Secondary actions */
  --accent-tertiary: #d97706;     /* Amber 600 - Highlights */
  
  /* Modern Grays - Professional Neutrals */
  --gray-50: #f9fafb;            /* Ultra light background */
  --gray-100: #f3f4f6;          /* Light background */
  --gray-200: #e5e7eb;          /* Border light */
  --gray-300: #d1d5db;          /* Border medium */
  --gray-400: #9ca3af;          /* Text muted */
  --gray-500: #6b7280;          /* Text secondary */
  --gray-600: #4b5563;          /* Text medium */
  --gray-700: #374151;          /* Text primary */
  --gray-800: #1f2937;          /* Text dark */
  --gray-900: #111827;          /* Text darkest */
  
  /* Legacy Support - Map old variables to new ones */
  --accent-blue: var(--secondary-cyan);
  --accent-orange: var(--accent-secondary);
  --accent-green: var(--secondary-emerald);
  --text-dark: var(--gray-900);
  --text-medium: var(--gray-700);
  --text-light: var(--gray-500);
  --white: #ffffff;
  --border-light: var(--gray-100);
  --border-medium: var(--gray-200);
  
  /* Professional Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  
  /* Professional Gradients */
  --gradient-primary: linear-gradient(135deg, var(--primary-navy) 0%, var(--primary-medium) 100%);
  --gradient-secondary: linear-gradient(135deg, var(--secondary-teal) 0%, var(--secondary-cyan) 100%);
  --gradient-accent: linear-gradient(135deg, var(--accent-secondary) 0%, var(--accent-tertiary) 100%);
}

/* Header Section */
.events-header {
  background: var(--gradient-primary);
  color: white;
  padding: 60px 20px;
  text-align: center;
}

.events-header-content h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.events-header-content p {
  font-size: 1.2rem;
  opacity: 0.9;
  margin: 0;
}

/* Search Section */
.search-section {
  background: var(--white);
  padding: 15px 20px;
  box-shadow: var(--shadow-sm);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 64px; /* Position below the fixed header */
  z-index: 40; /* High z-index to stay above content but below header */
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

/* Enhanced shadow when sticky and scrolled */
.search-section.scrolled {
  box-shadow: var(--shadow-md);
  background: rgba(255, 255, 255, 0.95);
}

.search-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.search-bar {
  position: relative;
  flex: 1;
  max-width: 500px;
}

.search-bar .search-icon {
  position: absolute;
  left: 22px; /* Moved icon slightly more to the right */
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  font-size: 1.1rem;
  pointer-events: none; /* Prevent icon from blocking input clicks */
  z-index: 1; /* Ensure icon stays above input background */
}

#searchInput {
  width: 100%;
  padding: 12px 45px 12px 60px; /* Increased left padding even more for desktop */
  border: 2px solid rgba(30, 58, 138, 0.1);
  border-radius: 25px;
  font-size: 14px;
  outline: none;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(5px);
}

#searchInput:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  background: var(--white);
}

.filter-tabs {
  display: flex;
  gap: 0;
  background: rgba(30, 58, 138, 0.05);
  border-radius: 25px;
  padding: 4px;
  flex-shrink: 0;
  border: 1px solid rgba(30, 58, 138, 0.1);
}

.filter-tab {
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 20px;
  padding: 8px 14px;
  margin: 0;
  white-space: nowrap;
}

.filter-tab input {
  display: none;
}

.filter-tab span {
  font-weight: 500;
  color: var(--text-medium);
  font-size: 0.85rem;
}

.filter-tab.active {
  background: var(--gradient-primary);
  color: white;
}

.filter-tab.active span {
  color: white;
}

/* Events Grid - Fixed Layout */
.events-grid {
  background: var(--primary-light);
  padding: 40px 20px;
  min-height: 50vh;
}

.events-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

/* Event Card - Fixed Size with Banner */
.event-card {
  background: linear-gradient(145deg, var(--white) 0%, rgba(30, 58, 138, 0.02) 100%);
  border-radius: 16px;
  overflow: visible; /* Changed from hidden to visible to prevent badge cutoff */
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(30, 58, 138, 0.08);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  min-height: 480px; /* Changed to min-height to allow expansion */
  position: relative;
  backdrop-filter: blur(5px);
}

.event-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 50px rgba(30, 58, 138, 0.15), 0 10px 20px rgba(59, 130, 246, 0.1);
  background: linear-gradient(145deg, var(--white) 0%, rgba(30, 58, 138, 0.03) 100%);
  border-color: rgba(59, 130, 246, 0.2);
}

/* Event Banner in Card - Show and Style */
.events-container .event-card .event-banner {
  position: relative;
  width: 100%;
  height: 180px;
  overflow: visible; /* Changed to visible to prevent badge cutoff */
  border-radius: 12px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--accent-blue) 0%, var(--primary-dark) 100%);
}

.events-container .event-card .event-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.3s ease;
  border-radius: 12px; /* Move border radius to image instead */
}

.events-container .event-card .event-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1rem;
  border-radius: 12px; /* Apply border radius to placeholder too */
}

.events-container .event-card .event-placeholder i {
  font-size: 2.5rem;
  margin-bottom: 8px;
  opacity: 0.6;
}

/* Hover effect on banner image */
.events-container .event-card:hover .event-image {
  transform: scale(1.05);
}

/* Event Status Badge - Now positioned with more space */
.events-container .event-card .event-status-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 10px;
  border-radius: 16px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 4px;
  z-index: 20; /* Very high z-index */
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Event Status Badge Colors */
.events-container .event-card .event-status-badge.upcoming {
  background: linear-gradient(135deg, var(--accent-green), #059669);
  color: white;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.events-container .event-card .event-status-badge.ongoing {
  background: linear-gradient(135deg, var(--accent-orange), #dc2626);
  color: white;
  animation: pulse 2s infinite;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.events-container .event-card .event-status-badge.past {
  background: linear-gradient(135deg, var(--text-medium), #4b5563);
  color: white;
  box-shadow: 0 4px 12px rgba(107, 114, 128, 0.4);
}

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.7; }
  100% { opacity: 1; }
}

/* Event Content - With banner, adjusted layout */
.events-container .event-card .event-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  overflow: visible; /* Changed to visible to prevent content hiding */
}

.events-container .event-card .event-title {
  font-size: 1.25rem !important;
  font-weight: 700;
  color: var(--primary-dark) !important;
  margin: 0;
  line-height: 1.4 !important;
  margin-bottom: 12px;
  /* Ensure title is fully visible with proper line clamping */
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important; /* Limit to 2 lines */
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-height: 3.6rem !important; /* Properly calculated for 2 lines: 1.4 line-height × 2 lines + margin */
  word-wrap: break-word !important;
  overflow-wrap: break-word !important;
  hyphens: auto;
  background: linear-gradient(135deg, var(--primary-navy), var(--primary-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.events-container .event-card .event-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.events-container .event-card .event-detail {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-medium);
  line-height: 1.3;
  padding: 0; /* Remove background styling to make it plain text */
  background: none;
  border-radius: 0;
  margin-bottom: 0;
  transition: none;
  border: none;
}

.events-container .event-card .event-detail:hover {
  background: none;
  transform: none;
  border-color: transparent;
}

.events-container .event-card .event-detail i {
  color: var(--accent-blue);
  font-size: 1rem;
  width: 16px;
  text-align: center;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent-blue), var(--primary-navy));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.events-container .event-card .event-detail.price {
  background: none;
  border: none;
}

.events-container .event-card .event-detail.price .price-amount {
  font-weight: 700;
  color: var(--accent-green);
  font-size: 1rem;
  background: linear-gradient(135deg, var(--accent-green), #059669);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Add organizer detail style */
.events-container .event-card .event-detail.organizer {
  background: none;
  border: none;
  color: var(--accent-orange);
  font-style: italic;
}

.events-container .event-card .event-detail.organizer i {
  background: linear-gradient(135deg, var(--accent-orange), #d97706);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Hide description in event cards for cleaner layout */
.events-container .event-card .event-description {
  display: none;
}

/* Event Actions - Compact design for fixed card */
.events-container .event-card .event-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
  padding-top: 15px;
  border-top: 2px solid rgba(30, 58, 138, 0.08);
  flex-shrink: 0;
}

.events-container .event-card .btn {
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 1;
  text-align: center;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
  border: none;
}

.events-container .event-card .btn-outline {
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.05), rgba(59, 130, 246, 0.03));
  color: var(--primary-navy);
  border: 2px solid rgba(30, 58, 138, 0.15);
}

.events-container .event-card .btn-outline:hover {
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.1), rgba(59, 130, 246, 0.08));
  color: var(--primary-dark);
  border-color: rgba(59, 130, 246, 0.3);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.events-container .event-card .btn-primary {
  background: var(--gradient-primary);
  color: white;
  border: 2px solid var(--primary-navy);
  box-shadow: 0 4px 15px rgba(30, 58, 138, 0.3);
}

.events-container .event-card .btn-primary:hover {
  background: linear-gradient(135deg, var(--accent-blue), var(--primary-navy));
  border-color: var(--accent-blue);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.events-container .event-card .btn-disabled {
  background: linear-gradient(135deg, rgba(107, 114, 128, 0.1), rgba(156, 163, 175, 0.08));
  color: var(--text-light);
  cursor: not-allowed;
  border: 2px solid rgba(107, 114, 128, 0.2);
  opacity: 0.7;
}

.events-container .event-card .btn i {
  font-size: 0.85rem;
}

/* No Events State */
.no-events {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-medium);
  background: rgba(255, 255, 255, 0.6);
  border-radius: 16px;
  border: 2px solid rgba(30, 58, 138, 0.08);
}

.no-events i {
  font-size: 4rem;
  color: var(--primary-navy);
  opacity: 0.3;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--primary-navy), var(--accent-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.no-events h3 {
  font-size: 1.5rem;
  color: var(--primary-dark);
  margin-bottom: 10px;
}

.no-events p {
  color: var(--text-medium);
}

/* Pagination */
.pagination-wrapper {
  margin-top: 40px;
  display: flex;
  justify-content: center;
}

/* Responsive Design */
@media (max-width: 768px) {
  .events-header {
    padding: 35px 20px;
  }
  
  .events-header-content h1 {
    font-size: 2rem;
  }
  
  .events-header-content p {
    font-size: 1rem;
  }
  
  .search-section {
    padding: 15px 20px;
    position: sticky;
    top: 64px; /* Same sticky position for tablet */
    z-index: 40;
  }
  
  .search-container {
    flex-direction: column;
    gap: 15px;
    align-items: stretch;
  }
  
  .search-bar {
    max-width: 100%;
  }
  
  .filter-tabs {
    justify-content: center;
    width: 100%;
    flex-wrap: wrap;
  }
  
  .filter-tab {
    flex: 1;
    min-width: 80px;
    padding: 8px 10px;
  }
  
  .filter-tab span {
    font-size: 0.8rem;
  }
  
  .events-container {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .events-container .event-card {
    height: 450px; /* Slightly smaller on tablet */
    padding: 0; /* Remove padding since banner takes full width */
  }
  
  .events-container .event-card .event-banner {
    height: 160px; /* Smaller banner on tablet */
    border-radius: 12px; /* Keep border radius on all sides */
    margin-bottom: 0;
  }
  
  .events-container .event-card .event-image {
    border-radius: 12px;
  }
  
  .events-container .event-card .event-status-badge {
    top: 10px;
    right: 10px;
    padding: 5px 8px;
    font-size: 0.7rem;
    border-radius: 14px;
  }
  
  .events-container .event-card .event-content {
    padding: 15px 20px 20px; /* Add back padding to content only */
  }

  .events-container .event-card .event-title {
    font-size: 1.1rem !important;
    line-height: 1.4 !important;
    max-height: 3.2rem !important; /* 2 lines for tablet: 1.4 × 2 + margin */
    -webkit-line-clamp: 2 !important;
  }

  .events-container .event-card .event-content {
    gap: 10px;
  }

  .events-container .event-card .event-actions {
    flex-direction: column;
    gap: 8px;
  }

  .events-container .event-card .btn {
    padding: 10px 12px;
    font-size: 0.85rem;
  }
}

@media (max-width: 576px) {
  .events-header {
    padding: 25px 15px;
  }
  
  .events-header-content h1 {
    font-size: 1.6rem;
    line-height: 1.3;
  }
  
  .events-header-content p {
    font-size: 0.95rem;
  }
  
  .search-section {
    padding: 15px;
    position: sticky;
    top: 64px; /* Same sticky position for mobile */
    z-index: 40;
  }
  
  .search-bar input {
    padding: 10px 10px 10px 40px; /* Increased left padding for mobile */
    border-radius: 20px;
    border: 2px solid rgba(30, 58, 138, 0.1);
    background: rgba(255, 255, 255, 0.95);
  }
  
  .search-bar input:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  }
  
  .search-bar .search-icon {
    left: 15px; /* Adjusted icon position for mobile */
    font-size: 1rem;
    pointer-events: none; /* Prevent icon from blocking input clicks */
  }
  
  .filter-tabs {
    padding: 3px;
    flex-wrap: wrap;
  }
  
  .filter-tab {
    padding: 6px 8px;
    min-width: 70px;
  }
  
  .filter-tab span {
    font-size: 0.75rem;
  }
  
  .events-grid {
    padding: 25px 15px;
  }

  .events-container .event-card {
    height: 420px; /* Smaller on mobile */
  }

  .events-container .event-card .event-banner {
    height: 140px; /* Smaller banner on mobile */
  }

  .events-container .event-card .event-image {
    border-radius: 12px;
  }

  .events-container .event-card .event-status-badge {
    top: 8px;
    right: 8px;
    padding: 4px 7px;
    font-size: 0.68rem;
    border-radius: 12px;
    gap: 3px;
  }

  .events-container .event-card .event-content {
    padding: 12px 15px 15px;
    gap: 8px;
  }

  .events-container .event-card .event-title {
    font-size: 0.95rem !important;
    line-height: 1.4 !important;
    margin-bottom: 8px;
    max-height: 2.8rem !important; /* 2 lines for mobile: 1.4 × 2 */
    -webkit-line-clamp: 2 !important;
  }

  .events-container .event-card .event-detail {
    font-size: 0.8rem;
  }

  .events-container .event-card .event-detail i {
    font-size: 0.9rem;
  }

  .events-container .event-card .btn {
    padding: 8px 12px;
    font-size: 0.85rem;
  }
}

/* Focus states for accessibility */
#searchInput:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.filter-tab:focus-within {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

.btn:focus {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

/* Smooth transitions */
.event-card {
  animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Loading state */
.events-loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px;
  color: var(--text-light);
}

.events-loading i {
  font-size: 2rem;
  margin-bottom: 10px;
  animation: spin 2s linear infinite;
}

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

/* Hidden state for filtered cards */
.event-card.hidden {
  display: none;
}

/* No results message */
.no-results-message {
  grid-column: 1 / -1;
}

/* ========================================
   EVENT DETAILS PAGE STYLES
======================================== */

/* Main container for event details */
.event-details-container {
  max-width: 1200px;
  margin: 0 auto;
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.1);
  margin-top: 20px;
  margin-bottom: 40px;
}

/* Event Banner Section */
.event-banner {
  position: relative;
  height: 400px;
  background: linear-gradient(135deg, var(--accent-blue) 0%, var(--primary-dark) 100%);
  overflow: hidden;
}

.banner-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.banner-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.2rem;
}

.banner-placeholder i {
  font-size: 4rem;
  margin-bottom: 10px;
  opacity: 0.6;
}

.banner-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.3) 0%,
    rgba(0, 0, 0, 0.6) 100%
  );
}

.banner-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px;
  color: white;
  z-index: 10;
}

.event-badge {
  margin-bottom: 15px;
}

.event-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 25px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.status-upcoming {
  background: rgba(34, 197, 94, 0.9);
  color: white;
}

.status-ongoing {
  background: rgba(239, 68, 68, 0.9);
  color: white;
  animation: pulse 2s infinite;
}

.status-past {
  background: rgba(107, 114, 128, 0.9);
  color: white;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.event-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0 0 20px 0;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  line-height: 1.2;
}

.event-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.15);
  padding: 10px 16px;
  border-radius: 12px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.9rem;
}

.meta-item i {
  font-size: 1.1rem;
  opacity: 0.9;
}

/* Event Content Section */
.event-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
  padding: 40px;
  background: #f8fafc;
}

.event-info {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.info-section {
  background: white;
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--border-light);
}

.info-section h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #2c3e50;
  margin: 0 0 20px 0;
  padding-bottom: 15px;
  border-bottom: 2px solid #f1f5f9;
}

.event-description {
  line-height: 1.7;
  color: #4a5568;
  font-size: 1rem;
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 15px;
  background: #f8fafc;
  border-radius: 12px;
  border-left: 4px solid var(--accent-blue);
}

.detail-item strong {
  color: #2c3e50;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-item span {
  color: #4a5568;
  font-size: 1rem;
}

.category-tag {
  background: linear-gradient(135deg, var(--accent-blue), var(--primary-dark));
  color: white !important;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-block;
}

/* Purchase Card */
.purchase-card {
  background: white;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  padding: 30px;
  position: sticky;
  top: 20px;
  height: fit-content;
  border: 1px solid var(--border-light);
}

.purchase-header {
  text-align: center;
  margin-bottom: 25px;
  padding-bottom: 20px;
  border-bottom: 2px solid #f1f5f9;
}

.purchase-header h3 {
  font-size: 1.4rem;
  font-weight: 600;
  color: #2c3e50;
  margin: 0 0 15px 0;
}

.price-display {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
}

.price {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--accent-blue);
}

.price.free {
  color: #22c55e;
  font-size: 1.8rem;
}

.price-label {
  color: #6b7280;
  font-size: 0.9rem;
}

/* Past Event Notice */
.past-event-notice {
  text-align: center;
  padding: 30px 20px;
  background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
  border-radius: 16px;
  border: 2px solid #d1d5db;
}

.notice-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 20px;
  background: #9ca3af;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notice-icon i {
  font-size: 1.8rem;
  color: white;
}

.notice-content h4 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #374151;
  margin: 0 0 10px 0;
}

.notice-content p {
  color: #6b7280;
  margin: 0;
  line-height: 1.6;
}

/* Purchase Form */
.purchase-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form-group label {
  font-weight: 600;
  color: #374151;
  font-size: 0.9rem;
}

.quantity-selector {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  background: #f8fafc;
  padding: 15px;
  border-radius: 12px;
  border: 2px solid var(--border-light);
}

.qty-btn {
  width: 40px;
  height: 40px;
  border: 2px solid var(--accent-blue);
  background: white;
  color: var(--accent-blue);
  border-radius: 50%;
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qty-btn:hover {
  background: var(--accent-blue);
  color: white;
  transform: scale(1.05);
}

.qty-btn:active {
  transform: scale(0.95);
}

#quantity {
  width: 60px;
  height: 40px;
  text-align: center;
  border: 2px solid var(--border-light);
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  color: #2c3e50;
  background: white;
}

/* Total Section */
.total-section {
  background: #f8fafc;
  padding: 20px;
  border-radius: 12px;
  border: 2px solid var(--border-light);
}

.total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  color: #4a5568;
}

.total-final {
  border-top: 2px solid var(--border-light);
  margin-top: 10px;
  padding-top: 15px;
  font-size: 1.1rem;
}

.total-final strong {
  color: #2c3e50;
}

/* Auth Notice */
.auth-notice {
  background: #fef3c7;
  border: 2px solid #f59e0b;
  border-radius: 12px;
  padding: 15px;
  text-align: center;
}

.auth-notice p {
  margin: 0;
  color: #92400e;
  font-size: 0.9rem;
}

.auth-link {
  color: #d97706;
  font-weight: 600;
  text-decoration: none;
}

.auth-link:hover {
  text-decoration: underline;
}

/* Purchase Button */
.btn-purchase {
  background: linear-gradient(135deg, var(--accent-blue), var(--primary-dark));
  color: white;
  border: none;
  padding: 16px 24px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-purchase:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
}

.btn-purchase:active {
  transform: translateY(0);
}

.btn-purchase i {
  font-size: 1.1rem;
}

/* Event Stats */
.event-stats {
  margin-top: 25px;
  padding-top: 20px;
  border-top: 2px solid #f1f5f9;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  color: #6b7280;
  font-size: 0.9rem;
}

.stat-item i {
  color: var(--accent-blue);
  font-size: 1rem;
  width: 20px;
  text-align: center;
}

/* Mobile Responsiveness for Details Page */
@media (max-width: 768px) {
  .event-details-container {
    margin: 10px;
    border-radius: 16px;
  }

  .event-banner {
    height: 280px;
  }

  .banner-content {
    padding: 20px;
  }

  .event-title {
    font-size: 1.8rem;
  }

  .event-meta {
    flex-direction: column;
    gap: 12px;
  }

  .meta-item {
    width: 100%;
    justify-content: center;
  }

  .event-content {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 20px;
  }

  .info-section {
    padding: 20px;
  }

  .details-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .purchase-card {
    position: static;
    margin-top: 20px;
  }

  .quantity-selector {
    padding: 12px;
  }

  .qty-btn {
    width: 35px;
    height: 35px;
    font-size: 1rem;
  }

  #quantity {
    width: 50px;
    height: 35px;
  }
}

@media (max-width: 480px) {
  .event-title {
    font-size: 1.5rem;
  }

  .purchase-header h3 {
    font-size: 1.2rem;
  }

  .price {
    font-size: 1.8rem;
  }

  .event-content {
    padding: 15px;
  }

  .info-section {
    padding: 15px;
  }

  .purchase-card {
    padding: 20px;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .event-details-container {
    background: #1f2937;
    border: 1px solid #374151;
  }

  .info-section {
    background: #111827;
    border-color: #374151;
  }

  .info-section h2 {
    color: #f9fafb;
    border-bottom-color: #374151;
  }

  .event-description {
    color: #d1d5db;
  }

  .detail-item {
    background: #1f2937;
    border-left-color: var(--accent-blue);
  }

  .detail-item strong {
    color: #f9fafb;
  }

  .detail-item span {
    color: #d1d5db;
  }

  .purchase-card {
    background: #111827;
    border-color: #374151;
  }

  .purchase-header h3 {
    color: #f9fafb;
  }

  .total-section {
    background: #1f2937;
    border-color: #374151;
  }

  .total-row {
    color: #d1d5db;
  }

  .total-final strong {
    color: #f9fafb;
  }

  .quantity-selector {
    background: #1f2937;
    border-color: #374151;
  }

  #quantity {
    background: #111827;
    border-color: #374151;
    color: #f9fafb;
  }

  .stat-item {
    color: #9ca3af;
  }

  .past-event-notice {
    background: linear-gradient(135deg, #374151, #4b5563);
    border-color: #6b7280;
  }

  .notice-content h4 {
    color: #f9fafb;
  }

  .notice-content p {
    color: #d1d5db;
  }
}

/* Animations and transitions */
.event-details-container {
  animation: slideInUp 0.6s ease-out;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.info-section {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.info-section:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.purchase-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.purchase-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
}

/* Enhanced badge styles */
.event-badge {
  animation: fadeInDown 0.8s ease-out 0.2s both;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Meta items stagger animation */
.meta-item:nth-child(1) { animation: fadeInUp 0.8s ease-out 0.3s both; }
.meta-item:nth-child(2) { animation: fadeInUp 0.8s ease-out 0.4s both; }
.meta-item:nth-child(3) { animation: fadeInUp 0.8s ease-out 0.5s both; }

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Special styling for free events */
.price.free {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Loading states */
.banner-image {
  transition: opacity 0.3s ease;
}

.banner-image:not([src]) {
  opacity: 0;
}

/* Focus states for accessibility */
.qty-btn:focus,
#quantity:focus,
.btn-purchase:focus {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

/* Print styles */
@media print {
  .purchase-card {
    display: none;
  }
  
  .event-banner {
    height: 200px;
  }
  
  .banner-overlay {
    display: none;
  }
}

/* Event Status Indicators */
.event-detail.status {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.event-detail.status.sold-out {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  color: white;
}

.event-detail.status.limited {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
}

/* Price note for multiple ticket types */
.price-note {
  display: block;
  font-size: 0.75rem;
  opacity: 0.7;
  margin-top: 2px;
}

/* Disabled button styles */
.btn-disabled {
  background: #6b7280;
  color: white;
  cursor: not-allowed;
  opacity: 0.6;
}

.btn-disabled:hover {
  background: #6b7280;
  transform: none;
}

/* Enhanced event card layouts for new features */
.event-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.event-meta .event-detail {
  flex-shrink: 0;
}

/* Ticket Types Section */
.ticket-types-section {
  margin-top: 20px;
}

.ticket-types-section h4 {
  margin-bottom: 16px;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
}

.ticket-type-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 12px;
  background: white;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.ticket-type-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
  transition: left 0.6s ease;
}

.ticket-type-card:hover {
  border-color: var(--accent-blue);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.15);
  transform: translateY(-2px);
}

.ticket-type-card:hover::before {
  left: 100%;
}

.ticket-type-card.sold-out {
  opacity: 0.6;
  background: #f9fafb;
}

.ticket-type-card.sold-out:hover {
  transform: none;
  box-shadow: none;
}

.ticket-type-info {
  flex: 1;
}

.ticket-type-info h5 {
  margin: 0 0 4px 0;
  font-weight: 600;
  color: var(--text);
}

.ticket-type-description {
  margin: 4px 0 8px 0;
  font-size: 0.875rem;
  color: var(--text-light);
}

.ticket-type-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent-blue);
  margin-bottom: 4px;
}

.ticket-type-availability {
  font-size: 0.75rem;
  color: var(--text-light);
}

.ticket-type-card .btn {
  margin-left: 16px;
  white-space: nowrap;
  min-width: 100px;
  position: relative;
  z-index: 1;
}

.ticket-type-card .btn-primary {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: white;
  border: 2px solid transparent;
  padding: 10px 20px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.ticket-type-card .btn-primary:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
  border-color: #1d4ed8;
}

.ticket-type-card .btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.ticket-type-card .btn-primary i {
  margin-right: 6px;
  transition: transform 0.3s ease;
}

.ticket-type-card .btn-primary:hover i {
  transform: scale(1.1);
}

.ticket-type-card .btn-disabled {
  background: #f3f4f6;
  color: #9ca3af;
  border: 2px solid #e5e7eb;
  cursor: not-allowed;
  padding: 10px 20px;
  font-weight: 600;
}

.ticket-type-card .btn-disabled:hover {
  background: #f3f4f6;
  color: #9ca3af;
  transform: none;
  box-shadow: none;
}

/* Loading state for ticket selection buttons */
.ticket-type-card .btn-primary.loading {
  background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
  cursor: not-allowed;
  transform: none;
}

.ticket-type-card .btn-primary.loading:hover {
  background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
  transform: none;
  box-shadow: 0 4px 15px rgba(107, 114, 128, 0.3);
}

.btn-loading i {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Enhanced ticket type price styling */
.ticket-type-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent-blue);
  margin-bottom: 4px;
  text-shadow: 0 1px 2px rgba(59, 130, 246, 0.1);
}

/* Pulse animation for available tickets */
.ticket-type-availability {
  font-size: 0.75rem;
  color: var(--text-light);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}
