/* ============================================================
   CLINIC LOCATIONS / CONTACT
============================================================ */

.clinic-locations-section {
    position: relative;
    padding: 80px 0 90px;
    background: #f7faf9;
}


/* ============================================================
   SECTION HEADING
============================================================ */

.clinic-section-heading {
    max-width: 720px;
    margin: 0 auto 45px;
    text-align: center;
}

.clinic-section-heading .section-eyebrow {
    display: inline-block;
    margin-bottom: 10px;

    color: var(--rosewood-green);

    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.clinic-section-heading h2 {
    margin: 0 0 14px;

    color: var(--rosewood-navy);

    font-size: clamp(36px, 3.5vw, 52px);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -1px;
}

.clinic-section-heading p {
    max-width: 620px;
    margin: 0 auto;

    color: #63706d;

    font-size: 17px;
    line-height: 1.65;
}


/* ============================================================
   CLINIC GRID
============================================================ */

/*
   Default:
   two clinics side-by-side
*/

.clinics-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    align-items: stretch;

    gap: 24px;
}


/*
   Single location:
   one full-width clinic
*/

.clinics-grid.single-location {
    grid-template-columns: 1fr;
}


/* ============================================================
   CLINIC CARD
============================================================ */

.clinic-card {
    display: flex;
    flex-direction: column;

    width: 100%;
    min-width: 0;

    overflow: hidden;

    background: #ffffff;

    border: 1px solid #e1ece8;
    border-radius: 22px;

    box-shadow:
        0 8px 30px rgba(18, 64, 53, .07);

    transition:
        transform .25s ease,
        box-shadow .25s ease;
}

.clinic-card:hover {
    transform: translateY(-4px);

    box-shadow:
        0 18px 40px rgba(18, 64, 53, .11);
}


/* ============================================================
   CLINIC HEADER
============================================================ */

.clinic-card-header {
    padding: 28px 30px 23px;

    border-bottom: 1px solid #e5efeb;

    background:
        linear-gradient(
            135deg,
            #f0faf5 0%,
            #f7fcf9 100%
        );
}

.clinic-location-label {
    display: inline-flex;

    margin-bottom: 8px;

    color: var(--rosewood-green);

    font-size: 12px;
    font-weight: 700;

    letter-spacing: 1.3px;
    text-transform: uppercase;
}

.clinic-card-header h3 {
    margin: 0;

    color: var(--rosewood-navy);

    font-size: 25px;
    font-weight: 700;
    line-height: 1.2;
}


/* ============================================================
   CONTACT / HOURS / MAP GRID
============================================================ */

.clinic-info-grid {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        minmax(0, 1fr);

    gap: 25px;

    padding: 30px;

    box-sizing: border-box;
}


/*
   Two-clinic page:
   Contact | Hours
   ---------------
        Map
*/

.clinics-grid:not(.single-location) .clinic-map {
    grid-column: 1 / -1;
}


/*
   Single-location desktop:
   Contact | Hours | Map
*/

.clinics-grid.single-location .clinic-info-grid {
    grid-template-columns:
        minmax(0, 1fr)
        minmax(0, 1fr)
        minmax(0, 1.25fr);

    align-items: stretch;
}


/* ============================================================
   CONTACT
============================================================ */

.clinic-contact {
    display: flex;
    flex-direction: column;

    min-width: 0;
}

.contact-details {
    display: flex;
    flex-direction: column;

    gap: 20px;
}

.contact-detail {
    display: flex;
    align-items: flex-start;

    width: 100%;
    min-width: 0;

    gap: 13px;
}

.contact-icon {
    flex: 0 0 42px;

    width: 42px;
    height: 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #eaf7f0;

    color: var(--rosewood-green);

    font-size: 18px;
}

.contact-detail > div {
    flex: 1;

    min-width: 0;
}

.contact-detail strong {
    display: block;

    margin-bottom: 4px;

    color: var(--rosewood-navy);

    font-size: 14px;
    font-weight: 700;
}

.contact-detail p {
    margin: 0;

    color: #63706d;

    font-size: 14px;
    line-height: 1.55;

    overflow-wrap: break-word;
}

.contact-detail a {
    color: var(--rosewood-dark-green);

    font-weight: 600;

    text-decoration: none;
}

.contact-detail a:hover {
    color: var(--rosewood-green);

    text-decoration: underline;
}


/* ============================================================
   GET DIRECTIONS BUTTON
============================================================ */

.getdirection-button {
    width: 100%;
    min-height: 45px;

    display: flex;
    align-items: center;

    gap: 15px;

    margin-top: 30px;

    padding: 12px 22px;

    box-sizing: border-box;

    border: 3px solid #ffffff;
    border-radius: 18px;

    color: #ffffff;

    background:
        linear-gradient(
            135deg,
            #00805e,
            #00674f
        );

    font-size: 15px;
    font-weight: 700;

    text-decoration: none;

    box-shadow:
        0 5px 12px rgba(0, 65, 49, .22);

    transition:
        transform .2s ease,
        box-shadow .2s ease;
}

