:root {
    --primary-color: #234a79;
    --primary-hover: #1f4d8c;
    --accent-color: #3976be;
    --light-bg: #f0f3fa;
    --dark-card: #141a23;
    --text-dark: #334155;
    --text-muted: #64748b;
}

body {
    font-family: 'Manrope', 'Inter', sans-serif;
    color: var(--text-dark);
    background-color: #ffffff;
    overflow-x: hidden;
}

/* Навигация */
.navbar-custom {
    background-color: transparent;
    padding: 15px 0;
    box-shadow: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1030;
    transition: background-color 0.25s ease, box-shadow 0.25s ease;
}
.navbar-custom.navbar-scrolled {
    background-color: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}
.navbar-brand {
    position: relative;
    display: inline-flex;
    align-items: center;
}
.navbar-brand img {
    max-width: 210px;
    height: auto;
    transition: opacity 0.2s ease;
}
.logo-light {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    opacity: 1;
}
.logo-dark {
    opacity: 0;
}
.navbar-custom.navbar-scrolled .logo-light {
    opacity: 0;
}
.navbar-custom.navbar-scrolled .logo-dark {
    opacity: 1;
}
.nav-link-custom {
    color: var(--text-dark) !important;
    font-weight: 700;
    margin-right: 15px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.2s;
}
.nav-link-custom:hover {
    color: var(--accent-color) !important;
}
.navbar-custom:not(.navbar-scrolled) .nav-link-custom {
    color: #ffffff !important;
}
.navbar-custom:not(.navbar-scrolled) .nav-link-custom:hover {
    color: #d9e6ff !important;
}
.navbar-custom:not(.navbar-scrolled) .navbar-toggler {
    border-color: rgba(255,255,255,0.6);
}
.navbar-custom:not(.navbar-scrolled) .navbar-toggler-icon {
    filter: brightness(0) invert(1);
}

/* Выпадающее меню "О нас" */
.nav-item-dropdown {
    position: relative;
}
.simple-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0px 15px 35px rgba(0, 11, 48, 0.15);
    border: 1px solid rgba(0,0,0,0.06);
    padding: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s ease;
    z-index: 1001;
}
.simple-dropdown-item {
    display: block;
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 10px 12px;
    border-radius: 10px;
    transition: background-color 0.2s, color 0.2s;
}
.simple-dropdown-item:hover {
    background-color: #f8fafc;
    color: var(--accent-color);
}
@media (min-width: 992px) {
    .nav-item-dropdown:hover .simple-dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
}

/* Мега-меню позиционирование */
@media (min-width: 992px) {
    .nav-item-mega {
        position: static !important; /* Разрешает меню растягиваться по ширине контейнера */
    }
    .mega-menu {
        position: absolute;
        top: 100%;
        left: 50%;
        transform: translateX(-50%) translateY(15px);
        width: 100%;
        max-width: 1140px;
        background-color: #ffffff;
        border-radius: 16px;
        box-shadow: 0px 15px 35px rgba(0, 11, 48, 0.15);
        border: 1px solid rgba(0,0,0,0.05);
        padding: 30px;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
        z-index: 1000;
    }
    .nav-item-mega:hover .mega-menu {
        opacity: 1;
        visibility: visible;
        transform: translateX(-50%) translateY(0);
    }
}

/* Оформление элементов внутри мега-меню */
.mega-menu-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    text-decoration: none;
    color: inherit;
    padding: 8px;
    border-radius: 8px;
    transition: background-color 0.2s, transform 0.2s;
}
.mega-menu-item:hover {
    background-color: #f8fafc;
    transform: translateY(-2px);
}
.mega-menu-icon {
    width: 48px;
    height: 48px;
    object-fit: contain;
    flex-shrink: 0;
}
.mega-menu-title {
    font-size: 14px;
    font-weight: 700;
    color: #1f4d8c;
    margin: 0 0 4px 0;
    line-height: 1.3;
    transition: color 0.2s;
}
.mega-menu-item:hover .mega-menu-title {
    color: #0260e8;
}
.mega-menu-desc {
    font-size: 11px;
    color: #64748b;
    margin: 0;
    line-height: 1.4;
}

