:root {
    /* Color Palette - Burgundy Rose */
    --color-primary-900: #6b2c3e;
    --color-primary-800: #7d3a4f;
    --color-primary-700: #8f4860;
    --color-accent-500: #e8b4bc;
    --color-accent-400: #f0c4cb;
    --color-accent-600: #dba4ad;
    --color-surface: #fffbfc;
    --color-surface-alt: #faf5f6;
    --color-text: #2d1f23;
    --color-text-muted: #6d5a5f;
    --color-border: #e8dfe1;
    --color-white: #ffffff;
    
    /* Spacing & Layout */
    --container-width: 1200px;
    --header-height: 80px;
    --border-radius-lg: 20px;
    --border-radius-btn: 50px;
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Lato', sans-serif;
    color: var(--color-text);
    background-color: var(--color-surface);
    line-height: 1.85;
    font-weight: 300;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    color: var(--color-primary-900);
    margin-bottom: 1rem;
    line-height: 1.25;
}

h1 {
    font-size: 2.5rem;
    font-weight: 600;
}

@media (min-width: 768px) {
    h1 {
        font-size: 3.5rem;
    }
}

h2 {
    font-size: 2rem;
    font-weight: 600;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Utility Classes */
.container {
    width: 90%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1rem;
}

.text-center {
    text-align: center;
}

.section {
    padding: 5rem 0;
}

.bg-alt {
    background-color: var(--color-surface-alt);
}

.bg-primary {
    background-color: var(--color-primary-900);
    color: var(--color-white);
}

.bg-primary h1, .bg-primary h2, .bg-primary h3, .bg-primary p {
    color: var(--color-white);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: var(--border-radius-btn);
    font-weight: 400;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.4s ease;
    border: none;
    text-align: center;
}

.btn--primary {
    background: var(--color-primary-900);
    color: var(--color-accent-500);
    box-shadow: 0 4px 20px rgba(107, 44, 62, 0.2);
}

.btn--primary:hover {
    background: var(--color-primary-800);
    box-shadow: 0 8px 30px rgba(107, 44, 62, 0.3);
    transform: translateY(-2px);
    color: var(--color-white);
}

.btn--secondary {
    background: var(--color-accent-500);
    color: var(--color-primary-900);
}

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

.btn--outline {
    border: 1px solid var(--color-accent-500);
    color: var(--color-accent-500);
    background: transparent;
}

.btn--outline:hover {
    background: var(--color-accent-500);
    color: var(--color-primary-900);
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 251, 252, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 2px 15px rgba(0,0,0,0.03);
    height: var(--header-height);
    display: flex;
    align-items: center;
}

.header__container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 90%;
    max-width: var(--container-width);
    margin: 0 auto;
}

.logo svg {
    height: 50px;
    width: auto;
}

.nav__list {
    display: none;
}

@media (min-width: 992px) {
    .nav__list {
        display: flex;
        align-items: center;
        gap: 2rem;
    }

    .nav__link {
        color: var(--color-text);
        font-weight: 400;
        position: relative;
    }

    .nav__link::after {
        content: '';
        position: absolute;
        bottom: -5px;
        left: 0;
        width: 0;
        height: 1px;
        background: var(--color-primary-900);
        transition: width 0.3s ease;
    }

    .nav__link:hover::after {
        width: 100%;
    }
}

/* Mobile Menu */
.mobile-toggle {
    display: block;
    cursor: pointer;
    z-index: 1001;
}

@media (min-width: 992px) {
    .mobile-toggle {
        display: none;
    }
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: var(--color-surface);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: right 0.4s ease;
    z-index: 999;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu a {
    font-size: 1.5rem;
    margin: 1rem 0;
    font-family: 'Playfair Display', serif;
}

/* Hero Section */
.hero {
    position: relative;
    height: 85vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-size: cover;
    background-position: center;
    margin-top: var(--header-height);
}

.hero__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(107, 44, 62, 0.4), rgba(107, 44, 62, 0.6));
    z-index: 1;
}

