section.location-cards {
    padding: 2rem;
    text-align: center;
    background-color: var(--green-md);
    color: white;
    position: relative;
}

#locations-location-cards.location-cards {
    padding-bottom: 8rem;
}

section.location-cards h2 {
    font-size: 50px;
}

a.location-card__branch-link {
    color: white;
    text-decoration: none;
}

a.location-card__branch-link:hover {
    text-decoration: underline;
}

.location-cards.home .location-cards__cards-wrapper {
    margin-top: 50px;
    display: grid;
    grid-template-columns: repeat(4, auto);
    justify-items: center;
    justify-content: center;
    gap: 20px;
    z-index: 1;
    position: relative;
}

.location-cards.other .location-cards__cards-wrapper {
    margin-top: 50px;
    display: grid;
    grid-template-columns: repeat(2, 400px);
    justify-items: center;
    z-index: 1;
    position: relative;
    gap: 50px;
    justify-content: center;
}

.location-cards.home .location-cards__cards-wrapper .location-card {
    background-color: var(--green-dk);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 3px 4px 8px #00000029;
    border: 5px solid #FFFFFF;
    border-radius: 14px;
    overflow: hidden;
    max-width: 400px;
    height: 430px;
    transition: all ease-in-out 0.3s;
}

.location-cards.other .location-cards__cards-wrapper .location-card {
    background-color: var(--green-dk);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 3px 4px 8px #00000029;
    border: 5px solid #FFFFFF;
    border-radius: 14px;
    overflow: hidden;
    min-width: 400px;
    height: 430px;
    position: relative;
}

.location-cards.home .location-cards__cards-wrapper .location-card .icon {
    height: 60px;
    width: 60px;
}

.location-cards.other .location-cards__cards-wrapper .location-card .icon {
    height: 60px;
    width: 60px;
}

.location-cards.other .location-cards__cards-wrapper .location-card__content {
    width: 100%;
    z-index: 1;
}

.location-cards.other .location-cards__cards-wrapper .location-card .location-card__location-details {
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: center;
    background: #DDF3F0 0% 0% no-repeat padding-box;
    width: 100%;
    color: black;
}

.location-cards.other .location-cards__cards-wrapper .location-card .location-card__location-details .location-card__location-address {
    color: var(--green-dk);
    font-size: 24px;
    font-weight: bold;
    font-family: 'Cachet';
    line-height: 30px;
    margin-bottom: 0.5rem;
}

.location-cards.other .location-cards__cards-wrapper .location-card .location-card__location-details .location-card__location-hours {
    color: #636466;
    font-size: 18px;
    font-family: 'Cachet';
    line-height: 1.3;
}

.location-cards.other .location-cards__cards-wrapper .location-card__content .location-card__basic-content .location-card__phone-banner {
    width: 100%;
    font-family: "Cachet";
    font-size: 26px;
    font-weight: bold;
    text-shadow: 2px 2px 4px #00000048;
    line-height: 1.7;
}

.location-cards.other .location-cards__cards-wrapper .location-card__content .location-card__basic-content .location-card__phone-banner .location-card__phone-link {
    color: white;
    text-decoration: none;
}

.location-cards.other .location-cards__cards-wrapper .location-card__content .location-card__basic-content .location-card__phone-banner .location-card__phone-link:hover {
    text-decoration: underline;
}

.location-cards .location-cards__cards-wrapper .location-card .location-card__content .location-card__basic-content h3 {
    text-transform: capitalize;
}

.location-cards.home .location-cards__cards-wrapper .location-card .location-card__content .location-card__basic-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 25px 0;
    gap: 5px;
}

.location-cards.other .location-cards__cards-wrapper .location-card .location-card__content .location-card__basic-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 25px 0 0;
    gap: 5px;
}

.location-cards.home .location-cards__cards-wrapper .location-card:hover .location-card__content .location-card__basic-content {
    opacity: 0;
}

.location-cards.home .location-cards__cards-wrapper .location-card:hover .location-card__content {
    width: 100%;
    padding: 6px 0 7px;
    background: white;
}

.location-cards.home .location-cards__cards-wrapper .location-card .location-card__content .location-card__hover-content {
    opacity: 0;
}

.location-cards.other .location-cards__cards-wrapper .location-card .card-button,
.location-cards.other .location-cards__cards-wrapper .location-card .location-card__image {
    opacity: 0;
    position: absolute;
    bottom: -15px;
    /* or wherever it should appear */
    left: 0;
    width: 100%;
    transition: opacity 0.3s ease-in-out;
    pointer-events: none;
    /* prevent hover conflicts */
    z-index: 0;
}

