/* Hercules Building — Residential page (Buildingwise-style layout) */

:root {
    --hb-green: #1e6a3b;
    --hb-ink: #111111;
    --hb-body: #333333;
    --hb-muted: #666666;
    --hb-page-bg: #ffffff;
    --hb-dark: #1a1a1a;
    --hb-footer: #0e1a12;
}

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

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

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

#wrap.hb-residential-page {
    background: var(--hb-page-bg);
    color: var(--hb-body);
    padding: 0 !important;
    max-width: none !important;
    font-family: Inter, system-ui, -apple-system, sans-serif;
}

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

.hb-residential-page .container.hb-res-section,
.hb-residential-page .hb-res-section.container {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

@media (min-width: 992px) {
    .hb-residential-page .container.hb-res-section,
    .hb-residential-page .hb-res-section.container {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

.hb-residential-page .hb-res-module-padding {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
}

@media (min-width: 768px) {
    .hb-residential-page .hb-res-module-padding {
        padding-top: 4rem !important;
        padding-bottom: 4rem !important;
    }
}

@media (min-width: 1200px) {
    .hb-residential-page .hb-res-module-padding {
        padding-top: 5.5rem !important;
        padding-bottom: 5.5rem !important;
    }
}

/* Typography */
.hb-residential-page .hb-res-hero-title {
    font-weight: 700;
    line-height: 1.08;
    font-size: clamp(2.25rem, 5.5vw, 4.5rem);
    color: #fff;
    letter-spacing: -0.02em;
}

.hb-residential-page .hb-res-section-title {
    font-weight: 700;
    line-height: 1.12;
    font-size: clamp(2rem, 4vw, 3.25rem);
    color: var(--hb-ink);
    letter-spacing: -0.02em;
    margin-bottom: 0;
}

.hb-residential-page .hb-res-h3 {
    font-weight: 700;
    line-height: 1.2;
    font-size: clamp(1.35rem, 2.4vw, 1.75rem);
    color: var(--hb-ink);
}

.hb-residential-page .hb-res-copy {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--hb-body);
}

.hb-residential-page .hb-res-copy p {
    margin-bottom: 1rem;
}

.hb-residential-page .hb-res-copy a {
    color: var(--hb-ink);
    text-decoration: underline;
}

.hb-residential-page .hb-res-process-step {
    margin-bottom: 1rem;
    line-height: 1.65;
    color: var(--hb-body);
}

/* Buttons */
.hb-residential-page .hb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.85rem 1.5rem;
    text-decoration: none;
    transition: opacity 0.15s ease;
}

.hb-residential-page .hb-btn-dark {
    background: var(--hb-ink);
    color: #fff;
    border: 2px solid var(--hb-ink);
}

.hb-residential-page .hb-btn-dark:hover {
    opacity: 0.88;
    color: #fff;
}

.hb-residential-page .hb-btn-green {
    background: var(--hb-green);
    color: #fff;
    border: 2px solid var(--hb-green);
}

.hb-residential-page .hb-btn-green:hover {
    opacity: 0.9;
    color: #fff;
}

.hb-residential-page .hb-btn-outline {
    background: transparent;
    color: var(--hb-ink);
    border: 1px solid var(--hb-ink);
    padding: 0.55rem 1rem;
    font-size: 0.85rem;
}

.hb-residential-page .hb-btn-outline:hover {
    background: var(--hb-ink);
    color: #fff;
}

.hb-residential-page .hb-res-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* Hero — s_cover editable background */
.hb-residential-page .hb-res-hero-section.s_cover {
    position: relative;
    min-height: clamp(520px, 78vh, 860px);
    display: flex;
    align-items: flex-end;
}

.hb-residential-page .hb-res-hero-section .s_parallax_bg.oe_img_bg,
.hb-residential-page .hb-res-hero-section .hb-res-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover !important;
    background-repeat: no-repeat;
    background-position: center center;
}

.hb-residential-page .hb-res-hero-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.05) 0%,
        rgba(0, 0, 0, 0.25) 45%,
        rgba(0, 0, 0, 0.72) 100%
    );
    z-index: 1;
    pointer-events: none;
}

.hb-residential-page .hb-res-hero-stage {
    position: relative;
    z-index: 2;
    width: 100%;
}

.hb-residential-page .hb-res-hero-content {
    width: 100%;
    padding-bottom: clamp(2.5rem, 6vw, 5rem);
}

.hb-residential-page .hb-res-hero-content .s_allow_columns p {
    color: rgba(255, 255, 255, 0.95);
    max-width: 52rem;
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 1rem;
}

