/*---*\
Half Text / Half Form
Two-column layout — text content on the left, quote form card on the right.
\*---*/


/* ==========================================================================
   BLOCK CUSTOM PROPERTIES
   ========================================================================== */

.half-form {
    --half-form-gap: 32px;
    --half-form-field-gap: 15px;
    --half-form-label-gap: 7px;
    --half-form-input-radius: 10px;
    --half-form-input-bg: rgba(239, 239, 240, 0.75);
    --half-form-input-text: #454648;
    --half-form-input-border: 3px;
    --half-form-card-radius: 20px;
    --half-form-card-padding: 25px;
    --half-form-card-shadow: 0 4px 19.8px rgba(0, 34, 63, 0.23);
    --half-form-label-color: var(--dark-blue);
    --half-form-required-color: #ea1f27;
}


/* ==========================================================================
   LAYOUT
   ========================================================================== */

.half-form__layout {
    display: flex;
    flex-direction: column;
    gap: var(--half-form-gap);
}

.half-form__content {
    position: relative;
}

.half-form__card {
    position: relative;
    width: 100%;
}


/* ==========================================================================
   GRAY MAP BACKGROUND
   ========================================================================== */

.half-form--map-bg {
    background-color: #B7B7B7;
    background-image: url("../../../img/map-bg.jpg");
    background-repeat: no-repeat;
    background-position: 50% 50%;
    background-size: cover;
    position: relative;
    overflow: hidden;
}

.half-form--map-bg::before {
    content: "";
    position: absolute;
    inset: 0;
    background-color: var(--light-grey);
    opacity: 0.85;
    pointer-events: none;
    z-index: 0;
}

.half-form--map-bg .container {
    position: relative;
    z-index: 1;
}

.half-form--map-bg .sub-heading {
    color: var(--secondary-hover-color);
}

.half-form--map-bg .sub-heading::before {
    background: var(--secondary-hover-color);
}


/* ==========================================================================
   GRADIENT BG VARIANTS
   ========================================================================== */

.half-form.bg-red-gradient .half-form__content .sub-heading,
.half-form.bg-red-gradient .half-form__content h2,
.half-form.bg-blue-gradient .half-form__content .sub-heading,
.half-form.bg-blue-gradient .half-form__content h2 {
    color: var(--white);
}

.half-form.bg-red-gradient .half-form__content .sub-heading::before,
.half-form.bg-blue-gradient .half-form__content .sub-heading::before {
    background: var(--white);
}

.half-form.bg-red-gradient .half-form__content p,
.half-form.bg-blue-gradient .half-form__content p {
    color: var(--white);
}


/* ==========================================================================
   QUOTE FORM CARD
   ========================================================================== */

.half-form .quote-form {
    background: var(--white);
    border-radius: var(--half-form-card-radius);
    box-shadow: var(--half-form-card-shadow);
    padding: var(--half-form-card-padding);
    display: flex;
    flex-direction: column;
    gap: var(--half-form-field-gap);
    width: 100%;
}

.half-form .quote-form h3 {
    font-family: var(--secondary-font);
    font-weight: 500;
    font-size: 26px;
    line-height: 1.2;
    color: var(--dark-blue);
    text-align: center;
    margin: 0;
}


/* ==========================================================================
   GRAVITY FORMS RESET
   ========================================================================== */

.half-form .quote-form .gform_wrapper {
    margin: 0;
    width: 100%;
    display: block !important;
}

.half-form .quote-form .gform_heading {
    margin: 0;
    padding: 0;
}

.half-form .quote-form .gform_required_legend {
    display: none;
}

.half-form .quote-form .gform_fields {
    display: flex;
    flex-direction: column;
    gap: var(--half-form-field-gap);
}

.half-form .quote-form .gfield {
    display: flex;
    flex-direction: column;
    gap: var(--half-form-label-gap);
    width: 100%;
    margin: 0;
    padding: 0;
}

.half-form .quote-form fieldset.gfield {
    border: 0;
    min-width: 0;
}


/* ==========================================================================
   LABELS
   ========================================================================== */

