/* Local copies of Google Fonts used by the approved mockup. */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url('../fonts/inter-cyrillic.woff2') format('woff2');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url('../fonts/inter-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 700 900;
    font-display: swap;
    src: url('../fonts/montserrat-cyrillic.woff2') format('woff2');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 700 900;
    font-display: swap;
    src: url('../fonts/montserrat-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Современные CSS-переменные */
        html {
            scroll-padding-top: 130px;
        }
        @media (max-width: 768px) {
            html { scroll-padding-top: 0; }
        }
        :root {
            --primary-navy: #08205A;
            --primary-dark: #05112E;
            --accent-red: #C0001D;
            --bg-body: #F1F4F8;
            --bg-white: #FFFFFF;
            --text-main: #1E293B;
            --text-muted: #64748B;
            --shadow-soft: 0 20px 40px rgba(13, 44, 107, 0.08);
            --shadow-hover: 0 30px 60px rgba(13, 44, 107, 0.15);
            --transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        html, body { 
            scroll-behavior: smooth; 
            overflow-x: hidden;
            width: 100%;
        }

        body {
            font-family: 'Inter', sans-serif;
            color: var(--text-main);
            background-color: var(--bg-body);
            line-height: 1.7;
        }

        h1, h2, h3, h4 {
            font-family: 'Montserrat', sans-serif;
            color: var(--primary-navy);
            line-height: 1.2;
        }

        a { text-decoration: none; color: inherit; }

        section { padding: 120px 10%; }

        .reveal {
            opacity: 0;
            transform: translateY(40px);
            transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
        }
        .reveal.active {
            opacity: 1;
            transform: translateY(0);
        }

        @keyframes fadeUpOnLoad {
            0% { opacity: 0; transform: translateY(30px); }
            100% { opacity: 1; transform: translateY(0); }
        }

        .btn {
            display: inline-flex; align-items: center; justify-content: center;
            background-color: var(--accent-red); color: var(--bg-white);
            padding: 18px 40px; font-weight: 600; font-size: 16px;
            border-radius: 4px; text-transform: uppercase; letter-spacing: 1px;
            border: none; cursor: pointer; transition: var(--transition);
            position: relative; overflow: hidden; z-index: 1;
        }

        .btn::after {
            content: ''; position: absolute; top: -50%; left: -50%;
            width: 200%; height: 200%; background: rgba(255, 255, 255, 0.15);
            transform: rotate(45deg) translateY(-100%); transition: all 0.6s ease; z-index: -1;
        }

        .btn:hover::after { transform: rotate(45deg) translateY(100%); }
        .btn:hover { background-color: #A00018; transform: translateY(-3px); box-shadow: 0 15px 25px rgba(192, 0, 29, 0.3); }

        /* Шапка */
        header {
            position: fixed; top: 0; width: 100%; background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
            display: flex; justify-content: space-between; align-items: center;
            padding: 15px 10%; z-index: 1000; border-bottom: 1px solid rgba(13, 44, 107, 0.05);
            box-shadow: 0 4px 20px rgba(0,0,0,0.03);
        }

        .logo { font-family: 'Montserrat', sans-serif; font-weight: 900; font-size: 24px; color: var(--primary-navy); letter-spacing: -0.5px; line-height: 1; }
        .logo-img { }
        .logo span { color: var(--accent-red); }
        .logo small { display: block; font-family: 'Inter', sans-serif; font-size: 10px; color: var(--text-muted); font-weight: 500; letter-spacing: 0.5px; margin-top: 4px; }

        nav ul { display: flex; list-style: none; gap: 16px 22px; flex-wrap: wrap; justify-content: center; align-items: center; }
        nav a { font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: 0.4px; position: relative; padding-bottom: 5px; color: var(--text-main); transition: color 0.3s ease; white-space: nowrap; }
        nav a::after { content: ''; position: absolute; width: 0; height: 2px; bottom: 0; left: 0; background-color: var(--accent-red); transition: var(--transition); }
        nav a:hover, nav a.active { color: var(--accent-red); }
        nav a:hover::after, nav a.active::after { width: 100%; }

        .header-contacts {
            display: flex;
            flex: 0 0 176px;
            min-width: 176px;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            text-align: center;
            font-size: 12px;
            color: var(--text-muted);
            line-height: 1.2;
        }
        .header-contacts strong {
            display: block;
            width: 100%;
            margin: 0;
            font-size: 16px;
            line-height: 1.2;
            color: var(--primary-navy);
            font-weight: 900;
            text-align: center;
            white-space: nowrap;
        }


        /* Правки шапки и блока лабораторий */
        .header-qr {
            margin-left: 18px;
            transform: translateX(42px);
            flex: 0 0 96px;
        }
        .labs-grid .lab-card:last-child h4 {
            white-space: nowrap;
            font-size: inherit;
            letter-spacing: normal;
        }
        @media (max-width: 1400px) {
            .header-qr { transform: translateX(18px); margin-left: 8px; }
            .labs-grid .lab-card:last-child h4 { font-size: 13px; }
        }
        @media (max-width: 1100px) {
            .header-qr { transform: none; margin-left: 0; }
            .labs-grid .lab-card:last-child h4 { white-space: normal; }
        }

        /* ========================================================
           ФОН: base64 встроен напрямую — работает везде без интернета
           ======================================================== */
        .hero {
            min-height: 100vh;
            display: flex; align-items: center; padding: 0 10%; 
            position: relative;
            background-color: var(--primary-dark);
            background-image:
                linear-gradient(to right, rgba(13, 44, 107, 0.6) 0%, rgba(8, 26, 64, 0.9) 100%),
                url('../img/design-01-d966212e88.jpg');
            background-size: cover;
            background-position: center;
            background-repeat: no-repeat;
        }

        .hero-bg { display: none; }
        .hero-overlay { display: none; }

        /* Текст */
        .hero-content { 
            max-width: 900px; margin-top: 50px; 
            position: relative;
            z-index: 1; 
            animation: fadeUpOnLoad 1s cubic-bezier(0.16, 1, 0.3, 1) forwards; 
        }

        .hero h1 { color: var(--bg-white); font-size: clamp(36px, 4.5vw, 60px); font-weight: 900; text-transform: uppercase; line-height: 1.1; margin-bottom: 24px; letter-spacing: -1px; }
        .hero p { color: #E2E8F0; font-size: clamp(16px, 2vw, 20px); margin-bottom: 40px; max-width: 700px; font-weight: 400; opacity: 0.9; }

        /* Статистика */
        .stats-overlay { position: relative; margin-top: -60px; padding: 0 10%; z-index: 10; }
        .stats-container { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--bg-white); box-shadow: var(--shadow-soft); border-radius: 6px; padding: 30px; gap: 20px; border-bottom: 4px solid var(--accent-red); }
        .stat-item { border-right: 1px solid #E2E8F0; padding: 0 20px; transition: var(--transition); }
        .stat-item:last-child { border-right: none; }
        .stat-item:hover { transform: translateY(-5px); }
        .stat-item h3 { font-size: 36px; color: var(--primary-navy); margin-bottom: 5px; font-weight: 900; }
        .stat-item p { font-size: 13px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; font-weight: 600; }

        .section-header { margin-bottom: 60px; max-width: 700px; }
        .section-header h2 { font-size: clamp(32px, 4vw, 42px); margin-bottom: 20px; letter-spacing: -0.5px; }
        .section-header p { color: var(--text-muted); font-size: 18px; }
        .section-tag { display: inline-block; padding: 6px 14px; background: rgba(192, 0, 29, 0.1); color: var(--accent-red); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; border-radius: 4px; margin-bottom: 16px; }

        /* УСЛУГИ */
        .services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
        .service-card { background: var(--bg-white); padding: 40px 30px; border-radius: 6px; box-shadow: 0 4px 20px rgba(13, 44, 107, 0.04); transition: var(--transition); border: 1px solid rgba(13, 44, 107, 0.05); position: relative; }
        .service-card::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 4px; background: var(--accent-red); transform: scaleX(0); transform-origin: left; transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1); border-radius: 6px 6px 0 0; }
        .service-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-hover); }
        .service-card:hover::before { transform: scaleX(1); }
        .service-card h3 { font-size: 18px; margin-bottom: 12px; font-weight: 800; color: var(--primary-navy); }
        .service-card p { color: var(--text-muted); font-size: 15px; }

        /* ЛАБОРАТОРИИ */
        .labs-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px; }
        .labs-grid .lab-card { flex: 1 1 calc(33.333% - 24px); min-width: 260px; max-width: calc(33.333% - 16px); }
        .lab-card { background: var(--bg-white); border: 1px solid #E2E8F0; padding: 30px 24px; border-radius: 6px; transition: var(--transition); border-left: 4px solid var(--primary-navy); display: flex; align-items: center; justify-content: center; text-align: center; min-height: 130px; }
        .lab-card:hover { border-left-color: var(--accent-red); box-shadow: var(--shadow-soft); transform: translateY(-5px); }
        .lab-card h4 { font-size: 17px; font-family: 'Inter', sans-serif; font-weight: 700; color: var(--text-main); margin: 0; }

        /* КЛИЕНТЫ */
        #clients { background-color: var(--bg-white); border-top: 1px solid #E2E8F0; border-bottom: 1px solid #E2E8F0; padding: 100px 0; overflow: hidden; width: 100%; }
        #clients .section-header { padding: 0 10%; max-width: 1000px; }
        .marquee-wrapper { display: flex; width: max-content; animation: marquee 40s linear infinite; will-change: transform; backface-visibility: hidden; }
        .marquee-wrapper:hover { animation-play-state: paused; }
        .marquee-group { display: flex; flex-shrink: 0; align-items: center; }
        @keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
        .client-logo { display: flex; align-items: center; gap: 16px; margin: 0 50px; transition: var(--transition); cursor: default; }
        .client-logo:hover { transform: scale(1.08); }
        .client-text { font-family: 'Montserrat', sans-serif; font-weight: 900; font-size: 24px; text-transform: uppercase; line-height: 1; letter-spacing: -0.5px; }
        .client-text small { display: block; font-family: 'Inter', sans-serif; font-weight: 600; font-size: 11px; letter-spacing: 1.5px; margin-top: 5px; text-transform: uppercase; }

        /* Лицензии, Публикации */
        .dark-section { background-color: var(--primary-navy); color: var(--bg-white); background-image: radial-gradient(circle at top right, rgba(255,255,255,0.05) 0%, transparent 50%); overflow: hidden; }
        .dark-section .section-header h2 { color: var(--bg-white); }
        .dark-section .section-header p { color: #94A3B8; }
        .two-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 40px; }
        .list-group { display: flex; flex-direction: column; gap: 16px; }
        .list-item { background: rgba(8, 26, 64, 0.6); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.1); padding: 24px; border-radius: 6px; transition: var(--transition); display: flex; align-items: flex-start; gap: 20px; }
        .list-item:hover { background: var(--primary-dark); border-color: rgba(192, 0, 29, 0.5); transform: translateX(10px); }
        .list-item-icon { width: 48px; height: 48px; background: rgba(192, 0, 29, 0.15); color: var(--accent-red); border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
        .list-item-icon svg { width: 24px; height: 24px; }
        .list-item-text h4 { color: var(--bg-white); font-size: 16px; font-family: 'Inter', sans-serif; margin-bottom: 4px; }
        .list-item-text p { color: #94A3B8; font-size: 14px; }

        /* ОТЗЫВЫ */
        #reviews {
            background: var(--bg-body);
            border-bottom: 1px solid #E2E8F0;
            padding-top: 90px;
            padding-bottom: 90px;
        }
        #reviews .section-header { margin-bottom: 45px; }
        .reviews-grid {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 24px;
            align-items: stretch;
        }
        .review-card {
            min-height: 305px;
            background: var(--bg-white);
            padding: 28px;
            border-radius: 8px;
            box-shadow: 0 10px 30px rgba(13, 44, 107, 0.05);
            transition: var(--transition);
            position: relative;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
        }
        .review-card:hover {
            transform: translateY(-8px);
            box-shadow: var(--shadow-hover);
        }
        .review-text {
            flex: 1;
            color: var(--text-main);
            font-size: 15px;
            font-style: italic;
            line-height: 1.55;
            margin-bottom: 20px;
        }
        .review-author {
            display: flex;
            align-items: center;
            gap: 12px;
            border-top: 1px solid #E2E8F0;
            padding-top: 16px;
        }
        .author-avatar {
            width: 42px;
            height: 42px;
            background: var(--primary-navy);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--bg-white);
            font-family: 'Montserrat', sans-serif;
            font-weight: 700;
            font-size: 15px;
            flex: 0 0 42px;
        }
        .author-info { min-width: 0; }
        .author-info strong {
            display: block;
            color: var(--primary-navy);
            font-size: 14px;
            font-weight: 800;
            line-height: 1.25;
            margin-bottom: 4px;
        }
        .author-info span {
            display: block;
            color: var(--text-muted);
            font-size: 12px;
            line-height: 1.4;
        }

        /* Контакты */
        .contacts { display: grid; grid-template-columns: 1fr 1fr; gap: 0; padding: 0; }
        .contact-info { padding: 100px 15%; background: var(--bg-white); display: flex; flex-direction: column; justify-content: center; }
        .contact-info ul { list-style: none; margin-top: 30px; }
        .contact-info li { margin-bottom: 25px; font-size: 16px; display: flex; align-items: flex-start; gap: 15px; color: var(--text-main); font-weight: 500; }
        .contact-info li span { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; background: rgba(192, 0, 29, 0.08); border-radius: 50%; color: var(--accent-red); flex-shrink: 0; }
        .contact-info li span svg { width: 18px; height: 18px; stroke-width: 2; }
        
        .map-container { width: 100%; min-height: 600px; background: #E2E8F0; position: relative; display: flex; align-items: center; justify-content: center; }
        .map-container span { position: absolute; font-size: 14px; color: var(--text-muted); z-index: 0; font-weight: 500; }
        .map-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; z-index: 1; }
        
        /* Футер */
        footer { background-color: var(--primary-navy); background-image: radial-gradient(circle at top right, rgba(255,255,255,0.05) 0%, transparent 50%); color: #94A3B8; padding: 60px 10% 30px; }
        .footer-content { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 30px; margin-bottom: 30px; flex-wrap: wrap; gap: 20px; }
        .footer-nav { display: flex; gap: 20px; flex-wrap: wrap; }
        .footer-nav a { transition: var(--transition); font-size: 14px; }
        .footer-nav a:hover { color: var(--accent-red); }
        .footer-bottom { display: flex; justify-content: space-between; font-size: 13px; flex-wrap: wrap; gap: 15px; }

        /* =========================================
           АДАПТИВНОСТЬ
           ========================================= */
        @media (min-width: 1025px) {
            /* background-attachment: fixed убран — ломает iOS Safari */
        }

        @media (max-width: 1024px) {
            .services-grid { grid-template-columns: repeat(2, 1fr); }
            .services-grid .service-card:last-child { grid-column: span 2; } 
            .stats-container { grid-template-columns: 1fr 1fr; }
            .stat-item { border-right: none; border-bottom: 1px solid #E2E8F0; padding: 20px 0; }
            .stat-item:nth-last-child(-n+2) { border-bottom: none; }
            .contacts { grid-template-columns: 1fr; }
            .map-container { min-height: 400px; }
            .two-cols { grid-template-columns: 1fr; }
            .labs-grid .lab-card { flex: 1 1 calc(50% - 24px); max-width: calc(50% - 12px); }
            .reviews-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
        }

        /* Desktop: hide burger and mobile nav overlay */
        #burger { display: none; }
        #mobile-nav { display: none; }

        @media (max-width: 768px) {
            html { scroll-padding-top: 0; }

            /* Header: logo left, burger right, fixed */
            header {
                position: fixed !important;
                flex-direction: row !important;
                justify-content: space-between;
                align-items: center;
                padding: 12px 5% !important;
                gap: 0 !important;
            }
            .logo img { height: 48px !important; }
            .logo span[style] { font-size: 11px !important; }
            /* Hide desktop nav and contacts on mobile */
            header > nav, .header-contacts, .header-qr { display: none !important; }

            label#burger, #burger { display: flex !important; }
            #burger { display: flex !important; align-items: center; justify-content: space-between; width: 36px; height: 26px; }
            /* Show burger */
            #burger { display: flex !important; align-items: center; justify-content: space-between; width: 36px; height: 26px; }
            /* Show burger */
            #burger { display: flex !important; align-items: center; justify-content: space-between; }

            /* Mobile nav overlay */
            #mobile-nav {
                display: flex;
                flex-direction: column;
                position: fixed;
                top: 0; left: 0; right: 0; bottom: 0;
                background: #081a40;
                z-index: 9999;
                -webkit-overflow-scrolling: touch;
                padding: 100px 8% 40px;
                gap: 8px;
                transform: translateX(100%);
                transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
            }
            #mobile-nav.open { transform: translateX(0); }
            #mobile-nav a {
                color: #fff;
                font-family: 'Montserrat', sans-serif;
                font-size: 22px;
                font-weight: 600;
                padding: 14px 0;
                border-bottom: 1px solid rgba(255,255,255,0.1);
                text-decoration: none;
                letter-spacing: 0.5px;
            }
            #mobile-nav a:last-child { border-bottom: none; margin-top: 10px; }

            /* Burger icon lines */
            .bline {
                display: block;
                width: 100%; height: 2px;
                background: var(--primary-navy);
                border-radius: 2px;
                transition: all 0.3s;
                transform-origin: center;
            }
            #burger.open .bline:nth-child(1) { transform: translateY(9px) rotate(45deg); background:#fff; }
            #burger.open .bline:nth-child(2) { opacity: 0; }
            #burger.open .bline:nth-child(3) { transform: translateY(-9px) rotate(-45deg); background:#fff; }

            /* Push content below fixed header */
            body { padding-top: 74px; }
            .hero { padding-top: 40px !important; }

            section { padding: 60px 5%; }
            .hero { min-height: auto; padding: 40px 5% 100px; align-items: flex-start; }
            .hero-content { margin-top: 0; text-align: center; }
            .hero h1 { font-size: clamp(26px, 7vw, 38px); }

            .services-grid { grid-template-columns: 1fr; }
            .services-grid .service-card:last-child { grid-column: span 1; }

            .stats-overlay { margin-top: -40px; padding: 0 5%; }
            .stats-container { grid-template-columns: repeat(2, 1fr); padding: 20px; gap: 0; text-align: center; }
            .stat-item { padding: 15px 10px; }
            .stat-item:nth-child(-n+2) { border-bottom: 1px solid #E2E8F0; }

            #clients { padding: 60px 0; }
            #clients .section-header { padding: 0 5%; }

            .reviews-grid { grid-template-columns: 1fr; gap: 18px; }
            #reviews { padding-top: 60px; padding-bottom: 60px; }
            #reviews .section-header { margin-bottom: 30px; }
            .review-card { min-height: 0; padding: 24px 20px; }

            .contact-info { padding: 50px 5% 40px; }
            .contact-info li { flex-direction: row; align-items: flex-start; gap: 15px; margin-bottom: 25px; }
            .contact-info ul { margin-top: 20px; margin-bottom: 15px; }

            .map-container { min-height: 250px; height: 250px; }

            .footer-content { flex-direction: column; text-align: center; gap: 30px; }
            .footer-nav { justify-content: center; }
            .footer-bottom { flex-direction: column; text-align: center; }

            .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
        }
    
        /* License cards grid */
        .lic-grid {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            gap: 16px;
            margin-top: 40px;
        }
        .lic-grid .lic-card {
            flex: 1 1 calc(33.333% - 16px);
            min-width: 260px;
            max-width: calc(33.333% - 11px);
        }
        .lic-card {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 12px;
            padding: 24px 16px 20px;
            background: rgba(255,255,255,0.07);
            border: 1px solid rgba(255,255,255,0.12);
            border-radius: 8px;
            color: #fff;
            text-decoration: none;
            text-align: center;
            font-size: 13px;
            font-weight: 500;
            line-height: 1.4;
            transition: background 0.25s, transform 0.2s;
        }
        .lic-card:hover {
            background: rgba(255,255,255,0.14);
            transform: translateY(-3px);
        }
        .lic-card svg { opacity: 0.7; flex-shrink: 0; }
        .lic-card span { flex: 1; }
        .lic-dl {
            font-size: 11px;
            font-weight: 700;
            letter-spacing: 1px;
            color: var(--accent-red);
            text-transform: uppercase;
            margin-top: 4px;
        }
        @media (max-width: 1024px) { .lic-grid .lic-card { flex: 1 1 calc(50% - 16px); max-width: calc(50% - 8px); } }
        @media (max-width: 768px) { .lic-grid { gap: 10px; } .lic-grid .lic-card { flex: 1 1 100%; max-width: 100%; } .labs-grid .lab-card { flex: 1 1 100%; max-width: 100%; } }

        /* ── Научные публикации ── */
        .pubs-grid {
            display: grid;
            grid-template-columns: repeat(6, minmax(0, 1fr));
            gap: 18px;
            max-width: 1440px;
            margin: 38px auto 0;
            align-items: stretch;
        }
        .pub-card {
            display: flex;
            flex-direction: column;
            min-width: 0;
            height: 100%;
            background: var(--bg-white);
            border: 1px solid rgba(13, 44, 107, 0.11);
            border-radius: 10px;
            overflow: hidden;
            box-shadow: 0 14px 30px rgba(13, 44, 107, 0.08);
            transition: var(--transition);
            text-decoration: none;
        }
        .pub-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 24px 44px rgba(13, 44, 107, 0.14);
            border-color: rgba(192, 0, 29, 0.22);
        }
        .pub-cover {
            width: 100%;
            height: 280px;
            padding: 10px;
            background: #EEF2F7;
            border-bottom: 1px solid rgba(13, 44, 107, 0.08);
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
        }
        .pub-cover img {
            width: 100%;
            height: 100%;
            object-fit: contain;
            object-position: center;
            display: block;
            filter: drop-shadow(0 5px 8px rgba(5, 17, 46, 0.14));
        }
        .pub-cover .pub-placeholder {
            color: var(--text-muted);
            font-size: 12px;
            font-weight: 600;
            line-height: 1.4;
            text-align: center;
            padding: 10px;
        }
        .pub-body {
            min-width: 0;
            flex: 1;
            padding: 15px 15px 14px;
            display: flex;
            flex-direction: column;
            gap: 8px;
        }
        .pub-journal {
            font-size: 10.5px;
            font-weight: 800;
            line-height: 1.4;
            letter-spacing: 0.2px;
            color: var(--primary-navy);
            text-transform: uppercase;
        }
        .pub-body h4 {
            font-size: 13.5px;
            font-family: 'Inter', sans-serif;
            font-weight: 650;
            color: var(--text-main);
            line-height: 1.42;
            display: -webkit-box;
            -webkit-line-clamp: 6;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }
        .pub-authors {
            font-size: 10.8px;
            line-height: 1.45;
            color: var(--text-muted);
            font-style: italic;
            margin-top: auto;
            padding-top: 7px;
            display: -webkit-box;
            -webkit-line-clamp: 3;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }
        .pub-dl {
            font-size: 10px;
            font-weight: 800;
            letter-spacing: 0.9px;
            color: var(--accent-red);
            text-transform: uppercase;
        }
        @media (max-width: 1250px) {
            .pubs-grid {
                grid-template-columns: repeat(3, minmax(0, 1fr));
                max-width: 1080px;
                gap: 20px;
            }
            .pub-cover { height: 315px; }
            .pub-body h4 { font-size: 14px; }
            .pub-journal { font-size: 11px; }
            .pub-authors { font-size: 11px; }
        }
        @media (max-width: 1100px) {
            .pubs-grid {
                grid-template-columns: repeat(2, minmax(0, 1fr));
                max-width: 760px;
            }
            .pub-cover { height: 330px; }
        }
        @media (max-width: 700px) {
            .pubs-grid {
                grid-template-columns: 1fr;
                max-width: 440px;
                gap: 18px;
                margin-top: 28px;
            }
            .pub-cover { height: 320px; padding: 12px; }
            .pub-body { padding: 17px 17px 16px; gap: 9px; }
            .pub-journal { font-size: 12px; line-height: 1.45; }
            .pub-body h4 {
                font-size: 16px;
                line-height: 1.45;
                -webkit-line-clamp: unset;
                display: block;
            }
            .pub-authors {
                font-size: 13px;
                line-height: 1.5;
                -webkit-line-clamp: unset;
                display: block;
                padding-top: 8px;
            }
            .pub-dl { font-size: 11px; }
        }
        @media (max-width: 420px) {
            .pub-cover { height: 285px; }
            .pub-body { padding: 15px 15px 14px; }
            .pub-body h4 { font-size: 15px; }
        }

        /* ── Burger checkbox toggle ── */
        #burger-check {
            display: none !important;
            position: fixed; top: -9999px;
        }
        /* CSS toggle: when checkbox checked, show mobile nav */
        #burger-check:checked ~ nav#mobile-nav {
            transform: translateX(0) !important;
        }
        /* Animate burger lines when open */
        #burger-check:checked ~ header label#burger .bline:nth-child(1) {
            transform: translateY(9px) rotate(45deg);
        }
        #burger-check:checked ~ header label#burger .bline:nth-child(2) {
            opacity: 0;
        }
        #burger-check:checked ~ header label#burger .bline:nth-child(3) {
            transform: translateY(-9px) rotate(-45deg);
        }
        /* Close button inside nav */
        .nav-close {
            position: absolute;
            top: 18px; right: 5%;
            font-size: 28px;
            color: white;
            cursor: pointer;
            padding: 8px;
            line-height: 1;
        }


        /* ========================================================
           Финальные правки: отзывы, контакты и мобильная версия
           ======================================================== */
        .header-contacts a {
            text-decoration: none;
        }
        .header-contacts strong a {
            color: var(--primary-navy);
        }
        .header-email {
            display: block;
            width: 100%;
            margin-top: 5px;
            color: var(--text-muted);
            font-size: 12px;
            font-weight: 500;
            line-height: 1.2;
            text-align: center;
            white-space: nowrap;
            transition: color 0.25s ease;
        }
        .header-email:hover {
            color: var(--accent-red);
        }
        @media (max-width: 1400px) and (min-width: 769px) {
            .header-contacts {
                flex-basis: 160px;
                min-width: 160px;
            }
            .header-email {
                font-size: 11px;
            }
        }

        /* ФИО — обычное начертание; должность и организация — жирные. */
        .author-info strong {
            font-weight: 400;
            font-size: 14px;
            color: var(--primary-navy);
            margin-bottom: 4px;
        }
        .author-info span {
            font-weight: 700;
            font-size: 12px;
            color: #475569;
        }

        /* Кнопка презентации показывается только внутри мобильного меню. */
        .mobile-presentation-download,
        .mobile-contact-link {
            display: none;
        }

        @media (max-width: 768px) {
            #mobile-nav .mobile-presentation-download {
                display: flex;
                align-items: center;
                justify-content: center;
                margin: 14px 0 4px;
                padding: 14px 18px;
                border: 1px solid var(--accent-red);
                border-radius: 6px;
                background: var(--accent-red);
                color: #fff;
                font-size: 16px;
                font-weight: 700;
                line-height: 1.2;
                text-align: center;
            }
            #mobile-nav .mobile-presentation-download:hover,
            #mobile-nav .mobile-presentation-download:active {
                background: #9F0018;
            }
            #mobile-nav .mobile-contact-link {
                display: block;
                color: #fff;
                font-size: 16px;
                font-weight: 600;
                padding: 10px 0;
                border-bottom: none;
                margin-top: 0;
            }
            #mobile-nav .mobile-email-link {
                color: #CBD5E1;
                padding-top: 2px;
            }
        }

        /* На телефонах научные публикации располагаются по две в ряд. */
        @media (max-width: 700px) {
            .pubs-grid {
                grid-template-columns: repeat(2, minmax(0, 1fr));
                max-width: 100%;
                gap: 12px;
                margin-top: 28px;
            }
            .pub-card {
                border-radius: 8px;
            }
            .pub-cover {
                height: 220px;
                padding: 8px;
            }
            .pub-body {
                padding: 12px 11px 12px;
                gap: 7px;
            }
            .pub-journal {
                font-size: 9.5px;
                line-height: 1.35;
                letter-spacing: 0.05px;
            }
            .pub-body h4 {
                display: -webkit-box;
                -webkit-box-orient: vertical;
                -webkit-line-clamp: 7;
                overflow: hidden;
                font-size: 12.5px;
                line-height: 1.4;
            }
            .pub-authors {
                display: -webkit-box;
                -webkit-box-orient: vertical;
                -webkit-line-clamp: 4;
                overflow: hidden;
                font-size: 10.5px;
                line-height: 1.4;
                padding-top: 5px;
            }
            .pub-dl {
                font-size: 9.5px;
                letter-spacing: 0.55px;
            }
        }

        @media (max-width: 420px) {
            .pubs-grid {
                gap: 10px;
            }
            .pub-cover {
                height: 205px;
                padding: 7px;
            }
            .pub-body {
                padding: 11px 9px 11px;
            }
            .pub-journal {
                font-size: 9px;
            }
            .pub-body h4 {
                font-size: 11.7px;
                line-height: 1.38;
            }
            .pub-authors {
                font-size: 10px;
            }
        }

        @media (max-width: 350px) {
            .pub-cover {
                height: 185px;
            }
            .pub-body h4 {
                font-size: 11px;
            }
        }

        .hero-actions {
            display: flex;
            align-items: center;
            gap: 12px;
            flex-wrap: wrap;
        }
        .mobile-hero-presentation {
            display: none;
        }
        @media (max-width: 768px) {
            .hero-actions {
                justify-content: center;
                width: 100%;
            }
            .hero-actions .btn {
                width: 100%;
                max-width: 330px;
            }
            .mobile-hero-presentation {
                display: inline-flex;
                background: transparent;
                border: 1px solid rgba(255,255,255,0.75);
                color: #fff;
                margin-top: 2px;
            }
            .mobile-hero-presentation:hover,
            .mobile-hero-presentation:active {
                background: rgba(255,255,255,0.12);
                border-color: #fff;
            }
        }

        

        /* ========================================================
           Правки 08.08.2026: обложки журналов + Safari header
           ======================================================== */

        /* Обложки журналов занимают всю доступную ширину карточки. */
        .pub-cover {
            padding: 0 !important;
        }
        .pub-cover img {
            width: 100% !important;
            height: 100% !important;
            max-width: none !important;
            object-fit: cover !important;
            object-position: center center !important;
            filter: none !important;
        }

        /* Более устойчивое позиционирование шапки в Safari и Chromium. */
        @media (min-width: 769px) {
            header {
                left: 0;
                right: 0;
                width: 100%;
                min-height: 104px;
                display: grid !important;
                grid-template-columns: minmax(220px, 260px) minmax(0, 1fr) 176px 82px;
                column-gap: clamp(14px, 1.5vw, 28px);
                align-items: center;
                justify-content: initial;
                padding: 12px clamp(28px, 6vw, 110px) !important;
                background: #fff;
                -webkit-backdrop-filter: none;
                backdrop-filter: none;
                box-sizing: border-box;
            }
            header > * {
                min-width: 0;
            }
            header .logo {
                justify-self: start;
                width: 100%;
                max-width: 260px;
            }
            header .logo-img {
                max-width: 100% !important;
            }
            header > nav {
                width: 100%;
                min-width: 0;
                justify-self: stretch;
            }
            header > nav ul {
                width: 100%;
                flex-wrap: nowrap !important;
                justify-content: center;
                gap: 12px 18px;
            }
            header > nav a {
                white-space: nowrap;
            }
            .header-contacts {
                width: 176px;
                min-width: 0;
                flex: none;
                justify-self: center;
            }
            .header-qr {
                width: 82px;
                min-width: 0;
                margin-left: 0 !important;
                transform: none !important;
                flex: none;
                justify-self: end;
            }
        }

        @media (max-width: 1450px) and (min-width: 769px) {
            header {
                grid-template-columns: minmax(205px, 235px) minmax(0, 1fr) 160px 72px;
                column-gap: 14px;
                padding-left: 4% !important;
                padding-right: 4% !important;
            }
            header > nav ul { gap: 10px 13px; }
            header > nav a { font-size: 12px; letter-spacing: 0.2px; }
            .header-contacts { width: 160px; }
            .header-contacts strong { font-size: 15px; }
            .header-qr { width: 72px; }
            .header-qr img { width: 58px !important; height: 58px !important; }
        }

        @media (max-width: 1180px) and (min-width: 769px) {
            header {
                grid-template-columns: minmax(185px, 210px) minmax(0, 1fr) 150px 62px;
                column-gap: 10px;
                padding-left: 3% !important;
                padding-right: 3% !important;
            }
            header .logo-img { height: 56px !important; }
            header .logo span[style] { font-size: 11px !important; }
            header > nav ul { gap: 7px 9px; }
            header > nav a { font-size: 11px; letter-spacing: 0; }
            .header-contacts { width: 150px; }
            .header-contacts strong { font-size: 14px; }
            .header-email { font-size: 10.5px; }
            .header-qr { width: 62px; }
            .header-qr img { width: 52px !important; height: 52px !important; }
            .header-qr span { font-size: 9px !important; }
        }

        /* В узком окне Safari не даём пунктам меню переносить шапку на второй ряд. */
        @media (max-width: 980px) and (min-width: 769px) {
            header {
                grid-template-columns: 180px minmax(0, 1fr) 138px;
            }
            .header-qr { display: none !important; }
            header > nav ul { gap: 6px; }
            header > nav a { font-size: 10.5px; }
            .header-contacts { width: 138px; }
            .header-contacts strong { font-size: 13px; }
            .header-email { font-size: 9.5px; }
        }


        /* ========================================================
           Исправление 08.08.2026: журналы без обрезки + отзывы 3×2
           ======================================================== */

        /* Обложка занимает всю ширину карточки, но НЕ обрезается.
           Высота определяется реальными пропорциями изображения. */
        #publications .pub-cover {
            width: 100% !important;
            height: auto !important;
            min-height: 0 !important;
            padding: 0 !important;
            display: block !important;
            background: #fff !important;
            overflow: hidden !important;
        }
        #publications .pub-cover img {
            display: block !important;
            width: 100% !important;
            height: auto !important;
            max-width: 100% !important;
            object-fit: contain !important;
            object-position: center top !important;
            filter: none !important;
        }

        /* Все 6 отзывов остаются в той же сетке, что была раньше. */
        #reviews .reviews-grid {
            display: grid !important;
            grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
            gap: 24px !important;
            align-items: stretch !important;
        }
        #reviews .reviews-grid > .review-card {
            width: auto !important;
            max-width: none !important;
            margin: 0 !important;
            min-width: 0 !important;
        }
        @media (max-width: 1024px) {
            #reviews .reviews-grid {
                grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
            }
        }
        @media (max-width: 768px) {
            #reviews .reviews-grid {
                grid-template-columns: 1fr !important;
                gap: 18px !important;
            }
        }

