/* ===== Базовые переменные и сброс ===== */
:root {
    --primary: #0056b3;
    --secondary: #0d3059;
    --bg: #f5f7fa;
    --text: #1a1a1a;
    --light: #ffffff;
    --video-bg: #0d1b2e;
    --youtube: #ff0000;
    --rutube: #ff4422;
    --dzen: #000000;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; height: auto; }
.container { max-width: 1000px; margin: 0 auto; padding: 0 20px; }

/* ===== Шапка ===== */
header {
    background: var(--light);
    padding: 1rem 0;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 1000;
}
nav { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.header-logo-wrap { display: flex; align-items: center; gap: 12px; }
.header-logo { height: 40px; width: auto; max-width: 180px; object-fit: contain; }
.logo-text { font-weight: 700; font-size: 1.25rem; color: var(--secondary); white-space: nowrap; }

.nav-links { display: flex; flex-wrap: wrap; gap: 4px 0; }
.nav-links li { display: inline-block; margin-left: 22px; }
.nav-links a { display: inline-block; padding: 4px 0; }
.nav-links a:hover,
.nav-links a.active { color: var(--primary); }
/* ===== Подменю «Применение» ===== */
.nav-links li.has-children {
    position: relative;
}
.nav-links .nav-item-row {
    display: flex;
    align-items: center;
    gap: 4px;
}
.nav-links .submenu-toggle {
    background: #eef4fb;
    border: none;
    cursor: pointer;
    color: var(--primary);
    padding: 8px 10px;
    line-height: 1;
    border-radius: 6px;
    min-width: 40px;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
}
.nav-links .submenu-toggle:hover {
    background: #d9e8fa;
}
.nav-links .submenu-toggle:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}
.nav-links .submenu-toggle[aria-expanded="true"] .submenu-arrow {
    transform: rotate(180deg);
}
.nav-links .submenu-arrow {
    display: block;
    transition: transform 0.2s;
}
.nav-links .submenu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: var(--light);
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
    z-index: 100;
}
.nav-links .submenu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.nav-links .submenu li {
    margin: 0;
    display: block;
}
.nav-links .submenu a {
    display: block;
    padding: 10px 20px;
    color: var(--text);
    font-size: 0.95rem;
}
.nav-links .submenu a:hover,
.nav-links .submenu a.active {
    background: #f0f4fa;
    color: var(--primary);
}

/* Мобильная версия подменю — всегда раскрыто, без кнопки */
@media (max-width: 768px) {
    .nav-links .has-children {
        width: 100%;
    }
    .nav-links .nav-item-row {
        justify-content: center;
    }
    /* Кнопку-стрелку скрываем — она не нужна */
    .nav-links .submenu-toggle {
        display: none;
    }
    /* Подменю показываем всегда, как обычный список */
    .nav-links .submenu {
        display: block;
        position: static;
        box-shadow: none;
        border: none;
        border-radius: 0;
        background: transparent;
        padding: 0;
        min-width: 0;
        opacity: 1;
        visibility: visible;
        transform: none;
    }
    .nav-links .submenu a {
        display: block;
        padding: 8px 20px;
        font-size: 0.9rem;
        color: #555;
    }
    .nav-links .submenu a:hover,
    .nav-links .submenu a.active {
        color: var(--primary);
    }
    .nav-links .submenu li {
        padding-left: 1.5rem;
    }
}

/* Бургер — по умолчанию скрыт */
.burger {
    display: none;
    background: none;
    border: none;
    font-size: 1.7rem;
    color: var(--secondary);
    cursor: pointer;
    line-height: 1;
    padding: 4px 8px;
}

/* ===== Общие заголовки и текст ===== */
main { padding: 3rem 0; }
h1, h2 { color: var(--secondary); margin-bottom: 1.2rem; }
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
p { margin-bottom: 1rem; }

