/* ===== RESET & BASE ===== */
        *, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
        html { scroll-behavior: smooth; }
        /* Акцентный рыжий цвет для текста */
        .orange-text { color: #ff6600; }
        /* Переход по якорям: секции отступают на высоту sticky-хедера,
           иначе заголовок секции прячется под ним */
        section[id] { scroll-margin-top: 90px; }
        body {
            font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
            color: #333;
            line-height: 1.6;
            /* Тёмно-синий фон: светлее футера (#1a1a2e), в палитре сайта */
            background: #2b3f63;
        }
        a { color: inherit; text-decoration: none; }
        ul { list-style: none; }
        img { max-width: 100%; display: block; }
        .container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

        /* ===== TOP BAR ===== */
        .top-bar {
            background: #1a1a2e;
            color: #ccc;
            font-size: 13px;
            padding: 8px 0;
        }
        .top-bar .container {
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 10px;
        }
        .top-bar a { color: #aaa; transition: color .2s; }
        .top-bar a:hover { color: #fff; }
        .top-bar-left { display: flex; align-items: center; gap: 20px; }
        .top-bar-right { display: flex; align-items: center; gap: 20px; }
        .top-bar-right .phone { font-size: 15px; color: #fff; font-weight: 600; }

        /* ===== HEADER ===== */
        header {
            background: #16213e;
            padding: 15px 0;
            box-shadow: 0 2px 10px rgba(0,0,0,.3);
            position: sticky;
            top: 0;
            z-index: 1000;
        }
        header .container {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .logo {
            font-size: 26px;
            font-weight: 800;
            color: #fff;
            letter-spacing: 1px;
        }
        /* «ПЕНЕТРОН» — тёмно-синий (как фон хедера) текст на светло-белой плашке */
        .logo-brand {
            color: #16213e;
            background: #f7f5f0;
            padding: 2px 8px;
            border-radius: 4px;
        }
        /* «ИВАНОВО» — белый текст на рыжем плашке, только это слово */
        .logo-city {
            color: #fff;
            background: #ff6600;
            padding: 2px 8px;
            border-radius: 4px;
        }
        nav ul { display: flex; gap: 25px; }
        nav a {
            color: #ddd;
            font-size: 14px;
            font-weight: 500;
            text-transform: uppercase;
            letter-spacing: .5px;
            transition: color .2s;
            position: relative;
        }
        nav a:hover { color: #ff6600; }
        nav a::after {
            content: '';
            position: absolute;
            bottom: -4px;
            left: 0;
            width: 0;
            height: 2px;
            background: #ff6600;
            transition: width .3s;
        }
        nav a:hover::after { width: 100%; }

        /* ===== HERO ===== */
        .hero {
            background: linear-gradient(135deg, #0f3460 0%, #16213e 50%, #1a1a2e 100%);
            color: #ff6600;
            padding: 100px 0;
            text-align: center;
            position: relative;
            overflow: hidden;
        }
        .hero::before {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: radial-gradient(circle at 30% 50%, rgba(255,102,0,.1) 0%, transparent 50%);
            animation: heroPulse 8s ease-in-out infinite;
        }
        @keyframes heroPulse {
            0%, 100% { transform: scale(1); }
            50% { transform: scale(1.1); }
        }
        .hero h1 {
            font-size: 48px;
            font-weight: 800;
            margin-bottom: 20px;
            position: relative;
            z-index: 1;
        }
        .hero p {
            font-size: 18px;
            max-width: 700px;
            margin: 0 auto 40px;
            opacity: .9;
            position: relative;
            z-index: 1;
        }
        .hero-buttons {
            display: flex;
            gap: 20px;
            justify-content: center;
            flex-wrap: wrap;
            position: relative;
            z-index: 1;
        }
        .btn {
            display: inline-block;
            padding: 14px 36px;
            border-radius: 4px;
            font-size: 15px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: .5px;
            transition: all .3s;
            cursor: pointer;
            border: none;
        }
        .btn-primary {
            background: #ff6600;
            color: #fff;
        }
        .btn-primary:hover { background: #cc5200; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(255,102,0,.4); }
        .btn-outline {
            background: transparent;
            color: #fff;
            border: 2px solid #fff;
        }
        /* Hover-анимация как у .btn-primary: тот же подъём и тень
           (тень белая — под светлую обводку кнопки) */
        .btn-outline:hover { background: #fff; color: #16213e; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(255,255,255,.25); }
        /* Кнопка на всю ширину контейнера (inline-стиль style= блокирует CSP) */
        .btn-block { width: 100%; }

        /* ===== ADVANTAGES ===== */
        .advantages {
            padding: 80px 0;
            background: #f8f9fa;
        }
        .advantages-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 30px;
        }
        .advantage-card {
            background: #fff;
            padding: 40px 30px;
            border-radius: 8px;
            text-align: center;
            box-shadow: 0 4px 15px rgba(0,0,0,.06);
            transition: transform .3s, box-shadow .3s;
            overflow: hidden; /* картинка-в-край скругляется по углу карточки */
        }
        .advantage-card:hover { transform: translateY(-5px); box-shadow: 0 8px 30px rgba(0,0,0,.1); }
        /* Фото в карточке преимущества: в край (компенсируем padding), во всю ширину */
        .advantage-img img { width: 100%; height: auto; display: block; }
        .advantage-icon {
            width: 70px;
            height: 70px;
            background: linear-gradient(135deg, #ff6600, #0f3460);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 20px;
            font-size: 28px;
            color: #fff;
        }
        .advantage-card h3 { font-size: 18px; margin-bottom: 12px; color: #16213e; }
        .advantage-card p { font-size: 14px; color: #666; }
        /* Основной текст карточки — по левому краю (заголовок и иконка остаются по центру) */
        .advantage-desc { text-align: left; }
        /* Типовые узлы в конце блока преимуществ: ссылки на архивы
           (базовое a { color: inherit } сделало бы их неотличимыми от текста).
           Размер как у .section-title p, цвет — тёмно-синий «ПЕНЕТРОН» (.logo-brand) */
        .advantages-files { margin-top: 30px; text-align: center; font-size: 16px; color: #16213e; }
        .advantages-files a { color: #ff6600; font-weight: 600; }
        .advantages-files a:hover { text-decoration: underline; }
        /* «Раскрывашка» длинных описаний во всех карточках (.expandable):
           JS помечает .is-collapsed, если текст больше 7 строк;
           без JS clamp не ставится — весь текст виден и так */
        .expandable.is-collapsed p {
            display: -webkit-box;
            -webkit-box-orient: vertical;
            line-clamp: 7;
            -webkit-line-clamp: 7;
            overflow: hidden;
        }
        .expand-more {
            display: block;
            margin-top: 10px;
            padding: 0;
            border: 0;
            background: none;
            color: #ff6600;
            font-size: 13px;
            cursor: pointer;
            text-decoration: underline;
        }
        .expand-more:hover { color: #cc5200; }

        /* ===== SECTION TITLES ===== */
        .section-title {
            text-align: center;
            margin-bottom: 50px;
        }
        .section-title h2 {
            font-size: 36px;
            font-weight: 700;
            color: #16213e;
            margin-bottom: 15px;
        }
        .section-title p {
            font-size: 16px;
            color: #666;
            max-width: 600px;
            margin: 0 auto;
        }
        .section-title .btn { margin-top: 20px; }

        /* Секции без собственной подложки лежат на тёмно-синем фоне body —
           высветляем их заголовки, остальные остаются на светлых подложках */
        .products .section-title h2,
        .contact-form-section .section-title h2 { color: #fff; }
        .products .section-title p,
        .contact-form-section .section-title p { color: #b9c4d8; }

        /* ===== PRODUCTS ===== */
        .products { padding: 80px 0; }
        .products-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 30px;
        }
        .product-card {
            border: 1px solid #e8e8e8;
            border-radius: 8px;
            overflow: hidden;
            transition: box-shadow .3s, transform .3s;
            background: #fff;
            display: flex; /* колонка: body растягивается, ссылка прижата к низу */
            flex-direction: column;
        }
        .product-card:hover { box-shadow: 0 10px 30px rgba(0,0,0,.1); transform: translateY(-3px); }
        .product-img {
            height: 200px;
            background: #f5f5f5;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 20px;
        }
        .product-img img {
            max-height: 180px;
            max-width: 100%;
            height: auto;
            object-fit: contain;
        }
        .product-body { padding: 25px; flex: 1; display: flex; flex-direction: column; }
        .product-body h3 { font-size: 20px; color: #16213e; margin-bottom: 10px; }
        .product-body p { font-size: 14px; color: #666; margin-bottom: 15px; }
        .product-body a { color: #ff6600; font-weight: 600; font-size: 14px; margin-top: auto; } /* «Документация» — у низа карточки */
        .product-body a:hover { text-decoration: underline; }

        /* ===== PRICE IN CARD ===== */
        .product-price {
            display: block;
            margin-top: 4px;
            font-style: italic;
            background: #2b3f63; /* фон раздела каталога */
            color: #fff;
            padding: 2px 6px;
            border-radius: 4px;
        }
        /* Прайс-массив: summary = первый пункт + стрелка «>» справа;
           по клику список раскрывается вниз в столбик (раскрывает карточку) */
        .price-select {
            position: relative;
            display: block;
            margin-top: 4px;
        }
        .price-select summary {
            list-style: none;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            font-style: italic;
            background: #2b3f63;
            color: #fff;
            padding: 2px 6px;
            border-radius: 4px;
        }
        .price-select summary::-webkit-details-marker { display: none; }
        .price-arrow {
            flex: none;
            width: 1.5em; /* кружок крупнее — полтора «em» цены */
            height: 1.5em;
            display: inline-flex;
            align-items: center;  /* стрелка по центру */
            justify-content: center;
            background: #ff6600;
            border-radius: 50%;
            transition: transform .2s;
        }
        /* белый шеврон из рамок (как был раньше), оптически центрирован в кружке */
        .price-arrow::after {
            content: '';
            width: 7px;
            height: 7px;
            border-right: 2px solid #fff;
            border-bottom: 2px solid #fff;
            transform: translateY(-1px) rotate(45deg); /* шеврон остриём вниз */
        }
        .price-select[open] .price-arrow { transform: rotate(180deg); /* остриём вверх */ }
        .price-options {
            display: flex;
            flex-direction: column;
            gap: 4px;
            margin-top: 4px;
            max-height: 220px;
            overflow: auto;
            background: #2b3f63;
            border: 1px solid #223154;
            border-radius: 6px;
            box-shadow: 0 6px 20px rgba(0, 0, 0, .35);
            padding: 8px;
        }
        .price-option {
            font-style: italic;
            background: #223154;
            color: #fff;
            padding: 4px 6px;
            border-radius: 4px;
            cursor: pointer;
        }
        .price-option:hover { background: #34496f; }


        /* ===== ADMIN: таблица заявок (админка) ===== */
        /* Тёмно-синий фон, светлый текст — читаемо, в палитре сайта */
        /* Отступ контейнера + светлый текст на тёмном фоне страницы (весь
           текст админки скоупнут классом — глобальные h1/a красили и 404).
           Заголовки, счётчик и ссылка — слева: блок отцентрован самим .container */
        .admin-container { margin: 2rem auto; color: #cbd5e1; }
        table.admin-table {
            width: 100%;
            border-collapse: collapse;
            margin: 1rem 0 2rem;
            font-size: 13px;
            background: #fff;
            border: 1px solid #e0e0e0;
            border-radius: 8px;
            overflow: hidden;
        }
        table.admin-table th {
            background: #16213e;
            color: #fff;
            font-weight: 600;
            text-align: left;
            padding: 10px 12px;
            white-space: nowrap;
        }
        table.admin-table td {
            color: #1a1a2e;
            padding: 8px 12px;
            border-bottom: 1px solid #ececec;
            vertical-align: top;
        }
        table.admin-table tr:last-child td { border-bottom: none; }
        table.admin-table tr:hover td { background: #f5f8ff; }
        /* «—»-заменители и UA приглушены, но читаемы на белом */
        table.admin-table .muted { color: #6b7280; }
        /* Текст админки вне таблицы: h1 белый, обычный текст светло-серый */
        .admin-container h1 { color: #fff; margin-bottom: 4px; }
        .admin-container .admin-total { color: #fff; }
        .admin-container a { color: #ff6600; font-weight: 600; }
        .admin-container a:hover { color: #ff8533; }

        /* Сообщение о неудачном удалении (429/ошибка сервера/нет ответа) */
        .admin-container .admin-status {
            margin: 0 0 1rem;
            padding: 10px 14px;
            border: 1px solid #a93226;
            border-radius: 6px;
            background: #3a1f1a;
            color: #ffd9d2;
        }

        /* Кнопка удаления */
        table.admin-table .btn-danger {
            background: #c0392b;
            color: #fff;
            border: none;
            padding: 4px 10px;
            border-radius: 4px;
            font-size: 12px;
            cursor: pointer;
        }
        table.admin-table .btn-danger:hover { background: #a93226; }

        /* ===== ABOUT ===== */
        .about { padding: 80px 0; background: #f8f9fa; }

        /* ===== «О компании»: карточки (.areas-grid рендерится внутри .about) ===== */
        .areas-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
            gap: 25px;
            align-items: start; /* карточки разной высоты из-за полноразмерных фото — не растягивать */
        }
        .area-card {
            border-radius: 8px;
            overflow: hidden;
            box-shadow: 0 3px 15px rgba(0,0,0,.08);
            transition: transform .3s;
            background: #fff;
        }
        .area-card:hover { transform: translateY(-4px); }
        .area-img {
            height: 250px;
            background: #f5f5f5;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 15px;
            overflow: hidden;
        }
        .area-img img, .area-img video {
            max-width: 100%;
            max-height: 100%;
            object-fit: contain;
        }
        .area-body { padding: 20px; }
        .area-body h3 { font-size: 17px; color: #16213e; margin-bottom: 8px; }
        .area-body p { font-size: 13px; color: #666; }

        /* ===== CONTACT FORM ===== */
        .contact-form-section { padding: 80px 0; }
        .contact-form-wrapper {
            max-width: 600px;
            margin: 0 auto;
            background: #fff;
            padding: 40px;
            border-radius: 8px;
            box-shadow: 0 5px 25px rgba(0,0,0,.08);
        }
        .form-group { margin-bottom: 20px; }
        .form-group label { display: block; font-size: 14px; font-weight: 600; color: #16213e; margin-bottom: 6px; }
        .form-group input,
        .form-group textarea {
            width: 100%;
            padding: 12px 16px;
            border: 1px solid #ddd;
            border-radius: 4px;
            font-size: 14px;
            font-family: inherit;
            transition: border-color .3s;
        }
        .form-group input:focus,
        .form-group textarea:focus {
            outline: none;
            border-color: #ff6600;
        }
        .form-group textarea { height: 120px; resize: vertical; }
        .form-consent { font-size: 12px; color: #888; margin-top: 10px; }

        /* ===== FOOTER ===== */
        footer {
            background: #1a1a2e;
            color: #aaa;
            padding: 60px 0 30px;
        }
        .footer-bottom {
            border-top: 1px solid #333;
            padding-top: 25px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 15px;
        }
        .footer-bottom p { font-size: 13px; }

        /* ===== COOKIE BANNER ===== */
        .cookie-banner {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            background: #16213e;
            color: #ccc;
            padding: 20px;
            z-index: 9999;
            font-size: 13px;
            box-shadow: 0 -4px 20px rgba(0,0,0,.3);
        }
        .cookie-banner .container {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 20px;
            flex-wrap: wrap;
        }
        .cookie-banner .btn { padding: 10px 25px; font-size: 13px; white-space: nowrap; }

        /* ===== MODAL ===== */

        /* ===== 404 (самописная страница из app.js, стилизована классами) ===== */
        .notfound-box {
            max-width: 600px;
            margin: 40px auto;
            padding: 24px;
            border: 1px solid #ccc;
            border-radius: 8px;
            background: #fff;
            color: #333;
        }
        .notfound-box h1 { font-size: 24px; margin-bottom: 10px; }
        .notfound-box p { margin-bottom: 15px; }
        .notfound-box a { color: #0066cc; text-decoration: none; }
        .modal-overlay {
            display: none;
            position: fixed;
            top: 0; left: 0; right: 0; bottom: 0;
            background: rgba(0,0,0,.6);
            z-index: 10000;
            align-items: center;
            justify-content: center;
        }
        .modal-overlay.active { display: flex; }
        .modal {
            background: #fff;
            border-radius: 8px;
            padding: 40px;
            max-width: 500px;
            width: 90%;
            position: relative;
            animation: modalIn .3s ease;
        }
        @keyframes modalIn {
            from { transform: scale(.9); opacity: 0; }
            to { transform: scale(1); opacity: 1; }
        }
        .modal-close {
            position: absolute;
            top: 15px;
            right: 20px;
            font-size: 28px;
            cursor: pointer;
            color: #999;
            background: none;
            border: none;
            line-height: 1;
        }
        .modal-close:hover { color: #333; }
        .modal h3 { font-size: 22px; color: #16213e; margin-bottom: 10px; }
        .modal p { font-size: 14px; color: #666; margin-bottom: 20px; }

        /* ===== SUCCESS MESSAGE ===== */
        .success-message {
            display: none;
            text-align: center;
            padding: 40px;
        }
        .success-message.active { display: block; }
        .success-message h3 { font-size: 24px; color: #16213e; margin-bottom: 10px; }
        .success-message p { font-size: 16px; color: #666; margin-bottom: 20px; }
        /* Кнопка «На главную» — оранжевая с тёмным текстом (белый на оранжевом не читается)
           и белой окантовкой, чтобы не сливалась с светлым фоном формы */
        .success-message .btn-primary {
            background: #ff6600;
            color: #16213e;
            border: 2px solid #fff;
        }
        .success-message .btn-primary:hover {
            background: #cc5200;
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(255,102,0,.4);
        }

        /* ===== RESPONSIVE ===== */
        @media (max-width: 768px) {
            .hero h1 { font-size: 32px; }
            .hero p { font-size: 16px; }
            nav ul { gap: 12px; flex-wrap: wrap; }
            /* на узких дисплеях меню переносится в несколько строк —
               не даём ему прилипать к левому краю (к логотипу) */
            nav { margin-left: 24px; }
            /* логотип: если строка не влезает — «ИВАНОВО» переносится на новую строку */
            .logo { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; }
            /* на мобильном хедер выше (меню переносится) — увеличиваем отступ якорей */
            section[id] { scroll-margin-top: 150px; }
            .top-bar .container { flex-direction: column; text-align: center; }
            .section-title h2 { font-size: 28px; }
        }

/* ===== HONEYPOT: анти-спам поле, скрыто от людей ===== */
.hp-field {
  position: absolute !important;
  left: -99999px !important;
  width: 1px;
  height: 1px;
  opacity: 0;
}

/* ===== Ошибки отправки формы ===== */
.form-error {
  color: #ff6600;
  font-size: 14px;
  margin-top: 10px;
}

.btn[disabled] { opacity: 0.6; cursor: default; }
.btn-danger { background: #c0392b; color: #fff; }
.btn-danger:hover { background: #922b21; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(192,57,43,.4); }

