/* Сине-белый президентский стиль - строгий, официальный */

:root {
    --color-primary: #0056b3;
    --color-primary-dark: #004494;
    --color-primary-light: #e3f2fd;
    --color-dark: #212529;
    --color-light: #f8f9fa;
    --color-white: #ffffff;
    --color-telegram: #0088cc;
    --color-vk: #2787F5;
    --color-rutube: #FF3347;
}

/* Базовые настройки */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    font-weight: 400;
    line-height: 1.6;
    color: var(--color-dark);
    background: var(--color-white);
    overflow-x: hidden;
    padding-top: 80px;
}

/* Типография */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    letter-spacing: -0.01em;
}

.display-4, .display-5 {
    font-weight: 700;
    letter-spacing: -0.02em;
}

.lead {
    font-weight: 400;
    opacity: 0.9;
}

/* Навигация - БЕЛАЯ (исправлена) */
.navbar {
    background: var(--color-white) !important;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(0, 86, 179, 0.1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: 0.01em;
}

.navbar-brand img {
    transition: transform 0.3s ease;
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

.text-primary {
    color: var(--color-primary) !important;
}

.nav-link {
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 1rem !important;
    color: var(--color-dark) !important;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--color-primary) !important;
}

/* Синяя кнопка */
.btn-primary {
    background: var(--color-primary);
    border: 1px solid var(--color-primary);
    color: var(--color-white) !important;
    font-weight: 600;
    padding: 0.6rem 1.8rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 86, 179, 0.2);
    color: var(--color-white) !important;
}

.btn-outline-primary {
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.btn-outline-primary:hover {
    background: var(--color-primary);
    color: var(--color-white) !important;
}

/* Badge для корзины */
.bg-primary {
    background: var(--color-primary) !important;
    color: var(--color-white) !important;
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    min-width: 20px;
    min-height: 20px;
}

/* Цвета для соцсетей */
.bg-telegram {
    background: var(--color-telegram) !important;
}

.bg-vk {
    background: var(--color-vk) !important;
}

.bg-rutube {
    background: var(--color-rutube) !important;
}

.btn-telegram {
    background: var(--color-telegram) !important;
    border-color: var(--color-telegram) !important;
}

.btn-vk {
    background: var(--color-vk) !important;
    border-color: var(--color-vk) !important;
}

.btn-rutube {
    background: var(--color-rutube) !important;
    border-color: var(--color-rutube) !important;
}

/* Герой-секция с fallback */
.hero-video-section {
    min-height: 70vh;
    position: relative;
    margin-top: -80px;
    padding-top: 80px;
    background: linear-gradient(89deg, rgba(0, 86, 179, 0.9) 0%, rgba(0, 86, 179, 0.6) 50%, rgba(0, 86, 179, 0.3) 100%);
}

.min-vh-70 {
    min-height: 70vh !important;
}

.video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.video-overlay {
    background: linear-gradient(89deg, rgba(0, 86, 179, 0.9) 0%, rgba(0, 86, 179, 0.6) 50%, rgba(0, 86, 179, 0.3) 100%);
}

.video-fallback {
    background: linear-gradient(89deg, rgba(0, 86, 179, 0.9) 0%, rgba(0, 86, 179, 0.6) 50%, rgba(0, 86, 179, 0.3) 100%);
    display: none;
}

.hero-content {
    position: relative;
    z-index: 2;
}

/* Карточки решений */
.solution-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(0, 86, 179, 0.1);
}

.solution-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 86, 179, 0.15) !important;
    border-color: var(--color-primary);
}

.solution-card .card-header {
    border-radius: 0 !important;
    border: none;
    background: var(--color-primary) !important;
}

/* Карточки технологий */
.tech-card {
    transition: all 0.3s ease;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
}

.tech-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1) !important;
    border-color: var(--color-primary) !important;
}

.tech-card .card-img-top {
    transition: transform 0.6s ease;
}

.tech-card:hover .card-img-top {
    transform: scale(1.05);
}

/* Карточки соцсетей */
.social-card {
    transition: all 0.3s ease;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
}

.social-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.12) !important;
}

/* Карусель */
.carousel {
    border-radius: 8px;
    overflow: hidden;
}

.carousel-caption {
    background: rgba(0, 86, 179, 0.85);
    left: 0;
    right: 0;
    bottom: 0;
    padding: 1.5rem 2rem;
    text-align: left;
}

