/* ===================================
   JUNIPER NAVIGATION OVERRIDES
   =================================== */

/* Адаптация навигации под стиль Juniper */
.navbar .dropdown-menu {
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.navbar .dropdown-item {
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.navbar .dropdown-item:hover {
    background: linear-gradient(90deg, rgba(107, 158, 0, 0.05), rgba(0, 163, 224, 0.05));
    color: #6B9E00;
    padding-left: 2rem;
}

.navbar .dropdown-item.active {
    background: linear-gradient(90deg, rgba(107, 158, 0, 0.1), rgba(0, 163, 224, 0.1));
    color: #6B9E00;
    font-weight: 600;
}


/* При наведении - меняем цвет */
.navbar .dropdown-toggle:hover::after {
    border-top-color: #6B9E00 !important;
}

/* При открытии - НЕ ВРАЩАЕМ, только скрываем */
.navbar .dropdown-toggle[aria-expanded="true"]::after {
    transform: none !important; /* Блокируем rotate(180deg) */
    opacity: 0 !important;
}



/* Показываем стрелку вверх при открытии */
.navbar .dropdown-toggle[aria-expanded="true"]::before {
    opacity: 1 !important;
}



/* Переключатель языков - зелено-синий градиент */
.navbar .lang-btn {
    background: transparent;
    color: #666;
    padding: 5px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid rgba(184, 221, 243, 0.3);
}

.navbar .lang-btn:hover {
    border-color: #6B9E00;
    color: #6B9E00;
}

.navbar .lang-btn.active {
    background: linear-gradient(135deg, #6B9E00, #00A3E0);
    color: white;
    box-shadow: 0 2px 10px rgba(0, 163, 224, 0.3);
    border-color: transparent;
}

/* Кнопка контакта - зелено-синий градиент */
.navbar .btn-contact {
    background: linear-gradient(135deg, #6B9E00, #00A3E0);
    color: white;
    padding: 8px 20px;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 163, 224, 0.3);
    border: none;
    text-decoration: none;
}

.navbar .btn-contact:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 163, 224, 0.4);
    background: linear-gradient(135deg, #78BE20, #00A3E0);
    color: white;
}

/* ===================================
   JUNIPER MAIN PAGE STYLES
   juniper/juniper-main.css
   =================================== */

/* Переменные для Juniper */
:root {
    --juniper-primary: #00A3E0;
    --juniper-secondary: #78BE20;
    --juniper-dark: #003865;
    --juniper-light: #F0F8FF;
    --juniper-gray: #6C757D;
}

/* ===================================
   HERO SECTION - Новый стиль как на Juniper.net
   =================================== */
.juniper-hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 120px 0 80px;
}

/* Video Background без overlay */
.juniper-video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.juniper-video-background video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
}

/* Hero Container */
.juniper-hero-container {
    position: relative;
    z-index: 1;
    width: 100%;
}

.juniper-hero-content {
    max-width: 800px;
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Партнерский бейдж */
.juniper-partner-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 10px 24px;
    border-radius: 30px;
    margin-bottom: 24px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 0.95rem;
    font-weight: 500;
    color: #333;
}

.juniper-partner-badge i {
    font-size: 1.2rem;
    color: #6B9E00;
}

/* Заголовок в стиле Juniper */
.hero-title {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: clamp(2.5rem, 5vw, 4rem);
    line-height: 1.15;
    margin-bottom: 2rem;
    color: #1a1a1a;
    font-weight: 300;
    letter-spacing: -0.02em;
}

.title-main {
    display: block;
    font-weight: 300;
}

/* Описание */
.hero-description {
    font-size: 1.25rem;
    line-height: 1.7;
    color: #333;
    margin-bottom: 3rem;
    font-weight: 400;
    max-width: 700px;
}

/* Кнопки действий */
.hero-actions {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.btn-hero-primary {
    background-color: #6B9E00;
    color: white;
    padding: 16px 32px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 500;
    text-decoration: none;
    border: none;
    transition: all 0.3s ease;
    display: inline-block;
    cursor: pointer;
}

.btn-hero-primary:hover {
    background-color: #5a8500;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(107, 158, 0, 0.25);
    color: white;
}

.btn-hero-secondary {
    background-color: transparent;
    color: #333;
    padding: 16px 32px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 500;
    text-decoration: none;
    border: 2px solid #333;
    transition: all 0.3s ease;
    display: inline-block;
    cursor: pointer;
}

.btn-hero-secondary:hover {
    background-color: #333;
    color: white;
    transform: translateY(-2px);
}

/* Статистика */
.hero-stats {
    display: flex;
    gap: 3rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
}

.stat-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, rgba(107, 158, 0, 0.1), rgba(0, 163, 224, 0.1));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: #6B9E00;
    flex-shrink: 0;
}

