/* ============================================================
   CarBrandish — components.css
   Reusable components: inner-page hero, gallery, split row, CTA
   ============================================================ */

/* ============================================================
   INNER PAGE HERO — shared by brands & drivers pages
   ============================================================ */
.brands-hero {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 41.7vw;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(135deg, #050505 0%, #111111 50%, rgba(249,115,22,0.05) 100%);
}

.brands-hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 70vw;
  margin-inline: auto;
  padding-inline: var(--container-padding);
}

.brands-hero-content .eyebrow {
  visibility: visible;
}

.brands-hero-headline {
  font-size: var(--text-hero);
  font-weight: var(--weight-bold);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-md);
  visibility: hidden;
}

.brands-hero-sub {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  line-height: var(--leading-relaxed);
  max-width: 37.5vw;
  margin-inline: auto;
  margin-bottom: var(--space-md);
  visibility: hidden;
}

.brands-hero-cta {
  visibility: hidden;
}
.brands-hero-cta, .brands-hero-sub {
      position: relative;
    top: 4.5vw;
}
/* Scroll indicator for inner pages */
.brands-hero .scroll-indicator {
  position: absolute;
  bottom: 2vw;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  visibility: hidden;
}

.brands-hero .scroll-line {
  width: 1px;
  height: 3.3vw;
  background: linear-gradient(180deg, rgba(255,255,255,0.4), transparent);
  animation: scroll-pulse 2s ease-in-out infinite;
}

@media (max-width: 767px) {
  .brands-hero {
      height: 135vw;
  }

  .brands-hero-sub {
    max-width: 90vw;
  }

  .brands-hero-content {
    max-width: 100%;
        top: -8vw;
  }
  .brands-hero-content .eyebrow {
    font-size: var(--text-h3);
  }
  .brands-hero .scroll-indicator {
    bottom: 1vw;
    }
}

/* ── Gallery — JS RAF infinite scroll ── */
.gallery-slider {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  overflow: hidden;
}

.gallery-track {
  overflow: hidden;
}

.gallery-track-inner {
  display: flex;
  gap: 16px;
  width: max-content;
  will-change: transform;
  -webkit-backface-visibility: hidden;
          backface-visibility: hidden;
}

.gallery-slide {
  width: 22vw;
  height: 19.4vw;
  border-radius: var(--radius-md);
  overflow: hidden;
  flex-shrink: 0;
}

.gallery-slide img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

/* ── Gallery Responsive ── */
@media (max-width: 767px) {
  .gallery-slide {
    width: 64vw;
    height: 53vw;
  }
}

/* ============================================================
   SPLIT ROW — shared across all pages
   ============================================================ */
.split-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5vw;
  align-items: center;
}

.split-row.reversed .split-media { order: 2; }
.split-row.reversed .split-text  { order: 1; }

.split-media img {
  border-radius: var(--radius-lg);
  width: 100%;
  height: auto;
  object-fit: contain;
  transition: transform 0.6s var(--ease-out);
}
#community .split-media img {
    height: 34vw;
    object-fit: cover;
    object-position: center;
}
.split-media:hover img {
  transform: scale(1.02);
}

.split-text h2 {
  font-size: var(--text-h2);
  margin-bottom: var(--space-md);
}

.split-text p {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-md);
}

.split-text .btn-primary {
  margin-top: var(--space-sm);
}

/* ── Split Row Responsive ── */
@media (max-width: 1023px) {
  .split-row {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .split-row.reversed .split-media,
  .split-row.reversed .split-text {
    order: 0;
  }
}

@media (max-width: 767px) {
  .split-row {
    grid-template-columns: 1fr;
  }

  .split-text {
    text-align: center;
  }

  .split-text .split-media {
    margin-top: var(--space-md);
    margin-bottom: var(--space-md);
    margin-inline: auto;
    width: 100%;
    height: 70vw;
  }

  .split-text .split-media img {
    border-radius: var(--radius-md);
    height: 100%;
    object-fit: cover;
    object-position: center;
  }

  .split-text .btn-primary {
    margin-inline: auto;
  }
}

/* ============================================================
   CTA BLOCK — shared across all pages
   ============================================================ */
.cta-section {
  padding-block: var(--space-section);
}

.cta-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 7vw 5vw;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-card::before {
  content: '';
  position: absolute;
  top: -40%;
  left: 50%;
  transform: translateX(-50%);
  width: 50%;
  height: 80%;
  background: radial-gradient(ellipse, rgba(249, 115, 22, 0.06), transparent 70%);
  pointer-events: none;
}

.cta-headline {
  font-size: var(--text-h1);
  margin-bottom: var(--space-md);
  position: relative;
}

.cta-text {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  max-width: 34.7vw;
  margin-inline: auto;
  margin-bottom: var(--space-lg);
  position: relative;
  line-height: var(--leading-relaxed);
}

.cta-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  margin-top: var(--space-xl);
}

.cta-social-label {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-muted);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  margin-right: var(--space-xs);
}

.cta-social a {
  width: 3vw;
  height: 3vw;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  transition: all var(--duration-normal) var(--ease-out);
}

.cta-social a:hover {
  background: var(--color-primary);
  color: #fff;
}

.cta-social svg {
  width: 1.25vw;
  height: 1.25vw;
}

/* ── CTA Responsive ── */
@media (max-width: 767px) {
  .cta-text {
    max-width: 90vw;
  }

  .cta-social {
    flex-wrap: wrap;
  }

  .cta-social-label {
    display: block;
    width: 100%;
    text-align: center;
  }

  .cta-social a {
    width: 11.7vw;
    height: 11.7vw;
  }

  .cta-social svg {
    width: 4.8vw;
    height: 4.8vw;
  }
  .brands-hero .scroll-line {
    height: 10vw;
  }
  .brands-hero-cta, .brands-hero-sub {
    position: relative;
            top: 26vw;
  }
  .brands-hero-headline {
    font-size: 7.5vw;
  }
  #community .split-media img {
    height: 100%;
  }
}
