.clients-tabs {
  background: #0e0e0e;
  padding: 40px;
  color: #fff;
  box-sizing: border-box;
  width: 100%;
  position: relative;
  overflow: hidden;
}

/* Tabs Header - NO SCROLLING */
.tabs-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 30px;
  padding-bottom: 10px;
  flex-wrap: wrap;
  overflow: visible;
  justify-content: flex-start;
  width: 100%;
}

/* Remove scrollbar styles since no scrolling */
.tabs-header::-webkit-scrollbar {
  display: none;
}

/* Vertical Layout */
.clients-tabs[data-layout="vertical"] .tabs-header {
  flex-direction: column;
  align-items: flex-start;
  max-height: none;
  gap: 10px;
}

.clients-tabs[data-layout="vertical"] .see-more {
  margin-left: 0;
  margin-top: 10px;
  align-self: flex-start;
  order: 1;
}

/* Client Tab */
.client-tab {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 8px 8px 8px;
  background: transparent;
  border-radius: 50px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  border: 2px solid transparent;
  transition: all 0.3s ease;
  min-height: 66px;
  box-sizing: border-box;
  position: relative;
}

.client-tab.active {
  background: rgba(255, 255, 255, 0.1);
  border-color: #fff;
  padding: 8px 14px;
}

.client-tab:hover:not(.active) {
  background: rgba(255, 255, 255, 0.05);
}

.client-tab img.client-image {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
}

.client-placeholder {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #555;
  display: block;
  flex-shrink: 0;
}

/* Client Info */
.client-info {
  display: none;
  flex-direction: column;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.client-tab.active .client-info {
  display: flex;
}

.client-info h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
}

.client-info span {
  font-size: 12px;
  color: #aaa;
  line-height: 1.2;
  margin-top: 2px;
}

/* See More Button */
.tabs-header .see-more {
  margin-left: 0;
  margin-top: 0;
  flex-shrink: 0;
  order: 1;
  white-space: nowrap;
}

.see-more {
  padding: 10px 18px;
  border: 1px solid #fff;
  border-radius: 30px;
  color: #fff;
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: all 0.3s ease;
  background: transparent;
  cursor: pointer;
  display: inline-block;
  text-align: center;
}

.see-more:hover {
  background: #fff;
  color: #000;
}

/* Tab Content */
.tab-content {
  display: none;
  opacity: 0;
  animation: fadeIn 0.5s ease forwards;
  width: 100%;
  overflow: hidden;
  position: relative;
}