.half-form .quote-form .gfield_label {
    font-family: var(--primary-font);
    font-weight: 700;
    font-size: 17px;
    line-height: 1.3;
    color: var(--half-form-label-color);
    margin: 0;
    padding: 0;
    display: block;
}

.half-form .quote-form legend.gfield_label {
    width: 100%;
    float: none;
    margin-bottom: 5px;
}

.half-form .quote-form .gfield_required {
    color: var(--half-form-required-color);
    font-weight: 700;
    margin-left: 2px;
}

.half-form .quote-form .gfield_required_asterisk {
    color: var(--half-form-required-color);
}


/* ==========================================================================
   TEXT INPUTS + TEXTAREA
   ========================================================================== */

.half-form .quote-form .gform_wrapper input[type="text"],
.half-form .quote-form .gform_wrapper input[type="email"],
.half-form .quote-form .gform_wrapper input[type="tel"],
.half-form .quote-form .gform_wrapper input[type="url"],
.half-form .quote-form .gform_wrapper input[type="number"],
.half-form .quote-form .gform_wrapper input[type="search"],
.half-form .quote-form .gform_wrapper input[type="password"],
.half-form .quote-form .gform_wrapper input[type="date"],
.half-form .quote-form .gform_wrapper textarea {
    width: 100%;
    height: 53px;
    padding: 12px 15px;
    font-family: var(--primary-font);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.3;
    color: var(--half-form-input-text);
    background-color: var(--half-form-input-bg);
    border: var(--half-form-input-border) solid transparent;
    border-radius: var(--half-form-input-radius);
    appearance: none;
    -webkit-appearance: none;
    box-shadow: none;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.half-form .quote-form .gform_wrapper textarea {
    height: auto;
    min-height: 120px;
    padding: 15px;
    line-height: 1.5;
    resize: vertical;
}

.half-form .quote-form .gform_wrapper input::placeholder,
.half-form .quote-form .gform_wrapper textarea::placeholder {
    color: var(--half-form-input-text);
    opacity: 1;
}

.half-form .quote-form .gform_wrapper input[type="text"]:focus,
.half-form .quote-form .gform_wrapper input[type="email"]:focus,
.half-form .quote-form .gform_wrapper input[type="tel"]:focus,
.half-form .quote-form .gform_wrapper input[type="url"]:focus,
.half-form .quote-form .gform_wrapper input[type="number"]:focus,
.half-form .quote-form .gform_wrapper input[type="search"]:focus,
.half-form .quote-form .gform_wrapper input[type="password"]:focus,
.half-form .quote-form .gform_wrapper input[type="date"]:focus,
.half-form .quote-form .gform_wrapper textarea:focus {
    outline: none;
    border-color: transparent;
    background:
        linear-gradient(var(--white), var(--white)) padding-box,
        var(--blue-gradient) border-box;
}

.half-form .quote-form .ginput_complex {
    display: flex;
    flex-direction: column;
}

.half-form .quote-form .ginput_complex .gform-grid-col {
    flex: 1 1 auto;
    min-width: 0;
}

.half-form .quote-form .hidden_sub_label,
.half-form .quote-form .screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}


/* ==========================================================================
   PLAIN <select> FALLBACK
   ========================================================================== */

.half-form .quote-form .gform_wrapper select {
    width: 100%;
    height: 53px;
    padding: 12px 40px 12px 15px;
    font-family: var(--primary-font);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.3;
    color: var(--half-form-input-text);
    background-color: var(--half-form-input-bg);
    border: var(--half-form-input-border) solid transparent;
    border-radius: var(--half-form-input-radius);
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='16' height='10' viewBox='0 0 16 10' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l7 7 7-7' stroke='%2303184F' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 16px 10px;
}

.half-form .quote-form .gform_wrapper select:focus {
    outline: none;
    border-color: transparent;
    background:
        linear-gradient(var(--white), var(--white)) padding-box,
        var(--blue-gradient) border-box;
    background-image:
        url("data:image/svg+xml,%3Csvg width='16' height='10' viewBox='0 0 16 10' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l7 7 7-7' stroke='%2303184F' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E"),
        linear-gradient(var(--white), var(--white)),
        var(--blue-gradient);
    background-clip: border-box, padding-box, border-box;
    background-origin: border-box, padding-box, border-box;
    background-repeat: no-repeat, no-repeat, no-repeat;
    background-position: right 15px center, 0 0, 0 0;
    background-size: 16px 10px, auto, auto;
}