/* Блоки "пазлы" - Бренды */
.brand-card-large, .brand-card-medium, .brand-card-small {
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.brand-card-large:hover, .brand-card-medium:hover, .brand-card-small:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1) !important;
    border-color: var(--color-primary);
}

.brand-card-large {
    min-height: 200px;
}

.brand-card-medium {
    min-height: 180px;
}

.brand-card-small {
    min-height: 150px;
}

/* Блоки "пазлы" - Услуги */
.service-card-large, .service-card-medium, .service-card-small {
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.service-card-large:hover, .service-card-medium:hover, .service-card-small:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1) !important;
    border-color: var(--color-primary);
}

.service-card-large {
    min-height: 350px;
}

.service-card-medium {
    min-height: 120px;
}

.service-card-small {
    min-height: 200px;
}

/* Placeholder для изображений */
img[src*="placeholder.jpg"] {
    background: linear-gradient(45deg, #f0f0f0 25%, #e0e0e0 25%, #e0e0e0 50%, #f0f0f0 50%, #f0f0f0 75%, #e0e0e0 75%, #e0e0e0);
    background-size: 40px 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 0.8rem;
    text-align: center;
}

img[src*="placeholder.jpg"]::after {
    content: "Изображение загружается";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.8);
    padding: 5px 10px;
    border-radius: 3px;
}

/* Формы */
.form-control {
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 0.75rem 1rem;
    font-weight: 400;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 0.25rem rgba(0, 86, 179, 0.15);
}

/* Отступы секций */
.py-5 {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
}

.mb-5 {
    margin-bottom: 3rem !important;
}

/* Footer */
footer {
    background: var(--color-dark) !important;
    border-top: 3px solid var(--color-primary);
}

.bg-dark-2 {
    background: rgba(255, 255, 255, 0.05) !important;
}

/* Анимации */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content > * {
    animation: fadeInUp 0.8s ease-out forwards;
}

.hero-content h1 {
    animation-delay: 0.2s;
}

.hero-content p {
    animation-delay: 0.4s;
}

.hero-content .btn {
    animation-delay: 0.6s;
}

/* Модальные окна */
.modal-content {
    border-radius: 8px;
    border: none;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.modal-header {
    border-bottom: 1px solid rgba(0, 86, 179, 0.1);
}

/* Адаптивность */
@media (max-width: 992px) {
    .navbar-collapse {
        background: var(--color-white);
        padding: 1rem;
        margin-top: 1rem;
        border-radius: 8px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        border: 1px solid rgba(0, 86, 179, 0.1);
    }
    
    .hero-video-section h1 {
        font-size: 2.5rem;
    }
    
    .brand-card-large, .brand-card-medium, .brand-card-small {
        margin-bottom: 1rem;
    }
    
    .service-card-large, .service-card-medium, .service-card-small {
        margin-bottom: 1rem;
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 70px;
    }
    
    .hero-video-section {
        margin-top: -70px;
        padding-top: 70px;
        min-height: 60vh;
    }
    
    .min-vh-70 {
        min-height: 60vh !important;
    }
    
    .hero-video-section h1 {
        font-size: 2rem;
    }
    
    .carousel-caption {
        padding: 1rem;
    }
    
    .carousel-caption h3 {
        font-size: 1.1rem;
        margin-bottom: 0.25rem;
    }
    
    .carousel-caption p {
        font-size: 0.9rem;
        margin-bottom: 0;
    }
    
    .brand-card-large, .service-card-large {
        min-height: auto;
    }
}

@media (max-width: 576px) {
    .hero-video-section {
        min-height: 50vh;
    }
    
    .min-vh-70 {
        min-height: 50vh !important;
    }
    
    .hero-video-section h1 {
        font-size: 1.75rem;
    }
    
    .display-5 {
        font-size: 2rem;
    }
}

/* Утилиты для отступов */
.min-vh-70 {
    min-height: 70vh;
}

/* Плавный скролл */
html {
    scroll-behavior: smooth;
}

/* Улучшенный фокус для доступности */
:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Скрыть элементы для скринридеров */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Тени для карточек */
.shadow-sm {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

.shadow-lg {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12) !important;
}

/* Закругления */
.rounded-3 {
    border-radius: 12px !important;
}