:root {
    --dark-blue: #1a2a44;
    --gold: #c5a059;
    --gold-light: #e0c58e;
    --light-gray: #f8f9fa;
}
html, body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
    margin: 0;
    padding: 0;
    font-family: "Roboto", sans-serif;
    font-weight: 500;
}

section, header, footer {
    overflow: hidden;
}

.row {
    margin-right: 0 !important;
    margin-left: 0 !important;
}

/* 4. Адаптация таймлайна (для страницы биографии) */
@media (max-width: 768px) {
    .timeline::after {
        left: 31px !important; /* Сдвиг центральной линии на мобильных */
    }
    
    .timeline-item {
        width: 100% !important;
        padding-left: 70px !important;
        padding-right: 25px !important;
        text-align: left !important;
    }
    
    .timeline-item:nth-child(even), 
    .timeline-item:nth-child(odd) {
        left: 0 !important;
    }

    .timeline-dot {
        left: 23px !important;
    }
}

/* 5. Исправление для видео и фото-рамок */
.video-card, .photo-frame {
    max-width: 100% !important;
    box-sizing: border-box;
}

.img-portrait, .gallery-img-custom {
    max-width: 100%;
    height: auto;
}

/* Навигация */
.custom-nav {
    background-color: var(--dark-blue) !important;
    padding: 15px 0;
    border-bottom: 1px solid rgba(197, 160, 89, 0.3);
}

.logo-text {
    
    font-weight: 700;
    color: var(--gold) !important;
    font-size: 1.4rem;
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    margin: 0 15px;
    transition: 0.3s;
}

.navbar-nav .nav-link:hover {
    color: var(--gold) !important;
}

/* Переключатель языков */
.btn-lang {
    color: #fff;
    text-decoration: none;
    font-size: 0.8rem;
    padding: 4px 10px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    margin-left: 5px;
    border-radius: 4px;
    transition: 0.3s;
}

.btn-lang.active {
    background-color: var(--gold);
    border-color: var(--gold);
    color: var(--dark-blue);
    font-weight: bold;
}

/* Область заголовка (уменьшенная) */
.hero-header {
    background-color: #f4f4f9; /* Светлый интересный фон */
    background-image: radial-gradient(circle at 50% 50%, rgba(197, 160, 89, 0.05) 0%, transparent 100%);
    padding: 60px 0; /* Уменьшили высоту области */
    border-bottom: 1px solid #eee;
}

.main-title {
    color: var(--dark-blue);
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
    inline-size: 100%;
    overflow-wrap: break-word; /* Позволяет переносить длинные слова */
    word-wrap: break-word;
    hyphens: auto;             /* Добавляет переносы по слогам, если нужно */
}

.sub-caption {
    font-style: italic;
    color: #666;
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto;
}

/* Адаптивность для мобильных */
@media (max-width: 991px) {
    .navbar-collapse {
        margin-top: 20px;
        text-align: center;
    }
    .lang-switcher {
        justify-content: center;
        margin-top: 15px;
    }
}

/* Настройка для мобильных экранов */
@media (max-width: 768px) {
    .home-hero {
        padding: 40px 10px !important; /* Уменьшаем внутренние отступы */
        overflow: hidden;              /* Гарантируем, что ничего не выйдет за края */
    }

    .main-title {
        font-size: 1.8rem !important;  /* Уменьшаем размер шрифта на телефонах */
        line-height: 1.2;
    }

    .sub-caption {
        font-size: 1rem !important;
    }
    
    /* Убедимся, что разделители не шире экрана */
    .gold-divider-top, .gold-divider-bottom {
        max-width: 50px; 
    }
}
.hamburger-icon {
    width: 30px;
    height: 20px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hamburger-icon span {
    display: block;
    height: 2px;
    width: 100%;
    background-color: #ffffff; /* Золотистый акцент */
    border-radius: 2px;
    transition: all 0.3s ease-in-out;
}

/* Анимация трансформации в крестик */
.navbar-toggler[aria-expanded="true"] .hamburger-icon span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.navbar-toggler[aria-expanded="true"] .hamburger-icon span:nth-child(2) {
    opacity: 0;
}

.navbar-toggler[aria-expanded="true"] .hamburger-icon span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Мобильное меню (плавное появление) */
@media (max-width: 991px) {
    .navbar-collapse {
        background: #1a2a44;
        padding: 20px;
        margin-top: 10px;
        border-radius: 8px;
    }
    .lang-switch {
        margin-top: 15px;
        border-top: 1px solid rgba(255,255,255,0.1);
        padding-top: 15px;
    }
}

/* Светлый заголовок главной страницы */
.home-hero {
    background-color: var(--light-gray);
    padding: 80px 0 60px;
    position: relative;
    border-bottom: 1px solid rgba(197, 160, 89, 0.2);
}

.gold-divider-top, .gold-divider-bottom {
    width: 60px;
    height: 2px;
    background-color: var(--gold);
    margin: 0 auto;
}

.gold-divider-top { margin-bottom: 20px; }
.gold-divider-bottom { margin-top: 20px; }

/* Уменьшенное фото и рамка */
.photo-frame {
    position: relative;
    display: inline-block;
    padding: 15px;
}

.photo-frame::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid var(--gold); /* Золотая рамка вокруг фото */
    z-index: 0;
    transform: rotate(-3deg); /* Делаем вид интереснее */
}

