body {
    margin: 0;
    background: #0f0f0f;
    color: #eaeaea;
    font-family: Georgia, serif;
}

/* ====================== СТРАНИЦЫ ====================== */
.page {
    display: none; 
    max-width: 1100px;
    margin: 0 auto;
    padding: 10px 20px 0;
    text-align: center;
    overflow-y: auto;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.55);
}

.page.active {
    display: block;
    opacity: 1;
    transition: opacity 0.3s ease;
}

#stabling.page {
    text-align: left !important;
}

/* ====================== ЗАГОЛОВКИ ====================== */
.section-title {
    text-align: center;
    margin: 20px auto 10px; /* ← уменьшил отступы */
}

.section-title h2 {
    font-size: 38px;
    margin: 0;
    padding-top: 10px;
    text-align: center;
    letter-spacing: 1px;
}

#stabling h2 {
    font-size: 36px;
    margin-bottom: 20px;
}

.lang-en h2, .lang-ru h2 {
    display: block;
    text-align: center !important;
}

/* ====================== ТЕКСТ BLOCK ====================== */

#stabling .text-block {
    text-align: left !important;
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.7;
    font-size: 18px;
}

/* ===== Точечная настройка заголовка только для раздела Содержание лошадей ===== */
#stabling h2 {
    font-size: 30px !important; /* было 36 → стало более элегантно */
    letter-spacing: 1px;
    margin-bottom: 18px;
}

/* чтобы ABOUT не занимал гигантский экран */
#about.page {
    min-height: auto !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

/* ====================== ABOUT TEXT ====================== */
.text-block {
    max-width: 900px;
    margin: 0 auto 26px;
    text-align: left;
    font-size: 18px;
    line-height: 1.82;
    color: #eaeaea;
}

.text-block p {
    margin-bottom: 18px;
}

/* ===== ГАЛЕРЕЯ — стабильное выравнивание текста ===== */

#gallery {
    text-align: center; /* центрирует весь блок */
}

#gallery .gallery-text {
    max-width: 800px;
    margin: 0 auto 30px;
    padding: 0 15px;
    text-align: center;
}

#gallery .gallery-text p {
    font-size: 18px;
    line-height: 1.65;
    opacity: 0.9;
    text-align: left;
    margin-bottom: 14px;
}

/* Центрируем блок, но текст остаётся слева */
#gallery .section-title {
    text-align: center;
}


/* ==================== NEWS STYLING ==================== */

#news h2 {
    font-size: 34px;
    font-family: Georgia, serif;
    font-weight: 700;
    letter-spacing: 1px;
    text-align: center;
    color: #ffffff;
    margin-bottom: 12px;
}

/* ровная золото-линия как в Содержании */
#news .divider {
    width: 160px;
    height: 3px;
    background: #C2A676;
    opacity: 0.9;
    margin: 14px auto 30px;
    border-radius: 4px;
}

/* текст новостей */

#news {
    text-align: left !important;
}

#news .news-text p {
    margin-bottom: 22px;
}

/* Отступ между русский и английский версией */
#news .news-text + .news-text {
    margin-top: 50px;
}

/* ---- Gold Divider ---- */
.divider {
    width: 180px;
    height: 2px;
    background: #C2A676;
    opacity: 0.7;
    margin: 14px auto 35px;
    border-radius: 2px;
}

/* ---- Intro ---- */
.intro {
    font-size: 19px;
    color: #ddd;
    line-height: 1.6;
    max-width: 880px;
    margin: 0 auto 28px;
}

/* ---- Headings ---- */
#stabling h3 {
    color: #C2A676;
    margin: 30px 0 15px;
    font-weight: 600;
}

/* ---- Gold List ---- */
.gold-list {
    list-style: none;
    padding: 0;
    margin: 0 0 25px;
}
.gold-list li {
    position: relative;
    padding-left: 18px;
    margin: 7px 0;
    line-height: 1.45;
}
.gold-list li::before {
    content: "■";
    position: absolute;
    left: 0;
    top: 4px;
    color: #C2A676;
    font-size: 10px;
}

/* ---- Price Block ---- */
.price-block {
    border: 1px solid #C2A676;
    padding: 16px 28px;
    border-radius: 6px;
    width: fit-content;
    margin: 38px auto 0;
}
.price-block p {
    margin: 0;
    font-size: 20px;
    color: #eee;
}

#about .divider {
    width: 110px;
    height: 3px;
    background: linear-gradient(90deg, #c2a676, #a38554, #c2a676);
    margin: 18px auto 34px;
    border-radius: 6px;
}

