/* ==============================================
   RESET & BASE
   ============================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', 'Helvetica', sans-serif;
    color: #333;
    line-height: 1.6;
    background-color: #eff0f0;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==============================================
   ANIMATIONS
   ============================================== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(40px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ==============================================
   HEADER — DESKTOP
   ============================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: #fff;
    z-index: 3000;
}

/* Строка 1: кнопки + телефон + языки */
.header-top { padding: 10px 0; }

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-search-icon {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.header-link {
    font-size: 13px;
    color: #1b4c83;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.3s;
}
.header-link:hover { color: #983e4f; }

.header-link-red { color: #b81f35 !important; }
.header-link-red:hover { color: #983e4f !important; }

.header-icon-img { width: 18px; height: 18px; }

.header-phone {
    font-size: 14px;
    font-weight: bold;
    color: rgba(112, 109, 109, 0.5);
}

.header-languages {
    display: flex;
    gap: 15px;
}

.lang-link {
    font-size: 13px;
    color: #666;
    transition: color 0.3s;
}
.lang-link:hover { color: #1b4c83; }

/* Строка 2: название + логотип */
.header-main { padding: 20px 0; }

.header-main-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title h1 {
    font-size: 22px;
    color: #1b4c83;
    font-weight: normal;
}

.logo img { height: 60px; }

/* Строка 3: навигация */
.main-nav {
    background-color: #155a9a;
    height: 48px;
}

.nav-menu {
    display: flex;
    align-items: center;
    height: 48px;
    list-style: none;
}

.nav-item { position: relative; }

.nav-item > a {
    color: #fff;
    font-size: 14px;
    padding: 0 25px;
    line-height: 48px;
    display: block;
    transition: background 0.3s ease;
}
.nav-item > a .arrow { font-size: 9px; margin-left: 6px; }
.nav-item:hover > a { background-color: #0f4578; }

/* Dropdown */
.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 260px;
    background: #fff;
    list-style: none;
    padding: 10px 0;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    opacity: 0;
    visibility: hidden;
    transition: 0.25s ease;
    z-index: 1000;
}
.nav-item:hover .dropdown { opacity: 1; visibility: visible; }
.dropdown li { border-bottom: 1px solid #f0f0f0; }
.dropdown li:last-child { border-bottom: none; }
.dropdown a {
    display: block;
    padding: 12px 20px;
    font-size: 14px;
    color: #333;
    transition: background 0.3s, padding-left 0.3s;
}
.dropdown a:hover {
    background-color: #f5f7fa;
    padding-left: 25px;
    color: #1b4c83;
}

/* ==============================================
   RIGHT SIDEBAR — DESKTOP
   ============================================== */
.right-sidebar {
    position: fixed;
    right: 0;
    top: 320px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 2000;
}

.sidebar-item {
    width: 340px;
    height: 60px;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 0 25px;
    color: #1f4f8b;
    font-weight: 600;
    transition: all 0.4s ease;
}
.sidebar-item img { width: 40px; height: 40px; }

/* Collapsed (при скролле на десктопе) */
.right-sidebar.collapsed .sidebar-item {
    width: 90px;
    padding: 0;
    justify-content: center;
}
.right-sidebar.collapsed .sidebar-item span {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

/* ==============================================
   HERO
   ============================================== */
.hero {
    position: relative;
    height: 400px;
    margin-top: 160px;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    inset: 0;
}
.hero-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ==============================================
   ABOUT
   ============================================== */
.about {
    padding: 60px 0;
    background-color: #fff;
}

.section-title {
    font-size: 32px;
    color: #1b4c83;
    margin-bottom: 30px;
    font-weight: normal;
}

.about-text {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
    margin-bottom: 40px;
}
.about-text p { margin-bottom: 20px; }

.link-red { color: #983e4f; font-weight: bold; }

/* Action cards */
.action-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.action-card {
    padding: 25px 20px;
    color: #fff;
    display: block;
    position: relative;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.action-card:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}
.action-card:hover .action-arrow { right: 10px; opacity: 1; }

.action-card-blue  { background-color: #1b4c83; }
.action-card-gray  { background-color: #828c96; }
.action-card-light { background-color: #c8c8c8; color: #333; }

.action-label {
    font-size: 15px;
    font-style: italic;
    margin-bottom: 8px;
}
.action-title {
    font-size: 17px;
    font-weight: bold;
    line-height: 1.2;
}
.action-arrow {
    position: absolute;
    bottom: 12px;
    right: 15px;
    font-size: 35px;
    opacity: 0.7;
    transition: right 0.3s, opacity 0.3s;
}

/* ==============================================
   STATISTICS
   ============================================== */
.statistics {
    padding: 80px 0;
    background-color: #eff0f0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 60px;
    text-align: center;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
}
.stat-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 12px;
}

.stat-number {
    font-size: 48px;
    font-weight: bold;
    color: #1b4c83;
    margin-bottom: 15px;
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.stat-item.counting .stat-number { opacity: 1; transform: scale(1); }

.stat-label {
    font-size: 14px;
    color: #1b4c83;
    font-weight: bold;
    line-height: 1.4;
    text-transform: uppercase;
}

/* ==============================================
   TEAM
   ============================================== */
.team-section {
    padding: 80px 0;
    background-color: #ffffff;
}

.team-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.team-title {
    font-size: 32px;
    color: #1b4c83;
    margin-bottom: 20px;
    font-weight: normal;
}

.team-intro {
    max-width: 900px;
    margin-bottom: 40px;
    font-size: 17px;
    line-height: 1.8;
    color: #333;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.team-card {
    text-align: center;
    transition: transform 0.3s ease;
}
.team-card:hover { transform: translateY(-8px); }

.team-photo {
    width: 100%;
    height: 260px;
    overflow: hidden;
    border-radius: 6px;
    margin-bottom: 18px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}
.team-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}
.team-card:hover .team-photo img { transform: scale(1.08); }

.team-name {
    font-size: 18px;
    color: #1b4c83;
    margin-bottom: 6px;
    font-weight: 700;
}
.team-role { font-size: 15px; color: #666; }

/* ==============================================
   FOOTER
   ============================================== */
.footer { background: #165a97; width: 100%; }

.footer-bar {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    height: 72px;
}

.footer-links {
    display: flex;
    align-items: center;
    padding-left: 40px;
    gap: 0;
}
.footer-links a { color: #fff; font-size: 16px; }
.footer-links span { color: rgba(255,255,255,0.6); margin: 0 18px; }

.footer-actions { display: flex; height: 100%; }

.footer-feedback {
    background: #d7192d;
    color: #fff;
    padding: 0 42px;
    display: flex;
    align-items: center;
    font-size: 16px;
}
.footer-print {
    background: #0f4e86;
    width: 95px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-mail::before { content: "✉"; margin-right: 12px; font-size: 18px; }
.icon-print::before { content: "🖨"; font-size: 20px; color: #fff; }

/* Кнопка закрытия меню — скрыта на десктопе */
.nav-close { display: none; }

/* Затемнение фона при открытом меню */
.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 9998;
}
.nav-overlay.active { display: block; }

/* ==============================================
   MOBILE-ONLY ELEMENTS — скрыты на десктопе
   ============================================== */
.mobile-burger      { display: none; }
.mobile-action-bar  { display: none; }
.desktop-only       { display: flex; align-items: center; gap: 6px; }

/* ==============================================
   RESPONSIVE — TABLET ≤ 1024px
   ============================================== */
@media (max-width: 1024px) {
    .action-cards  { grid-template-columns: repeat(2, 1fr); }
    .stats-grid    { gap: 30px; }
    .team-grid     { grid-template-columns: repeat(2, 1fr); }
}

/* ==============================================
   RESPONSIVE — MOBILE ≤ 768px
   ============================================== */
@media (max-width: 768px) {

    /* Hero отступ под фиксированный мобайл-хедер */
    .hero { margin-top: 195px; }

    /* --- Строка 1: бургер + лупа + языки --- */
    .header-top { padding: 8px 0; border-bottom: 1px solid #e8e8e8; }

    .header-actions { gap: 12px; }

    .mobile-burger {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 22px;
        height: 16px;
        cursor: pointer;
        flex-shrink: 0;
    }
    .mobile-burger span {
        height: 2px;
        background: #1b4c83;
        border-radius: 2px;
        transition: 0.3s;
    }
    .mobile-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .mobile-burger.open span:nth-child(2) { opacity: 0; }
    .mobile-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

    .header-search-icon {
        display: block;
        width: 20px;
        height: 20px;
    }

    .header-languages {
        margin-left: auto;
        gap: 10px;
    }
    .lang-link { font-size: 13px; font-weight: 600; }

    .desktop-only { display: none !important; }
    .header-phone { display: none !important; }

    /* --- Строка 2: название + логотип --- */
    .header-main { padding: 10px 0; }
    .site-title h1 {
        font-size: 14px;
        max-width: 55%;
        line-height: 1.3;
    }
    .logo img { height: 40px; }

    /* --- Строка 3: кнопки --- */
    .mobile-action-bar {
        display: flex;
        border-top: 1px solid #e8e8e8;
        border-bottom: 1px solid #e8e8e8;
    }
    .mob-action-btn {
        flex: 1;
        text-align: center;
        padding: 10px 8px;
        font-size: 13px;
        font-weight: 600;
    }
    .mob-btn-blue { color: #1b4c83; border-right: 1px solid #e8e8e8; }
    .mob-btn-red  { color: #b81f35; }

    /* --- Строка 4: right-sidebar горизонтально, только иконки --- */
    .right-sidebar {
        position: static !important;
        width: 100% !important;
        height: auto !important;
        background: #f5f7fa !important;
        backdrop-filter: none !important;
        flex-direction: row !important;
        justify-content: space-around !important;
        gap: 0 !important;
        padding: 6px 4px !important;
        border-bottom: 1px solid #dde2e8;
        z-index: auto !important;
        top: auto !important;
        right: auto !important;
    }
    .right-sidebar .sidebar-item {
        width: auto !important;
        height: auto !important;
        flex: 1;
        justify-content: center !important;
        padding: 6px 0 !important;
        gap: 0 !important;
        background: transparent !important;
        backdrop-filter: none !important;
    }
    .right-sidebar .sidebar-item img {
        width: 26px !important;
        height: 26px !important;
    }
    .right-sidebar .sidebar-item span,
    .right-sidebar.collapsed .sidebar-item span {
        display: none !important;
    }
    /* collapsed от JS-скрипта игнорируем на мобайле */
    .right-sidebar.collapsed .sidebar-item {
        width: auto !important;
        padding: 6px 0 !important;
        justify-content: center !important;
    }

    /* --- NAV — выезжает слева --- */
    .main-nav {
        position: fixed !important;
        top: 0;
        left: -100%;
        width: 82%;
        max-width: 300px;
        height: 100vh;
        background: #fff;
        z-index: 9999;
        overflow-y: auto;
        transition: left 0.3s ease;
        padding-top: 56px;
        box-shadow: 3px 0 20px rgba(0,0,0,0.15);
    }
    .main-nav.active { left: 0; }

    /* Кнопка закрытия */
    .nav-close {
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: 12px;
        right: 14px;
        width: 34px;
        height: 34px;
        background: none;
        border: none;
        font-size: 20px;
        color: #1b4c83;
        cursor: pointer;
        z-index: 10000;
    }
    .nav-close:hover { color: #b81f35; }
    .main-nav .container { padding: 0; }

    .nav-menu { flex-direction: column; height: auto; }
    .nav-item { border-bottom: 1px solid #eee; }
    .nav-item > a {
        color: #1b4c83 !important;
        font-size: 15px;
        padding: 14px 20px;
        line-height: 1.4;
        background: transparent !important;
    }
    .nav-item:hover > a { background: #f0f4f9 !important; }

    .dropdown {
        position: static !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        box-shadow: none !important;
        background: #f7f9fc;
        padding: 0;
    }
    .dropdown li { border-bottom: 1px solid #e8e8e8; }
    .dropdown li:last-child { border-bottom: none; }
    .dropdown a {
        padding: 10px 30px !important;
        font-size: 14px;
        color: #444 !important;
    }
    .dropdown a:hover {
        background: #edf1f7 !important;
        padding-left: 35px !important;
        color: #1b4c83 !important;
    }

    /* --- Прочие секции --- */
    .action-cards  { grid-template-columns: 1fr; }
    .stats-grid    { grid-template-columns: 1fr; gap: 40px; }
    .team-grid     { grid-template-columns: 1fr; }
    .team-title    { text-align: center; }
    .team-intro    { text-align: center; margin: 0 auto 30px; }
    .team-container { padding: 0 16px; }

    .footer-bar    { flex-direction: column; height: auto; }
    .footer-links  { padding: 16px 20px; flex-wrap: wrap; gap: 6px; }
    .footer-actions { height: 56px; }
    .footer-feedback { padding: 0 24px; font-size: 14px; }
}