.img-portrait {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 320px; /* Уменьшили размер (был 500px) */
    height: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border-radius: 2px;
}

/* Заголовки и текст */
.section-title-gold {
    color: var(--dark-blue);
    position: relative;
    padding-bottom: 15px;
    margin-bottom: 25px;
}

.section-title-gold::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100px;
    height: 2px;
    background: linear-gradient(to right, var(--gold), transparent);
}

/* Кнопка в золотом стиле */
.btn-gold-outline {
    color: var(--gold);
    border: 1px solid var(--gold);
    padding: 10px 25px;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    transition: 0.3s;
    background: transparent;
}

.btn-gold-outline:hover {
    background-color: var(--gold);
    color: white;
}

/* Дополнительный элемент: Цитата или слоган */
.bio-preview-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #444;
}

/* Hero */
.hero {
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('bg.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 150px 0;
}

/* Кнопки */
.btn-gold {
    color: white;
    padding: 12px 30px;
    border-radius: 50px;
    transition: 0.3s;
}

/* Галерея */
.gallery-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
    transition: 0.3s;
    cursor: pointer;
}
.gallery-img:hover { transform: scale(1.03); box-shadow: 0 10px 20px rgba(0,0,0,0.1); }

/* Награды */
.award-item { padding: 20px; }
.award-item .icon { font-size: 40px; margin-bottom: 15px; }

.section-padding { padding: 80px 0; }

.gallery-img {
    width: 100%;
    height: 250px; /* Фиксированная высота для превью */
    object-fit: cover; /* Изображение обрезается, но не деформируется */
    border-radius: 8px;
    transition: 0.3s;
    cursor: pointer;
}

.gallery-img:hover {
    transform: scale(1.03); /* Небольшое увеличение при наведении */
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}
/* Ровная золотая рамка вокруг фотографий */
.photo-frame {
    position: relative;
    display: inline-block;
    padding: 12px;
}

.photo-frame::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid var(--gold);
    z-index: 0;
    transform: none; /* Убрали наклон, теперь рамка ровная */
}

/* Стили для галереи */
.gallery-img-custom {
    width: 100%;
    height: 250px;
    object-fit: cover;
    position: relative;
    z-index: 1;
    border-radius: 2px;
    transition: transform 0.3s ease;
}

.photo-frame:hover .gallery-img-custom {
    transform: scale(1.03);
}

/* Карточки наград */
.award-card-custom {
    background: #fff;
    padding: 40px 20px;
    border: 1px solid rgba(197, 160, 89, 0.2);
    border-radius: 4px;
    transition: all 0.3s ease;
    height: 100%;
}

.award-card-custom:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(197, 160, 89, 0.15);
    border-color: var(--gold);
}

.award-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    display: block;
}

.award-card-custom h5 {
    font-family: 'Playfair Display', serif;
    color: var(--dark-blue);
    font-weight: 700;
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .hero { padding: 80px 0; }
    .display-3 { font-size: 2rem; }
}


/* Дизайн заголовка биографии */
.bio-hero {
    background: linear-gradient(rgba(26, 42, 68, 0.7), rgba(26, 42, 68, 0.7)), 
                url('img/bio-bg.jpg') no-repeat center center/cover;
    height: 50vh;
    min-height: 300px;
}

.italic { font-style: italic; }

/* Вертикальный Таймлайн */
.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 0;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background: var(--gold);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
}

.timeline-item:nth-child(odd) { left: 0; text-align: right; }
.timeline-item:nth-child(even) { left: 50%; text-align: left; }

.timeline-dot {
    width: 16px;
    height: 16px;
    background: var(--gold);
    border-radius: 50%;
    position: absolute;
    top: 25px;
    z-index: 1;
}

