/* =========================================================
   Housetory - User Guide Landing Module
   ========================================================= */

.housetory-user-guide-page {
    max-width: 1180px;
    margin: 0 auto;
    padding: 36px 22px 86px;
    color: #2f2923;
    box-sizing: border-box;
}

.housetory-user-guide-page *,
.housetory-user-guide-page *::before,
.housetory-user-guide-page *::after {
    box-sizing: border-box;
}

.housetory-user-guide-hero {
    background: linear-gradient(135deg, #fffaf2 0%, #efe7da 100%);
    border: 1px solid rgba(80, 60, 35, 0.16);
    border-radius: 26px;
    padding: clamp(36px, 5vw, 64px);
    margin: 0 0 34px;
    box-shadow: 0 16px 38px rgba(50, 38, 25, 0.08);
    text-align: center;
}

.housetory-user-guide-kicker {
    margin: 0 0 12px;
    color: #56766d;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.78rem;
    font-weight: 800;
}

.housetory-user-guide-hero h1 {
    font-family: Georgia, serif;
    font-size: clamp(2.6rem, 5vw, 4.8rem);
    line-height: 1.05;
    margin: 0 0 18px;
    color: #2f2923;
}

.housetory-user-guide-hero p {
    max-width: 760px;
    margin: 0 auto;
    color: #5f564d;
    font-size: 1.1rem;
    line-height: 1.65;
}

.housetory-user-guide-intro,
.housetory-user-guide-review,
.housetory-user-guide-links {
    max-width: 860px;
    margin: 0 auto 34px;
    text-align: center;
}

.housetory-user-guide-intro h2,
.housetory-user-guide-review h2,
.housetory-user-guide-links h2 {
    font-family: Georgia, serif;
    font-size: clamp(1.9rem, 3vw, 2.6rem);
    margin: 0 0 14px;
    color: #2f2923;
}

.housetory-user-guide-intro p,
.housetory-user-guide-review p,
.housetory-user-guide-links p {
    color: #5f564d;
    font-size: 1.05rem;
    line-height: 1.65;
    margin: 0;
}

.housetory-guide-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
    margin: 38px 0 48px;
    padding: 0;
}

.housetory-guide-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #fffaf2;
    border: 1px solid rgba(80, 60, 35, 0.16);
    border-radius: 18px;
    padding: 26px 24px;
    box-shadow: 0 10px 28px rgba(50, 38, 25, 0.06);
}

.housetory-guide-card h3 {
    font-family: Georgia, serif;
    font-size: 1.35rem;
    line-height: 1.22;
    margin: 0 0 12px;
    color: #2f2923;
}

.housetory-guide-card p {
    color: #5f564d;
    line-height: 1.58;
    margin: 0 0 20px;
}

.housetory-guide-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: auto;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 999px;
    background: #56766d;
    color: #fff !important;
    text-decoration: none !important;
    font-weight: 800;
    font-size: 0.92rem;
    text-align: center;
}

.housetory-guide-btn:hover,
.housetory-guide-btn:focus {
    background: #45635b;
    color: #fff !important;
    text-decoration: none !important;
}

.housetory-guide-link-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 18px;
}

.housetory-guide-link-row a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 999px;
    background: #fffaf2;
    border: 1px solid rgba(80, 60, 35, 0.18);
    color: #3d3125 !important;
    text-decoration: none !important;
    font-weight: 800;
}

.housetory-guide-link-row a:hover,
.housetory-guide-link-row a:focus {
    color: #56766d !important;
    border-color: rgba(86, 118, 109, 0.34);
    text-decoration: none !important;
}

/* Tidy Joomla/Helix article/module spacing only when the module is present. */
body:has(.housetory-user-guide-page) #sp-main-body {
    padding-top: 0 !important;
}

body:has(.housetory-user-guide-page) #sp-component,
body:has(.housetory-user-guide-page) .com-content-article,
body:has(.housetory-user-guide-page) .item-page,
body:has(.housetory-user-guide-page) .article-body,
body:has(.housetory-user-guide-page) .com-content-article__body,
body:has(.housetory-user-guide-page) .sp-module,
body:has(.housetory-user-guide-page) .custom {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

@media (max-width: 1000px) {
    .housetory-guide-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .housetory-user-guide-page {
        padding: 24px 16px 64px;
    }

    .housetory-user-guide-hero {
        padding: 34px 24px;
    }

    .housetory-guide-grid {
        grid-template-columns: 1fr;
    }
}
