:root {
    --primary: #0f2027; /* Deep academic dark */
    --secondary: #203a43;
    --accent: #c5a059; /* Gold for prestige */
    --light: #fdfbf7;
    --glass: rgba(255, 255, 255, 0.9);
    --glass-dark: rgba(15, 32, 39, 0.85);
}

/* --- BASE & TYPOGRAPHY --- */
html, body {
    font-family: 'Montserrat', sans-serif;
    color: #333;
    background-color: #f4f7f6;
}

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

/* --- COMPONENTS --- */
.btn-glow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 30px;
    background: var(--accent) !important;
    color: #fff !important;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 0 20px rgba(197, 160, 89, 0.4);
    transition: all 0.3s ease;
    border: none;
}
.btn-glow:hover {
    box-shadow: 0 0 30px rgba(197, 160, 89, 0.8);
    transform: translateY(-2px);
    color: #fff !important;
}

/* --- NAVBAR --- */
/*.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transition: all 0.3s;
}
.navbar-brand img {
    height: 50px;
}
.nav-link {
    font-weight: 600;
    margin-left: 20px;
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: var(--accent);
    bottom: 0;
    left: 0;
    transition: 0.3s;
}
.nav-link:hover::after {
    width: 100%;
}*/

/* ==========================================================
   PREMIUM NAVBAR
   ========================================================== */
#mainNav {
    background: rgba(255, 255, 255, 0.96) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 12px 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
}

/* Логотип и Название */
.navbar-logo {
    height: 48px;
    transition: transform 0.3s ease;
}
.navbar-brand:hover .navbar-logo {
    transform: scale(1.05);
}
.navbar-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--primary, #0f2027);
    letter-spacing: 0.5px;
    margin-left: 12px;
    padding-left: 15px;
    border-left: 2px solid var(--accent, #c5a059);
    line-height: 1.2;
}

/* Ссылки меню */
#mainNav .nav-link {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary, #0f2027) !important;
    padding: 8px 12px !important;
    margin: 0 4px;
    white-space: nowrap;
    transition: all 0.3s ease;
    position: relative;
}
#mainNav .nav-link::before {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: var(--accent, #c5a059);
    bottom: 0px; /* Приподнял линию, чтобы она была ровно под текстом */
    left: 50%;
    transform: translateX(-50%); /* Центрирование */
    transition: all 0.3s ease;
}

#mainNav .nav-link:hover {
    color: var(--accent, #c5a059) !important;
}

#mainNav .nav-link:hover::before,
#mainNav .nav-link.active::before {
    width: 70%; /* Ширина золотой линии */
}

/* Убираем уродливую системную стрелочку Bootstrap у выпадающих меню */
#mainNav .dropdown-toggle::after {
    display: none !important;
}

/* Выпадающее меню (Dropdown) */
#mainNav .dropdown-menu {
    border: none;
    border-top: 3px solid var(--accent, #c5a059) !important;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    padding: 10px 0;
    margin-top: 0;
}
#mainNav .dropdown-item {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--primary, #0f2027);
    padding: 10px 24px;
    transition: all 0.2s ease;
}
#mainNav .dropdown-item:hover,
#mainNav .dropdown-item.active {
    background-color: rgba(197, 160, 89, 0.08);
    color: var(--accent, #c5a059);
}

/* Открытие Dropdown при наведении (только для ПК) */
@media (min-width: 1200px) {
    #mainNav .dropdown:hover > .dropdown-menu {
        display: block;
        animation: fadeDropdown 0.3s ease forwards;
    }
    #mainNav .dropdown:hover > .nav-link {
        color: var(--accent, #c5a059) !important;
    }
    /* Невидимый мостик */
    #mainNav .dropdown-menu::before {
        content: ''; position: absolute; top: -20px; left: 0; width: 100%; height: 20px; background: transparent;
    }
}

