/* ============================================
   MAIN.CSS — Основные стили сайта ПСК ОСНОВА
   ============================================ */

/* === БАЗОВЫЕ СТИЛИ === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden !important;
}

body {
    font-family: var(--font-base, system-ui, -apple-system, sans-serif);
    color: var(--dark);
    background: var(--light);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden !important;
    position: relative;
}

.page-wrapper {
    width: 100%;
    overflow-x: hidden;
    position: relative;
    padding-top: 52px;
}

.svg-icon {
    width: 1em;
    height: 1em;
    vertical-align: -0.125em;
    fill: currentColor;
}

.hp-field {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
    tab-size: 0 !important;
}

/* === НАВИГАЦИЯ === */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    z-index: 1040;
    background: rgba(var(--navbar-bg-rgb), var(--navbar-bg-a));
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.6rem 0;
    transition: all 0.3s ease-in-out;
    overflow-x: hidden;
}

.navbar>.container,
.navbar>.container-fluid {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
}

.navbar.scrolled {
    background: rgba(var(--navbar-bg-rgb), var(--navbar-bg-a-scrolled));
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

.navbar-brand {
    color: #fff !important;
    font-weight: 800;
    letter-spacing: 0.03em;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    max-width: 75%;
    flex-shrink: 1;
    min-width: 0;
}

.navbar-brand img {
    height: 32px;
    width: auto;
    flex-shrink: 0;
}

.navbar-brand-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.navbar-toggler {
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    padding: 0.4rem 0.6rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin-left: 10px;
    position: relative;
    z-index: 1050;
}

.navbar-toggler:focus {
    box-shadow: none;
    border-color: var(--secondary);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='white' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2.5' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    width: 24px;
    height: 24px;
}

.nav-link {
    color: rgba(255, 255, 255, 0.8) !important;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 0.85rem !important;
    border-radius: 8px;
}

.nav-link:hover,
.nav-link.active {
    color: #fff !important;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.dropdown-menu {
    background: rgba(var(--navbar-bg-rgb), 0.97);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 0.5rem;
}

.dropdown-item {
    color: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.navbar.menu-open .navbar-nav {
    background: rgba(var(--navbar-bg-rgb), 0.97);
    padding: 1rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-top: 0.75rem;
}

/* === ГЕРОЙ-СЕКЦИЯ === */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding-top: 68px;
}

.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
            rgba(var(--hero-overlay-rgb), var(--hero-overlay-a1)) 0%,
            rgba(var(--hero-overlay-rgb), var(--hero-overlay-a2)) 100%);
    z-index: 1;
}

.hero-section>.container {
    position: relative;
    z-index: 2;
}

.hero-content {
    max-width: 860px;
}

.hero-content h1 {
    font-size: clamp(1.6rem, 8vw, 3.8rem);
    font-weight: 900;
    color: var(--primary);
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 1.25rem;
    word-break: break-word;
}

.hero-content .lead {
    font-size: 1.1rem;
    color: var(--gray);
    line-height: 1.7;
    margin-bottom: 2rem;
    max-width: 720px;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    animation: bounce 2s infinite;
    color: var(--secondary);
    opacity: 0.7;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(-12px);
    }
}

/* === КНОПКИ === */
.btn {
    padding: 0.9rem 1.8rem;
    font-weight: 700;
    border-radius: 12px;
    letter-spacing: 0.02em;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
}

.btn-primary {
    background: var(--secondary);
    color: #fff;
    box-shadow: 0 8px 20px rgba(14, 165, 233, 0.3);
}

.btn-primary:hover {
    background: #0284c7;
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(14, 165, 233, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-3px);
}

/* === СТАТИСТИКА В HERO === */
.hero-stats {
    display: flex;
    gap: 1.25rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.stat-item {
    background: rgba(255, 255, 255, 0.95);
    padding: 1.25rem 1.75rem;
    border-radius: 14px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
    flex: 1;
    min-width: 120px;
    text-align: center;
    border: 1px solid rgba(15, 23, 42, 0.04);
}

.stat-number {
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--secondary);
    display: block;
    line-height: 1.1;
}

.stat-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--gray);
    font-weight: 700;
    display: block;
    margin-top: 6px;
}

