/* Enhanced Carousel CSS for Fireworks Website - UNIFIED VERSION */

/* Basic carousel structure */
.carousel-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 20px 0;
  height: auto;
}

.carousel-wrapper {
  display: flex;
  align-items: stretch;
  position: relative;
  width: 100%;
  height: auto;
  gap: 15px;
}

.carousel-content {
  flex: 1;
  overflow: hidden;
  position: relative;
  background: transparent;
  z-index: 1;
  height: auto;
}

.carousel-track {
  display: flex;
  transition: transform 0.4s ease;
  will-change: transform;
  align-items: stretch;
  height: auto;
}

.carousel-item {
  flex-shrink: 0;
  display: flex;
  align-items: stretch;
  box-sizing: border-box;
  height: auto;
}

/* Make child elements fill the carousel item */
.carousel-item > * {
  width: 100%;
  height: auto;
  box-sizing: border-box;
}

/* Navigation Buttons - Themed for Website */
.carousel-btn {
  background: linear-gradient(
    135deg,
    var(--primary-color, #fca822) 0%,
    #e89710 100%
  );
  color: white;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
  flex-shrink: 0;
  user-select: none;
  font-size: 18px;
  font-weight: bold;
  box-shadow: 0 8px 25px rgba(252, 168, 34, 0.4);
  position: relative;
  overflow: hidden;
  margin: 0;
  padding: 0;
  align-self: center;
}

.carousel-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s;
}

.carousel-btn:hover::before {
  left: 100%;
}

.carousel-btn:hover:not(:disabled) {
  box-shadow: 0 12px 35px rgba(252, 168, 34, 0.6);
}

.carousel-btn:active:not(:disabled) {
  transform: scale(0.98);
}

