@media (max-width:991px) {
    body.poster {
        margin-top: 60vh;
    }
}

body.poster {
    background-attachment: fixed;
}

.top-5 {
    top: 5px;
}

/* Медиа-запросы для мобильной адаптивности */

/* Для планшетов (до 992px) */
@media (max-width: 991px) {
    .display-3 {
        font-size: 2.5rem !important;
    }
    
    .display-4 {
        font-size: 2rem !important;
    }
    
    .display-5 {
        font-size: 1.75rem !important;
    }
    
    .lead {
        font-size: 1.1rem !important;
    }
    
    .hero-block .lead {
        font-size: 1rem !important;
        max-width: 100% !important;
    }
    
    .hero-block .container {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .hero-block h1 {
        font-size: 2.2rem !important;
        line-height: 1.2;
        margin-bottom: 1.5rem !important;
    }
    
    .hero-block .btn {
        font-size: 0.9rem;
        padding: 0.75rem 1.5rem !important;
        margin-bottom: 0.5rem;
    }
    
    .hero-block .d-flex {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem !important;
    }
}

/* Для мобильных устройств (до 768px) */
@media (max-width: 767px) {
    .navbar-brand {
        font-size: 1.1rem !important;
    }
    
    .navbar-nav .nav-link {
        padding: 0.5rem 1rem !important;
        font-size: 0.9rem;
    }
    
    .hero-block {
        padding: 2rem 0 !important;
    }
    
    .hero-block h1 {
        font-size: 1.8rem !important;
        line-height: 1.3;
        margin-bottom: 1rem !important;
    }
    
    .hero-block .lead {
        font-size: 0.95rem !important;
        line-height: 1.5;
        margin-bottom: 2rem !important;
    }
    
    .hero-block .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .hero-block .btn {
        font-size: 0.85rem;
        padding: 0.7rem 1.2rem !important;
        width: 100%;
        max-width: 280px;
    }
    
    .display-3 {
        font-size: 2rem !important;
    }
    
    .display-4 {
        font-size: 1.75rem !important;
    }
    
    .display-5 {
        font-size: 1.5rem !important;
    }
    
    .py-5 {
        padding: 2.5rem 0 !important;
    }
    
    .p-5 {
        padding: 1.5rem !important;
    }
    
    .p-4 {
        padding: 1rem !important;
    }
    
    .lead {
        font-size: 1rem !important;
    }
    
    /* Исправление для карточек */
    .card-body {
        padding: 1.25rem !important;
    }
    
    .card .display-3 {
        font-size: 1.75rem !important;
    }
    
    /* Исправление для колонок */
    .row.g-4 {
        --bs-gutter-x: 1rem;
        --bs-gutter-y: 1rem;
    }
    
    .row.g-5 {
        --bs-gutter-x: 1.5rem;
        --bs-gutter-y: 1.5rem;
    }
    
    /* Контактная форма */
    .bg-white.rounded-4.shadow-xl {
        margin-top: 2rem;
    }
    
    /* Секции с background */
    section {
        overflow-x: hidden;
    }
    
    /* Адаптация изображений */
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* Анимированные элементы - отключение для мобильных */
    .position-absolute[style*="animation"] {
        display: none !important;
    }
}

/* Для маленьких мобильных устройств (до 576px) */
@media (max-width: 575px) {
    .container {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
    
    .hero-block h1 {
        font-size: 1.6rem !important;
        line-height: 1.2;
    }
    
    .hero-block .lead {
        font-size: 0.9rem !important;
        line-height: 1.4;
    }
    
    .hero-block .btn {
        font-size: 0.8rem;
        padding: 0.6rem 1rem !important;
    }
    
    .display-3 {
        font-size: 1.75rem !important;
    }
    
    .display-4 {
        font-size: 1.5rem !important;
    }
    
    .display-5 {
        font-size: 1.3rem !important;
    }
    
    .py-5 {
        padding: 2rem 0 !important;
    }
    
    .p-5 {
        padding: 1rem !important;
    }
    
    .lead {
        font-size: 0.95rem !important;
    }
    
    .h4, h4 {
        font-size: 1.1rem !important;
    }
    
    .h5, h5 {
        font-size: 1rem !important;
    }
    
    .h6, h6 {
        font-size: 0.9rem !important;
    }
    
    /* Мелкие элементы */
    .badge {
        font-size: 0.7rem !important;
        padding: 0.4rem 0.8rem !important;
    }
    
    .btn-lg {
        font-size: 0.9rem !important;
        padding: 0.7rem 1.2rem !important;
    }
    
    /* Форма */
    .form-control {
        font-size: 0.9rem;
        padding: 0.7rem 0.8rem !important;
    }
    
    .form-label {
        font-size: 0.85rem !important;
    }
    
    /* Карточки */
    .card-body {
        padding: 1rem !important;
    }
    
    .card .display-3 {
        font-size: 1.5rem !important;
    }
    
    /* Круглые иконки */
    div[style*="width: 60px; height: 60px"] {
        width: 45px !important;
        height: 45px !important;
        font-size: 1.1rem !important;
    }
    
    div[style*="width: 50px; height: 50px"] {
        width: 40px !important;
        height: 40px !important;
    }
    
    div[style*="width: 70px; height: 70px"] {
        width: 55px !important;
        height: 55px !important;
        font-size: 1.5rem !important;
    }
}

/* Общие улучшения для мобильной версии */
@media (max-width: 767px) {
    /* Обеспечиваем правильное поведение overflow */
    body {
        overflow-x: hidden;
    }
    
    /* Убираем горизонтальную прокрутку */
    .row {
        margin-left: 0;
        margin-right: 0;
    }
    
    .container-fluid {
        padding-left: 0;
        padding-right: 0;
    }
    
    /* Адаптация навигации */
    .navbar-toggler {
        border: none;
        padding: 0.25rem 0.5rem;
    }
    
    .navbar-collapse {
        background: rgba(44, 62, 80, 0.95);
        padding: 1rem;
        margin-top: 1rem;
        border-radius: 0.5rem;
    }
    
    /* Улучшения для читаемости */
    .text-white {
        text-shadow: 0 1px 3px rgba(0,0,0,0.3);
    }
    
    /* Адаптация кнопок */
    .btn-group-vertical .btn,
    .btn-block {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    /* Адаптация таблиц */
    .table-responsive {
        font-size: 0.85rem;
    }
    
    /* Секция контактов */
    #Contact .col-lg-6:first-child {
        margin-bottom: 2rem;
    }
}

/* Дополнительные стили для очень широких экранов */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
}

/* Печать */
@media print {
    .hero-block .position-absolute,
    .position-absolute[style*="animation"] {
        display: none !important;
    }
    
    .btn {
        display: none !important;
    }
    
    .hero-block {
        background: #f8f9fa !important;
        color: #000 !important;
    }
}
