/* =========================================
   1. ПЕРЕМЕННЫЕ И БАЗОВЫЕ НАСТРОЙКИ
   ========================================= */
:root {
    --bg-color: #fff;
    --accent-color: #420918;
    --text-color: #000000;
    --gold-gradient: linear-gradient(110deg, #bf953f, #fcf6ba, #b38728, #fbf5b7, #aa771c, #bf953f);
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Tahoma', sans-serif;
    line-height: 1.6;
    padding-top: 73px; /* Компенсация фиксированной шапки */
}

/* =========================================
   2. АНИМАЦИИ
   ========================================= */
/* Плавный перелив золотого градиента */
@keyframes shimmer {
    0% { background-position: 0% 50%; }
    100% { background-position: 150% 50%; }
}

/* Мягкое пульсирующее свечение вокруг текста */
@keyframes goldGlow {
    0%, 100% { filter: drop-shadow(0 0 2px rgba(191, 149, 63, 0.3)); }
    50% { filter: drop-shadow(0 0 4px rgba(252, 246, 186, 0.7)); }
}

/* =========================================
   3. ШАПКА И НАВИГАЦИЯ
   ========================================= */
.main-header {
    background-color: transparent;
    padding: 15px 20px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    height: 73px;
    /* Лёгкая тень по умолчанию для объёма */
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
    transition: transform 0.4s ease, background-color 0.4s ease, padding 0.4s ease, box-shadow 0.4s ease;
}

.main-header.hidden {
    transform: translateY(-100%);
}

.main-header.scrolled {
    background-color: rgba(66, 9, 24, 0.92);
    backdrop-filter: blur(8px);
    padding: 10px 20px;
    /* Более выраженная тень при прокрутке */
    box-shadow: 0 4px 20px rgba(66, 9, 24, 0.3);
}

.main-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.nav-desktop {
    display: flex;
    gap: 60px;
}

/* Кнопки навигации */
.nav-btn {
    color: var(--accent-color);
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.95rem;
    letter-spacing: 1px;
    padding: 8px 20px;
    border: 1px solid rgba(66, 9, 24, 0.3);
    border-radius: 4px;
    background: transparent;
    box-shadow: 0 0 8px rgba(66, 9, 24, 0.1);
    transition: all 0.3s ease;
}

.nav-btn:hover {
    background-color: var(--accent-color);
    color: #fff;
    border-color: var(--accent-color);
    box-shadow: 0 0 15px rgba(66, 9, 24, 0.4);
    transform: translateY(-2px);
}

/* Состояние кнопок при прокрученной шапке */
.main-header.scrolled .nav-btn {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.1);
}

.main-header.scrolled .nav-btn:hover {
    background-color: #fff;
    color: var(--accent-color);
    border-color: #fff;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

/* Бургер-кнопка (мобильная) */
.burger-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 22px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.burger-line {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--accent-color);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.burger-btn.active .burger-line:nth-child(1) { transform: translateY(10px) rotate(45deg); }
.burger-btn.active .burger-line:nth-child(2) { opacity: 0; }
.burger-btn.active .burger-line:nth-child(3) { transform: translateY(-10px) rotate(-45deg); }

.main-header.scrolled .burger-line { background-color: #fff; }

/* Мобильное меню */
.mobile-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: rgba(66, 9, 24, 0.97);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
}

.mobile-menu.open {
    max-height: 300px;
    padding: 20px 0;
}

.mobile-menu-link {
    color: #fff;
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 1rem;
    letter-spacing: 1.5px;
    padding: 12px 20px;
    width: 100%;
    text-align: center;
    transition: background-color 0.3s;
}

.mobile-menu-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* =========================================
   4. ВЕРХНЯЯ ЧАСТЬ СТРАНИЦЫ (ОРГАНИЗАТОРЫ И ГЕРОЙ)
   ========================================= */
.top-page-area {
    position: relative;
    width: 100%;
    box-shadow: 0 12px 12px rgba(66, 9, 24, 0.3);
}

.organizers-section {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 60px;
    padding: 40px 20px 60px;
    flex-wrap: nowrap;
}

.organizer {
    display: flex;
    align-items: center;
    gap: 15px;
}

.organizer img {
    height: 70px;
    width: auto;
    object-fit: contain;
}

.organizer span {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--accent-color);
    letter-spacing: 0.5px;
}

/* Боковые орнаменты */
.side-ornament {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 300px;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    z-index: 1;
    pointer-events: none;
}

.side-ornament-left {
    left: 0;
    background-image: url('/static/images/ornament-side.png');
    background-position: top left;
}

.side-ornament-right {
    right: 0;
    background-image: url('/static/images/ornament-side.png');
    background-position: top right;
    transform: scaleX(-1);
}

/* Герой-секция */
.hero-section {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 20px 20px 60px;
}

.hero-content {
    position: relative;
    z-index: 3;
}

.hero-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    text-transform: uppercase;
    line-height: 1.15;
    margin-bottom: 30px;
}

.hero-title .line-1 {
    display: block;
    font-size: 1.8rem;
    color: var(--accent-color);
    letter-spacing: 3px;
    font-weight: 700;
}

/* АНИМИРОВАННОЕ ЗОЛОТОЕ СЛОВО */
.hero-title .line-2 {
    display: block;
    font-size: 5.5rem;
    background: var(--gold-gradient);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin: 15px 0;
    letter-spacing: 2px;
    /* Запуск анимаций: перелив (20 сек) и свечение (3 сек) */
    animation: shimmer 20s linear infinite;
}

.hero-title .line-3 {
    display: block;
    font-size: 2.2rem;
    color: var(--accent-color);
    letter-spacing: 1.5px;
    font-weight: 800;
}

