/*FOOTER STYLING*/
.footer-wrapper {
    display: flex;
    width: 100%;
    position: relative;
    min-height: 392px;
    overflow: hidden; /* Prevents absolute items from causing horizontal scroll */
    box-sizing: border-box;
}

.footer-wrapper .footer-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('/wp-content/uploads/2026/03/footer-cover-image_result.avif');
    background-size: cover;
    background-position: center;
    z-index: 1;
}

.footer-wrapper .footer-backdrop::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    background:
        linear-gradient(to right, rgba(4, 38, 83, 1) 0%, rgba(4, 38, 83, 0.3) 50%),
        linear-gradient(to right, rgba(4, 38, 83, 0.3) 50%, rgba(4, 38, 83, 1) 100%),
        linear-gradient(to right, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.4) 100%);
}

.footer-wrapper .content {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 3;
    width: 100%;
    min-height: 392px;
    padding: 0px 20px; /* Restored original desktop padding */
    box-sizing: border-box;
}

.footer-wrapper .content .boxed {
    width: 100%; /* Switched to 100% to allow max-width to handle limits */
    max-width: 1440px;
    z-index: 5;
    min-height: 392px;
    padding: 0px 20px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
}

.footer-wrapper .content .boxed .site-logo {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 404px;
    box-sizing: border-box;
}

.footer-wrapper .content .boxed .site-logo .logo {
    width: 100%;
    max-width: 340px; /* Restored logo sizing logic without breaking image tag */
    height: auto;
    display: block;
}

.footer-wrapper .content .boxed p {
    font-family: montserrat, sans-serif;
    font-size: 12px;
    color: white;
    margin: unset;
}

.footer-wrapper li .sub-menu {
    padding: unset;
}

.footer-wrapper .footer-column-wrapper {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap; /* Prevent columns from crushing together */
    width: 100%;
    max-width: 1000px; /* Restricts width dynamically instead of rigid fixed width */
    justify-content: space-between;
    box-sizing: border-box;
}

.footer-wrapper #spacer {
    height: 217px;
    width: 1px;
    background-color: rgba(255,255,255,0.2);
}

.footer-wrapper .items {
    display: flex;
    flex-direction: column;
}

.footer-wrapper .items .meredith-menu {
    padding: 0px !important;
    margin: 0;
}

.footer-wrapper .items .meredith-menu li {
    list-style: none !important;
}

.footer-wrapper .footer-column h3 {
    font-family: montserrat, sans-serif;
    font-weight: 600;
    font-size: 32px;
    color: white;
    margin-top: 0; /* Ensures headers align neatly at the top */
}

.footer-wrapper .footer-column .items,
.footer-wrapper .footer-column .items a {
    font-family: montserrat, sans-serif;
    font-weight: 300;
    font-size: 13px;
    color: white;
    text-decoration: none;
    cursor: pointer;
    line-height: 1.8;
}

.footer-wrapper .footer-column .items a {
    display: block;
    min-height: 24px;
    padding: 4px 0;
}

.footer-ribbon {
    display: flex;
    flex-direction: row;
    justify-content: center;
    background-color: #1B1B1B;
    width: 100%;
    min-height: 40px; /* Allows growth */
}

.footer-ribbon .boxed {
    width: 100%;
    max-width: 1440px;
    padding: 10px 20px; /* Adapted for wrapping text */
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    color: white;
    font-family: montserrat, sans-serif;
    font-weight: 200;
    font-size: 16px;
    box-sizing: border-box;
}

/* --- Responsive Optimization for Tablet & Mobile --- */

