/* ============================================
   LOGO LIST — BASE
   ------------------------------------------------------------
   Images are aspect-preserved (NOT forced to 1:1).
   Width and max-height are set dynamically per section
   via inline <style> in image--logo-list.liquid.
   Typography selectors use 1-class specificity so inline
   styles win without !important.
   ============================================ */

.logo-list-section {
  margin: 0;
}

/* Desktop: flex row.
   safe center keeps centering when items fit, falls back to flex-start
   when they don't — first item always fully visible, scroll right to see rest.
   Per-section inline <style> overrides flex-wrap/overflow based on desktop_mode. */
.logo-bar-logo {
  display: flex;
  align-items: center;
  justify-content: safe center;
  gap: 15px;
  padding: 0 50px;
  list-style: none;
  margin: 0;
}

.logo-bar__item {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  flex-shrink: 0;
  margin: 0 !important;
}

.logo-bar__item img,
.logo-bar__image {
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

/* ------ TYPOGRAPHY DEFAULTS — 1-class specificity so inline can override ------ */
.image_logo--title {
  margin: 18px 0 14px;
  text-align: center;
  white-space: normal;
  line-height: 1.5;
}

.image_logo--text {
  margin: 0 0 15px;
  text-align: center;
  white-space: normal;
  line-height: 1.5;
}

/* Tablet — allow wrap, reduce gap */
@media screen and (max-width: 900px) {
  .logo-bar-logo {
    flex-wrap: wrap;
    gap: 15px;
    padding: 0 25px;
    justify-content: center;
  }
}

/* Link reset */
.logo-bar__link {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.placeholder-noblocks {
  padding: 20px;
  text-align: center;
}

/* ============================================
   MOBILE — SINGLE COLUMN
   Belt-and-suspenders centering: margin:auto wins
   even if flex align-items somehow loses to inline overrides.
   ============================================ */

.logo-bar-section-mobile {
  text-align: center;
  width: 100%;
}

.logo-bar-logo--single-col {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  flex-wrap: nowrap !important;
  gap: 16px;
  padding: 0 16px !important;
  text-align: center !important;
  margin: 0 auto !important;
  width: 100%;
  box-sizing: border-box;
}

/* 3-class specificity (.homepage-sections-wrapper + .logo-bar-logo--single-col + .logo-bar__item)
   beats inline section <style> rule (.homepage-sections-wrapper-X + .logo-bar__item = 2 classes).
   This guarantees mobile single-column items center horizontally even if inline 'margin: 0 !important'
   tries to win the cascade. */
.homepage-sections-wrapper .logo-bar-logo--single-col > .logo-bar__item,
.logo-bar-section-mobile .logo-bar-logo--single-col > .logo-bar__item {
  margin-left: auto !important;
  margin-right: auto !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  flex-direction: column !important;
}

.logo-bar-logo--single-col .image_logo--title,
.logo-bar-logo--single-col .image_logo--text {
  text-align: center !important;
  width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* ============================================
   MOBILE MARQUEE
   ============================================ */

.mobile-marquee-section {
  display: none;
  overflow: hidden;
  contain: layout style;
  width: 100%;
}

@media screen and (max-width: 767px) {
  .mobile-marquee-section--active {
    display: block;
  }
}

.mobile-marquee-row {
  overflow: hidden;
  width: 100%;
  margin-bottom: 14px;
  position: relative;
}

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

.mobile-marquee-track {
  display: flex;
  align-items: center;
  gap: 24px;
  white-space: nowrap;
  flex-shrink: 0;
  list-style: none;
  margin: 0;
  padding: 0;
  width: max-content;
}

.mobile-marquee-track .logo-bar__item {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0 8px;
  white-space: normal;
  vertical-align: top;
  text-align: center;
}

.mobile-marquee-track .logo-bar__item img {
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

@media screen and (max-width: 767px) {
  .image_logo--title {
    word-break: break-word;
    overflow-wrap: break-word;
    width: 100%;
  }
  .image_logo--text {
    word-break: break-word;
    overflow-wrap: break-word;
    width: 100%;
  }
}

/* ============================================
   MOBILE SLIDER (swiper)
   ============================================ */

.swiper-no-overflows {
  overflow: hidden;
  position: relative;
  padding-bottom: 0 !important;
}

.logo-bar-section-mobile {
  display: none;
  margin: 0;
  padding: 0;
}

@media screen and (max-width: 767px) {
  .logo-bar-section-mobile--show {
    display: block;
  }
}

.logo-bar-section-mobile .swiper-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 60px;
  box-sizing: border-box;
  height: auto !important;
}

.logo-bar-section-mobile .swiper-slide img,
.logo-bar-section-mobile .swiper-slide .logo-bar__image {
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

.logo-bar-section-mobile .swiper-slide .logo-bar__item,
.logo-bar-section-mobile .swiper-slide > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

[class*="swiper-button-prev-"],
[class*="swiper-button-next-"] {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 36px;
  height: 36px;
  padding: 6px;
  box-sizing: border-box;
  cursor: pointer;
  background-color: #ffffff;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

[class*="swiper-button-prev-"] svg,
[class*="swiper-button-next-"] svg {
  width: 20px;
  height: 20px;
  position: relative;
  top: auto;
}

[class*="swiper-button-prev-"] { left: 6px; }
[class*="swiper-button-prev-"] svg { left: 0; }
[class*="swiper-button-next-"] { right: 6px; }
[class*="swiper-button-next-"] svg { right: 0; }