/* ========================================================
   Финальная корректировка 08.08.2026
   — обложки журналов ровные, без обрезки и искажений
   — в отзывах остаются только 3 новые карточки
   ======================================================== */

/* На широком экране сохраняем 6 публикаций в один ряд,
   но делаем всем обложкам одинаковую аккуратную область. */
#publications .pubs-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    gap: 18px !important;
    max-width: 1440px !important;
    align-items: stretch !important;
}
#publications .pub-card {
    min-width: 0 !important;
    overflow: hidden !important;
}
#publications .pub-cover {
    width: 100% !important;
    height: 300px !important;
    min-height: 300px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    background: #F8FAFC !important;
    border-bottom: 1px solid rgba(13, 44, 107, 0.08) !important;
}
#publications .pub-cover img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    object-position: center center !important;
    filter: none !important;
}

/* На средних экранах карточки становятся шире. */
@media (max-width: 1250px) and (min-width: 1101px) {
    #publications .pubs-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        max-width: 1080px !important;
        gap: 20px !important;
    }
    #publications .pub-cover {
        height: 360px !important;
        min-height: 360px !important;
    }
}
@media (max-width: 1100px) and (min-width: 701px) {
    #publications .pubs-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        max-width: 760px !important;
        gap: 18px !important;
    }
    #publications .pub-cover {
        height: 370px !important;
        min-height: 370px !important;
    }
}

