/* ============================================
   БАЗОВЫЕ СТИЛИ
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Плавная прокрутка */
html {
    scroll-behavior: smooth;
}

/* ============================================
   ШАПКА САЙТА (ОСНОВНОЕ МЕНЮ)
   ============================================ */
.site-header {
    background: linear-gradient(135deg, #0b5ed7 0%, #0945a3 100%) !important;
    padding: 10px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    min-height: 70px;
    padding-left: 5px !important;
    padding-right: 5px !important;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

    .logo-container img {
        height: 50px;
        max-height: 50px;
        filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
    }

.logo-text {
    color: #ffffff !important;
    font-size: 24px;
    font-weight: bold;
    text-decoration: none;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    letter-spacing: 0.5px;
}

/* ============================================
   НАВИГАЦИЯ В ШАПКЕ
   ============================================ */
.header-nav {
    display: flex;
    align-items: center;
    gap: 25px;
    position: relative;
}

    .header-nav a {
        color: #ffffff !important;
        text-decoration: none;
        font-size: 16px;
        display: flex;
        align-items: center;
        gap: 8px;
        transition: all 0.3s;
        padding: 8px 12px;
        border-radius: 6px;
    }

        .header-nav a:hover {
            background: rgba(255, 255, 255, 0.15);
            opacity: 1;
            transform: translateY(-1px);
        }

/* ============================================
   МЕНЮ ПОЛЬЗОВАТЕЛЯ (ВЫПАДАЮЩЕЕ)
   ============================================ */
.user-menu {
    position: relative;
    z-index: 1001;
}

.user-menu-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 15px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    transition: all 0.3s;
    white-space: nowrap;
    backdrop-filter: blur(10px);
}

    .user-menu-btn:hover {
        background: rgba(255, 255, 255, 0.3);
        border-color: rgba(255, 255, 255, 0.5);
        transform: translateY(-1px);
    }

.user-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 8px;
    background: linear-gradient(135deg, #6495ED 0%, #4a7fd4 100%);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    min-width: 200px;
    z-index: 1002;
    overflow: hidden;
}

    .user-dropdown.show {
        display: block;
        animation: slideDown 0.2s ease;
    }

    .user-dropdown a {
        color: white !important;
        padding: 12px 20px;
        display: flex;
        align-items: center;
        gap: 10px;
        text-decoration: none;
        transition: all 0.3s;
        font-size: 14px;
        border-radius: 0;
    }

        .user-dropdown a:hover {
            background: rgba(255, 255, 255, 0.25);
            color: white !important;
            padding-left: 25px;
        }

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   МОБИЛЬНОЕ МЕНЮ ОСНОВНОГО САЙТА
   ============================================ */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
    z-index: 1000;
}

/* ============================================
   СЕКЦИИ И ЗАГОЛОВКИ
   ============================================ */
.section {
    padding: 60px 0;
}

.section-bg {
    background-color: #f8f9fa;
}

.section-title {
    color: #0b5ed7 !important;
    font-weight: bold;
    font-size: 32px;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 3px solid #0b5ed7;
    text-align: center;
}

/* ============================================
   ГАЛЕРЕЯ
   ============================================ */
.custom-gallery {
    position: relative;
    margin-bottom: 30px;
}

.gallery-container {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
    border-radius: 8px;
    background: #e9ecef;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    touch-action: pan-y;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

    .gallery-container:active {
        cursor: grabbing;
    }

.gallery-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    pointer-events: none;
}

    .gallery-slide:first-child {
        opacity: 1;
    }

    .gallery-slide.active {
        opacity: 1;
    }

    .gallery-slide img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        pointer-events: none;
        -webkit-user-drag: none;
        user-select: none;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
    }

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(11, 94, 215, 0.8);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

    .gallery-nav:hover {
        background: rgba(11, 94, 215, 1);
    }

    .gallery-nav.prev {
        left: 20px;
    }

    .gallery-nav.next {
        right: 20px;
    }

.gallery-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.gallery-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid white;
    cursor: pointer;
    transition: background 0.3s;
}

    .gallery-indicator:first-child,
    .gallery-indicator.active {
        background: white;
    }