.hero__content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 1rem;
}

.hero__title {
    color: var(--color-white);
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    font-style: italic;
    margin-bottom: 1.5rem;
}

.hero__subtitle {
    color: var(--color-white);
    font-size: 1.25rem;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
    margin-bottom: 2.5rem;
}

/* Hero on pages without background image (white bg) */
.hero--light {
    background: var(--color-surface-alt);
    height: auto;
    padding: 8rem 0 4rem;
}

.hero--light .hero__overlay {
    display: none;
}

.hero--light .hero__title,
.hero--light .hero__subtitle {
    color: var(--color-primary-900);
    text-shadow: none;
}

/* Asymmetric Grid */
.grid-asym {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}

@media (min-width: 992px) {
    .grid-asym {
        grid-template-columns: 1.2fr 0.8fr;
    }
    
    .grid-asym--reverse {
        grid-template-columns: 0.8fr 1.2fr;
    }
    
    .grid-asym--reverse .grid-content {
        order: 2;
    }
    
    .grid-asym--reverse .grid-image {
        order: 1;
    }
}

.grid-image img {
    border-radius: var(--border-radius-lg);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 3rem;
}

@media (min-width: 768px) {
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1200px) {
    .cards-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.card {
    background: var(--color-white);
    padding: 2.5rem;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
    border: 1px solid var(--color-surface-alt);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

/* Timeline */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 4rem auto;
}

.timeline-item {
    padding: 2rem;
    border-left: 2px solid var(--color-accent-500);
    position: relative;
    margin-left: 1rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -9px;
    top: 2.5rem;
    width: 16px;
    height: 16px;
    background: var(--color-primary-900);
    border-radius: 50%;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-control {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-family: 'Lato', sans-serif;
    font-size: 1rem;
    background: var(--color-surface);
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary-900);
    box-shadow: 0 0 0 3px rgba(107, 44, 62, 0.1);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

/* Footer */
.footer {
    background: var(--color-primary-900);
    color: var(--color-accent-400);
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .footer-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.footer h4 {
    color: var(--color-white);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.footer ul li {
    margin-bottom: 0.8rem;
}

.footer a:hover {
    color: var(--color-white);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 3rem;
    padding-top: 2rem;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
    text-align: center;
}

/* Cookie Banner */
#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--color-white);
    box-shadow: 0 -5px 20px rgba(0,0,0,0.1);
    padding: 1.5rem;
    z-index: 9999;
    display: none;
    border-top: 4px solid var(--color-primary-900);
}

.cookie-content {
    max-width: var(--container-width);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 768px) {
    .cookie-content {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

/* Privacy Modal */
#privacy-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--color-white);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

/* 404 Page */
.page-404 {
    height: 70vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Responsive Typography */
@media (max-width: 768px) {
    .section {
        padding: 3rem 0;
    }
    h1 { font-size: 2.25rem; }
    h2 { font-size: 1.75rem; }
}
/* === AUTO CONTRAST FIX === */
/* Только для секций с фоновыми изображениями */
section[style*="background-image"] { position: relative; }
section[style*="background-image"]::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.6));
    z-index: 1;
}
section[style*="background-image"] > * { position: relative; z-index: 2; }
section[style*="background-image"] h1,
section[style*="background-image"] h2,
section[style*="background-image"] h3,
section[style*="background-image"] p {
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
/* Hero с классом */
.hero--dark h1, .hero--dark h2, .hero--dark p { color: white; }
/* Footer всегда тёмный */
.footer { background: #1f2937; color: #9ca3af; }
.footer h4 { color: white; }
.footer a { color: #9ca3af; }
.footer a:hover { color: white; }
/* Cookie banner */
.cookie-banner { position: fixed; bottom: 0; left: 0; right: 0; background: #1f2937; padding: 1rem; z-index: 1000; }
/* === END AUTO CONTRAST FIX === */
