/* ================= GENERIC PAGE STYLES ================= */

/* Override hero constraints for non-home pages */
body:not(.home) .hero-banner-inner {
    height: auto;
    min-height: 90vh;
    /* Maintain full screen feel but allow growth */
    overflow: visible;
    /* Default is hidden, which cuts off long forms */
    align-items: flex-start;
    /* Start content from top (with padding) instead of bottom */
    padding-top: 150px;
    /* Space for the header */
    padding-bottom: 60px;
    background-color: #b3b3b3;
    /* background: linear-gradient(135deg, #101010 0%, #1a1a1a 100%); */
    /* Subtle dark bg */
}

/* Page Overlay */
.page-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    /* Optional: can hold a background image or just be a placeholder */
}

/* Page Content Wrapper */
.page-content-wrapper {
    flex-direction: column;
    align-items: center;
    /* Center horizontally */
    justify-content: flex-start;
    width: 100%;
    height: auto;
    /* Remove any height locks */
}

.page-body-content {
    width: 100%;
    max-width: 900px;
    text-align: center;
    color: #fff;
    animation: fadeIn 0.8s ease-out;
}

.page-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 40px;
    line-height: 1.2;
    background: linear-gradient(to right, #000, #181717);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.page-text {
    font-size: 18px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.85);
}

.page-text p {
    margin-bottom: 20px;
}

/* ================= FORM STYLING (Universal) ================= */
.page-body-content form,
.wpcf7-form,
.gform_wrapper,
.wpforms-container {
    background: rgba(255, 255, 255, 0.03);
    /* Subtle glass effect */
    padding: 40px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 30px;
    text-align: left;
    /* detailed labels look better left-aligned */
    width: 100%;
    max-width: 600px;
    /* Constrain form width */
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 4px 24px -1px rgba(0, 0, 0, 0.2);
}

/* Labels */
.page-body-content label,
.gfield_label,
.wpforms-field-label {
    font-size: 14px;
    font-weight: 500;
    color: #000000;
    /* Black text for light background */
    margin-bottom: 8px;
    display: block;
    letter-spacing: 0.5px;
}

/* Inputs */
.page-body-content input[type="text"],
.page-body-content input[type="email"],
.page-body-content input[type="tel"],
.page-body-content input[type="url"],
.page-body-content input[type="password"],
.page-body-content textarea,
.page-body-content select,
.wpcf7-form input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]),
.wpcf7-form textarea,
.ginput_container input:not([type="checkbox"]):not([type="radio"]),
.ginput_container textarea,
.wpforms-field input:not([type="checkbox"]):not([type="radio"]),
.wpforms-field textarea {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    /* Dark background */
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    /* White text */
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Input Focus */
.page-body-content input:focus,
.page-body-content textarea:focus,
.page-body-content select:focus {
    border-color: #3B72D0 !important;
    color: #000 !important;
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 114, 208, 0.25);
}

/* Submit Button */
.page-body-content input[type="submit"],
.gform_button,
.wpforms-submit {
    background: linear-gradient(135deg, #1E3A6A, #3B72D0) !important;
    color: #fff !important;
    border: none !important;
    padding: 14px 40px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    border-radius: 50px !important;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    width: 100%;
    margin-top: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.page-body-content input[type="submit"]:hover,
.gform_button:hover,
.wpforms-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 114, 208, 0.4);
}

/* Placeholder color adjustments */
::placeholder {
    color: rgba(255, 255, 255, 0.4);
    font-weight: 400;
}

/* Response/Error messages */
.wpcf7-response-output,
.gform_validation_message {
    border-radius: 8px;
    padding: 15px !important;
    font-size: 14px;
    margin-top: 20px !important;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media(max-width: 768px) {
    body:not(.home) .hero-banner-inner {
        padding-top: 120px;
        min-height: 100vh;
        border-radius: 0;
    }

    .page-title {
        font-size: 32px;
    }

    .wpcf7-form {
        padding: 25px;
    }
}

/* ================= RESET FORM LAYOUT (Aggressive Fix) ================= */
/* Force all direct children of the form to stack vertically */
.page-body-content form p,
.wpcf7-form p {
    display: block !important;
    width: 100% !important;
    margin-bottom: 20px;
    clear: both;
}

/* Force wrappers to be full width block */
.wpcf7-form-control-wrap,
.ginput_container,
.wpforms-field-container {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* Force actual inputs to be full width */
.wpcf7-form textarea,
.wpcf7-form input:not([type="checkbox"]):not([type="radio"]),
.page-body-content textarea,
.page-body-content input:not([type="checkbox"]):not([type="radio"]) {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    display: block !important;
}

/* Hide br tags that might cause extra spacing in grid layouts */
.wpcf7-form br {
    display: none;
}

/* Ensure labels behave like block elements */
.wpcf7-form label {
    width: 100%;
    display: block;
}

/* ================= WPFORMS SPECIFIC OVERRIDES ================= */
/* Force container and fields to full width */
.wpforms-container,
.wpforms-field-container,
.wpforms-field {
    width: 100% !important;
    max-width: 100% !important;
    clear: both;
}

/* Override WPForms specific size classes which restrict width */
.wpforms-form .wpforms-field-medium,
.wpforms-form .wpforms-field-large,
.wpforms-form .wpforms-field-small {
    max-width: 100% !important;
    width: 100% !important;
}

/* Force inputs and textareas to full width */
.wpforms-form input:not([type=submit]):not([type=image]):not([type=hidden]):not([type=checkbox]):not([type=radio]),
.wpforms-form textarea,
.wpforms-form select {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    display: block;
}

/* Fix for two-column layouts if they exist - stacking them for mobile/consistency if desired, 
   or just ensuring they fill their container */
.wpforms-one-half {
    width: 100% !important;
    /* Stack columns on this simplified page design */
    margin-left: 0 !important;
}

/* Ensure labels are visible and block */
.wpforms-field-label {
    display: block !important;
    width: 100%;
    color: #000000 !important;
}