/* ============================================
   ОПИСАНИЕ ПОД ГАЛЕРЕЕЙ
   ============================================ */
.gallery-description {
    margin-top: 20px;
    position: relative;
    min-height: 80px;
}

.slide-description {
    display: none !important;
}

    .slide-description.active {
        display: block !important;
    }

    .slide-description h4 {
        color: #0b5ed7;
        font-size: 20px;
        margin-bottom: 10px;
        text-align: center;
    }

    .slide-description p {
        color: #0b5ed7;
        font-size: 16px;
        line-height: 1.5;
        text-align: center;
    }

/* ============================================
   ЛОГОТИПЫ КОМПАНИЙ («НАМ ДОВЕРЯЮТ»)
   ============================================ */
.trusted-companies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 20px;
}

.company-logo-card {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 60px;
    transition: transform 0.3s, box-shadow 0.3s;
}

    .company-logo-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    }

    .company-logo-card img {
        max-width: 100%;
        max-height: 40px;
        object-fit: contain;
    }

/* ============================================
   ФОРМА ОБРАТНОЙ СВЯЗИ
   ============================================ */
.contact-form {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
}

.form-group {
    margin-bottom: 20px;
}

    .form-group label {
        color: #0b5ed7;
        font-weight: 500;
        display: block;
        margin-bottom: 5px;
    }

.form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    font-size: 16px;
}

    .form-control:focus,
    .form-select:focus {
        outline: none;
        border-color: #0b5ed7;
        box-shadow: 0 0 0 3px rgba(11, 94, 215, 0.1);
    }

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

/* ============================================
   КНОПКИ (ОБЩИЕ)
   ============================================ */
.btn-primary {
    background: linear-gradient(135deg, #0b5ed7 0%, #0945a3 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(11, 94, 215, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

    .btn-primary:hover {
        background: linear-gradient(135deg, #0a4fb8 0%, #083d8f 100%);
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(11, 94, 215, 0.4);
    }

.btn-info {
    background: linear-gradient(135deg, #0b5ed7 0%, #0945a3 100%);
    color: white;
    border: none;
    transition: all 0.3s;
}

    .btn-info:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(13, 202, 240, 0.4);
        color: #e0e0e0 !important;
    }

.btn-warning {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
    color: #333;
    border: none;
    transition: all 0.3s;
}

    .btn-warning:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(255, 193, 7, 0.4);
    }

.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border: none;
    transition: all 0.3s;
}

    .btn-danger:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
    }

.btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: white;
    border: none;
    transition: all 0.3s;
}

    .btn-secondary:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(108, 117, 125, 0.4);
    }

/* ============================================
   АЛЕРТЫ
   ============================================ */
.alert {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* ============================================
   ФУТЕР
   ============================================ */
.site-footer {
    background: linear-gradient(135deg, #0b5ed7 0%, #0945a3 100%);
    color: white;
    text-align: center;
    padding: 40px 0;
    margin-top: 60px;
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.15);
}

    .site-footer p {
        margin: 0;
        font-size: 16px;
        text-shadow: 0 2px 4px rgba(0,0,0,0.2);
        letter-spacing: 0.5px;
    }

/* ============================================
   ВСПОМОГАТЕЛЬНЫЕ КЛАССЫ (сетка)
   ============================================ */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
    padding: 0 15px;
}

/* ============================================
   СТИЛИ АДМИН-ПАНЕЛИ (общие)
   ============================================ */
.card {
    border: none !important;
    border-radius: 10px !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08) !important;
    overflow: hidden;
}

    .card .card-header,
    .admin-content .card-header {
        background: linear-gradient(135deg, #0b5ed7 0%, #0945a3 100%) !important;
        color: white !important;
        border: none !important;
        padding: 15px 20px !important;
    }

        .card .card-header h5 {
            color: white !important;
            margin: 0 !important;
        }

.table {
    border-radius: 8px;
    overflow: hidden;
}

    .table thead th {
        background: linear-gradient(180deg, #0945a3 0%, #0b5ed7 100%);
        color: white;
        border: none;
    }

.badge {
    padding: 6px 12px;
    border-radius: 4px;
    font-weight: 500;
}

.bg-success {
    background: linear-gradient(135deg, #28a745 0%, #218838 100%) !important;
}

.bg-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%) !important;
}

.bg-warning {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%) !important;
    color: #333;
}