/* Стилизация для мобильных мега-меню */
@media (max-width: 991px) {
    .simple-dropdown-menu {
        position: static;
        min-width: 0;
        border-radius: 8px;
        box-shadow: none;
        border: 0;
        padding: 8px 0 0 0;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
    }
    .nav-item-dropdown.active-mobile .simple-dropdown-menu {
        display: block;
    }
    .mega-menu {
        background-color: #f8fafc;
        border-radius: 8px;
        padding: 15px;
        margin-top: 10px;
        display: none;
    }
    .nav-item-mega.active-mobile .mega-menu {
        display: block;
    }
    .mega-menu-item {
        margin-bottom: 12px;
    }
}

/* Hero Секция */
.hero-section {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('https://static.tildacdn.one/tild3733-3634-4132-a262-636330663739/aysu33.webp') no-repeat center center/cover;
    color: #ffffff;
    min-height: 85vh;
    display: flex;
    align-items: center;
    text-align: center;
    padding: 80px 0;
}
.hero-title {
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 25px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}
.hero-desc {
    font-size: 1.4rem;
    font-weight: 500;
    max-width: 800px;
    margin: 0 auto 40px auto;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* Кнопки */
.btn-brand-primary {
    background: linear-gradient(135deg, #4a90e2 0%, #043f9f 100%);
    color: #ffffff;
    border: 1px solid #ffffff;
    border-radius: 30px;
    padding: 14px 28px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 10px 30px rgba(0, 11, 48, 0.3);
    transition: all 0.3s ease;
}
.btn-brand-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(0, 11, 48, 0.4);
    color: #ffffff;
    opacity: 0.95;
}
.btn-brand-secondary {
    background: linear-gradient(135deg, #3976be 0%, #163a6b 100%);
    color: #ffffff;
    border: none;
    border-radius: 30px;
    padding: 14px 28px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 10px 30px rgba(0, 11, 48, 0.3);
    transition: all 0.3s ease;
}
.btn-brand-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(0, 11, 48, 0.4);
    color: #ffffff;
}

/* Секция О нас */
.about-section {
    padding: 90px 0;
    background-color: #ffffff;
}
.about-text-container {
    background-color: #edeff4;
    border: 2px solid #eceaea;
    border-radius: 12px;
    padding: 40px;
    height: 100%;
    box-shadow: 0px 10px 20px rgba(0,0,0,0.05);
}
.about-img {
    border-radius: 12px;
    width: 100%;
    height: 100%;
    object-fit: cover;
    box-shadow: 0px 10px 20px rgba(0,0,0,0.05);
}

/* Счетчики */
.stats-section {
    background-color: #325a91;
    color: #ffffff;
    padding: 60px 0;
}
.stat-item {
    text-align: center;
}
.stat-number {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 10px;
}
.stat-label {
    font-size: 1.1rem;
    font-weight: 500;
    opacity: 0.9;
}

/* Продукция */
.product-section {
    padding: 90px 0;
    background-color: #ffffff;
}
.product-card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    background-color: #f8fafc;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 11, 48, 0.1);
}
.product-img-wrapper {
    position: relative;
    padding-bottom: 85%;
    overflow: hidden;
}
.product-img {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover;
}
.product-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
}
.product-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary-hover);
    margin-bottom: 12px;
    line-height: 1.4;
}
.product-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* Проекты — горизонтальная галерея */
.projects-section {
    padding: 90px 0;
    background-color: var(--light-bg);
}
.projects-carousel-wrap {
    position: relative;
    padding: 0 56px;
}
.projects-carousel {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 4px 0 12px;
    position: relative;
    z-index: 1;
}
.projects-carousel::-webkit-scrollbar {
    display: none;
}
.projects-carousel__slide {
    flex: 0 0 min(320px, 78vw);
    scroll-snap-align: start;
}
@media (min-width: 768px) {
    .projects-carousel__slide {
        flex-basis: min(360px, 32vw);
    }
}
@media (min-width: 1200px) {
    .projects-carousel__slide {
        flex-basis: 340px;
    }
}
.projects-carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background-color: rgba(57, 118, 190, 1);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    pointer-events: auto;
    box-shadow: 0 4px 14px rgba(31, 77, 140, 0.35);
    transition: background-color 0.2s ease, transform 0.2s ease;
}
.projects-carousel-btn:hover {
    background-color: #1f4d8c;
    transform: translateY(-50%) scale(1.05);
}
.projects-carousel-btn--prev {
    left: 4px;
}
.projects-carousel-btn--next {
    right: 4px;
}
@media (max-width: 575px) {
    .projects-carousel-wrap {
        padding: 0 44px;
    }
    .projects-carousel-btn {
        width: 40px;
        height: 40px;
    }
    .projects-carousel-btn--prev {
        left: 0;
    }
    .projects-carousel-btn--next {
        right: 0;
    }
}
.project-img-card {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: transform 0.2s ease;
}
.project-img-card:hover {
    transform: scale(1.02);
}
.project-img-card img {
    width: 100%;
    height: 340px;
    object-fit: cover;
    display: block;
}
@media (max-width: 639px) {
    .project-img-card img {
        height: 280px;
    }
}

