/* Hercules Building — Custom Homes page (full width, stable in editor + mobile) */

:root {
    --hb-green: #1e6a3b;
    --hb-green-dark: #18542f;
    --hb-ink: #0f172a;
    --hb-muted: #475569;
    --hb-page-bg: #f3f7f4;
    --hb-footer: #0e1a12;
}

#wrapwrap:has(.hb-custom-homes-page) {
    background-color: var(--hb-page-bg);
    overflow-x: clip;
}

#wrapwrap:has(.hb-custom-homes-page) footer#bottom {
    display: none !important;
}

#wrapwrap:has(.hb-custom-homes-page) main {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

#wrap.hb-custom-homes-page {
    background: var(--hb-page-bg);
    color: var(--hb-ink);
    padding: 0 !important;
    max-width: none !important;
}

.hb-custom-homes-page > section {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    border: none !important;
    background: transparent !important;
}

.hb-custom-homes-page .container.hb-ch-section,
.hb-custom-homes-page .hb-ch-section.container {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 640px) {
    .hb-custom-homes-page .container.hb-ch-section,
    .hb-custom-homes-page .hb-ch-section.container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .hb-custom-homes-page .container.hb-ch-section,
    .hb-custom-homes-page .hb-ch-section.container {
        padding-left: 2.5rem;
        padding-right: 2.5rem;
    }
}

/* Typography */
.hb-custom-homes-page .hb-ch-kicker {
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: var(--hb-green);
    text-transform: uppercase;
}

.hb-custom-homes-page .hb-ch-kicker-sm {
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    color: var(--hb-green);
    text-transform: uppercase;
}

.hb-custom-homes-page .hb-ch-title {
    font-weight: 800;
    line-height: 1.05;
    font-size: clamp(1.9rem, 3.2vw, 3rem);
    color: var(--hb-ink);
}

.hb-custom-homes-page .hb-ch-h3 {
    font-weight: 800;
    line-height: 1.15;
    font-size: clamp(1.5rem, 2.6vw, 2.2rem);
    color: var(--hb-ink);
}

.hb-custom-homes-page .hb-ch-lead {
    font-size: clamp(1.05rem, 1.8vw, 1.25rem);
    color: var(--hb-muted);
    line-height: 1.55;
}

.hb-custom-homes-page .hb-ch-lead-light {
    color: rgba(255, 255, 255, 0.9);
    max-width: 48rem;
    margin-left: auto;
    margin-right: auto;
}

.hb-custom-homes-page .hb-ch-body {
    font-size: 17px;
    line-height: 1.75;
    color: var(--hb-muted);
}

.hb-custom-homes-page .hb-ch-muted {
    color: var(--hb-muted);
}

/* Buttons */
.hb-custom-homes-page .hb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    border-radius: 9999px;
    font-weight: 800;
    letter-spacing: 0.2px;
    padding: 0.9rem 1.15rem;
    text-decoration: none;
    transition: transform 0.16s ease, background-color 0.16s ease;
    box-shadow: 0 1px 0 rgba(2, 8, 23, 0.06), 0 8px 28px rgba(2, 54, 20, 0.1);
}

@media (max-width: 639px) {
    .hb-custom-homes-page .hb-ch-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .hb-custom-homes-page .hb-ch-actions .hb-btn {
        width: 100%;
        white-space: normal;
        text-align: center;
    }

    .hb-custom-homes-page .hb-ch-actions.justify-content-center {
        align-items: stretch;
    }
}

@media (min-width: 640px) {
    .hb-custom-homes-page .hb-btn {
        white-space: nowrap;
    }
}

.hb-custom-homes-page .hb-btn-primary {
    background: var(--hb-green);
    color: #fff !important;
    border: none;
}

.hb-custom-homes-page .hb-btn-primary:hover {
    background: var(--hb-green-dark);
    color: #fff !important;
}

.hb-custom-homes-page .hb-btn-dark {
    background: #0f2017;
    color: #fff !important;
    border: 2px solid #1a2b22;
}

.hb-custom-homes-page .hb-btn-outline {
    background: #fff;
    color: var(--hb-green) !important;
    border: 2px solid var(--hb-green);
}

