﻿/* Базовые стили и переменные в духе index.html */
        * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Roboto', sans-serif; }
        html { scroll-behavior: smooth; scroll-padding-top: 100px; overflow-x: hidden; }
        body {
            background: linear-gradient(160deg, #f5e6c8 0%, #d4a574 45%, #b87d3a 100%);
            color: #333;
            overflow-x: hidden;
        }

        :root {
            --primary-color: #f5e6c8;
            --secondary-color: #e6c07a;
            --accent-color: #d4a017;
            --bg-color: #ffffff;
            --text-color: #333;
            --border-color: #e0e0e0;
            --shadow-sm: 0 2px 10px rgba(0,0,0,0.1);
            --shadow-md: 0 10px 30px rgba(0,0,0,0.12);
        }

        /* Header */
        header {
            position: fixed;
            top: 0; left: 0; right: 0;
            background: linear-gradient(135deg, #2c1810 0%, #4a2f14 45%, #5c3d1e 100%);
            backdrop-filter: blur(10px);
            z-index: 1000;
            padding: 8px 0 4px;
            transition: transform 0.3s;
            box-shadow: 0 4px 16px rgba(44, 24, 16, 0.35);
            border-bottom: 1px solid rgba(198, 134, 12, 0.25);
        }
        header.header-hidden {
            transform: translateY(calc(-1 * var(--header-height, 110px)));
        }
        header.scrolled:not(.header-hidden) {
            box-shadow: 0 6px 22px rgba(44, 24, 16, 0.42);
        }
        nav { max-width: 1400px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; padding: 0 20px; min-height: 0; }
        .logo { display: flex; align-items: center; }
        .logo img { height: 70px; }

        .header-center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; margin: 0 20px; text-decoration: none; color: inherit; cursor: pointer; }
        .company-name { position: relative; padding-bottom: 2px; }
        .company-name::after { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 60px; height: 3px; background: linear-gradient(90deg, transparent, var(--secondary-color), transparent); }
        .company-brand { display: block; width: 420px;
            height: auto;
            max-height: 68px; margin: 0 auto 0; object-fit: contain; object-position: center; }
        .company-name h1 { font-family: 'Playfair Display', serif; font-size: 28px; color: var(--primary-color); font-weight: 700; }
        @supports (-webkit-background-clip: text) {
            .company-name h1 { background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; color: transparent; }
        }
        .company-name p { font-size: 12px; color: var(--secondary-color); margin-top: 6px; font-weight: 500; font-style: italic; }

        /* Mobile Menu — точная копия из kontakt.html */
        .mobile-menu-toggle {
            display: flex;
            flex-direction: column;
            justify-content: center;
            cursor: pointer;
            padding: 10px;
            width: 40px;
            height: 40px;
            position: relative;
            animation: fadeInUp 0.8s ease-out 0.6s both;
            flex-shrink: 0;
        }

        .mobile-menu-toggle span {
            width: 30px;
            height: 4px;
            background: #2c1810;
            margin: 3px 0;
            transition: all 0.3s ease;
            position: absolute;
            left: 5px;
        }

        .mobile-menu-toggle span:nth-child(1) {
            top: 8px;
        }

        .mobile-menu-toggle span:nth-child(2) {
            top: 18px;
        }

        .mobile-menu-toggle span:nth-child(3) {
            top: 28px;
        }

        .mobile-menu-toggle.active span:nth-child(1) {
            transform: rotate(45deg);
            top: 18px;
        }

        .mobile-menu-toggle.active span:nth-child(2) {
            opacity: 0;
        }

        .mobile-menu-toggle.active span:nth-child(3) {
            transform: rotate(-45deg);
            top: 18px;
        }

        .mobile-menu {
            position: fixed;
            top: var(--header-height, 72px);
            left: 0;
            width: 100%;
            height: calc(100vh - var(--header-height, 72px));
            height: calc(100dvh - var(--header-height, 72px));
            background: linear-gradient(180deg, #2c1810 0%, #4a2f14 50%, #5c3d1e 100%);
            backdrop-filter: none;
            display: none;
            flex-direction: column;
            padding: 15px;
            box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
            z-index: 1001;
            transition: transform 0.3s ease-out, opacity 0.3s ease-out;
            transform: translateY(-100%);
            opacity: 0;
            overflow-y: auto;
        }

        .mobile-menu.active {
            display: flex;
            transform: translateY(0);
            opacity: 1;
        }

        .mobile-menu a {
            padding: 12px 10px;
            text-decoration: none;
            color: #f5e6c8;
            font-weight: 400;
            font-size: 16px;
            border-bottom: 1px solid rgba(198, 134, 12, 0.25);
            transition: color 0.3s, background 0.2s;
            border-radius: 8px;
            margin-bottom: 3px;
            text-align: center;
        }

        .mobile-menu a:hover, .mobile-menu a:active {
            color: #fff;
            background: linear-gradient(135deg, #c6860c 0%, #8b5a2b 100%);
            border-bottom-color: #e6c07a;
        }

        .mobile-menu a:last-child {
            border-bottom: none;
        }

        /* Mobile menu overlay */
        .mobile-menu-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: transparent;
            z-index: 1000;
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.3s ease, visibility 0.3s ease;
        }

        .mobile-menu-overlay.active {
            opacity: 1;
            visibility: visible;
        }
        @media (max-width: 768px) {
            .mobile-menu-overlay {
                display: none;
            }
        }

        /* Анимация как на главной */
        @keyframes fadeInUp {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }

        @media (max-width: 768px){
            .logo img { height: 50px; }
            nav { min-height: 50px; padding: 0 15px; }
            .company-name h1 { font-size: 20px; }
            .company-name p { font-size: 10px; }
            
            /* Мобильные стили меню */
            header { padding: 12px 0; }
            nav { min-height: 50px; }
            
            /* Скрываем заголовок меню и кнопку закрытия на мобильных устройствах */
            .menu-header { display: none !important; }
            .menu-close-btn { display: none !important; }
        }

        /* Desktop menu improvements — точная копия из kontakt.html */
        @media (min-width: 769px) {
            nav {
                position: relative;
            }
            
            .header-center {
                margin: 0 30px;
            }

            .company-name h1 {
                font-size: 32px;
            }

            .company-name p {
                font-size: 14px;
            }

            .company-name::after {
                width: 60px;
                height: 3px;
            }

            nav {
                min-height: 70px;
            }
            
            .mobile-menu-toggle {
                width: 45px;
                height: 45px;
                padding: 12px;
                position: relative;
                margin-left: 20px;
                flex-shrink: 0;
            }

            .mobile-menu-toggle span {
                width: 32px;
                height: 4px;
            }

            .mobile-menu-toggle span:nth-child(1) {
                top: 12px;
            }

            .mobile-menu-toggle span:nth-child(2) {
                top: 20px;
            }

            .mobile-menu-toggle span:nth-child(3) {
                top: 28px;
            }

            .mobile-menu-toggle.active span:nth-child(1) {
                top: 20px;
            }

            .mobile-menu-toggle.active span:nth-child(3) {
                top: 20px;
            }

            .mobile-menu {
                top: 0;
                width: 400px;
                left: auto;
                right: 0;
                height: 100vh;
                transform: translateX(100%);
                border-radius: 0;
                margin-top: 0;
                transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease-out;
                background: linear-gradient(180deg, #2c1810 0%, #3d2914 45%, #5c3d1e 100%);
                box-shadow: -10px 0 30px rgba(44, 24, 16, 0.45);
                backdrop-filter: none;
                border-left: 1px solid rgba(198, 134, 12, 0.35);
                padding: 50px 0 50px 0;
                display: flex;
                flex-direction: column;
                justify-content: flex-start;
                overflow-y: auto;
                z-index: 1002;
            }

            .mobile-menu.active {
                transform: translateX(0);
            }

            .mobile-menu a {
                padding: 25px 40px;
                font-size: 22px;
                font-weight: 500;
                color: #f5e6c8;
                text-decoration: none;
                display: block;
                position: relative;
                margin: 8px 30px;
                border-radius: 15px;
                transition: all 0.3s ease;
                border: none;
                background: transparent;
                text-align: left;
            }

            .mobile-menu a:hover {
                background: linear-gradient(135deg, #c6860c 0%, #8b5a2b 100%);
                color: white;
                transform: translateX(10px);
                box-shadow: 0 10px 25px rgba(198, 134, 12, 0.3);
            }

            .mobile-menu a::before {
                content: '';
                position: absolute;
                left: 0;
                top: 50%;
                width: 6px;
                height: 0;
                background: linear-gradient(to bottom, #c6860c, #8b5a2b);
                border-radius: 3px;
                transition: height 0.3s ease;
                transform: translateY(-50%);
            }

            .mobile-menu a:hover::before {
                height: 70%;
            }

            /* Кнопка закрытия меню */
            .menu-close-btn {
                position: absolute;
                top: 15px;
                right: 25px;
                width: 30px;
                height: 30px;
                cursor: pointer;
                z-index: 1003;
                display: flex;
                align-items: center;
                justify-content: center;
                padding: 5px;
                border-radius: 50%;
                transition: background 0.3s ease;
            }

            .menu-close-btn:hover {
                background: rgba(198, 134, 12, 0.25);
            }

            .menu-close-btn span {
                position: absolute;
                width: 20px;
                height: 2px;
                background: #e6c07a;
                transition: all 0.3s ease;
            }

            .menu-close-btn span:nth-child(1) {
                transform: rotate(45deg);
            }

            .menu-close-btn span:nth-child(2) {
                transform: rotate(-45deg);
            }

            .menu-close-btn:hover span {
                background: #c6860c;
            }

            /* Заголовок меню */
            .menu-header {
                display: block;
                padding: 0 40px 25px 40px;
                border-bottom: 1px solid rgba(198, 134, 12, 0.3);
                margin-bottom: 25px;
            }

            .menu-header h3 {
                font-family: 'Playfair Display', serif;
                font-size: 24px;
                color: #f5e6c8;
                margin: 0;
                font-weight: 700;
                text-align: left;
            }

            .mobile-menu-overlay {
                background: transparent;
                backdrop-filter: none;
                top: 0;
                height: 100vh;
            }
        }

        .mobile-menu.active {
            display: flex;
            transform: translateY(0);
            opacity: 1;
        }

        .mobile-menu a {
            padding: 12px 10px;
            text-decoration: none;
            color: #f5e6c8;
            font-weight: 400;
            font-size: 16px;
            border-bottom: 1px solid rgba(198, 134, 12, 0.25);
            transition: color 0.3s, background 0.2s;
            border-radius: 8px;
            margin-bottom: 3px;
            text-align: center;
        }

        .mobile-menu a:hover, .mobile-menu a:active {
            color: #fff;
            background: linear-gradient(135deg, #c6860c 0%, #8b5a2b 100%);
            border-bottom-color: #e6c07a;
        }

        .mobile-menu a:last-child {
            border-bottom: none;
        }

        /* Prevent content overlap when mobile menu is open - только для ПК */
        @media (min-width: 769px) {
            body.mobile-menu-open {
                overflow: hidden;
                height: 100vh;
            }
        }

        

        /* Сертификаты (галерея) */
        .certificates {
            padding: 110px 20px 90px;
            width: 100%;
            max-width: none;
            margin: 0;
            background: linear-gradient(160deg, #f5e6c8 0%, #d4a574 45%, #b87d3a 100%);
            position: relative;
        }
        .certificates h2 { font-family: 'Playfair Display', serif; font-size: 42px; color: #2c1810; text-align: center; margin-bottom: 50px; }
        .certificate-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
            gap: 28px;
            max-width: 1400px;
            margin: 0 auto;
            width: 100%;
        }
        .certificate-card { background: #fff; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-md); transition: transform .35s, box-shadow .35s; position: relative; height: 380px; display: flex; flex-direction: column; }
        .certificate-card:hover { transform: translateY(-10px); box-shadow: 0 15px 40px rgba(0,0,0,0.2); }
        .certificate-card img { width: 100%; height: 260px; object-fit: cover; flex: 0 0 auto; transition: transform .35s; }
        .certificate-card:hover img { transform: scale(1.06); }
        .certificate-card h3 { font-family: 'Playfair Display', serif; font-size: 18px; color: var(--primary-color); margin: 14px 16px 8px; font-weight: 700; }
        .certificate-card p { font-size: 14px; color: #666; margin: 0 16px 16px; line-height: 1.5; }
        .certificate-overlay { position: absolute; inset: 0; background: rgba(44, 24, 16, 0.82); opacity: 0; display: flex; align-items: center; justify-content: center; transition: opacity .3s; }
        .certificate-card:hover .certificate-overlay { opacity: 1; }
        .certificate-overlay button { color: #fff; background: transparent; border: 2px solid #fff; border-radius: 10px; padding: 12px 22px; font-weight: 700; cursor: pointer; transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease; }
        .certificate-overlay button:hover { background: #fff; color: var(--secondary-color); transform: translateY(-1px); box-shadow: 0 8px 20px rgba(0,0,0,0.2); }
        .certificate-overlay button:active { transform: translateY(0); box-shadow: 0 5px 15px rgba(0,0,0,0.15); }

        /* Затемнение выполняется общим overlay поверх всей страницы */

        @media (max-width: 480px){
            .certificates { padding: 90px 14px 50px; }
            .certificates h2 { font-size: 32px; margin-bottom: 32px; }
            .certificate-card { height: 340px; }
            .certificate-card img { height: 220px; }
        }

        /* Лайтбокс */
        .lightbox { position: fixed; inset: 0; background: rgba(0,0,0,0.85); display: none; align-items: center; justify-content: center; z-index: 2000; padding: 20px; }
        .lightbox.active { display: flex; }
        .lightbox-content { position: relative; max-width: min(92vw, 1200px); max-height: 86vh; display: flex; flex-direction: column; align-items: center; }
        .lightbox-image { max-width: 100%; max-height: 70vh; border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,0.4); }
        .lightbox-caption { color: #fff; margin-top: 12px; font-size: 16px; opacity: .95; text-align: center; }
        .lightbox-close { position: absolute; top: -10px; right: -10px; width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.15); color: #fff; border: none; font-size: 20px; cursor: pointer; transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease; }
        .lightbox-close:hover { background: rgba(255,255,255,0.25); transform: translateY(-1px); box-shadow: 0 8px 20px rgba(0,0,0,0.25); }
        .lightbox-close:active { transform: translateY(0); box-shadow: 0 5px 15px rgba(0,0,0,0.2); }
        .lightbox-nav { position: absolute; inset: 0; display: flex; align-items: center; justify-content: space-between; pointer-events: none; }
        .lightbox-btn { pointer-events: all; background: rgba(255,255,255,0.15); color: #fff; border: none; width: 44px; height: 44px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; font-size: 22px; transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease; }
        .lightbox-btn:hover { background: rgba(255,255,255,0.25); transform: translateY(-1px); box-shadow: 0 10px 25px rgba(0,0,0,0.25); }
        .lightbox-btn:active { transform: translateY(0); box-shadow: 0 6px 15px rgba(0,0,0,0.2); }

        /* Footer */
        footer, #contacts {
            padding: 60px 20px;
            background: #2c1810;
            color: #fff;
            text-align: center;
        }
        footer p, #contacts p {
            font-size: 16px;
            margin-bottom: 10px;
        }
        footer a, #contacts a {
            color: #e6c07a;
            text-decoration: none;
            transition: color 0.3s;
            padding: 5px;
        }
        footer a:hover, #contacts a:hover {
            color: #fff;
        }
        /* Light palette override */
        :root {
            --primary-color: #fff4df;
            --secondary-color: #f4bd62;
            --accent-color: #d99222;
            --bg-color: #fff8eb;
            --text-color: #3b2818;
            --border-color: rgba(194, 122, 36, 0.25);
        }

        body {
            background: #fff8eb !important;
            color: #3b2818;
        }

        header {
            background: linear-gradient(135deg, #fff0cf 0%, #f3c87f 50%, #e6ad61 100%) !important;
            border-bottom: 1px solid rgba(194, 122, 36, 0.25) !important;
            box-shadow: 0 4px 18px rgba(139, 90, 43, 0.18) !important;
        }

        .company-name h1 {
            color: #6f431b !important;
            background: linear-gradient(135deg, #6f431b, #b46f22) !important;
            -webkit-background-clip: text !important;
            -webkit-text-fill-color: transparent !important;
            background-clip: text !important;
            text-shadow: none !important;
        }

        .company-name p,
        .nav-links a {
            color: #7a4b1e !important;
        }

        .badge,
        .cta-button,
        .featured-btn,
        .submit-btn,
        .filter-btn.active {
            background: linear-gradient(135deg, #e9b34f 0%, #d99222 55%, #b86f24 100%) !important;
            color: #fff !important;
            border-color: rgba(255, 244, 223, 0.55) !important;
        }

        .mobile-menu-toggle span,
        .menu-close-btn span {
            background: #7a4b1e !important;
        }

        .mobile-menu {
            background: linear-gradient(180deg, #fff3d6 0%, #f0c987 55%, #e6ad61 100%) !important;
            border-left: 1px solid rgba(194, 122, 36, 0.25) !important;
            box-shadow: -10px 0 30px rgba(139, 90, 43, 0.2) !important;
        }

        .mobile-menu a,
        .menu-header h3 {
            color: #4a2f14 !important;
        }

        .mobile-menu a:hover,
        .mobile-menu a:active {
            background: linear-gradient(135deg, #e9b34f 0%, #c88942 100%) !important;
            color: #fff !important;
        }

        .hero,
        .news-hero,
        .contacts-hero,
        .about-hero {
            background: linear-gradient(135deg, #fff0cf 0%, #f3c87f 55%, #e6ad61 100%) !important;
            background-image: linear-gradient(135deg, rgba(255, 240, 207, 0.92), rgba(230, 173, 97, 0.9)) !important;
        }

        .products,
        .history,
        .achievements,
        .contacts-section,
        .certificates,
        .news-section {
            background: linear-gradient(160deg, #fff8eb 0%, #f3d49a 48%, #e6ad61 100%) !important;
        }

        .about,
        .values,
        .cta-section,
        .featured-news {
            background: linear-gradient(160deg, #fff3d6 0%, #f0c987 50%, #dda45c 100%) !important;
        }

        .hero h1,
        .hero p,
        .news-hero h1,
        .news-hero p,
        .contacts-hero h1,
        .contacts-hero p,
        .about h2,
        .about p,
        .values h2,
        .values > p,
        .cta-section h2,
        .cta-section p,
        .featured-news h2,
        .featured-news p,
        .section h2,
        .section p {
            color: #3b2818 !important;
            text-shadow: none !important;
        }

        .product-item,
        .news-card,
        .value-card,
        .contact-info,
        .contact-form,
        .map-card,
        .certificate-card {
            background: rgba(255, 252, 245, 0.96) !important;
            border-color: rgba(194, 122, 36, 0.22) !important;
            box-shadow: 0 12px 30px rgba(139, 90, 43, 0.14) !important;
        }

        footer,
        #contacts {
            background: linear-gradient(135deg, #fff0cf 0%, #f3c87f 55%, #e6ad61 100%) !important;
            color: #3b2818 !important;
            border-top: 1px solid rgba(194, 122, 36, 0.25) !important;
        }

        footer a,
        #contacts a {
            color: #7a4b1e !important;
        }

        .about {
            background:
                radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.8) 0%, transparent 28%),
                radial-gradient(circle at 88% 12%, rgba(244, 189, 98, 0.45) 0%, transparent 32%),
                linear-gradient(145deg, #fff9ee 0%, #f7deb0 52%, #edbd78 100%) !important;
        }

        .cta-section {
            background:
                radial-gradient(circle at 18% 22%, rgba(255, 255, 255, 0.72) 0%, transparent 28%),
                radial-gradient(circle at 84% 76%, rgba(255, 181, 107, 0.46) 0%, transparent 32%),
                linear-gradient(135deg, #ffe8bf 0%, #efad5d 52%, #c97a35 100%) !important;
        }

        .certificates {
            width: 100% !important;
            max-width: none !important;
            margin: 0 !important;
        }