/* На телефоне сохраняем ранее согласованные 2 публикации в ряд. */
@media (max-width: 700px) {
    #publications .pubs-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        max-width: 100% !important;
        gap: 10px !important;
    }
    #publications .pub-cover {
        height: 220px !important;
        min-height: 220px !important;
        padding: 0 !important;
    }
}
@media (max-width: 420px) {
    #publications .pub-cover {
        height: 200px !important;
        min-height: 200px !important;
    }
}

/* В блоке отзывов теперь только три новых отзыва — одной ровной строкой. */
#reviews .reviews-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 24px !important;
    align-items: stretch !important;
}
#reviews .review-card {
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
}
@media (max-width: 1024px) {
    #reviews .reviews-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}
@media (max-width: 700px) {
    #reviews .reviews-grid {
        grid-template-columns: 1fr !important;
    }
}

/* 08.08.2026 — обложки журналов без пустых полей внутри карточек */
#publications .pub-cover {
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    overflow: hidden !important;
}
#publications .pub-cover img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 100% !important;
    min-height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    object-fit: fill !important;
    object-position: center !important;
    filter: none !important;
}

/* ========================================================
   Правки 11.08.2026
   ======================================================== */

/* Подпись строго по центру под логотипом. */
header .logo {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
}
header .logo > span {
    width: 100% !important;
    text-align: center !important;
    white-space: nowrap !important;
}

