/* --- Футер (Contacts Section) --- */
.footer {
    background-color: var(--color-surface-dark);
    /* Темно-синий фон */
    color: var(--color-text-inv);
    border-top: var(--border-width) solid var(--border-color);
    padding: 0;
}

.footer__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 400px;
}

/* Блок контактов */
.footer__info {
    padding: 3rem;
    border-right: var(--border-width) solid #334155;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.footer__bottom {
    font-size: var(--text-xs);
    padding: 1.5rem 0;
    border-top: 1px solid #334155;
    text-align: center;
    opacity: 0.6;
}

.footer__bottom a {
    color: inherit;
}

.footer__title {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: #94A3B8;
    margin-bottom: 2rem;
}

.contact-phone {
    font-size: 3rem;
    /* Огромный телефон */
    font-weight: 800;
    color: var(--color-text-inv);
    text-decoration: none;
    display: block;
    margin-bottom: 1rem;
    line-height: 1;
}

.contact-address {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: #CBD5E1;
}

.work-hours {
    font-family: var(--font-mono);
    color: var(--color-accent);
    padding: 0.5rem 1rem;
    border: 1px solid var(--color-accent);
    display: inline-block;
}

/* Блок карты */
.footer__map {
    background-color: #1E293B;
    position: relative;
    overflow: hidden;
}

.map-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #475569;
    font-family: var(--font-mono);
    background-image: repeating-linear-gradient(45deg, #1E293B 0, #1E293B 10px, #0F172A 10px, #0F172A 20px);
}

/* --- Мобильное меню (Burger) --- */
.burger-btn {
    display: none;
    /* Скрыто на десктопе */
    background: none;
    border: none;
    cursor: pointer;
    width: 40px;
    height: 40px;
    position: relative;
    z-index: 1001;
}

.burger-line {
    width: 30px;
    height: 3px;
    background-color: var(--color-text-main);
    margin: 5px auto;
    display: block;
    transition: all 0.3s;
}

/* Активное состояние бургера */
.burger-btn.active .burger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}

.burger-btn.active .burger-line:nth-child(2) {
    opacity: 0;
}

.burger-btn.active .burger-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
}

/* Мобильное меню (Overlay) */
.mobile-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--color-surface);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transform: translateY(-100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-nav.open {
    transform: translateY(0);
}

.mobile-nav__link {
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-text-main);
    text-decoration: none;
    margin: 1rem 0;
    text-transform: uppercase;
}

/* --- Адаптив (Media Queries) --- */
@media (max-width: 1024px) {
    .header .nav {
        display: none;
        /* Скрываем обычное меню */
    }

    .burger-btn {
        display: block;
        /* Показываем бургер */
    }

    .footer__grid {
        grid-template-columns: 1fr;
        /* Футер в колонку */
    }

    .contact-phone {
        font-size: 2rem;
    }

    .footer__map {
        min-height: 300px;
    }
}

@media (max-width: 768px) {

    html,
    body {
        overflow-x: hidden;
        /* Prevent horizontal scroll */
    }

    /* Hero адаптация */
    .hero__title {
        font-size: 1.8rem;
        line-height: 1.2;
    }

    .hero__phone-link {
        font-size: 1.6rem;
        /* Reduced to fit small screens */
    }

    .layout-wrapper {
        width: 100%;
        /* Полная ширина на мобилке */
        border: none;
    }

    .container {
        padding: 0 1rem;
        /* Reduced padding from 2rem */
    }

    .cat-card {
        padding: 1.5rem 1rem;
        /* More compact on mobile */
    }

    body {
        padding: 0;
    }

    .hero__content {
        padding: 1.5rem;
    }

    /* Спецификации в 2 колонки */
    .hero__specs {
        grid-template-columns: 1fr 1fr;
    }

    .spec-item:nth-child(2n) {
        border-right: none;
    }

    .spec-item {
        border-bottom: 1px solid var(--border-color);
    }

    /* Catalog header adjustments */
    .catalog__header {
        padding: 1rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .section-title {
        font-size: 1.2rem;
        word-break: break-word;
    }

    .slide-panel {
        width: 100% !important;
        /* Force full width on mobile/tablets */
        right: -100%;
    }

    .slide-panel.open {
        right: 0;
    }
}

/* Extra fixes for very small screens */
@media (max-width: 480px) {
    .hero__phone-link {
        font-size: 1.3rem;
    }

    .hero__title {
        font-size: 1.4rem;
    }

    .slide-panel {
        padding: 1.5rem 1rem;
    }

    .panel-title {
        font-size: 1.1rem;
        margin-top: 2rem;
    }

    .close-btn {
        top: 0.5rem;
        right: 0.5rem;
    }
}