/* ==========================================================================
   Главная страница — main.css
   ========================================================================== */

:root {
    --hp-block-gap: 80px;
}

/* --------------------------------------------------------------------------
   Заголовок секции (.hp-section-header)
   -------------------------------------------------------------------------- */

.hp-section-header {
    padding-top: var(--hp-block-gap);
    margin: 0 0 24px;
    text-align: center;
}

.hp-section-header--first {
    padding-top: 32px;
}

.hp-section-header__title {
    margin: 0 0 10px;
    font-size: clamp(20px, 2vw, 28px);
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1.2;
    color: #111;
}

.hp-section-header__brief {
    margin: 0;
    font-size: 15px;
    font-weight: 400;
    color: #777;
    line-height: 1.6;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

.hp-section-header__link {
    display: inline-block;
    margin-top: 12px;
    font-size: 13px;
    font-weight: 500;
    color: #555;
    text-decoration: none;
    border-bottom: 1px solid #bbb;
    transition: color 0.2s, border-color 0.2s;
}

.hp-section-header__link:hover {
    color: #111;
    border-color: #111;
}

/* --------------------------------------------------------------------------
   Этап 1: Блоки категорий верхнего уровня (.hp-cats)
   -------------------------------------------------------------------------- */

.hp-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin: 0 0 16px;
}

.hp-cats__item {
    position: relative;
    display: block;
    overflow: hidden;
    flex: 1 1 calc(25% - 16px);
    min-width: 160px;
    height: 320px;
    text-decoration: none;
    border-radius: 6px;
}

/* Фоновое фото */
.hp-cats__photo {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.4s ease;
}

.hp-cats__item:hover .hp-cats__photo {
    transform: scale(1.04);
}

/* Затемнение */
.hp-cats__dim {
    position: absolute;
    inset: 0;
    background: linear-gradient(
            to top,
            rgba(0, 0, 0, 0.65) 0%,
            rgba(0, 0, 0, 0.15) 60%,
            rgba(0, 0, 0, 0.05) 100%
    );
    transition: background 0.3s ease;
}

.hp-cats__item:hover .hp-cats__dim {
    background: linear-gradient(
            to top,
            rgba(0, 0, 0, 0.75) 0%,
            rgba(0, 0, 0, 0.25) 60%,
            rgba(0, 0, 0, 0.1) 100%
    );
}

/* Контейнер текста */
.hp-cats__body {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
    z-index: 2;
}

/* Название категории */
.hp-cats__name {
    display: block;
    color: #fff;
    font-size: 24px;
    font-weight: 600;
    letter-spacing: 0.04em;
    line-height: 1.3;
}

/* Брифинг */
.hp-cats__briefing {
    display: block;
    margin-top: 6px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.03em;
    line-height: 1.5;
}

/* Кнопка "В каталог" */
.hp-cats__btn {
    display: inline-block;
    margin-top: 12px;
    padding: 5px 16px;
    color: #fff;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    background: transparent;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.hp-cats__item:hover .hp-cats__btn {
    background: rgba(255, 255, 255, 0.15);
    border-color: #fff;
}

/* --------------------------------------------------------------------------
   Преимущества (.advantages)
   -------------------------------------------------------------------------- */

.hp-advantages-wrap {
    background: #f8f8f8;
    margin-top: var(--hp-block-gap);
    margin-bottom: var(--hp-block-gap);
    padding: 40px 0;
}

.hp-advantages-wrap .hp-section-header {
    padding-top: 0;
}

