/* --- Сброс стилей --- */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* --- Основные стили --- */
html { scroll-behavior: smooth; }

body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    color: #d1d5db;
    background-color: #111827;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container { max-width: 1240px; margin: 0 auto; padding: 0 20px; }

/* --- Хедер --- */
.header {
    background: #111827;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 1rem 0;
    position: fixed;
    top: 0; width: 100%; z-index: 1000;
    border-bottom: 1px solid rgba(55, 65, 81, 0.5);
}

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

.logo-image { display: block; height: 40px; width: auto; }

.nav { display: flex; gap: 2.5rem; }

.nav-link {
    color: #d1d5db; text-decoration: none; font-weight: 500; transition: color 0.3s ease;
    position: relative; padding-bottom: 6px;
}
.nav-link::after {
    content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background-color: #3b82f6; transition: width 0.3s ease-in-out;
}
.nav-link:hover { color: #fff; }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }
.nav-link.active { color: #fff; font-weight: 600; }

.btn-primary {
    background: transparent; color: #3b82f6; padding: 0.65rem 1.5rem; text-decoration: none;
    border: 1px solid #3b82f6; border-radius: 8px; font-weight: 600; transition: all 0.3s ease;
    display: inline-flex; align-items: center; height: 40px; line-height: 1;
}
.btn-primary:hover { background: #3b82f6; color: #fff; transform: translateY(-2px); box-shadow: 0 4px 15px rgba(59,130,246,0.2); }

/* --- Переключатель языка --- */
.header-actions { display: flex; align-items: center; gap: 1rem; }
.lang-switch { display: inline-flex; align-items: center; gap: 0.5rem; border: 1px solid #374151; border-radius: 8px; padding: 2px; background: #111827; height: 40px; white-space: nowrap; }
.lang-item { color: #9ca3af; text-decoration: none; padding: 6px 10px; border-radius: 6px; font-weight: 600; font-size: 0.9rem; display: inline-flex; align-items: center; }
.lang-item:hover { color: #fff; background: #1f2937; }
.lang-item.active { color: #fff; background: #2563eb; }

/* --- Бургер --- */
.burger { display: none; width: 44px; height: 40px; border: 1px solid #374151; border-radius: 8px; background: transparent; align-items: center; justify-content: center; cursor: pointer; flex-direction: column; }
.burger span { display: block; width: 22px; height: 2px; background: #d1d5db; margin: 4px 0; transition: transform 0.3s ease, opacity 0.3s ease; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* --- Мобильное меню --- */
.mobile-menu { position: fixed; inset: 0; z-index: 1500; background: rgba(17,24,39,0.96); display: none; }
.mobile-menu.open { display: block; }
.mobile-menu-content { padding: 80px 20px 24px; max-width: 1240px; margin: 0 auto; }
.mobile-nav { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 1.25rem; }
.mobile-link { color: #d1d5db; text-decoration: none; font-size: 1.125rem; font-weight: 600; }
.mobile-link:hover { color: #fff; }
.mobile-actions { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.mobile-actions .btn-cta { background: #fff; color: #1e3a8a; padding: 0.8rem 1.2rem; border: 2px solid #fff; border-radius: 8px; font-weight: 700; }
.mobile-actions .lang-switch { height: auto; }

body.menu-open { overflow: hidden; }

/* --- Главный экран (Hero) --- */
.hero {
    background: radial-gradient(ellipse at 50% 30%, #1f2937 0%, #7390cb 70%);
    color: white; padding-top: 140px; padding-bottom: 100px; text-align: center; min-height: 100vh;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    position: relative; overflow: hidden; border-radius: 16px; margin: 20px;
}
.hero-content { width: 100%; position: relative; z-index: 2; }
.hero-title {
    font-size: 4.5rem; font-weight: 800; margin-bottom: 1.5rem; letter-spacing: -0.04em;
    background: linear-gradient(45deg, #60a5fa, #93c5fd);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-subtitle { font-size: 1.5rem; margin-bottom: 3.5rem; color: #9ca3af; max-width: 800px; margin-left: auto; margin-right: auto; line-height: 1.7; }

/* Видео-фон в hero */
.hero-bg-video {
    position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: cover; opacity: 0.5; z-index: 0; pointer-events: none;
}

/* Затемняющая подложка поверх видео, но под контентом */
.hero::before{
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(rgba(17,24,39,0.55), rgba(17,24,39,0.55));
    z-index: 1; pointer-events: none; border-radius: inherit;
}

/* --- Карточки (Общий стиль) --- */
.stats, .values-grid, .companies-grid, .projects-grid, .news-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.75rem; }
.stat-item, .value-card, .company-card, .project-card, .news-card {
    background: #1f2937; border: 1px solid #374151; border-radius: 12px; transition: all 0.3s ease-in-out; position: relative; overflow: hidden;
}
.stat-item:hover, .value-card:hover, .company-card:hover, .project-card:hover, .news-card:hover {
    transform: translateY(-8px); border-color: #3b82f6; box-shadow: 0 10px 25px -5px rgba(59,130,246,0.1), 0 4px 6px -2px rgba(59,130,246,0.05);
}

/* --- Статистика --- */
.stat-item { padding: 2rem; text-align: center; width: 280px; flex: 0 0 280px; }
.stat-number { font-size: 3.5rem; font-weight: 700; color: #3b82f6; margin-bottom: 0.5rem; }
.stat-text { font-size: 1rem; color: #9ca3af; }

/* --- Секции --- */
section { padding: 90px 0; background: #111827; }
section:nth-of-type(odd) { background: #1f2937; }
#hero, #cta, #contacts { background: #111827; } 
.section-title { font-size: 2.75rem; font-weight: 700; text-align: center; margin-bottom: 3.5rem; color: #fff; letter-spacing: -0.02em; }
.section-title .accent { color: #3b82f6; }

/* --- О компании --- */
.about-text { font-size: 1.3rem; text-align: center; max-width: 800px; margin: 0 auto; line-height: 1.8; color: #d1d5db; }

/* --- Ценности --- */
.value-card { padding: 2.5rem; text-align: center; width: 280px; flex: 0 0 280px; }
.value-icon { font-size: 3rem; margin-bottom: 1.5rem; line-height: 1; }
.value-card h3 { font-size: 1.5rem; font-weight: 600; margin-bottom: 0.5rem; color: #fff; }
.value-card p { color: #9ca3af; font-size: 1.1rem; }

/* --- Компании холдинга (центрирование последней строки) --- */
.companies-grid{
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.75rem;
}
.company-card { 
    padding: 2rem; 
    text-align: center; 
    width: 280px;
    flex: 0 0 280px;
}
.company-card h3 { font-size: 1.3rem; font-weight: 600; margin-bottom: 0.5rem; color: #fff; }
.company-card p { color: #d6ddea; font-size: 1rem; font-weight: 500; }
.company-logo { width: 100%; max-height: 120px; object-fit: contain; margin-bottom: 1rem; }

/* --- Социальные проекты (центрирование последней строки) --- */
.projects-grid{
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.75rem;
}
.project-card { 
    padding: 2.5rem; 
    display: flex; 
    flex-direction: column; 
    min-height: 250px; 
    width: 280px; 
    flex: 0 0 280px;
}
.project-card h3 { font-size: 1.4rem; font-weight: 600; margin-bottom: 1rem; color: #fff; }
.project-card p { color: #d1d5db; margin-bottom: 1.5rem; line-height: 1.6; flex-grow: 1; }
.project-link { color: #3b82f6; text-decoration: none; font-weight: 600; transition: color 0.3s ease; }
.project-link:hover { color: #60a5fa; }

/* --- Новости --- */
.news-card { overflow: hidden; cursor: pointer; padding: 0; display: flex; flex-direction: column; width: 280px; flex: 0 0 280px; }
.news-image { width: 100%; height: 220px; object-fit: cover; transition: transform 0.4s ease-in-out; }
.news-card:hover .news-image { transform: scale(1.05); }
.news-content { padding: 1.75rem; position: relative; z-index: 2; flex-grow: 1; }
.news-title { font-size: 1.25rem; font-weight: 600; margin-bottom: 0.75rem; color: #fff; line-height: 1.4; }
.news-date { color: #9ca3af; font-size: 0.9rem; }

/* --- CTA --- */
.cta { background: linear-gradient(45deg, #1e3a8a, #3b82f6); color: white; text-align: center; position: relative; overflow: hidden; }
.cta-content h2 { font-size: 2.5rem; font-weight: 700; margin-bottom: 2.5rem; max-width: 800px; margin-left: auto; margin-right: auto; }
.btn-cta { background: #fff; color: #1e3a8a; padding: 1rem 2.5rem; text-decoration: none; border: 2px solid #fff; border-radius: 8px; font-size: 1.1rem; font-weight: 700; transition: all 0.3s ease; display: inline-block; position: relative; }
.btn-cta:hover { background: transparent; color: #fff; transform: translateY(-3px); box-shadow: 0 10px 25px rgba(255,255,255,0.1); }

/* --- Контакты --- */
.contacts-content { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 3rem; align-items: start; max-width: 900px; margin: 0 auto; }
.contact-item { margin-bottom: 1.25rem; font-size: 1.1rem; color: #d1d5db; }
.contact-item strong { color: #fff; font-weight: 500; }

/* --- Модальное окно --- */
.modal { display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.8); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); overflow-y: auto; }
.modal-content { background-color: #1f2937; margin: 5% auto; padding: 2.5rem; border-radius: 12px; width: 90%; max-width: 700px; position: relative; border: 1px solid #374151; box-shadow: 0 10px 30px rgba(0,0,0,0.3); max-height: 85vh; overflow-y: auto; }
.close { color: #aaa; position: absolute; top: 1.5rem; right: 1.5rem; font-size: 28px; font-weight: bold; cursor: pointer; transition: color 0.3s ease; }
.close:hover { color: #3b82f6; }
.news-modal-content { line-height: 1.8; }
.news-modal-title { font-size: 2rem; font-weight: 700; color: #fff; margin-bottom: 1rem; line-height: 1.3; }
.news-modal-date { color: #9ca3af; font-size: 0.9rem; margin-bottom: 1.5rem; }
.news-modal-image { margin-bottom: 2rem; }
.news-modal-image img { width: 100%; max-height: 400px; object-fit: cover; border-radius: 10px; }
.news-modal-text { font-size: 1.1rem; color: #d1d5db; }
.news-modal-text p { margin-bottom: 1rem; }
.news-modal-text img { max-width: 100%; height: auto; border-radius: 8px; margin: 1rem 0; }

/* --- Анимация появления --- */
.reveal-on-scroll { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
.reveal-on-scroll.revealed { opacity: 1; transform: translateY(0); }

/* --- Адаптивность --- */
@media (max-width: 992px) {
    .nav { gap: 1.5rem; }
    .hero-title { font-size: 3.5rem; }
    .hero-subtitle { font-size: 1.25rem; }
}

@media (max-width: 768px) {
    .header { padding: 0.75rem 0; }
    .header-content { flex-direction: row; gap: 1rem; }
    .nav { display: none; }
    .nav-link { padding: 0.25rem 0.5rem; }
    .btn-primary { display: none; }
    .header-actions { display: none; }
    .burger { display: inline-flex; }
    .lang-switch { padding: 2px; }
    .lang-item { padding: 4px 8px; font-size: 0.85rem; }
    .hero { padding-top: 180px; min-height: 70vh; margin: 12px; }
    .hero-bg-video { top: 0; left: 0; right: 0; bottom: auto; height: 420px; }
    .hero::before { top: 0; left: 0; right: 0; height: 420px; }
    .hero-title { font-size: 2.5rem; }
    .hero-subtitle { font-size: 1.1rem; }
    .stats { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
    .stat-item { padding: 1.5rem; }
    .section-title { font-size: 2rem; }
    .contacts-content { grid-template-columns: 1fr; gap: 2rem; }
    .social-links { flex-direction: row; justify-content: center; }
    .foot-socio { gap: 1rem; }
    .foot-socio a { width: 40px; height: 40px; }
    .modal-content { margin: 10% auto; width: 95%; padding: 1.5rem; max-height: 80vh; }
    .news-modal-title { font-size: 1.5rem; }
}

@media (max-width: 480px) {
    body { line-height: 1.5; }
    .hero { padding-top: 160px; padding-bottom: 60px; margin: 8px; }
    .hero-bg-video { height: 340px; top: 0; left: 0; right: 0; bottom: auto; }
    .hero::before { height: 340px; top: 0; left: 0; right: 0; }
    .hero-title { font-size: 2.25rem; }

    /* карточки уже на флексе — задаём компактную ширину */
    .stats .stat-item, .values-grid .value-card, .news-grid .news-card { width: 260px; flex: 0 0 260px; }

    /* слегка уменьшаем базовую ширину карточек для центровки на узких экранах */
    .companies-grid{
        grid-template-columns: repeat(auto-fit, minmax(260px, 260px));
    }
    .company-card{ width: 260px; }

    .projects-grid{
        grid-template-columns: repeat(auto-fit, minmax(260px, 260px));
    }
    .project-card{ width: 260px; }

    .cta-content h2 { font-size: 1.8rem; }
    .btn-cta { padding: 0.8rem 1.5rem; font-size: 1rem; }
    .social-links { flex-direction: column; align-items: center; }
    .social-link { width: 100%; max-width: 300px; text-align: center; }
}
