/* стили для js функционала */

/* модальное окно */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: #fff;
    padding: 40px;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.modal.active .modal-content {
    transform: translate(-50%, -50%) scale(1);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    font-size: 32px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s;
}

.modal-close:hover {
    color: #333;
}

.modal-content h2 {
    font-size: 28px;
    font-weight: 700;
    color: #111;
    margin-bottom: 30px;
    text-align: center;
}

/* форма */

.application-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    font-family: 'Montserrat', sans-serif;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3b4cff;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.btn {
    padding: 15px 35px;
    background: linear-gradient(149deg, rgba(64, 84, 255, 1) 0%, rgba(24, 38, 202, 1) 100%);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    border-radius: 30px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(59, 76, 255, 0.35);
}

.btn-submit {
    margin-top: 10px;
    width: 100%;
    justify-content: center;
}

.form-note {
    text-align: center;
    font-size: 12px;
    color: #999;
    margin-top: -10px;
}

/* уведомления */

.notification {
    position: fixed;
    bottom: -100px;
    right: 20px;
    background: #fff;
    padding: 16px 24px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    font-size: 14px;
    font-weight: 500;
    min-width: 250px;
    max-width: 400px;
    transition: bottom 0.3s ease;
}

.notification.show {
    bottom: 30px;
}

.notification-success {
    border-left: 4px solid #4caf50;
    color: #2e7d32;
}

.notification-error {
    border-left: 4px solid #f44336;
    color: #c62828;
}

.notification-info {
    border-left: 4px solid #2196f3;
    color: #1565c0;
}

/* кнопка наверх */

.scroll-to-top {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #3b4cff;
    background: linear-gradient(149deg, rgba(64, 84, 255, 1) 0%, rgba(24, 38, 202, 1) 100%);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 10000;
    box-shadow: 0 5px 20px rgba(59, 76, 255, 0.3);
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(59, 76, 255, 0.4);
}

/* мобильное меню */

.burger-menu {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    position: relative;
    z-index: 1001;
}

.burger-menu span {
    width: 26px;
    height: 3px;
    background: #333;
    border-radius: 2px;
    display: block;
    transition: transform 0.35s cubic-bezier(0.23, 1, 0.32, 1),
                opacity 0.25s ease;
}

.burger-menu.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.burger-menu.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.burger-menu.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* адаптив */

@media (max-width: 900px) {
    .burger-menu {
        display: flex;
    }

    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 285px;
        height: 100vh;
        background: #fff;
        padding: 90px 30px 40px;
        box-shadow: -8px 0 30px rgba(0, 0, 0, 0.12);
        transition: right 0.35s cubic-bezier(0.23, 1, 0.32, 1);
        z-index: 1000;
        overflow-y: auto;
    }

    .nav.active {
        right: 0;
    }

    .nav ul {
        flex-direction: column;
        gap: 4px;
    }

    .nav ul li a {
        font-size: 17px;
        padding: 13px 16px;
        display: block;
        border-radius: 12px;
        transition: background 0.2s ease, color 0.2s ease;
    }

    .nav ul li a:hover,
    .nav ul li a.active {
        background: #f0f2ff;
        color: #3b4cff;
    }

    body.menu-open {
        overflow: hidden;
    }

    body.menu-open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.45);
        z-index: 999;
        backdrop-filter: blur(3px);
        -webkit-backdrop-filter: blur(3px);
        animation: fadeInOverlay 0.3s ease;
    }

    @keyframes fadeInOverlay {
        from { opacity: 0; }
        to   { opacity: 1; }
    }
}

@media (max-width: 600px) {
    .modal-content {
        padding: 30px 20px;
    }

    .modal-content h2 {
        font-size: 24px;
    }

    .scroll-to-top {
        width: 45px;
        height: 45px;
        bottom: 85px;
        right: 20px;
        font-size: 20px;
    }

    .notification {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

/* анимация загрузки страницы */

body {
    opacity: 0;
    transition: opacity 0.5s ease;
}

body.loaded {
    opacity: 1;
}

/* дополнительные эффекты */

/* плавное появление карточек */
.card,
.feature,
.stat {
    will-change: transform, opacity;
}

/* подчёркивание при наведении на ссылки */
.nav a {
    position: relative;
}

.nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #3b4cff;
    transition: width 0.3s ease;
}

.nav a:hover::after,
.nav a.active::after {
    width: 100%;
}

/* пульсация кнопки в герое */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(59, 76, 255, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(59, 76, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(59, 76, 255, 0);
    }
}

.hero .btn {
    animation: pulse 2s infinite;
}

.hero .btn:hover {
    animation: none;
}