.getdirection-button span {
    margin-left: auto;

    font-size: 18px;

    transition: transform .25s ease;
}

.getdirection-button:hover {
    color: #ffffff;

    transform: translateY(-2px);

    box-shadow:
        0 9px 18px rgba(0, 65, 49, .28);
}

.getdirection-button:hover span {
    transform: translateX(3px);
}


/* Keep button toward bottom on single-location desktop */

.clinics-grid.single-location .clinic-contact {
    height: 100%;
}

.clinics-grid.single-location .contact-details {
    flex: 1;
}

.clinics-grid.single-location .getdirection-button {
    margin-top: auto;
}


/* ============================================================
   HOURS
============================================================ */

.clinic-hours {
    min-width: 0;

    padding: 22px;

    box-sizing: border-box;

    border: 1px solid #e0ebe7;
    border-radius: 16px;

    background: #f7fbf9;
}

.clinic-hours-title {
    display: flex;
    align-items: center;

    gap: 11px;

    margin-bottom: 15px;
}

.hours-icon {
    flex: 0 0 40px;

    width: 40px;
    height: 40px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    color: #ffffff;

    background: var(--rosewood-green);

    font-size: 23px;
}

.clinic-hours-title > div {
    min-width: 0;
}

.clinic-hours-title small {
    display: block;

    margin-bottom: 2px;

    color: #75827f;

    font-size: 10px;
    font-weight: 700;

    letter-spacing: 1px;
    text-transform: uppercase;
}

.clinic-hours-title h4 {
    margin: 0;

    color: var(--rosewood-navy);

    font-size: 17px;
    font-weight: 700;
    line-height: 1.15;
}


/* ============================================================
   HOURS ROWS
============================================================ */

.clinic-hours-row {
    padding: 14px 0;

    border-bottom: 1px solid #dce8e3;
}

.clinic-hours-row span,
.clinic-hours-row strong {
    display: block;
}

.clinic-hours-row span {
    margin-bottom: 4px;

    color: #687571;

    font-size: 13px;
}

.clinic-hours-row strong {
    color: var(--rosewood-dark-orrange);

    font-size: 15px;
    font-weight: 700;
}


/* ============================================================
   WALK-IN
============================================================ */

.clinic-walk-in {
    display: flex;
    align-items: center;

    width: 100%;

    gap: 10px;

    margin-top: 16px;

    padding: 12px 13px;

    box-sizing: border-box;

    border-radius: 11px;

    background: #e4f5ea;
}

.walk-in-icon {
    flex: 0 0 30px;

    width: 30px;
    height: 30px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    color: #ffffff;

    background: var(--rosewood-green);

    font-size: 14px;
    font-weight: 700;
}

.clinic-walk-in > div {
    min-width: 0;
}

.clinic-walk-in strong,
.clinic-walk-in small {
    display: block;
}

.clinic-walk-in strong {
    margin-bottom: 2px;

    color: var(--rosewood-dark-green);

    font-size: 13px;
    line-height: 1.3;
}

.clinic-walk-in small {
    color: #63756d;

    font-size: 11px;
    line-height: 1.3;
}


/* ============================================================
   MAP
============================================================ */

.clinic-map {
    width: 100%;
    min-width: 0;

    margin: 0;
    padding: 0;
}

.clinic-map a {
    position: relative;

    display: block;

    width: 100%;

    overflow: hidden;

    border-radius: 15px;

    background: #e9efed;
}

.clinic-map img {
    display: block;

    width: 100%;
    height: 270px;

    object-fit: cover;

    transition:
        transform .4s ease,
        filter .4s ease;
}

.map-overlay {
    position: absolute;

    left: 16px;
    bottom: 16px;

    display: inline-flex;
    align-items: center;

    padding: 9px 14px;

    border-radius: 30px;

    color: var(--rosewood-navy);

    background: rgba(255, 255, 255, .94);

    font-size: 12px;
    font-weight: 700;

    box-shadow:
        0 4px 14px rgba(0, 0, 0, .12);

    transition:
        color .25s ease,
        background-color .25s ease;
}

.clinic-map a:hover img {
    transform: scale(1.035);
}

.clinic-map a:hover .map-overlay {
    color: #ffffff;

    background: var(--rosewood-green);
}


/* ============================================================
   SINGLE LOCATION - DESKTOP
============================================================ */

@media (min-width: 851px) {

    .clinics-grid.single-location .clinic-info-grid {
        grid-template-columns:
            minmax(0, 1fr)
            minmax(0, 1fr)
            minmax(0, 1.25fr);

        align-items: stretch;
    }


    .clinics-grid.single-location .clinic-contact,
    .clinics-grid.single-location .clinic-hours,
    .clinics-grid.single-location .clinic-map {
        min-width: 0;
        height: 100%;
    }


    .clinics-grid.single-location .clinic-map a {
        height: 100%;
    }


    .clinics-grid.single-location .clinic-map img {
        width: 100%;
        height: 100%;

        min-height: 330px;

        object-fit: cover;
    }

}


/* ============================================================
   LARGE TABLET
============================================================ */

