/* ===== СБРОС И БАЗА ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #0f172a;
    color: #fff;
    min-height: 100vh;
    line-height: 1.6;
    position: relative;
}

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

/* Фиксированный фон завода */
.bg-fixed-img {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('bg.webp');
    background-size: cover;
    background-position: center;
    opacity: 0.15;
    z-index: -1;
}

/* ===== ЕДИНАЯ ШАПКА ===== */
.header-block {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.6);
    padding: 20px 0;
    width: 100%;
    position: relative;
    z-index: 1000; /* Шапка всегда поверх карточек товаров */
}

.header-inner {
    max-width: 1536px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: start;
    gap: 20px;
}

.header-left {
    display: flex;
    justify-content: flex-start;
}

.header-center {
    text-align: center;
}

.header-right {
    display: flex;
    justify-content: flex-end;
}

/* ===== ИКОНКА И ТЁМНОЕ СТЕКЛЯННОЕ ОКНО КОНТАКТОВ ===== */
.contacts-dropdown {
    position: relative;
    display: inline-block;
}

.contacts-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.contacts-btn:hover {
    transform: scale(1.4);
    opacity: 0.9;
}

.contacts-icon {
    width: 76px;
    height: auto;
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

/* Окно контактов */
.contacts-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    
    /* 1. ДОБАВЛЯЕМ НЕВИДИМЫЙ "МОСТ" МЕЖДУ ИКОНКОЙ И МЕНЮ */
    /* Псевдоэлемент ::before создаст прозрачную область, чтобы мышь не вылетала */
    
    background: rgba(15, 23, 75, 0.94) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border: 1px solid rgba(59, 130, 246, 0.4) !important;
    border-radius: 16px;
    padding: 20px;
    
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 
                0 0 20px rgba(30, 58, 138, 0.5);
    z-index: 99999;
}

/* 2. ДОБАВЬ ЭТОТ НОВЫЙ БЛОК КОДА СРАЗУ ПОСЛЕ .contacts-menu: */
/* Он перекрывает зазор между иконкой и выпадающим окном */
.contacts-menu::before {
    content: '';
    position: absolute;
    top: -15px; /* Перекрывает щель сверху над меню */
    left: 0;
    width: 100%;
    height: 15px; /* Высота невидимого мостика */
    background: transparent;
}


.contacts-menu-content {
    background: transparent;
    padding: 0;
}

/* Блоки контактов */
.contact-group {
    margin-bottom: 12px;
}

.contact-group:last-child {
    margin-bottom: 0;
}

/* Номера телефонов */
.contact-number {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    line-height: 1.2;
    cursor: pointer;
    transition: color 0.2s ease;
    user-select: none;
}

.contact-number:hover {
    color: #60a5fa;
}

/* Подписи к номерам */
.contact-label {
    display: block;
    font-size: 14px;
    color: #dcf0ff;
    margin-top: 2px;
}

/* Плашки-теги (E-mail, Адрес) */
.contact-tag {
    display: inline-block;
    background-color: #1e3a8a;
    border: 1px solid #1d4ed8;
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 4px;
}

/* Текст адреса и почты */
.contact-text {
    display: block;
    font-size: 24px;
    color: #e2e8f0;
    line-height: 1.4;
    text-decoration: none;
    margin: 0;
}

/* Отдельный шрифт и размер для адреса */
p.contact-text {
    font-size: 13px; /* Размер текста адреса */
    font-family: 'Segoe UI', sans-serif; /* Название шрифта (можно указать любой, например: Arial, Roboto) */
    font-weight: 400; /* Плотность: 400 (обычный), 600 (полужирный), 700 (жирный) */
    line-height: 1.3; /* Межстрочный интервал */
}

a.contact-text:hover {
    color: #60a5fa;
}

/* Разделитель */
.menu-divider {
    height: 1px;
    background-color: rgba(255, 255, 255, 0.15);
    margin: 12px 0;
}


/* Теперь меню показывается только когда у контейнера есть класс .active */
/* Меню покажется только при наличии класса .is-open */
.contacts-dropdown.is-open .contacts-menu {
    display: block;
}

