/* Clients page theme - Red, Black, White */
:root { 
  --red: #DC143C; 
  --black: #0f0f10; 
  --dark: #1a1a1a; 
  --gray: #f8f9fa;
  --white: #ffffff;
}

/* Hero Section */
.clients-hero { 
  position: relative; 
  height: clamp(320px, 46vh, 450px); 
  color: #fff; 
  display: flex; 
  align-items: center; 
  background: #000;
  overflow: hidden;
}

.clients-hero::before { 
  content: ""; 
  position: absolute; 
  inset: 0; 
  background-image: url('/assets/images/beautiful-view-construction-site-city-sunset_181624-9347.jpg'); 
  background-size: cover; 
  background-position: center; 
  background-repeat: no-repeat; 
  filter: saturate(0.9) contrast(1.1) brightness(0.7);
  z-index: 0;
  animation: zoomIn 20s ease infinite alternate;
}

@keyframes zoomIn {
  0% { transform: scale(1); }
  100% { transform: scale(1.1); }
}

.animated-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
}

.shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.3;
  animation: float 15s ease-in-out infinite;
}

.shape-1 {
  width: 300px;
  height: 300px;
  background: var(--red);
  top: -100px;
  left: -100px;
  animation-delay: 0s;
}

.shape-2 {
  width: 400px;
  height: 400px;
  background: #DC143C;
  bottom: -150px;
  right: -150px;
  animation-delay: 3s;
}

.shape-3 {
  width: 250px;
  height: 250px;
  background: #fff;
  top: 50%;
  left: 50%;
  animation-delay: 6s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(50px, 50px) rotate(90deg); }
  50% { transform: translate(0, 100px) rotate(180deg); }
  75% { transform: translate(-50px, 50px) rotate(270deg); }
}

.clients-hero .overlay { 
  position: absolute; 
  inset: 0; 
  z-index: 2; 
  background: linear-gradient(135deg, rgba(220, 20, 60, 0.4), rgba(0, 0, 0, 0.7));
}

.clients-hero .container { 
  position: relative; 
  z-index: 3; 
}

.clients-hero .hero-title { 
  font-size: clamp(28px, 6.5vw, 72px); 
  font-weight: 900; 
  margin: 15px 0; 
  text-shadow: 0 4px 32px rgba(0, 0, 0, 0.5);
  letter-spacing: -1px;
}

.clients-hero .hero-subtitle {
  font-size: clamp(14px, 2.2vw, 20px);
  font-weight: 400;
  opacity: 0.9;
  margin: 0;
  letter-spacing: 0.5px;
}

.badge-red { 
  display: inline-block; 
  background: var(--red); 
  color: #fff; 
  font-weight: 800; 
  padding: 8px 18px; 
  border-radius: 999px; 
  box-shadow: 0 6px 18px rgba(220, 20, 60, 0.4);
  font-size: 14px;
  letter-spacing: 0.5px;
}

/* Fade In Animations */
.fade-in-up {
  animation: fadeInUp 0.8s ease forwards;
  opacity: 0;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Body Section */
.clients-body { 
  background: var(--gray); 
  padding: 80px 0 100px;
  position: relative;
  overflow: hidden;
}

.floating-shapes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.float-shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.05;
}

.float-1 {
  width: 200px;
  height: 200px;
  background: var(--red);
  top: 10%;
  left: 5%;
  animation: floatAround 20s ease-in-out infinite;
}

.float-2 {
  width: 150px;
  height: 150px;
  background: var(--black);
  bottom: 15%;
  right: 10%;
  animation: floatAround 25s ease-in-out infinite reverse;
}

.float-3 {
  width: 100px;
  height: 100px;
  background: var(--red);
  top: 60%;
  left: 50%;
  animation: floatAround 30s ease-in-out infinite;
}

@keyframes floatAround {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(30px, -30px); }
  50% { transform: translate(-20px, 40px); }
  75% { transform: translate(40px, 20px); }
}

.container {
  position: relative;
  z-index: 1;
}

.clients-title { 
  font-weight: 900; 
  font-size: 42px;
  color: var(--black); 
  text-align: center; 
  letter-spacing: 1px;
  margin-bottom: 20px;
}

.title-underline {
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--red), transparent);
  margin: 0 auto 40px;
  border-radius: 2px;
  animation: expandWidth 1s ease forwards;
}

@keyframes expandWidth {
  from { width: 0; }
  to { width: 80px; }
}