/* 6 отзывов: два ровных ряда по 3 карточки. */
#reviews .reviews-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 24px !important;
    align-items: stretch !important;
}
#reviews .review-card {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;
}
#reviews .review-text,
#reviews .author-info,
#reviews .author-info span,
#reviews .author-info strong {
    overflow-wrap: anywhere;
    word-break: normal;
}
@media (max-width: 1024px) {
    #reviews .reviews-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 700px) {
    #reviews .reviews-grid { grid-template-columns: 1fr !important; }
}

/* Лаборатории: Safari не должен расширять карточки и уводить текст за экран. */
.labs-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    width: 100% !important;
    max-width: 1220px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    gap: 24px !important;
    justify-content: stretch !important;
}
.labs-grid .lab-card {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    flex: none !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}
.labs-grid .lab-card h4,
.labs-grid .lab-card:last-child h4 {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
    text-align: center !important;
}
@media (max-width: 1100px) {
    .labs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 700px) {
    .labs-grid { grid-template-columns: 1fr !important; gap: 14px !important; }
}

/* Научные публикации: на телефоне по 2 в ряд, но карточки/обложки выше и не приплюснуты. */
@media (max-width: 700px) {
    #publications {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
    #publications .pubs-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        width: 100% !important;
        max-width: 100% !important;
        gap: 12px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    #publications .pub-card {
        width: 100% !important;
        min-width: 0 !important;
    }
    #publications .pub-cover {
        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        aspect-ratio: 3 / 4 !important;
        padding: 0 !important;
        overflow: hidden !important;
    }
    #publications .pub-cover img {
        width: 100% !important;
        height: 100% !important;
        min-width: 100% !important;
        min-height: 100% !important;
        object-fit: cover !important;
        object-position: center top !important;
    }
    #publications .pub-body {
        padding: 12px 10px 13px !important;
    }
    #publications .pub-body h4 {
        font-size: 12px !important;
        line-height: 1.4 !important;
        -webkit-line-clamp: unset !important;
        overflow: visible !important;
    }
}
@media (max-width: 420px) {
    #publications .pub-cover {
        height: auto !important;
        min-height: 0 !important;
        aspect-ratio: 0.72 !important;
    }
    #publications .pubs-grid { gap: 9px !important; }
    #publications .pub-body { padding: 10px 8px 11px !important; }
    #publications .pub-body h4 { font-size: 11.5px !important; }
}

/* Safari/узкие desktop-окна: не допускаем горизонтального выезда шапки. */
html, body {
    max-width: 100% !important;
    overflow-x: hidden !important;
}
@media (min-width: 1181px) {
    header {
        grid-template-columns: minmax(190px, 225px) minmax(0, 1fr) 158px 72px !important;
        column-gap: clamp(10px, 1.1vw, 18px) !important;
        padding-left: clamp(24px, 4vw, 72px) !important;
        padding-right: clamp(24px, 4vw, 72px) !important;
    }
    header > nav { min-width: 0 !important; overflow: hidden !important; }
    header > nav ul {
        min-width: 0 !important;
        gap: 8px 13px !important;
        flex-wrap: nowrap !important;
    }
    header > nav a {
        font-size: clamp(10.5px, .82vw, 12.5px) !important;
        letter-spacing: 0 !important;
    }
}