@keyframes fadeDropdown {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Кнопка скачивания PDF */
.nav-btn-pdf {
    display: inline-flex; align-items: center; background: rgba(197, 160, 89, 0.1);
    color: var(--accent, #c5a059); font-size: 0.85rem; font-weight: 700;
    padding: 8px 18px; border-radius: 50px; text-decoration: none; white-space: nowrap;
    transition: all 0.3s ease; border: 1px solid rgba(197, 160, 89, 0.3); margin: 0 10px;
}
.nav-btn-pdf:hover {
    background: var(--accent, #c5a059); color: #fff !important; transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(197, 160, 89, 0.3);
}

/* Кнопка смены языка */
.nav-btn-lang {
    display: inline-flex; align-items: center; background: var(--primary, #0f2027);
    color: #fff !important; font-size: 0.85rem; font-weight: 600; padding: 8px 20px;
    border-radius: 50px; text-decoration: none; transition: all 0.3s ease;
    border: 2px solid transparent;
}
.nav-btn-lang:hover, .nav-btn-lang[aria-expanded="true"] {
    background: #fff; color: var(--primary, #0f2027) !important; border-color: var(--primary, #0f2027);
}

/* Мобильный бургер */
.navbar-toggler { border: none !important; padding: 5px; }
.navbar-toggler:focus { box-shadow: none !important; }
@media (max-width: 1199px) {
    #navbarNav { padding: 15px 0; }
    .nav-btn-pdf { margin: 10px 0; display: inline-block; width: max-content; }
}

/* --- HERO SECTION --- */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(-45deg, #0f2027, #203a43, #2c5364, #1a2a33);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    overflow: hidden;
    padding-top: 80px;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero-decoration {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent) 0%, rgba(0,0,0,0) 70%);
    opacity: 0.15;
    z-index: 1;
    filter: blur(60px);
}
.deco-1 { width: 500px; height: 500px; top: -100px; right: -100px; }
.deco-2 { width: 300px; height: 300px; bottom: 50px; left: -50px; background: radial-gradient(circle, #fff 0%, rgba(0,0,0,0) 70%); opacity: 0.05;}

.hero-content-left {
    z-index: 5;
    position: relative;
    color: white;
    text-align: left;
}

.hero-badge {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 20px;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.hero-title-modern {
    font-size: clamp(2.5rem, 5vw + 1rem, 4rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    text-shadow: 0 10px 30px rgba(0,0,0,0.3);
    word-wrap: break-word;
    hyphens: auto;
}

.hero-description {
    font-size: 1.1rem;
    opacity: 0.8;
    margin-bottom: 2rem;
    font-weight: 300;
    max-width: 600px;
    line-height: 1.6;
}

.hero-poster-wrapper {
    position: relative;
    z-index: 5;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.poster-card {
    position: relative;
    width: 100%;
    max-width: 450px;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: perspective(1000px) rotateY(-10deg) rotateX(5deg);
    transition: transform 0.3s ease;
    animation: floating 6s ease-in-out infinite;
    border: 10px solid rgba(255,255,255,0.1);
}

.poster-card img {
    width: 100%;
    border-radius: 10px;
    display: block;
}

.poster-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 80%;
    background: var(--accent);
    filter: blur(80px);
    opacity: 0.4;
    z-index: -1;
    animation: pulseGlow 4s infinite alternate;
}

@keyframes floating {
    0% { transform: perspective(1000px) rotateY(-5deg) translateY(0px); }
    50% { transform: perspective(1000px) rotateY(-5deg) translateY(-20px); }
    100% { transform: perspective(1000px) rotateY(-5deg) translateY(0px); }
}

@keyframes pulseGlow {
    0% { opacity: 0.2; transform: translate(-50%, -50%) scale(0.9); }
    100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1.1); }
}

/* --- SECTIONS GENERAL --- */
.section-padding {
    padding: 100px 0;
    position: relative;
}
.section-title {
    margin-bottom: 60px;
    position: relative;
    display: inline-block;
}
.section-title::before {
    content: '';
    position: absolute;
    width: 60px;
    height: 3px;
    background: var(--accent);
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
}

.about-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}
.about-text {
    padding: 40px;
}

/* --- TOPICS GRID --- */
.topic-item {
    background: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    transition: all 0.4s;
    border: 1px solid rgba(0,0,0,0.05);
    height: 100%;
}
.topic-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    background: var(--primary);
}
.topic-item:hover h5, .topic-item:hover i {
    color: white !important;
}
.topic-icon {
    font-size: 3rem;
    color: var(--accent);
    margin-bottom: 20px;
    transition: 0.4s;
}


.person-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}
.person-icon {
    width: 40px;
    height: 40px;
    background: var(--light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    margin-right: 15px;
}


/* --- TIMELINE --- */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}
.timeline-item {
    padding: 20px 30px;
    background: white;
    border-radius: 10px;
    margin-bottom: 20px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border-left: 4px solid var(--accent);
}
.timeline-date {
    font-weight: 700;
    color: var(--accent);
    font-size: 1.1rem;
}

/* --- SPEAKERS SECTION --- */
.speaker-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border-bottom: 4px solid transparent;
    position: relative;
}
.speaker-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.12);
    border-bottom: 4px solid var(--accent, #ffc107);
}

