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

@font-face {
    font-family: 'Literature-Decor';
    src: url('fonts/Literature-Decor.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

body, html {
    margin: 0;
    padding: 0;
    font-family: 'Literature-Decor', 'Roboto', serif;
    background-color: #000;
    color: #fff;
    height: 100%;
    overflow: hidden;
}

[lang="ru"] {
    font-family: 'Literature-Decor', 'Roboto', serif;
}

header {
    background-color: #141414;
    border-top: 2px solid #8B0000;
    border-bottom: 2px solid #8B0000;
    padding: 15px 0;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 2000px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav-group {
    display: flex;
    align-items: center;
    flex: 1;
    margin-left: 20px;
    margin-right: 20px;
}

.nav-group:nth-child(2) {
    justify-content: center;
}

.nav-group:last-child {
    justify-content: flex-end;
}

nav a, .dropbtn, .language-btn, button {
    color: #D4AF37;
    text-decoration: none;
    margin: 0 15px;
    text-transform: uppercase;
    font-size: 16px;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-family: 'Literature-Decor', 'Roboto', serif;
}

nav a:hover, .dropbtn:hover, .language-btn:hover {
    color: #FFFFFF;
    text-shadow: 0 0 5px #FFD700;
}

.main-content {
    background-image: url('HellInLaw.jpg');
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    min-height: calc(var(--vh, 1vh) * 100 - 67px);
    display: flex;
    justify-content: center;
    align-items: center;
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropbtn, .language-btn {
    background-color: transparent;
    border: none;
    cursor: pointer;
}

.dropbtn {
    font-size: 25px;
    font-weight: bold;
    background-color: transparent;
    border: none;
    cursor: pointer;
}

.dropdown-content, .language-dropdown {
    display: none;
    position: absolute;
    background-color: #141414;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
}

.dropdown-content a, .language-dropdown a {
    color: #D4AF37;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
}

.dropdown-content a:hover, .language-dropdown a:hover {
    background-color: #1a1a1a;
}

.dropdown:hover .dropdown-content, .language-selector:hover .language-dropdown {
    display: block;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    background-color: #141414;
    padding: 20px;
    border: 1px solid #8B0000;
    width: 80%;
    max-width: 600px;
}

.close {
    position: absolute;
    top: 0px;
    right: 10px;
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: #D4AF37;
    text-decoration: none;
    cursor: pointer;
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
    width: calc(100% - 24px);
    padding: 12px;
    border: 1px solid #8B0000;
    background-color: #1a1a1a;
    color: #fff;
    margin-top: 6px;
    margin-bottom: 16px;
    resize: vertical;
}

select {
    width: 100%;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg fill="%23D4AF37" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/><path d="M0 0h24v24H0z" fill="none"/></svg>');
    background-repeat: no-repeat;
    background-position-x: calc(100% - 10px);
    background-position-y: 50%;
}

textarea {
    min-height: 100px;
}

button[type="submit"] {
    background-color: #8B0000;
    color: #D4AF37;
    padding: 12px 20px;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    position: static;
    width: auto;
    margin-left: 0;
}

button[type="submit"]:hover {
    background-color: #D4AF37;
    color: #8B0000;
}

.language-selector {
    position: relative;
    display: inline-block;
}

.language-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    min-width: 100px;
}

.language-dropdown a {
    text-align: center;
}

.auth-message {
    margin-bottom: 10px;
    color: #D4AF37;
}

.auth-message a {
    color: #8B0000;
    text-decoration: underline;
    cursor: pointer;
}

.auth-message a:hover {
    color: #D4AF37;
}

.login-toggle {
    position: absolute;
    bottom: 20px;
    right: 18px;
    text-align: right;
    margin-bottom: 7px;
    line-height: normal;
    vertical-align: middle;
}

.login-toggle a {
    color: #D4AF37;
    text-decoration: none;
    cursor: pointer;
}

.login-toggle a:hover {
    text-decoration: underline;
}

.remember-me {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.remember-me input[type="checkbox"] {
    margin-right: 10px;
}

/* Стили для FAQ страницы */
.faq-content {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 50px 20px;
    min-height: calc(100vh - 67px);
    box-sizing: border-box;
}

.faq-container, .terms-container {
    background-color: rgba(20, 20, 20, 0.9);
    border: 2px solid #8B0000;
    padding: 30px;
    max-width: 800px;
    width: 100%;
    margin-bottom: 50px;
}

.faq-container h1, .terms-container h1 {
    color: #D4AF37;
    text-align: center;
    margin-bottom: 30px;
}

.faq-item {
    margin-bottom: 20px;
    border-bottom: 1px solid #8B0000;
    padding-bottom: 20px;
}

.faq-question {
    font-size: 18px;
    color: #D4AF37;
    cursor: pointer;
    position: relative;
    padding-right: 30px;
    transition: all 0.3s ease;
}

.faq-question::after {
    content: '+';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    color: #8B0000;
}

.faq-question.active::after {
    content: '-';
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, margin-top 0.3s ease-out;
    margin-top: 0;
}

.faq-answer.active {
    margin-top: 10px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.faq-answer.active {
    animation: fadeIn 0.5s ease-out;
}

/* Стили для правил соглашения */
.terms-list {
    list-style-type: none;
    padding: 0;
}

.terms-list li {
    margin-bottom: 15px;
    padding-left: 20px;
    position: relative;
}

.terms-list li::before {
    content: '\2022';
    color: #8B0000;
    font-size: 1.5em;
    position: absolute;
    left: 0;
    top: -5px;
}

/* Стили для мобильного меню */
.menu-toggle {
    display: none;
    background-color: transparent;
    border: none;
    color: #D4AF37;
    font-size: 16px;
    cursor: pointer;
    text-transform: uppercase;  
    z-index: 1001;
}

/* Адаптивный дизайн */
@media screen and (max-width: 1024px) {
    nav {
        flex-wrap: wrap;
    }

    .nav-group {
        flex-basis: 100%;
        justify-content: center;
        margin-bottom: 10px;
    }

    .nav-group:last-child {
        justify-content: center;
    }
}

@media screen and (max-width: 768px) {
    .menu-toggle {
        display: none;
    }

    nav {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-group {
        flex-direction: row;
        align-items: center;
        margin-bottom: 0;
    }

    nav a, .dropbtn, .language-btn {
        margin: 3px 15px;
    }

    .dropbtn[data-lang-key="contactUs"] {
        font-size: 20px;
        font-weight: bold;
        margin: 3px 20px;
    }

    .dropdown-content, .language-dropdown {
        display: none;
    }

    .faq-container, .terms-container {
        padding: 20px;
    }

    .faq-question {
        font-size: 15px;
        padding-right: 25px;
    }

    .terms-list li {
        font-size: 14px;
    }

    .modal-content {
        padding: 15px;
    }

    input, textarea, select {
        font-size: 14px;
    }
}

@media screen and (max-width: 490px) {
    .faq-container, .terms-container {
        padding: 15px;
        margin-bottom: 30px;
    }

    .terms-list li::before {
        top: -3px;
    }

    .modal-content {
        width: 90%;
        max-width: 500px;
        margin: auto;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }

    .faq-container h1, .terms-container h1 {
        font-size: 24px;
    }

    .faq-question {
        font-size: 14px;
    }

    .faq-answer {
        font-size: 12px;
    }
}


@media screen and (max-width: 443px) {
    .button-container {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        flex-wrap: nowrap;
    }

    .login-toggle, button[type="submit"] {
        bottom: 8px;
        right: 6px;
        flex: 0 1 auto;
        max-width: 45%;
        padding: 10px;
        font-size: 15px;
    }

    .login-toggle {
        white-space: normal;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

.button-container {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: nowrap;
}

@media screen and (max-width: 750px) {
    .main-content {
        background-image: url('HellInLaw_m.jpg');
    }
}