/* В Safari при ширине до 1180px используем компактную шапку с бургером,
   чтобы меню физически не могло вытолкнуть страницу за границы окна. */
@media (min-width: 769px) and (max-width: 1180px) {
    header {
        display: flex !important;
        grid-template-columns: none !important;
        min-height: 82px !important;
        padding: 10px 24px !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 20px !important;
    }
    header .logo {
        width: 220px !important;
        max-width: 220px !important;
        flex: 0 0 220px !important;
        justify-self: auto !important;
    }
    header .logo-img {
        width: auto !important;
        height: 54px !important;
        max-width: 220px !important;
    }
    header .logo > span { font-size: 11px !important; }
    header > nav,
    header .header-contacts,
    header .header-qr {
        display: none !important;
    }
    label#burger,
    #burger {
        display: flex !important;
        width: 36px !important;
        height: 26px !important;
        flex: 0 0 36px !important;
        align-items: center !important;
        justify-content: space-between !important;
    }
    #mobile-nav {
        display: flex !important;
        flex-direction: column !important;
        position: fixed !important;
        inset: 0 !important;
        z-index: 9999 !important;
        background: #081a40 !important;
        padding: 90px 32px 32px !important;
        transform: translateX(100%) !important;
        transition: transform .28s ease !important;
        overflow-y: auto !important;
    }
    #burger-check:checked ~ nav#mobile-nav {
        transform: translateX(0) !important;
    }
    #mobile-nav a {
        display: block !important;
        color: #fff !important;
        font-size: 18px !important;
        padding: 12px 0 !important;
    }
    #mobile-nav .mobile-presentation-download {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        margin-top: 16px !important;
        padding: 14px 18px !important;
        border-radius: 6px !important;
        background: var(--accent-red) !important;
    }
    #mobile-nav .mobile-contact-link { display: block !important; }
}

/* ========================================================
   11.08.2026 — финальная правка только мобильных публикаций
   ПК-версия блока публикаций не изменяется.
   ======================================================== */
@media (max-width: 700px) {
    #publications {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
    #publications .pubs-grid {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 12px !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 26px auto 0 !important;
        align-items: start !important;
    }
    #publications .pub-card {
        width: 100% !important;
        min-width: 0 !important;
        height: auto !important;
        border-radius: 12px !important;
        overflow: hidden !important;
        box-shadow: 0 8px 20px rgba(13, 44, 107, 0.10) !important;
    }
    #publications .pub-cover {
        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        aspect-ratio: 16 / 25 !important;
        padding: 0 !important;
        margin: 0 !important;
        background: #fff !important;
        overflow: hidden !important;
        display: block !important;
    }
    #publications .pub-cover img {
        display: block !important;
        width: 100% !important;
        height: 100% !important;
        min-width: 0 !important;
        min-height: 0 !important;
        max-width: 100% !important;
        max-height: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        object-fit: cover !important;
        object-position: center top !important;
        filter: none !important;
    }
    #publications .pub-body {
        padding: 11px 10px 12px !important;
        gap: 7px !important;
        min-height: 0 !important;
    }
    #publications .pub-journal {
        font-size: 10.5px !important;
        line-height: 1.35 !important;
        letter-spacing: 0 !important;
    }
    #publications .pub-body h4 {
        display: -webkit-box !important;
        -webkit-box-orient: vertical !important;
        -webkit-line-clamp: 5 !important;
        overflow: hidden !important;
        font-size: 12.5px !important;
        line-height: 1.38 !important;
        font-weight: 650 !important;
        margin: 0 !important;
    }
    #publications .pub-authors {
        display: -webkit-box !important;
        -webkit-box-orient: vertical !important;
        -webkit-line-clamp: 2 !important;
        overflow: hidden !important;
        font-size: 10.5px !important;
        line-height: 1.4 !important;
        padding-top: 4px !important;
        margin-top: 4px !important;
    }
    #publications .pub-dl {
        font-size: 10px !important;
        line-height: 1.2 !important;
        letter-spacing: 0.65px !important;
        margin-top: 2px !important;
    }
}
@media (max-width: 390px) {
    #publications {
        padding-left: 9px !important;
        padding-right: 9px !important;
    }
    #publications .pubs-grid {
        gap: 9px !important;
    }
    #publications .pub-body {
        padding: 10px 8px 11px !important;
    }
    #publications .pub-journal { font-size: 10px !important; }
    #publications .pub-body h4 { font-size: 12px !important; }
    #publications .pub-authors { font-size: 10px !important; }
}

/* 11.08.2026 — выравнивание мобильных карточек публикаций по высоте.
   ПК-версия не затрагивается. */
@media (max-width: 700px) {
    #publications .pubs-grid {
        align-items: stretch !important;
    }

    #publications .pub-card {
        display: flex !important;
        flex-direction: column !important;
        height: 100% !important;
        align-self: stretch !important;
    }

    #publications .pub-cover {
        flex: 0 0 auto !important;
    }

    #publications .pub-body {
        display: flex !important;
        flex-direction: column !important;
        flex: 1 1 auto !important;
        height: 100% !important;
    }

    /* Одинаковая высота текстовых зон — соседние карточки начинаются
       и заканчиваются строго на одном уровне. */
    #publications .pub-journal {
        min-height: 2.7em !important;
    }

    #publications .pub-body h4 {
        min-height: calc(1.38em * 5) !important;
        max-height: calc(1.38em * 5) !important;
    }

    #publications .pub-authors {
        min-height: 2.8em !important;
        margin-top: auto !important;
    }

    #publications .pub-dl {
        margin-top: 4px !important;
    }
}

/* 18.08.2026 — точечные правки по пометкам клиента. */
/* На ПК последняя обложка была визуально выше остальных:
   уменьшаем только само изображение и прижимаем его к нижнему краю,
   сохраняя общую высоту карточки и выравнивание текста. */
@media (min-width: 701px) {
    #publications .pub-card:last-child .pub-cover img {
        height: calc(100% - 14px) !important;
        min-height: 0 !important;
        margin-top: 14px !important;
        margin-bottom: 0 !important;
        object-fit: fill !important;
        object-position: center bottom !important;
    }
}

/* 18.08.2026 — дополнительные правки по публикациям. */

/* Последнюю обложку возвращаем к тем же размерам, что и у остальных:
   ранее её уменьшили отдельно, хотя визуальная разница была из-за hover. */
@media (min-width: 701px) {
    #publications .pub-card:last-child .pub-cover img {
        width: 100% !important;
        height: 100% !important;
        min-height: 100% !important;
        margin: 0 !important;
        object-fit: fill !important;
        object-position: center !important;
    }
}

/* Не обрезаем названия и список авторов: все фамилии и окончания
   публикаций должны быть видны полностью. */
#publications .pub-body h4 {
    display: block !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    -webkit-line-clamp: unset !important;
    -webkit-box-orient: initial !important;
}
#publications .pub-authors {
    display: block !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    -webkit-line-clamp: unset !important;
    -webkit-box-orient: initial !important;
    white-space: normal !important;
    margin-top: auto !important;
}

/* На мобильном сохраняем ровные пары карточек, но без обрезки текста. */
@media (max-width: 700px) {
    #publications .pubs-grid {
        align-items: stretch !important;
    }
    #publications .pub-card {
        height: 100% !important;
    }
    #publications .pub-body {
        height: 100% !important;
        display: flex !important;
        flex-direction: column !important;
    }
    #publications .pub-authors {
        margin-top: auto !important;
    }
}

/* 03.09.2026 — у обложки «Инженер-нефтяник» №1, 2016
   делаем строгие прямые углы, как у остальных обложек. */
#publications .pub-card:nth-child(3) {
    border-radius: 0 0 12px 12px !important;
}
#publications .pub-card:nth-child(3) .pub-cover,
#publications .pub-card:nth-child(3) .pub-cover img {
    border-radius: 0 !important;
}

/* Правки по замечаниям 03.09.2026 */
#publications .pub-card:nth-child(1) .pub-body h4 {
    display: block !important;
    overflow: visible !important;
    -webkit-line-clamp: unset !important;
}

/* Карточка сохраняет скругление только снизу у текстовой части,
   а сама обложка №1, 2016 — строго прямоугольная. */
#publications .pub-card:nth-child(3) {
    border-radius: 0 0 10px 10px !important;
}
#publications .pub-card:nth-child(3) .pub-cover {
    border-radius: 0 !important;
    overflow: hidden !important;
}
#publications .pub-card:nth-child(3) .pub-cover img {
    border-radius: 0 !important;
    clip-path: none !important;
    -webkit-clip-path: none !important;
}

/* 07.09.2026 — финальная унификация публикаций:
   все 6 обложек в одном формате и 3-я карточка снова с тем же скруглением, что и остальные. */
#publications .pub-card:nth-child(3) {
    border-radius: 10px !important;
}
#publications .pub-card:nth-child(3) .pub-cover,
#publications .pub-card:nth-child(3) .pub-cover img {
    border-radius: 0 !important;
}

/* Финал: никаких рамок. У всех 6 журналов только одинаковая супер-тонкая белая каёмка. */
#publications .pub-card {
    overflow: hidden !important;
}
#publications .pub-cover {
    box-sizing: border-box !important;
    height: 300px !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #ffffff !important;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    overflow: hidden !important;
}
#publications .pub-cover img,
#publications .pub-card:nth-child(1) .pub-cover img,
#publications .pub-card:nth-child(2) .pub-cover img,
#publications .pub-card:nth-child(3) .pub-cover img,
#publications .pub-card:nth-child(4) .pub-cover img,
#publications .pub-card:nth-child(5) .pub-cover img,
#publications .pub-card:nth-child(6) .pub-cover img {
    box-sizing: border-box !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    object-fit: fill !important;
    object-position: center center !important;
    background: transparent !important;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    filter: none !important;
    transform: none !important;
    border-radius: 0 !important;
    clip-path: none !important;
    -webkit-clip-path: none !important;
}
@media (max-width: 700px) {
    #publications .pub-cover {
        height: 220px !important;
    }
}
@media (max-width: 420px) {
    #publications .pub-cover {
        height: 200px !important;
    }
}