/* === СЕКЦИИ === */
.section {
    padding: 5.5rem 0;
}

.bg-light {
    background: #f0f4ff !important;
}

.section-title {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-title h2 {
    font-size: 2.4rem;
    font-weight: 900;
    color: var(--primary);
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.section-title p {
    color: var(--gray);
    font-size: 1.1rem;
    max-width: 640px;
    margin: 0 auto;
}

/* === О КОМПАНИИ === */
.about-logo-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    padding: 3rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.about-logo-wrapper img {
    max-width: 100%;
    height: auto;
    max-height: 200px;
}

/* === КОМАНДА === */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 2rem;
}

.team-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--box-shadow);
    transition: all 0.3s ease;
}

.team-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

.team-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
    border: 3px solid rgba(14, 165, 233, 0.2);
}

.team-name {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.team-position {
    font-size: 0.85rem;
    color: var(--secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* === УСЛУГИ === */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
}

.service-card-link {
    text-decoration: none;
    color: inherit;
}

.service-card {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    min-height: 180px;
    display: flex;
    align-items: flex-end;
    background: var(--primary);
    transition: all 0.35s ease;
    box-shadow: var(--box-shadow);
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.18);
}

.service-card.has-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.1) 100%);
    z-index: 1;
}

.service-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.service-card:hover .service-bg {
    transform: scale(1.08);
}

.service-title {
    position: relative;
    z-index: 2;
    color: #fff;
    font-weight: 800;
    font-size: 1.1rem;
    padding: 1.25rem;
    margin: 0;
}

/* === ПРОЕКТЫ === */
.projects-section {
    background: var(--light);
}

.projects-filter {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 2rem;
}

.filter-btn {
    padding: 0.6rem 1.4rem;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: rgba(255, 255, 255, 0.8);
    border-radius: 999px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.88rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray);
}

.filter-btn:hover {
    border-color: var(--secondary);
    color: var(--secondary);
}

.filter-btn.active {
    background: var(--secondary);
    color: #fff;
    border-color: var(--secondary);
    box-shadow: 0 4px 14px rgba(14, 165, 233, 0.3);
}

.count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.08);
    font-size: 0.75rem;
    font-weight: 800;
    line-height: 1;
}

.filter-btn.active .count-badge {
    background: rgba(255, 255, 255, 0.25);
}

/* === ГОРИЗОНТАЛЬНЫЙ СЛАЙДЕР === */
.h-slider {
    position: relative;
    margin: 0 -18px;
    padding: 0 18px;
}

.h-slider-track {
    display: flex;
    gap: 1.25rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0.5rem 0 1rem;
}

.h-slider-track::-webkit-scrollbar {
    display: none;
}

.h-slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid rgba(15, 23, 42, 0.1);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    transition: all 0.25s ease;
    color: var(--primary);
}

.h-slider-btn:hover:not(:disabled) {
    background: var(--secondary);
    color: #fff;
    border-color: var(--secondary);
    transform: translateY(-50%) scale(1.08);
}

.h-slider-btn:disabled {
    opacity: 0.35;
    cursor: default;
}

.h-slider-btn.prev {
    left: -6px;
}

.h-slider-btn.next {
    right: -6px;
}

.h-slider-btn .svg-icon {
    width: 18px;
    height: 18px;
}

/* Карточка проекта */
.project-card {
    flex: 0 0 320px;
    scroll-snap-align: start;
    border-radius: var(--border-radius);
    overflow: hidden;
    background: #fff;
    box-shadow: var(--box-shadow);
    transition: all 0.35s ease;
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.15);
}

.project-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    border-bottom: 1px solid rgba(15, 23, 42, 0.05);
}

.project-content {
    padding: 1.25rem;
}

.project-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(14, 165, 233, 0.1);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.5rem;
}

.project-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.project-title a {
    text-decoration: none;
    color: inherit;
}

.project-title a:hover {
    color: var(--secondary);
}

.project-description {
    font-size: 0.9rem;
    color: var(--gray);
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.project-year {
    font-size: 0.82rem;
    color: var(--gray);
    font-weight: 600;
}

.project-link {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--secondary);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    text-decoration: none;
    transition: all 0.25s ease;
}

