/* Стили для шапки */

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 50;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    padding: 8px 0;
    height: var(--header-height);
    display: flex;
    align-items: center;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 32px;
}

/* Левая часть */
.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: nowrap;
}

/* Жёлтый квадрат с гамбургером */
.menu-toggle {
    width: 36px;
    height: 36px;
    background-color: var(--accent);
    border: none;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    padding: 0;
    transition: background-color 0.2s, transform 0.2s;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2.5px;
    background-color: #1e1e2f;
    border-radius: 2px;
    transition: background-color 0.2s;
}

.menu-toggle:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
}

.menu-toggle:hover span {
    background-color: #000;
}

/* Логотип */
.logo {
    display: flex;
    align-items: center;
}

.logo img {
    display: block;
    height: 24px;
    width: auto;
    transition: opacity 0.2s;
}

.logo img:hover {
    opacity: 0.9;
}

/* Краткое описание бренда */
.brand-description {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.75rem;
    font-weight: 400;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    max-width: 250px;
}

/* Правая часть */
.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.header-right .phone,
.header-right .email {
    font-weight: 600;
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
    white-space: nowrap;
}

.header-right .phone:hover,
.header-right .email:hover {
    color: var(--accent);
}

.header-right .email i {
    margin-right: 4px;
    font-size: 0.8rem;
}

.btn-header {
    background-color: var(--accent);
    color: var(--primary-dark);
    font-weight: 600;
    padding: 6px 16px;
    border-radius: 40px;
    text-decoration: none;
    font-size: 0.8rem;
    transition: background-color 0.2s, transform 0.2s, box-shadow 0.2s;
    white-space: nowrap;
}

.btn-header:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 196, 0, 0.3);
}

/* ===== Оверлей и боковая панель (слайд) ===== */
.slide-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.slide-overlay.active {
    opacity: 1;
    visibility: visible;
}

.slide-panel {
    position: fixed;
    top: 0;
    left: -320px;
    width: 300px;
    height: 100%;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border-right: 1px solid var(--glass-border);
    z-index: 101;
    transition: left 0.3s ease;
    display: flex;
    flex-direction: column;
    padding: 20px;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.2);
}

.slide-panel.active {
    left: 0;
}

.slide-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    color: var(--text-light);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s;
}

.slide-close:hover {
    color: var(--accent);
}

/* Контент панели */
.slide-content {
    margin-top: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: 100%;
    overflow-y: auto;
    padding-top: 0;
}

/* Логотип в панели */
.slide-logo {
    margin-bottom: 10px;
    margin-top: 0;
}

.slide-logo img {
    height: 24px;
    width: auto;
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

/* Каталог в панели */
.slide-catalog {
    border-top: 1px solid var(--glass-border);
    padding-top: 15px;
    margin-top: 0;
}

.slide-catalog h4 {
    color: var(--accent);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 15px;
}

.slide-catalog-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.slide-catalog-list li {
    margin-bottom: 10px;
}

.slide-catalog-list a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
    display: block;
}

.slide-catalog-list a:hover {
    color: var(--accent);
}

/* О компании в панели */
.slide-about {
    border-top: 1px solid var(--glass-border);
    padding-top: 15px;
    margin-top: 0;
}

.slide-about h4 {
    color: var(--accent);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 15px;
}

.slide-about-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.slide-about-list li {
    margin-bottom: 10px;
}

.slide-about-list a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
    display: block;
}

.slide-about-list a:hover {
    color: var(--accent);
}

/* Контакты в панели */
.slide-contacts {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid var(--glass-border);
}

.slide-contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-light);
    font-size: 0.95rem;
}

.slide-contact-item i {
    color: var(--accent);
    width: 20px;
}

.slide-contact-item a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.2s;
}

.slide-contact-item a:hover {
    color: var(--accent);
}

.slide-messengers {
    display: flex;
    gap: 15px;
    margin-top: 5px;
}

.slide-messengers a {
    color: var(--gray-light);
    font-size: 1.3rem;
    transition: color 0.2s, transform 0.2s;
}

.slide-messengers a:hover {
    color: var(--accent);
    transform: translateY(-3px);
}

.slide-btn {
    background-color: var(--accent);
    color: var(--primary-dark);
    font-weight: 600;
    padding: 12px 20px;
    border-radius: 40px;
    text-decoration: none;
    text-align: center;
    transition: background-color 0.2s, transform 0.2s;
    margin-top: 10px;
}

.slide-btn:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
}

/* Попап запроса расчёта */
.calc-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.calc-popup.active {
    opacity: 1;
    visibility: visible;
}

.calc-popup-content {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-card);
    max-width: 550px; /* было 400px */
    width: 90%;
    padding: 30px;
    position: relative;
    color: var(--text-light);
    box-shadow: var(--shadow-hover);
}

.calc-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    color: var(--gray-light);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s;
}

.calc-popup-close:hover {
    color: var(--accent);
}

.calc-popup h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--accent);
}

.calc-popup p {
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text-light);
}

/* ===== Адаптация ===== */
@media (max-width: 1200px) {
    .header .container {
        gap: 15px;
    }
    .header-right {
        gap: 15px;
    }
}

@media (max-width: 1024px) {
    .header .container {
        grid-template-columns: 1fr auto;
        gap: 12px;
    }
    .header-left {
        order: 1;
    }
    .header-right {
        order: 2;
        gap: 12px;
    }
    .brand-description,
    .vertical-divider {
        display: none;
    }
}

@media (max-width: 700px) {
    .header {
        height: auto;
        padding: 12px 0;
    }
    .header .container {
        flex-wrap: wrap;
        gap: 12px;
    }
    .header-left {
        width: 100%;
        justify-content: space-between;
    }
    .header-right {
        width: 100%;
        justify-content: flex-start;
        gap: 12px;
    }
    .brand-description,
    .vertical-divider {
        display: none;
    }
    .menu-toggle {
        width: 32px;
        height: 32px;
    }
    .menu-toggle span {
        width: 18px;
        height: 2px;
    }
}

@media (max-width: 480px) {
    .header-right .phone,
    .header-right .email {
        font-size: 0.75rem;
    }
    .btn-header {
        padding: 4px 12px;
        font-size: 0.7rem;
    }
    .slide-panel {
        width: 280px;
        left: -280px;
    }
    .slide-logo img {
        height: 20px;
    }
}

/* Стили для контактных элементов */
.header-right .phone,
.header-right .email,
.schedule {
    font-weight: 600;
    color: var(--text-light);
    font-size: 0.85rem;
    text-decoration: none;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Иконки в контактах */
.header-right .phone i,
.header-right .email i,
.schedule i {
    font-size: 0.9rem;
    color: var(--accent);
    width: 1.2em; /* фиксированная ширина для выравнивания */
    text-align: center;
}

/* Убираем подчёркивание у ссылок при наведении (они уже есть) */
.header-right .phone:hover,
.header-right .email:hover {
    color: var(--accent);
}

/* Без hover для schedule – он не ссылка */
.schedule {
    cursor: default;
}

/* Адаптация для мобильных */
@media (max-width: 700px) {
    .schedule {
        white-space: normal; /* разрешаем перенос на мобильных */
    }
}

.calc-popup-description {
    margin-bottom: 30px;
}

.calc-popup-credentials {
    margin-top: 25px;
    padding: 15px 20px;
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(4px);
    border-radius: var(--border-radius-card);
    border: 1px solid var(--glass-border);
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.5;
    text-align: center;
}