/* ==========================================================================
   Contact Page Dedicated Stylesheet
   ========================================================================== */

/* 1. Fix massive empty space at the top and pull the curve up */
.page-contact-wrapper {
    margin-top: -120px !important; /* Nudge form upward (less aggressive than -180px) */
    background: transparent !important;
    border-radius: 0 !important;
    position: relative !important;
    z-index: 100 !important;
    padding-top: 50px !important;
    overflow: visible !important;

}

/* Apply the left-bleed elliptical curve */
.page-contact-wrapper::before {
    content: "" !important;
    position: absolute !important;
    top: 0 !important;
    left: calc(-50vw + 50%) !important;
    width: calc(100% + 50vw - 50%) !important;
    height: 100% !important;
    background: #ffffff !important;
    border-radius: 0 !important;
    border-top-left-radius: calc(50vw - 50% + 175px) 175px !important;
    z-index: -1 !important;
}

/* 2. Form fields with rounded corners */
.page-contact-wrapper .forminator-custom-form input,
.page-contact-wrapper .forminator-custom-form textarea,
.page-contact-wrapper .forminator-custom-form select,
.page-contact-wrapper .forminator-custom-form .select2-container .select2-selection {
    border-radius: 12px !important; /* Rounded corners instead of rectangular */
    border: 1px solid #ccc !important;
    padding: 10px 15px !important;
    background: #fff !important;
}

/* 3. Ensure Forminator button text is visible and styling is correct */
.page-contact-wrapper .forminator-custom-form button.forminator-button-submit {
    color: #ffffff !important;
    text-indent: 0 !important;
    font-size: 16px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 15px 40px !important;
    border-radius: 30px !important; /* Pill shaped */
    background-color: #D35A27 !important; /* Brand orange */
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    border: none !important;
    height: auto !important;
    min-height: 48px !important;
}

/* Hard override for any span or pseudo element hiding the text */
.page-contact-wrapper .forminator-custom-form button.forminator-button-submit span,
.page-contact-wrapper .forminator-custom-form button.forminator-button-submit:before,
.page-contact-wrapper .forminator-custom-form button.forminator-button-submit:after {
    color: #ffffff !important;
    font-size: 16px !important;
    text-indent: 0 !important;
    display: inline !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* 4. Support Side-by-Side Columns for Forminator on Desktop */
@media (min-width: 768px) {
    /* Forminator rows become flex containers */
    .page-contact-wrapper .forminator-row {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 20px !important;
        margin-bottom: 20px !important;
    }
    
    .page-contact-wrapper .forminator-row .forminator-col {
        margin-bottom: 0 !important;
    }
    
    /* 100% width fields */
    .page-contact-wrapper .forminator-row .forminator-col-12 {
        width: 100% !important;
        flex: 0 0 100% !important;
    }
    
    /* 50% width fields (including the Expanded Name field sub-columns) */
    .page-contact-wrapper .forminator-row .forminator-col-6 {
        width: calc(50% - 10px) !important;
        flex: 0 0 calc(50% - 10px) !important;
    }
}

/* ==========================================================================
   Form Layout and Spacing (Consolidated from override4128.css)
   ========================================================================== */

/* Forminator beautiful styling and whitespace */
.page-contact-wrapper .forminator-custom-form {
    margin: 20px 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    max-width: 650px !important;
}

.page-contact-wrapper .forminator-custom-form .forminator-label {
    font-weight: 600 !important;
    color: #222 !important;
    margin-bottom: 8px !important;
}

/* Note: Input styling for .page-contact-wrapper already defined above with rounded corners (12px) */

/* Forminator submit button — must override the theme's global .button class */
.page-contact-wrapper .forminator-custom-form .forminator-button-submit,
.page-contact-wrapper .forminator-custom-form button.forminator-button-submit,
.page-contact-wrapper .forminator-custom-form .forminator-button-submit.forminator-button-back,
.page-contact-wrapper .forminator-ui .forminator-button-submit,
.page-contact-wrapper .forminator-design--flat .forminator-button-submit {
    display: inline-block !important;
    min-height: 48px !important;
    height: auto !important;
    padding: 14px 36px !important;
    line-height: normal !important;
    font-size: 16px !important;
    font-weight: bold !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    color: #fff !important;
    background-color: #D35A27 !important;
    border: none !important;
    border-radius: 30px !important;
    cursor: pointer !important;
    overflow: visible !important;
    text-indent: 0 !important;
    text-align: center !important;
    transition: background 0.2s ease !important;
}

.page-contact-wrapper .forminator-custom-form .forminator-button-submit:hover,
.page-contact-wrapper .forminator-custom-form button.forminator-button-submit:hover,
.page-contact-wrapper .forminator-ui .forminator-button-submit:hover,
.page-contact-wrapper .forminator-design--flat .forminator-button-submit:hover {
    background-color: #b84a1e !important;
}

/* Reduce massive empty space on Contact page */
.reduce-form-spacing .section-first section {
    padding-bottom: 0 !important;
    min-height: auto !important;
}
.reduce-form-spacing .section-first {
    padding-bottom: 0 !important;
}
.reduce-form-spacing article.node {
    margin-top: -30px !important;
    padding-top: 0 !important;
}
.reduce-form-spacing .section-content.background-image {
    padding-bottom: 50px !important;
}

/* 5. Tighten heading container spacing (contact page only) */
.reduce-form-spacing .section-first .section-header {
    padding-bottom: 8px !important;
}
.reduce-form-spacing .section-first .section-header h1 {
    margin-bottom: 8px !important;
    line-height: 1.05 !important;
}

/* Stronger overrides to counter global/theme rules that add top padding */
.reduce-form-spacing .section-first section .section-header {
    padding-top: 8px !important;
}
.reduce-form-spacing .section-first section .section-header h1 {
    margin-top: 50px !important;
    margin-bottom: 6px !important;
    font-size: 48px !important;
}

/* ====== Contact page: extra targeted spacing override ====== */
/* Added to ensure the Contact heading and form sit closer together */
.reduce-form-spacing .section-first .section-header,
.page-contact-wrapper .section-header {
    padding-top: 6px !important;
    padding-bottom: 6px !important;
}
.reduce-form-spacing .section-first .section-header h1,
.page-contact-wrapper .section-header h1 {
    margin-top: 0 !important;
    margin-bottom: 4px !important;
    font-size: clamp(22px, 3vw + 10px, 42px) !important; /* Fluid scaling from 22px to 42px */
    line-height: 1.1 !important;
}

/* Slightly pull the form up on desktop while keeping mobile less aggressive */
article.node.page-contact-wrapper,
.page-contact-wrapper {
    margin-top: -140px !important;
}

@media (max-width: 885px) {
    article.node.page-contact-wrapper,
    .page-contact-wrapper {
        margin-top: -60px !important;
        padding-top: 18px !important;
    }
    .reduce-form-spacing .section-first .section-header {
        padding-top: 18px !important;
    }
}