.project-link:hover {
    gap: 0.6rem;
    color: #0284c7;
}

.projects-cta {
    text-align: center;
    margin-top: 2.5rem;
}

/* === ВАКАНСИИ === */
.vacancy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.vacancy-card {
    background: #fff;
    border-radius: var(--border-radius);
    padding: 1.75rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.vacancy-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.vacancy-req ul {
    margin: 0.5rem 0 0;
    padding-left: 1rem;
}

.vacancy-req li {
    margin-bottom: 0.25rem;
    color: var(--gray);
}

/* === НОВОСТИ === */
.news-card {
    flex: 0 0 340px;
    scroll-snap-align: start;
    border-radius: var(--border-radius);
    overflow: hidden;
    background: #fff;
    box-shadow: var(--box-shadow);
    transition: all 0.35s ease;
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

.news-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.news-content {
    padding: 1.5rem;
}

.news-date {
    font-size: 0.82rem;
    color: var(--gray);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
}

.news-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* === ДОПУСКИ === */
.approvals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.approval-card {
    background: #fff;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--box-shadow);
    transition: all 0.3s ease;
}

.approval-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}

.approval-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.approval-number {
    font-size: 0.85rem;
    color: var(--gray);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.approval-desc {
    font-size: 0.9rem;
    color: var(--gray);
    margin-bottom: 0.75rem;
}

.approval-link {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--secondary);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    text-decoration: none;
    transition: all 0.25s ease;
}

.approval-link:hover {
    gap: 0.6rem;
    color: #0284c7;
}

/* === КОНТАКТЫ === */
.application-form {
    background: white;
    border-radius: var(--border-radius);
    padding: 2.5rem;
    box-shadow: var(--box-shadow);
}

.form-group {
    margin-bottom: 1rem;
}

.form-control {
    border: 2px solid rgba(15, 23, 42, 0.08);
    border-radius: 12px;
    padding: 0.85rem 1.25rem;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: rgba(248, 250, 252, 0.8);
}

.form-control:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.12);
    background: #fff;
}

.consent-check {
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    color: var(--gray);
}

.consent-check .form-check-label {
    cursor: pointer;
}

.consent-check .form-check-input:checked {
    background-color: var(--secondary);
    border-color: var(--secondary);
}

.policy-details {
    margin: 1rem 0;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 12px;
    overflow: hidden;
}

.policy-details summary {
    padding: 0.85rem 1.25rem;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    background: rgba(248, 250, 252, 0.8);
    transition: background 0.2s ease;
}

.policy-details summary:hover {
    background: rgba(248, 250, 252, 1);
}

.policy-text {
    padding: 1rem 1.25rem;
    font-size: 0.82rem;
    color: var(--gray);
    line-height: 1.7;
    max-height: 300px;
    overflow-y: auto;
}

.contact-info h3 {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary);
}

.info-block {
    margin-bottom: 1.5rem;
}

.info-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.35rem;
}

.info-icon {
    color: var(--secondary);
}

.info-value {
    color: var(--gray);
    margin: 0;
    padding-left: 1.75rem;
}

.social-links {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.social-link {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(14, 165, 233, 0.08);
    color: var(--secondary);
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-link:hover {
    background: var(--secondary);
    color: #fff;
    transform: translateY(-3px);
}

.social-link .svg-icon {
    width: 20px;
    height: 20px;
}

.contact-map {
    margin-top: 2rem;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.contact-map iframe {
    width: 100%;
    height: 280px;
    display: block;
    border: none;
}

/* === ФУТЕР === */
footer {
    background: var(--dark);
    color: rgba(255, 255, 255, 0.7);
    padding: 4rem 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 2.5rem;
}

.footer-logo {
    font-weight: 900;
    font-size: 1.4rem;
    color: #fff;
    margin-bottom: 1rem;
    letter-spacing: 0.03em;
}

.footer-description {
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.footer-title {
    font-weight: 800;
    color: #fff;
    font-size: 1rem;
    margin-bottom: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.6rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--secondary);
    padding-left: 8px;
}

.footer-contact-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-contact-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.4);
    margin: 0;
}

.footer-contact-value {
    margin: 0;
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.8);
}

