/* Contact Module Height Fix - Universal Application */
/* Applies to ALL pages: Homepage, TCO, Flow Rates, Warranty, Benchmarks, Case Studies */
/* Matches production: 70% color overlay coverage, proper text positioning */

/* Base styling for ALL contact modules */
section.contact-module,
section.contact-module.homepage-contact,
body section.contact-module,
body section.contact-module.homepage-contact {
    min-height: 250px !important;
    padding: 48px 0 !important;
    max-height: 350px !important;
}

section.contact-module .color-overlay,
section.contact-module.homepage-contact .color-overlay,
body section.contact-module .color-overlay,
body section.contact-module.homepage-contact .color-overlay {
    /* Cover only ~70% of section height like production */
    padding: 32px 0 !important;
    height: 70% !important;
    min-height: 200px !important;
    max-height: 250px !important;
    display: flex !important;
    align-items: center !important;
}

section.contact-module .image-overlay,
section.contact-module.homepage-contact .image-overlay,
body section.contact-module .image-overlay,
body section.contact-module.homepage-contact .image-overlay {
    padding: 2rem 0 !important;
    height: auto !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
}

/* Text styling preservation */
section.contact-module .image-overlay h2,
section.contact-module.homepage-contact .image-overlay h2,
body section.contact-module .image-overlay h2,
body section.contact-module.homepage-contact .image-overlay h2 {
    margin: 0 !important;
    line-height: 1.2 !important;
    flex: 0 0 40% !important;
    color: white !important;
}

section.contact-module .image-overlay p,
section.contact-module.homepage-contact .image-overlay p,
body section.contact-module .image-overlay p,
body section.contact-module.homepage-contact .image-overlay p {
    margin: 0 !important;
    line-height: 1.4 !important;
    flex: 0 0 35% !important;
    color: white !important;
}

section.contact-module .image-overlay .btn,
section.contact-module.homepage-contact .image-overlay .btn,
body section.contact-module .image-overlay .btn,
body section.contact-module.homepage-contact .image-overlay .btn {
    margin: 0 !important;
    flex: 0 0 auto !important;
}

/* Case Study Pages - Specific Targeting */
.case-study section.contact-module,
.case-study section.contact-module.homepage-contact,
.case-study-detail section.contact-module,
.case-study-detail section.contact-module.homepage-contact,
body.case-study section.contact-module,
body.case-study section.contact-module.homepage-contact,
body.case-study-detail section.contact-module,
body.case-study-detail section.contact-module.homepage-contact,
body.codezero-style section.contact-module,
body.codezero-style section.contact-module.homepage-contact {
    min-height: 250px !important;
    padding: 48px 0 !important;
    max-height: 350px !important;
}

.case-study section.contact-module .color-overlay,
.case-study section.contact-module.homepage-contact .color-overlay,
.case-study-detail section.contact-module .color-overlay,
.case-study-detail section.contact-module.homepage-contact .color-overlay,
body.case-study section.contact-module .color-overlay,
body.case-study section.contact-module.homepage-contact .color-overlay,
body.case-study-detail section.contact-module .color-overlay,
body.case-study-detail section.contact-module.homepage-contact .color-overlay,
body.codezero-style section.contact-module .color-overlay,
body.codezero-style section.contact-module.homepage-contact .color-overlay {
    padding: 32px 0 !important;
    height: 70% !important;
    min-height: 200px !important;
    max-height: 250px !important;
    display: flex !important;
    align-items: center !important;
}

.case-study section.contact-module .image-overlay,
.case-study section.contact-module.homepage-contact .image-overlay,
.case-study-detail section.contact-module .image-overlay,
.case-study-detail section.contact-module.homepage-contact .image-overlay,
body.case-study section.contact-module .image-overlay,
body.case-study section.contact-module.homepage-contact .image-overlay,
body.case-study-detail section.contact-module .image-overlay,
body.case-study-detail section.contact-module.homepage-contact .image-overlay,
body.codezero-style section.contact-module .image-overlay,
body.codezero-style section.contact-module.homepage-contact .image-overlay {
    padding: 2rem 0 !important;
    height: auto !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
}

/* Case Study Text and Button Styling */
.case-study section.contact-module .image-overlay h2,
.case-study-detail section.contact-module .image-overlay h2,
body.case-study section.contact-module .image-overlay h2,
body.case-study-detail section.contact-module .image-overlay h2,
body.codezero-style section.contact-module .image-overlay h2 {
    margin: 0 !important;
    line-height: 1.2 !important;
    flex: 0 0 40% !important;
    color: white !important;
}

.case-study section.contact-module .image-overlay p,
.case-study-detail section.contact-module .image-overlay p,
body.case-study section.contact-module .image-overlay p,
body.case-study-detail section.contact-module .image-overlay p,
body.codezero-style section.contact-module .image-overlay p {
    margin: 0 !important;
    line-height: 1.4 !important;
    flex: 0 0 35% !important;
    color: white !important;
}