/* ==========================================================================
   CHOICES.JS SELECT
   ========================================================================== */

.half-form .quote-form .ginput_container_select {
    position: relative;
}

.half-form .quote-form .choices {
    position: relative;
    margin: 0;
    width: 100%;
    overflow: visible;
    font-family: var(--primary-font);
}

.half-form .quote-form .choices.is-open {
    overflow: visible;
}

.half-form .quote-form .choices:focus-visible {
    outline: none;
}

.half-form .quote-form .choices__inner {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 53px;
    padding: 12px 40px 12px 15px;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.3;
    color: var(--half-form-input-text);
    background-color: var(--half-form-input-bg);
    border: var(--half-form-input-border) solid transparent;
    border-radius: var(--half-form-input-radius);
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.half-form .quote-form .choices::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 15px;
    width: 16px;
    height: 10px;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg width='16' height='10' viewBox='0 0 16 10' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l7 7 7-7' stroke='%2303184F' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
    border: 0;
    transform: translateY(-50%);
    transition: transform 0.15s ease;
}

.half-form .quote-form .choices.is-open::after {
    transform: translateY(-50%) rotate(180deg);
}

.half-form .quote-form .choices[data-type*="select-one"]::after {
    content: "";
    border: 0;
    margin: 0;
}

.half-form .quote-form .choices__list--single {
    padding: 0;
    width: 100%;
}

.half-form .quote-form .choices__list--single .choices__item {
    padding: 0;
    color: var(--half-form-input-text);
    font-size: 16px;
    line-height: 1.3;
}

.half-form .quote-form .choices__placeholder {
    opacity: 1;
    color: var(--half-form-input-text);
}

.half-form .quote-form .choices.is-focused .choices__inner,
.half-form .quote-form .choices.is-open .choices__inner {
    border-color: transparent;
    background:
        linear-gradient(var(--white), var(--white)) padding-box,
        var(--blue-gradient) border-box;
}

.half-form .quote-form .choices__input--cloned {
    display: none;
}

.half-form .quote-form .choices__list--dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    margin-top: 6px;
    visibility: hidden;
    background: var(--white);
    border: 1px solid var(--grey);
    border-radius: var(--half-form-input-radius);
    box-shadow: 0 8px 20px rgba(0, 34, 63, 0.12);
    overflow: hidden;
    z-index: 5;
}

.half-form .quote-form .choices__list--dropdown.is-active {
    visibility: visible;
}

.half-form .quote-form .is-flipped .choices__list--dropdown {
    top: auto;
    bottom: 100%;
    margin-top: 0;
    margin-bottom: 6px;
}

.half-form .quote-form .choices__list--dropdown .choices__list {
    max-height: 300px;
    overflow-y: auto;
}

.half-form .quote-form .choices__list--dropdown .choices__item {
    padding: 12px 15px;
    font-size: 16px;
    line-height: 1.3;
    color: var(--text-color);
    background: var(--white);
    transition: background-color 0.15s ease, color 0.15s ease;
}

.half-form .quote-form .choices__list--dropdown .choices__item:nth-child(2n) {
    background: var(--off-white);
}

.half-form .quote-form .choices__list--dropdown .choices__item--selectable.is-highlighted,
.half-form .quote-form .choices__list--dropdown .choices__item--selectable:hover {
    background: var(--secondary-color);
    color: var(--white);
}

.half-form .quote-form .choices__list--dropdown .choices__item--selectable::after {
    display: none;
}


/* ==========================================================================
   ERROR STATES
   ========================================================================== */

