/* Основные стили */
:root {
    --primary-color: #a98f71;
    --secondary-color: #000000;
    --text-color: #333;
    --light-color: #f8f8f8;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    overflow-x: hidden;
    background-color: var(--secondary-color);
}

/* Лоадер */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--secondary-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(169, 143, 113, 0.3);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loader.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Кастомный скроллбар */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--secondary-color);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #8c765d;
}

/* Переключатель языка */
.language-switcher {
    position: fixed;
    top: 22px;
    right: 20px;
    display: flex;
    gap: 5px;
    z-index: 1000;
}

.lang-btn {
    background: none;
    border: 1px solid var(--primary-color);
    padding: 5px;
    border-radius: 3px;
    cursor: pointer;
    transition: var(--transition);
    opacity: 0.7;
}

.lang-btn.active,
.lang-btn:hover {
    opacity: 1;
    background: rgba(169, 143, 113, 0.1);
}

.lang-btn img {
    width: 20px;
    height: 15px;
    display: block;
}

/* Мобильный переключатель языка */
.mobile-language-switcher {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.mobile-lang-trigger {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transition: var(--transition);
}

.mobile-lang-trigger:hover {
    transform: scale(1.1);
}

.mobile-lang-trigger i {
    color: white;
    font-size: 1.2rem;
}

.mobile-lang-dropdown {
    position: absolute;
    bottom: 60px;
    right: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid var(--primary-color);
    border-radius: 10px;
    padding: 10px;
    display: none;
    flex-direction: column;
    gap: 5px;
    min-width: 120px;
}

.mobile-lang-dropdown.show {
    display: flex;
}

.mobile-lang-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: none;
    border: none;
    color: var(--light-color);
    cursor: pointer;
    transition: var(--transition);
    border-radius: 5px;
}

.mobile-lang-btn:hover,
.mobile-lang-btn.active {
    background: rgba(169, 143, 113, 0.2);
    color: var(--primary-color);
}

.mobile-lang-btn img {
    width: 20px;
    height: 15px;
}

/* Хедер */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    z-index: 100;
    padding: 3px 0;
    transition: var(--transition);
}

.header.scrolled {
    padding: 10px 0;
    background: rgba(0, 0, 0, 0.9);
}

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

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    color: var(--primary-color);
    font-size: 32px;
    font-weight: 300;
    letter-spacing: 2px;
}

.logo img {
    height: 60px;
    max-width: 300px;
    object-fit: contain;
}

.nav {
    display: flex;
    gap: 30px;
}

.nav-link {
    color: var(--light-color);
    text-decoration: none;
    font-weight: 300;
    letter-spacing: 1px;
    position: relative;
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Мобильное меню */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--light-color);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    z-index: 101;
    transition: var(--transition);
}

.mobile-menu-btn:hover {
    color: var(--primary-color);
}

.mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    z-index: 99;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding-top: 300px;
    gap: 20px;
}

.mobile-nav.show {
    display: flex;
}

.mobile-nav-link {
    color: var(--light-color);
    text-decoration: none;
    font-size: 1.3rem;
    font-weight: 300;
    transition: var(--transition);
    padding: 15px 30px;
    border: 1px solid transparent;
    border-radius: 8px;
    width: 200px;
    text-align: center;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background: rgba(169, 143, 113, 0.1);
    transform: translateY(-2px);
}

.mobile-nav-close {
    position: absolute;
    top: 25px;
    right: 25px;
    background: none;
    border: none;
    color: var(--light-color);
    font-size: 1.8rem;
    cursor: pointer;
    transition: var(--transition);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.mobile-nav-close:hover {
    color: var(--primary-color);
    background: rgba(169, 143, 113, 0.1);
}

/* Основной контент */
.main {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    
}

/* Анимированный фон с галереей */
.background-slider {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transform: scale(1.1);
    transition: all 1.5s ease-in-out;
    filter: brightness(0.7);
}

.slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        45deg,
        rgba(0, 0, 0, 0.6) 0%,
        rgba(0, 0, 0, 0.4) 50%,
        rgba(0, 0, 0, 0.6) 100%
    );
}

.slide.active {
    opacity: 1;
    transform: scale(1);
}

.slide.fade-out {
    opacity: 0;
    transform: scale(0.9);
}