/* 07.09.2026 — финальная правка по публикациям:
   всем 6 журналам задаём одну и ту же очень тонкую белую каёмку
   без дополнительных рамок, теней и индивидуальных исключений. */
#publications .pub-card,
#publications .pub-card:nth-child(1),
#publications .pub-card:nth-child(2),
#publications .pub-card:nth-child(3),
#publications .pub-card:nth-child(4),
#publications .pub-card:nth-child(5),
#publications .pub-card:nth-child(6) {
    overflow: hidden !important;
}
#publications .pub-cover,
#publications .pub-card:nth-child(1) .pub-cover,
#publications .pub-card:nth-child(2) .pub-cover,
#publications .pub-card:nth-child(3) .pub-cover,
#publications .pub-card:nth-child(4) .pub-cover,
#publications .pub-card:nth-child(5) .pub-cover,
#publications .pub-card:nth-child(6) .pub-cover {
    box-sizing: border-box !important;
    width: 100% !important;
    height: 300px !important;
    min-height: 300px !important;
    padding: 2px !important;
    margin: 0 !important;
    display: flex !important;
    align-items: stretch !important;
    justify-content: stretch !important;
    background: #ffffff !important;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    overflow: hidden !important;
}
#publications .pub-cover img,
#publications .pub-card:nth-child(1) .pub-cover img,
#publications .pub-card:nth-child(2) .pub-cover img,
#publications .pub-card:nth-child(3) .pub-cover img,
#publications .pub-card:nth-child(4) .pub-cover img,
#publications .pub-card:nth-child(5) .pub-cover img,
#publications .pub-card:nth-child(6) .pub-cover img {
    box-sizing: border-box !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 100% !important;
    min-height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    object-fit: fill !important;
    object-position: center center !important;
    transform: none !important;
    clip-path: none !important;
    -webkit-clip-path: none !important;
}
#publications .pub-body {
    border-top: 0 !important;
}
@media (max-width: 700px) {
    #publications .pub-cover,
    #publications .pub-card:nth-child(1) .pub-cover,
    #publications .pub-card:nth-child(2) .pub-cover,
    #publications .pub-card:nth-child(3) .pub-cover,
    #publications .pub-card:nth-child(4) .pub-cover,
    #publications .pub-card:nth-child(5) .pub-cover,
    #publications .pub-card:nth-child(6) .pub-cover {
        height: 220px !important;
        min-height: 220px !important;
        padding: 2px !important;
    }
}
@media (max-width: 420px) {
    #publications .pub-cover,
    #publications .pub-card:nth-child(1) .pub-cover,
    #publications .pub-card:nth-child(2) .pub-cover,
    #publications .pub-card:nth-child(3) .pub-cover,
    #publications .pub-card:nth-child(4) .pub-cover,
    #publications .pub-card:nth-child(5) .pub-cover,
    #publications .pub-card:nth-child(6) .pub-cover {
        height: 200px !important;
        min-height: 200px !important;
        padding: 2px !important;
    }
}

/* Все 6 журналов: одинаковая геометрия обложки и одинаковая сверхтонкая белая каёмка. */
#publications .pubs-grid {
    align-items: stretch !important;
}
#publications .pub-card,
#publications .pub-card:nth-child(1),
#publications .pub-card:nth-child(2),
#publications .pub-card:nth-child(3),
#publications .pub-card:nth-child(4),
#publications .pub-card:nth-child(5),
#publications .pub-card:nth-child(6) {
    overflow: hidden !important;
}
#publications .pub-cover,
#publications .pub-card:nth-child(1) .pub-cover,
#publications .pub-card:nth-child(2) .pub-cover,
#publications .pub-card:nth-child(3) .pub-cover,
#publications .pub-card:nth-child(4) .pub-cover,
#publications .pub-card:nth-child(5) .pub-cover,
#publications .pub-card:nth-child(6) .pub-cover {
    box-sizing: border-box !important;
    width: 100% !important;
    height: 300px !important;
    min-height: 300px !important;
    padding: 2px !important;
    margin: 0 !important;
    display: flex !important;
    align-items: stretch !important;
    justify-content: stretch !important;
    background: #fff !important;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    overflow: hidden !important;
}
#publications .pub-cover img,
#publications .pub-card:nth-child(1) .pub-cover img,
#publications .pub-card:nth-child(2) .pub-cover img,
#publications .pub-card:nth-child(3) .pub-cover img,
#publications .pub-card:nth-child(4) .pub-cover img,
#publications .pub-card:nth-child(5) .pub-cover img,
#publications .pub-card:nth-child(6) .pub-cover img {
    box-sizing: border-box !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 100% !important;
    min-height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    object-fit: fill !important;
    object-position: center !important;
    background: transparent !important;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    filter: none !important;
    transform: none !important;
    border-radius: 0 !important;
    clip-path: none !important;
    -webkit-clip-path: none !important;
}
#publications .pub-body {
    border-top: 0 !important;
}
@media (max-width:700px) {
    #publications .pub-cover,
    #publications .pub-card:nth-child(1) .pub-cover,
    #publications .pub-card:nth-child(2) .pub-cover,
    #publications .pub-card:nth-child(3) .pub-cover,
    #publications .pub-card:nth-child(4) .pub-cover,
    #publications .pub-card:nth-child(5) .pub-cover,
    #publications .pub-card:nth-child(6) .pub-cover {
        height: 220px !important;
        min-height: 220px !important;
        padding: 2px !important;
    }
}
@media (max-width:420px) {
    #publications .pub-cover,
    #publications .pub-card:nth-child(1) .pub-cover,
    #publications .pub-card:nth-child(2) .pub-cover,
    #publications .pub-card:nth-child(3) .pub-cover,
    #publications .pub-card:nth-child(4) .pub-cover,
    #publications .pub-card:nth-child(5) .pub-cover,
    #publications .pub-card:nth-child(6) .pub-cover {
        height: 200px !important;
        min-height: 200px !important;
        padding: 2px !important;
    }
}

/* 07.09.2026 — только мобильная версия.
   На ПК ничего не меняем. На мобильном возвращаем обложкам
   нормальные портретные пропорции, сохраняя одинаковую тонкую каёмку. */
@media (max-width: 700px) {
    #publications .pub-cover,
    #publications .pub-card:nth-child(1) .pub-cover,
    #publications .pub-card:nth-child(2) .pub-cover,
    #publications .pub-card:nth-child(3) .pub-cover,
    #publications .pub-card:nth-child(4) .pub-cover,
    #publications .pub-card:nth-child(5) .pub-cover,
    #publications .pub-card:nth-child(6) .pub-cover {
        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        aspect-ratio: 230 / 368 !important;
        padding: 2px !important;
        background: #ffffff !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    #publications .pub-cover img,
    #publications .pub-card:nth-child(1) .pub-cover img,
    #publications .pub-card:nth-child(2) .pub-cover img,
    #publications .pub-card:nth-child(3) .pub-cover img,
    #publications .pub-card:nth-child(4) .pub-cover img,
    #publications .pub-card:nth-child(5) .pub-cover img,
    #publications .pub-card:nth-child(6) .pub-cover img {
        width: 100% !important;
        height: 100% !important;
        min-width: 0 !important;
        min-height: 0 !important;
        max-width: 100% !important;
        max-height: 100% !important;
        object-fit: contain !important;
        object-position: center center !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #ffffff !important;
        border: 0 !important;
        outline: 0 !important;
        box-shadow: none !important;
        transform: none !important;
    }
}

/* 08.09.2026 — на мобильной версии все карточки лабораторий имеют одинаковый шрифт */
@media (max-width: 700px) {
    .labs-grid .lab-card h4,
    .labs-grid .lab-card:last-child h4 {
        font-size: 17px !important;
        line-height: 1.25 !important;
        font-weight: 700 !important;
        letter-spacing: normal !important;
        white-space: normal !important;
    }
}

/* ПК: размеры изображения логотипа не меняются. */
@media (min-width: 769px) {
  header .logo > .logo-tagline,
  header .logo .logo-tagline {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    margin-left: 0 !important;
    padding: 0 !important;
    text-align: left !important;
    overflow: visible !important;
  }
  header .logo .logo-tagline > span {
    display: inline-block !important;
    width: max-content !important;
    min-width: 0 !important;
    max-width: none !important;
    white-space: nowrap !important;
    text-align: left !important;
  }
}

/* iPhone / мобильные: один чистый набор правил, без конфликтующих старых правок. */
@media (max-width: 768px) {
  header {
    height: 112px !important;
    min-height: 112px !important;
    padding: 8px 18px 7px !important;
    box-sizing: border-box !important;
    align-items: center !important;
  }
  body { padding-top: 112px !important; }
  .hero { margin-top: 0 !important; padding-top: 12px !important; }

  header .logo,
  body > header .logo {
    width: 160px !important;
    min-width: 160px !important;
    max-width: 160px !important;
    flex: 0 0 160px !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: center !important;
  }

  header .logo .logo-img,
  header .logo img.logo-img,
  header .logo > img {
    width: 160px !important;
    min-width: 160px !important;
    max-width: 160px !important;
    height: auto !important;
    display: block !important;
    object-fit: contain !important;
    margin: 0 !important;
  }

  header .logo > .logo-tagline,
  header .logo .logo-tagline {
    display: block !important;
    width: 160px !important;
    min-width: 160px !important;
    max-width: 160px !important;
    margin: 4px 0 0 0 !important;
    padding: 0 !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    line-height: 1.02 !important;
    letter-spacing: 0 !important;
    text-align: center !important;
    white-space: normal !important;
    overflow: visible !important;
    box-sizing: border-box !important;
    transform: none !important;
  }

  header .logo > .logo-tagline > span,
  header .logo .logo-tagline > span {
    display: block !important;
    width: 160px !important;
    min-width: 160px !important;
    max-width: 160px !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    line-height: 1.02 !important;
    letter-spacing: 0 !important;
    text-align: center !important;
    white-space: nowrap !important;
    overflow: visible !important;
    box-sizing: border-box !important;
    transform: none !important;
  }

  label#burger,
  #burger {
    margin: 0 !important;
  }

  /* Сохраняем нужную правку номера документа из прежних блоков. */
  .lic-grid .lic-card[href$="/docs/vypiska-sro-i-2025.pdf"] > span {
    font-size: 14.5px !important;
    line-height: 1.35 !important;
  }
  .lic-grid .lic-card[href$="/docs/vypiska-sro-i-2025.pdf"] .doc-number-inline {
    display: block !important;
    width: 100% !important;
    margin-top: 2px !important;
    white-space: nowrap !important;
  }
}