.footer-bottom {
    margin-top: 3rem;
    padding: 1.5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
    font-size: 0.85rem;
}

.footer-bottom p {
    margin: 0.25rem 0;
}

footer .social-links {
    margin-top: 1.25rem;
}

footer .social-link {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.6);
}

footer .social-link:hover {
    background: var(--secondary);
    color: #fff;
}

/* === АНИМАЦИИ === */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

.staggered-item {
    opacity: 0;
}

/* === ПРЕЛОАДЕР === */
#preloader {
    position: fixed;
    inset: 0;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.6s ease;
}

#intro-video-overlay {
    position: fixed;
    inset: 0;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.6s ease;
}

#intro-video-overlay.hidden {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

#intro-video-overlay video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.intro-skip {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    padding: 0.85rem 1.6rem;
    border-radius: 999px;
    border: none;
    background: rgba(15, 23, 42, 0.85);
    color: #fff;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
    transition: all 0.3s ease;
}

.intro-skip:hover {
    background: rgba(14, 165, 233, 0.95);
    transform: translateY(-2px);
}

.preloader-content {
    text-align: center;
}

.preloader-logo {
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: fadeIn 0.6s ease 0.3s forwards;
}

.preloader-logo img {
    max-height: 80px;
    width: auto;
    display: block;
    margin: 0 auto;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
}

