/* ============================================
   ВЫСОТА  mobile.css
   Адаптация под мобильные устройства
   ============================================ */

/* ============================================
   TOP BAR  скрываем на мобилке полностью
   ============================================ */
@media (max-width: 767px) {
    .top-bar {
        display: none;
    }
}

/* ============================================
   HEADER / NAV
   ============================================ */

/* Мобильное меню  поверх всего, не перекрывает слайдер снизу */
@media (max-width: 991px) {
    .main-nav {
        position: relative;
        z-index: 1100;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 1100;
        background: #2d3748;
        box-shadow: 0 8px 24px rgba(0,0,0,0.35);
        max-height: 80vh;
        overflow-y: auto;
    }

    /* Пункты меню  читаемые */
    .nav-menu > li > a {
        color: #ffffff !important;
        padding: 14px 20px !important;
        border-bottom: 1px solid rgba(255,255,255,0.08);
        font-size: 15px !important;
        border-radius: 0 !important;
    }

    .nav-menu > li > a:hover,
    .nav-menu > li.active > a {
        background: var(--color-primary) !important;
        color: #ffffff !important;
    }

    /* Дропдаун на мобилке */
    .dropdown {
        background: rgba(0,0,0,0.25) !important;
        border-top: none !important;
        min-width: 100% !important;
    }

    .dropdown li a {
        color: rgba(255,255,255,0.85) !important;
        padding: 11px 20px 11px 36px !important;
        border-bottom: 1px solid rgba(255,255,255,0.06) !important;
        font-size: 14px !important;
    }

    .dropdown li a:hover {
        background: var(--color-primary) !important;
        color: #fff !important;
        padding-left: 40px !important;
    }

    /* Бургер  крупнее, удобнее */
    .nav-burger {
        padding: 12px;
    }
    .nav-burger span {
        width: 28px;
        height: 3px;
    }

    /* Логотип */
    .logo img {
        height: 50px;
    }

    .nav-inner {
        min-height: 60px;
    }
}

/* ============================================
   HERO SLIDER
   ============================================ */
