/* --- Общий сброс стилей --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.section4 {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: #333;
    color: white;
    width: 100%; 
    box-sizing: border-box;
    position: relative;
}

/* Контейнеры внутри section4 */
.sponsor2,
.footer-content {
    width: 100%;
    box-sizing: border-box;
}

.sponsor2 {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap; /* Перенос элементов при уменьшении ширины */
}

.footer-content {
    margin-top: 30px;
    margin-bottom: 30px;
    text-align: center;
}

.footer-photo {
    max-width: 100%;
    height: auto;
}

.social-icons2 {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.social-icons2 img {
    width: 24px;
    height: 24px;
}

h3 {
    color: white;
    margin-bottom: 10px;
}

p {
    font-size: 16px;
    margin-bottom: 8px;
}

/* Кнопка прокрутки наверх/вниз */
#scrollToTopBtn, #scrollToBottomBtn {
  display: none;
  position: fixed;
  right: 20px;
  z-index: 99;
  border: none;
  outline: none;
  background-color: #6441a5;
  color: white;
  cursor: pointer;
  padding: 14px 24px;
  border-radius: 5px;
  font-size: 16px;
  transition: background-color 0.3s;
}

#scrollToTopBtn {
  bottom: 80px; /* Кнопка "Наверх" выше */
}

#scrollToBottomBtn {
  bottom: 20px; /* Кнопка "Вниз" ниже */
}

#scrollToTopBtn:hover {
    background-color: #333;
}

.sponsor2 {
    display: flex;
    justify-content: center; 
    gap: 30px;
    flex-wrap: wrap; /* Элементы будут переноситься */
}

.sponsor h3 {
    margin-top: 30px;
    margin-bottom: 30px;
}

@media (max-width: 990px) {
    .sponsor2 {
        gap: 10px;
}
}

@media (max-width: 768px) {
    #scrollToTopBtn {
        font-size: 14px;
}
}