/* ==========================================================================
   ГЛАВНАЯ — ПЕРЕКРЫТИЕ НАСЛЕДСТВА
   Старые правила mainpage.css мешают стеклу: у рамки фото есть padding и
   рамка, у картинки — жёсткий max-height, у колонки — свой отступ.
   Здесь они снимаются точечно и с приоритетом, грузится последним.
   ========================================================================== */

/* ---------- О коллективе: панель и фото одной высоты ---------- */

.philosophy-section .row {
    align-items: stretch !important;
}

.philosophy-section .row > .col-lg-5,
.philosophy-section .row > .col-lg-7 {
    display: flex !important;
    align-items: stretch !important;
}

.philosophy-section .philosophy-content {
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 32px 34px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    border-radius: 18px !important;
}

.philosophy-section .philosophy-media {
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
}

/* рамку вокруг фото убираем: стекло остаётся только на текстовой панели */
.philosophy-section .media-frame {
    position: relative !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 18px !important;
    background: none !important;
    box-shadow: none !important;
    overflow: hidden !important;
    line-height: 0 !important;
}

.philosophy-section .media-frame img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    object-fit: cover !important;
    object-position: center 28% !important;
}

.philosophy-section .media-frame .media-caption {
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    margin: 0 !important;
    padding: 16px 18px !important;
    line-height: 1.4 !important;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, .6) 100%) !important;
}

/* ---------- Реализованные проекты: фото без обрезки и без полей ---------- */

.lab-section .lab-visual {
    background-size: cover !important;
    background-position: center 20% !important;
    min-height: 100% !important;
}

.lab-section .lab-item {
    overflow: hidden !important;
}

/* ---------- Светлая тема ---------- */

html[data-theme="light"] .philosophy-section .media-frame .media-caption {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, .82) 100%) !important;
    color: #141414 !important;
}

/* ---------- Прозрачные секции ----------
   Фон секций убираем полностью: под ними единая подложка страницы,
   поэтому стыков и полос между блоками не остаётся. */

.ax-load,
.applications-section,
.why-section,
.catalog-section,
.faq-section,
.philosophy-section,
.lab-section,
.cta-section,
.model-l-page,
.about-us-section,
.axv-oc-section {
    background: transparent !important;
    border-top: 0 !important;
    border-bottom: 0 !important;
}

/* светлая тема: та же логика, фон задаётся один раз */
html[data-theme="light"] body {
    background-color: #f4f1ec;
    background-image:
        radial-gradient(ellipse 55% 45% at 12% 2%, rgba(186, 169, 143, .22) 0%, transparent 62%),
        radial-gradient(ellipse 50% 45% at 90% 20%, rgba(200, 190, 175, .24) 0%, transparent 64%);
    background-attachment: fixed;
    background-repeat: no-repeat;
}

/* ---------- «Где работает AUXILIUM»: фото без чёрных полей ---------- */

.applications-section .application-image {
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-color: transparent !important;
}

/* ---------- Мобильные правки ---------- */

@media (max-width: 991px) {
    /* шапка больше не липнет: уезжает при скролле, остаётся только бургер */
    .header-section {
        position: relative !important;
        z-index: 60 !important;
        background: #191919 !important;
        -webkit-backdrop-filter: none !important;
        backdrop-filter: none !important;
    }

    /* фото проектов на мобильных: колонка схлопывалась в ноль */
    .lab-section .lab-item {
        grid-template-columns: 1fr !important;
    }

    .lab-section .lab-visual {
        display: block !important;
        min-height: 220px !important;
        height: 220px !important;
        background-size: contain !important;
        background-position: center !important;
        background-repeat: no-repeat !important;
    }
}
