body {
    margin: 0;
    font-family: 'Roboto', sans-serif;
    background-color: #f3f2f0;
    color: #333;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    box-sizing: border-box;
}

/* FDIC Bar ... */
.fdic-bar {
    background-color: #e8e7e5;
    color: #003f6a;
    padding: 8px 0;
    font-size: 12px;
    text-align: center;
}

.fdic-bar .container {
    justify-content: center;
}

/* Header ... */
header {
    background-color: #fff;
    padding: 15px 0;
    border-bottom: 1px solid #ddd;
    overflow: hidden; /* Предотвращает появление горизонтальной прокрутки из-за nowrap */
}

header .container {
    justify-content: space-between;
    flex-wrap: nowrap;
}

.logo img {
    height: 40px;
}

header nav {
    flex-grow: 1;
}

nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    justify-content: center;
}

nav ul li a {
    text-decoration: none;
    color: #333;
    padding: 15px;
    font-weight: 500;
    white-space: nowrap;
}

.header-right {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.header-right a {
    text-decoration: none;
    color: #333;
    margin-left: 20px;
    font-size: 14px;
}

.header-right .fas {
    margin-left: 20px;
    color: #666;
}

.login-btn {
    background-color: #6a243d;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    margin-left: 20px;
}

/* СТИЛИ ДЛЯ БУРГЕРА (СКРЫТ НА ДЕСКТОПЕ) */
.burger-menu {
    display: none;
    width: 30px;
    height: 20px;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    z-index: 1001;
}

.burger-menu span {
    width: 100%;
    height: 3px;
    background-color: #333;
    border-radius: 3px;
    transition: all 0.3s ease-in-out;
}

/* Main Content */
main { position: relative; }
.hero { background-image: url('/assets/images/bg.svg'); background-size: cover; background-position: center; padding: 100px 0; position: relative; }
.hero::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background-color: rgba(243, 242, 240, 0.8); }
.hero .container { position: relative; z-index: 2; align-items: flex-start; }
.hero-content { max-width: 50%; }
.hero-content h1 { font-family: 'Merriweather', serif; font-size: 56px; color: #333; margin-bottom: 20px; }
.hero-content .divider { width: 50px; height: 3px; background-color: #c7a46e; margin-bottom: 20px; }
.hero-content p { font-size: 18px; line-height: 1.6; margin-bottom: 30px; }
.learn-more-btn { background-color: #6a243d; color: #fff; border: none; padding: 15px 30px; border-radius: 5px; cursor: pointer; font-size: 16px; font-weight: 500; }
.login-modal { position: absolute; top: -20px; right: 15%; width: 350px; background-color: #fff; border-radius: 8px; box-shadow: 0 5px 15px rgba(0,0,0,0.1); padding: 25px; z-index: 10; box-sizing: border-box; }
.login-header { display: flex; align-items: center; margin-bottom: 20px; }
.login-header .fas { font-size: 24px; color: #6a243d; margin-right: 15px; }
.login-header h3 { margin: 0; font-size: 18px; }
.form-group { margin-bottom: 15px; }
.form-group input { width: 100%; padding: 12px 10px; border: 1px solid #ccc; border-radius: 5px; font-size: 16px; box-sizing: border-box; }
.help-links { font-size: 12px; margin-bottom: 15px; text-align: left; }
.help-links a { color: #6a243d; text-decoration: underline; }
.login-submit-btn { background-color: #6a243d; color: #fff; width: 100%; padding: 12px; border: none; border-radius: 5px; font-size: 16px; cursor: pointer; margin-bottom: 15px; }
.register-link { font-size: 14px; text-align: left; margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid #eee; }
.register-link a { color: #6a243d; text-decoration: underline; }
.other-services ul { list-style: none; padding: 0; margin: 0; }
.other-services li { margin-bottom: 15px; }
.other-services li a { text-decoration: none; color: #333; display: flex; align-items: center; font-size: 16px; }
.other-services li .fas { color: #6a243d; margin-right: 15px; width: 20px; text-align: center; }
.other-services-footer { display: flex; justify-content: space-between; align-items: center; padding-top: 15px; border-top: 1px solid #eee; margin-top: 15px; font-size: 16px; }
.info-boxes { padding: 80px 0; background-color: #e8e7e5; }
.info-boxes .container { justify-content: space-between; }
.box { background-color: #fff; padding: 30px; width: 48%; border-radius: 8px; position: relative; box-shadow: 0 2px 5px rgba(0,0,0,0.05); box-sizing: border-box; }
.box h3 { font-family: 'Merriweather', serif; color: #6a243d; margin-top: 0; }
.box p { font-size: 16px; line-height: 1.5; }
.arrow-link { position: absolute; right: 30px; bottom: 30px; color: #c7a46e; font-size: 20px; text-decoration: none; }


/* =========================================== */
/* ===========   MOBILE STYLES   ============= */
/* =========================================== */

@media screen and (max-width: 850px) {

    header {
        overflow: visible;
    }
    header .container {
        flex-wrap: wrap;
    }
    
    /* <<< ИЗМЕНЕНИЕ 1: Скрываем правый блок в шапке */
    .header-right {
        display: none;
    }

    /* <<< ИЗМЕНЕНИЕ 2: Делаем main flex-контейнером для пересортировки */
    main {
        display: flex;
        flex-direction: column;
    }

    .burger-menu {
        display: flex;
    }

    /* Анимация бургера в крестик ... */
    .burger-menu.active span:nth-child(1) { transform: translateY(8.5px) rotate(45deg); }
    .burger-menu.active span:nth-child(2) { opacity: 0; }
    .burger-menu.active span:nth-child(3) { transform: translateY(-8.5px) rotate(-45deg); }
    
    nav {
        display: none;
        order: 4;
        width: 100%;
    }
    
    nav.nav-active {
        display: flex;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: rgba(255, 255, 255, 0.98);
        z-index: 1000;
        justify-content: center;
        align-items: center;
    }
    nav.nav-active ul {
        flex-direction: column;
        text-align: center;
    }
    nav.nav-active ul li a {
        font-size: 24px;
        padding: 20px;
    }
    
    .hero {
        padding: 40px 0;
    }
    .hero .container {
        flex-direction: column;
    }
    .hero-content {
        max-width: 100%;
        text-align: center;
    }
    .hero-content .divider {
        margin-left: auto;
        margin-right: auto;
    }
    .hero-content h1 {
        font-size: 40px;
    }

    /* <<< ИЗМЕНЕНИЕ 3: Перемещаем блок логина наверх */
    .login-modal {
        position: relative;
        top: 0;
        right: 0;
        width: 100%;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        order: -1; /* Ставит этот элемент первым внутри <main> */
        margin: 20px 0 40px 0; /* Добавляем отступы сверху и снизу */
    }

    .info-boxes { padding: 40px 0; }
    .info-boxes .container { flex-direction: column; }
    .box { width: 100%; margin-bottom: 20px; }
    .box:last-child { margin-bottom: 0; }
}