:root {
    --yellow: #FFE600;
    --dark: #181717;
    --blue-promo: #677FA5;
    --light-gray: #FFFFFF;
    --border-color: #E2E2E2;
    --white: #FFFFFF;
    --text-secondary: #8E8E93;
    --max-width: 1920px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: FuturaBook, "Helvetica Neue", Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--white);
    color: var(--dark);
    min-height: 100vh;
    display: flex;
    justify-content: center;
}

.site-container {
    width: 100%;
    max-width: var(--max-width);
    background-color: var(--white);
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

/* TOP BAR */
.top-bar {
    background-color: var(--white);
    display: flex;
    justify-content: center;
    font-size: 11px;
    color: var(--dark);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-weight: 500;
    font-family: FuturaBook, "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.top-bar-content {
    width: 100%;
    padding: 20px 48px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    white-space: nowrap;
    position: relative;
}

.top-bar-content::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 48px;
    right: 48px;
    height: 1px;
    background-color: var(--border-color);
}

@media (max-width: 768px) {
    .top-bar-content::after {
        left: 20px;
        right: 20px;
    }
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-bar-left .location {
    font-weight: 400;
}

.top-bar-left .phone {
    text-decoration: none;
    color: var(--dark);
    font-weight: 600;
}

.top-bar-left .separator {
    color: var(--dark);
    margin: 0 4px;
}

.top-bar-left .phone-label {
    color: var(--dark);
    font-weight: 400;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.top-link {
    text-decoration: none;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
}

.top-link svg {
    width: 12px;
    height: 12px;
}

.lang-switcher {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
    cursor: pointer;
}

.lang-switcher span {
    font-weight: 600;
}

.flag {
    width: 14px;
    height: 10px;
    object-fit: cover;
    border-radius: 1px;
}

/* HEADER */
header {
    display: flex;
    justify-content: center;

}

.header-content {
    width: 100%;
    padding: 0px 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;

}

.header-left {
    display: flex;
    align-items: center;
    gap: 24px;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-img {
    height: 72px;
    width: auto;
    display: block;
}


.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark);
    font-size: 14px;
    transition: opacity 0.2s;
}

.nav-links a:hover {
    opacity: 0.7;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn-chat {
    background-color: var(--yellow);
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-client {
    background-color: var(--dark);
    color: var(--white);
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
}

/* MAIN */
main {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    /* Подтягиваем контент наверх */
}

.main-content {
    width: 100%;
    padding: 0 48px;
    display: grid;
    grid-template-columns: 492px 1fr;
    /* Убрали min-height, чтобы контент не растягивался */
}

.login-section {
    display: flex;
    flex-direction: column;
    padding: 100px 60px 60px 84px;
}

@media (max-width: 1024px) {
    .login-section {
        padding: 40px 20px;
        align-items: center;
    }
}

.login-container {
    max-width: 306px;
    width: 100%;
}

h1 {
    font-size: 24px;
    margin-bottom: 31px;
    font-weight: 600;
    font-family: FuturaBook, "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.form-group {
    margin-bottom: 24px;
    position: relative;
}

.form-group label {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.input-wrapper {
    position: relative;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    background: var(--white);
    transition: border-color 0.2s;
}

.input-wrapper:focus-within {
    border-color: var(--dark);
}

.input-wrapper input {
    border: none;
    outline: none;
    width: 100%;
    font-size: 16px;
    color: var(--dark);
}

.btn-login {
    width: 100%;
    background-color: var(--yellow);
    color: var(--dark);
    border: none;
    padding: 16px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 12px;
    transition: background-color 0.2s;
}

.btn-login:hover {
    background-color: #f2db00;
}

.btn-secondary {
    width: 100%;
    background: transparent;
    border: 1px solid var(--border-color);
    padding: 16px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-secondary:hover {
    background-color: var(--light-gray);
}

.security-link {
    display: block;
    color: #436DAE;
    text-decoration: none;
    font-size: 11px;
    border-bottom: 1px dashed #436DAE;
    width: fit-content;
    transition: opacity 0.2s;
    margin-bottom: 30px;
}

.security-link:hover {
    opacity: 0.7;
}

/* PROMO */
.promo-section {
    max-height: 600px;
    background-color: #6984b2;
    display: flex;
    align-items: center;
    padding: 0px 50px;
    color: var(--white);
    position: relative;
    overflow: hidden;

    min-height: 320px;
}

.promo-content {
    margin-top: 45px;
    z-index: 1;
    max-width: 358px;
    margin-bottom: 180px;
}

.promo-content h2 {
    font-size: 38px;
    margin-bottom: 24px;
    line-height: 1.1;
    font-family: FuturaBook, "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-weight: 500;
}

.promo-content p {
    font-size: 15px;
    margin-bottom: 10px;
    opacity: 0.9;
    max-width: 400px;
    line-height: 1.5;
}

.qr-block {
    align-items: center;
    border-radius: 12px;
    width: fit-content;
}

.qr-code {
    width: 110px;
    height: 110px;
    background: white;
    padding: 4px;
    border-radius: 10px;
}

.qr-text {
    margin-top: 20px;
    font-size: 16px;
    line-height: 1.4;
    max-width: 240px;
}

.promo-image {
    position: absolute;
    right: 0px;
    bottom: 0px;
    width: 53%;
    max-width: 614px;
    z-index: 0;
}

footer {
    padding-bottom: 25px;
    font-size: 11px;
    color: var(--text-secondary);
    background: var(--white);
    display: flex;
    justify-content: center;
}

.footer-content {
    width: 100%;
    max-width: var(--max-width);
    padding: 0 48px;
    display: flex;
    flex-direction: column;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    width: 100%;
}

.footer-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.footer-info .copyright {
    color: var(--dark);
    font-weight: 500;
}

.footer-info .license {
    color: var(--dark);
}

.social-links {
    display: flex;
    gap: 16px;
    align-items: center;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: opacity 0.2s;
}

.social-icon:hover {
    opacity: 0.7;
}

.social-icon svg {
    width: 20px;
    height: 20px;
}

@media (max-width: 1024px) {

    .top-bar-left .phone-label,
    .top-bar-left .separator,
    .top-bar-left .phone:nth-child(5) {
        display: none;
    }

    .nav-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
        order: 3;
        width: 100%;
        margin-top: 10px;
    }

    .nav-links a {
        font-size: 14px;
        white-space: nowrap;
    }

    .main-content {
        grid-template-columns: 1fr;
        padding: 0 20px;
    }

    .promo-section {
        display: none;
    }

    .login-section {
        padding: 60px 0;
        align-items: center;
    }

    .top-bar-content,
    .header-content,
    .footer-content {
        padding: 0px 20px;
    }
}

@media (max-width: 768px) {
    .site-container {
        border: none;
    }

    .top-bar {
        height: auto;
        padding: 5px 0;
    }

    .top-bar-content {
        flex-direction: column;
        align-items: center;
        gap: 5px;
    }

    .top-bar-left .phone:not(:nth-child(2)) {
        display: none;
    }

    .top-bar-right {
        display: none;
    }

    .header-content {
        flex-direction: row !important;
        flex-wrap: wrap;
        /* Allow wrapping for nav row */
        justify-content: space-between;
        padding: 10px 20px;
        height: auto;
    }

    .logo {
        order: 1;
    }

    .header-right {
        order: 2;
        width: auto;
    }
}

@media (max-width: 480px) {
    .header-right .btn-chat span {
        display: inline-block;
        /* Return "Чат" text but smaller */
        font-size: 12px;
    }

    .btn-chat {
        padding: 6px 12px;
    }

    .logo-img {
        height: 32px;
    }

    .top-bar-right {
        gap: 10px;
    }

    .top-link span {
        display: none;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 20px;
    }

    .login-container {
        width: 100%;
        padding: 30px 20px;
    }

    .login-section h1 {
        font-size: 24px;
        text-align: center;
    }
}

/* MODAL */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-card {
    background: white;
    padding: 40px;
    border-radius: 16px;
    max-width: 350px;
    width: 90%;
    position: relative;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-secondary);
}

.modal-content-inner svg {
    margin-bottom: 20px;
}

.modal-content-inner h2 {
    font-size: 20px;
    margin-bottom: 12px;
    font-weight: 700;
}

.modal-content-inner p {
    font-size: 15px;
    color: var(--dark);
    margin-bottom: 30px;
}

.btn-modal-close {
    width: 100%;
    background: var(--yellow);
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
}