/* 09.09.2026 — финальные правки по замечаниям клиента */

/* 1) Подпись у логотипа вернуть к обычному начертанию, не жирному. */
header .logo .logo-tagline,
header .logo > .logo-tagline,
header .logo .logo-tagline > span,
header .logo > .logo-tagline > span {
    font-weight: 400 !important;
}

/* 2) На мобильной версии в блоке «Документация» сделать единый шрифт
      во всех карточках документов. */
@media (max-width: 768px) {
    #licenses .lic-grid .lic-card > span {
        font-size: 13.5px !important;
        line-height: 1.32 !important;
        font-weight: 600 !important;
        letter-spacing: 0 !important;
    }

    #licenses .lic-grid .lic-card > span .doc-number-inline {
        font-size: inherit !important;
        line-height: inherit !important;
        font-weight: inherit !important;
        letter-spacing: 0 !important;
        white-space: nowrap !important;
    }
}

/* ПК: сохраняем исходный вид v26 без изменений. */
#licenses .lic-text-desktop { display: block; }
#licenses .lic-text-mobile { display: none; }

/* Мобильная версия: у каждого документа строго две строки;
   знак № никогда не отрывается от номера. */
@media (max-width: 768px) {
  #licenses .lic-text-desktop {
    display: none !important;
  }

  #licenses .lic-text-mobile {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    flex: 1 1 auto !important;
    font-size: 12.2px !important;
    line-height: 1.28 !important;
    font-weight: 600 !important;
    letter-spacing: 0 !important;
    text-align: center !important;
  }

  #licenses .lic-text-mobile .lic-mobile-line {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    flex: none !important;
    margin: 0 !important;
    padding: 0 !important;
    font: inherit !important;
    line-height: 1.28 !important;
    letter-spacing: 0 !important;
    text-align: center !important;
    white-space: nowrap !important;
  }

  /* Чуть уменьшаем только самые длинные мобильные подписи,
     чтобы они гарантированно оставались ровно в 2 строки. */
  #licenses .lic-card[href$="/docs/svidetelstvo-akkreditaciya-il-lri-02723.pdf"] .lic-text-mobile,
  #licenses .lic-card[href$="/docs/vypiska-sro-s-2026.pdf"] .lic-text-mobile,
  #licenses .lic-card[href$="/docs/vypiska-sro-p-2026.pdf"] .lic-text-mobile {
    font-size: 11.4px !important;
  }
}

/* 10.09.2026 — мобильная версия: абсолютно одинаковый шрифт
   во всех карточках раздела «Документация». ПК не меняем. */
@media (max-width: 768px) {
  #licenses .lic-grid .lic-card .lic-text-mobile,
  #licenses .lic-grid .lic-card .lic-text-mobile .lic-mobile-line {
    font-family: 'Inter', sans-serif !important;
    font-size: 12.2px !important;
    font-weight: 600 !important;
    line-height: 1.28 !important;
    letter-spacing: 0 !important;
  }

  #licenses .lic-grid .lic-card .lic-text-mobile {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    text-align: center !important;
  }

  #licenses .lic-grid .lic-card .lic-text-mobile .lic-mobile-line {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: center !important;
    white-space: nowrap !important;
  }
}

/* 10.09.2026 — только мобильная версия:
   немного увеличиваем одинаковый шрифт во всех карточках документации. */
@media (max-width: 768px) {
  #licenses .lic-grid .lic-card .lic-text-mobile,
  #licenses .lic-grid .lic-card .lic-text-mobile .lic-mobile-line {
    font-size: 12.7px !important;
  }
}

/* 10.09.2026 — ПК: выравниваем разделительные полоски
   над авторами отзывов строго по одному уровню. */
@media (min-width: 701px) {
  #reviews .review-author {
    height: 76px !important;
    min-height: 76px !important;
    box-sizing: border-box !important;
  }
}

/* Мобильная версия: скругляем ТОЛЬКО верхние углы самих изображений журналов.
   Белую каемку/карточку не меняем. Радиус = радиус карточки (12px) минус каемка (2px). */
@media (max-width: 768px) {
    #publications .pub-card,
    #publications .pub-card:nth-child(1),
    #publications .pub-card:nth-child(2),
    #publications .pub-card:nth-child(3),
    #publications .pub-card:nth-child(4),
    #publications .pub-card:nth-child(5),
    #publications .pub-card:nth-child(6) {
        border-radius: 12px !important;
        overflow: hidden !important;
    }

    #publications .pub-cover,
    #publications .pub-card:nth-child(1) .pub-cover,
    #publications .pub-card:nth-child(2) .pub-cover,
    #publications .pub-card:nth-child(3) .pub-cover,
    #publications .pub-card:nth-child(4) .pub-cover,
    #publications .pub-card:nth-child(5) .pub-cover,
    #publications .pub-card:nth-child(6) .pub-cover {
        border-radius: 0 !important;
        overflow: hidden !important;
    }

    #publications .pub-cover img,
    #publications .pub-card:nth-child(1) .pub-cover img,
    #publications .pub-card:nth-child(2) .pub-cover img,
    #publications .pub-card:nth-child(3) .pub-cover img,
    #publications .pub-card:nth-child(4) .pub-cover img,
    #publications .pub-card:nth-child(5) .pub-cover img,
    #publications .pub-card:nth-child(6) .pub-cover img {
        border-radius: 10px 10px 0 0 !important;
        overflow: hidden !important;
        clip-path: inset(0 round 10px 10px 0 0) !important;
        -webkit-clip-path: inset(0 round 10px 10px 0 0) !important;
    }
}

/* MB2 integration and accessibility additions. */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 112px;
}
body.expertstroy-menu-open {
    overflow: hidden !important;
}
header nav a,
header nav a:hover,
header nav a:focus,
header nav a.active {
    text-decoration: none !important;
}
header nav a::after {
    transition: width 0.2s ease !important;
}
.footer-nav a {
    position: relative;
    padding-bottom: 5px;
}
.footer-nav a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background: var(--accent-red);
    transition: width 0.2s ease;
}
.footer-nav a:hover,
.footer-nav a.active {
    color: var(--accent-red);
}
.footer-nav a:hover::after,
.footer-nav a.active::after {
    width: 100%;
}
header nav a:focus:not(:focus-visible),
.footer-nav a:focus:not(:focus-visible) {
    outline: none !important;
    box-shadow: none !important;
}
a:focus-visible,
button:focus-visible,
[role='button']:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid #f6b500 !important;
    outline-offset: 3px !important;
}
.expertstroy-system-page {
    min-height: 55vh;
    padding-top: 40px;
    padding-bottom: 64px;
}
.expertstroy-alerts {
    position: relative;
    z-index: 30;
}
.nav-close {
    border: 0;
    background: transparent;
    cursor: pointer;
}
#mobile-nav .nav-close {
    color: #fff !important;
    opacity: 1 !important;
}

/* Stable MB2 viewport: one root scrollbar and a finite loading cover. */
html {
    overflow-y: auto !important;
}
body.expertstroy-home {
    height: auto !important;
    min-height: 100% !important;
    overflow: visible !important;
}
#loading-cover {
    position: fixed !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100vh !important;
    height: 100dvh !important;
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    align-items: center !important;
    overflow: hidden !important;
}

/* Keep the standard MB2 cookie notice above landing decorations. */
#cookie-notification.cookie-notification {
    right: 16px !important;
    bottom: 16px !important;
    width: min(400px, calc(100vw - 32px)) !important;
    max-height: calc(100vh - 32px) !important;
    max-height: calc(100dvh - 32px) !important;
    overflow-y: auto !important;
    z-index: 5000 !important;
    transition: none !important;
}
#cookie-notification .cookie-content {
    padding: 18px 20px !important;
}
#cookie-notification .cookie-content__text {
    margin: 0 !important;
    padding: 0 24px 12px 0 !important;
    color: var(--text-main) !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
}
#cookie-notification #buttonCookie {
    min-height: 38px !important;
    padding: 9px 20px !important;
    font-size: 14px !important;
    line-height: 1.2 !important;
}
body.expertstroy-menu-open #cookie-notification {
    visibility: hidden !important;
    pointer-events: none !important;
}

@media (max-width: 768px) {
    #mobile-nav {
        right: auto !important;
        width: 100vw !important;
        max-width: none !important;
        height: 100vh !important;
        height: 100dvh !important;
        max-height: 100vh !important;
        max-height: 100dvh !important;
        padding: 64px 24px 20px !important;
        padding-top: max(64px, calc(env(safe-area-inset-top) + 48px)) !important;
        padding-bottom: max(20px, env(safe-area-inset-bottom)) !important;
        gap: 0 !important;
        overflow-y: auto !important;
        overscroll-behavior: contain;
    }
    #mobile-nav .nav-close {
        top: max(18px, env(safe-area-inset-top)) !important;
        right: 24px !important;
    }
    #mobile-nav > a:not(.mobile-presentation-download):not(.mobile-contact-link) {
        padding: 9px 0 !important;
        font-size: clamp(16px, 4.6vw, 19px) !important;
        line-height: 1.3 !important;
    }
    #mobile-nav .mobile-presentation-download {
        margin: 10px 0 4px !important;
        padding: 11px 14px !important;
        font-size: 15px !important;
        line-height: 1.2 !important;
    }
    #mobile-nav .mobile-contact-link {
        margin: 0 !important;
        padding: 6px 0 !important;
        font-size: 15px !important;
        line-height: 1.25 !important;
    }
    #cookie-notification.cookie-notification {
        left: 12px !important;
        right: 12px !important;
        bottom: 12px !important;
        bottom: max(12px, env(safe-area-inset-bottom)) !important;
        width: auto !important;
        max-height: calc(100vh - 136px) !important;
        max-height: calc(100dvh - 136px) !important;
    }
    #cookie-notification.expertstroy-cookie-inline.cookie-notification {
        position: relative !important;
        inset: auto !important;
        width: 100% !important;
        max-height: none !important;
        margin: 14px 0 0 !important;
        overflow: visible !important;
        text-align: left !important;
    }
    #cookie-notification .cookie-content {
        padding: 12px 16px !important;
    }
    #cookie-notification .cookie-content__text {
        padding: 0 24px 7px 0 !important;
        font-size: 12.5px !important;
        line-height: 1.35 !important;
    }
    #cookie-notification #buttonCookie {
        min-height: 34px !important;
        padding: 7px 18px !important;
        font-size: 13px !important;
    }
}