/* ============================================
   САЙДБАР АДМИНКИ (десктоп)
   ============================================ */
.admin-content {
    padding: 25px;
}

.admin-header-bar {
    background: white;
    padding: 15px 25px;
    border-radius: 10px;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .admin-header-bar h2 {
        margin: 0;
        color: #0b5ed7;
        font-size: 22px;
    }

.admin-sidebar {
    background: linear-gradient(180deg, #0b5ed7 0%, #0945a3 100%);
    min-height: 100vh;
    padding: 0;
    color: white;
    position: sticky;
    top: 0;
}

.sidebar-header {
    padding: 25px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    margin-bottom: 10px;
}

    .sidebar-header h4 {
        margin: 0;
        font-size: 18px;
    }

.sidebar-user {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    margin-bottom: 10px;
    font-size: 14px;
}

.admin-sidebar .nav-link {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    margin: 3px 10px;
    border-radius: 8px;
    transition: all 0.3s;
    font-size: 15px;
}

    .admin-sidebar .nav-link:hover {
        background: rgba(255,255,255,0.2);
        color: white;
    }

    .admin-sidebar .nav-link.active {
        background: rgba(255,255,255,0.25);
        color: white;
        font-weight: 500;
    }

    .admin-sidebar .nav-link i {
        font-size: 18px;
        width: 20px;
    }

.admin-sidebar .divider {
    border-color: rgba(255,255,255,0.2);
    margin: 10px;
}

/* Кнопка мобильного меню админки */
.admin-mobile-toggle {
    display: none;
    position: fixed;
    top: 15px;
    right: 15px;
    z-index: 1100;
    background: #0b5ed7;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 20px;
    cursor: pointer;
}

/* ============================================
   МОБИЛЬНАЯ ВЕРСИЯ АДМИНКИ
   ============================================ */
@media (max-width: 768px) {
    .admin-mobile-toggle {
        display: block;
    }

    .admin-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-height: 80vh;
        z-index: 1050;
        transform: translateY(-100%);
        transition: transform 0.3s ease;
        overflow-y: auto;
        min-height: auto;
    }

        .admin-sidebar.show {
            transform: translateY(0);
        }

    .admin-content {
        padding-top: 60px !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    .col-md-2,
    .col-md-10 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* ============================================
   АДАПТИВНОСТЬ ОСНОВНОГО САЙТА
   ============================================ */
@media (max-width: 768px) {
    .site-header {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    .header-content {
        flex-wrap: nowrap;
        position: relative;
        justify-content: space-between;
        padding-left: 5px !important;
        padding-right: 5px !important;
    }

    .logo-container {
        flex-shrink: 0;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .header-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: linear-gradient(135deg, #0b5ed7 0%, #0945a3 100%);
        flex-direction: column;
        padding: 15px;
        gap: 8px;
        border-radius: 0 0 10px 10px;
        box-shadow: 0 10px 20px rgba(0,0,0,0.2);
        z-index: 999;
    }

        .header-nav.show {
            display: flex !important;
            left: -10px;
            right: -10px;
            width: calc(100% + 20px);
        }

        .header-nav a {
            padding: 10px 15px;
            border-radius: 6px;
        }

            .header-nav a:hover {
                background: rgba(255,255,255,0.2);
            }

    .user-menu {
        width: 100%;
    }

    .user-menu-btn {
        width: 100%;
        justify-content: center;
    }

    .user-dropdown {
        position: static;
        width: 100%;
        margin-top: 5px;
        box-shadow: none;
        border: 1px solid rgba(255, 255, 255, 0.2);
        background: rgba(255,255,255,0.15);
    }

    .gallery-indicators {
        display: none !important;
    }

    .gallery-container {
        height: 250px;
    }

    .section-title {
        font-size: 22px;
    }

    .trusted-companies-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .gallery-container {
        height: 200px;
    }

    .trusted-companies-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery-nav {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
}

/* ============================================
   ИКОНКИ BOOTSTRAP
   ============================================ */
.bi {
    display: inline-block;
    vertical-align: middle;
}
