/* ========================================================
   Стили изолированного шаблона Full Width Page NEW
   ======================================================== */

/* 1. Десктопная часть */
#content-top {
    background: #ffffff !important;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    height: 15px !important;
    width: 960px;
    margin: 0 auto;
}

#content {
    background: #ffffff !important;
    background-image: none !important;
    width: 960px;
    margin: 0 auto;
}

#content-bottom {
    background: #ffffff !important;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    height: 15px !important;
    width: 960px;
    margin: 0 auto;
}

#content-area {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    margin: 0 !important;
    padding: 10px 25px !important;
    box-sizing: border-box !important;
}

.entry {
    width: 100% !important;
    box-sizing: border-box !important;
}

img, iframe, video {
    max-width: 100% !important;
    height: auto !important;
}

table {
    width: 100% !important;
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-collapse: collapse;
}

/* Скрытие формы звонка и спам-попапа */
a[href="#contact_form_pop"],
.fancybox-inline[href="#contact_form_pop"],
#contact_form_pop,
.fancybox-hidden {
    display: none !important;
}

/* На десктопе мобильные элементы скрыты */
#mobile-toggle-btn,
#header-title-text {
    display: none !important;
}

/* 2. Мобильная адаптация (экраны до 980px) */
@media screen and (max-width: 980px) {
    html, body {
        overflow-x: hidden !important;
        max-width: 100vw !important;
    }

    /* ВНЕШНИЕ КОНТЕЙНЕРЫ: строго одинаковая ширина и центрирование */
    #header,
    .header_cont,
    #container {
        width: calc(100% - 20px) !important;
        max-width: calc(100% - 20px) !important;
        min-width: 0 !important;
        margin-left: auto !important;
        margin-right: auto !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        box-sizing: border-box !important;
    }

    /* ВНУТРЕННИЕ БЛОКИ: растягиваются ровно на 100% ширины своего контейнера */
    #content,
    #content-top,
    #content-bottom,
    #top_info,
    #top-info,
    div[id*="top_info"],
    div[class*="top_info"],
    #page-name,
    div[class*="page-name"] {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box !important;
    }

    #content-area {
        width: 100% !important;
        max-width: 100% !important;
        padding: 15px !important;
        box-sizing: border-box !important;
    }

    #content-top,
    #content-bottom {
        border-radius: 0 !important;
    }

    /* Синяя шапка */
    #header,
    .header_cont {
        position: relative !important;
        height: auto !important;
        min-height: 185px !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }

    /* ЛОГОТИП: отступ СЛЕВА ровно 15px */
    #logo-area,
    #logo,
    .header_cont #logo {
        position: absolute !important;
        top: 50% !important;
        left: 15px !important;
        right: auto !important;
        transform: translateY(-50%) !important;
        float: none !important;
        margin: 0 !important;
        padding: 0 !important;
        width: 200px !important;
        max-width: 200px !important;
        height: auto !important;
        display: block !important;
        z-index: 10 !important;
    }

    #logo img,
    .header_cont #logo img {
        width: 200px !important;
        max-width: 200px !important;
        height: auto !important;
        display: block !important;
    }

    /* КНОПКА МЕНЮ: отступ СПРАВА ровно 15px */
    #mobile-toggle-btn {
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        position: absolute !important;
        top: 50% !important;
        right: 15px !important;
        left: auto !important;
        transform: translateY(-50%) !important;
        width: 112px !important;
        height: 99px !important;
        z-index: 999999 !important;
        background: linear-gradient(180deg, #ff9800 0%, #ff6f00 100%) !important;
        border-radius: 12px !important;
        border: none !important;
        box-shadow: 0 4px 12px rgba(255, 111, 0, 0.5), inset 0 1.5px 0 rgba(255, 255, 255, 0.35) !important;
        cursor: pointer !important;
        box-sizing: border-box !important;
    }

    #mobile-toggle-btn span {
        display: block !important;
        width: 45px !important;
        height: 5px !important;
        background-color: #ffffff !important;
        margin: 3.5px 0 !important;
        border-radius: 3px !important;
    }

    #mobile-toggle-btn small {
        color: #ffffff !important;
        font-size: 19px !important;
        font-weight: 800 !important;
        letter-spacing: 0.8px;
        margin-top: 4px !important;
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    }

    /* ЦЕНТРАЛЬНЫЙ БЛОК: ЗАГОЛОВОК */
    #header-title-text {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        position: absolute !important;
        top: 22px !important;
        left: 225px !important;
        right: 140px !important;
        text-align: center !important;
        z-index: 8 !important;
        line-height: 1.2 !important;
    }

    #header-title-text .brand-title {
        color: #ffffff !important;
        font-size: 32px !important;
        font-weight: 900 !important;
        letter-spacing: 0.5px !important;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.35) !important;
    }

    #header-title-text .brand-subtitle {
        color: #ffffff !important;
        font-size: 21px !important;
        font-weight: 500 !important;
        opacity: 0.95 !important;
        margin-top: 5px !important;
    }

    /* ЦЕНТРАЛЬНЫЙ БЛОК: КОНТАКТЫ */
    .header_cont .contact,
    #header-right,
    #top-info,
    .header_cont [class*="contact"],
    .header_cont .phone {
        position: absolute !important;
        left: 225px !important;
        right: 140px !important;
        bottom: 24px !important;
        top: auto !important;
        text-align: center !important;
        margin: 0 auto !important;
        padding: 0 !important;
        z-index: 5 !important;
        display: flex !important;
        flex-direction: row !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 12px !important;
        line-height: 1.2 !important;
        box-sizing: border-box !important;
    }

    .header_cont .contact br,
    #header-right br {
        display: none !important;
    }

    .header_cont .contact,
    #header-right span,
    .header_cont .phone span {
        color: #ffffff !important;
        font-size: 21px !important;
        opacity: 0.95 !important;
        white-space: nowrap !important;
    }

    .header_cont .contact a[href^="tel:"],
    #header-right a[href^="tel:"],
    .header_cont a[href^="tel:"] {
        font-size: 22px !important;
        font-weight: 700 !important;
        color: #ffd54f !important;
        text-decoration: none !important;
        white-space: nowrap !important;
        display: inline-block !important;
    }

    /* 3. ВЫПАДАЮЩЕЕ МЕНЮ */
    #header ul,
    .header_cont ul,
    #nav,
    ul#nav,
    #top-menu {
        display: none !important;
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        min-width: 100% !important;
        height: auto !important;
        background: #08557a !important;
        border-top: 4px solid #ff9800 !important;
        border-radius: 0 0 10px 10px !important;
        box-shadow: 0 14px 28px rgba(0, 0, 0, 0.55) !important;
        padding: 8px 0 !important;
        margin: 0 !important;
        list-style: none !important;
        z-index: 999998 !important;
        box-sizing: border-box !important;
    }

    #header.nav-expanded ul,
    .header_cont.nav-expanded ul,
    #header.nav-expanded #nav,
    .header_cont.nav-expanded #nav {
        display: flex !important;
        flex-direction: column !important;
    }

    #header ul li,
    .header_cont ul li,
    ul#nav li {
        width: 100% !important;
        height: auto !important;
        min-height: 56px !important;
        float: none !important;
        position: static !important;
        margin: 0 !important;
        padding: 0 !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
        background: transparent !important;
        box-sizing: border-box !important;
        display: flex !important;
        align-items: center !important;
    }

    #header ul li:last-child,
    .header_cont ul li:last-child,
    ul#nav li:last-child {
        border-bottom: none !important;
    }

    #header ul li a,
    .header_cont ul li a,
    ul#nav li a {
        display: flex !important;
        align-items: center !important;
        width: 100% !important;
        height: 100% !important;
        padding: 16px 24px !important;
        margin: 0 !important;
        float: none !important;
        position: static !important;
        color: #ffffff !important;
        font-size: 20px !important;
        font-weight: 600 !important;
        text-align: left !important;
        text-decoration: none !important;
        background: transparent !important;
        box-sizing: border-box !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    #header ul li a:hover,
    #header ul li a:active {
        background-color: #06405c !important;
        color: #ffd54f !important;
        padding-left: 32px !important;
    }
}