/* ===== Кнопки ===== */
.btn {
    display: inline-block;
    background: var(--primary);
    color: var(--light);
    padding: 14px 32px;
    border-radius: 6px;
    font-weight: 600;
    transition: background 0.2s, transform 0.2s;
    border: none;
    cursor: pointer;
}
.btn:hover { background: #004490; transform: translateY(-2px); }

/* ===== Hero (главная) ===== */
.hero {
    background: linear-gradient(rgba(13, 48, 89, 0.8), rgba(13, 48, 89, 0.7)),
                url('../pic/b4511d9c3bdc11f1a5dbfe325420a60a_1.jpeg') no-repeat center/cover;
    color: var(--light);
    padding: 6rem 0;
    text-align: center;
}
.hero h1 { font-size: 2.8rem; margin-bottom: 1rem; color: var(--light); }
.hero p { font-size: 1.25rem; max-width: 700px; margin: 0 auto 2rem; }

/* ===== Features (главная) ===== */
.features { padding: 4rem 0; }
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
}
.feature-card {
    background: var(--light);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    text-align: center;
}
.feature-card h3 { margin-bottom: 0.8rem; color: var(--secondary); }

/* ===== Технология ===== */
.tech-illustration {
    width: 100%;
    max-width: 600px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    display: block;
    margin: 2rem auto 3rem;
}
.principles {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}
.principle-item h3 { color: var(--secondary); margin-bottom: 0.5rem; }

/* ===== Применение ===== */
.app-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}
.app-card {
    background: var(--light);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
}
.app-card h3 { color: var(--secondary); margin-bottom: 0.8rem; }
.card-text { flex: 1; }
.card-image { margin-top: 1.5rem; }
.card-image img { width: 100%; border-radius: 8px; display: block; }

/* ===== О нас: документы ===== */
.about-text { max-width: 780px; margin-bottom: 3rem; }
.about-text p { font-size: 1.05rem; margin-bottom: 1.2rem; }

.docs-title { margin-bottom: 1.5rem; }
.docs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}
.doc-card {
    background: var(--light);
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}
.doc-card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,0.1); }
.doc-img {
    width: 100%;
    border-radius: 4px;
    display: block;
    cursor: zoom-in;
    border: 1px solid #eaeaea;
}
.doc-card figcaption {
    margin-top: 0.8rem;
    font-weight: 600;
    color: var(--secondary);
    font-size: 0.95rem;
}

/* Модальное окно */
.doc-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    z-index: 2000;
    padding: 20px;
    align-items: center;
    justify-content: center;
}
.doc-modal.open { display: flex; }
.doc-modal img { max-width: 100%; max-height: 90vh; border-radius: 6px; box-shadow: 0 10px 40px rgba(0,0,0,0.5); }
.doc-modal .close-btn {
    position: absolute;
    top: 20px;
    right: 25px;
    color: #fff;
    font-size: 2rem;
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
}

/* ===== Пресса ===== */
.page-intro { max-width: 760px; margin-bottom: 3rem; font-size: 1.05rem; }

