/* Общие стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Google Sans', 'Akzidenz-Grotesk Pro Bold', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    /* font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;*/
    line-height: 2;
    color: #333;
    /* Убедимся, что body растягивается на всю ширину */
    width: 100%;
    /* overflow-x: hidden может скрывать проблему, но не решать ее */
    /* overflow-x: hidden; */
}

/* Шапка */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 20px 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.company-branding-pc {
    display: none; /* Скрываем по умолчанию */
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    /* justify-content: space-between; Убираем, чтобы контролировать вручную */
    padding: 0 20px;
}

/* Логотип как ссылка */
.logo-link {
    display: block;
}

.logo {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-right: 15px; /* Отступ справа от логотипа */
}

.company-branding {
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Используем шрифты из запроса, с запасными вариантами */
    font-family: 'Google Sans', 'Akzidenz-Grotesk Pro Bold', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: bold;
    color: #2c3e50;
    margin-right: auto; /* Отталкивает кнопки вправо на ПК */
    /* Скрываем по умолчанию, покажем только на ПК */
    display: none;
}

.company-name {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
}

.company-title {
    font-size: 20px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0;
}

.company-title-main {
    font-size: 20px;
    line-height: 1.2;
}

.company-title-sub {
    font-size: 14px;
    line-height: 1.2;
    color: #7f8c8d;
}

.nav-buttons {
    display: flex;
    gap: 120px;
    margin-top: 2px;
    margin-left: 20px; /* Небольшой отступ слева от названия */
}

.nav-btn {
    background: none;
    border: 2px solid #3498db;
    color: #3498db;
    padding: 4px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 12px;
}

.nav-btn:hover {
    background: #3498db;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(52, 152, 219, 0.3);
}

/* Главная секция */
.hero {
    min-height: 100vh; /* Позволяет блоку расти */
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), 
                url('/images/equestrian-bg.jpg') center/cover;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding-top: 120px; /* Добавляем отступ сверху, равный сдвигу content-block + запас */
}

.content-block {
    width: 90%;
    min-height: auto;
    background: white;
    border-radius: 30px;
    padding: 30px;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    /* transform убран */
    /* Добавляем margin-top для смещения вниз */
    margin: 40px 0 40px 0; /* Смещение вниз, центрирование по горизонтали, убираем auto для вертикального центрирования */
    overflow-y: visible;
}



.info-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.9);
    padding: 15px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    animation: fadeInUp 0.8s ease-out;
    min-width: 0;
    /* Исправлено отображение текста - теперь текст не обрезается */
    white-space: normal;
    word-wrap: break-word;
    min-height: 60px; /* Минимальная высота для корректного отображения */
}

.info-dot {
    width: 10px;
    height: 10px;
    background: #3498db;
    border-radius: 50%;
    flex-shrink: 0;
}