/* Кнопка О компании */
.btn-about {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    padding: 8px 20px;
    border-radius: 9999px;
    font-size: 14px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-about:hover {
    color: #60a5fa;
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(96, 165, 250, 0.5);
}

.main-title {
    margin-bottom: 2px;
    color: #fff;
}

.main-logo {
    max-width: 380px;
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto 8px;
}

.subtitle {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
    letter-spacing: 0.5px;
}

/* ===== ГЛАВНЫЙ БЛОК С КАРТОЧКАМИ ===== */
.hero-section {
    padding: 20px 0 24px;
    position: relative;
    z-index: 1;
}

.hero-inner {
    max-width: 1536px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

/* ===== СЕТКА ТОВАРОВ ===== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}

.product-card {
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.1) 0%, rgba(0, 0, 0, 0.3) 50%, rgba(0, 0, 0, 0.75) 100%);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
}

.product-card:hover {
    border-color: rgba(224, 242, 254, 1);
    box-shadow: 0 0 15px rgba(224, 242, 254, 0.3);
}

.product-image-box {
    position: relative;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.product-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;	
}

.product-card {
    will-change: transform; /* Подсказка браузеру, что этот элемент будет двигаться */
    backface-visibility: hidden; /* Убирает артефакты при отрисовке */
    transform: translateZ(0); /* Аппаратное ускорение */
}

.product-card:hover .product-img {
    transform: scale(1.09);
}

.product-title {
    padding: 24px 15px;
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    color: #fff;
    transition: color 0.3s;
    margin-top: auto;
    line-height: 1.3;
}

.product-card:hover .product-title {
    color: #bfdbfe;
}

/* ===== КНОПКА КАТАЛОГА ===== */
.catalog-btn-wrapper {
    text-align: center;
}

.btn-catalog {
    display: inline-block;
    background-color: #1e3a8a;
    color: #fff;
    padding: 10px 40px;
    border-radius: 9999px;
    font-size: 20px;
    font-weight: 700;
    border: 1px solid #1d4ed8;
    transition: all 0.2s;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.btn-catalog:hover {
    background-color: #1e40af;
}

/* ===== ФУТЕР ===== */
.main-footer {
    padding: 24px 0;
    border-top: 1px solid #1e293b;
    margin-top: 40px;
}

.footer-inner {
    max-width: 1536px;
    margin: 0 auto;
    padding: 0 24px;
}

.main-footer p {
    text-align: center;
    color: #4b5563;
    font-size: 14px;
}

/* ===== СТИЛИ МОДАЛЬНОГО ОКНА ДЛЯ ПК И МОБИЛЬНЫХ ===== */
.contacts-modal-backdrop {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999 !important;
}

.contacts-modal-backdrop.hidden {
    display: none !important;
}

.contacts-modal-box {
    background-color: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    padding: 32px;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    max-width: 380px;
    width: 90%;
}

.contacts-modal-title {
    color: #9ca3af;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 12px;
}

.contacts-modal-number {
    font-size: 28px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 16px;
    letter-spacing: 0.5px;
}

/* Изменяет размер шрифта только внутри модального окна почты */
#contactsEmailModal .contacts-modal-number {
    font-size: 20px;       /* Задай нужный размер для почты (например, 16px или 18px) */
    word-break: break-all; /* Авто-перенос, чтобы длинный e-mail влезал */
}

.contacts-modal-success {
    color: #4ade80;
    font-size: 14px;
    margin-bottom: 24px;
}

.contacts-modal-btn {
    width: 100%;
    padding: 12px 0;
    background-color: #1e3a8a;
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    border: none;
    border-radius: 9999px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.contacts-modal-btn:hover {
    background-color: #1d4ed8;
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 1200px) {
    .hero-inner {
        display: flex;
        flex-direction: column;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        order: 1;
    }

    .catalog-btn-wrapper {
        text-align: center;
        margin-top: 0 !important;
        margin-bottom: 24px !important; 
        order: -1 !important;
    }
}

@media (max-width: 768px) {
    /* ШАПКА */
    .header-block {
        padding: 12px 0 16px;
    }

    .header-inner {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: flex-start;
        position: relative;
        padding: 0 16px;
    }

    .header-left {
        order: 1;
        justify-content: flex-start;
        z-index: 100;
    }

    .contacts-icon {
        width: 60px;
    }

    .contacts-menu {
        left: 0;
        padding-top: 6px;
        width: 330px;
    }
	
		/* Подписи к номерам */
	.contact-label {
		display: block;
		font-size: 18px;
		color: #dcf0ff;
		margin-top: 2px;
	}

    .contact-number {
        font-size: 24px;
    }

    .header-right {
        order: 2;
        justify-content: flex-end;
        z-index: 100;
    }

    .btn-about {
        padding: 5px 12px;
        font-size: 14px;
    }

    .header-center {
        order: 3;
        width: 100%;
        text-align: center;
        margin-top: -35px;
        z-index: 1;
    }

    .main-logo {
        max-width: 230px;
        margin: 0 auto 6px;
    }

    .subtitle {
        font-size: 13px;
        line-height: 1.3;
    }

    .hero-inner {
        display: flex !important;
        flex-direction: column !important;
        padding: 0 12px;
    }

    .catalog-btn-wrapper {
        order: 1 !important;
        text-align: center;
        margin-top: 4px !important;
        margin-bottom: 16px !important;
    }

    .btn-catalog {
        font-size: 16px;
        padding: 8px 28px;
    }

    .products-grid {
        order: 2 !important;
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
        margin-bottom: 20px;
    }

    .product-card {
        border-radius: 12px;
    }

    .product-image-box {
        padding: 12px;
    }

    .product-title {
        font-size: 14px;
        padding: 10px 8px;
        line-height: 1.25;
    }
	
}

/* анимации плавающей кнопки консультанта и её пульсирующая иконка */
    @keyframes snappy-pulse {
        0%, 100% { transform: scale(1); }
        3% { transform: scale(1.5); }
        10% { transform: scale(1); }
    }
    .animate-snappy-pulse {
        animation: snappy-pulse 9s ease-in-out infinite;
    }

    @keyframes whiteGlowRare {
        0%, 100% {
            box-shadow: 0 0 5px rgba(255, 255, 255, 0.15), inset 0 0 5px rgba(255, 255, 255, 0.05);
            border-color: rgba(255, 255, 255, 0.2);
        }
        2% {
            box-shadow: 0 0 25px 8px rgba(255, 255, 255, 0.5), inset 0 0 10px rgba(255, 255, 255, 0.2);
            border-color: rgba(255, 255, 255, 0.7);
        }
        8% {
            box-shadow: 0 0 10px 2px rgba(255, 255, 255, 0.2), inset 0 0 5px rgba(255, 255, 255, 0.05);
            border-color: rgba(255, 255, 255, 0.3);
        }
    }
    .animate-white-glow-rare {
        animation: whiteGlowRare 9s ease-in-out infinite;
    }
	
	
	@keyframes border-glow-move {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.animated-spotlight-btn {
    position: relative;
    border-radius: 9999px;
    /* Создаем градиентную рамку с ярким световым пятном посередине */
    background: linear-gradient(90deg, #1f2937, #3b82f6, #ffffff, #3b82f6, #1f2937);
    background-size: 300% 300%;
    animation: border-glow-move 4s ease infinite;
    padding: 1.5px; /* Толщина рамки со свечением */
}

@media (max-width: 768px) {
    /* Отключаем тяжелый рендеринг размытия на мобилках, заменяя плотной подложкой */
    .backdrop-blur-md, 
    .backdrop-blur-sm {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background-color: rgba(13, 18, 30, 0.92) !important;
    }
} 


@media (max-width: 768px) {
    /* Делаем фон плавающей кнопки более плотным и синим, чтобы она не казалась черной */
    #floatingConsultant button {
        background-color: rgba(30, 58, 138, 0.95) !important; /* Увеличили непрозрачность до 95% и задали чистый синий цвет */
        backdrop-filter: blur(12px) !important;
        -webkit-backdrop-filter: blur(12px) !important;
    }
}