.half-form .quote-form .gfield.gfield_error .ginput_container input,
.half-form .quote-form .gfield.gfield_error .ginput_container textarea,
.half-form .quote-form .gfield.gfield_error .ginput_container select,
.half-form .quote-form .gfield.gfield_error .choices__inner,
.half-form .quote-form .gfield--has-error .ginput_container input,
.half-form .quote-form .gfield--has-error .ginput_container textarea,
.half-form .quote-form .gfield--has-error .ginput_container select,
.half-form .quote-form .gfield--has-error .choices__inner {
    background: linear-gradient(#EFEFF0, #EFEFF0) padding-box,
    linear-gradient(180deg,#CE2029 0%,#9C0303 100%) border-box;
}

.half-form .quote-form .gfield_description,
.half-form .quote-form .gfield_validation_message,
.half-form .quote-form .validation_message {
    display: none !important;
}

.half-form .quote-form .gfield .ginput_container {
    position: relative;
}

.half-form .quote-form .gfield.gfield_error .ginput_container::after,
.half-form .quote-form .gfield--has-error .ginput_container::after {
    content: "\e90a";
    font-family: 'harris-water-icons';
    speak: never;
    font-style: normal;
    font-weight: normal;
    font-variant: normal;
    text-transform: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    width: 36px;
    height: 38px;
    font-size: 32px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    background: linear-gradient(180deg, #CE2029 0%, #9C0303 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.half-form .quote-form .ginput_container_phone .error {
    display: none !important;
}

.half-form .quote-form .gform_validation_errors {
    background: rgba(206, 32, 41, 0.08);
    border: 1px solid var(--primary-color);
    border-radius: var(--half-form-input-radius);
    color: var(--primary-color);
    padding: 12px 16px;
    margin-bottom: var(--half-form-field-gap);
    font-size: 14px;
    font-weight: 600;
}

.half-form .quote-form .gform_validation_errors h2 {
    color: var(--primary-color);
    font-size: 16px;
    margin: 0 0 4px;
}


/* ==========================================================================
   SUBMIT BUTTON
   ========================================================================== */

.half-form .quote-form .gform_footer {
    display: flex;
    justify-content: center;
    margin: 25px 0 0;
    padding: 0;
}

.half-form .quote-form .gform_button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--blue-gradient);
    color: var(--white);
    font-family: var(--secondary-font);
    font-weight: 500;
    font-size: 18px;
    line-height: 1;
    text-transform: none;
    padding: 16px 25px;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    transition: filter 0.15s ease, transform 0.05s ease;
}

.half-form .quote-form .gform_button:hover,
.half-form .quote-form .gform_button:focus-visible {
    filter: brightness(0.92);
    color: var(--white);
    outline: none;
}

.half-form .quote-form .gform_button:active {
    transform: translateY(1px);
}

.half-form .quote-form .gform_ajax_spinner {
    margin-left: 12px;
    height: 24px;
    width: auto;
}


/* ==========================================================================
   AJAX CONFIRMATION
   ========================================================================== */

.half-form .quote-form .gform_confirmation_message {
    background: rgba(0, 76, 141, 0.06);
    border: 1px solid var(--secondary-color);
    border-radius: var(--half-form-input-radius);
    color: var(--secondary-hover-color);
    padding: 20px;
    text-align: center;
    font-family: var(--primary-font);
    font-size: 16px;
}


/* ==========================================================================
   TABLET (min-width: 768px)
   ========================================================================== */

@media (min-width: 768px) {
    .half-form {
        --half-form-card-padding: 30px;
    }

    .half-form__layout {
        gap: 40px;
    }

    .half-form--map-bg {
        background-position: -408.795px -1257.681px;
        background-size: 192.29% 298.011%;
    }

    .half-form .quote-form h3 {
        font-size: 32px;
    }
}


/* ==========================================================================
   LAPTOP (min-width: 1024px)
   ========================================================================== */

@media (min-width: 1024px) {
    .half-form__layout {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 50px;
    }

    .half-form__content {
        width: 50%;
    }

    .half-form__card {
        width: 50%;
    }
}


/* ==========================================================================
   DESKTOP (min-width: 1200px)
   ========================================================================== */

@media (min-width: 1200px) {
    .half-form__layout {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 50px;
    }

    .half-form__content {
        flex: 1 1 auto;
        max-width: 728px;
    }

    .half-form__card {
        flex: 0 0 574px;
        max-width: 574px;
    }

    .half-form .quote-form h3 {
        font-size: 36px;
    }

    .half-form--map-bg {
        background-position: -1022.519px -943px;
        background-size: 192.29% 298.011%;
    }
}
