/**
 * Events Page - TicketHub Style for Ecolife Theme
 *
 * Theme override for eventsmanager module
 * Styled to match TicketHub event website design
 *
 * @author    Custom Development
 * @date      2025-12-12
 */

/* ==========================================================================
   CSS Variables - TicketHub Style Colors
   ========================================================================== */
:root {
  --th-primary: #d32f2f;
  --th-primary-dark: #b71c1c;
  --th-dark: #1a1a1a;
  --th-text: #333;
  --th-text-light: #666;
  --th-border: #e0e0e0;
  --th-bg-light: #f5f5f5;
  --th-white: #fff;
}

/* ==========================================================================
   Events Page Container
   ========================================================================== */
.events-page.tickethub-style {
  padding: 0;
  margin: 0 -15px;
}

/* ==========================================================================
   HERO SLIDER SECTION
   ========================================================================== */
.events-hero-section {
  margin-bottom: 3rem;
}

.events-hero-section .carousel {
  border-radius: 0;
}

.events-hero-section .carousel-inner {
  padding: 0;
  list-style: none;
}

.events-hero-section .carousel-item {
  list-style: none;
}

.hero-slide {
  position: relative;
  height: 500px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 60%, rgba(0,0,0,0.2) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 2rem 4rem;
  max-width: 600px;
  color: var(--th-white);
}

.hero-label {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  margin-bottom: 0.5rem;
}

.hero-date-badge {
  display: inline-block;
  background: var(--th-white);
  color: var(--th-dark);
  padding: 0.5rem 1rem;
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: 3px;
  margin-bottom: 1rem;
}

.hero-category {
  display: inline-block;
  color: var(--th-primary);
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
  padding-left: 10px;
  border-left: 3px solid var(--th-primary);
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero-description {
  font-size: 1rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.85);
  margin-bottom: 1.5rem;
}

.hero-meta {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
}

.hero-meta span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hero-meta .material-icons {
  font-size: 1.125rem;
  opacity: 0.8;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
}

.hero-buttons .btn-primary {
  background: var(--th-primary);
  border-color: var(--th-primary);
  padding: 0.75rem 2rem;
  font-weight: 600;
}

.hero-buttons .btn-primary:hover {
  background: var(--th-primary-dark);
  border-color: var(--th-primary-dark);
}

.hero-buttons .btn-outline-light {
  border: 2px solid var(--th-white);
  padding: 0.75rem 2rem;
  font-weight: 600;
}

.hero-buttons .btn-outline-light:hover {
  background: var(--th-white);
  color: var(--th-dark);
}

/* Hero Carousel Controls */
.events-hero-section .carousel-indicators {
  bottom: 20px;
}

.events-hero-section .carousel-indicators li {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  border: none;
  margin: 0 5px;
}

.events-hero-section .carousel-indicators li.active {
  background: var(--th-white);
}

.events-hero-section .direction {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 1rem;
  pointer-events: none;
}

.events-hero-section .carousel-control {
  pointer-events: auto;
  width: 50px;
  height: 50px;
  background: var(--th-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: all 0.3s ease;
}

.events-hero-section .carousel-control:hover {
  background: var(--th-primary);
}

.events-hero-section .carousel-control:hover .material-icons {
  color: var(--th-white);
}

.events-hero-section .carousel-control .material-icons {
  color: var(--th-dark);
  font-size: 1.5rem;
}

/* ==========================================================================
   SECTIONS - Common Styles
   ========================================================================== */
.events-section {
  padding: 2rem 15px;
  margin-bottom: 2rem;
}

/* Section Card Wrapper */
.events-section.popular-events-section,
.events-section.upcoming-events-section,
.events-section.categories-section {
  background: var(--th-white);
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  padding: 2rem;
  margin: 0 15px 2rem;
}

.section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--th-border);
}

.section-label {
  display: none;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--th-dark);
  margin: 0;
}

.section-title .highlight {
  color: var(--th-primary);
  font-weight: 700;
}

.see-all-btn {
  padding: 0.5rem 1.25rem;
  font-weight: 600;
  border-width: 2px;
  font-size: 0.875rem;
}

/* ==========================================================================
   CATEGORY TABS
   ========================================================================== */
.events-category-tabs {
  flex: 1;
  display: flex;
  justify-content: flex-start;
  margin-left: 2rem;
}

.events-category-tabs .nav-tabs {
  border: none;
  gap: 0.5rem;
}

.events-category-tabs .nav-item {
  margin: 0;
}

.events-category-tabs .nav-link {
  padding: 0.5rem 1rem;
  border: 1px solid var(--th-border);
  border-radius: 20px;
  color: var(--th-text);
  font-size: 0.875rem;
  background: var(--th-white);
  transition: all 0.2s ease;
}

.events-category-tabs .nav-link:hover {
  border-color: var(--th-primary);
  color: var(--th-primary);
}

.events-category-tabs .nav-link.active {
  background: var(--th-primary);
  border-color: var(--th-primary);
  color: var(--th-white);
}

/* ==========================================================================
   EVENT CARDS - TicketHub Style
   ========================================================================== */
.events-grid {
  margin: 0 -10px;
}

.events-grid > [class*="col-"] {
  padding: 0 10px;
  margin-bottom: 20px;
}

