@import url('https://fonts.googleapis.com/css2?family=Onest:wght@100..900&display=swap');

@font-face {
    font-family: 'Bounded';
    src:
        url('../fonts/Bounded-Black.ttf') format('truetype');
    font-weight: 900;
    font-style: normal;
    font-display: swap;

}

@font-face {
    font-family: 'Bounded';
    src:
        url('../fonts/Bounded-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;

}

@font-face {
    font-family: 'Bounded';
    src:
        url('../fonts/Bounded-ExtraLight.ttf') format('truetype');
    font-weight: 200;
    font-style: normal;
    font-display: swap;

}

@font-face {
    font-family: 'Bounded';
    src:
        url('../fonts/Bounded-Variable.ttf') format('truetype');
    font-style: normal;
    font-display: swap;

}

:root {
    --main-blue: #2F56A0;
    --purple: #5B64A7;
    --primory-50: #FBFCFF;
    --primory-100: #F0F4FD;
    --gray-600: #5B6B86;
    --gray-700: #384252;
    --light-blue: #F0F4FD;
    --gray-sroke: #D9D9D9;
    --footer: #E0E4EA;
    --bs-soft: 0 2px 8px rgba(99, 99, 99, 0.2);
}

html {
    scroll-behavior: smooth;
}


body {
    font-optical-sizing: auto;
    /* font-family: "Bounded", sans-serif; */
    font-family: "Onest", sans-serif;
    font-weight: 400;
    font-size: 16px;
    font-style: normal;
    margin: 0;
}

a {
    text-decoration: none;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: var(--main-blue);
    box-shadow: var(--bs-soft);
}

section {
    padding: 60px 20px;
}

hr {
    width: 100px;
    margin: 10px 0;
    border: solid var(--main-blue) 1px;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.nav-header {
    position: sticky;
    top: 0;
}

.navigation {
    display: flex;
    gap: 20px;
    justify-content: space-between;
    align-items: center;
}

.tools-nav {
    display: flex;
    gap: 30px;
    align-items: center;
}

.form-proekt {
    background-color: white;
    border-radius: 5px;
    padding: 8px 20px;
    color: var(--main-blue) !important;
    border: solid 1px transparent;
    font-family: 'Bounded', sans-serif;
    transition: color 0.2s, background-color 0.3s;
}

.login-btn {
    background-color: white;
    border-radius: 5px;
    padding: 8px 20px;
    color: var(--main-blue) !important;
    border: solid 1px transparent;
    font-family: 'Bounded', sans-serif;
    transition: color 0.2s, background-color 0.3s;
}

.form-proekt:hover {
    border: solid 1px rgba(255, 255, 255, 0.2);
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(50px);
    color: white !important;
}

.login-btn:hover {
    border: solid 1px rgba(255, 255, 255, 0.2);
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(50px);
    color: white !important;
}

.navigation a {
    color: var(--gray-dark);
    text-decoration: none;
    font-size: 14px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 !important;
}

footer {
    background-color: var(--footer);
    padding: 50px 20px;
}

.footer {
    display: grid;
    gap: 20px;
    margin: 40px 0;
    align-items: start;
    grid-template-columns: repeat(4, 1fr);
}

.footer-item.footer-item-icon {
    display: flex;
    align-items: center;
    gap: 20px;
    grid-column: span 4;
}

.footer-item.footer-item-icon img {
    height: 60px;
    width: 60px;
}

.footer-dropdown {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-navbar-link-title {
    color: var(--gray-600);
}

.footer-navbar-link {
    font-size: 14px;
    font-weight: 500;
    width: fit-content;
    border-bottom: solid 1px transparent;
    transition: 0.2s;
}

.footer-navbar-link:hover {
    border-bottom: solid 1px var(--gray-600);
}

.footer-navbar-item {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-navbar-title {
    color: var(--gray-700);
    font-size: 16px;
    font-weight: 500;
    border-bottom: solid 2px var(--main-blue);
}

.navbar {
    margin: 0;
    list-style: none;
    padding: 20px 0;
    display: flex;
    gap: 30px;
    align-items: center;
    justify-content: start;
}

.dropdown {
    list-style: none;
    padding: 0;
    opacity: 0;
    pointer-events: none;
    display: flex;
    position: absolute;
    width: max-content;
    top: 100%;
    left: 0;
    background-color: white;
    box-shadow: var(--bs-soft);
    border-radius: 5px;
    padding: 20px;
    flex-direction: column;
    gap: 20px;
    transition: 0.2s;
}

.main-navbar-link {
    color: var(--main-blue);
    transition: 0.2s;
    font-size: 15px;
    border-bottom: solid 2px transparent;
}

.main-navbar-link:hover {
    border-bottom: solid 2px var(--main-blue);
}

.main-navbar-item {
    color: white;
    font-family: 'Bounded', sans-serif;
    font-size: 15px;
    font-weight: 400;
    position: relative;
}

.main {
    background-color: var(--light-blue);
    min-height: 100vh;
}

.page-title {
    font-size: 30px;
    font-weight: 500;
    font-family: 'Bounded', sans-serif;
    margin-bottom: 30px;
    color: var(--main-blue);
}

.alert-text {
    margin: 0;
    font-size: 18px;
    color: var(--main-blue);
    font-weight: 400;
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    margin: 30px 0;
    border-left: solid 5px var(--main-blue);
}

.block-title {
    font-size: 24px;
    font-family: 'Bounded', sans-serif;
    color: var(--main-blue);
    font-weight: 500;
}

.mobile-menu {
    display: none;
}

.mobile-nav {
    display: none;
}

.menu-btn {
    position: absolute;
    height: 50px;
    top: 10px;
    right: 20px;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 20px;
    height: 50px;
}

@media (max-width: 1024px) {
    .block-title {
        font-size: 18px !important;
    }

    .textblock-subtitle {
        font-size: 15px !important;
    }

    .link-wrapper {
        padding: 8px !important;
    }

    .link-wrapper a {
        font-size: 13px !important;
    }

    .page-title {
        font-size: 19px !important;
    }

    .alert-text {
        font-size: 16px;
    }

    .footer {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .index-grid {
        grid-template-columns: 1fr !important;
    }

    .link-wrapper {
        padding: 10px !important;
    }

    .alert-text {
        font-size: 14px;
    }

    .navigation {
        display: none;
    }

    .form-proekt {
        padding: 10px;
        background-color: var(--main-blue);
        color: white !important;
        width: stretch;
    }

    .login-btn {
        padding: 10px;
        background-color: var(--main-blue);
        color: white !important;
        width: stretch;
    }

    .form-proekt:hover {
        border: solid 1px var(--main-blue);
        background-color: transparent;
        color: var(--main-blue) !important;
    }

    .login-btn:hover {
        border: solid 1px var(--main-blue);
        background-color: transparent;
        color: var(--main-blue) !important;
    }


    .dropdown {
        position: absolute;
        background-color: white;
        box-shadow: none;
        padding: 0;
        border-radius: 0;
        gap: 20px;
        height: max-content;
        width: stretch;
        top: 20px;
        margin-bottom: 20px;
        z-index: 100;
    }

    .tools-nav {
        display: flex;
        flex-direction: column;
        gap: 10px;
        width: stretch;
    }

    .main-navbar-item:hover>.main-navbar-title {
        border-bottom: solid 2px var(--main-blue);
    }

    .main-navbar-item.open>.dropdown {
        display: flex;
        position: relative;
        opacity: 1;
        pointer-events: all;
        border: solid 1px var(--main-blue);
        padding: 20px 10px;
        border-radius: 10px;
        margin-top: 10px;
        top: auto;
        left: auto;
        width: 100%;
    }

    .navbar.mobile {
        flex-direction: column;
        gap: 20px;
        padding: 0;
        /* убираем padding: 20px 0 у .navbar */
        width: 100%;
    }

    .main-navbar-item {
        width: stretch;
        position: relative;
    }

    .mobile-menu {
        display: block !important;
    }

    .menu-btn {
        background-color: var(--purple);
        padding: 5px;
        border-radius: 5px;
    }



    .mobile-nav {
        display: flex;
        flex-direction: column;
        gap: 20px;
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        /* было min-height — меняем на height */
        max-height: 100vh;
        width: 0;
        background-color: white;
        z-index: 100;
        box-shadow: var(--bs-soft);
        transition: transform 0.2s, padding 0s, width 0.2s;
        transform: translateX(100%);
        pointer-events: none;

        overflow-y: auto;
        /* ← ключевое: разрешаем вертикальную прокрутку */
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        /* плавная прокрутка на iOS */
        overscroll-behavior: contain;
        /* не «прокручивает» страницу под меню */
    }

    .mobile-nav.active {
        transform: translateX(0);
        width: 300px;
        pointer-events: all;
        padding: 60px 20px;
        position: fixed;
        overflow-y: auto;
        /* продублируем — на случай переопределений */
    }

    .mobile-nav>.navbar.mobile,
    .mobile-nav>.tools-nav,
    .mobile-nav>.close-btn {
        display: none;
    }

    .mobile-nav.active>.navbar.mobile,
    .mobile-nav.active>.tools-nav,
    .mobile-nav.active>.close-btn {
        display: flex;
    }

    .mobile-nav a {
        color: var(--main-blue);
        text-decoration: none;
        font-size: 16px;
    }
    .footer {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .footer {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 769px) {
    .main-navbar-item:hover>.dropdown {
        opacity: 1;
        pointer-events: all;
    }
}