.about-text {
    max-width: 900px;
    margin: 0 auto 40px;
    text-align: left;
    font-size: 18px;
    line-height: 1.75;
    color: #e8e8e8;
}

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

#calendar .divider {
    width: 180px;
    height: 3px;
    background: #C2A676;
    opacity: 0.9;
    margin: 18px auto 40px;
    border-radius: 6px;
}

.calendar-text {
    max-width: 900px;
    margin: 0 auto 40px;
    text-align: center;
    font-size: 18px;
    line-height: 1.7;
}

#calendar .calendar-text .gold-list {
    margin: 0 auto;
    text-align: left !important;
    max-width: 900px;
    padding-left: 0;
}

.calendar-text .gold-list li {
    text-align: left;
    margin-left: 20px;
}

.gallery {
    margin: 25px auto 35px;
}

/* ====================== СЛАЙДЕР ====================== */
.slider {
    width: 100%;
    max-width: 1100px;
    margin: 15px auto 0; /* ← подняли к тексту вплотную */
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    background: #000;
    height: 520px;
}

.slides {
    display: flex;
    transition: transform 0.6s ease;
    height: 100%;
}

.slides img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    flex-shrink: 0;
}

/* ====================== СТРЕЛКИ СЛАЙДЕРА ====================== */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #ffffff;
    font-size: 45px;
    cursor: pointer;
    padding: 14px 18px;
    background: rgba(0,0,0,0.45);
    border-radius: 10px;
    user-select: none;
    transition: 0.25s ease;
    z-index: 4;
}

.slider-btn:hover {
    background: rgba(255,255,255,0.28);
}

.prev { left: 16px; }
.next { right: 16px; }

/* ====================== КОНТАКТЫ ====================== */

.contact-block {
    text-align: center;
    margin-top: 50px;
    margin-bottom: 40px;
}

.contact-block h2 {
    font-size: 32px;
    margin-bottom: 12px;
    letter-spacing: 1px;
}

.contact-block p {
    font-size: 18px;
    margin: 0 auto;
}

/* ====================== МЕНЮ ====================== */

nav.menu {
    position: relative;
    z-index: 20;
}

.hero {
    position: relative;
    z-index: 1;
    pointer-events: none; /* ← критично */
}

.hero .lang-switch {
    pointer-events: auto; /* ← чтобы кнопка работала */
}

nav.menu {
    width: 100%;
    text-align: center;
    padding: 20px 0;
    border-bottom: 1px solid #444;
}
nav.menu a {
    margin: 0 25px;
    color: #eee;
    text-decoration: none;
    font-size: 17px;
    letter-spacing: 2px;
    cursor: pointer;
    transition: 0.3s;
}
nav.menu a:hover { color: #c7c7c7; }


/* ====================== ЯЗЫК ====================== */

.lang-ru { display: block; }
.lang-en { display: none; }

body.show-en .lang-ru { display: none !important; }
body.show-en .lang-en { display: block !important; }

/* ====== ЛОГО ====== */
.hero {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 0 40px;
}
.hero-center {
    text-align: center;
}

/* подсветка логотипа */
.logo {
    width: 420px;
    max-width: 90%;
    display: block;
    margin: 0 auto 25px auto;
    filter: drop-shadow(0 0 12px rgba(255,255,255,0.25));
    animation: softGlow 6s ease-in-out infinite;
}


/* ====== АНИМАЦИЯ ====== */
@keyframes softGlow {
    0% { filter: drop-shadow(0 0 4px rgba(255,255,255,0.1)); }
    50% { filter: drop-shadow(0 0 18px rgba(255,255,255,0.35)); }
    100% { filter: drop-shadow(0 0 4px rgba(255,255,255,0.1)); }
}

/* ====== ГАЛЕРЕЯ ====== */

/* ===== Первая галерея: 3 фото в ряд ===== */

.main-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    max-width: 980px;
    margin: 30px auto;
    justify-items: center;
}

.main-gallery img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    border-radius: 12px;
    transition: 0.3s ease;
}

.main-gallery img:hover {
    transform: scale(1.04);
}

/* ===== FIX LIGHTBOX UNIVERSAL ===== */
#lightbox {
    display: none;
    justify-content: center;
    align-items: center;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.88);
    z-index: 9999;
}

#lightbox-img {
    max-width: 80vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 0 30px rgba(0,0,0,0.6);
}

/* Стрелки */
#lightbox-prev,
#lightbox-next {
    font-size: 65px;
    color: white;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    user-select: none;
    padding: 20px;
    transition: 0.3s;
}