.carousel-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.carousel-btn.carousel-prev {
  position: relative;
  background: linear-gradient(
    135deg,
    var(--primary-color, #fca822) 0%,
    #e89710 100%
  );
  box-shadow: 0 8px 25px rgba(252, 168, 34, 0.4),
    -10px 0 20px rgba(255, 255, 255, 0.9);
}

.carousel-btn.carousel-next {
  position: relative;
  background: linear-gradient(
    135deg,
    var(--primary-color, #fca822) 0%,
    #e89710 100%
  );
  box-shadow: 0 8px 25px rgba(252, 168, 34, 0.4),
    10px 0 20px rgba(255, 255, 255, 0.9);
}

/* ============================================ */
/* UNIFIED LOGO CAROUSEL STYLES                */
/* Apply to BOTH sponsors and thank yous       */
/* ============================================ */

/* Both carousel sections get the same container styles */
.sponsors-carousel-section .carousel-container,
.thank-yous-section .carousel-container {
  background: transparent;
  padding: 20px 0;
  margin: 20px 0;
  min-height: 240px;
}

/* Both get the same item padding to create gaps */
.sponsors-carousel-section .carousel-item,
.thank-yous-section .carousel-item {
  padding: 15px 12px; /* THIS CREATES THE GAPS */
}

/* Both get the same inner card styles */
.sponsors-carousel-section .carousel-item > *,
.thank-yous-section .carousel-item > * {
  background: white;
  border-radius: 15px;
  padding: 25px;
  text-align: center;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  transition: all 0.4s ease;
  border: 2px solid transparent;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.sponsors-carousel-section .carousel-item > *:hover,
.thank-yous-section .carousel-item > *:hover {
  transform: translateY(-8px);
  border-color: var(--primary-color, #fca822);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

/* Logo styling for both carousels */
.sponsor-logo,
.logo-carousel-image {
  width: 100%;
  height: 80px;
  max-width: 200px;
  object-fit: contain;
  margin: 0 auto 15px;
  border-radius: 8px;
}

.sponsor-name,
.logo-carousel-name {
  font-weight: bold;
  color: var(--text-color, #333);
  font-size: 1rem;
  line-height: 1.3;
  margin-top: 10px;
}

/* Placeholder slot styling */
.sponsor-placeholder-small,
.logo-carousel-placeholder > * {
  border: 2px dashed #ddd !important;
  background: #f8f9fa !important;
  color: #666;
  padding: 40px 25px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  transition: all 0.3s ease;
  min-height: 120px;
  justify-content: center;
}

.carousel-item:hover .sponsor-placeholder-small,
.carousel-item:hover .logo-carousel-placeholder > * {
  border-color: var(--primary-color, #fca822) !important;
  color: var(--primary-color, #fca822);
  background: rgba(252, 168, 34, 0.05) !important;
}

.sponsor-placeholder-small i,
.logo-carousel-placeholder i {
  font-size: 2.5rem;
}

.sponsor-placeholder-small span,
.logo-carousel-placeholder span {
  font-weight: bold;
  font-size: 1rem;
}

/* ============================================ */
/* END UNIFIED LOGO CAROUSEL STYLES            */
/* ============================================ */

/* Services Carousel Specific Styling (Mobile Only) */
.services-carousel-section {
  display: none; /* Hidden by default, shown on mobile by JS */
}

.services-carousel-section .carousel-container {
  background: transparent;
  padding: 30px 0;
  margin: 20px 0;
}

.services-carousel-section .carousel-wrapper {
  align-items: stretch;
}

.services-carousel-section .carousel-content {
  height: auto;
}

.services-carousel-section .carousel-track {
  align-items: stretch;
}

.services-carousel-section .carousel-item {
  padding: 20px 10px;
  display: flex;
  align-items: stretch;
}

.services-carousel-section .carousel-item > * {
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  border-radius: 15px;
  padding: 30px;
  text-align: center;
  border: 2px solid #eee;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  height: 100%;
  box-sizing: border-box;
}

.services-carousel-section .carousel-item > *::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(252, 168, 34, 0.1),
    transparent
  );
  transition: left 0.5s;
}

.services-carousel-section .carousel-item > *:hover::before {
  left: 100%;
}

.services-carousel-section .carousel-item > *:hover {
  border-color: var(--primary-color, #fca822);
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(252, 168, 34, 0.2);
}

/* Service Icon Styling */
.service-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(
    135deg,
    var(--primary-color, #fca822) 0%,
    #e89710 100%
  );
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 8px 25px rgba(252, 168, 34, 0.4);
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}

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

/* Mobile Responsive Styles */
@media (max-width: 767px) {
  .carousel-container {
    padding: 25px 0;
  }

  .carousel-wrapper {
    gap: 10px;
    align-items: stretch;
  }

  .carousel-btn {
    width: 45px;
    height: 45px;
    font-size: 16px;
    align-self: center;
  }

  /* Unified mobile styles for both logo carousels */
  .sponsors-carousel-section .carousel-container,
  .thank-yous-section .carousel-container {
    min-height: 220px;
    padding: 25px 0;
  }

  .sponsors-carousel-section .carousel-item,
  .thank-yous-section .carousel-item {
    padding: 12px 8px; /* Consistent gap on mobile */
  }

  .services-carousel-section .carousel-container {
    padding: 25px 0;
  }

  .services-carousel-section .carousel-wrapper {
    align-items: stretch;
  }

  .services-carousel-section .carousel-item {
    padding: 15px 8px;
    display: flex;
    align-items: stretch;
  }

  .services-carousel-section .carousel-item > * {
    padding: 25px 20px;
    height: 100%;
    box-sizing: border-box;
  }
}

/* Tablet Styles */
@media (min-width: 768px) and (max-width: 1023px) {
  .carousel-container {
    padding: 25px 0;
  }

  .carousel-wrapper {
    gap: 12px;
    align-items: stretch;
  }

  .carousel-btn {
    width: 48px;
    height: 48px;
    font-size: 17px;
    align-self: center;
  }

  .services-carousel-section .carousel-wrapper {
    align-items: stretch;
  }
}

/* Desktop Styles */
@media (min-width: 1024px) {
  .carousel-container {
    padding: 30px 0;
  }

  .carousel-wrapper {
    gap: 15px;
    align-items: stretch;
  }

  .carousel-btn {
    width: 50px;
    height: 50px;
    font-size: 18px;
    align-self: center;
  }

  /* Unified desktop styles for both logo carousels */
  .sponsors-carousel-section .carousel-container,
  .thank-yous-section .carousel-container {
    min-height: 260px;
  }

  .services-carousel-section .carousel-wrapper {
    align-items: stretch;
  }
}

/* Handle focus states for accessibility */
.carousel-btn:focus {
  outline: 3px solid rgba(252, 168, 34, 0.5);
  outline-offset: 3px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .carousel-btn {
    border: 2px solid white;
  }

  .carousel-btn:hover:not(:disabled) {
    background: white;
    color: var(--primary-color, #fca822);
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .carousel-track {
    transition: none;
  }

  .carousel-btn {
    transition: none;
  }

  .carousel-item > * {
    transition: none;
  }
}