/* Dual image row */
.hb-residential-page .hb-res-dual-large img,
.hb-residential-page .hb-res-dual-small img,
.hb-residential-page .hb-res-dual-large .o_we_custom_image,
.hb-residential-page .hb-res-dual-small .o_we_custom_image {
    width: 100%;
    display: block;
    object-fit: cover;
}

.hb-residential-page .hb-res-dual-large img {
    min-height: 320px;
    aspect-ratio: 950 / 635;
}

.hb-residential-page .hb-res-dual-small img {
    min-height: 320px;
    aspect-ratio: 475 / 635;
}

@media (min-width: 768px) {
    .hb-residential-page .hb-res-dual-large img,
    .hb-residential-page .hb-res-dual-small img {
        min-height: 420px;
        height: 100%;
    }
}

/* Cover overlay sections (services + FAQ) — s_cover editable bg */
.hb-residential-page .hb-res-cover-panel.s_cover {
    position: relative;
    min-height: clamp(480px, 62vh, 720px);
    display: flex;
    align-items: flex-end;
}

.hb-residential-page .hb-res-cover-panel .s_parallax_bg.oe_img_bg,
.hb-residential-page .hb-res-cover-panel .hb-res-cover-bg {
    position: absolute;
    inset: 0;
    background-size: cover !important;
    background-repeat: no-repeat;
    background-position: center center;
}

.hb-residential-page .hb-res-overlay-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.15) 0%,
        rgba(0, 0, 0, 0.55) 50%,
        rgba(0, 0, 0, 0.82) 100%
    );
    z-index: 1;
    pointer-events: none;
}

.hb-residential-page .hb-res-overlay-inner {
    position: relative;
    z-index: 2;
    width: 100%;
    padding-bottom: clamp(2rem, 5vw, 4.5rem);
    padding-top: 3rem;
}

.hb-residential-page .hb-res-service-card,
.hb-residential-page .hb-res-faq-card {
    border-bottom: 1px solid rgba(255, 255, 255, 0.22);
    color: #fff;
}

.hb-residential-page .hb-res-service-title {
    font-weight: 700;
    font-size: clamp(1.35rem, 2.8vw, 2rem);
    line-height: 1.25;
    color: #fff;
    margin: 0;
}

.hb-residential-page .hb-res-service-body,
.hb-residential-page .hb-res-service-body p {
    color: rgba(255, 255, 255, 0.92);
    line-height: 1.65;
    font-size: 1rem;
    max-width: 38rem;
}

.hb-residential-page .hb-res-service-body a {
    color: #fff;
    text-decoration: underline;
}

/* Two-column editorial blocks */
.hb-residential-page .hb-res-title-row {
    margin-bottom: 0.5rem;
}

.hb-residential-page .hb-res-col-left {
    padding-top: 0.5rem;
}

.hb-residential-page .hb-res-col-right {
    padding-top: 0.5rem;
}

@media (min-width: 992px) {
    .hb-residential-page .hb-res-col-right {
        padding-top: 0.25rem;
    }
}

/* Project cards */
.hb-residential-page .hb-res-project-card {
    color: inherit;
}

.hb-residential-page .hb-res-project-photo,
.hb-residential-page .hb-res-project-card img {
    width: 100%;
    aspect-ratio: 785 / 520;
    object-fit: cover;
    display: block;
}

.hb-residential-page .hb-res-project-title {
    font-weight: 600;
    font-size: 1rem;
    color: var(--hb-ink);
    margin: 0 0 0.15rem;
}

.hb-residential-page .hb-res-project-sub {
    color: var(--hb-muted);
    font-size: 0.9rem;
    margin: 0;
}

/* Full-width banner */
.hb-residential-page .hb-res-banner-section {
    padding: 0 !important;
}

.hb-residential-page .hb-res-banner-full img,
.hb-residential-page .hb-res-banner-full .o_we_custom_image {
    width: 100%;
    display: block;
    object-fit: cover;
    min-height: clamp(240px, 46vw, 520px);
    max-height: 560px;
}

/* Portrait gallery strip */
.hb-residential-page .hb-res-gallery-section {
    padding: 3rem 0 !important;
    overflow: hidden;
}

.hb-residential-page .hb-res-gallery-rail {
    display: flex;
    gap: 0.65rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 0 1.25rem 0.5rem;
    -webkit-overflow-scrolling: touch;
}

@media (min-width: 992px) {
    .hb-residential-page .hb-res-gallery-rail {
        padding-left: max(1.25rem, calc((100vw - 1200px) / 2 + 2rem));
    }
}