/* Slide In Animations */
.slide-in {
  animation: slideIn 0.8s ease forwards;
  opacity: 0;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Client Grid */
.client-grid { 
  display: grid; 
  grid-template-columns: repeat(3, 1fr); 
  gap: 30px;
  margin-top: 40px;
}

@media(max-width: 991px) { 
  .client-grid { grid-template-columns: repeat(2, 1fr); } 
}

@media(max-width: 575px) { 
  .client-grid { grid-template-columns: 1fr; } 
}

.client-card { 
  position: relative; 
  background: var(--white); 
  border: 2px solid var(--black); 
  border-radius: 12px; 
  padding: 30px; 
  text-align: center; 
  min-height: 200px;
  overflow: hidden; 
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
  transform: translateY(16px); 
  opacity: 0; 
  transition: all 0.5s ease;
}

@keyframes cardPop { 
  from { 
    transform: translateY(18px) scale(0.98); 
    opacity: 0; 
  } 
  to { 
    transform: translateY(0) scale(1); 
    opacity: 1; 
  } 
}

.client-card.show { 
  animation: cardPop 0.55s ease both; 
}

.client-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 3px;
  background: var(--red);
  transition: left 0.5s ease;
}

.client-card:hover::before {
  left: 0;
}

.client-card:hover { 
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.15);
}

/* Shimmer effect */
.client-card::after { 
  content: ""; 
  position: absolute; 
  inset: -20% -120%; 
  background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.3) 50%, transparent 70%); 
  transform: translateX(-100%); 
  transition: transform 0.85s ease; 
  pointer-events: none; 
}

.client-card:hover::after { 
  transform: translateX(100%); 
}

.client-logo { 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  height: 120px;
  position: relative;
  z-index: 1;
}

.client-logo img { 
  max-height: 100%; 
  max-width: 100%; 
  filter: grayscale(0.3);
  transition: transform 0.35s ease, filter 0.35s ease; 
}

.client-card:hover .client-logo img { 
  transform: scale(1.1) rotate(-1deg); 
  filter: grayscale(0) saturate(1.2) contrast(1.05) drop-shadow(0 8px 18px rgba(0, 0, 0, 0.15)); 
}

.client-fallback { 
  display: none; 
  align-items: center; 
  justify-content: center; 
  height: 120px; 
  font-weight: 800; 
  color: #333;
  position: relative;
  z-index: 1;
}

.client-card.logo-error .client-logo { 
  display: none; 
}

.client-card.logo-error .client-fallback { 
  display: flex; 
}

.client-name { 
  margin-top: 15px; 
  font-weight: 800; 
  letter-spacing: 0.5px; 
  color: var(--black);
  font-size: 15px;
  position: relative;
  z-index: 1;
}

/* CTA Buttons */
.clients-cta { 
  text-align: center; 
  margin-top: 60px;
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.clients-cta .btn-cta { 
  background: linear-gradient(135deg, var(--red), #ff1744);
  color: #fff; 
  font-weight: 800; 
  padding: 16px 32px; 
  border: none;
  border-radius: 8px;
  font-size: 16px;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
}

.clients-cta .btn-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--black), #2a2a2a);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.clients-cta .btn-cta:hover::before {
  opacity: 1;
}

.clients-cta .btn-cta:hover { 
  transform: translateY(-3px); 
  box-shadow: 0 10px 30px rgba(220, 20, 60, 0.4);
  color: #fff;
}

.clients-cta .btn-cta.secondary { 
  background: linear-gradient(135deg, var(--black), #2a2a2a);
}

.clients-cta .btn-cta.secondary::before {
  background: linear-gradient(135deg, var(--red), #ff1744);
}

.clients-cta .btn-cta.secondary:hover {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.btn-text,
.btn-icon {
  position: relative;
  z-index: 1;
  transition: transform 0.3s ease;
}

.clients-cta .btn-cta:hover .btn-icon {
  transform: translateX(5px);
}

/* Responsive Design */
@media (max-width: 992px) {
  .clients-hero .hero-title {
    font-size: 48px;
  }
  
  .clients-title {
    font-size: 32px;
  }
}

@media (max-width: 768px) {
  .clients-hero {
    height: 350px;
  }
  
  .clients-hero .hero-title {
    font-size: 36px;
  }
  
  .clients-hero .hero-subtitle {
    font-size: 16px;
  }
  
  .clients-title {
    font-size: 28px;
  }
  
  .clients-body {
    padding: 60px 0 80px;
  }
  
  .clients-cta {
    flex-direction: column;
    align-items: center;
  }
  
  .clients-cta .btn-cta {
    width: 100%;
    max-width: 300px;
  }
}
