/* ===== Reset base utile ===== */
body {
  margin: 0;
  background-color: #FEF1F6;
}

/* ===== Marquee (scorrimento loghi) ===== */
.marquee {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);

  box-sizing: border-box;
  --gutter: 64px;              /* spazio laterale ampio su desktop */
  padding: 0 var(--gutter);

  height: 300px;               /* molto pił alta su PC */
  position: relative;
  overflow: hidden;
  background-color: #FFFFFF;
  margin-top: 70px;
  margin-bottom: 70px;
  box-shadow:
    0 -6px 12px rgba(0, 0, 0, 0.25),
    0  6px 12px rgba(0, 0, 0, 0.25);
}

.marquee__inner {
  display: inline-flex;
  align-items: center;
  height: 100%;
  animation: marquee 25s linear infinite; /* pił lento per fascia grande */
}

.marquee__inner img {
  display: block;
  max-height: 85%;             /* loghi giganti: 85% di 300px  255px */
  height: auto;
  width: auto;
  margin-right: 80px;          /* pił distanziati */
  object-fit: contain;
}

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

/* ===== Sezione loghi statica ===== */
.loghi {
  max-width: 1600px;           /* contenitore extra largo */
  margin: 0 auto;
  padding: 50px 32px;
}

.loghi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* card pił grandi */
  gap: 32px 36px;
  align-items: center;
}

.loghi-grid a,
.loghi-grid .logo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 22px;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 20px;
  transition: transform .15s ease, opacity .15s ease, filter .15s ease;
}

.loghi-grid img {
  display: block;
  max-width: 100%;
  max-height: 180px;           /* loghi davvero grandi nella griglia */
  height: auto;
  width: auto;
  object-fit: contain;
}

/* ===== Breakpoints ===== */
@media (max-width: 768px) {
  .marquee {
    --gutter: 24px;
    height: 160px;             /* tablet medio */
  }
  .marquee__inner img {
    max-height: 75%;
    margin-right: 40px;
  }

  .loghi { padding: 28px 18px; }
  .loghi-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 20px;
  }
  .loghi-grid img { max-height: 110px; }
}

@media (max-width: 480px) {
  .marquee {
    --gutter: 16px;
    height: 110px;             /* mobile pił compatto */
  }
  .marquee__inner img {
    max-height: 70%;
    margin-right: 24px;
  }

  .loghi { padding: 18px 12px; }
  .loghi-grid {
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    gap: 14px;
  }
  .loghi-grid a,
  .loghi-grid .logo {
    padding: 8px 10px;
    border-radius: 12px;
  }
  .loghi-grid img { max-height: 70px; }
}