/* Стили для футера */
.footer {
    background-color: #f9f9f9;
    padding: 40px 0;
    /*border-top: 1px solid #eaeaea;*/
    margin-top: 40px;
    position: relative;
}

/* Отступ перед футером */
.footer::before {
    content: '';
    position: absolute;
    top: -40px;
    left: 0;
    right: 0;
    height: 40px;
    background-color: #f8f9fa;
}

.footer .container {
    max-width: 100%;
    margin: 0;
    padding: 0 20px;
}

.footer__middle {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    align-items: flex-end;
}

.footer__info p {
    margin: 8px 0;
    color: #666;
    font-size: 16px;
    line-height: 1.5;
}

.footer__right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-end;
    position: relative;
}

/* Принудительно сбрасываем gap для всех элементов в правой части футера */
.footer__right * {
    gap: unset !important;
}

.footer__workspace {
    color: #666;
    text-decoration: underline;
    font-size: 16px;
    transition: color 0.3s ease;
    margin-bottom: 15px;
    display: block;
}

.footer__workspace:hover {
    color: #FF6B00;
}

.footer__phone {
    font-size: 20px;
    color: #333;
    text-decoration: none;
    margin-bottom: 15px;
    transition: color 0.3s ease;
    position: relative;
    top: -20px;
}

.footer__phone:hover {
    color: #FF6B00;
}

.footer__documents {
    display: flex;
    flex-direction: column;
    gap: 20px !important;
    align-items: flex-end;
    position: relative;
    top: -20px;
}

/* Принудительно переопределяем gap для всех элементов в футере */
.footer * {
    gap: unset !important;
}

.footer__documents {
    gap: 20px !important;
}

/* Максимально специфичное правило для документов в футере */
.footer .footer__right .footer__documents {
    gap: 20px !important;
}

.footer__documents a {
    color: #666;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s ease;
    border-bottom: 1px solid transparent;
}

.footer__documents a:hover {
    color: #FF6B00;
    border-bottom-color: #FF6B00;
}

@media (max-width: 768px) {
    
    .footer__middle {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
    }
    
    .footer__right {
        align-items: flex-start;
        width: 100%;
    }
    
    .footer__workspace {
        font-size: 16px;
        margin-bottom: 10px;
        text-align: left;
    }
    
    .footer__phone {
        top: 0;
        font-size: 18px;
        text-align: left;
    }
    
    .footer__documents {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px !important;
        top: 0;
    }
    
    .footer__documents a {
        margin-right: 0;
        text-align: left;
    }
    
    .footer__info {
        text-align: left;
    }
    
    .footer__info p {
        text-align: left;
    }
}