.hb-residential-page .hb-res-gallery-rail img,
.hb-residential-page .hb-res-gallery-photo {
    flex: 0 0 auto;
    width: clamp(200px, 22vw, 280px);
    height: clamp(260px, 32vw, 380px);
    object-fit: cover;
    scroll-snap-align: start;
    display: block;
}

.hb-residential-page .hb-res-gallery-item {
    flex: 0 0 auto;
    background: transparent;
}

/* Testimonials — dark editorial */
.hb-residential-page .hb-res-testimonials-section {
    background: var(--hb-dark);
    color: #fff;
    padding: clamp(3rem, 7vw, 5.5rem) 0 !important;
}

.hb-residential-page .hb-res-test-nav {
    opacity: 0.45;
    padding: 0.75rem 0;
    border-left: 2px solid transparent;
    padding-left: 1rem;
    margin-bottom: 0.5rem;
}

.hb-residential-page .hb-res-test-nav.active {
    opacity: 1;
    border-left-color: #fff;
}

.hb-residential-page .hb-res-test-nav-name {
    font-weight: 600;
    font-size: 1rem;
    margin: 0 0 0.25rem;
}

.hb-residential-page .hb-res-test-nav-loc,
.hb-residential-page .hb-res-test-nav-tag {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.65);
    margin: 0;
}

.hb-residential-page .hb-res-quote-mark {
    opacity: 0.15;
    margin-bottom: 1rem;
}

.hb-residential-page .hb-res-quote-text {
    font-size: clamp(1.15rem, 2.2vw, 1.65rem);
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 400;
    margin: 0;
}

.hb-residential-page .hb-res-quote-mobile-meta {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

@media (min-width: 768px) {
    .hb-residential-page .hb-res-quote-mobile-meta {
        display: none;
    }
}

/* Pre-footer CTA (white) */
.hb-residential-page .hb-res-prefooter-section {
    background: #fff;
    padding: clamp(3rem, 6vw, 5rem) 0 !important;
}

.hb-residential-page .hb-res-prefooter-title {
    font-weight: 700;
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    color: var(--hb-ink);
    margin-bottom: 1rem;
}

.hb-residential-page .hb-res-prefooter-copy {
    color: var(--hb-body);
    line-height: 1.65;
    max-width: 32rem;
    margin-bottom: 1.5rem;
}

/* Footer */
.hb-residential-page .hb-site-footer {
    background: var(--hb-footer) !important;
    color: #fff;
    padding: 3rem 0 1.5rem !important;
}

.hb-residential-page .hb-site-footer a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
}

.hb-residential-page .hb-site-footer a:hover {
    color: #fff;
}

.hb-residential-page .hb-footer-bottom {
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    justify-content: space-between;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.65);
}

/* Scroll reveal animations */
@media (prefers-reduced-motion: no-preference) {
    .hb-residential-page .hb-res-reveal {
        opacity: 0;
        transform: translateY(12px);
        animation: hbResFadeUp 0.55s ease-out 0.04s forwards;
    }

    .hb-residential-page .hb-res-delay-1 {
        animation-delay: 0.12s;
    }

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

.editor_enable .hb-residential-page .hb-res-reveal {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
}

/* Odoo editor — keep overlays clickable for bg/text edits */
.editor_enable .hb-residential-page .hb-res-hero-gradient,
.editor_enable .hb-residential-page .hb-res-overlay-gradient {
    pointer-events: none;
}

.editor_enable .hb-residential-page .hb-res-hero-stage,
.editor_enable .hb-residential-page .hb-res-overlay-inner {
    pointer-events: none;
}

.editor_enable .hb-residential-page .hb-res-hero-stage .s_allow_columns,
.editor_enable .hb-residential-page .hb-res-overlay-inner .s_allow_columns,
.editor_enable .hb-residential-page .hb-res-actions,
.editor_enable .hb-residential-page .hb-res-actions * {
    pointer-events: auto;
}

.editor_enable .hb-residential-page .s_parallax_bg.oe_img_bg,
.editor_enable .hb-residential-page .o_we_custom_image {
    cursor: pointer;
    pointer-events: auto;
}

@media (max-width: 767px) {
    .hb-residential-page .hb-res-hero-content {
        padding-bottom: 2rem;
    }

    .hb-residential-page .hb-res-cover-panel.s_cover {
        min-height: clamp(420px, 70vh, 560px);
    }

    .hb-residential-page .hb-res-module-padding {
        padding-top: 2.5rem !important;
        padding-bottom: 2.5rem !important;
    }

    .hb-residential-page .hb-res-gallery-section {
        padding: 2rem 0 !important;
    }
}
