/* ==========================================================
   1. STRICT VIEWPORT & MOBILE OVERFLOW FIXES
   ========================================================== */
html {
  overflow-x: hidden;
  width: 100%;
  height: 100%;
}

body {
  overflow-x: hidden;
  width: 100%;
  position: relative;
  background-color: #f8fafc; /* Matches slate-50 to eliminate white flashes */
  margin: 0;
  padding: 0;
  -webkit-text-size-adjust: 100%;
}

/* Ensure box-sizing applies globally without forcing viewport units */
*, *::before, *::after {
  box-sizing: border-box;
}

/* ==========================================================
   2. CUSTOM SCROLLBAR & CARD ANIMATIONS
   ========================================================== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.phone-card {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.phone-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px -6px rgba(0, 0, 0, 0.08), 0 4px 8px -4px rgba(0, 0, 0, 0.04);
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* ==========================================================
   3. HORIZONTAL MOVING TICKER SHOWCASE STYLES
   ========================================================== */
.moving-showcase-section {
  padding: 40px 0;
  background-color: #f8f9fa;
  overflow: hidden;
  width: 100%;
}

.moving-showcase-header {
  text-align: center;
  margin-bottom: 25px;
  padding: 0 1rem;
}

.moving-showcase-header h2 {
  font-size: 1.8rem;
  color: #111;
  margin-bottom: 6px;
}

.moving-showcase-header p {
  color: #666;
  font-size: 0.95rem;
}

/* Ticker Container & Fade Edges */
.ticker-wrapper {
  width: 100%;
  overflow: hidden;
  position: relative;
  mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
}

/* Scrolling Track */
.ticker-track {
  display: flex;
  width: max-content;
  gap: 1.25rem;
  animation: scrollLeft 30s linear infinite;
}

/* Pause Scrolling on Mouse Hover */
.ticker-wrapper:hover .ticker-track {
  animation-play-state: paused;
}

/* Individual Card in Ticker */
.ticker-card {
  flex: 0 0 auto;
  width: 180px;
  background: #ffffff;
  border-radius: 12px;
  padding: 15px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease;
}

.ticker-card:hover {
  transform: translateY(-5px);
}

.ticker-card img {
  width: 100%;
  height: 140px;
  object-fit: contain;
  border-radius: 8px;
  margin-bottom: 10px;
}

.ticker-card h4 {
  font-size: 0.9rem;
  color: #222;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Keyframe Infinite Scroll Loop */
@keyframes scrollLeft {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* ==========================================================
   4. MOBILE MEDIA QUERIES & RESPONSIVE OVERRIDES
   ========================================================== */
@media (max-width: 640px) {
  .ticker-card {
    width: 140px !important;
    padding: 10px !important;
  }
  .ticker-card img {
    height: 100px !important;
  }
}