/**
 * Подвал сайта.
 */

/* ==========================================================================
   Основной контейнер футера
   ========================================================================== */

.site-footer {
    flex: 0 0 auto;
    color: var(--color-content);
    background-color: #b5cbe6;
    border-top: 1px solid rgba(67, 103, 151, 0.35);
    font-family: var(--font-content);
}

/* ==========================================================================
   Верхняя часть футера
   ========================================================================== */

.site-footer__main {
    padding: 30px 0 0px;
}

.site-footer__title {
    margin: 0 0 26px;
    color: #244f7d;
    font-family: var(--font-content);
    font-size: clamp(28px, 2vw, 36px);
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: 0.015em;
    text-align: center;
}

/* ==========================================================================
   Список официальных страниц
   ========================================================================== */

.site-footer__links {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 0 42px;

    padding: 0;
    margin: 0;
    list-style: none;
}

.site-footer__item {
    flex: 0 0 130px;
}

.site-footer__link {
    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: flex-start;
    min-height: 170px;
    color: #2f5d96;
    text-decoration: none;
    transition:
        color 180ms ease,
        transform 180ms ease;
}

.site-footer__link:hover,
.site-footer__link:focus-visible {
    color: #244f7d;
    transform: translateY(-4px);
}

.site-footer__link:focus-visible {
    outline: 2px solid #2f5d96;
    outline-offset: 6px;
    border-radius: 8px;
}

/* ==========================================================================
   Иконки
   ========================================================================== */

.site-footer__icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 112px;
    height: 104px;
    margin-bottom: 5px;
}

.site-footer__icon {
    display: block;
    width: auto;
    max-width: 100px;
    height: auto;
    max-height: 100px;
    object-fit: contain;
    transition:
        transform 180ms ease,
        filter 180ms ease,
        opacity 180ms ease;
}

.site-footer__link:hover .site-footer__icon,
.site-footer__link:focus-visible .site-footer__icon {
    opacity: 0.94;
    transform: scale(1.07);
}

/*
 * У YouTube исходное изображение шире остальных.
 * Немного ограничиваем его, чтобы визуально сохранить общий масштаб.
 */
.site-footer__item:nth-child(3) .site-footer__icon {
    max-width: 112px;
}



/* ==========================================================================
   Подписи под иконками
   ========================================================================== */

.site-footer__link-title {
    display: block;
    max-width: 150px;
    font-size: 19px;
    font-weight: 500;
    line-height: 1.35;
    text-align: center;
}

/* ==========================================================================
   Нижняя часть футера
   ========================================================================== */

.site-footer__bottom {
    border-top: 1px solid rgba(67, 103, 151, 0.3);
}

.site-footer__bottom-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 66px;
    padding: 16px 0;
}

.site-footer__copyright {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 10px;
    margin: 0;
    color: #436797;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.45;
    text-align: center;
}

.site-footer__copyright-name {
    font-weight: 600;
    text-transform: uppercase;
}

/* ==========================================================================
   Кнопка «Наверх»
   ========================================================================== */

.scroll-to-top {
    position: fixed;
    z-index: 1000;
    right: 28px;
    bottom: 28px;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 52px;
    height: 52px;
    padding: 0;

    color: #244f7d;
    background-color: rgba(181, 203, 230, 0.96);
    border: 2px solid rgba(47, 93, 150, 0.75);
    border-radius: 50%;

    cursor: pointer;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(14px);

    transition:
        opacity 220ms ease,
        visibility 220ms ease,
        transform 220ms ease,
        color 180ms ease,
        background-color 180ms ease,
        border-color 180ms ease;
		
	box-shadow: 0 4px 14px rgba(36, 79, 125, 0.16);	
}

.scroll-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.scroll-to-top:hover,
.scroll-to-top:focus-visible {
    color: #ffffff;
    background-color: #2f5d96;
    border-color: #2f5d96;
	box-shadow: 0 8px 22px rgba(36, 79, 125, 0.28);
    transform: translateY(-3px) scale(1.04);
}

.scroll-to-top:focus-visible {
    outline: 3px solid rgba(47, 93, 150, 0.35);
    outline-offset: 4px;
}

.scroll-to-top__icon {
    position: relative;
    display: block;
    width: 16px;
    height: 18px;
}

/* Вертикальная часть стрелки */
.scroll-to-top__icon::before {
    position: absolute;
    top: 3px;
    left: 50%;
    width: 2px;
    height: 14px;
    background-color: currentColor;
    border-radius: 2px;
    content: "";
    transform: translateX(-50%);
}

/* Наконечник стрелки */
.scroll-to-top__icon::after {
    position: absolute;
    top: 2px;
    left: 50%;
    width: 9px;
    height: 9px;
    border-top: 2px solid currentColor;
    border-left: 2px solid currentColor;
    content: "";
    transform: translateX(-50%) rotate(45deg);
}