.timeline-item:nth-child(odd) .timeline-dot { right: -8px; }
.timeline-item:nth-child(even) .timeline-dot { left: -8px; }

.timeline-date {
    font-weight: bold;
    color: var(--gold);
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.timeline-content {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

/* Статистика Семьи */
.family-legacy {
    background-color: var(--dark-blue) !important;
}

.stat-circle {
    width: 80px;
    height: 80px;
    border: 2px solid var(--gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--gold);
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .timeline::after { left: 31px; }
    .timeline-item { width: 100%; padding-left: 70px; padding-right: 25px; text-align: left !important; }
    .timeline-item:nth-child(even) { left: 0; }
    .timeline-dot { left: 23px !important; }
}


/* Ровная золотая рамка (без наклона) */
.photo-frame {
    position: relative;
    display: inline-block;
    padding: 12px;
}

.photo-frame::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid #c5a059;
    z-index: 0;
}

/* Карточки наград */
.award-card-custom {
    background: #fff;
    padding: 40px 20px;
    border: 1px solid rgba(197, 160, 89, 0.2);
    border-radius: 4px;
    transition: all 0.3s ease;
    height: 100%;
}

.award-card-custom:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(197, 160, 89, 0.15);
    border-color: #c5a059;
}

.award-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    display: block;
}

/* Центрирование меню */
.navbar-collapse {
    text-align: center;
}

/* Контейнер для видео-карточки */
/* Обновляем карточку видео, чтобы она подстраивалась под контент */
.video-card {
    background: #fff;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid rgba(197, 160, 89, 0.2);
    height: auto; /* Позволяем карточке расти вниз */
}

.video-container-v {
    position: relative;
    padding-bottom: 177.77%; /* Соотношение сторон 9:16 */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: transparent; /* Убираем черный фон */
}

.video-container-v iframe,
.video-container-v video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    object-fit: cover; /* Видео заполнит все пространство без полос */
}

/* Принудительное вписывание видео в экран при фуллскрине */
video:fullscreen, 
iframe:fullscreen,
.video-container-v video:fullscreen {
    object-fit: contain !important;
    width: 100vw !important;
    height: 100vh !important;
}

/* Поддержка для браузеров Safari и старых версий Chrome */
video:-webkit-full-screen,
iframe:-webkit-full-screen {
    object-fit: contain !important;
}

/* Если видео находится внутри контейнера, который тоже может разворачиваться */
.video-container-v:fullscreen video {
    object-fit: contain !important;
}

/* Мобильная адаптация */
@media (max-width: 768px) {
    .video-card {
        margin-bottom: 20px;
        padding: 10px;
    }
}

.video-container object,
.video-container embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Стилизация галереи кабинета */
.photo-frame img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    z-index: 1;
    position: relative;
    display: block;
}

/* Основной стиль футера */
.site-footer {
    background-color: #1a2a44; /* Ваш основной темно-синий */
    color: rgba(255, 255, 255, 0.8);
    padding: 80px 0 30px;

    border-top: 3px solid #c5a059; /* Тонкая золотая полоса сверху */
}

/* Логотип и заголовки */
.footer-logo {
    color: #c5a059;
    font-weight: 700;
    margin-bottom: 10px;
}

.footer-title {
    color: #fff;
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    margin-bottom: 25px;
    position: relative;
}

.footer-title::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 40px;
    height: 1px;
    background-color: #c5a059;
}

/* Описание и цитаты */
.footer-tagline {
    font-style: italic;
    color: #c5a059;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.footer-description {
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer-blockquote {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 1.05rem;
    color: #fff;
    border-left: 2px solid #c5a059;
    padding-left: 15px;
    margin-bottom: 15px;
}

/* Навигация */
.footer-nav ul li {
    margin-bottom: 12px;
}

.footer-nav ul li a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    transition: 0.3s;
}

.footer-nav ul li a:hover {
    color: #c5a059;
    padding-left: 5px;
}

/* Разделитель и нижняя часть */
.footer-divider {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin: 50px 0 30px;
}

.footer-bottom {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}

.location-text {
    font-family: 'Montserrat', sans-serif;
    letter-spacing: 1px;
}

/* Адаптивность */
@media (max-width: 768px) {
    .site-footer {
        padding: 50px 0 20px;
        text-align: center;
    }
    .footer-title::after {
        left: 50%;
        margin-left: -20px;
    }
    .footer-blockquote {
        border-left: none;
        border-top: 1px solid #c5a059;
        border-bottom: 1px solid #c5a059;
        padding: 15px 0;
    }
}

