/* Стили для кнопки модального окна */
.modal-button {
    background-color: #ca2030;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    line-height: 1.5;
    white-space: nowrap;
}
.modal-content .contacts{
    display: flex;
    margin: 40px 0;
}
.modal-content .contacts .contact{
    display: flex;
    flex-direction: row;
    width: 50%;
    gap: 10px;
    align-items: center;
}
.modal-content .contacts .contact svg.flag{
    width: 45px;
    height: 45px;
}

.modal-content .contacts .contact .info p{
    margin-bottom: 0;
}

.modal-content .btn:hover{
    color: white;
}

.modal-content .btn{
    display: flex;
    justify-self: center;
}

.modal-button:hover {
    background-color: #a51824;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(202, 32, 48, 0.3);
    color: #fff;
}

.modal-button:active {
    transform: translateY(0);
}

/* Основные стили для модального окна */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 999999;
    opacity: 0;
    transition: opacity 0.3s ease;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    position: relative;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    margin: 0 auto;
    animation: modalSlideIn 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.modal-header {
    padding: 24px 30px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.modal-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #0F172A;
}

.modal-close {
    background: none;
    border: none;
    font-size: 36px;
    line-height: 1;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    border-radius: 4px;
    flex-shrink: 0;
}

.modal-close:hover {
    background-color: #e9ecef;
    color: #000;
}

.modal-close:active {
    background-color: #dee2e6;
}

.modal-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
    color: #333;
    font-size: 16px;
    line-height: 1.6;
}

.modal-footer {
    padding: 20px 30px;
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
    text-align: right;
    flex-shrink: 0;
}

/* Запрет прокрутки основного контента при открытии модалки */
body.modal-open {
    overflow: hidden;
}

/* Адаптивность для планшетов */
@media (max-width: 768px) {
    .modal-content {
        max-width: 95%;
        border-radius: 8px;
    }

    .modal-header {
        padding: 20px;
    }

    .modal-header h2 {
        font-size: 20px;
    }

    .modal-body {
        padding: 20px;
        font-size: 15px;
    }

    .modal-footer {
        padding: 16px 20px;
    }

    .modal-button {
        padding: 10px 20px;
        font-size: 15px;
    }
}
.mobile-link{
    display: none;
}
/* Адаптивность для мобильных устройств */
@media (max-width: 480px) {
    .mobile-link{
        display: block;
        margin-left: auto;
    }
    .mobile-link i{
        font-size: 24px;
    }
    .modal-content .contacts .contact{
        width: 100%
    }
    .modal-content .contacts{
        flex-wrap: wrap;
        gap: 20px
    }
    .modal-overlay {
        padding: 10px;
    }

    .modal-content {
        max-width: 100%;
        max-height: 95vh;
        border-radius: 8px;
    }

    .modal-header {
        padding: 16px;
    }

    .modal-header h2 {
        font-size: 18px;
    }

    .modal-close {
        font-size: 32px;
        width: 36px;
        height: 36px;
    }

    .modal-body {
        padding: 16px;
        font-size: 14px;
    }

    .modal-footer {
        padding: 12px 16px;
    }

    .modal-button {
        padding: 8px 16px;
        font-size: 14px;
    }
}

/* Управление видимостью кнопок в хедере и мобильном меню */
/* Кнопка из мобильного меню всегда показывается внутри nav */
.zak-mobile-modal-footer {
    padding: 15px 20px;
    text-align: center;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.mobile-modal-button {
    display: block;
}

.mobile-modal-button .modal-button {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
}

/* На десктопе скрыть хедерную кнопку на всякий случай */
@media (min-width: 768px) {
    .header-modal-button {
        display: block;
    }
}

/* На мобильных устройствах (< 768px) */
@media (max-width: 767px) {
    /* Скрыть кнопку из хедера */
    .header-modal-button {
        display: none !important;
    }

    /* Кнопка в мобильном меню уже видна */
    .mobile-modal-button {
        display: block;
    }
}