.press-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 4rem;
}
.press-card {
    background: var(--light);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
    border-left: 4px solid var(--primary);
}
.press-card:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(0,0,0,0.1); }
.press-meta {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.6rem;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
}
.press-source { font-weight: 600; color: var(--primary); }
.press-card h3 { font-size: 1.15rem; color: var(--secondary); margin-bottom: 0.6rem; line-height: 1.35; }
.press-card p { font-size: 0.95rem; color: #444; flex-grow: 1; }
.press-link { margin-top: 1rem; font-weight: 600; color: var(--primary); align-self: flex-start; }
.press-link:hover { text-decoration: underline; }

/* Видео */
.video-section-title { display: flex; align-items: center; gap: 10px; }
.video-section-title::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 26px;
    background: var(--primary);
    border-radius: 3px;
}
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 4rem;
}
.video-card {
    background: var(--video-bg);
    color: #fff;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
}
.video-card:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(0,0,0,0.25); }
.video-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #1a2b45;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.video-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.play-btn { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.play-btn svg {
    width: 56px;
    height: 56px;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5));
    transition: transform 0.2s;
}
.video-card:hover .play-btn svg { transform: scale(1.12); }
.video-body { padding: 1rem 1.2rem 1.3rem; display: flex; flex-direction: column; flex-grow: 1; }
.platform-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: 20px;
    color: #fff;
    align-self: flex-start;
    margin-bottom: 0.7rem;
}
.platform-tag.youtube { background: var(--youtube); }
.platform-tag.rutube  { background: var(--rutube); }
.platform-tag.dzen    { background: var(--dzen); }
.video-card h3 { font-size: 1.05rem; line-height: 1.35; margin-bottom: 0.5rem; color: #fff; }
.video-card .video-date { font-size: 0.8rem; color: #9db2cc; margin-bottom: 0.8rem; }
.video-link { margin-top: auto; font-weight: 600; font-size: 0.9rem; color: #6fb0ff; align-self: flex-start; }
.video-card:hover .video-link { text-decoration: underline; }

/* CTA внизу */
.press-cta {
    background: var(--light);
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    margin-bottom: 2rem;
}
.press-cta h2 { margin-bottom: 0.6rem; }
.press-cta p { margin-bottom: 1.2rem; color: #555; }

/* ===== Контакты ===== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
}
.contact-info p { font-size: 1.1rem; }
.contact-info strong { display: block; margin-bottom: 0.4rem; }

/* ===== Форма page1 ===== */
.form-wrapper {
    background: var(--light);
    padding: 3rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    text-align: center;
    margin-top: 2rem;
}

/* ===== Подвал ===== */
footer {
    background: #eef1f5;
    color: #444;
    padding: 3rem 0;
    text-align: center;
    font-size: 0.9rem;
    border-top: 1px solid #e0e0e0;
}
footer p { margin-bottom: 0.4rem; }

footer .badges-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1.5rem 2.5rem;
    margin: 1.5rem 0 2rem;
}

footer .badge-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

footer .badge-item img {
    height: 55px;
    width: auto;
    max-width: 150px;
    object-fit: contain;
    background: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    display: block;
}

footer .badge-label {
    font-size: 0.75rem;
    color: #666;
    text-align: center;
    line-height: 1.3;
    max-width: 150px;
}
footer .footer-links {
    margin-bottom: 1.5rem;
}

footer .footer-links a {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.2s;
}

footer .footer-links a:hover {
    text-decoration: underline;
}

/* ===== Адаптив ===== */
@media (max-width: 900px) {
    .app-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    h1 { font-size: 1.6rem; }
    .hero { padding: 4rem 0; }
    .hero h1 { font-size: 1.9rem; }
    .hero p { font-size: 1.05rem; }
    .app-grid { grid-template-columns: 1fr; }
    .principles { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; gap: 2rem; }

    /* Бургер-меню с анимацией */
    .burger { display: block; }
    nav { flex-wrap: wrap; }

    .nav-links {
        display: flex;
        flex-direction: column;
        width: 100%;
        text-align: center;
        padding-top: 12px;
        border-top: 1px solid #e0e0e0;
        margin-top: 12px;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    .nav-links.open {
        max-height: 1000px;
    }
    .nav-links li { margin: 6px 0; }
    .logo-text { font-size: 1.05rem; }
}

@media (max-width: 600px) {
    .docs-grid,
    .press-grid,
    .video-grid { grid-template-columns: 1fr; }
    .form-wrapper { padding: 2rem 1rem; }
}

/* ===== Раздел Инвесторам ===== */
.investors-hero {
    background: linear-gradient(rgba(13, 48, 89, 0.75), rgba(13, 48, 89, 0.65)),
                url('../pic/investors-hero.jpg') no-repeat center/cover;
    color: var(--light);
    padding: 4rem 0;
    text-align: center;
    border-radius: 10px;
    margin-bottom: 2.5rem;
}
.investors-hero h1 { color: var(--light); margin-bottom: 0.8rem; }
.investors-hero p { max-width: 720px; margin: 0 auto; font-size: 1.1rem; }

.investors-content {
    max-width: 820px;
    margin: 0 auto 3rem;
}
.investors-content h2 { margin-top: 2.5rem; }
.investors-content h2:first-child { margin-top: 0; }
.investors-content p { font-size: 1.05rem; }
.investors-content ul { margin: 0 0 1.2rem 1.2rem; list-style: disc; }
.investors-content ul li { margin-bottom: 0.4rem; }

.investors-photo {
    margin: 2rem 0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}
.investors-photo img { display: block; width: 100%; }
.investors-photo figcaption {
    padding: 0.8rem 1rem;
    background: var(--light);
    font-size: 0.9rem;
    color: #555;
    text-align: center;
}

/* Видео, загруженное на сайт */
.investors-video {
    margin: 2rem 0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    background: #000;
}
.investors-video video { width: 100%; display: block; }
.investors-video figcaption {
    padding: 0.8rem 1rem;
    background: var(--light);
    font-size: 0.9rem;
    color: #555;
    text-align: center;
}

/* Встроенное видео с внешней платформы (RuTube и т.п.) */
.investors-embed-block {
    margin: 2rem 0;
}
.investors-embed {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    background: #000;
}
.investors-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}
.investors-embed-caption {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 0.8rem 1rem;
    background: var(--light);
    font-size: 0.9rem;
    color: #555;
    border-radius: 0 0 10px 10px;
}
.investors-embed-caption .external-link {
    font-weight: 600;
    color: var(--primary);
    white-space: nowrap;
}
.investors-embed-caption .external-link:hover { text-decoration: underline; }

/* Навигация Назад / Далее */
.investors-nav {
    max-width: 820px;
    margin: 3rem auto 1rem;
    padding-top: 2rem;
    border-top: 1px solid #e0e0e0;
}
.investors-progress {
    text-align: center;
    font-size: 0.85rem;
    color: #777;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.2rem;
}
.investors-nav-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.btn-secondary {
    background: transparent;
    color: var(--secondary);
    border: 2px solid var(--secondary);
    padding: 12px 28px;
}
.btn-secondary:hover {
    background: var(--secondary);
    color: var(--light);
}
.btn-disabled {
    opacity: 0.35;
    pointer-events: none;
    cursor: default;
    border-color: #bbb;
    color: #999;
}
.btn-disabled:hover {
    background: transparent;
    color: #999;
    transform: none;
}

/* Анонс «История и команда» на странице О нас */
.team-story-teaser {
    background: var(--light);
    padding: 1.8rem 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    margin-bottom: 3rem;
    max-width: 820px;
}
.team-story-teaser h2 {
    margin-top: 0;
    margin-bottom: 0.8rem;
}
.team-story-teaser p {
    color: #444;
    margin-bottom: 1.2rem;
}

@media (max-width: 600px) {
    .investors-nav-buttons { flex-direction: column; }
    .investors-nav-buttons .btn { width: 100%; text-align: center; }
    .investors-hero { padding: 3rem 1rem; }
    .investors-embed-caption { flex-direction: column; align-items: flex-start; }
}
/* ===== Страница «Биомедицинское применение» ===== */
.note-block {
    background: #eef4fb;
    border-left: 4px solid var(--primary);
    padding: 1.5rem 1.8rem;
    border-radius: 0 8px 8px 0;
    margin: 1.5rem 0 2rem;
}
.note-block p {
    margin-bottom: 0.8rem;
    font-size: 1rem;
    color: #333;
}
.note-block p:last-child {
    margin-bottom: 0;
}

.medicine-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e0e0e0;
}
.medicine-cta .btn {
    margin: 0;
}

/* ===== Карта на странице контактов ===== */
.map-wrapper {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: 0 auto 2rem;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    background: #eef1f5;
}

.map-wrapper iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

@media (max-width: 600px) {
    .map-wrapper {
        aspect-ratio: 4 / 3;
        border-radius: 8px;
    }
}
/* ===== Блок перекрёстной ссылки ===== */
.cross-link {
    background: var(--light);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    border-left: 4px solid var(--primary);
    max-width: 820px;
    margin: 0 auto;
}
.cross-link h3 {
    color: var(--secondary);
    margin-bottom: 0.8rem;
    font-size: 1.2rem;
}
.cross-link p {
    margin-bottom: 1rem;
    color: #444;
}
.cross-link a {
    font-weight: 600;
    color: var(--primary);
}
.cross-link a:hover {
    text-decoration: underline;
}