@media (max-width: 1150px) and (min-width: 851px) {

    /*
       Only affect the two-clinic layout.

       Single location keeps:
       Contact | Hours | Map
    */

    .clinics-grid:not(.single-location) .clinic-info-grid {
        grid-template-columns: 1fr;
    }


    .clinics-grid:not(.single-location) .clinic-map {
        grid-column: 1;
    }

}


/* ============================================================
   TABLET + MOBILE
   IMPORTANT:
   Contact -> Hours -> Map
============================================================ */

@media (max-width: 850px) {

    .clinic-locations-section {
        padding: 60px 0 70px;
    }


    /*
       One clinic card per row
    */

    .clinics-grid,
    .clinics-grid.single-location {
        grid-template-columns: 1fr;

        gap: 25px;
    }


    /*
       THIS IS THE IMPORTANT MOBILE FIX

       Contact
       Hours
       Map

       all become full-width rows.
    */

    .clinic-info-grid,
    .clinics-grid.single-location .clinic-info-grid,
    .clinics-grid:not(.single-location) .clinic-info-grid {
        display: grid;

        grid-template-columns: minmax(0, 1fr) !important;

        width: 100%;

        gap: 22px;

        padding: 24px;

        box-sizing: border-box;
    }


    /*
       Explicitly reset grid positioning
    */

    .clinic-contact,
    .clinic-hours,
    .clinic-map {
        grid-column: 1 / -1 !important;

        width: 100%;
        min-width: 0;

        box-sizing: border-box;
    }


    /*
       Remove desktop equal-height behavior
    */

    .clinics-grid.single-location .clinic-contact,
    .clinics-grid.single-location .clinic-hours,
    .clinics-grid.single-location .clinic-map {
        height: auto;
    }


    /*
       Contact
    */

    .contact-details {
        width: 100%;
    }


    .contact-detail {
        width: 100%;
    }


    .contact-detail > div {
        flex: 1;

        min-width: 0;
    }


    /*
       Button
    */

    .clinics-grid.single-location .getdirection-button,
    .getdirection-button {
        width: 100%;

        margin-top: 22px;
    }


    /*
       Hours
    */

    .clinic-hours {
        width: 100%;
    }


    /*
       Map
    */

    .clinic-map {
        width: 100%;

        margin: 0;
        padding: 0;
    }


    .clinic-map a {
        width: 100%;
        height: auto;
    }


    .clinic-map img,
    .clinics-grid.single-location .clinic-map img {
        width: 100%;
        height: 250px;

        min-height: 0;

        object-fit: cover;
    }

}


/* ============================================================
   MOBILE
============================================================ */

@media (max-width: 600px) {

    .clinic-locations-section {
        padding: 45px 0 55px;
    }


    .clinic-section-heading {
        margin-bottom: 30px;
    }


    .clinic-section-heading h2 {
        font-size: 34px;
    }


    .clinic-section-heading p {
        font-size: 15px;
    }


    .clinic-card {
        border-radius: 17px;
    }


    .clinic-card-header {
        padding: 22px 20px 18px;
    }


    .clinic-card-header h3 {
        font-size: 21px;
    }


    /*
       Keep everything one column
    */

    .clinic-info-grid,
    .clinics-grid.single-location .clinic-info-grid {
        grid-template-columns: minmax(0, 1fr) !important;

        padding: 22px 20px;

        gap: 22px;
    }


    /*
       Contact
    */

    .contact-icon {
        flex: 0 0 40px;

        width: 40px;
        height: 40px;
    }


    .contact-detail p {
        font-size: 14px;
    }


    /*
       Phone / fax should not split
       unnecessarily.
    */

    .contact-detail a {
        word-break: normal;
        overflow-wrap: normal;
    }


    /*
       Hours
    */

    .clinic-hours {
        padding: 18px;
    }


    /*
       Hours are easier to read horizontally
       on normal mobile screens.
    */

    .clinic-hours-row {
        display: flex;
        align-items: center;
        justify-content: space-between;

        gap: 15px;
    }


    .clinic-hours-row span {
        flex: 1;

        margin-bottom: 0;
    }


    .clinic-hours-row strong {
        flex: 0 0 auto;

        text-align: right;
    }


    /*
       Map
    */

    .clinic-map img,
    .clinics-grid.single-location .clinic-map img {
        height: 220px;
    }

}


/* ============================================================
   VERY SMALL MOBILE
============================================================ */

@media (max-width: 400px) {

    .clinic-info-grid,
    .clinics-grid.single-location .clinic-info-grid {
        padding: 18px 16px;
    }


    .clinic-hours {
        padding: 16px;
    }


    /*
       Stack day/time again when screen
       becomes extremely narrow.
    */

    .clinic-hours-row {
        display: block;
    }


    .clinic-hours-row span {
        display: block;

        margin-bottom: 5px;
    }


    .clinic-hours-row strong {
        display: block;

        text-align: left;
    }


    .clinic-map img,
    .clinics-grid.single-location .clinic-map img {
        height: 190px;
    }

}