/* =========================================================
   ForGrowth Academy — company-marquee.css
   ISOLATED. Every selector is prefixed .fg-company-*, so nothing existing
   is affected. Loaded before responsive.css.

   Seamless right-to-left marquee: the set is duplicated in the markup and the
   track is translated by exactly -50%, so the second set lands precisely where
   the first began. No jump, no reset, no gap.
   ========================================================= */

.fg-company-marquee {
  position: relative;
  margin-top: clamp(28px, 4vw, 44px);
  padding: clamp(18px, 2.4vw, 26px) 0;

  /* The track is wider than the viewport by design; clipping it here means the
     page itself can never scroll sideways. */
  overflow: hidden;

  /* Inherit the section's own ivory rather than painting a lighter band. */
  background: transparent;

  border-top: 1px solid var(--line, #E2DED3);
  border-bottom: 1px solid var(--line, #E2DED3);
}

/* Soft edges so items appear and disappear rather than being cut off. */
.fg-company-marquee::before,
.fg-company-marquee::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: clamp(120px, 13vw, 190px);
  z-index: 2;
  pointer-events: none;
}
.fg-company-marquee::before {
  left: 0;
  background: linear-gradient(
    90deg,
    var(--off-white, #F8F6F1) 0%,
    var(--off-white, #F8F6F1) 42%,
    rgba(248, 246, 241, 0) 100%
  );
}
.fg-company-marquee::after {
  right: 0;
  background: linear-gradient(
    270deg,
    var(--off-white, #F8F6F1) 0%,
    var(--off-white, #F8F6F1) 42%,
    rgba(248, 246, 241, 0) 100%
  );
}

.fg-company-track {
  display: flex;
  width: max-content;
  animation: fgCompanyScroll 40s linear infinite;
  will-change: transform;
}

/* Right to left: start at origin, end one full set to the left. Because the
   markup holds two identical sets, -50% of the track is exactly one set. */
@keyframes fgCompanyScroll {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-50%, 0, 0); }
}

.fg-company-marquee:hover .fg-company-track,
.fg-company-marquee:focus-within .fg-company-track {
  animation-play-state: paused;
}

.fg-company-set {
  display: flex;
  align-items: center;
  gap: clamp(48px, 6vw, 88px);
  margin: 0;
  padding: 0 clamp(14px, 2vw, 30px) 0 0;
  list-style: none;
  flex: none;
}

.fg-company-item {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: none;
  white-space: nowrap;
  opacity: 0.72;
  transition: opacity 0.3s ease;
}
.fg-company-marquee:hover .fg-company-item { opacity: 0.5; }
.fg-company-marquee .fg-company-item:hover { opacity: 1; }

.fg-company-logo {
  position: relative;
  /* Height-driven, with a generous max width, so wide wordmarks
     (Accenture, Deloitte, Cognizant) stay legible beside compact marks. */
  width: auto;
  max-width: clamp(96px, 12vw, 165px);
  height: clamp(26px, 3vw, 34px);
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.fg-company-logo img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

/* Neutral placeholder shown only while a logo file is missing. It is an
   initial on a plain tile, deliberately not an imitation of any brand mark. */
.fg-company-fallback {
  display: none;
  width: 100%;
  height: 100%;
  border-radius: 6px;
  align-items: center;
  justify-content: center;
  background: rgba(28, 28, 30, 0.06);
  border: 1px solid var(--line, #E2DED3);
  font-family: var(--font-body, sans-serif);
  font-size: 13px;
  font-weight: 700;
  color: var(--grey, #6B6B6E);
}
.fg-company-logo.is-missing .fg-company-fallback { display: inline-flex; }
.fg-company-logo.is-missing { width: clamp(26px, 3vw, 34px); }

.fg-company-name {
  font-family: var(--font-body, sans-serif);
  font-size: clamp(13px, 1.4vw, 15px);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink, #1C1C1E);
}

/* ---------- responsive ----------
   The row stays horizontal at every size; only the spacing and scale change.
   A slower track on small screens keeps the reading speed comfortable. */
@media (max-width: 900px) {
  .fg-company-set { gap: 46px; }
  .fg-company-item { gap: 10px; }
}

@media (max-width: 620px) {
  .fg-company-marquee { margin-top: 24px; padding: 16px 0; }
  .fg-company-set { gap: 36px; }
  .fg-company-track { animation-duration: 34s; }
  .fg-company-name { font-size: 12.5px; }
  .fg-company-logo { max-width: 112px; height: 24px; }
}

@media (max-width: 380px) {
  .fg-company-set { gap: 30px; }
  .fg-company-track { animation-duration: 30s; }
}

/* ---------- reduced motion ----------
   Stop the animation and let the row scroll manually instead, so the content
   is still reachable rather than frozen mid-loop. */
@media (prefers-reduced-motion: reduce) {
  .fg-company-track {
    animation: none;
    transform: none;
  }
  .fg-company-marquee {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .fg-company-marquee::-webkit-scrollbar { display: none; }
  /* One set is enough when it is not looping. */
  .fg-company-set[aria-hidden="true"] { display: none; }
}

/* =========================================================
   LOGO-ONLY STRIP
   Names removed; the alt attribute on each image carries the label.
   Heights are balanced per logo rather than uniform: a 4.6:1 wordmark
   at the same height as a square mark would be nearly three times as
   wide and dominate the row.
   ========================================================= */

.fg-company-item { gap: 0; }

.fg-company-logo {
  width: auto;
  max-width: none;
  height: auto;
}
.fg-company-logo img { height: 100%; width: auto; max-width: none; }

.fg-company-logo.fg-c-zee { height: 48.6px; }
.fg-company-logo.fg-c-zomato { height: 23.2px; }
.fg-company-logo.fg-c-amazon { height: 28.3px; }
.fg-company-logo.fg-c-google { height: 28.8px; }
.fg-company-logo.fg-c-meta { height: 48.6px; }
.fg-company-logo.fg-c-adobe { height: 48.6px; }
.fg-company-logo.fg-c-salesforce { height: 42.1px; }
.fg-company-logo.fg-c-hubspot { height: 29.5px; }
.fg-company-logo.fg-c-shopify { height: 48.6px; }
.fg-company-logo.fg-c-nike { height: 30.2px; }
.fg-company-logo.fg-c-accenture { height: 26.3px; }
.fg-company-logo.fg-c-deloitte { height: 22.6px; }
.fg-company-logo.fg-c-cognizant { height: 22.9px; }
.fg-company-logo.fg-c-infosys { height: 32.0px; }
.fg-company-logo.fg-c-swiggy { height: 29.4px; }

@media (max-width: 900px) {
  .fg-company-logo.fg-c-zee { height: 41.8px; }
  .fg-company-logo.fg-c-zomato { height: 20.0px; }
  .fg-company-logo.fg-c-amazon { height: 24.3px; }
  .fg-company-logo.fg-c-google { height: 24.8px; }
  .fg-company-logo.fg-c-meta { height: 41.8px; }
  .fg-company-logo.fg-c-adobe { height: 41.8px; }
  .fg-company-logo.fg-c-salesforce { height: 36.2px; }
  .fg-company-logo.fg-c-hubspot { height: 25.4px; }
  .fg-company-logo.fg-c-shopify { height: 41.8px; }
  .fg-company-logo.fg-c-nike { height: 26.0px; }
  .fg-company-logo.fg-c-accenture { height: 22.6px; }
  .fg-company-logo.fg-c-deloitte { height: 19.4px; }
  .fg-company-logo.fg-c-cognizant { height: 19.7px; }
  .fg-company-logo.fg-c-infosys { height: 27.5px; }
  .fg-company-logo.fg-c-swiggy { height: 25.3px; }
}

@media (max-width: 620px) {
  .fg-company-logo.fg-c-zee { height: 36.0px; }
  .fg-company-logo.fg-c-zomato { height: 17.2px; }
  .fg-company-logo.fg-c-amazon { height: 20.9px; }
  .fg-company-logo.fg-c-google { height: 21.3px; }
  .fg-company-logo.fg-c-meta { height: 36.0px; }
  .fg-company-logo.fg-c-adobe { height: 36.0px; }
  .fg-company-logo.fg-c-salesforce { height: 31.2px; }
  .fg-company-logo.fg-c-hubspot { height: 21.8px; }
  .fg-company-logo.fg-c-shopify { height: 36.0px; }
  .fg-company-logo.fg-c-nike { height: 22.3px; }
  .fg-company-logo.fg-c-accenture { height: 19.5px; }
  .fg-company-logo.fg-c-deloitte { height: 16.7px; }
  .fg-company-logo.fg-c-cognizant { height: 16.9px; }
  .fg-company-logo.fg-c-infosys { height: 23.7px; }
  .fg-company-logo.fg-c-swiggy { height: 21.8px; }
}
