/* =========================================
   MARQUEE SOCIAL SECTION
   Infinite logos line (pause on hover)
   ONT premium / institutional mood
========================================= */

.marquee-section {
  position: relative;
  padding-block: 1.15rem;
  background:
    radial-gradient(circle at 12% 50%, rgba(239, 142, 1, 0.05), transparent 36%),
    radial-gradient(circle at 88% 50%, rgba(0, 158, 150, 0.05), transparent 36%),
    linear-gradient(180deg, #fbfaf7 0%, #f5f3ee 100%);
  overflow: hidden;
}

.marquee-container {
  position: relative;
}

/* Full-bleed visual line while staying in page rhythm */
.marquee-shell {
  position: relative;
  width: 100vw;
  margin-left: 50%;
  transform: translateX(-50%);
  padding-inline: 0;
}

/* Outer rail */
.marquee {
  --marquee-gap: 0.7rem;
  --marquee-speed: 28s;
  --marquee-logo-height: 22px;
  --marquee-pill-h: 56px;

  position: relative;
  overflow: hidden;
  min-height: var(--marquee-pill-h);
  border-top: 1px solid rgba(57, 26, 0, 0.08);
  border-bottom: 1px solid rgba(57, 26, 0, 0.08);

  background:
    linear-gradient(180deg, rgba(255,255,255,0.78), rgba(255,255,255,0.6)),
    linear-gradient(90deg, rgba(239,142,1,0.03), rgba(0,158,150,0.03));

  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* Soft edge fade (institutional / premium) */
.marquee::before,
.marquee::after {
  content: "";
  position: absolute;
  top: 0;
  width: 84px;
  height: 100%;
  z-index: 3;
  pointer-events: none;
}

.marquee::before {
  left: 0;
  background: linear-gradient(90deg, #f8f6f1 0%, rgba(248,246,241,0) 100%);
}

.marquee::after {
  right: 0;
  background: linear-gradient(270deg, #f8f6f1 0%, rgba(248,246,241,0) 100%);
}

/* moving track */
.marquee-track {
  display: flex;
  width: max-content;
  align-items: center;
  animation: ontMarqueeScroll var(--marquee-speed) linear infinite;
  will-change: transform;
}

/* Pause on hover (hovering any logo pauses the track) */
.marquee:hover .marquee-track {
  animation-play-state: paused;
}

/* Two identical groups for seamless loop */
.marquee-elmts {
  list-style: none;
  margin: 0;
  padding: 0 var(--marquee-gap) 0 0; /* important for seamless spacing */
  display: flex;
  align-items: center;
  gap: var(--marquee-gap);
  flex-shrink: 0;
}

.marquee-item {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--marquee-pill-h);
  padding-inline: 0.7rem;
  position: relative;
}

/* Optional subtle hover pill */
.marquee-item::before {
  content: "";
  position: absolute;
  inset: 8px 2px;
  border-radius: 999px;
  border: 1px solid rgba(57, 26, 0, 0.06);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.55), rgba(255,255,255,0.25));
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 0.22s ease, transform 0.22s ease, border-color 0.22s ease;
  z-index: 0;
}

.marquee-item:hover::before {
  opacity: 1;
  transform: scale(1);
  border-color: rgba(0, 158, 150, 0.18);
}

.marquee-item img {
  position: relative;
  z-index: 1;
  display: block;
  width: auto;
  height: var(--marquee-logo-height);
  max-width: 150px;
  object-fit: contain;
  opacity: 0.92;
  transition: transform 0.22s ease, opacity 0.22s ease, filter 0.22s ease;
  filter: saturate(0.95) contrast(1.02);
}

/* Hover feedback */
.marquee-item:hover img {
  opacity: 1;
  transform: scale(1.03);
}

/* Flickr wordmark often sits visually lower */
.marquee-item img.flickr-fix-icon {
  height: calc(var(--marquee-logo-height) - 1px);
}

/* ONT accent line inside rail (very subtle) */
.marquee::selection {
  background: transparent;
}

.marquee-shell::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -1px;
  transform: translateX(-50%);
  width: min(240px, 40vw);
  height: 2px;
  background: linear-gradient(90deg, rgba(239,142,1,0), rgba(239,142,1,0.8), rgba(0,158,150,0.8), rgba(0,158,150,0));
  opacity: 0.55;
  pointer-events: none;
}

/* Animation */
@keyframes ontMarqueeScroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .marquee-track {
    animation: none;
    transform: translateX(0);
  }
}

/* =========================================
   GLOBAL BREAKPOINT STRUCTURE (your pattern)
========================================= */

@media (min-width: 576px) {
  .marquee {
    --marquee-gap: 0.8rem;
    --marquee-pill-h: 60px;
    --marquee-logo-height: 24px;
  }

  .marquee::before,
  .marquee::after {
    width: 92px;
  }

  .marquee-item {
    padding-inline: 0.8rem;
  }
}

@media (min-width: 768px) {
  .marquee-section {
    padding-block: 1.25rem;
  }

  .marquee {
    --marquee-gap: 0.95rem;
    --marquee-pill-h: 64px;
    --marquee-logo-height: 26px;
    --marquee-speed: 30s;
  }

  .marquee-item::before {
    inset: 9px 3px;
  }

  .marquee-item img {
    max-width: 170px;
  }
}

@media (min-width: 992px) {
  .marquee-section {
    padding-block: 1.35rem;
  }

  .marquee {
    --marquee-gap: 1.05rem;
    --marquee-pill-h: 68px;
    --marquee-logo-height: 28px;
    --marquee-speed: 32s;
  }

  .marquee::before,
  .marquee::after {
    width: 108px;
  }

  .marquee-item {
    padding-inline: 0.95rem;
  }

  .marquee-item img {
    max-width: 185px;
  }
}

@media (min-width: 1200px) {
  .marquee-section {
    padding-block: 1.5rem;
  }

  .marquee {
    --marquee-gap: 1.15rem;
    --marquee-pill-h: 72px;
    --marquee-logo-height: 30px;
    --marquee-speed: 34s;
  }

  .marquee-item::before {
    inset: 10px 4px;
  }

  .marquee-item img {
    max-width: 200px;
  }
}

@media (min-width: 1400px) {
  .marquee {
    --marquee-gap: 1.25rem;
    --marquee-pill-h: 76px;
    --marquee-logo-height: 32px;
    --marquee-speed: 36s;
  }

  .marquee::before,
  .marquee::after {
    width: 120px;
  }

  .marquee-item img {
    max-width: 215px;
  }
}