/* ============================================================
   HOME SECTIONS - catalog, about, services (view_homepage.php, phase B1).
   The category and project cards are the SAME components as /catalog and the category pages (catalog.css, .cat-index);
   this file only places them inside the home page's sections and styles the About facts and the Services cards.
   Everything is scoped to .page_view_homepage.
   ============================================================ */

.page_view_homepage {
    --hs-navy: #0e1c3f;
    --hs-ink-soft: #364361;
    --hs-muted: #4a5568;
    --hs-line: #e3e8ef;
    --hs-soft: #f5f7fa;
    --hs-green: #87b43e;
    --hs-green-btn: #56801f;
    --hs-green-tint: #eaf3da;
}

/* ---------- the shared cards inside the home sections ---------- */

.page_view_homepage .cat-index--home {
    padding: 0;
    background: transparent;
}

.page_view_homepage .cat-index--home .cat-pagination {
    display: none;
}

.page_view_homepage .hx-cats {
    background: #ffffff;
}

.page_view_homepage .hx-cats .lp-catalog-head,
.page_view_homepage .hx-services .lp-catalog-head {
    margin-bottom: 36px;
}

.page_view_homepage .hx-extra-link {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 14px 40px;
    margin: 30px 0 0;
    text-align: center;
}

.page_view_homepage .hx-extra-link a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 4px;
    font: 700 14px/1.2 "Montserrat", "Segoe UI", Arial, sans-serif;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--hs-navy);
    text-decoration: none;
    border-bottom: 2px solid var(--hs-green);
}

.page_view_homepage .hx-extra-link a:hover,
.page_view_homepage .hx-extra-link a:focus-visible {
    color: var(--hs-green-btn);
}

/* ---------- about: the existing showcase, plus the facts of /about-us ---------- */

.page_view_homepage .hx-facts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    margin: 56px 0 0;
    padding: 0;
    list-style: none;
}

.page_view_homepage .hx-fact {
    position: relative;
    margin: 0;
    padding: 30px 26px 28px;
    background: #ffffff;
    border: 1px solid var(--hs-line);
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(14, 28, 63, .04), 0 8px 24px rgba(14, 28, 63, .05);
}

.page_view_homepage .hx-fact::before {
    content: "";
    display: block;
    width: 38px;
    height: 4px;
    margin-bottom: 18px;
    background: var(--hs-green);
    border-radius: 2px;
}

.page_view_homepage .hx-fact h3 {
    margin: 0 0 10px;
    padding: 0;
    font: 800 15px/1.3 "Montserrat", "Segoe UI", Arial, sans-serif;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--hs-navy);
}

.page_view_homepage .hx-fact p {
    margin: 0;
    font: 400 15px/1.7 "Montserrat", "Segoe UI", Arial, sans-serif;
    color: var(--hs-muted);
}

.page_view_homepage .hx-section-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin-top: 34px;
}

.page_view_homepage .hx-section-actions--center {
    justify-content: center;
}

.page_view_homepage .hx-btn--navy {
    color: #ffffff;
    background: var(--hs-navy);
    box-shadow: 0 10px 24px rgba(14, 28, 63, .22);
}

.page_view_homepage .hx-btn--navy:hover,
.page_view_homepage .hx-btn--navy:focus-visible {
    color: #ffffff;
    text-decoration: none;
    background: var(--hs-green-btn);
    transform: translateY(-2px);
}

/* ---------- services ---------- */

.page_view_homepage .hx-services {
    background: var(--hs-soft);
}

.page_view_homepage .hx-services__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
}

.page_view_homepage .hx-service {
    padding: 38px 38px 34px;
    background: #ffffff;
    border: 1px solid var(--hs-line);
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(14, 28, 63, .04), 0 12px 32px rgba(14, 28, 63, .06);
}

.page_view_homepage .hx-service__ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    margin-bottom: 22px;
    color: var(--hs-green-btn);
    background: var(--hs-green-tint);
    border-radius: 50%;
}

.page_view_homepage .hx-service__ico svg {
    display: block;
    width: 28px;
    height: 28px;
}

.page_view_homepage .hx-service h3 {
    margin: 0 0 12px;
    padding: 0;
    font: 800 24px/1.2 "Montserrat", "Segoe UI", Arial, sans-serif;
    letter-spacing: -.01em;
    color: var(--hs-navy);
}

.page_view_homepage .hx-service p {
    margin: 0 0 18px;
    font: 400 16px/1.7 "Montserrat", "Segoe UI", Arial, sans-serif;
    color: var(--hs-muted);
}

.page_view_homepage .hx-service__list {
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 15px;
    line-height: 1.6;
}

.page_view_homepage .hx-service__list li {
    position: relative;
    margin: 0;
    padding: 9px 0 9px 30px;
    font: 500 15px/1.6 "Montserrat", "Segoe UI", Arial, sans-serif;
    color: var(--hs-ink-soft);
    border-top: 1px solid var(--hs-line);
}

.page_view_homepage .hx-service__list li::before {
    content: "";
    position: absolute;
    top: 18px;
    left: 4px;
    width: 12px;
    height: 7px;
    border-bottom: 2px solid var(--hs-green-btn);
    border-left: 2px solid var(--hs-green-btn);
    transform: rotate(-45deg);
}

/* ---------- tablet and phone ---------- */

@media (max-width: 991px) {
    .page_view_homepage .hx-facts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .page_view_homepage .hx-services__grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 599px) {
    .page_view_homepage .hx-facts {
        grid-template-columns: minmax(0, 1fr);
        margin-top: 40px;
    }

    .page_view_homepage .hx-service {
        padding: 28px 22px 24px;
    }

    .page_view_homepage .hx-section-actions .hx-btn,
    .page_view_homepage .hx-section-actions .hl-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .page_view_homepage .hx-btn--navy:hover,
    .page_view_homepage .hx-btn--navy:focus-visible {
        transform: none;
    }
}

/* ---------- phones: hero -> benefit strip -> the six-door collage + "Производство по поръчка" -> then the catalog ---------- */
/* .hx-flow wraps the catalog and the about section; it has no box of its own (desktop and tablets are exactly as before) */
.page_view_homepage .hx-flow { display: contents; }
@media (max-width: 767px) {
    .page_view_homepage .hx-flow { display: flex; flex-direction: column; }
    .page_view_homepage .hx-flow > .hx-about { order: -1; }
    /* the picture keeps its scale and its 20px side margins; the text follows closely, as in the reference */
    .page_view_homepage .hx-about .lp-showcase-inner { gap: 18px; }
}