@media (max-width: 991px) {
    .slider-container {
        height: 300px;
    }

    .slide-content {
        padding: 20px 15px;
        max-width: 100%;
    }

    .slide-content h1 {
        font-size: 20px;
        text-shadow: 0 2px 12px rgba(0,0,0,0.7);
    }

    .btn-slide {
        padding: 10px 22px;
        font-size: 12px;
        margin-top: 14px;
    }

    .slider-arrow {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    .slider-prev { left: 10px; }
    .slider-next { right: 10px; }
}

@media (max-width: 767px) {
    .slider-container {
        height: 260px;
    }

    .slide-content h1 {
        font-size: 17px;
        line-height: 1.4;
    }

    .slide-content p {
        font-size: 13px;
        display: none; /* скрываем подзаголовок  экономим место */
    }
}

@media (max-width: 480px) {
    .slider-container {
        height: 220px;
    }

    .slide-content h1 {
        font-size: 15px;
    }

    .slider-arrow {
        display: none; /* на маленьких  только точки */
    }
}

/* ============================================
   FEATURED BLOCKS
   ============================================ */
@media (max-width: 991px) {
    .featured-blocks .row {
        flex-direction: column;
        gap: 0;
    }

    .featured-blocks .col-md-4 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .featured-card {
        min-height: 80px;
        padding: 18px 20px;
        flex-direction: row;
        align-items: center;
        gap: 14px;
    }

    .featured-card--dark .featured-card__title {
        margin-bottom: 4px;
    }

    .featured-card__text {
        font-size: 12px;
        margin-top: 4px;
    }
}

/* ============================================
   SECTIONS  уменьшаем padding
   ============================================ */
@media (max-width: 767px) {
    .services-section,
    .about-news-section,
    .advantages-section,
    .equipment-section,
    .stats-section,
    .contacts-section,
    .faq-section,
    .accreditation-section,
    .articles-section,
    .gallery-section,
    .privacy-section,
    .news-page-section {
        padding: 36px 0;
    }

    .cta-banner {
        padding: 32px 0;
    }

    .cta-section {
        padding: 40px 0;
    }

    .section-title {
        font-size: 20px;
    }
}

/* ============================================
   CTA BANNER
   ============================================ */
@media (max-width: 767px) {
    .cta-banner__inner {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .cta-banner__text h2 {
        font-size: 18px;
    }

    .btn-cta {
        white-space: normal;
        width: 100%;
        text-align: center;
    }
}

/* ============================================
   CTA SECTION (about page)
   ============================================ */
@media (max-width: 767px) {
    .cta-inner {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .cta-text h2 {
        font-size: 20px;
    }

    .cta-text p {
        font-size: 14px;
    }

    .cta-actions {
        width: 100%;
    }

    .cta-actions .btn-primary {
        width: 100%;
        justify-content: center;
        padding: 14px 20px;
        font-size: 14px;
    }
}

/* ============================================
   SERVICES GRID
   ============================================ */
@media (max-width: 767px) {
    .services-grid .col-md-4 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    /* Убираем border у последней карточки */
    .services-grid .col-md-4:last-child .service-card {
        border-bottom: none;
    }
}

/* ============================================
   ABOUT + NEWS
   ============================================ */
@media (max-width: 767px) {
    .about-news-section .col-md-8,
    .about-news-section .col-md-4 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .about-news-section .col-md-4 {
        margin-top: 30px;
    }
}

/* ============================================
   STATS
   ============================================ */
@media (max-width: 767px) {
    .stat-card__number {
        font-size: 36px;
    }

    .stats-grid .col-md-3 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* ============================================
   FOOTER
   ============================================ */
@media (max-width: 767px) {
    .site-footer {
        padding: 36px 0 0;
    }

    /* Bootstrap col-md-*  полная ширина */
    .site-footer .col-md-4,
    .site-footer .col-md-3,
    .site-footer .col-md-2 {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 24px;
        text-align: left;
    }

    .site-footer .col-md-4:last-child,
    .site-footer .col-md-3:last-child {
        margin-bottom: 0;
    }

    .footer-bottom {
        margin-top: 24px;
        font-size: 11px;
    }
}

/* ============================================
   ACCREDITATION
   ============================================ */
@media (max-width: 767px) {
    .accreditation-card {
        flex-direction: column;
        gap: 14px;
    }

    .accreditation-card__list .label {
        min-width: unset;
        width: 100%;
    }

    .accreditation-card__list li {
        flex-direction: column;
        gap: 2px;
    }

    .accreditation-benefits {
        grid-template-columns: 1fr;
    }

    .accreditation-benefit:nth-child(even) {
        padding-left: 0;
        border-left: none;
    }
}

/* ============================================
   CONTACTS
   ============================================ */
@media (max-width: 767px) {
    .contacts-map-wrap {
        padding-left: 0;
        margin-top: 30px;
    }

    .contacts-section .col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* ============================================
   ARTICLES / NEWS CARDS
   ============================================ */
@media (max-width: 767px) {
    .article-card,
    .news-card {
        flex-direction: column;
        gap: 14px;
    }

    .article-card__img-wrap,
    .news-card__img-wrap {
        width: 100%;
        height: 180px;
    }

    .article-card__footer {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ============================================
   GALLERY
   ============================================ */
@media (max-width: 575px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
}

/* ============================================
   MODALS
   ============================================ */
@media (max-width: 480px) {
    .modal-box {
        padding: 24px 16px;
        margin: 10px;
    }

    .modal-title {
        font-size: 17px;
    }
}

/* ============================================
   FORMS
   ============================================ */
@media (max-width: 767px) {
    .contact-form-wrap {
        padding: 20px 16px;
    }

    .form-control {
        font-size: 16px; /* предотвращает zoom на iOS */
    }
}

/* ============================================
   PAGE HERO (внутренние страницы)
   ============================================ */
@media (max-width: 767px) {
    .page-hero {
        padding: 28px 0;
    }

    .page-hero__title {
        font-size: 20px;
    }
}

/* ============================================
   SERVICES PAGE  TABS
   ============================================ */
@media (max-width: 767px) {
    .services-tabs {
        gap: 6px;
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .services-tabs::-webkit-scrollbar { display: none; }

    .services-tab {
        flex-shrink: 0;
        white-space: nowrap;
        padding: 8px 14px;
        font-size: 12px;
    }

    .service-detail__title {
        font-size: 18px;
    }
}

/* ============================================
   BACK TO TOP
   ============================================ */
@media (max-width: 767px) {
    .back-to-top {
        bottom: 16px;
        right: 16px;
        width: 38px;
        height: 38px;
        font-size: 16px;
    }
}

/* ============================================
   ОБЩИЕ УТИЛИТЫ
   ============================================ */
@media (max-width: 767px) {
    /* Все Bootstrap col-md-*  100% на мобилке если не переопределено */
    .row { margin-left: -10px; margin-right: -10px; }
    .col-md-3, .col-md-4, .col-md-6, .col-md-8, .col-md-9 {
        padding-left: 10px;
        padding-right: 10px;
    }

    /* Контейнер  чуть меньше боковые отступы */
    .container {
        padding-left: 14px;
        padding-right: 14px;
    }
}