/* Our Network page. Layout follows the Duda draft; colors only via tokens.css.
   The hero map reuses the homepage's .reach__map panel (base.css); the map itself is in network-map.css. */

/* ---------- Hero: locations as text under the map (FAQ accordion, base.css) ---------- */
.network-list__heading {
  max-width: 48rem;
  margin-inline: auto;
}

.network-list__items {
  padding: 0;
  list-style: none;
}

/* From 1025px (data-columns, set by js/network-map.js): four plain columns, Member facilities
   then one per supplier, with "Supplier warehouses" over the supplier columns. The wrappers step
   aside (display: contents) so every list sits in one grid; the dropdown parts are hidden. */
.network-list[data-columns] {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-2) var(--space-3);
}

.network-list[data-columns] > *,
.network-list[data-columns] .accordion {
  display: contents;
}

.network-list[data-columns] .network-list__heading {
  grid-column: 2 / -1;
  grid-row: 1;
  max-width: none;
  margin: 0;
}

.network-list[data-columns] .accordion__item {
  grid-row: 2;
  border: 0;
}

.network-list[data-columns] .accordion__summary {
  min-height: 0;
  padding-block: 0 var(--space-1);
  cursor: default;
}

.network-list[data-columns] .accordion__summary:hover .faq-question {
  text-decoration: none;
}

.network-list[data-columns] .accordion__icon {
  display: none;
}

.network-list[data-columns] .accordion__panel {
  padding-bottom: 0;
}

/* ---------- Stats band: 2 x 2 below 1025px, 4 across above, charcoal dividers ---------- */
.network-stats {
  padding-block: var(--space-3);
  background-color: var(--stone);
}

.network-stats__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 0;
  list-style: none;
}

.network-stats__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  max-width: none;
  padding: var(--space-2);
  text-align: center;
}

.network-stats__item:nth-child(even) {
  border-left: 1px solid var(--charcoal);
}

.network-stats__item:nth-child(n + 3) {
  border-top: 1px solid var(--charcoal);
}

@media (width >= 1025px) {
  .network-stats__list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .network-stats__item:nth-child(n + 3) {
    border-top: 0;
  }

  .network-stats__item + .network-stats__item {
    border-left: 1px solid var(--charcoal);
  }
}

/* ---------- Locations: one card per member, stone top with the city, white bottom with the logo ---------- */
.locations__intro {
  margin-inline: auto;
}

.location-grid {
  display: grid;
  gap: 24px;
  padding: 0;
  list-style: none;
}

/* One column on phones, 2 × 2 on tablets, four across on desktop. */
@media (width >= 768px) {
  .location-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (width >= 1025px) {
  .location-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.location {
  display: flex;
  flex-direction: column;
  max-width: none;
  overflow: hidden;
  border: 1px solid var(--gray);
  border-radius: var(--radius-card);
}

/* Grows so the logo parts line up when one card's line wraps more than the others. */
.location__top {
  flex-grow: 1;
  padding: var(--space-3) 24px;
  background-color: var(--stone);
}

.location__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-2);
}

/* Decorative pin: orange is fine here because it carries no meaning. */
.location__head .icon {
  width: 44px;
  height: 44px;
  color: var(--orange);
}

.location__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 200px;
  padding: var(--space-2);
  background-color: var(--white);
}

.location__logo img {
  max-width: 100%;
  height: var(--logo-h, 40px);
  object-fit: contain;
}

@media (width >= 1025px) {
  .location__logo {
    height: 240px;
  }
}

@media (width < 640px) {
  .location__logo img {
    height: calc(var(--logo-h, 40px) * 0.75);
  }
}
