/*
=========================================================
Copyright © 2024 Aibond Corp. All Rights Reserved.
=========================================================
*/

/* ======================================================
   Clients & Dealers Section Styles
   - Section 1: Trusted By (Logo Marquee)
   - Section 2: Global Dealer Network (Map + Region Cards)
   ====================================================== */

/* ------------------------------------------------------
   Section 1: Trusted By - Logo Marquee
   ------------------------------------------------------ */
.trusted-by {
  padding: 60px 0;
  background: #fff;
  overflow: hidden;
}

.trusted-by .section-header h2 {
  font-size: 48px;
  font-weight: 500;
  margin-bottom: 20px;
  color: var(--color-Optional-Blue);
}

.trusted-by .section-header p {
  margin: 0 auto;
  color: var(--color-black-rgb);
}

/* Static client logos layout */
.client-logos {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 60px;
  flex-wrap: wrap;
  padding: 10px 0;
}

/* Marquee wrapper */
.marquee-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 10px 0;
}

/* Fade edges for smooth visual blending */
.marquee-wrapper::before,
.marquee-wrapper::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 100px;
  z-index: 2;
  pointer-events: none;
}

.marquee-wrapper::before {
  left: 0;
  background: linear-gradient(to right, #fff, transparent);
}

.marquee-wrapper::after {
  right: 0;
  background: linear-gradient(to left, #fff, transparent);
}

/* Marquee track */
.marquee-track {
  display: flex;
  align-items: center;
  gap: 60px;
  width: max-content;
  animation: marquee-scroll 30s linear infinite;
}

.marquee-track.reverse {
  animation: marquee-scroll-reverse 35s linear infinite;
}

/* Pause on hover */
.marquee-wrapper:hover .marquee-track {
  animation-play-state: paused;
}

/* Individual logo items */
.marquee-item {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 240px;
  height: 100px;
  padding: 15px 25px;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #e9ecef;
  overflow: hidden;
  transition: all 0.4s ease;
}

.marquee-item:hover {
  transform: scale(1.05);
  border-color: var(--color-primary);
  box-shadow: 0 4px 15px rgba(223, 21, 41, 0.1);
}

.marquee-item img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.marquee-item img[alt="AH Group"] {
  transform: scale(1.2);
}

.marquee-item img[alt="Rapifiai"] {
  transform: scale(1.4);
}

/* Placeholder logo text style */
.marquee-item .logo-placeholder {
  font-family: var(--font-primary);
  font-size: 14px;
  font-weight: 600;
  color: var(--color-secondary);
  text-align: center;
  white-space: nowrap;
  letter-spacing: 0.5px;
}

/* Keyframes for marquee animation */
@keyframes marquee-scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

@keyframes marquee-scroll-reverse {
  0% {
    transform: translateX(-50%);
  }
  100% {
    transform: translateX(0);
  }
}

/* Row spacing */
.marquee-row {
  margin-bottom: 20px;
}

.marquee-row:last-child {
  margin-bottom: 0;
}


/* ------------------------------------------------------
   Section 2: Global Dealer Network
   ------------------------------------------------------ */
.global-dealers {
  padding: 60px 0 80px;
  background: var(--color-secondary);
  color: #fff;
  overflow: hidden;
}

.global-dealers .section-header h2 {
  font-size: 48px;
  font-weight: 500;
  margin-bottom: 20px;
  color: #fff;
}

.global-dealers .section-header p {
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.75);
}

/* World map container */
.world-map-container {
  position: relative;
  max-width: 900px;
  margin: 0 auto 50px;
  padding: 20px;
}

.world-map-container svg {
  width: 100%;
  height: auto;
}

/* Map continent fills */
.world-map-container .continent {
  fill: rgba(255, 255, 255, 0.15);
  stroke: rgba(255, 255, 255, 0.3);
  stroke-width: 0.5;
  transition: fill 0.3s ease;
}

.world-map-container .continent.highlighted {
  fill: rgba(223, 21, 41, 0.3);
  stroke: var(--color-primary);
  stroke-width: 1;
}

.world-map-container .continent.highlighted:hover {
  fill: rgba(223, 21, 41, 0.45);
}

/* Location pins on the map */
.map-pin {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-primary);
  border: 2px solid #fff;
  transform: translate(-50%, -50%);
  z-index: 2;
  cursor: pointer;
}