.speaker-img-wrapper {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
    background: #f8f9fa;
}

.speaker-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    transition: transform 0.6s ease;
}
.speaker-card:hover .speaker-img {
    transform: scale(1.08);
}

.speaker-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 6rem;
    color: #e9ecef;
    background: #fdfdfd;
}

.speaker-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to top, rgba(15, 32, 39, 0.85) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 25px;
}
.speaker-card:hover .speaker-overlay { opacity: 1; }

.speaker-divider {
    width: 40px; height: 2px;
    background-color: var(--accent, #ffc107);
    opacity: 0.5;
}
.speaker-info {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.6;
}
/* Оформление плашки с темой доклада */
.speech-title-box {
    background-color: rgba(197, 160, 89, 0.05); /* Очень легкий золотой фон */
    border: 1px solid rgba(197, 160, 89, 0.15);
    padding: 10px;
    border-radius: 8px;
    transition: all 0.3s ease;
}
.speaker-card:hover .speech-title-box {
    background-color: rgba(197, 160, 89, 0.1);
    border-color: rgba(197, 160, 89, 0.3);
}

/* Фикс для одинаковой высоты карточек */
.speaker-body {
    display: flex;
    flex-direction: column;
}
.speaker-divider {
    margin-top: auto; /* Прижимает аннотацию к низу карточки */
}

/* --- FOOTER & CONTENT --- */
footer {
    background: var(--primary);
    color: white;
    padding: 80px 0 30px;
    position: relative;
}
.footer-logo {
    font-family: 'Playfair Display';
    font-size: 1.8rem;
    margin-bottom: 20px;
}
.contact-info li { margin-bottom: 15px; display: flex; align-items: flex-start; }
.contact-info i { color: var(--accent); margin-right: 15px; margin-top: 5px; }

.rules-content { color: #555; line-height: 1.7; font-size: 1rem; }
.rules-content ul { padding-left: 20px; margin-bottom: 20px; }
.rules-content li { margin-bottom: 10px; }
.rules-content a { color: #0d6efd; font-weight: 600; text-decoration: none; }
.rules-content a:hover { text-decoration: underline; }

/* Стили для CKEditor в комитетах */
.ckeditor-content ul { padding-left: 20px; }
.ckeditor-content li { margin-bottom: 8px; }
.ckeditor-content strong { color: #0d6efd; } /* Выделяем имена синим */

/* Для 3-й синей колонки */
.ckeditor-content-white, .ckeditor-content-white * { color: rgba(255,255,255,0.8) !important; }
.ckeditor-content-white strong { color: #ffffff !important; }



/* --- COMMITTEES SECTION (NEW PREMIUM DESIGN) --- */
.committee-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: all 0.4s ease;
    border: 1px solid rgba(0,0,0,0.03);
    display: flex;
    flex-direction: column;
}
.committee-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.12);
}

.committee-card-header {
    padding: 30px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
/* Градиенты для шапок */
.bg-gradient-gold {
    background: linear-gradient(135deg, var(--accent, #c5a059) 0%, #e6c887 100%);
}
.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary, #0f2027) 0%, var(--secondary, #203a43) 100%);
}
.bg-gradient-info {
    background: linear-gradient(135deg, #2c5364 0%, #4b798e 100%);
}

.committee-card-body {
    padding: 25px;
    flex-grow: 1;
    background-color: #ffffff;
}

.committee-scroll {
    max-height: 570px; /* Идеальная высота для списка */
    overflow-y: auto;
    padding-right: 15px;
}

/* Красивый кастомный скроллбар */
.custom-scrollbar::-webkit-scrollbar {
    width: 5px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #cdd4d9;
    border-radius: 10px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: var(--accent, #c5a059);
}

/* Стилизация текста CKEditor внутри списков */
.ckeditor-content {
    font-size: 0.95rem;
    color: #444;
    line-height: 1.6;
}
.ckeditor-content ul {
    padding-left: 0;
    list-style: none;
}
.ckeditor-content li {
    margin-bottom: 12px;
    position: relative;
    padding-left: 20px;
    border-bottom: 1px dashed #f0f0f0;
    padding-bottom: 8px;
}
.ckeditor-content li:last-child {
    border-bottom: none;
}
.ckeditor-content li::before {
    content: "•";
    color: var(--accent, #c5a059);
    font-weight: bold;
    font-size: 1.5rem;
    position: absolute;
    left: 0;
    top: -6px;
}
.ckeditor-content strong {
    color: var(--primary, #0f2027);
    font-weight: 700;
}

/* Для подвала */
.ckeditor-content-footer p, .ckeditor-content-footer li { color: rgba(255,255,255,0.5) !important; font-size: 0.875em; margin-bottom: 5px; }

/* ==========================================================
   ЕДИНЫЙ БЛОК ДЛЯ МОБИЛЬНЫХ УСТРОЙСТВ (ИСКЛЮЧАЕТ КОНФЛИКТЫ)
   ========================================================== */
@media (max-width: 991px) {
    /* 1. Секция Hero */
    .hero-section {
        text-align: center !important;
        padding-top: 110px !important;
        padding-bottom: 60px !important;
        height: auto !important;
    }
    .hero-content-left {
        text-align: center !important;
        padding: 0 15px !important;
    }

    /* 2. Заголовок и текст */
    .hero-title-modern {
        font-size: clamp(2rem, 8vw, 3.2rem) !important;
        line-height: 1.15 !important;
        margin-bottom: 1.5rem !important;
    }
    .hero-description {
        margin-left: auto !important;
        margin-right: auto !important;
    }

    /* 3. Кнопка, Дата и Формат - КОМПАКТНО В РЯД */
    .hero-content-left .d-flex.flex-wrap {
        flex-direction: row !important; /* Разрешаем элементам стоять в строчку */
        flex-wrap: wrap !important; /* Разрешаем перенос на новую строку, если не влезло */
        justify-content: center !important;
        align-items: center !important;
        gap: 15px !important; /* Уменьшаем отступ между блоками */
        width: 100% !important;
    }

    /* Возвращаем иконку слева от текста */
    .hero-content-left .d-flex.align-items-center {
        flex-direction: row !important;
        margin: 0 !important;
    }

    /* Уменьшаем кружки с иконками для экономии места */
    .hero-icon-circle {
        width: 36px !important;
        height: 36px !important;
        margin-right: 10px !important;
        margin-bottom: 0 !important;
        font-size: 0.9rem !important;
    }

    /* Текст внутри плашек выравниваем по левому краю */
    .hero-content-left .text-start {
        text-align: left !important;
    }

    /* Уменьшаем шрифты внутри инфо-блоков на мобилке */
    .hero-content-left .text-start .fw-bold {
        font-size: 0.85rem !important;
    }
    .hero-content-left .text-start .small-label {
        font-size: 0.65rem !important;
        margin-bottom: 0 !important;
    }

    /* Кнопку делаем чуть компактнее, чтобы не занимала пол-экрана */
    .btn-glow {
        padding: 10px 24px !important;
        font-size: 0.9rem !important;
    }

    /* 4. Постер (Афиша) */
    .poster-card {
        transform: none !important;
        animation: mobileFloating 6s ease-in-out infinite !important;
        max-width: 85% !important;
        margin: 20px auto 0 auto !important;
        border-width: 5px !important;
    }
}

/* Отдельная анимация для мобилок без 3D эффекта */
@keyframes mobileFloating {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}


/* ==========================================================
       DATES SECTION (PREMIUM TIMELINE)
       ========================================================== */
.timeline-premium-wrapper {
    position: relative;
    padding-top: 30px;
}

/* Горизонтальная линия позади карточек */
.timeline-premium-line {
    position: absolute;
    top: 80px; /* Половина высоты иконки + отступ */
    left: 10%;
    right: 10%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(197, 160, 89, 0.3) 10%, rgba(197, 160, 89, 0.3) 90%, transparent);
    z-index: 0;
}

.date-premium-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 0 20px 30px 20px;
    height: 100%;
    text-align: center;
    transition: all 0.4s ease;
    position: relative;
    z-index: 2;
    border: 1px solid rgba(0,0,0,0.03);
    box-shadow: 0 10px 30px rgba(0,0,0,0.02);
    margin-top: 40px; /* Отступ для выпирающей иконки */
}

.date-premium-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
    border-color: rgba(197, 160, 89, 0.2);
}

/* Иконка сверху карточки */
.date-icon-top {
    width: 70px;
    height: 70px;
    background: #ffffff;
    border: 2px solid rgba(15, 32, 39, 0.1);
    color: var(--primary, #0f2027);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin: -35px auto 20px auto; /* Выдвигаем наполовину вверх */
    transition: all 0.4s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.date-premium-card:hover .date-icon-top {
    background: var(--primary, #0f2027);
    color: #ffffff;
    border-color: var(--primary, #0f2027);
    transform: rotate(10deg);
}

/* Выделенная дата (Highlighted) */
.date-premium-card.highlighted {
    border-color: var(--accent, #c5a059);
    box-shadow: 0 15px 35px rgba(197, 160, 89, 0.15);
}
.date-premium-card.highlighted .date-icon-top {
    background: var(--accent, #c5a059);
    color: #ffffff;
    border-color: var(--accent, #c5a059);
    box-shadow: 0 10px 25px rgba(197, 160, 89, 0.4);
}
.date-premium-card.highlighted:hover .date-icon-top {
    background: var(--primary, #0f2027);
    border-color: var(--primary, #0f2027);
}

/* ==========================================================
   PARTICIPATION & RULES SECTION (MODERN LAYOUT)
   ========================================================== */

.max-w-700 {
    max-width: 700px;
}

.rules-premium-document {
    border: 1px solid rgba(0,0,0,0.05);
    border-top: 6px solid var(--accent, #c5a059);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.rules-premium-document:hover {
    box-shadow: 0 20px 40px rgba(0,0,0,0.08) !important;
}

.document-content {
    background-color: #ffffff;
}

/* Форматирование текста CKEditor внутри документа */
.rules-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #333; /* Сделал текст чуть темнее для лучшей читаемости */
}
.rules-content h1, .rules-content h2, .rules-content h3 {
    color: var(--primary, #0f2027);
    font-family: 'Playfair Display', serif;
    margin-top: 2rem;
    margin-bottom: 1.2rem;
    font-weight: 700;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding-bottom: 10px;
}
.rules-content h1:first-child, .rules-content h2:first-child, .rules-content h3:first-child {
    margin-top: 0;
}
.rules-content ul, .rules-content ol {
    margin-bottom: 1.5rem;
    padding-left: 0;
    list-style: none;
}
.rules-content ul li {
    margin-bottom: 12px;
    position: relative;
    padding-left: 35px;
}
.rules-content ul li::before {
    content: "\f058"; /* Красивая круглая галочка FontAwesome */
    font-family: "Font Awesome 5 Free";
    font-weight: 400;
    color: var(--accent, #c5a059);
    position: absolute;
    left: 0;
    top: 2px;
    font-size: 1.2rem;
}
.rules-content p {
    margin-bottom: 1.5rem;
    text-align: justify; /* Выравнивание по ширине выглядит профессиональнее для больших текстов */
}
.rules-content strong {
    color: var(--primary, #0f2027);
}

/* Супер-красивая кнопка Microsoft CMT внутри CKEditor */
.rules-content a[href*="cmt3.research.microsoft.com"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 35px;
    background: var(--accent, #c5a059) !important;
    color: #fff !important;
    border-radius: 50px !important;
    text-decoration: none !important;
    box-shadow: 0 8px 20px rgba(197, 160, 89, 0.3);
    margin-top: 15px;
    margin-bottom: 25px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}
.rules-content a[href*="cmt3.research.microsoft.com"]::before {
    content: "\f35d"; /* Иконка внешней ссылки */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-right: 10px;
}
.rules-content a[href*="cmt3.research.microsoft.com"]:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(197, 160, 89, 0.5);
    background: var(--primary, #0f2027) !important;
}

/* Панель контактов внизу */
.document-contact-bar {
    background: linear-gradient(135deg, var(--primary, #0f2027) 0%, var(--secondary, #203a43) 100%);
    border-top: 1px solid rgba(255,255,255,0.1);
}
.document-contact-bar .btn-outline-light {
    border-width: 2px;
    font-weight: 600;
    transition: all 0.3s ease;
}
.document-contact-bar .btn-outline-light:hover {
    color: var(--primary, #0f2027) !important;
    background-color: #fff;
    transform: translateY(-2px);
}
/* Открытие Dropdown при наведении (только для компьютеров) */
@media (min-width: 1200px) {
    #mainNav .dropdown:hover > .dropdown-menu {
        display: block;
        margin-top: 0 !important; /* Убираем физический разрыв */
        animation: fadeDropdown 0.3s ease forwards;
    }
    #mainNav .dropdown:hover > .nav-link {
        color: var(--accent, #c5a059) !important;
    }

    /* НЕВИДИМЫЙ МОСТИК: чтобы мышка не срывалась при переходе в подменю */
    #mainNav .dropdown-menu::before {
        content: '';
        position: absolute;
        top: -20px; /* Перекрываем пустое пространство сверху */
        left: 0;
        width: 100%;
        height: 20px;
        background: transparent;
    }
}

/* Плавная анимация появления */
@keyframes fadeDropdown {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}