:root {
    --primary-color: #C8A97E;
    --primary-dark: #B69563;
    --secondary-color: #1A1A1A;
    --text-color: #333333;
    --light-bg: #F9F9F9;
    --white: #FFFFFF;
    --gradient-primary: linear-gradient(45deg, #C8A97E, #D4B88C);
    --shadow-sm: 0 2px 5px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 15px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.12);
    --border-radius-sm: 4px;
    --border-radius-md: 8px;
    --border-radius-lg: 12px;
    --transition-base: all 0.3s ease;
}

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

body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-bg);
    font-size: 16px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 5rem 2rem;
}

.section-title {
    text-align: center;
    font-size: 2.0rem;
    color: var(--secondary-color);
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--gradient-primary);
}

/* Плавные переходы между секциями */
section {
    transition: opacity 0.8s ease, transform 0.8s ease;
}

/* Анимация появления секций при скролле */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-animate {
    animation: fadeInUp 0.8s ease-out;
}

/* Кнопка Наверх */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    opacity: 0;
    visibility: hidden; /* Скрываем кнопку, пока она не нужна */
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease, background-color 0.3s ease, visibility 0.4s ease;
    z-index: 99;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25), 0 2px 6px rgba(200, 169, 126, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.back-to-top svg {
    width: 22px;
    height: 22px;
    transition: transform 0.3s ease;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background-color: var(--primary-dark);
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3), 0 3px 8px rgba(200, 169, 126, 0.4);
}

.back-to-top:hover svg {
    transform: translateY(-3px);
}

.back-to-top:active {
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
    .back-to-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
    }
    
    .back-to-top svg {
        width: 20px;
        height: 20px;
    }
}

/* Прелоадер */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--secondary-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loader {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    margin-bottom: 20px;
}

.loader:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: var(--primary-color);
    animation: spin 1.5s linear infinite;
}

.loader-inner {
    width: 60%;
    height: 60%;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: var(--white);
    animation: spin 2s linear infinite reverse;
}

.loader-text {
    color: var(--white);
    font-size: 1.5rem;
    letter-spacing: 3px;
    font-weight: 600;
    animation: pulse 1.5s ease-in-out infinite;
}

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

@keyframes pulse {
    0% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0.6;
    }
}