.map-pin::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(223, 21, 41, 0.3);
  transform: translate(-50%, -50%);
  animation: pin-pulse 2s ease-out infinite;
}

@keyframes pin-pulse {
  0% {
    transform: translate(-50%, -50%) scale(0.5);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(2);
    opacity: 0;
  }
}

/* Pin tooltip */
.map-pin .pin-label {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-family: var(--font-secondary);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.map-pin:hover .pin-label {
  opacity: 1;
}

/* Region cards */
.region-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 30px 25px;
  text-align: center;
  transition: all 0.3s ease;
  height: 100%;
  border-top: 3px solid var(--color-primary);
}

.region-card:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.region-card .region-icon {
  font-size: 36px;
  color: var(--color-primary);
  margin-bottom: 15px;
}

.region-card h4 {
  font-family: var(--font-primary);
  font-size: 22px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 8px;
}

.region-card .dealer-count {
  font-family: var(--font-secondary);
  font-size: 32px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 5px;
  line-height: 1.2;
}

.region-card .dealer-label {
  font-family: var(--font-secondary);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 15px;
}

.region-card .region-markets {
  font-family: var(--font-default);
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
}


/* ------------------------------------------------------
   Responsive Styles
   ------------------------------------------------------ */
@media (max-width: 1279px) {
  .trusted-by .section-header h2,
  .global-dealers .section-header h2 {
    font-size: 40px;
  }
}

@media (max-width: 992px) {
  .trusted-by .section-header h2,
  .global-dealers .section-header h2 {
    font-size: 36px;
  }

  .marquee-item {
    width: 140px;
    height: 60px;
    padding: 8px 16px;
  }

  .marquee-track {
    gap: 40px;
  }

  .region-card {
    padding: 25px 20px;
  }

  .region-card .dealer-count {
    font-size: 28px;
  }
}

@media (max-width: 768px) {
  .trusted-by {
    padding: 40px 0;
  }

  .global-dealers {
    padding: 40px 0 60px;
  }

  .trusted-by .section-header h2,
  .global-dealers .section-header h2 {
    font-size: 30px;
  }

  .marquee-item {
    width: 120px;
    height: 55px;
    padding: 8px 12px;
  }

  .marquee-item .logo-placeholder {
    font-size: 12px;
  }

  .marquee-track {
    gap: 30px;
  }

  .marquee-wrapper::before,
  .marquee-wrapper::after {
    width: 60px;
  }

  .world-map-container {
    margin-bottom: 30px;
    padding: 10px;
  }

  .region-card {
    margin-bottom: 20px;
  }
}

@media (max-width: 575px) {
  .trusted-by {
    padding: 30px 0;
  }

  .global-dealers {
    padding: 30px 0 50px;
  }

  .trusted-by .section-header h2,
  .global-dealers .section-header h2 {
    font-size: 26px;
  }

  .marquee-item {
    width: 110px;
    height: 50px;
    padding: 6px 10px;
    border-radius: 6px;
  }

  .marquee-track {
    gap: 20px;
    animation-duration: 20s;
  }

  .marquee-track.reverse {
    animation-duration: 25s;
  }

  .marquee-wrapper::before,
  .marquee-wrapper::after {
    width: 40px;
  }

  .map-pin {
    width: 8px;
    height: 8px;
  }

  .map-pin::after {
    width: 16px;
    height: 16px;
  }

  .region-card .dealer-count {
    font-size: 24px;
  }

  .region-card h4 {
    font-size: 18px;
  }
}