.loader {
    width: 60px;
    height: 60px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--secondary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* === ПЛАВАЮЩАЯ КНОПКА СВЯЗАТЬСЯ === */
.contact-toggle {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 0.85rem 1.5rem;
    border-radius: 999px;
    background: var(--secondary);
    color: #fff;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    z-index: 100;
    box-shadow: 0 12px 30px rgba(14, 165, 233, 0.4);
    transition: all 0.3s ease;
}

.contact-toggle:hover {
    transform: translateY(-4px);
    color: #fff;
}

/* === СКРОЛЛБАР === */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: var(--secondary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0284c7;
}

/* === АДАПТИВНОСТЬ === */
@media (max-width: 991px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .hero-section {
        min-height: 0;
        height: auto;
        padding: 96px 0 56px;
        overflow: visible;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-content h1 {
        font-size: 2.5rem;
        margin-bottom: 0.75rem;
    }

    .hero-content .lead {
        margin-bottom: 1.25rem;
    }

    .hero-stats {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem;
        margin-top: 1.75rem;
    }

    .stat-item {
        padding: 1.15rem;
        text-align: center;
    }

    .stat-number {
        font-size: 2rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .application-form {
        padding: 2rem;
    }

    .navbar-nav {
        background: white;
        padding: 1rem;
        border-radius: var(--border-radius);
        box-shadow: var(--box-shadow);
        margin-top: 1rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .section {
        padding: 4rem 0;
    }

    .hero-content {
        max-width: 100%;
    }

    .navbar-brand {
        font-size: 1.05rem;
        max-width: calc(100% - 52px);
    }

    .navbar-brand img {
        height: 28px;
    }

    .navbar-toggler {
        padding: 0.25rem 0.55rem;
    }

    .hero-content h1 {
        font-size: 2rem;
        margin-bottom: 0.65rem;
        word-break: break-word;
    }

    .hero-content .lead {
        font-size: 1rem;
        margin-bottom: 1.1rem;
    }

    .hero-stats {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.75rem;
        margin-top: 1.1rem;
    }

    .stat-item {
        padding: 0.9rem;
        text-align: center;
    }

    .stat-number {
        font-size: 1.45rem;
    }

    .stat-label {
        font-size: 0.68rem;
        letter-spacing: 0.05em;
        line-height: 1.3;
    }

    .btn {
        padding: 0.82rem 1.25rem;
        font-size: 0.82rem;
    }

    .hero-buttons {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .hero-buttons .me-3 {
        margin-right: 0 !important;
    }

    .scroll-indicator {
        display: none;
    }

    .navbar {
        padding: 0.35rem 0;
    }

    .navbar .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .navbar-brand {
        font-size: 1.05rem;
        letter-spacing: 0.02em;
        max-width: calc(100% - 52px);
    }

    .navbar-brand img {
        height: 28px;
    }

    .navbar-toggler {
        padding: 0.35rem 0.55rem;
        max-width: 48px;
    }
}

/* ============================================
   ТЁМНАЯ ТЕМА
   ============================================ */
html[data-bs-theme="dark"] {
    --dark: #f1f5f9;
    --light: #0f172a;
    --gray: #94a3b8;
}

html[data-bs-theme="dark"] body {
    background: #0f172a;
    color: #e2e8f0;
}

html[data-bs-theme="dark"] .section {
    background: #0f172a;
}

html[data-bs-theme="dark"] .section.bg-light,
html[data-bs-theme="dark"] .bg-light {
    background: #1e293b !important;
}

html[data-bs-theme="dark"] .section-title h2 {
    color: #f8fafc;
}

html[data-bs-theme="dark"] .section-title p {
    color: #94a3b8;
}

/* Навигация */
html[data-bs-theme="dark"] .navbar {
    background: rgba(15, 23, 42, 0.95) !important;
}

html[data-bs-theme="dark"] .nav-link {
    color: #cbd5e1 !important;
}

html[data-bs-theme="dark"] .nav-link:hover,
html[data-bs-theme="dark"] .nav-link.active {
    color: var(--secondary) !important;
}

/* Карточки */
html[data-bs-theme="dark"] .service-card,
html[data-bs-theme="dark"] .news-card,
html[data-bs-theme="dark"] .team-member,
html[data-bs-theme="dark"] .application-form,
html[data-bs-theme="dark"] .card {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.06);
    color: #e2e8f0;
}

html[data-bs-theme="dark"] .service-card:hover,
html[data-bs-theme="dark"] .news-card:hover {
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
}

html[data-bs-theme="dark"] .service-card h3,
html[data-bs-theme="dark"] .news-card h3,
html[data-bs-theme="dark"] .team-member h3,
html[data-bs-theme="dark"] .card-title {
    color: #f1f5f9;
}

html[data-bs-theme="dark"] .service-card p,
html[data-bs-theme="dark"] .news-card p,
html[data-bs-theme="dark"] .team-member p {
    color: #94a3b8;
}

/* Контакты */
html[data-bs-theme="dark"] .contact-info h3,
html[data-bs-theme="dark"] .info-title span {
    color: #f1f5f9;
}

html[data-bs-theme="dark"] .info-value {
    color: #cbd5e1;
}

/* Формы */
html[data-bs-theme="dark"] .form-control {
    background: #0f172a;
    border-color: #334155;
    color: #f1f5f9;
}

html[data-bs-theme="dark"] .form-control::placeholder {
    color: #64748b;
}

html[data-bs-theme="dark"] .form-control:focus {
    background: #0f172a;
    border-color: var(--secondary);
    color: #f1f5f9;
}

html[data-bs-theme="dark"] .form-check-label {
    color: #cbd5e1;
}

/* Кнопки */
html[data-bs-theme="dark"] .btn-outline {
    color: #e2e8f0;
    border-color: rgba(255, 255, 255, 0.2);
}

html[data-bs-theme="dark"] .btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Бейджи */
html[data-bs-theme="dark"] .vacancy-card {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.06);
}

html[data-bs-theme="dark"] .vacancy-card h3 {
    color: #f1f5f9;
}

/* Допуски */
html[data-bs-theme="dark"] .approval-card {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.06);
}

html[data-bs-theme="dark"] .approval-title {
    color: #f1f5f9;
}

html[data-bs-theme="dark"] .approval-desc {
    color: #94a3b8;
}

/* Текст */
html[data-bs-theme="dark"] .text-muted {
    color: #64748b !important;
}

html[data-bs-theme="dark"] a {
    color: var(--secondary);
}

html[data-bs-theme="dark"] .dropdown-menu {
    background: #1e293b;
    border-color: #334155;
}

html[data-bs-theme="dark"] .dropdown-item {
    color: #cbd5e1;
}

html[data-bs-theme="dark"] .dropdown-item:hover {
    background: rgba(14, 165, 233, 0.1);
    color: var(--secondary);
}

/* Alert */
html[data-bs-theme="dark"] .alert {
    background: rgba(14, 165, 233, 0.1);
    border-color: rgba(14, 165, 233, 0.2);
    color: #e2e8f0;
}

/* Policy details */
html[data-bs-theme="dark"] .policy-details {
    background: #0f172a;
    border-color: #334155;
}

html[data-bs-theme="dark"] .policy-text {
    color: #94a3b8;
}

/* Hero */
html[data-bs-theme="dark"] .hero-section {
    color: #f1f5f9;
}

/* Preloader */
html[data-bs-theme="dark"] #preloader {
    background: #0f172a;
}

/* Scroll indicator */
html[data-bs-theme="dark"] .scroll-indicator {
    color: rgba(255, 255, 255, 0.5);
}

/* Contact toggle */
html[data-bs-theme="dark"] .contact-toggle {
    background: var(--secondary);
    color: white;
}

/* ============================================
   АДАПТИВНЫЕ СТИЛИ (MOBILE)
   ============================================ */

/* Планшет и ниже */
@media (max-width: 991.98px) {
    .navbar-brand {
        max-width: 220px;
        font-size: 0.9rem;
    }

    .navbar-collapse {
        background: rgba(var(--navbar-bg-rgb), 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-radius: 12px;
        padding: 1.25rem;
        margin-top: 0.5rem;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    .navbar-nav .nav-link {
        padding: 0.8rem 1rem !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .navbar-nav .nav-link:last-child {
        border-bottom: none;
    }

    .dropdown-menu {
        background: rgba(255, 255, 255, 0.05) !important;
        border: none !important;
        padding-left: 1.5rem;
        margin-top: 0;
    }

    .hero-content h1 {
        font-size: 1.8rem;
    }

    .hero-stats {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

/* Телефон */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0f172a;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preloader-logo img {
    height: 60px;
    width: auto;
    margin-bottom: 20px;
}

.loader {
    width: 48px;
    height: 48px;
    border: 5px solid #FFF;
    border-bottom-color: var(--secondary);
    border-radius: 50%;
    display: inline-block;
    animation: rotation 1s linear infinite;
}

@keyframes rotation {
    0% {
        transform: rotate(0deg)
    }

    100% {
        transform: rotate(360deg)
    }
}

@media (max-width: 575.98px) {
    .navbar {
        padding: 0.5rem 0;
    }

    .navbar .container {
        padding-left: 15px;
        padding-right: 15px;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
    }

    .navbar-brand {
        max-width: 160px;
        font-size: 0.8rem;
    }

    .navbar-brand img {
        height: 28px;
    }

    /* Для очень маленьких экранов скрываем текст в лого, оставляем только картинку или укорачиваем */
    @media (max-width: 380px) {
        .navbar-brand {
            max-width: 140px;
        }
    }

    .page-wrapper {
        padding-top: 56px;
    }

    .hero-section {
        min-height: auto;
        padding-top: 80px;
        padding-bottom: 3rem;
    }

    .hero-content h1 {
        font-size: 1.6rem;
    }

    .hero-content .lead {
        font-size: 0.9rem;
    }

    .hero-buttons {
        gap: 1rem;
    }

    .hero-buttons .btn {
        width: 100%;
        justify-content: center;
    }

    .stat-number {
        font-size: 1.6rem;
    }

    .hero-stats {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    @media (max-width: 380px) {
        .hero-stats {
            grid-template-columns: 1fr;
        }
    }


    .section {
        padding: 3rem 0;
    }

    .section-title h2 {
        font-size: 1.5rem;
    }

    .contact-toggle {
        bottom: 1.5rem;
        right: 1.5rem;
        padding: 0.6rem 1rem;
        font-size: 0.82rem;
        z-index: 1050;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    }

    .projects-grid,
    .services-grid,
    .news-grid {
        gap: 1.25rem;
    }

    .about-text {
        font-size: 0.95rem;
        line-height: 1.7;
    }

    .footer-grid {
        gap: 2rem;
        text-align: center;
    }

    .footer-contact-list {
        align-items: center;
    }
}

/* Коррекция для Telegram и специфических WebView */
@supports (padding: env(safe-area-inset-top)) {
    .navbar {
        padding-top: calc(0.6rem + env(safe-area-inset-top));
    }
}

/* Фикс для предотвращения "ухода за сайт" навигации */
.navbar-collapse.show {
    max-height: 85vh;
    overflow-y: auto;
}