/* Главная: марки авто */

.homepage-brands {
  width: 100%;
  margin: 0 auto 3%;
  padding: clamp(1.5rem, 3vw, 2.5rem) 0;
  background: #f4f4f4;
}

.homepage-brands__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  margin-bottom: 1.25rem;
}

.homepage-brands h2 {
  margin: 0 0 0.35rem;
  font-family: "Geologica", sans-serif;
  font-size: clamp(1.5rem, 1.25rem + 0.8vw, 2rem);
  font-weight: 700;
  color: #1a1a1a;
}

.homepage-brands__lead {
  margin: 0;
  max-width: 36rem;
  font-family: "Montserrat", sans-serif;
  font-size: 0.9375rem;
  line-height: 1.45;
  color: #555;
}

.homepage-brands__all-link {
  font-family: "Montserrat", sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #2c3e4e;
  text-decoration: none;
  white-space: nowrap;
}

.homepage-brands__all-link:hover,
.homepage-brands__all-link:focus {
  color: #1a1a1a;
  text-decoration: underline;
}

.homepage-brands__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(0.65rem, 1.2vw, 0.85rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.homepage-brands-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 6.5rem;
  padding: 0.85rem 0.65rem;
  text-align: center;
  text-decoration: none;
  color: #1a1a1a;
  background: #fff;
  border: 1px solid rgba(26, 26, 26, 0.08);
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.homepage-brands-card:hover,
.homepage-brands-card:focus {
  transform: translateY(-2px);
  border-color: rgba(44, 62, 78, 0.18);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
  text-decoration: none;
  color: #1a1a1a;
}

.homepage-brands-card__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 2.75rem;
}

.homepage-brands-card__logo img {
  display: block;
  width: auto;
  max-width: 78%;
  max-height: 2.75rem;
  object-fit: contain;
}

.homepage-brands-card__title {
  font-family: "Montserrat", sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.25;
  color: #666;
}

.homepage-brands__footer {
  margin: 1rem 0 0;
  text-align: center;
}

.homepage-brands__footer a {
  font-family: "Montserrat", sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #3dcd67;
  text-decoration: none;
}

.homepage-brands__footer a:hover,
.homepage-brands__footer a:focus {
  color: #2c3e4e;
  text-decoration: underline;
}

@media (min-width: 768px) {
  .homepage-brands__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 992px) {
  .homepage-brands__grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@media (max-width: 479px) {
  .homepage-brands__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