/* Контент поверх фона */
.content-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Форма сообщения */
.message-form-container {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(169, 143, 113, 0.4);
    border-radius: 15px;
    padding: 50px;
    max-width: 500px;
    width: 100%;
    animation: fadeIn 1s ease 0.5s both;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.form-wrapper h2 {
    color: var(--primary-color);
    margin-bottom: 30px;
    text-align: center;
    font-weight: 300;
    letter-spacing: 2px;
    font-size: 2rem;
}

.message-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.form-group {
    position: relative;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 18px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(169, 143, 113, 0.3);
    border-radius: 8px;
    color: var(--light-color);
    font-size: 16px;
    transition: var(--transition);
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 2px rgba(169, 143, 113, 0.2);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* Кнопки */
.btn {
    padding: 18px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
    text-align: center;
    letter-spacing: 1px;
    font-weight: 300;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--light-color);
}

.btn-primary:hover {
    background: #8c765d;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(169, 143, 113, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--light-color);
    border: 1px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

/* Кнопка отправки формы */
.form-submit-btn {
    width: 100%;
    padding: 18px;
    margin-top: 10px;
    font-size: 1.1rem;
    font-weight: 400;
}

/* Сообщение формы */
.form-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    display: none;
    font-size: 0.9rem;
}

.form-message.success {
    background: rgba(76, 175, 80, 0.15);
    border: 1px solid #4caf50;
    color: #4caf50;
    display: block;
}

.form-message.error {
    background: rgba(244, 67, 54, 0.15);
    border: 1px solid #f44336;
    color: #f44336;
    display: block;
}

/* Футер */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    color: var(--light-color);
    text-align: center;
    padding: 15px 0;
    z-index: 98;
    border-top: 1px solid rgba(169, 143, 113, 0.2);
}

.footer p {
    opacity: 0.8;
    font-size: 0.9rem;
    font-weight: 300;
}

/* Страницы about и contact */
.page-content {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(169, 143, 113, 0.3);
    border-radius: 15px;
    padding: 50px;
    color: var(--light-color);
    max-width: 800px;
    
    margin: 0 auto;
    animation: fadeIn 1s ease;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.page-content h1 {
    color: var(--primary-color);
    margin-bottom: 30px;
    text-align: center;
    font-weight: 300;
    letter-spacing: 2px;
    font-size: 2.5rem;
}

.content-text {
    line-height: 1.8;
    font-size: 1.1rem;
}

.content-text p {
    margin-bottom: 25px;
}

.content-text strong {
    color: var(--primary-color);
}

/* Кастомный курсор (только для основного сайта) */
body:not(.admin-body) * {
    cursor: none !important;
}

.custom-cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.1s ease;
    mix-blend-mode: difference;
    left: -100px;
    top: -100px;
}

.custom-cursor::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 4px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 50%;
}

.custom-cursor.hover {
    transform: scale(1.5);
    background: rgba(169, 143, 113, 0.1);
}

/* Анимации */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Адаптивность */
@media (max-width: 768px) {
    .language-switcher {
        display: none;
    }
    
    .mobile-language-switcher {
        display: block;
    }
    
    .nav {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .message-form-container {
        padding: 30px;
        margin: 0 20px;
    }
    
    .page-content {
        padding: 30px;
        
    }
    
    .logo h1 {
        font-size: 1.5rem;
    }
    
    .logo img {
        height: 45px;
        max-width: 220px;
    }
    
    .header {
        padding: 12px 0;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .btn {
        padding: 16px 28px;
        font-size: 15px;
        width: 100%;
        max-width: 280px;
    }
    
    /* Исправление кнопки отправки формы */
    .form-submit-btn {
        width: 100%;
        max-width: none;
        margin-top: 15px;
        padding: 16px;
    }
    
    .form-wrapper h2 {
        font-size: 1.6rem;
    }
    
    .page-content h1 {
        font-size: 2rem;
    }
    
    .mobile-nav-link {
        font-size: 1.2rem;
        padding: 12px 25px;
        width: 180px;
    }
    
    .footer {
        padding: 12px 0;
    }
    
    .footer p {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .page-content {
        padding: 25px;
        margin: 70px auto 50px;
    }
    
    .message-form-container {
        margin: 0 15px;
        padding: 25px;
    }
    
    .mobile-lang-trigger {
        width: 45px;
        height: 45px;
    }
    
    .mobile-lang-dropdown {
        min-width: 110px;
    }
    
    .logo h1 {
        font-size: 1.3rem;
    }
    
    .logo img {
        height: 40px;
        max-width: 200px;
    }
    
    .mobile-nav-link {
        font-size: 1.1rem;
        padding: 10px 20px;
        width: 160px;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 15px;
    }
    
    .form-wrapper h2 {
        font-size: 1.4rem;
    }
    
    .page-content h1 {
        font-size: 1.8rem;
    }
    
    .footer {
        padding: 10px 0;
    }
}

@media (max-width: 360px) {
    .logo h1 {
        font-size: 1.1rem;
    }
    
    .logo img {
        height: 35px;
        max-width: 170px;
    }
    
    .message-form-container {
        margin: 0 10px;
        padding: 20px;
    }
    
    .page-content {
        margin: 60px auto 40px;
        padding: 20px;
    }
    
    .mobile-nav {
        padding-top: 80px;
    }
    
    .mobile-nav-close {
        top: 20px;
        right: 20px;
    }
}

.external-link-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    width: 100%;
    margin-top: 15px;
}

.external-link-btn i {
    font-size: 0.9em;
}

/* Адаптивность для кнопок в форме */
@media (max-width: 768px) {
    .form-submit-btn {
        width: 100%;
        max-width: none;
        margin-top: 10px;
    }
    
    .external-link-btn {
        margin-top: 12px;
    }
}

@media (max-width: 480px) {
    .external-link-btn {
        margin-top: 10px;
        padding: 14px;
        font-size: 14px;
    }
}