/**
 * Spolupracujeme page — design layer.
 *
 * The page shell (breadcrumb, leaf headline, lead, content card, eco h2, teal
 * CTA band, feature strip) is the Ekomateriály layer: pages/ekomaterialy.css is
 * enqueued alongside this file. Only what this page adds lives here, scoped
 * under .spolupraca so the generic names (.sp-*) never leak.
 *
 * Like Výhradné zastúpenie the page drops the shell's .eko-layout grid and its
 * sticky .eko-nav — the logo strip indexes the page, so .eko-content stands
 * alone inside .wrap and only needs the top margin the grid used to give it.
 */

/* ---- Standalone content card (no .eko-layout parent) --------------------- */
.spolupraca .eko-content { margin-top: var(--space-7); }

/* ---- Logo strip ----------------------------------------------------------
   The legacy six-up gallery. Partner artwork comes in wildly different aspect
   ratios, so each tile contains its logo (never crops, never stretches) in a
   square box — the .es-gallery recipe from Eko štart. */
.spolupraca .sp-logos {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: var(--space-3);
}
.spolupraca .sp-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: var(--space-2);
  aspect-ratio: 1 / 1;
  overflow: hidden;
  transition: transform .12s, box-shadow .12s, border-color .12s;
}
.spolupraca .sp-logo:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
  border-color: var(--line-hover);
}
.spolupraca .sp-logo-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ---- Partner block -------------------------------------------------------
   Text + logo, logo side alternating as on the legacy rows. The .mat-block
   pattern would hand the wide column to the image on .media-left; these are
   cut-out logos that cannot carry that width, so the media column stays a fixed
   280px on both sides and only the source order flips. */
.spolupraca .sp-partner { margin-bottom: var(--space-8); }
.spolupraca .sp-partner.has-media {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: var(--space-7);
  align-items: center;
}
/* The columns flip, not just the order: `order` alone would move the media into
   the wide 1fr cell and squeeze the copy into 280px — the .mat-block gotcha. */
.spolupraca .sp-partner.media-left.has-media {
  grid-template-columns: 280px minmax(0, 1fr);
}
.spolupraca .sp-partner.media-left.has-media .sp-partner-media { order: -1; }
.spolupraca .sp-partner-text p { margin-bottom: var(--space-4); }
.spolupraca .sp-partner-media {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  aspect-ratio: 1 / 1;
  overflow: hidden;
}
.spolupraca .sp-partner-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ---- "Prejsť na web" button ---------------------------------------------
   Ghost button: .ghost-btn lives in home.css (front page only), so the page
   ships its own copy — same recipe, per the kontakt / eko-cta precedent. */
.spolupraca .sp-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-md);
  padding: 10px 18px;
  background: var(--bg);
  color: var(--teal);
  font-size: 14px;
  font-weight: 700;
  transition: background .12s, border-color .12s;
}
.spolupraca .sp-btn:hover {
  background: var(--teal-50);
  border-color: var(--teal-line);
  text-decoration: none;
}
.spolupraca .sp-btn svg { width: 15px; height: 15px; }

/* ---- Responsive ---------------------------------------------------------- */
@media (max-width: 980px) {
  .spolupraca .eko-content { margin-top: var(--space-5); }
  .spolupraca .sp-logos { grid-template-columns: repeat(4, 1fr); }
  /* .media-left is repeated so this beats the flipped-column rule above. */
  .spolupraca .sp-partner.has-media,
  .spolupraca .sp-partner.media-left.has-media {
    grid-template-columns: 1fr;
    gap: var(--space-5);
  }
  /* Stacked: the logo always leads, whichever side it took on desktop. */
  .spolupraca .sp-partner.has-media .sp-partner-media { order: -1; }
  .spolupraca .sp-partner-media {
    aspect-ratio: auto;
    max-width: 240px;
    padding: var(--space-3);
  }
}

@media (max-width: 600px) {
  .spolupraca .sp-logos {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-2);
  }
  .spolupraca .sp-partner { margin-bottom: var(--space-6); }
  .spolupraca .sp-partner-media { max-width: 180px; }
}
