/**
 * Brands Section Component - RomaPaint
 * Showcase trusted brand partnerships
 * Fully responsive with smooth animations
 */

/* ============================================
   BRANDS SECTION CONTAINER
   ============================================ */

.brands-section {
  position: relative;
  padding: 4rem 1rem;
  background: linear-gradient(to bottom, #FFFFFF, #FAFAF9);
}

@media (min-width: 768px) {
  .brands-section {
    padding: 5rem 2rem;
  }
}

@media (min-width: 1024px) {
  .brands-section {
    padding: 6rem 2rem;
  }
}

/* ============================================
   BRANDS GRID - Fully Responsive
   ============================================ */

.brands-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* Tablet: 3 columns */
@media (min-width: 640px) {
  .brands-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
}

/* Desktop: 4 columns */
@media (min-width: 1024px) {
  .brands-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 2.5rem;
  }
}

/* Large Desktop: 5 columns */
@media (min-width: 1280px) {
  .brands-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 3rem;
  }
}

/* ============================================
   BRAND CARD
   ============================================ */

.brand-card {
  position: relative;
  background: white;
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(155, 139, 126, 0.08);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  border: 1px solid rgba(155, 139, 126, 0.1);
}

@media (min-width: 768px) {
  .brand-card {
    padding: 2rem;
    min-height: 140px;
  }
}

@media (min-width: 1024px) {
  .brand-card {
    padding: 2.5rem;
    min-height: 160px;
  }
}

/* Hover Effect */
.brand-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(155, 139, 126, 0.15);
  border-color: rgba(155, 139, 126, 0.3);
}

/* Active State (for touch devices) */
.brand-card:active {
  transform: translateY(-2px);
}

/* ============================================
   BRAND LOGO IMAGE
   ============================================ */

.brand-logo {
  max-width: 100%;
  height: auto;
  max-height: 60px;
  object-fit: contain;
  filter: grayscale(100%) opacity(0.7);
  transition: all 0.3s ease;
}

@media (min-width: 768px) {
  .brand-logo {
    max-height: 70px;
  }
}

@media (min-width: 1024px) {
  .brand-logo {
    max-height: 80px;
  }
}

/* Hover Effect - Full Color */
.brand-card:hover .brand-logo {
  filter: grayscale(0%) opacity(1);
  transform: scale(1.05);
}

/* ============================================
   SCROLL ANIMATIONS
   ============================================ */

.brand-card {
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards;
}

/* Staggered Animation Delays */
.brand-card:nth-child(1) { animation-delay: 0.1s; }
.brand-card:nth-child(2) { animation-delay: 0.2s; }
.brand-card:nth-child(3) { animation-delay: 0.3s; }
.brand-card:nth-child(4) { animation-delay: 0.4s; }
.brand-card:nth-child(5) { animation-delay: 0.5s; }
.brand-card:nth-child(6) { animation-delay: 0.6s; }
.brand-card:nth-child(7) { animation-delay: 0.7s; }
.brand-card:nth-child(8) { animation-delay: 0.8s; }
.brand-card:nth-child(9) { animation-delay: 0.9s; }

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

/* Disable animations on mobile for performance */
@media (max-width: 639px) {
  .brand-card {
    animation: none;
    opacity: 1;
  }
}

/* ============================================
   BRANDS HEADER
   ============================================ */

.brands-header {
  text-align: center;
  margin-bottom: 3rem;
}

@media (min-width: 768px) {
  .brands-header {
    margin-bottom: 4rem;
  }
}

.brands-badge {
  display: inline-block;
  background: rgba(212, 165, 116, 0.1);
  color: #D4A574;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .brands-badge {
    font-size: 0.875rem;
    padding: 0.625rem 1.25rem;
  }
}

.brands-title {
  font-size: 1.875rem;
  font-weight: 800;
  color: #1C1917;
  margin-bottom: 1rem;
  line-height: 1.2;
}

@media (min-width: 768px) {
  .brands-title {
    font-size: 2.5rem;
  }
}

@media (min-width: 1024px) {
  .brands-title {
    font-size: 3rem;
  }
}

.brands-subtitle {
  font-size: 1rem;
  color: #78716C;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

@media (min-width: 768px) {
  .brands-subtitle {
    font-size: 1.125rem;
  }
}

@media (min-width: 1024px) {
  .brands-subtitle {
    font-size: 1.25rem;
  }
}

/* ============================================
   TRUST SIGNAL
   ============================================ */

.brands-trust-signal {
  text-align: center;
  margin-top: 3rem;
  padding: 1.5rem;
  background: rgba(155, 139, 126, 0.05);
  border-radius: 0.75rem;
  border: 1px solid rgba(155, 139, 126, 0.1);
}

@media (min-width: 768px) {
  .brands-trust-signal {
    margin-top: 4rem;
    padding: 2rem;
  }
}

.brands-trust-text {
  font-size: 0.875rem;
  color: #57534E;
  font-style: italic;
}

@media (min-width: 768px) {
  .brands-trust-text {
    font-size: 1rem;
  }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

/* Focus states for keyboard navigation */
.brand-card:focus-visible {
  outline: 2px solid #D4A574;
  outline-offset: 4px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .brand-card {
    animation: none;
    opacity: 1;
  }

  .brand-card:hover {
    transform: none;
  }

  .brand-logo {
    transition: none;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .brand-card {
    border: 2px solid currentColor;
  }
}
