/* Contact Page Block Styles */

/* Main Block Styles */
.contactpage-block {
    position: relative;
}

/* Hero Section Styles */
.contactpage-hero {
    position: relative;
    min-height: 600px;
    color: #fff;
    padding: 100px 0 30px;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.background-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.5) 40%, var(--primary) 100%);
    z-index: 1;
}

.background-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    position: relative;
    z-index: 0;
}

.hero-content-wrapper {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Left Side Content Styles */
.hero-content {
    flex: 0 0 50%;
    padding-right: 30px;
    text-align: left;
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 30px;
    color: #fff;
    line-height: 1.2;
}

.hero-copy {
    margin-bottom: 30px;
    line-height: 1.6;
}

.hero-copy p {
    color: white;
}

.hero-copy a {
    color: white;
    font-weight: bold;
    text-decoration: underline;
}

.scroll-link {
    display: inline-flex;
    align-items: center;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
    margin-top: 50px;
}

.scroll-link:hover {
    color: rgba(255, 255, 255, 0.8);
}

.scroll-arrow {
    margin-left: 10px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(10px);
    }

    60% {
        transform: translateY(5px);
    }
}

/* Right Side Form Styles */
.hero-form-wrapper {
    flex: 0 0 50%;
    position: relative;
    z-index: 3;
}

.hero-form {
    background-color: var(--primary);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: -100px;
    /* Overlap into the locations section */
}

.form-title {
    font-size: 1.75rem;
    color: white;
    margin-top: 0;
    margin-bottom: 15px;
}

.form-copy {
    color: white;
    margin-bottom: 25px;
    line-height: 1.6;
}

/* Gravity Form Styles - Matching contact footer block */
.contactpage-gravity-form .gform_wrapper {
    margin: 0 !important;
}

.contactpage-gravity-form .gform-theme--foundation .gform_fields {
    gap: 15px !important;
}

.contactpage-gravity-form .gform_wrapper input:not([type="radio"]):not([type="checkbox"]):not([type="submit"]):not([type="button"]):not([type="image"]):not([type="file"]),
.contactpage-gravity-form .gform_wrapper textarea,
.contactpage-gravity-form .gform_wrapper select {
    border-radius: 15px !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    background-color: white !important;
    color: black !important;
    height: 50px !important;
    display: flex !important;
    align-items: center !important;
}

.contactpage-gravity-form .gform_wrapper input:not([type="radio"]):not([type="checkbox"]):not([type="submit"]):not([type="button"]):not([type="image"]):not([type="file"]):focus,
.contactpage-gravity-form .gform_wrapper textarea:focus {
    outline: none !important;
    border-color: white !important;
    background-color: rgba(255, 255, 255, 0.15) !important;
}

.contactpage-gravity-form .gform_wrapper .gform_footer input.button,
.contactpage-gravity-form .gform_wrapper .gform_footer input[type="submit"],
.contactpage-gravity-form .gform_wrapper .gform_page_footer input.button,
.contactpage-gravity-form .gform_wrapper .gform_page_footer input[type="submit"] {
    background-color: var(--secondary) !important;
    color: white !important;
    padding: 12px 30px !important;
    border: none !important;
    border-radius: 30px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.contactpage-gravity-form .gform_wrapper .gform_footer input.button:hover,
.contactpage-gravity-form .gform_wrapper .gform_footer input[type="submit"]:hover,
.contactpage-gravity-form .gform_wrapper .gform_page_footer input.button:hover,
.contactpage-gravity-form .gform_wrapper .gform_page_footer input[type="submit"]:hover {
    background-color: white !important;
    color: var(--secondary) !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1) !important;
}

.contactpage-gravity-form .gform_wrapper .gfield_label {
    color: white !important;
    font-weight: 500 !important;
}

.contactpage-gravity-form .gform_wrapper .gfield_required {
    color: rgba(255, 255, 255, 0.7) !important;
}

.contactpage-gravity-form .gform_wrapper .validation_message {
    color: #ffcc00 !important;
}

.contactpage-gravity-form p.gform_required_legend {
    display: none !important;
}

.contactpage-gravity-form .gform_wrapper label {
    display: none !important;
}

/* Locations Section Styles */
.contactpage-locations {
    background-color: white;
    padding: 150px 0 60px;
    /* Extra padding at top for the form overlap */
    position: relative;
}

.locations-grid {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.location-card {
    flex: 0 0 calc(33.333% - 30px);
    margin: 0 15px 30px;
    border: 2px solid var(--secondary);
    border-radius: 15px;
    padding: 30px;

}

.location-title {
    border-left: 4px solid var(--primary);
    padding: 10px 0 10px 10px;
    margin: 0;
    line-height: 1.3;
}

.location-address {
    margin-top: 15px;
    margin-bottom: 10px;
}

.location-address a {
    color: inherit;
    text-decoration: underline;
}

.location-phone, .location-fax {
    margin-bottom: 5px;
}

.location-phone a, .location-fax a {
    color: inherit;
}

.location-card a {
    text-decoration-thickness: 1px;
}

/* Responsive Styles */
@media (max-width: 991px) {
    .contactpage-hero {
        min-height: 500px;
        padding: 60px 0;
    }

    .hero-content-wrapper {
        flex-direction: column;
    }

    .hero-content, .hero-form-wrapper {
        flex: 0 0 100%;
        width: 100%;
    }

    .hero-content {
        padding-right: 0;
        margin-bottom: 40px;
    }

    .hero-title {
        font-size: 3rem;
    }

    .location-card {
        flex: 0 0 calc(50% - 30px);
    }
}

@media (max-width: 767px) {
    .contactpage-hero {
        min-height: 400px;
        padding: 40px 0;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-form {
        padding: 30px;
        margin-bottom: -50px;
    }

    .contactpage-locations {
        padding-top: 100px;
    }

    .location-card {
        flex: 0 0 calc(100% - 30px);
    }
}