#lightbox-prev:hover,
#lightbox-next:hover {
    color: #d4d4d4;
}

#lightbox-prev { left: 60px; }
#lightbox-next { right: 60px; }

/* Крестик */
#lightbox-close {
    position: absolute;
    top: 35px;
    right: 45px;
    font-size: 55px;
    color: white;
    cursor: pointer;
    user-select: none;
}

/* ====== СПИСКИ ====== */
ul {
    list-style: none;
    padding: 0;
}
li {
    margin: 8px 0;
}

/* ====== ПОДВАЛ ====== */

/* ====== PREMIUM BLACK&WHITE FOOTER ====== */
.footer {
    background: #0f0f0f;
    padding: 60px 20px;
    color: #e5e5e5;
    border-top: 1px solid #333;
    margin-top: 60px;
}

.footer-content {
    max-width: 1100px;
    margin: auto;
    display: flex;
    gap: 60px;
    justify-content: space-between;
    flex-wrap: wrap;
}

.footer-left {
    flex: 1;
    min-width: 350px;
    padding-left: 20px; /* чтобы текст не прилипал */
}

.footer-left h3 {
    font-size: 28px;
    margin-bottom: 20px;
    color: #fff;
    letter-spacing: 1px;
}

.footer-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 14px;
    max-width: 450px;
}

.footer-item .icon {
    font-size: 20px;
    line-height: 1;
    margin-top: 3px;
}

.footer-text-ru {
    margin: 0;
    padding: 0;
    line-height: 1.4;
    max-width: 500px; 
    white-space: normal;
}

.footer-text-en {
    margin: 0;
    padding: 0;
    line-height: 1.4;
    max-width: 380px; /* немного шире */
    white-space: normal; /* разрешаем перенос */
    word-break: break-word; /* чтобы не вылазил за рамку */
}

/* Скрываем обе кнопки по умолчанию */
.route-btn.lang-ru,
.route-btn.lang-en {
    display: none;
}

/* Показываем нужную кнопку */
.lang-ru .route-btn.lang-ru {
    display: inline-block !important;
}

.lang-en .route-btn.lang-en {
    display: inline-block !important;
}

/* Нормальная ширина кнопок */
.route-btn {
    width: 260px;
    text-align: center;
}

.footer-item p {
    margin: 0;
    padding: 0;
    line-height: 1.4;
}

/* Универсальные кнопки календарь мероприятий */

#calendar .btn {
    background: #fff;
    color: #000;
    font-family: Georgia, serif;
    font-weight: 600; /* не 700 как сейчас, а 600 */
    letter-spacing: 2px; /* как в контактах */
    text-transform: uppercase; /* ← вот главное */
    padding: 16px 32px;
    border-radius: 8px;
    border: 1px solid #C2A676;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
    transition: 0.3s;
} 
#calendar .btn:hover {
    background: #e7e7e7;
    color: #000;
}

#calendar .buttons {
    display: flex;
    justify-content: center;
    gap: 30px; /* ← увеличили расстояние между кнопками */
    margin-top: 45px; /* ← опустили ниже от текста */
}

/* Кнопка маршрута */
.route-btn {
    display: inline-block;
    margin-top: 30px;
    padding: 12px 22px;
    background: #fff;
    color: #000;
    font-weight: 700;
    letter-spacing: 1px;
    text-decoration: none;
    border-radius: 6px;
    transition: 0.3s;
}

.route-btn:hover {
    background: #dcdcdc;
}

/* Карта */
.footer-map {
    flex: 1;
    min-width: 300px;
    filter: grayscale(100%); /* Чёрно-белая карта */
}

.footer-bottom {
    margin-top: 40px;
    text-align: center;
    color: #777;
    font-size: 14px;
}

/* === Главный фикс ширины для блока новости целиком === */
#news .news-item {
    max-width: 850px !important;
    margin: 0 auto !important;
    text-align: left !important;
}

/* Английский — уже */
body.show-en #news .news-item {
    max-width: 780px !important;
}

/* ===== Первая галерея — 2 крупных фото ===== */
#news .gallery-top {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 22px;
    justify-items: center;
    align-items: center;
    max-width: 820px;
    margin: 32px auto 44px !important;
}

#news .gallery-top img,
#news .gallery:not(.gallery-top) img {
    width: 100%;
    height: auto;       /* ← теперь не фиксируем высоту */
    max-height: 220px;  /* ← ограничение, чтобы не улетали */
    object-fit: cover;
    border-radius: 10px;
}