ul.advantages {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* ==========================================================================
   Этап 2: Слайдер (hp-slides)
   ========================================================================== */

.hp-slides {
    margin: 0 -8px var(--hp-block-gap);
    padding: 0;
    list-style: none;
    overflow: hidden;
}

.hp-slides .slide_item {
    padding-left: 8px;
    padding-right: 8px;
    margin-bottom: 0;
}

.hp-slides__item {
    position: relative;
    display: block;
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: 6px;
    text-decoration: none;
}

/* Фото */
.hp-slides__photo {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.4s ease;
}

.hp-slides__item:hover .hp-slides__photo {
    transform: scale(1.04);
}

/* Затемнение */
.hp-slides__dim {
    position: absolute;
    inset: 0;
    background: linear-gradient(
            to top,
            rgba(0, 0, 0, 0.65) 0%,
            rgba(0, 0, 0, 0.15) 60%,
            rgba(0, 0, 0, 0.05) 100%
    );
    transition: background 0.3s ease;
}

.hp-slides__item:hover .hp-slides__dim {
    background: linear-gradient(
            to top,
            rgba(0, 0, 0, 0.75) 0%,
            rgba(0, 0, 0, 0.25) 60%,
            rgba(0, 0, 0, 0.1) 100%
    );
}

/* Контент */
.hp-slides__body {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px;
    text-align: center;
    z-index: 2;
}

.hp-slides__name {
    display: block;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.03em;
    line-height: 1.3;
}

.hp-slides__btn {
    display: inline-block;
    margin-top: 10px;
    padding: 4px 14px;
    color: #fff;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    background: transparent;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.hp-slides__item:hover .hp-slides__btn {
    background: rgba(255, 255, 255, 0.15);
    border-color: #fff;
}

/* --------------------------------------------------------------------------
   Этап 4: Логотипы брендов (.hp-brands)
   -------------------------------------------------------------------------- */

.hp-brands {
    margin: 0 0 var(--hp-block-gap);
}

.hp-brands .hp-section-header,
.hp-interery .hp-section-header,
.hp-reviews .hp-section-header {
    padding-top: 0;
}

.hp-brands__track {
    margin: 0 -10px;
}

.hp-brands__item {
    padding: 0 10px;
    text-align: center;
}

.hp-brands__item a {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 80px;
}

.hp-brands__item img {
    max-width: 100%;
    max-height: 60px;
    width: auto;
    object-fit: contain;
    filter: grayscale(1) opacity(0.55);
    transition: filter 0.3s ease;
}

.hp-brands__item:hover img {
    filter: grayscale(0) opacity(1);
}

/* --------------------------------------------------------------------------
   Этап 6: Подборки интерьеров (.hp-interery)
   -------------------------------------------------------------------------- */

.hp-interery {
    margin: 0;
}

.hp-interery__item {
    margin-bottom: 12px;
}

.hp-interery__link {
    position: relative;
    display: block;
    height: 280px;
    overflow: hidden;
    border-radius: 6px;
    text-decoration: none;
}

.hp-interery__photo {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.4s ease;
}

.hp-interery__link:hover .hp-interery__photo {
    transform: scale(1.04);
}

.hp-interery__dim {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.65) 0%, rgba(0, 0, 0, 0.1) 60%, transparent 100%);
}

.hp-interery__body {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    padding: 20px;
    z-index: 2;
}

.hp-interery__title {
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1.3;
}

.hp-interery__more {
    text-align: center;
    margin-top: 24px;
}

.hp-interery__btn {
    display: inline-block;
    padding: 10px 32px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #333;
    border: 1px solid #ccc;
    border-radius: 20px;
    text-decoration: none;
    transition: border-color 0.2s, color 0.2s;
}

.hp-interery__btn:hover {
    color: #111;
    border-color: #111;
}

/* --------------------------------------------------------------------------
   Этап 7: Отзывы (.hp-reviews)
   -------------------------------------------------------------------------- */

.hp-reviews {
    padding: var(--hp-block-gap) 0;
}

/* --------------------------------------------------------------------------
   Этап 8: SEO-блок (.hp-seo)
   -------------------------------------------------------------------------- */

.hp-seo {
    background: #f8f8f8;
    padding: var(--hp-block-gap) 0;
}

.hp-seo__title {
    font-size: clamp(20px, 2vw, 28px);
    font-weight: 600;
    margin: 0 0 20px;
    color: #111;
    line-height: 1.3;
}

.hp-seo p {
    font-size: 14px;
    line-height: 1.8;
    color: #666;
    margin: 0 0 14px;
}

.hp-seo p:last-child {
    margin-bottom: 0;
}

/* --- Адаптив --- */

@media (max-width: 1199px) {
    .hp-cats__item {
        flex: 1 1 calc(33.333% - 12px);
        height: 280px;
    }
}

@media (max-width: 767px) {
    :root {
        --hp-block-gap: 50px;
    }

    .hp-cats__briefing {
        display: none;
    }

    .hp-cats__item {
        flex: 1 1 calc(50% - 12px);
        height: 220px;
    }

    .hp-cats__name {
        font-size: 18px;
    }
}

@media (max-width: 479px) {
    .hp-cats {
        gap: 8px;
    }

    .hp-cats__item {
        flex: 1 1 calc(50% - 8px);
        height: 180px;
        border-radius: 4px;
    }
}