.hb-custom-homes-page .hb-btn-outline:hover {
    background: #f0fdf4;
}

.hb-custom-homes-page .hb-btn-ghost {
    border: 2px solid #fff;
    color: #fff !important;
    background: transparent;
}

.hb-custom-homes-page .hb-btn-ghost-soft {
    border-color: rgba(255, 255, 255, 0.44);
}

.hb-custom-homes-page .hb-btn-ghost:hover {
    background: rgba(255, 255, 255, 0.07);
    color: #fff !important;
}

.hb-custom-homes-page .hb-btn-white {
    background: #fff;
    color: var(--hb-green) !important;
}

.hb-custom-homes-page .hb-ch-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.hb-custom-homes-page .hb-ch-actions.justify-content-center {
    justify-content: center;
}

/* Chips */
.hb-custom-homes-page .hb-ch-chip {
    display: inline-block;
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    padding: 0.55rem 0.8rem;
    font-weight: 600;
    color: var(--hb-ink);
    font-size: 0.9rem;
}

.hb-custom-homes-page .hb-ch-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.hb-custom-homes-page .hb-ch-chip-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

@media (min-width: 640px) {
    .hb-custom-homes-page .hb-ch-chip-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Hero — image first on mobile, copy left on desktop */
.hb-custom-homes-page .hb-ch-hero-section {
    padding-top: 1.5rem !important;
}

.hb-custom-homes-page .hb-ch-hero-section .row {
    --bs-gutter-y: 2rem;
}

.hb-custom-homes-page .hb-ch-hero-visual-col {
    padding-top: 0 !important;
}

.hb-custom-homes-page .hb-ch-hero-copy-col {
    padding-bottom: 1rem !important;
}

@media (min-width: 992px) {
    .hb-custom-homes-page .hb-ch-hero-visual-col,
    .hb-custom-homes-page .hb-ch-hero-copy-col {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
    }
}

.hb-custom-homes-page .hb-ch-hero-copy {
    background: #fff;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    height: 100%;
}

@media (min-width: 768px) {
    .hb-custom-homes-page .hb-ch-hero-copy {
        padding: 2rem 2.5rem;
    }
}

.hb-custom-homes-page .hb-ch-hero-wrap {
    position: relative;
    isolation: isolate;
    border-radius: 1.25rem;
    overflow: hidden;
    min-height: 420px;
    height: 54vh;
}

@media (min-width: 992px) {
    .hb-custom-homes-page .hb-ch-hero-wrap {
        height: 100%;
        min-height: 520px;
    }
}

.hb-custom-homes-page .hb-ch-hero-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.hb-custom-homes-page .hb-ch-hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        200deg,
        rgba(0, 0, 0, 0.18) 0%,
        rgba(0, 0, 0, 0.55) 55%,
        rgba(0, 0, 0, 0.72) 100%
    );
    pointer-events: none;
    z-index: 1;
}

.hb-custom-homes-page .hb-ch-hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
    color: #fff;
}

@media (min-width: 768px) {
    .hb-custom-homes-page .hb-ch-hero-overlay {
        padding: 2rem;
    }
}

.hb-custom-homes-page .hb-ch-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.hb-custom-homes-page .hb-ch-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.23);
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.78rem;
}

.hb-custom-homes-page .hb-ch-hero-overlay-title {
    font-weight: 800;
    line-height: 1.15;
    font-size: clamp(1.7rem, 5vw, 2.4rem);
    color: #fff;
    margin: 0;
}

/* Horizontal rails */
.hb-custom-homes-page .hb-ch-rail {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.hb-custom-homes-page .hb-ch-rail > * {
    scroll-snap-align: start;
    flex: 0 0 auto;
}

.hb-custom-homes-page .hb-ch-lookbook-section {
    padding-top: 1.5rem !important;
    padding-bottom: 0.5rem !important;
}

.hb-custom-homes-page .hb-ch-lookbook-item {
    min-width: 78%;
    background: #fff;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(10, 20, 30, 0.07);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    margin: 0;
}

@media (min-width: 640px) {
    .hb-custom-homes-page .hb-ch-lookbook-item {
        min-width: 48%;
    }
}

@media (min-width: 1024px) {
    .hb-custom-homes-page .hb-ch-lookbook-rail {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        overflow: visible;
        gap: 1rem;
    }

    .hb-custom-homes-page .hb-ch-lookbook-item {
        min-width: 0;
    }
}

.hb-custom-homes-page .hb-ch-lookbook-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 40px rgba(2, 8, 23, 0.12);
}