.info-text {
    font-size: 14px;
    font-weight: 500;
    color: #2c3e50;
    line-height: 1.4;
    /* Исправлено отображение текста */
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Стили для текста в блоке */
.trainer-description {
    /* Убрана прокрутка */
    overflow-y: visible;
    padding-right: 15px;
}

.trainer-description h2 {
    font-size: 20px;
    color: #2c3e50;
    margin-bottom: 15px;
    text-align: center;
}

.trainer-description h3 {
    font-size: 18px;
    color: #3498db;
    margin: 20px 0 10px 0;
}

.trainer-description p {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
    text-align: justify;
}

.trainer-description strong {
    font-weight: 600;
    color: #2c3e50;
}

.trainer-description .hero-intro {
    font-size: 18px; /* Адаптивный размер */
    font-weight: bold;
    text-align: center;
    margin-bottom: 25px;
    color: #2c3e50;
    line-height: 1.4;
}

.trainer-description h3 {
    font-size: 20px; /* Адаптивный размер */
    color: #3498db;
    margin: 25px 0 15px 0;
    text-align: center;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.trainer-description h4 {
    font-size: 16px; /* Адаптивный размер */
    color: #2c3e50;
    margin: 20px 0 10px 0;
}

.trainer-description .highlight-section {
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.trainer-description .highlight-section ul {
    padding-left: 20px;
    margin: 10px 0;
}

.trainer-description .highlight-section li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.trainer-description .closing-line {
    font-weight: bold;
    text-align: center;
    font-size: 16px; /* Адаптивный размер */
    margin-top: 25px;
    color: #2c3e50;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Основная информация */
.main-info {
    background: white;
    /* padding: 80px 0 60px; */ /* Можно увеличить верхний padding */
    padding: 130px 0 60px; /* Например, увеличить с 80px до 130px */
    /* ИЛИ добавить margin-top */
    /* margin: 100px 0 0 0; */
    margin-top: 0; /* Убрать, если добавляете margin выше */
}

.main-info-container {
    max-width: 1200px;
    margin: 0 auto;
    width: 90%;
    background: white;
    padding: 40px;
    border-radius: 0;
    box-shadow: none;
}

.section-title {
    text-align: center;
    font-size: 28px;
    color: #2c3e50;
    margin-bottom: 40px;
    font-weight: 700;
}

.info-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.info-column h3 {
    font-size: 20px;
    color: #3498db;
    margin-bottom: 20px;
    font-weight: 600;
}

.info-column p {
    font-size: 14px;
    line-height: 1.8;
    color: #555;
    text-align: justify;
}

/* Галерея */
.gallery {
    background: #f8f9fa;
    padding: 80px 0;
}

.gallery-container {
    max-width: 1200px;
    margin: 0 auto;
    width: 90%;
}

.gallery-title {
    text-align: center;
    font-size: 28px;
    color: #2c3e50;
    margin-bottom: 40px;
    font-weight: 700;
}

.carousel {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.carousel-inner {
    display: flex;
    transition: transform 0.5s ease-in-out;
    height: 100%;
}

.carousel-item {
    min-width: 100%;
    height: 100%;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-nav {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background: white;
    transform: scale(1.2);
}

/* Загрузка изображений */
.upload-section {
    text-align: center;
    margin: 30px 0;
    padding: 20px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.upload-instructions {
    margin-bottom: 20px;
    color: #666;
    font-size: 14px;
}

.upload-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.upload-btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

/* Футер */
.footer {
    background: #2c3e50;
    color: white;
    padding: 40px 0 20px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    width: 90%;
}

.social-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.social-btn {
    background: none;
    border: 2px solid white;
    color: white;
    padding: 10px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 14px;
}

.social-btn:hover {
    background: white;
    color: #2c3e50;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.contact-info {
    text-align: left;
    color: #bdc3c7;
    font-size: 12px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

@media (min-width: 769px) {
    .company-branding-mobile {
        display: flex;
        flex-direction: column;
        justify-content: center;
        /* Шрифты с запасными вариантами */
        font-family: 'Google Sans', 'Akzidenz-Grotesk Pro Bold', 'Helvetica Neue', 'Arial', sans-serif;
        font-weight: bold;
        color: #2c3e50;
        /* Позиционируем относительно header-container */
        position: absolute;
        left: 200px; /* Справа от логотипа */
        top: 50%;
        transform: translateY(-50%);
        line-height: 1.1;
        z-index: 1; /* Позади кнопок */
    }

    .company-branding-mobile-main {
        font-size: 14px;
    }

    .company-branding-mobile-sub {
        font-size: 10px;
        color: #7f8c8d;
    }
}

/* Адаптивность */
@media (max-width: 768px) {
    .header {
        padding: 12px 0;
    }
    
    
    .company-branding-mobile {
        display: flex;
        flex-direction: column;
        justify-content: center;
        /* Шрифты с запасными вариантами */
        font-family: 'Google Sans', 'Akzidenz-Grotesk Pro Bold', 'Helvetica Neue', 'Arial', sans-serif;
        font-weight: bold;
        color: #2c3e50;
        /* Позиционируем относительно header-container */
        position: absolute;
        left: 80px; /* Справа от логотипа */
        top: 50%;
        transform: translateY(-50%);
        line-height: 1.1;
        z-index: 1; /* Позади кнопок */
    }

    .company-branding-mobile-main {
        font-size: 14px;
    }

    .company-branding-mobile-sub {
        font-size: 10px;
        color: #7f8c8d;
    }


    .header-container {
        display: flex;
        align-items: center;
        gap: 20px; /* Fixed 20px spacing between logo and company name */
        padding: 0 15px; /* Adjust for consistent margins */
    }
    
    .logo-link {
        position: absolute; /* Убрано абсолютное позиционирование */
        transform: none;
        order: 2; /* Логотип по центру */
    }
    
    .logo {
        width: 50px;
        height: 50px;
        position: absolute;
        left: 10px; 
        top: 50%;
        transform: translateY(-50%);
        z-index: 2;
        margin-right: 0;
    }
    
    .company-name {
        position: static;
        transform: none;
        margin: 0;
        order: 2;
        width: 100%;
        display: flex;
        justify-content: flex-end; 
        align-items: center;
        padding: 0 10px;
    }
    
    .company-title {
        display: none; /* Скрываем старое название */
    }
    
    .nav-buttons {
        margin-top: 0;
        order: 3;
        display: flex;
        justify-content: center;
        gap: 60px; 
        width: auto;
        margin-left: 0;
    }
    
    .nav-btn {
        padding: 6px 12px;
        font-size: 12px;
        border-radius: 20px;
    }
    
    /* Изменения для секции .hero и .content-block */
    .hero {
        /* Уменьшаем высоту hero, чтобы было место для элементов */
        height: auto;
        min-height: 100vh; /* Гарантируем, что секция покрывает viewport */
        padding: 120px 0 60px 0; /* Добавляем отступы сверху (под шапку) и снизу */
    }
    .content-block {
        width: 95%;
        padding: 15px;
        border-radius: 20px;
        /* transform убран */
        margin: 80px auto 0 auto; /* Смещение вниз на 80px */
    }

    /* Новое расположение фото тренера и фактов для мобильной версии */
    /* Фото и факты теперь внутри content-block, до .trainer-description */
    .trainer-photo {
        /* Делаем фото относительным, чтобы оно было частью потока */
        position: relative;
        /* Размеры фото */
        width: 320px;
        height: 320px;
        /* Центрируем фото по горизонтали внутри content-block */
        margin: 0 auto -220px auto; /* Отступы сверху и снизу */
        /* Убираем абсолютное позиционирование */
        top: auto;
        left: auto;
        transform: none;
        /* Остальные стили фото сохраняются */
        border-radius: 50%;
        border: 5px solid white;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
        object-fit: cover;
        object-position: center;
        flex-shrink: 0;
        z-index: 2; /* Поверх фактов */
        max-width: calc(95vw - 15px * 2); /* Примерное ограничение */
    }

    .info-grid {
        /* Делаем grid относительным */
        position: relative;
        /* Убираем абсолютное позиционирование */
        top: auto;
        left: auto;
        transform: none;
        /* Центрируем grid */
        margin: 0 auto 30px auto; /* Отступы сверху и снизу */
        width: 90%; /* Ширина ограничена */
        max-width: 300px; /* Максимальная ширина для контроля */
        display: grid;
        grid-template-columns: 1fr 1frr; /* Две колонки равной ширины */
        grid-template-rows: auto auto; /* Две строки */
        gap: 15px 15px; /* Отступы: вертикальные 15px, горизонтальные 20px */
        padding: 0; /* Убираем padding */
        background: transparent;
    }

    /* Позиционирование фактов в сетке */
    .info-grid .info-item:nth-child(1) { /* Левый верхний факт */
        grid-column: 1;
        grid-row: 1;
        justify-self: end; /* Выравнивание вправо внутри ячейки */
        margin-right: 10px; /* Небольшой отступ от центра */
    }

    .info-grid .info-item:nth-child(2) { /* Правый верхний факт */
        grid-column: 2;
        grid-row: 1;
        justify-self: start; /* Выравнивание влево внутри ячейки */
        margin-left: 10px; /* Небольшой отступ от центра */
    }

    .info-grid .info-item:nth-child(3) { /* Левый нижний факт */
        grid-column: 1;
        grid-row: 2;
        justify-self: end; /* Выравнивание вправо внутри ячейки */
        margin-right: 10px; /* Небольшой отступ от центра */
    }

    .info-grid .info-item:nth-child(4) { /* Правый нижний факт */
        grid-column: 2;
        grid-row: 2;
        justify-self: start; /* Выравнивание влево внутри ячейки */
        margin-left: 10px; /* Небольшой отступ от центра */
    }

    .info-item {
        /* Адаптируем стили фактов для мобильной версии */
        display: flex;
        align-items: center;
        gap: 8px; /* Отступ между точкой и текстом */
        background: rgba(255, 255, 255, 0.95);
        padding: 10px 15px; /* Приемлемые отступы */
        border-radius: 12px;
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
        backdrop-filter: blur(5px);
        /* Минимальная ширина для предотвращения сжатия */
        min-width: 120px;
        /* Максимальная ширина для контроля */
        max-width: 140px;
        /* Высота по содержимому */
        height: auto;
    }

    .info-dot {
        width: 8px;
        height: 8px;
        background: #3498db;
        border-radius: 50%;
        flex-shrink: 0;
    }

    .info-text {
        font-size: 11px; /* Приемлемый размер шрифта */
        font-weight: 500;
        color: #2c3e50;
        line-height: 1.3;
        /* Позволяем тексту переноситься */
        white-space: normal;
        word-wrap: break-word;
        overflow-wrap: break-word;
        text-align: left; /* Выравнивание текста по левому краю */
    }

    /* Стили для текста в блоке */
    .trainer-description {
        overflow-y: visible;
        padding: 0; /* Убираем padding, он на content-block */
    }

    .trainer-description h2 {
        font-size: 18px; /* Адаптируем размер заголовка */
        color: #2c3e50;
        margin-bottom: 15px;
        text-align: center;
    }

    .trainer-description h3 {
        font-size: 16px;
        color: #3498db;
        margin: 20px 0 10px 0;
    }

    .trainer-description p {
        font-size: 12px; /* Адаптируем размер текста */
        line-height: 1.6;
        margin-bottom: 15px;
        text-align: justify;
    }

    .trainer-description strong {
        font-weight: 600;
        color: #2c3e50;
    }
    
    
    .trainer-description h3 {
        font-size: 16px; /* Увеличен размер шрифта на 2 пункта (было 14px) */
        margin: 15px 0 8px 0;
    }
    
    .trainer-description p {
        font-size: 12px; /* Увеличен размер шрифта на 2 пункта (было 10px) */
        margin-bottom: 10px;
    }
    
    .main-info {
        padding: 60px 0 40px; /* Уменьшаем верхний отступ */
        margin-top: 0;
    }
    
    .main-info-container {
        width: 95%;
        padding: 25px;
    }
    
    .section-title {
        font-size: 22px;
        margin-bottom: 25px;
    }
    
    .info-content {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .info-column h3 {
        font-size: 18px;
        margin-bottom: 12px;
    }
    
    .info-column p {
        font-size: 12px;
    }
    
    .gallery-title {
        font-size: 22px;
        margin-bottom: 25px;
    }
    
    .carousel {
        height: 280px;
    }
    
    .social-links {
        flex-direction: row;
        gap: 20px;
    }
    
    .social-btn {
        padding: 10px 20px;
        font-size: 12px;
    }
    
    .contact-info {
        font-size: 10px;
    }
    
    .upload-instructions {
        font-size: 12px;
    }
    
    .upload-btn {
        padding: 10px 20px;
        font-size: 12px;
    }

    .company-branding {
        display: none;
    }

    .trainer-description .hero-intro {
        font-size: 14px;
        margin-bottom: 20px;
    }
    
    .trainer-description h3 {
        font-size: 18px;
        margin: 20px 0 12px 0;
    }
    
    .trainer-description h4 {
        font-size: 14px;
        margin: 15px 0 8px 0;
    }
    
    .trainer-description .highlight-section {
        padding: 15px;
        margin: 15px 0;
    }
    
    .trainer-description .highlight-section ul {
        padding-left: 15px;
    }
    
    .trainer-description .highlight-section li {
        font-size: 11px;
        margin-bottom: 6px;
    }
    
    .trainer-description .closing-line {
        font-size: 14px;
        margin-top: 20px;
    }   
}

@media (max-width: 480px) {

    .hero {
        padding: 0 0 40px 0;
    }

    .content-block {
        padding: 10px;
        border-radius: 15px;
        /* transform убран */
        margin: 70px auto 0 auto; /* Смещение вниз на 70px */
    }
    
    .trainer-photo {
        width: 100px;
        height: 100px;
        top: -130px;
        left: -5px;
    }
    
    .info-grid {
        top: -40px;
        width: calc(90);
        left: 60px;
        gap: 24px;
        padding: 8px;
    }
    
    .info-text {
        font-size: 10px;
    }
    

    .header {
        padding: 8px 0;
    }
    
    .header-container {
        display: flex;
        align-items: center;
        gap: 20px; /* Fixed 20px spacing between logo and company name */
        padding: 0 15px; /* Adjust for consistent margins */
    }
    
    .logo {
        width: 40px;
        height: 40px;
        position: absolute;
        left: 5px; 
        top: 50%;
        transform: translateY(-50%);
        z-index: 2;
    }
    
    /* Адаптация нового заголовка для мобильной версии */
    .company-branding {
        position: absolute;
        left: 60px; /* Справа от логотипа */
        top: 50%;
        transform: translateY(-50%);
        margin-right: 0; /* Убираем auto margin */
    }

    .company-title-main {
        font-size: 12px;
    }

    .company-title-sub {
        font-size: 8px;
    }
    
    .company-name {
        padding: 0 5px;
    }
    
    .nav-buttons {
        gap: 40px; /* Еще меньше на очень маленьких экранах */
    }
        
    .nav-btn {
        padding: 4px 10px;
        font-size: 10px;
        border-radius: 15px;
    }

    .info-grid .info-item:nth-child(1) {
        margin-right: -6px;
    }
    
    .info-grid .info-item:nth-child(2) {
        margin-left: -6px;
    }
    
    .info-grid .info-item:nth-child(3) {
        margin-right: -6px;
    }
    
    .info-grid .info-item:nth-child(4) {
        margin-left: -6px;
    }
    
    .info-item {
        padding: 8px;
        max-width: 100px;
        min-height: 40px;
    }
    
    .trainer-description h2 {
        font-size: 16px;
    }
    
    .trainer-description h3 {
        font-size: 14px;
    }
    
    .trainer-description p {
        font-size: 11px; /* Увеличен размер шрифта на 2 пункта (было 9px) */
    }

    .trainer-description .hero-intro {
        font-size: 12px;
        margin-bottom: 15px;
    }
    
    .trainer-description h3 {
        font-size: 16px;
        margin: 18px 0 10px 0;
    }
    
    .trainer-description h4 {
        font-size: 13px;
        margin: 12px 0 6px 0;
    }
    
    .trainer-description .highlight-section {
        padding: 12px;
        margin: 12px 0;
    }
    
    .trainer-description .highlight-section ul {
        padding-left: 12px;
    }
    
    .trainer-description .highlight-section li {
        font-size: 10px;
        margin-bottom: 5px;
    }
    
    .trainer-description .closing-line {
        font-size: 12px;
        margin-top: 18px;
    }
}