/* ===== Все остальные галереи — ровно 3 в ряд ===== */
#news .gallery:not(.gallery-top) {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 18px;
    justify-items: center;
    align-items: center;
    max-width: 1100px;
    margin: 35px auto 45px !important;
}

/* ==========================================
   Правильный фикс для английского ABOUT
   ========================================== */
   body.show-en #about .about-text.lang-en {
    max-width: 820px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 25px !important;
    padding-right: 25px !important;
    text-align: left !important;
    line-height: 1.9 !important;
    font-size: 18px !important;
    color: #eaeaea !important;
}

/* если нужно, чтобы и заголовок ABOUT US центрировался */
body.show-en #about .section-title {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Область текста + фотосетка */
#gallery {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
    max-width: 1100px;
    margin: 0 auto 40px;
}

/* Левая колонка */
#gallery .gallery-text {
    text-align: left !important;
    max-width: 480px;
    line-height: 1.7;
    margin-top: 15px;
}

/* ===== ГАЛЕРЕЯ ===== */

#gallery {
    max-width: 1100px;
    margin: 0 auto 50px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: flex-start;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.gallery-grid img {
    width: 100%;
    height: 230px;
    object-fit: cover;
    border-radius: 10px;
    object-position: center 30%;
    transition: .3s;
}

.gallery-grid img:hover {
    transform: scale(1.05);
}

/* ===== СОДЕРЖАНИЕ ===== */
.stabling-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    max-width: 1100px;
    margin: 20px auto 40px;
    justify-items: center;
    align-items: center;
}

.stabling-gallery img {
    width: 100%;
    height: 190px;
    object-fit: cover;
    border-radius: 10px;
}

/* ===== КАЛЕНДАРЬ ===== */
.calendar-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    max-width: 1000px;
    margin: 20px auto 40px;
    justify-items: center;
    align-items: center;
}

.calendar-gallery img {
    width: 100%;
    height: 190px;
    object-fit: cover;
    border-radius: 10px;
}

#lightbox-img {
    max-width: 85vw;         /* уменьшаем до ширины экрана */
    max-height: 85vh;        /* уменьшаем до высоты экрана */
    object-fit: contain;     /* показываем целиком, не режем */
    border-radius: 12px;
}

/* ===== УНИФИЦИРОВАННЫЙ РАЗМЕР ФОТО ДЛЯ РАЗДЕЛА НОВОСТИ ===== */
.news-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    justify-items: center;
    align-items: center;
    max-width: 1000px;
    margin: 20px auto 40px;
}

.news-gallery img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    transition: .3s;
}

.news-gallery img:hover {
    transform: scale(1.05);
}

/* ===== Первые две фото по центру (в новостях) ===== */
#news .news-gallery-top {
    display: flex;
    justify-content: center;
    gap: 22px;
    margin: 25px auto 35px;
    max-width: 920px;
}

#news .news-gallery-top img {
    width: 100%;
    max-width: 440px;
    height: 240px;
    object-fit: cover;
    border-radius: 10px;
}

/* ===== Верхние фото в новостях по центру, но кликабельные ===== */
.news-gallery-top {
    display: flex !important;
    justify-content: center;
    gap: 22px;
    margin: 20px auto 35px !important;
    max-width: 920px;
}

.news-gallery-top img {
    width: 100%;
    max-width: 420px;
    height: 220px;
    object-fit: cover;
    border-radius: 10px;
    cursor: pointer;
}

/* ====================== БУРГЕР-МЕНЮ ====================== */

/* Скрыто на компьютере */
.burger {
    display: none;
    font-size: 32px;
    color: #ffffff;
    position: fixed;
    top: 18px;
    right: 20px;
    z-index: 9999;
    cursor: pointer;
    user-select: none;
}

/* Мобильная версия */
@media (max-width: 700px) {

    /* Показываем бургер-кнопку */
    .burger {
        display: block;
    }

    /* Скрываем обычное меню */
    nav.menu {
        display: none;
        position: fixed;
        top: 0;
        right: 0;
        background: rgba(0,0,0,0.95);
        width: 70%;
        height: 100%;
        padding-top: 80px;
        z-index: 9998;
        text-align: center;
    }

    /* Когда меню открыто */
    nav.menu.open {
        display: block;
    }

    nav.menu a {
        display: block;
        margin: 18px 0;
        font-size: 20px;
        letter-spacing: 2px;
    }
}

@media (max-width: 480px) {
    .logo {
        width: 260px;
    }
}