#partners {
  background:
    radial-gradient(circle at 88% 10%, rgba(229, 26, 35, 0.07), transparent 24rem),
    linear-gradient(180deg, #fff 0%, #fffafa 100%);
}

#partners .section-head {
  max-width: 790px;
}

.partner-controls {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin: 34px 0 28px;
  padding: 20px 22px;
  border: 1px solid #eadfe0;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 40px rgba(31, 14, 16, 0.06);
}

.partner-filter {
  display: grid;
  gap: 8px;
  width: min(100%, 360px);
}

.partner-filter-label {
  color: #5d5152;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.partner-select-shell {
  position: relative;
}

.partner-select-shell::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 18px;
  width: 8px;
  height: 8px;
  border-right: 2px solid #1d1516;
  border-bottom: 2px solid #1d1516;
  pointer-events: none;
  transform: translateY(-70%) rotate(45deg);
}

.partner-country-select {
  width: 100%;
  min-height: 52px;
  padding: 0 48px 0 16px;
  border: 1px solid #d9cbcd;
  border-radius: 12px;
  outline: none;
  background: #fff;
  color: #191313;
  font: inherit;
  font-weight: 800;
  appearance: none;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.partner-country-select:hover,
.partner-country-select:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 4px rgba(229, 26, 35, 0.1);
}

.partner-count {
  padding-bottom: 14px;
  color: #75686a;
  font-size: 14px;
  font-weight: 700;
  text-align: right;
}

.partners {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  align-items: stretch;
}

.partner {
  display: flex;
  min-width: 0;
  min-height: 100%;
  overflow: hidden;
  border: 1px solid #eadfe0;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(32, 18, 20, 0.045);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.partner:hover {
  border-color: rgba(229, 26, 35, 0.34);
  box-shadow: 0 18px 42px rgba(70, 19, 23, 0.1);
  transform: translateY(-4px);
}

.partner-card-inner {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.partner-logo-panel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 154px;
  padding: 28px 30px;
  overflow: hidden;
  border-bottom: 1px solid #666a70;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.07), transparent 52%),
    #74777d;
}

.partner-logo-panel::before {
  content: "";
  position: absolute;
  top: -54px;
  right: -42px;
  width: 150px;
  height: 150px;
  border: 28px solid rgba(255, 255, 255, 0.075);
  border-radius: 50%;
}

.partner-logo {
  position: relative;
  z-index: 1;
  display: block;
  width: auto;
  max-width: 84%;
  height: auto;
  max-height: 88px;
  object-fit: contain;
  filter:
    saturate(0.98)
    drop-shadow(0 0 1px rgba(255, 255, 255, 0.22))
    drop-shadow(0 3px 5px rgba(12, 13, 15, 0.34));
  transition: transform 0.25s ease;
}

.partner:hover .partner-logo {
  transform: scale(1.035);
}

.partner-logo-fallback {
  position: relative;
  z-index: 1;
  display: none;
  align-items: center;
  justify-content: center;
  width: 82px;
  height: 82px;
  border-radius: 20px;
  background: #201819;
  color: #fff;
  font-size: 25px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.partner-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 24px;
}

.partner-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 13px;
}

.partner-country,
.partner-rank {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.partner-country {
  background: #f7e8e9;
  color: #a3151c;
}

.partner-rank {
  border: 1px solid #e4d8da;
  background: #fff;
  color: #6b5c5e;
}

.partner-title {
  margin: 0 0 12px;
  font-size: 22px;
  line-height: 1.18;
}

.partner-title a {
  display: inline;
  color: #161111;
  text-decoration: none;
  background-image: linear-gradient(var(--red), var(--red));
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 0 2px;
  transition: color 0.2s ease, background-size 0.25s ease;
}

.partner-title a::after {
  content: " ↗";
  color: var(--red);
  font-size: 0.75em;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.partner:hover .partner-title a,
.partner-title a:hover,
.partner-title a:focus-visible {
  color: var(--red);
  background-size: 100% 2px;
}

.partner:hover .partner-title a::after,
.partner-title a:hover::after,
.partner-title a:focus-visible::after {
  opacity: 1;
}

.partner-description {
  margin: 0;
  color: #6a5e60;
  font-size: 14px;
  line-height: 1.58;
}

.partner .factline {
  margin: auto 0 0;
  padding-top: 16px;
  border-top: 1px solid #eee4e5;
  color: var(--red) !important;
  font-size: 14px;
  font-weight: 850;
  line-height: 1.48;
}

.partner-empty {
  grid-column: 1 / -1;
  padding: 48px 24px;
  border: 1px dashed #dbcacc;
  border-radius: 18px;
  color: #6f6264;
  text-align: center;
}

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

@media (max-width: 640px) {
  .partner-controls {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
    padding: 18px;
  }

  .partner-filter {
    width: 100%;
  }

  .partner-count {
    padding: 0;
    text-align: left;
  }

  .partners {
    grid-template-columns: 1fr;
  }

  .partner-logo-panel {
    height: 142px;
  }
}

@media (max-width: 520px) {
  header .nav {
    gap: 5px;
  }

  header .aiu-brand-logo {
    width: 100px;
  }

  header .site-brand {
    gap: 5px;
  }

  header .site-brand .into-mark {
    width: 54px;
    height: 29px;
    padding-left: 5px;
  }

  header .langs {
    gap: 1px;
  }

  header .langs button {
    padding: 6px 5px;
    font-size: 11px;
  }

  header .menu {
    margin-left: 1px;
    font-size: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .partner,
  .partner-logo,
  .partner-title a {
    transition: none;
  }
}