.stat-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.85rem;
    color: #666;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
}
.juniper-hero-section:not(.video-loaded) .juniper-video-background {
    background: linear-gradient(135deg,
        rgba(203, 234, 237, 0.95) 0%,
        rgba(152, 216, 170, 0.95) 100%),
        url('/images/juniper/hero-fallback.jpg');
    background-size: cover;
    background-position: center;
}

/* Mobile fallback background */
.juniper-hero-section.mobile-fallback .juniper-video-background {
    background: linear-gradient(135deg,
        rgba(203, 234, 237, 0.97) 0%,
        rgba(152, 216, 170, 0.97) 100%);
}

/* ===================================
   ОСТАЛЬНЫЕ СЕКЦИИ (без изменений)
   =================================== */

/* Advantages Section */
.juniper-advantages-section {
    padding: 80px 0;
    background: linear-gradient(135deg, rgba(248, 251, 255, 0.97), rgba(240, 248, 255, 0.95));
}

.juniper-advantage-card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    height: 100%;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    text-align: center;
}

.juniper-advantage-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 163, 224, 0.15);
}

.advantage-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--juniper-primary), var(--juniper-secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2rem;
    color: white;
}

.juniper-advantage-card h4 {
    font-size: 1.25rem;
    margin-bottom: 15px;
    color: var(--juniper-dark);
}

.juniper-advantage-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Categories Section */
.juniper-categories-section {
    padding: 80px 0;
    background: white;
}

.juniper-category-card {
    display: block;
    background: white;
    border-radius: 16px;
    padding: 30px;
    height: 100%;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    border: 2px solid transparent;
    text-align: center; /* Центрируем весь контент */
}

.juniper-category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 163, 224, 0.2);
    border-color: var(--juniper-primary);
    color: inherit;
    text-decoration: none;
}

.category-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, rgba(0, 163, 224, 0.1), rgba(120, 190, 32, 0.1));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px; /* Центрируем иконку */
    font-size: 2rem;
    color: var(--juniper-primary);
    transition: all 0.3s ease;
}

.juniper-category-card:hover .category-icon {
    background: linear-gradient(135deg, var(--juniper-primary), var(--juniper-secondary));
    color: white;
    transform: scale(1.1);
}

/* Стили для карточек категорий */
.juniper-category-card {
    display: block;
    background: white;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 280px;
    position: relative;
    overflow: hidden;
}

/* Отдельный селектор для h3 */
.juniper-category-card h3 {
    margin-bottom: 20px; /* Увеличиваем отступ снизу */
    font-size: 1.3rem;
}

/* Отдельный селектор для category-products-count */
.juniper-category-card .category-products-count {
    margin-top: auto; /* Прижимаем счетчик к низу карточки */
}

/* Features Section */
.juniper-features-section {
    padding: 80px 0;
    position: relative;
    overflow: hidden;
    background: none;
}

.features-video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.features-video-background video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
}

.features-container {
    position: relative;
    z-index: 1;
}

.juniper-feature-item {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    padding: 25px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.juniper-feature-item:hover {
    background: rgba(255, 255, 255, 0.98);
    transform: translateX(10px);
    box-shadow: 0 10px 30px rgba(0, 163, 224, 0.2);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--juniper-primary), var(--juniper-secondary));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.5rem;
    color: white;
    box-shadow: 0 5px 15px rgba(0, 163, 224, 0.3);
}

.feature-content h5 {
    font-size: 1.25rem;
    margin-bottom: 10px;
    color: var(--juniper-dark);
    font-weight: 600;
}

.feature-content p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.juniper-features-section h2 {
    font-size: 2.5rem;
    color: var(--juniper-dark);
    margin-bottom: 15px;
    font-weight: 700;
}

