.city-select-box {
  position: relative;
  display: inline-block;
  width: 100%;
  max-width: 300px;
}

.city-select-box__selected {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 15px;
  background: #ffffff;
  border: 1px solid #d8d8d8;
  border-radius: 2px;
  cursor: pointer;
  font-size: 14px;
  color: #333333;
  transition: all 0.2s ease;
  user-select: none;
}

.city-select-box__selected:hover {
  border-color: #2363d1;
}

.city-select-box__selected-text {
  flex: 1;
}

.city-select-box__arrow {
  width: 12px;
  height: 12px;
  margin-left: 10px;
  transition: transform 0.2s ease;
  color: #999999;
}

.city-select-box.active .city-select-box__arrow {
  transform: rotate(180deg);
}

.city-select-box__dropdown {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid #d8d8d8;
  border-radius: 2px;
  z-index: 1000;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.city-select-box.open .city-select-box__dropdown {
  max-height: 400px;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.city-select-box__search {
  position: relative;
  padding: 10px 12px;
  border-bottom: 1px solid #e8e8e8;
  flex-shrink: 0;
  background: #f8f9fa;
}

.city-select-box__search-input {
  width: 100%;
  padding: 8px 36px 8px 12px;
  border: 1px solid #d8d8d8;
  border-radius: 2px;
  font-size: 14px;
  outline: none;
  transition: all 0.2s ease;
  background: #ffffff;
  color: #333333;
  font-family: inherit;
}

.city-select-box__search-input:focus {
  border-color: #2363d1;
}

.city-select-box__search-input::placeholder {
  color: #999999;
  font-size: 13px;
}

.city-select-box__search-icon {
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  color: #999999;
  pointer-events: none;
}

.city-select-box__options {
  list-style: none;
  margin: 0;
  padding: 6px 0;
  overflow-y: auto;
  max-height: 300px;
}

.city-select-box__option {
  padding: 10px 15px;
  cursor: pointer;
  font-size: 14px;
  color: #333333;
  transition: all 0.15s ease;
}

.city-select-box__option:hover {
  background: #f0f4ff;
  color: #2363d1;
}

.city-select-box__option.selected {
  background: #e5efff;
  color: #2363d1;
  font-weight: 500;
}

.city-select-box__option.hidden {
  display: none;
}

.affiliate-network {
  margin-bottom: 60px;
}

.affiliate-network__city-title {
  font-size: 32px;
  font-weight: 600;
  color: #333333;
  margin-bottom: 30px;
}

.affiliate-network__partners {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.partner-card {
  background: #ffffff;
  border: 1px solid #e8e8e8;
  border-radius: 4px;
  padding: 20px;
  transition: all 0.2s ease;
}

.partner-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border-color: #2363d1;
}

.partner-card__name {
  font-size: 16px;
  font-weight: 600;
  color: #333333;
  margin-bottom: 10px;
}

.partner-card__address {
  font-size: 14px;
  color: #666666;
  margin-bottom: 8px;
}

.partner-card__phone {
  font-size: 14px;
  color: #2363d1;
  text-decoration: none;
}

.partner-card__phone:hover {
  text-decoration: underline;
}

.btn-show-more {
  display: inline-block;
  padding: 14px 40px;
  background: #2363d1;
  color: #ffffff;
  border: none;
  border-radius: 2px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.btn-show-more:hover {
  background: #1c52ac;
}

.btn-show-more:active {
  transform: translateY(1px);
}

.partners-map-wrapper {
  margin-bottom: 40px;
}

.partners-cities-wrapper {
  margin-top: 40px;
}

.favorite-in-img {
  position: absolute;
  bottom: 10px;
  right: 10px;
  padding: 0;
  border: none;
  width: auto;
  max-width: none;
  min-width: auto;
  height: auto;
  background-color: transparent;
  z-index: 10;
}

.favorite-in-img:hover,
.favorite-in-img:active {
  background-color: transparent;
}

@media (max-width: 768px) {
  .affiliate-network__city-title {
    font-size: 24px;
  }
  
  .affiliate-network {
    margin-bottom: 40px;
  }
  
  .btn-show-more {
    padding: 12px 32px;
    font-size: 14px;
  }
  
  .partners-map-wrapper {
    margin-bottom: 30px;
  }
  
  .partners-cities-wrapper {
    margin-top: 30px;
  }
}

.projects-search-container {
  margin-bottom: 20px;
}

.projects-search {
  position: relative;
  display: inline-block;
}

.projects-search__input {
  width: 288px;
  height: 40px;
  padding: 10px 50px 10px 15px;
  border: 1px solid #d8d8d8;
  border-radius: 2px;
  font-size: 14px;
  outline: none;
  transition: all 0.2s ease;
  background: #ffffff;
  color: #333333;
  font-family: inherit;
  opacity: 1;
  gap: 10px;
}

.projects-search__input:focus {
  border-color: #2363d1;
}

.projects-search__input::placeholder {
  color: #333333;
  font-size: 14px;
}

.projects-search__button {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  color: #999999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.projects-search__button:hover {
  color: #2363d1;
}

.projects-search__button .icon-svg {
  width: 18px;
  height: 18px;
}

.projects-content {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  column-gap: 15px;
  row-gap: 20px;
  margin-bottom: 40px;
}

.project-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: all 0.3s ease;
}

.project-card-image {
  position: relative;
  width: 100%;
  aspect-ratio: 1.52;
  overflow: hidden;
}

.project-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.project-card:hover .project-card-image img {
  transform: scale(1.05);
}

.project-card-badge {
  position: absolute;
  bottom: 15px;
  left: 15px;
  background: #2363d1;
  color: #ffffff;
  padding: 8px 10px;
  border-radius: 2px;
  font-size: 12px;
  font-weight: 400;
  z-index: 2;
}

.project-card-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  gap: 15px;
}

.project-card-title {
  flex: 1;
  font-size: 14px;
  font-weight: 400;
  color: #333333;
  margin: 0;
  line-height: 130%;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.project-card-button {
  flex-shrink: 0;
  padding: 10px 24px;
  background: #2363d1;
  color: #ffffff;
  text-decoration: none;
  border-radius: 2px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.project-card-button:hover {
  background: #1c52ac;
}

@media (max-width: 1200px) {
  .projects-content {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 992px) {
  .projects-content {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .projects-search__input {
    width: 100%;
    max-width: 288px;
  }
  
  .projects-content {
    gap: 10px;
  }
  
  .project-card-image {
    height: 120px;
  }

  .project-card-badge {
    display: none;
  }
  
  .project-card-content {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .project-card-button {
    width: 100%;
    text-align: center;
  }

  .project-card-title {
    -webkit-line-clamp: 3;
  }
}