/* Преимущества */
.advantages-section {
    padding: 90px 0;
    background-color: #ffffff;
}
.advantage-card {
    text-align: center;
    padding: 30px 20px;
    height: 100%;
}
.advantage-icon {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 20px;
}
.advantage-title {
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--primary-hover);
    margin-bottom: 12px;
}
.advantage-desc {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Типы объектов */
.objects-section {
    padding: 90px 0;
    background-color: var(--light-bg);
}
.object-card {
    height: 350px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: flex-end;
    padding: 30px;
    background-size: cover;
    background-position: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}
.object-card:hover {
    transform: scale(1.03);
}
.object-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(15,15,15,0.4), rgba(0,0,0,0.85));
    z-index: 1;
}
.object-content {
    position: relative;
    z-index: 2;
    color: #ffffff;
}
.object-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 10px;
}
.object-desc {
    font-size: 0.9rem;
    opacity: 0.9;
    font-weight: 300;
}

/* Партнеры */
.partners-section {
    padding: 70px 0;
    background-color: #ffffff;
}
.partner-logo-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 80px;
    padding: 10px;
}
.partner-logo-img {
    max-height: 55px;
    max-width: 100%;
    object-fit: contain;
    opacity: 0.85;
    transition: opacity 0.2s;
}

/* Форма подбора */
.form-section {
    background-color: var(--light-bg);
    padding: 90px 0;
}
.form-box {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0px 12px 24px rgba(0, 0, 0, 0.1);
}
.features-badge-container {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0px 10px 0px 0px #1058ae;
    height: 100%;
}

/* Интерактивная карта */
.map-wrap {
    position: relative;
    width: 100%;
    min-height: 0;
    border-radius: 14px;
    overflow: visible;
    box-shadow: 0 6px 28px rgba(16,24,40,.12);
    padding: 32px;
    background: #f4f7fb;
    display: flex;
    justify-content: center;
}
.map-iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
.contact-card {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 560px;
    background: #ffffff;
    color: #2a3441;
    border: 1px solid #d9e2ee;
    border-radius: 16px;
    padding: 28px;
}
.contact-title {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.3rem;
    margin-bottom: 15px;
}
.contact-card a {
    color: var(--primary-color);
    text-decoration: none;
}

/* Плавающий виджет */
.floating-widget {
    position: fixed;
    right: 25px;
    bottom: 25px;
    z-index: 1060;
    pointer-events: none;
}
.floating-widget .widget-btn,
.floating-widget .widget-menu {
    pointer-events: auto;
}
.widget-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.25);
    transition: all 0.3s ease;
}
.widget-btn:hover {
    background-color: var(--accent-color);
    transform: scale(1.05);
}
.widget-menu {
    position: absolute;
    bottom: 75px;
    right: 0;
    display: none;
    flex-direction: column;
    gap: 10px;
}
.widget-menu.show {
    display: flex;
}
.widget-item {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    transition: transform 0.2s;
}

/* Кнопка Вверх */
.scroll-top-btn {
    position: fixed;
    left: 25px;
    bottom: 25px;
    z-index: 999;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #ffffff;
    border: none;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0px 4px 15px rgba(0,0,0,0.15);
    cursor: pointer;
    transition: all 0.2s;
}
.scroll-top-btn:hover {
    background-color: var(--primary-color);
}
.scroll-top-btn:hover svg path {
    stroke: #ffffff;
}

@media (max-width:1024px){
    .contact-card{
        position: relative;
        left:0; top: 0; transform: none;
        margin: 0 auto;
        max-width: 100%;
    }
    .map-wrap {
        height: auto;
        padding: 20px;
    }
    .map-iframe-container {
        height: 380px;
        position: relative;
    }
}