@media (max-width: 1200px) { /* Increased breakpoint to catch larger tablets before squishing */
    .footer-wrapper {
        height: auto;
    }

    .footer-wrapper .content {
        padding: 50px 20px; /* Adding vertical breathing room on stack */
    }

    .footer-wrapper .content .boxed {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 50px;
    }

    .footer-wrapper .content .boxed .site-logo {
        align-items: center;
        max-width: 100%;
    }

    .footer-wrapper .footer-column-wrapper {
        flex-wrap: wrap;
        gap: 40px;
        justify-content: center;
    }

    .footer-wrapper .footer-column {
        flex: 1 1 calc(50% - 40px);
        min-width: 200px;
        display: flex;
        flex-direction: column;
        align-items: center;
        border-top: solid rgba(255,255,255,0.2) 1px;
        padding: 10px 0px;
    }

    .footer-wrapper #spacer {
        display: none;
    }

    .footer-wrapper .footer-backdrop::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 2;
        background:
            linear-gradient(to right, rgba(4, 38, 83, 0.9) 50%, rgba(4, 38, 83, 0.9) 100%),
            linear-gradient(to right, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.4) 100%);
    }
}

@media (max-width: 768px) {
    .footer-wrapper .footer-column {
        flex: 1 1 20%;
        border-top: solid rgba(255,255,255,0.2) 1px;
        padding: 20px 0px;
        margin: 0px 20px;
    }

    .footer-wrapper .footer-column-wrapper {
        gap: 0px;
    }

    .footer-ribbon .boxed {
        flex-direction: column;
        gap: 10px;
        text-align: center;
        font-size: 14px;
    }

    .footer-wrapper .footer-backdrop::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 2;
        background:
            linear-gradient(to right, rgba(4, 38, 83, 0.9) 50%, rgba(4, 38, 83, 0.9) 100%),
            linear-gradient(to right, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.4) 100%);
    }
}

/* --- CONTACT SECTION STYLING --- */
.contact-section-wrapper {
    min-height: 768px;
    position: relative;
    background-image: url('/wp-content/uploads/2026/03/contact-img-cropped_result.avif');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
}

.contact-section-wrapper::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    background:
        linear-gradient(to right, rgba(241, 245, 249, 1) 0%, rgba(241, 245, 249, 0.55) 50%, rgba(241, 245, 249, 1) 100%);
}

.contact-section-wrapper {
    display: flex;
    justify-content: center;
    padding: 0px 20px;
}

.contact-section-wrapper .boxed {
    width: 100%;
    position: relative;
    z-index: 10;
    color: #1B1B1B;
    max-width: 1400px;
}

.contact-section-wrapper h2{
    color: black !important;
    font-family: montserrat;
    font-size: 48px;
    font-weight: 600;
}
.contact-section-wrapper p{
    color: black !important;
    font-family: montserrat;
}

.column-wrapper {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
}

.contact-section-wrapper .contact-form {
    background-color: #FFFFFF;
    min-height: 439px;
    width: 606px;
    border-radius: 8px;
    overflow: hidden;
}

.contact-section-wrapper .map-location {
    min-height: 439px;
    width: 743px;
    border-radius: 8px;
    overflow: hidden;
}

.contact-section-wrapper .map-location iframe{
    margin-bottom: -10px;
}

/* --- Tablet & Mobile Optimization --- */

/* Tablet Breakpoint */
@media (max-width: 1024px) {
    .column-wrapper {
        flex-direction: column;
        align-items: stretch;
    }

    .contact-section-wrapper .contact-form,
    .contact-section-wrapper .map-location {
        width: 100%;
        max-width: 100%;
        min-height: auto;
    }

    .contact-section-wrapper .map-location iframe {
        width: 100%; /* Overrides inline iframe width */
    }

    .contact-section-wrapper {
        min-height: auto;
        padding: 60px 20px;
    }
}

/* Mobile Breakpoint */
@media (max-width: 768px) {
    .contact-section-wrapper h2 {
        font-size: 32px; /* Scales down heading for smaller screens */
    }

    .map-location {
        display: none;
    }

    .contact-section-wrapper .contact-form,
    .contact-section-wrapper .map-location {
        min-height: 350px;
    }

    .contact-section-wrapper::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 2;
        background:
            linear-gradient(to right, rgba(241, 245, 249, 1) 0%, rgba(241, 245, 249, 0.8) 50%, rgba(241, 245, 249, 1) 100%);
    }
}