.location-cards.other .location-cards__cards-wrapper .location-card .card-button {
    bottom: 20px;
}

.location-cards.other .location-cards__cards-wrapper .location-card .mobile-card-button {
    display: none;
}

.location-cards.other .location-cards__cards-wrapper .location-card:hover .card-button,
.location-cards.other .location-cards__cards-wrapper .location-card:hover .location-card__image {
    opacity: 1;
    pointer-events: auto;
}

.location-cards.home .location-cards__cards-wrapper .location-card:hover .location-card__content .location-card__hover-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.location-cards.home .location-cards__cards-wrapper .location-card .location-card__content .location-card__directions-link {
    color: var(--green-dk);
    fill: var(--green-dk);
    font-weight: bold;
    text-decoration: none;
    font-family: 'Cachet';
}

.location-cards.home .location-cards__cards-wrapper .location-card .location-card__content .location-card__learn-more-link {
    color: var(--green-md);
    fill: var(--green-md);
    font-weight: bold;
    text-decoration: none;
    font-family: 'Cachet';
}

.location-cards.home .location-cards__cards-wrapper .location-card:hover .location-card__content .location-card__directions-link,
.location-cards.home .location-cards__cards-wrapper .location-card:hover .location-card__content .location-card__learn-more-link {
    text-decoration: none;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    font-family: 'Cachet';
}

.location-cards.home .location-cards__cards-wrapper .location-card .location-card__content .location-card__directions-link:hover,
.location-cards.home .location-cards__cards-wrapper .location-card .location-card__content .location-card__learn-more-link:hover {
    text-decoration: underline;
}

.location-cards.home .location-card__content .location-card__hover-content a div.icon {
    height: 30px;
    width: 30px;
}


.location-cards.home .location-cards__cards-wrapper .location-card .location-card__image img,
.location-cards.home .location-cards__cards-wrapper .location-card .location-card__image .location-card__hover-image,
.location-cards.home .location-cards__cards-wrapper .location-card .location-card__image .location-card__branch-image {
    height: 100%;
    object-fit: cover;
    transition: all ease-in-out 0.3s;
}

.location-cards.home .location-cards__cards-wrapper .location-card .location-card__image {
    flex: 1;
    height: calc(100% - 110px);
    position: relative;
}


.location-cards.home .location-cards__cards-wrapper .location-card .location-card__branch-image {
    display: block;
}

.location-cards.home .location-cards__cards-wrapper .location-card .location-card__hover-image {
    opacity: 0;
    position: absolute;
    top: 5px;
    left: 0;
    width: 100%;
    transition: all ease-in-out 0.3s;
}

.location-cards.home .location-cards__cards-wrapper .location-card:hover .location-card__branch-image {
    opacity: 0;
}

.location-cards.other .location-cards__cards-wrapper .location-card .location-card__branch-image {
    min-height: 260px;
    object-fit: cover;
}

.location-cards.home .location-cards__cards-wrapper .location-card:hover .location-card__hover-image {
    opacity: 1;
}


.location-cards.home .location-cards__buttons {
    position: relative;
    margin: 120px 0px;
    z-index: 1;
}

.location-cards.home .bg-img {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 0;
    width: 100%;
    top: unset;
    height: auto;
}


.location-cards.home .location-cards__cards-wrapper .location-card:hover {
    border-color: var(--yellow);
}

.location-cards.other h2 small {
    font-size: 36px;
    display: block;
}

.location-cards .location-card .icon svg {
    width: unset;
    height: unset;
}

.location-cards.other .location-cards__cards-wrapper .location-card.non-branch .location-card__location-details .location-card__location-address {
    white-space: pre-line;
    margin: 0;
}

.location-cards.other .location-cards__cards-wrapper .location-card.non-branch .location-card__location-details .location-card__location-hours {
    white-space: pre-line;
}





/* 1) Anchor the content area */
.location-cards.home .location-cards__cards-wrapper .location-card .location-card__content {
    position: relative;
}

/* 2) Turn hover-content into an overlay stacked above basic-content */
.location-cards.home .location-cards__cards-wrapper .location-card .location-card__content .location-card__hover-content {
    display: flex;
    /* participate in layout, override old display:none */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: absolute;
    inset: 0;
    /* fill the content box only */
    z-index: 2;
    /* above basic-content */
    background: #fff;
    /* matches your old hover background */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all .3s ease-in-out;
}