.event-details {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text-color);
    margin: 10px;
}

.event-details .separator {
    color: #b38728;
    font-weight: 900;
}

/* Кнопка призыва к действию (CTA) */
.hero-cta-btn {
    display: inline-block;
    margin-top: 35px;
    padding: 14px 40px;
    background-color: var(--accent-color);
    color: #fff;
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 1rem;
    letter-spacing: 1.5px;
    border-radius: 4px;
    border: 1px solid var(--accent-color);
    box-shadow: 0 4px 15px rgba(66, 9, 24, 0.3);
    transition: all 0.3s ease;
}

.hero-cta-btn:hover {
    background-color: transparent;
    color: var(--accent-color);
    border-color: var(--accent-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(66, 9, 24, 0.4);
}

/* =========================================
   5. ГОРИЗОНТАЛЬНЫЙ ОРНАМЕНТ
   ========================================= */
.ornament-wrapper {
    display: flex;
    width: 100%;
    height: 150px;
    overflow: hidden;
    margin: 20px 0;
}

.ornament-left {
    flex: 1;
    background: url('/static/images/ornament-green.png') right center;
    background-size: auto 100%;
}

.ornament-right {
    flex: 1;
    background: url('/static/images/ornament-red.png') left center;
    background-size: auto 100%;
}

/* =========================================
   6. КОНТЕНТНЫЕ СЕКЦИИ
   ========================================= */
.content-section {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
    text-align: center;
}

.content-section h2 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 2rem;
    color: var(--accent-color);
    text-transform: uppercase;
}

.divider {
    width: 60px;
    height: 3px;
    background: var(--gold-gradient);
    margin: 15px auto 30px;
}

/* Блок "О ярмарке" */
.about-text {
    text-align: justify;
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333333;
}

.about-text .greeting {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--accent-color);
    margin-bottom: 20px;
    text-align: center; /* Приветствие лучше по центру */
}

.about-text p {
    margin-bottom: 16px;
}

.about-text p:last-child {
    margin-bottom: 0;
}

/* Блок "Экспонентам" */
.doc-block {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    margin-bottom: 40px;
    padding: 25px;
    background-color: rgba(255, 255, 255, 0.6);
    border-radius: 8px;
    border: 1px solid rgba(66, 9, 24, 0.1);
    text-align: left;
}

.doc-text {
    flex: 1;
}

.doc-text p {
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.6;
    color: #333;
}

/* Кнопки скачивания */
.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background-color: var(--accent-color);
    color: #fff;
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 4px 10px rgba(66, 9, 24, 0.2);
}

.download-btn:hover {
    background-color: #6a1025;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(66, 9, 24, 0.3);
}

/* Блок итоговой регистрации */
.registration-block {
    text-align: center;
    margin-top: 50px;
    padding: 35px 20px;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    border: 1px solid rgba(66, 9, 24, 0.15);
    box-shadow: 0 4px 15px rgba(66, 9, 24, 0.05);
}

.registration-block p {
    font-size: 1.15rem;
    color: #333;
    margin-bottom: 25px;
    line-height: 1.6;
}

.registration-btn {
    font-size: 1rem;
    padding: 16px 32px;
}

/* Контакты */
.contacts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    text-align: left;
    margin-top: 30px;
}

.address {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 20px;
    color: var(--accent-color);
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.contact-link {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.1rem;
    transition: color 0.3s;
}

.contact-link:hover {
    color: #b38728;
    text-decoration: underline;
}

/* Карта */
.map-frame {
    width: 100%;
    height: 300px;
    background-color: #e0ddd0;
    border: 2px solid var(--accent-color);
    border-radius: 8px;
    overflow: hidden; /* Чтобы iframe не вылезал за скругления */
}

.map-frame iframe {
    width: 100% !important;
    height: 100% !important;
    border: 0;
    display: block;
}

/* =========================================
   7. ФУТЕР
   ========================================= */
footer {
    text-align: center;
    padding: 30px;
    background-color: var(--accent-color);
    color: #fff;
    font-size: 0.9rem;
    margin-top: 20px;
}

/* =========================================
   8. АДАПТИВНОСТЬ (МЕДИА-ЗАПРОСЫ)
   ========================================= */

/* Планшеты и узкие десктопы: скрываем боковые орнаменты */
@media (max-width: 1200px) {
    .side-ornament {
        display: none;
    }

    .organizers-section {
        padding: 20px 20px 20px;
    }

    .hero-section {
        padding: 20px 20px 40px;
    }
}

/* Мобильные устройства */
@media (max-width: 768px) {
    /* Шапка и меню */
    .nav-desktop { display: none; }
    .burger-btn { display: flex; }
    .main-nav { justify-content: center; }

    /* Организаторы */
    .organizers-section {
        gap: 20px;
        padding: 110px 10px 20px;
    }
    .organizer img { height: 40px; }
    .organizer span { font-size: 0.75rem; }

    /* Заголовки */
    .hero-title .line-1,
    .hero-title .line-3 { font-size: 1.1rem; }
    .hero-title .line-2 { font-size: 3rem; }

    /* Детали события */
    .event-details {
        flex-direction: column;
        gap: 5px;
    }
    .event-details .separator { display: none; }

    /* Документы и регистрация */
    .doc-block {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    .download-btn {
        width: 100%;
        justify-content: center;
    }
    .registration-block {
        padding: 25px 15px;
    }
    .registration-block p { font-size: 1rem; }

    /* Контакты и карта */
    .contacts-grid { grid-template-columns: 1fr; }
    .map-frame { height: 350px; }
}

/* Десктоп: скрываем мобильное меню */
@media (min-width: 769px) {
    .mobile-menu { display: none; }
}