.event-card.tickethub-card {
  background: var(--th-white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.event-card.tickethub-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* Card Image */
.event-card-img {
  position: relative;
  overflow: hidden;
}

.event-card-img img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.event-card.tickethub-card:hover .event-card-img img {
  transform: scale(1.05);
}

.event-card-img .event-date-badge {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: var(--th-white);
  color: var(--th-dark);
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 3px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Card Body */
.event-card-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.event-card-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  line-height: 1.3;
}

.event-card-title a {
  color: var(--th-dark);
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.event-card-title a:hover {
  color: var(--th-primary);
}

/* Card Meta */
.event-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  font-size: 0.75rem;
  color: var(--th-text-light);
}

.event-card-meta span {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.event-card-meta .material-icons {
  font-size: 0.875rem;
}

/* Card Description */
.event-card-desc {
  font-size: 0.8125rem;
  color: var(--th-text-light);
  line-height: 1.5;
  margin-bottom: 1rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Card Footer */
.event-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.75rem;
  border-top: 1px solid var(--th-border);
  margin-top: auto;
}

.event-price {
  font-size: 0.75rem;
  color: var(--th-text-light);
}

.event-price .price-value {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: var(--th-dark);
}

.event-card-footer .btn-dark {
  background: var(--th-dark);
  border-color: var(--th-dark);
  color: var(--th-white);
  padding: 0.375rem 1rem;
  font-size: 0.75rem;
  font-weight: 600;
}

.event-card-footer .btn-dark:hover {
  background: var(--th-primary);
  border-color: var(--th-primary);
  color: var(--th-white);
}

/* ==========================================================================
   CATEGORIES GRID
   ========================================================================== */
.categories-grid {
  margin: 0 -7.5px;
}

.categories-grid > [class*="col-"] {
  padding: 0 7.5px;
  margin-bottom: 15px;
}

.category-card {
  display: block;
  position: relative;
  height: 200px;
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  text-decoration: none;
}

/* Different gradient colors for variety */
.categories-grid > div:nth-child(1) .category-card {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}
.categories-grid > div:nth-child(2) .category-card {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}
.categories-grid > div:nth-child(3) .category-card {
  background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}
.categories-grid > div:nth-child(4) .category-card {
  background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}
.categories-grid > div:nth-child(5) .category-card {
  background: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%);
}
.categories-grid > div:nth-child(6) .category-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.category-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.3);
  transition: background 0.3s ease;
}

.category-card:hover .category-overlay {
  background: rgba(0,0,0,0.5);
}

.category-content {
  position: absolute;
  bottom: 20px;
  left: 20px;
  color: var(--th-white);
}

.category-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
}

.category-count {
  font-size: 0.875rem;
  opacity: 0.9;
}

/* ==========================================================================
   CALENDAR CTA SECTION
   ========================================================================== */
.calendar-cta-section {
  background: var(--th-white);
}

.calendar-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding: 2rem;
  background: var(--th-bg-light);
  border-radius: 8px;
  text-align: center;
}

.calendar-cta > .material-icons {
  font-size: 3rem;
  color: var(--th-primary);
}

.calendar-cta .cta-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--th-dark);
  margin: 0 0 0.25rem;
}

.calendar-cta .cta-content p {
  color: var(--th-text-light);
  margin: 0;
  font-size: 0.875rem;
}

.calendar-cta .btn-primary {
  background: var(--th-primary);
  border-color: var(--th-primary);
  padding: 0.75rem 2rem;
  font-weight: 600;
}

.calendar-cta .btn-primary:hover {
  background: var(--th-primary-dark);
  border-color: var(--th-primary-dark);
}

/* ==========================================================================
   PAGINATION
   ========================================================================== */
.events-pagination {
  padding: 2rem 15px;
  text-align: center;
}

.events-pagination ul.pagination {
  justify-content: center;
}

/* ==========================================================================
   EMPTY STATE
   ========================================================================== */
.events-empty {
  text-align: center;
  padding: 6rem 2rem;
  background: var(--th-bg-light);
  border-radius: 8px;
  margin: 2rem 15px;
}

.events-empty .material-icons {
  font-size: 5rem;
  color: #ccc;
  margin-bottom: 1.5rem;
}

.events-empty h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--th-dark);
  margin: 0 0 0.5rem;
}

.events-empty p {
  color: var(--th-text-light);
  margin: 0 0 1.5rem;
}

.events-empty .btn-primary {
  background: var(--th-primary);
  border-color: var(--th-primary);
}

/* ==========================================================================
   RESPONSIVE ADJUSTMENTS
   ========================================================================== */
@media (max-width: 991px) {
  .hero-slide {
    height: 450px;
  }

  .hero-content {
    padding: 2rem;
    max-width: 500px;
  }

  .hero-title {
    font-size: 2rem;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .events-category-tabs {
    margin-left: 0;
    width: 100%;
    overflow-x: auto;
  }

  .events-category-tabs .nav-tabs {
    flex-wrap: nowrap;
  }

  .see-all-btn {
    margin-top: 0.5rem;
  }
}

@media (max-width: 767px) {
  .hero-slide {
    height: 400px;
  }

  .hero-content {
    padding: 1.5rem;
  }

  .hero-title {
    font-size: 1.5rem;
  }

  .hero-description {
    display: none;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .hero-buttons .btn {
    width: 100%;
    text-align: center;
  }

  .events-hero-section .direction {
    display: none;
  }

  .events-section {
    padding: 2rem 15px;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .event-card-img img {
    height: 150px;
  }

  .calendar-cta {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .category-card {
    height: 150px;
  }
}

@media (max-width: 575px) {
  .hero-slide {
    height: 350px;
  }

  .hero-meta {
    flex-direction: column;
    gap: 0.5rem;
  }

  .events-category-tabs .nav-link {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
  }

  .event-card-body {
    padding: 0.75rem;
  }

  .event-card-title {
    font-size: 0.875rem;
  }

  .event-card-meta {
    font-size: 0.6875rem;
  }

  .event-card-desc {
    font-size: 0.75rem;
    -webkit-line-clamp: 2;
  }

  .event-card-footer .btn-dark {
    padding: 0.25rem 0.75rem;
    font-size: 0.6875rem;
  }
}
