.footer {
    background-color: var(--footer-panel-color);
    padding: 32px 0 16px 0;
}

.footer .container {
	display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    flex-direction: column;
    -webkit-box-pack: start;
    justify-content: flex-start;
    -webkit-box-align: stretch;
    align-items: stretch;
    flex-wrap: nowrap;
	max-width: var(--content-width);
    margin: 0 auto;
	gap: 16px;
    padding: 16px;
}

.footer__main {
    border-bottom: 1px solid var(--accent-color);
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    padding-bottom: 24px;
    color: var(--footer-panel-text-color);
    gap: 40px;
    justify-items: start; /* Лучше чем center, так как текст начинается с одной линии */
    position: relative;
}

/* Адаптив */
@media (max-width: 992px) {
    .footer__main {
        gap: 30px;
        padding: 40px 0 35px;
    }
}

@media (max-width: 550px) {
    .footer__main {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
        gap: 35px;
        padding: 35px 20px 30px;
    }
    
    .footer__main::before {
        left: 50%;
        transform: translateX(-50%);
        width: 100px;
    }
}

/* Виджет-айтемы */
.page-footer__widget_item {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

@media (max-width: 768px) {
    .page-footer__widget_item {
        align-items: center;
    }
}

/* Логотип */
.page-footer__widget_item .image {
    max-width: 150px!important;
    height: auto;
    transition: all 0.3s ease;
}

/* Меню */
.page-footer__widget_item ul {
    display: flex;
    list-style: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin: 0;
    padding: 0;
}

@media (max-width: 768px) {
    .page-footer__widget_item ul {
        align-items: center;
    }
}

/* Ссылки */
.page-footer__widget_item a {
    font-size: 15px;
    font-weight: 500;
    line-height: 24px;
    text-decoration: none;
    text-transform: uppercase;
    color: var(--footer-panel-text-color);
    transition: all 0.25s ease;
    position: relative;
    padding-bottom: 4px;
    letter-spacing: 0.5px;
}

/* Эффект подчёркивания при ховере */
.page-footer__widget_item a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-color), var(--footer-panel-text-color-hover));
    transition: width 0.3s ease;
}

@media (max-width: 768px) {
    .page-footer__widget_item a::after {
        left: 50%;
        transform: translateX(-50%);
    }
}

.page-footer__widget_item a:hover {
    color: var(--footer-panel-text-color-hover);
}

.page-footer__widget_item a:hover::after {
    width: 100%;
}

/* Текстовый виджет (custom-html-widget) */
.page-footer__widget_item .textwidget.custom-html-widget {
    margin-top: 8px;
}

.page-footer__widget_item .textwidget p {
    font-size: 13px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    letter-spacing: 0.3px;
}

@media (max-width: 768px) {
    .page-footer__widget_item .textwidget p {
        text-align: center;
    }
}

.modal-btn {
    display: flex;
    gap: 10px;
    flex-flow: row wrap;
    outline: none;
    background: none;
    padding: 0;
    border: none;
}
.modal-btn span {
    border-radius: 4px;
    padding: 1px 4px;
    border: 1px solid #ffffff4d;
    font-size: 11px;
    line-height: 13px;
}

@media screen and (max-width: 576px) {
    .support__item {
        grid-template-columns: 1fr;
    }
    .devices {
        grid-template-columns: 1fr;
    }
    .devices__item:last-child {
        display: none;
    }
}

@media screen and (max-width: 420px) {
    .subscribe__form {
        flex-flow: column;
    }
}

.widgettitle {
	text-transform: uppercase;
	letter-spacing: 0.5px;
    font-size: 15px;
    font-weight: 500;
    line-height: 24px;
}

.modal {
    position: fixed;
    bottom: -100%;
    right: 0;
    left: 0;
    width: calc(100% - 40px);
    max-width: 540px;
    height: 85dvh;
    display: flex;
    gap: 20px;
    flex-flow: column;
    margin: auto;
    padding: 32px;
    border-radius: 12px;
    background-color: var(--bg-color);
    overflow: hidden;
    z-index: 100;
}
.modal.show {
    bottom: 0;
    top: 0;
}
.modal__header {
    display: flex;
    gap: 20px;
    justify-content: space-between;
    align-items: center;
}
.modal__title {
    margin: 0;
    font-size: 20px;
    line-height: 24px;
    font-weight: 700;
}
.modal-close {
    padding: 8px;
    background: var(--color-light);
    border-radius: 99px;
    border: none;
}

.modal__content {
    max-height: 85dvh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-color: #232325 var(--bg-color);
    scrollbar-width: thin;
}

.overlay {
    display: none;
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    inset-inline-start: 0;
    background-color: rgb(0 0 0 / .5);
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: .3s;
    z-index: 90;
}
.overlay.show {
    display: block;
    opacity: 1;
}