/* 3) Fade overlay in on hover. Base stays put, so no reflow */
.location-cards.home .location-cards__cards-wrapper .location-card:hover .location-card__content .location-card__hover-content {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* 4) Optional: subtly dim base content under the overlay (no layout change) */
.location-cards.home .location-cards__cards-wrapper .location-card .location-card__content .location-card__basic-content {
    transition: opacity .3s ease;
}

.location-cards.home .location-cards__cards-wrapper .location-card:hover .location-card__content .location-card__basic-content {
    opacity: .2;
}

/* 5) Neutralize the old display-toggles that caused jumps */
.location-cards.home .location-cards__cards-wrapper .location-card:hover .location-card__content .location-card__basic-content {
    display: block;
}

.location-cards.home .location-cards__cards-wrapper .location-card .location-card__content {
    width: 100%;
}

/* 6) Keep images as-is; no layout shift. If you want them unchanged under overlay, do nothing. 
      If you want to preserve your hover border color, keep your existing border-color rule. */




@media screen and (max-width: 1700px) {
    .location-cards.home .location-cards__cards-wrapper {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 25px;
    }

    .location-cards.home .location-cards__cards-wrapper .location-card {
        min-width: 400px;
    }
}

@media screen and (max-width: 882px) {

    .location-cards.other .location-cards__cards-wrapper {
        display: flex;
        flex-wrap: wrap;
    }

}

@media screen and (max-width: 767px) {
    .location-cards.other .location-cards__cards-wrapper .location-card {
        height: 480px;
    }

    .location-cards.other .location-cards__cards-wrapper .location-card .mobile-card-button {
        display: block;
    }

    .location-cards.other .location-cards__cards-wrapper .location-card .location-card__image {
        display: none;
    }

    .location-cards.other .location-cards__cards-wrapper .location-card:hover .location-card__content .location-card__hover-content {
        display: none;
    }

    .location-cards.other .location-cards__cards-wrapper .location-card:hover .card-button {
        display: none;
    }
}


@media screen and (max-width: 550px) {
    .location-cards.other .location-cards__cards-wrapper .location-card {
        min-width: 350px;
        height: fit-content;
    }

    .location-cards.other .location-cards__cards-wrapper .location-card .location-card__location-details,
    .location-cards.other .location-cards__cards-wrapper .location-card .location-card__location-address,
    .location-cards.other .location-cards__cards-wrapper .location-card .location-card__image,
    .location-cards.other .location-cards__cards-wrapper .location-card .card-button,
    .location-cards.other .location-cards__cards-wrapper .location-card .icon {
        display: none;
    }

    .location-cards.other a.location-card__branch-link {
        text-decoration: underline;
    }
}

@media screen and (max-width: 500px) {
    .location-cards.other .location-cards__cards-wrapper .location-card .location-card__content .location-card__basic-content {
        margin: 12px 0 0;
    }

    .location-cards.home .location-cards__cards-wrapper .location-card {
        min-width: 325px;
        height: 60px;
    }

    .location-cards.home .location-cards__buttons {
        margin: 30px 0 0;
    }

    .location-cards.home .location-cards__cards-wrapper .location-card .location-card__image {
        display: none;
    }

    .location-cards.home .location-cards__cards-wrapper .location-card:hover .location-card__content .location-card__hover-content {
        display: none;
    }

    .location-cards.home .location-cards__cards-wrapper .location-card .location-card__content .location-card__basic-content {
        flex-direction: row;
        margin: 0;
        justify-content: flex-start;
        width: 100%;
        padding-left: 10px;
    }

    .location-cards.home .location-cards__cards-wrapper .location-card:hover .location-card__content .location-card__basic-content {
        display: flex;
        flex-direction: row;
        opacity: 1;
    }

    .location-cards.home .location-cards__cards-wrapper .location-card:hover .location-card__content {
        background: var(--green-dk);
    }

    .location-cards.home .location-cards__cards-wrapper .location-card .icon {
        height: 40px;
        width: 40px;
    }

    .location-cards.home .location-card__content {
        width: 100%;
    }

    .location-cards.home .location-card__content h3 {
        margin-bottom: 0;
        font-size: 20px;
    }

    .location-cards.home .bg-img {
        display: none;
    }

    .location-cards.home .location-cards__cards-wrapper {
        margin-top: 30px;
    }

    section.location-cards.home h2.underlined {
        font-size: 36px;
    }

    #locations-location-cards.location-cards {
        padding-bottom: 4rem;
    }

    section.location-cards {
        padding: 2rem 2rem 4rem;
    }
}