:root {
    --primary: #121B26;
    --gold: #C5A059;
    --bg-light: #FDFDFD;
    --white: #ffffff;
    --radius-lg: 40px;
    --radius-md: 24px;
    --transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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


html {
  scroll-behavior: smooth;
}


body {
    font-family: 'Montserrat', sans-serif;
    background: var(--bg-light);
    color: var(--primary);
    overflow-x: hidden;
}


h1, h2, h3 { font-family: 'Playfair Display', serif; }

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 50px;
    align-items: start;
}


.about-img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 20px 20px 0 var(--primary);
}


.timeline-item {
    border-left: 2px solid var(--gold);
    padding-left: 20px;
    margin-bottom: 30px;
    position: relative;
}
.timeline-item::before {
    content: ''; position: absolute; left: -6px; top: 5px;
    width: 10px; height: 10px; background: var(--primary); border-radius: 50%;
}
.timeline-year { font-weight: 700; color: var(--gold); font-size: 0.9rem; margin-bottom: 5px; }

.container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
}

/* HEADER */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    height: 80px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

/* Измененный класс для контейнера в шапке */
.header-content {
    display: flex;
    justify-content: space-between; /* Лого влево, меню вправо */
    align-items: center;
    width: 100%;
}

nav {
    display: flex;
    align-items: center;
}

.logo { font-size: 1.4rem; font-weight: 700; color: var(--primary); display: flex; align-items: center; gap: 10px; }
.logo i { color: var(--gold); }

.nav-links {
  display: flex;
  gap: 30px;
  list-style: none;
}
.nav-links a {
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--primary);
  text-decoration: none;
  transition: 0.3s;
  position: relative;
}

.nav-links a::after {
    content: ''; position: absolute; width: 0; height: 2px;
    bottom: -5px; left: 0; background-color: var(--gold); transition: 0.3s;
}
.nav-links a:hover::after { width: 100%; }
.nav-links a:hover { color: var(--gold); }

/* HERO */
.hero {
    height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: radial-gradient(circle at top right, #f0f4f8, #ffffff);
    border-bottom-left-radius: var(--radius-lg);
    border-bottom-right-radius: var(--radius-lg);
    margin-bottom: 40px;
}
.hero h1 { font-size: clamp(2.5rem, 6vw, 4rem); margin-bottom: 20px; }
.btn {
    padding: 18px 40px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50px;
    text-decoration: none;
    display: inline-block;
    font-weight: 600;
    transition: var(--transition);
}
.btn:hover { background: var(--gold); transform: scale(1.05); }

/* SECTION COMMON */
section { padding: 120px 0; }
h2 { font-size: 2.8rem; text-align: center; margin-bottom: 60px; }

/* ABOUT */
.about-card {
    background: var(--white);
    padding: 50px;
    border-radius: var(--radius-lg);
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.03);
    align-items: center;
}
.about-img { width: 100%; border-radius: var(--radius-md); filter: grayscale(0.2); }

/* СЛАЙДЕР */
.slider-container-relative {
    position: relative;
    padding: 0 50px;
}

.slider-wrapper {
    position: relative;
    overflow-x: auto;
    padding: 60px 0;
    display: flex;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.slider-wrapper::-webkit-scrollbar { display: none; }

.card {
    flex: 0 0 380px;
    margin: 0 20px;
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: var(--transition);
    opacity: 0.5;
    transform: scale(0.85);
    display: flex;
    flex-direction: column;
    border: 1px solid transparent;
    scroll-snap-align: center;
}

/* Активная карточка */
.card.active {
    opacity: 1;
    transform: scale(1.1);
    border-color: var(--gold);
    box-shadow: 0 25px 50px rgba(197, 160, 89, 0.15);
    z-index: 10;
}

.price-val { font-size: 2.2rem; color: var(--gold); font-weight: 700; margin: 20px 0; }

/* КНОПКИ СЛАЙДЕРА */
.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--white);
    border: 1px solid rgba(0,0,0,0.1);
    color: var(--primary);
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 20;
    transition: var(--transition);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
}
.nav-btn:hover {
    background: var(--gold);
    color: var(--white);
    border-color: var(--gold);
}
.nav-btn.prev { left: 0; }
.nav-btn.next { right: 0; }

/* КНОПКА НАВЕРХ */
#toTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: var(--gold);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 2000;
    display: none;
    box-shadow: 0 10px 20px rgba(197,160,89,0.3);
    transition: 0.3s;
}

/* КОНТАКТЫ */
.contacts { background: var(--primary); color: var(--white); border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.contacts h2 { color: var(--white); }
.contact-grid { display: flex; justify-content: center; gap: 50px; flex-wrap: wrap; text-align: center; }
.contact-item a { font-size: 1.5rem; color: var(--gold); display: block; margin-top: 10px; }

/* ------------------------------------------------ */
/* ----------- МОБИЛЬНАЯ ВЕРСИЯ ------------------- */
/* ------------------------------------------------ */

@media (max-width: 768px) {
    /* 1. Центрируем логотип в шапке */
    .header-content {
        justify-content: center; /* ЭТО КЛЮЧЕВОЕ ИЗМЕНЕНИЕ */
    }

    /* 2. Уменьшаем общие отступы */
    section { padding: 60px 0; }
    h2 { font-size: 2rem; margin-bottom: 40px; }

    /* 3. Навигация скрыта */
    .nav-links { display: none; }

    /* 4. БЛОК О СЕБЕ - КАРТИНКА СВЕРХУ, ТЕКСТ СНИЗУ */
    .about-grid {
        display: flex;
        flex-direction: column;
        gap: 30px;
    }

    .about-image-block {
        order: 1;
        width: 100%;
    }

    .about-img {
        height: auto;
        min-height: 300px;
        box-shadow: 10px 10px 0 var(--primary);
    }

    .about-text {
        order: 2;
        text-align: left;
    }

    .about-text h2 { text-align: left; font-size: 1.8rem; margin-bottom: 20px; }
    .about-text p { font-size: 1rem !important; line-height: 1.6 !important; }

    /* 5. СЛАЙДЕРЫ */
    .slider-container-relative { padding: 0; }
    .nav-btn { display: none; }
    .card { flex: 0 0 280px; margin: 0 10px; }

    .hero { height: auto; min-height: 80vh; padding: 100px 20px 40px; }

    /* Логотип */
    .logo {
        font-size: 1.4rem;
        font-weight: 700;
        color: var(--primary);
        display: flex;
        gap: 10px;
        /* Убедимся, что внутри логотипа текст и иконка тоже выровнены */
        justify-content: center;
    }
    .logo i { color: var(--gold); }
}