.juniper-features-section p.mb-4 {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

.juniper-features-section:not(.video-loaded) .features-video-background {
    background: linear-gradient(135deg, #f0f8ff, #e8f4fd);
    background-size: cover;
    background-position: center;
}

/* Services Section - С фоном как в подвале */
.juniper-services-section {
    padding: 80px 0;
    background-image:
        linear-gradient(135deg, rgba(248, 251, 255, 0.92), rgba(232, 244, 253, 0.88)),
        url('/images/main-bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    position: relative;
}

.juniper-services-section h2 {
    font-size: 2.5rem;
    color: var(--juniper-dark);
    margin-bottom: 15px;
    font-weight: 700;
}

.services-subtitle {
    font-size: 1.15rem;
    color: #333;
    margin-bottom: 40px;
    line-height: 1.6;
}

.juniper-service-card {
    background: white;
    border-radius: 16px;
    padding: 40px 30px;
    height: 100%;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    text-align: center;
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.juniper-service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 163, 224, 0.2);
    border-color: var(--juniper-primary);
}

.service-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, rgba(0, 163, 224, 0.1), rgba(120, 190, 32, 0.1));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    font-size: 2rem;
    color: var(--juniper-primary);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.juniper-service-card:hover .service-icon {
    background: linear-gradient(135deg, var(--juniper-primary), var(--juniper-secondary));
    color: white;
    transform: scale(1.1);
}

.juniper-service-card h5 {
    font-size: 1.25rem;
    color: var(--juniper-dark);
    margin-bottom: 15px;
    font-weight: 600;
    min-height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.juniper-service-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
    font-size: 0.95rem;
    flex-grow: 1;
}

/* ===================================
   RESPONSIVE STYLES
   =================================== */
@media (max-width: 991px) {
    .juniper-hero-section {
        min-height: 80vh;
        padding: 100px 0 60px;
    }

    .hero-title {
        font-size: clamp(2rem, 4vw, 3rem);
    }

    .hero-description {
        font-size: 1.1rem;
    }

    .juniper-features-section h2 {
        font-size: 2rem;
    }

    .juniper-features-image {
        margin-top: 40px;
    }
}

@media (max-width: 768px) {
    .juniper-hero-section {
        min-height: 70vh;
        padding: 80px 0 40px;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .title-prefix {
        margin-bottom: 0.25rem;
    }

    .hero-description {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    .hero-actions {
        flex-direction: column;
        gap: 1rem;
    }

    .btn-hero-primary,
    .btn-hero-secondary {
        width: 100%;
        text-align: center;
        padding: 14px 28px;
        font-size: 1rem;
    }

    .hero-stats {
        gap: 0;
        padding: 0;
        margin-top: 2rem;
        border-top: none;
        background: linear-gradient(135deg, rgba(107, 158, 0, 0.9), rgba(0, 163, 224, 0.9));
        border-radius: 16px;
        padding: 1rem;
    }

    .stat-item {
        flex: 1;
        padding: 0.75rem;
        border-right: 1px solid rgba(255, 255, 255, 0.2);
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.5rem;
    }

    .stat-item:last-child {
        border-right: none;
    }

    .stat-icon {
        display: none; /* Скрываем иконки на мобильных для экономии места */
    }

    .stat-content {
        align-items: center;
        text-align: center;
    }

    .stat-number {
        font-size: 1.5rem;
        font-weight: 700;
        color: white;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
        margin-bottom: 0.25rem;
    }

    .stat-label {
        font-size: 0.65rem;
        line-height: 1.2;
        color: rgba(255, 255, 255, 0.95);
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
        text-transform: uppercase;
        letter-spacing: 0.3px;
    }
    .juniper-video-background video,
    .features-video-background video {
        display: none;
    }

    /* Мобильный фон для Hero */
    .juniper-video-background {
        background: linear-gradient(135deg,
            rgba(203, 234, 237, 0.98) 0%,
            rgba(152, 216, 170, 0.98) 100%);
    }

    /* Features mobile */
    .juniper-feature-item {
        flex-direction: column;
        text-align: center;
        padding: 15px;
    }

    .feature-icon {
        margin: 0 auto 15px;
    }

    .juniper-features-section {
        padding: 60px 0;
    }

    .juniper-features-section h2 {
        font-size: 2rem;
        text-align: center;
    }

    .juniper-features-section p.mb-4 {
        text-align: center;
    }

    .juniper-features-section .col-lg-7 {
        text-align: center;
    }

    /* Services mobile */
    .juniper-service-card {
        padding: 25px;
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    .juniper-hero-section {
        min-height: 60vh;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .hero-description {
        font-size: 0.95rem;
    }
}