.case-study section.contact-module .image-overlay .btn,
.case-study-detail section.contact-module .image-overlay .btn,
body.case-study section.contact-module .image-overlay .btn,
body.case-study-detail section.contact-module .image-overlay .btn,
body.codezero-style section.contact-module .image-overlay .btn,
.cz-theme section.contact-module .image-overlay .btn {
    margin: 0 !important;
    flex: 0 0 auto !important;
    background-color: #00A651 !important;
    border-color: #00A651 !important;
    color: white !important;
    padding: 1rem 2rem !important;
    font-weight: bold !important;
}

/* Ensure all button colors are properly styled */
section.contact-module .image-overlay .btn-primary,
section.contact-module .image-overlay .btn-cta-green,
section.contact-module .image-overlay .btn-home-cta {
    background-color: #00A651 !important;
    border-color: #00A651 !important;
    color: white !important;
    padding: 1rem 2rem !important;
    font-weight: bold !important;
    text-transform: uppercase !important;
    border-radius: 0.25rem !important;
    font-size: 1.25rem !important;
}

section.contact-module .image-overlay .btn-primary:hover,
section.contact-module .image-overlay .btn-cta-green:hover,
section.contact-module .image-overlay .btn-home-cta:hover,
html.cz-theme section.contact-module.homepage-contact .image-overlay .btn:hover,
html.cz-theme section.contact-module.homepage-contact .image-overlay .btn-home-cta:hover,
html.cz-theme section.contact-module.homepage-contact .image-overlay .btn-cta-green:hover {
    background-color: #008a43 !important;
    border-color: #008a43 !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2) !important;
    transform: translateY(-2px) !important;
    transition: all 0.2s ease !important;
}

/* Override specifically for cz-theme (WUTR and others) */
html.cz-theme .case-study .homepage-contact .image-overlay .btn,
html.cz-theme .case-study .homepage-contact .image-overlay .btn-cta-green,
html.cz-theme .case-study .homepage-contact .image-overlay .btn-home-cta,
html.cz-theme section.contact-module .image-overlay .btn,
html.cz-theme section.contact-module.homepage-contact .image-overlay .btn,
html.cz-theme section.contact-module .image-overlay .btn-cta-green,
html.cz-theme section.contact-module.homepage-contact .image-overlay .btn-cta-green,
html.cz-theme section.contact-module .image-overlay .btn-home-cta,
html.cz-theme section.contact-module.homepage-contact .image-overlay .btn-home-cta {
    background-color: #00A651 !important;
    border-color: #00A651 !important;
    color: white !important;
    padding: 1rem 2rem !important;
    font-weight: bold !important;
    text-transform: uppercase !important;
    border-radius: 0.25rem !important;
    font-size: 1.25rem !important;
}

html.cz-theme .case-study .homepage-contact .image-overlay .btn strong,
html.cz-theme .case-study .homepage-contact .image-overlay .btn-cta-green strong,
html.cz-theme .case-study .homepage-contact .image-overlay .btn-home-cta strong,
html.cz-theme section.contact-module .image-overlay .btn strong,
html.cz-theme section.contact-module.homepage-contact .image-overlay .btn strong,
html.cz-theme section.contact-module .image-overlay .btn-cta-green strong,
html.cz-theme section.contact-module.homepage-contact .image-overlay .btn-cta-green strong,
html.cz-theme section.contact-module .image-overlay .btn-home-cta strong,
html.cz-theme section.contact-module.homepage-contact .image-overlay .btn-home-cta strong {
    color: white !important;
}

/* Calculator Pages - TCO, Flow Rates, Warranty, Benchmarks */
body.tco section.contact-module,
body.flow-rates section.contact-module,
body.warranty section.contact-module,
body.benchmarks section.contact-module,
body.tco section.contact-module.homepage-contact,
body.flow-rates section.contact-module.homepage-contact,
body.warranty section.contact-module.homepage-contact,
body.benchmarks section.contact-module.homepage-contact,
html.cz-theme body section.contact-module.homepage-contact {
    min-height: 250px !important;
    padding: 48px 0 !important;
    max-height: 350px !important;
}

body.tco section.contact-module .color-overlay,
body.flow-rates section.contact-module .color-overlay,
body.warranty section.contact-module .color-overlay,
body.benchmarks section.contact-module .color-overlay,
body.tco section.contact-module.homepage-contact .color-overlay,
body.flow-rates section.contact-module.homepage-contact .color-overlay,
body.warranty section.contact-module.homepage-contact .color-overlay,
body.benchmarks section.contact-module.homepage-contact .color-overlay,
html.cz-theme body section.contact-module.homepage-contact .color-overlay {
    padding: 32px 0 !important;
    height: 70% !important;
    min-height: 200px !important;
    max-height: 250px !important;
    display: flex !important;
    align-items: center !important;
}

body.tco section.contact-module .image-overlay,
body.flow-rates section.contact-module .image-overlay,
body.warranty section.contact-module .image-overlay,
body.benchmarks section.contact-module .image-overlay,
body.tco section.contact-module.homepage-contact .image-overlay,
body.flow-rates section.contact-module.homepage-contact .image-overlay,
body.warranty section.contact-module.homepage-contact .image-overlay,
body.benchmarks section.contact-module.homepage-contact .image-overlay,
html.cz-theme section.contact-module .image-overlay,
html.cz-theme section.contact-module.homepage-contact .image-overlay {
    padding: 2rem 0 !important;
    height: auto !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
}