@media (min-width: 769px) and (max-width: 1180px) {
    #mobile-nav {
        height: 100vh !important;
        height: 100dvh !important;
        max-height: 100vh !important;
        max-height: 100dvh !important;
        overflow-y: auto !important;
        overscroll-behavior: contain;
    }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
    .reveal { opacity: 1 !important; transform: none !important; }
}

/* Единый фирменный блок логотипа с юридическим названием. */
@media (min-width: 1181px) {
    header .logo .logo-img {
        width: 180px !important;
        min-width: 180px !important;
        max-width: 180px !important;
        height: auto !important;
        margin: 0 auto !important;
    }
    header .logo > .logo-tagline,
    header .logo .logo-tagline {
        width: 180px !important;
        min-width: 180px !important;
        max-width: 180px !important;
        align-items: center !important;
        margin: 5px 0 0 !important;
        text-align: center !important;
    }
    header .logo .logo-tagline > span {
        text-align: center !important;
    }
}

@media (min-width: 769px) and (max-width: 1180px) {
    header .logo {
        width: 155px !important;
        min-width: 155px !important;
        max-width: 155px !important;
        flex-basis: 155px !important;
        align-items: center !important;
    }
    header .logo .logo-img {
        width: 145px !important;
        min-width: 145px !important;
        max-width: 145px !important;
        height: auto !important;
        margin: 0 auto !important;
    }
    header .logo > .logo-tagline,
    header .logo .logo-tagline {
        width: 145px !important;
        min-width: 145px !important;
        max-width: 145px !important;
        align-items: center !important;
        margin: 4px 0 0 !important;
        font-size: 11px !important;
        line-height: 1.04 !important;
        text-align: center !important;
    }
    header .logo .logo-tagline > span {
        font-size: 11px !important;
        line-height: 1.04 !important;
        text-align: center !important;
    }
}

@media (max-width: 768px) {
    header .logo,
    body > header .logo {
        width: 145px !important;
        min-width: 145px !important;
        max-width: 145px !important;
        flex-basis: 145px !important;
        align-items: center !important;
    }
    header .logo picture,
    header .logo .logo-picture {
        display: block !important;
        width: 142px !important;
        min-width: 142px !important;
        max-width: 142px !important;
        margin: 0 auto !important;
        line-height: 0 !important;
    }
    header .logo .logo-img,
    header .logo img.logo-img,
    header .logo > img {
        width: 142px !important;
        min-width: 142px !important;
        max-width: 142px !important;
        height: auto !important;
        margin: 0 auto !important;
        display: block !important;
    }
    header .logo > .logo-legal,
    header .logo .logo-legal {
        display: block !important;
        width: 132px !important;
        min-width: 132px !important;
        max-width: 132px !important;
        margin: 3px auto 2px !important;
        font-family: 'Arial Narrow', Arial, sans-serif !important;
        font-size: 5px !important;
        line-height: 1 !important;
        font-weight: 800 !important;
        text-transform: uppercase !important;
        color: #0D2C6B !important;
        white-space: nowrap !important;
        text-align: center !important;
        letter-spacing: -0.05px !important;
    }
    header .logo > .logo-tagline,
    header .logo .logo-tagline {
        width: 145px !important;
        min-width: 145px !important;
        max-width: 145px !important;
        margin: 0 !important;
        font-size: 12px !important;
        line-height: 1.04 !important;
        text-align: center !important;
    }
    header .logo > .logo-tagline > span,
    header .logo .logo-tagline > span {
        width: 145px !important;
        min-width: 145px !important;
        max-width: 145px !important;
        font-size: 12px !important;
        line-height: 1.04 !important;
        text-align: center !important;
    }
}

/* В нижнем меню оставляем только фирменную полосу. */
.footer-nav a,
.footer-nav a:hover,
.footer-nav a:focus,
.footer-nav a:active,
.footer-nav a.active {
    text-decoration: none !important;
}


/* Mobile logo legal line (variant 2: centered under the logo). */
header .logo .logo-legal,
header .logo > .logo-legal {
    display: none;
}


/* 09.10.2026 — final logo size adjustment: make header logo neater on desktop and mobile */
@media (min-width: 769px) {
    header {
        height: 104px !important;
        min-height: 104px !important;
        padding: 8px 18px !important;
    }
    body { padding-top: 104px !important; }
    header .logo,
    body > header .logo {
        width: 132px !important;
        min-width: 132px !important;
        max-width: 132px !important;
        flex: 0 0 132px !important;
        flex-basis: 132px !important;
    }
    header .logo picture,
    header .logo .logo-picture,
    header .logo .logo-img,
    header .logo img.logo-img,
    header .logo > img {
        width: 132px !important;
        min-width: 132px !important;
        max-width: 132px !important;
        height: auto !important;
    }
}

@media (max-width: 768px) {
    header {
        height: 98px !important;
        min-height: 98px !important;
        padding: 8px 16px 6px !important;
    }
    body { padding-top: 98px !important; }
    .hero { padding-top: 10px !important; }
    header .logo,
    body > header .logo {
        width: 124px !important;
        min-width: 124px !important;
        max-width: 124px !important;
        flex: 0 0 124px !important;
        flex-basis: 124px !important;
        align-items: flex-start !important;
    }
    header .logo picture,
    header .logo .logo-picture,
    header .logo .logo-img,
    header .logo img.logo-img,
    header .logo > img {
        width: 124px !important;
        min-width: 124px !important;
        max-width: 124px !important;
        height: auto !important;
        margin: 0 !important;
    }
}


/* 09.10.2026 — visual balance pass for approved logo */
@media (min-width: 769px) {
    header {
        height: 118px !important;
        min-height: 118px !important;
        padding: 10px 20px 8px !important;
        align-items: center !important;
    }
    body { padding-top: 118px !important; }

    header .logo,
    body > header .logo {
        width: 148px !important;
        min-width: 148px !important;
        max-width: 148px !important;
        flex: 0 0 148px !important;
        flex-basis: 148px !important;
        justify-content: center !important;
    }

    header .logo picture,
    header .logo .logo-picture,
    header .logo .logo-img,
    header .logo img.logo-img,
    header .logo > img {
        width: 148px !important;
        min-width: 148px !important;
        max-width: 148px !important;
        height: auto !important;
        margin: 0 !important;
        display: block !important;
    }
}

@media (max-width: 768px) {
    header {
        height: 106px !important;
        min-height: 106px !important;
        padding: 8px 16px 6px !important;
        align-items: center !important;
    }
    body { padding-top: 106px !important; }
    .hero { padding-top: 8px !important; }

    header .logo,
    body > header .logo {
        width: 132px !important;
        min-width: 132px !important;
        max-width: 132px !important;
        flex: 0 0 132px !important;
        flex-basis: 132px !important;
        justify-content: center !important;
        align-items: flex-start !important;
    }

    header .logo picture,
    header .logo .logo-picture,
    header .logo .logo-img,
    header .logo img.logo-img,
    header .logo > img {
        width: 132px !important;
        min-width: 132px !important;
        max-width: 132px !important;
        height: auto !important;
        margin: 0 !important;
        display: block !important;
    }
}


/* 09.10.2026 — desktop header rebalance for approved logo (no edits to logo artwork) */
@media (min-width: 769px) {
    header {
        height: 128px !important;
        min-height: 128px !important;
        padding: 10px 24px 8px !important;
        align-items: center !important;
        column-gap: 18px !important;
    }
    body { padding-top: 128px !important; }
    .hero { margin-top: 0 !important; }

    header .logo,
    body > header .logo {
        width: 170px !important;
        min-width: 170px !important;
        max-width: 170px !important;
        flex: 0 0 170px !important;
        flex-basis: 170px !important;
        display: flex !important;
        align-items: flex-start !important;
        justify-content: center !important;
        margin: 0 !important;
    }

    header .logo picture,
    header .logo .logo-picture,
    header .logo .logo-img,
    header .logo img.logo-img,
    header .logo > img {
        width: 170px !important;
        min-width: 170px !important;
        max-width: 170px !important;
        height: auto !important;
        display: block !important;
        margin: 0 !important;
    }

    header > nav {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
    }

    header > nav ul {
        justify-content: center !important;
        gap: 10px 18px !important;
    }

    header > nav a {
        font-size: 13px !important;
    }

    .header-contacts {
        width: 170px !important;
        min-width: 170px !important;
        text-align: right !important;
    }

    .header-contacts strong {
        font-size: 17px !important;
    }

    .header-email {
        font-size: 13px !important;
    }

    .header-qr {
        width: 72px !important;
        min-width: 72px !important;
        margin-left: 6px !important;
    }

    .header-qr img {
        width: 56px !important;
        height: 56px !important;
    }
}


/* 09.10.2026 — fix desktop logo overflow and keep composition neat */
@media (min-width: 769px) {
    header {
        height: 120px !important;
        min-height: 120px !important;
        padding: 10px 22px 8px !important;
        overflow: hidden !important;
    }
    body { padding-top: 120px !important; }

    header .logo,
    body > header .logo {
        width: 150px !important;
        min-width: 150px !important;
        max-width: 150px !important;
        flex: 0 0 150px !important;
        flex-basis: 150px !important;
        justify-content: center !important;
        align-items: flex-start !important;
        overflow: hidden !important;
    }

    header .logo picture,
    header .logo .logo-picture,
    header .logo .logo-img,
    header .logo img.logo-img,
    header .logo > img {
        width: 150px !important;
        min-width: 150px !important;
        max-width: 150px !important;
        height: auto !important;
        display: block !important;
        margin: 0 !important;
    }
}