.tab-content.active {
  display: block;
  opacity: 1;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Horizontal scrollable content grid - PERFORMANCE OPTIMIZED */
.clients-tabs .content-grid {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  overflow-x: auto;
  overflow-y: hidden;

  /* 🔧 FIX: JS infinite scroll must control movement */
  scroll-behavior: auto;

  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  gap: 20px;
  padding: 20px 0;
  margin: 0;
  width: 100%;
  will-change: auto;
  backface-visibility: hidden;
  user-select: none;
}

.clients-tabs .content-grid::-webkit-scrollbar {
  display: none;
}

/* Each item in the grid */
.clients-tabs .content-grid > * {
  flex: 0 0 auto !important;
  width: calc(33.333% - 14px) !important;
  min-width: 320px !important;
  max-width: 420px !important;
  scroll-snap-align: start;
  box-sizing: border-box;
  user-select: none;
}

/* Override grid classes */
.clients-tabs .content-grid.grid-columns-1 > * {
  width: 100% !important;
  min-width: 320px !important;
}

.clients-tabs .content-grid.grid-columns-2 > * {
  width: calc(50% - 10px) !important;
  min-width: 320px !important;
}

.clients-tabs .content-grid.grid-columns-3 > * {
  width: calc(33.333% - 14px) !important;
  min-width: 320px !important;
}

.clients-tabs .content-grid.grid-columns-4 > * {
  width: calc(25% - 15px) !important;
  min-width: 280px !important;
}

/* Brief Box */
.brief {
  background: #fff;
  color: #000;
  padding: 30px;
  border-radius: 14px;
  height: 100%;
  box-sizing: border-box;
  min-height: 450px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.brief h3 {
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 22px;
  font-weight: 600;
  color: #000;
}

.brief h4 {
  margin-top: 25px;
  margin-bottom: 15px;
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

.brief-content {
  font-size: 16px;
  line-height: 1.6;
  color: #333;
}

/* Content Images */
.content-image-wrapper {
  height: 450px;
  overflow: hidden;
  border-radius: 14px;
  min-height: 450px;
}

.content-image-wrapper img.content-image {
  width: 100%;
  height: 100%;
  border-radius: 14px;
  object-fit: cover;
  display: block;
  transition: transform 0.2s ease;
}

.content-image-wrapper:hover img.content-image {
  transform: scale(1.02);
}

/* Auto-scroll states */
.clients-tabs.auto-scroll-enabled {
  overflow: hidden;
  position: relative;
}

/* Mouse drag enabled styles */
.clients-tabs.mouse-drag-enabled .content-grid {
  cursor: grab;
}

.clients-tabs.mouse-drag-enabled .content-grid.dragging {
  cursor: grabbing;
}

/* Pause states */
.clients-tabs.paused .content-grid {
  animation-play-state: paused !important;
}

/* Service Buttons */
.services-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 15px;
}

.service-button {
  display: inline-block;
  padding: 10px 20px;
  background: #f0f0f0;
  color: #333;
  text-decoration: none;
  border-radius: 25px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  border: 1px solid #ddd;
  text-align: center;
}

.service-button:hover {
  background: #333;
  color: #fff;
  border-color: #333;
  transform: translateY(-2px);
}

/* Mobile responsiveness */
@media (max-width: 1024px) {
  .clients-tabs .content-grid.grid-columns-3 > *,
  .clients-tabs .content-grid.grid-columns-4 > * {
    width: calc(50% - 10px) !important;
    min-width: 300px !important;
  }
  
  .brief,
  .content-image-wrapper {
    min-height: 400px;
    height: 400px;
  }
  
  /* On tablet, make tabs wrap properly */
  .tabs-header {
    gap: 10px;
  }
}

@media (max-width: 768px) {
  .clients-tabs {
    padding: 20px;
  }
  
  .clients-tabs .content-grid.grid-columns-1 > *,
  .clients-tabs .content-grid.grid-columns-2 > *,
  .clients-tabs .content-grid.grid-columns-3 > *,
  .clients-tabs .content-grid.grid-columns-4 > * {
    width: calc(85vw - 20px) !important;
    min-width: 280px !important;
    max-width: 350px !important;
  }
  
  .brief,
  .content-image-wrapper {
    min-height: 350px;
    height: 350px;
  }
  
  .brief {
    padding: 20px;
  }
  
  .brief h3 {
    font-size: 18px;
    margin-bottom: 15px;
  }
  
  .brief h4 {
    font-size: 16px;
    margin-top: 20px;
    margin-bottom: 10px;
  }
  
  .brief-content {
    font-size: 14px;
    line-height: 1.5;
  }
  
  .tabs-header {
    gap: 8px;
    margin-bottom: 20px;
  }
  
  .see-more {
    padding: 8px 15px;
    font-size: 11px;
  }
}

@media (max-width: 480px) {
  .client-tab {
    min-height: 60px;
    padding: 6px;
  }
  
  .client-tab.active {
    padding: 6px 12px;
  }
  
  .client-tab img.client-image,
  .client-placeholder {
    width: 40px;
    height: 40px;
  }
  
  .brief {
    padding: 15px;
    min-height: 320px;
    height: 320px;
  }
  
  .content-image-wrapper {
    min-height: 320px;
    height: 320px;
  }
  
  .client-info h4 {
    font-size: 13px;
  }
  
  .client-info span {
    font-size: 11px;
  }
  
  .service-button {
    padding: 8px 15px;
    font-size: 12px;
  }
  
  /* On mobile, tabs can wrap to multiple lines */
  .tabs-header {
    gap: 6px;
  }
}

/* Accessibility Focus Styles */
.client-tab:focus {
  outline: 2px solid #4a90e2;
  outline-offset: 2px;
}

.see-more:focus {
  outline: 2px solid #4a90e2;
  outline-offset: 2px;
}

.service-button:focus {
  outline: 2px solid #4a90e2;
  outline-offset: 2px;
}

/* Loading State */
.clients-tabs.loading .tab-content {
  position: relative;
  min-height: 200px;
}

.clients-tabs.loading .tab-content::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

