@import url('https://fonts.googleapis.com/css2?family=Lato:wght@400;700&family=Open+Sans:wght@400;700&display=swap');

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-family: 'Open Sans', 'Lato', sans-serif;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Lato', sans-serif;
    font-weight: bold;
}

html, body {
    height: 100%;
}

.page-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 1rem 0;
}

.site-logo img {
    height: 4rem;
    margin-left: 6rem;
}

#main-navigation {
    position: sticky;
    top: 0;
    width: 100%;
    height: 6rem;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 4.5%;
    z-index: 1000;
    font-size: 20px;
    font-weight: bold;
    background-color: #FFFFFF22;
    backdrop-filter: blur(8px);
}

#main-navigation a {
    text-decoration: none;
    color: #48406e;
    font-weight: bold;
    margin-left: 2rem;
}

#main-navigation a:hover,
#main-navigation a:active {
    color: #8653ed;
}

#main-navigation h1 a:hover,
#main-navigation h1 a:active {
    color: #8653ed;
}

/* Убираем маркеры списков в навигации */
.navbar-nav {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.navbar-nav .nav-item {
    list-style-type: none;
}

.navbar-nav .nav-link {
    list-style-type: none;
}

/* MESSAGE */
.messages {
    position: fixed;
    top: 55px;
    right: 20px;
    width: auto;
    z-index: 1000;
    list-style: none;
    padding: 0;
    margin: 0;
}

.messages li {
    padding: 10px 15px;
    border-radius: 5px;
    font-size: 15px;
    color: #fff;
    background-color: rgb(100, 85, 126);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    opacity: 0.9;
    transition: all 0.3s ease-in-out;
}

.messages li a {
    color: #fff;
    text-decoration: underline;
}

.messages li:hover {
    opacity: 1;
    transform: translateY(-2px);
}

/* Auto-hide message */
@keyframes fadeout {
    from { opacity: 0.9; }
    to { opacity: 0; }
}

.messages li.fadeout {
    animation: fadeout 15s ease forwards;
}

/* FOOTER */
#footer {
    background-color: #E8E8E8;
    margin-top: auto;
}

.container-fluid {
    display: grid;
    grid-template-columns: auto auto auto;
    place-items: center;
}

.logo {
    margin: 0.5rem;
}

.logo a {
    text-decoration: none;
    color: #48406e;
}

.menu ul {
    list-style-type: none;
    color: #453030;
    margin: 0.5rem;
    font-weight: bold;
}

/* Для планшетов и мобильных */
@media (max-width: 768px) {
    #main-navigation {
        padding: 0 1rem;
        height: 5rem;
        gap: 1rem;
        align-items: center;
        justify-content: space-between;
    }

    .site-logo {
        display: none;
    }

    #main-navigation .site-logo {
        display: flex;
        width: auto;
        margin: 0;
        flex: 0 0 auto;
        height: 100%;
        align-items: center;
        justify-content: center;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }

    #main-navigation .site-logo img {
        height: 3rem;
        margin-left: 0;
        width: auto;
    }

    #mainNavLinks {
        position: static;
        background-color: transparent;
        padding: 0;
        box-shadow: none;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        font-size: 15px;
        list-style-type: none;
        margin: 0;
        gap: 0.5rem;
        height: 100%;
        flex: 0 0 auto;
        margin-left: auto;
    }

    #mainNavLinks .nav-link {
        padding: 0.5rem 0.75rem;
        color: #48406e;
        list-style-type: none;
        text-decoration: none;
        white-space: nowrap;
        height: 100%;
        display: flex;
        align-items: center;
    }

    #mainNavLinks .nav-item {
        list-style-type: none;
        height: 100%;
        display: flex;
        align-items: center;
    }
}

/* Media Query for small screens (mobile) */
@media (max-width: 500px) {
    .container-fluid {
        display: grid;
        grid-template-columns: auto auto auto;
        place-items: center;
    }

    #main-navigation {
        padding: 0 0.75rem;
        gap: 0.5rem;
    }

    #mainNavLinks {
        gap: 0.25rem;
    }

    #mainNavLinks .nav-link {
        padding: 0.5rem 0.5rem;
        font-size: 14px;
    }

    #main-navigation .site-logo img {
        height: 2.5rem;
    }
}
