/* Custom CSS for Portable Restroom Trailer Landing Page */

:root {
  --primary: #00b4d8;        /* Turquoise */
  --primary-hover: #0096c7;
  --secondary: #00f5d4;      /* Mint Accent */
  --dark: #0f172a;           /* Soft Dark Slate */
  --dark-accent: #1e293b;
  --light: #f8fafc;
  --mint-light: #e0f7fa;
  --white: #ffffff;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-600: #475569;
}

/* Base custom classes to support Tailwind */
body {
  font-family: 'Roboto', sans-serif;
  scroll-behavior: smooth;
  color: var(--dark);
  overflow-x: hidden;
}

.text-gradient {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.bg-gradient-mint {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
}

.bg-mint-glass {
  background: rgba(224, 247, 250, 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 180, 216, 0.15);
}

/* Micro-animations */
.hover-scale {
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s ease;
}
.hover-scale:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 20px rgba(0, 180, 216, 0.1);
}

/* FAQ Accordion Transitions */
.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0, 1, 0, 1);
}
.faq-item.active .faq-content {
  max-height: 1000px;
  transition: max-height 0.35s cubic-bezier(1, 0, 1, 0);
}
.faq-icon {
  transition: transform 0.3s ease;
}
.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

/* Sticky Bottom Bar for Mobile */
.mobile-sticky-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.08);
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
}

/* Pulse animation for CTA */
@keyframes pulse-btn {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 245, 212, 0.4);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(0, 245, 212, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 245, 212, 0);
  }
}
.pulse-cta {
  animation: pulse-btn 2s infinite;
}

/* Modal and form styles */
.quote-modal {
  display: none;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.quote-modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Scroll-reveal animations */
.scroll-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Custom 9:16 Image Containers with Dark Mode Backdrop */
.ProductImageContainer {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  background-color: var(--dark);
  overflow: hidden;
  border-radius: 1.5rem; /* 24px bo góc sang trọng */
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ProductImage {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Hover Effect */
.ProductImageHover:hover .ProductImage {
  transform: scale(1.05);
}

/* Custom Slider Styles */
.SliderSectionContainer {
  width: 100%;
  overflow: hidden;
  padding: 1.5rem 0;
}

.SliderTrack {
  display: flex;
  width: max-content;
  gap: 1.5rem;
  animation: marquee-scroll 45s linear infinite;
  will-change: transform;
}

/* Pause scroll animation on hover to let users inspect cards */
.SliderTrack:hover {
  animation-play-state: paused;
}

.SliderCard {
  width: 280px;
  aspect-ratio: 9 / 16;
  flex-shrink: 0;
  position: relative;
  border-radius: 1.5rem;
  overflow: hidden;
  background-color: var(--dark);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

.SliderCard:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 20px 30px rgba(0, 180, 216, 0.15);
}

.SliderCard img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.5s ease;
}

.SliderCard:hover img {
  transform: scale(1.05);
}

/* Card Text Overlay */
.CardOverlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.6) 60%, transparent 100%);
  padding: 1.5rem 1.25rem 1.25rem 1.25rem;
  color: var(--white);
  pointer-events: none; /* allows hovering elements below if needed */
  z-index: 10;
}

.CardOverlay h4 {
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.3;
  margin-top: 0.25rem;
  color: #ffffff;
}

.CardOverlay p {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 0.25rem;
  line-height: 1.4;
}

.CardOverlay span {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--secondary); /* Mint accent color */
}

@keyframes marquee-scroll {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(calc(-50% - 0.75rem), 0, 0); /* -50% of track width minus half the gap (0.75rem) for perfect seamless scroll loop */
  }
}

@media (max-width: 768px) {
  .SliderCard {
    width: 200px; /* smaller card on mobile screens */
  }
  .SliderTrack {
    gap: 1rem;
    animation-duration: 35s; /* faster scroll duration on mobile since track width is smaller */
  }
  @keyframes marquee-scroll {
    0% {
      transform: translate3d(0, 0, 0);
    }
    100% {
      transform: translate3d(calc(-50% - 0.5rem), 0, 0);
    }
  }
}