.hb-custom-homes-page .hb-ch-lookbook-img {
    width: 100%;
    height: 16rem;
    object-fit: cover;
    display: block;
}

/* Intro */
.hb-custom-homes-page .hb-ch-intro-section {
    padding-top: 2.5rem !important;
    padding-bottom: 2.5rem !important;
}

.hb-custom-homes-page .hb-ch-intro-inner {
    max-width: 48rem;
    margin-left: auto;
    margin-right: auto;
}

/* Split */
.hb-custom-homes-page .hb-ch-split-section {
    padding-bottom: 1rem !important;
}

.hb-custom-homes-page .hb-ch-panel {
    background: #fff;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    height: 100%;
}

@media (min-width: 768px) {
    .hb-custom-homes-page .hb-ch-panel {
        padding: 2rem;
    }
}

.hb-custom-homes-page .hb-ch-split-img {
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.hb-custom-homes-page .hb-ch-split-photo {
    width: 100%;
    height: 320px;
    object-fit: cover;
    display: block;
}

@media (min-width: 768px) {
    .hb-custom-homes-page .hb-ch-split-photo {
        height: 420px;
    }
}

/* Trust strip */
.hb-custom-homes-page .hb-ch-trust-section {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
}

.hb-custom-homes-page .hb-ch-trust-grid {
    display: grid;
    gap: 0.75rem;
}

@media (min-width: 640px) {
    .hb-custom-homes-page .hb-ch-trust-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 1024px) {
    .hb-custom-homes-page .hb-ch-trust-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.hb-custom-homes-page .hb-ch-trust-box {
    background: #fff !important;
    border-radius: 0.75rem !important;
    font-size: 15px;
    color: var(--hb-muted);
}

.hb-custom-homes-page .hb-ch-trust-box .card-body {
    padding: 1rem !important;
}

.hb-custom-homes-page .hb-ch-trust-label {
    color: var(--hb-green);
    font-weight: 600;
}

/* Projects — full-width white band */
.hb-custom-homes-page .hb-ch-projects-section {
    padding-top: 2.5rem !important;
    padding-bottom: 2.5rem !important;
    background: #fff !important;
}

.hb-custom-homes-page .hb-ch-projects-section .hb-ch-h3 {
    margin-bottom: 1.5rem !important;
}

.hb-custom-homes-page .hb-ch-project-card {
    border-radius: 1rem !important;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

/* Mobile: clean vertical stack — no sideways scroll for 3 cards */
@media (max-width: 639px) {
    .hb-custom-homes-page .hb-ch-projects-rail {
        display: flex;
        flex-direction: column;
        overflow: visible;
        gap: 1.25rem;
        padding-bottom: 0;
    }

    .hb-custom-homes-page .hb-ch-project-card {
        width: 100%;
        min-width: 0;
    }

    .hb-custom-homes-page .hb-ch-project-img {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 10;
        object-fit: cover;
    }

    .hb-custom-homes-page .hb-ch-project-card .card-body {
        padding: 1rem 1.15rem 1.15rem !important;
    }

    .hb-custom-homes-page .hb-ch-project-card .fw-semibold {
        font-size: 1.05rem;
    }

    .hb-custom-homes-page .hb-ch-projects-section .text-center .hb-btn {
        width: 100%;
        margin-top: 0.25rem;
    }
}

/* Tablet: 2-up grid, third card full width below */
@media (min-width: 640px) and (max-width: 1023px) {
    .hb-custom-homes-page .hb-ch-projects-rail {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        overflow: visible;
        gap: 1.25rem;
        padding-bottom: 0;
    }

    .hb-custom-homes-page .hb-ch-project-card {
        min-width: 0;
    }

    .hb-custom-homes-page .hb-ch-project-card:last-child {
        grid-column: 1 / -1;
    }
}

@media (min-width: 1024px) {
    .hb-custom-homes-page .hb-ch-projects-rail {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        overflow: visible;
        gap: 1.5rem;
        padding-bottom: 0;
    }

    .hb-custom-homes-page .hb-ch-project-card {
        min-width: 0;
    }
}

.hb-custom-homes-page .hb-ch-project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 40px rgba(2, 8, 23, 0.12);
}

.hb-custom-homes-page .hb-ch-project-img {
    width: 100%;
    height: 16rem;
    object-fit: cover;
    display: block;
}

.hb-custom-homes-page .hb-ch-project-card .card-body {
    padding: 1.25rem !important;
}

/* Process — horizontal rail at all breakpoints (matches HTML) */
.hb-custom-homes-page .hb-ch-process-section {
    padding-top: 2.5rem !important;
    padding-bottom: 2.5rem !important;
}

.hb-custom-homes-page .hb-ch-process-card {
    min-width: 78%;
    border-radius: 1rem !important;
}

@media (min-width: 640px) {
    .hb-custom-homes-page .hb-ch-process-card {
        min-width: 48%;
    }
}

@media (min-width: 1024px) {
    .hb-custom-homes-page .hb-ch-process-card {
        min-width: 32%;
    }
}

.hb-custom-homes-page .hb-ch-step-label {
    color: var(--hb-green);
    font-weight: 700;
    font-size: 0.875rem;
}

.hb-custom-homes-page .hb-ch-process-card .card-body {
    padding: 1.25rem !important;
}

/* CTA — full width band */
.hb-custom-homes-page .hb-ch-cta-section {
    padding-top: 3.5rem !important;
    padding-bottom: 3.5rem !important;
    background: linear-gradient(135deg, #1e6a3b 0%, #18542f 100%) !important;
}

.hb-custom-homes-page .hb-ch-cta-inner {
    text-align: center;
    color: #fff;
}

/* Footer */
.hb-custom-homes-page .hb-site-footer {
    background: var(--hb-footer) !important;
    color: #fff;
    margin-top: 0 !important;
}

.hb-custom-homes-page .hb-footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2.5rem 1rem;
}

.hb-custom-homes-page .hb-site-footer a {
    color: #c7ead4;
    text-decoration: none;
}

.hb-custom-homes-page .hb-footer-bottom {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
}

@media (min-width: 768px) {
    .hb-custom-homes-page .hb-footer-bottom {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

/* Odoo editor: keep layout identical — only enable image/text interaction */
.editor_enable .hb-custom-homes-page .hb-ch-hero-shade {
    pointer-events: none;
}

.editor_enable .hb-custom-homes-page .hb-ch-hero-overlay {
    pointer-events: none;
}

.editor_enable .hb-custom-homes-page .hb-ch-hero-overlay .s_allow_columns,
.editor_enable .hb-custom-homes-page .hb-ch-hero-overlay .hb-ch-actions,
.editor_enable .hb-custom-homes-page .hb-ch-hero-overlay .hb-ch-actions * {
    pointer-events: auto;
}

.editor_enable .hb-custom-homes-page .hb-ch-hero-img,
.editor_enable .hb-custom-homes-page .o_we_custom_image {
    cursor: pointer;
    pointer-events: auto;
}

.editor_enable .hb-custom-homes-page .hb-ch-lookbook-item:hover,
.editor_enable .hb-custom-homes-page .hb-ch-project-card:hover {
    transform: none;
}

@media (prefers-reduced-motion: no-preference) {
    .hb-custom-homes-page .hb-ch-reveal {
        opacity: 0;
        transform: translateY(12px);
        animation: hbChFadeUp 0.55s ease-out 0.04s forwards;
    }

    @keyframes hbChFadeUp {
        to {
            opacity: 1;
            transform: none;
        }
    }
}

.editor_enable .hb-custom-homes-page .hb-ch-reveal {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
}
