/* ==========================================================================
   FOOTER – Open Door Health Community
   ==========================================================================
   Sections (top → bottom):
   1. Map          – MapLibre GL rotated map with custom markers
   2. Locations    – Two side-by-side location cards
   3. Footer Nav   – Logo + social  |  dynamic WP menu columns
   4. Heartbeat    – Decorative SVG EKG divider
   5. Disclaimer   – FQHC legal text
   6. Copyright    – GP .site-info overrides
   ========================================================================== */

/* ==========================================================================
   1. MAP SECTION
   ========================================================================== */

.odh-footer-map {
    width: 100%;
    background: var(--odh-off-white, #F7F9FA);
}

.odh-footer-map-inner {
    position: relative;
    width: 100%;
    height: 340px;
    overflow: hidden;
}

#odh-map {
    width: 100%;
    height: 100%;
    z-index: 1;
}

.odh-footer-map-inner .maplibregl-map {
    font-family: var(--odh-font-primary, 'Montserrat', sans-serif);
}

/* Compass overlay – rotation set dynamically via JS to match map bearing */
.odh-map-compass {
    position: absolute;
    top: 6px;
    right: 12px;
    z-index: 1000;
    width: 36px;
    height: 48px;
    pointer-events: none;
    filter: drop-shadow(0 1px 3px rgba(0,0,0,0.25));
}

.odh-map-compass svg {
    display: block;
    width: 36px;
    height: 48px;
    transform-origin: 50% 62.5%;
}

/* MapLibre popup overrides */
.maplibregl-popup-content {
    border-radius: 8px;
    font-family: var(--odh-font-primary, 'Montserrat', sans-serif);
    font-size: 0.85rem;
    line-height: 1.5;
    padding: 12px 16px;
}

.maplibregl-popup-content a {
    color: var(--odh-teal, #007C91);
    font-weight: 600;
}

/* Hide MapLibre's built-in compass since we have our own */
.maplibregl-ctrl-compass {
    display: none !important;
}

/* Cooperative gesture overlay – styled to match site */
.maplibregl-cooperative-gesture-screen {
    background: rgba(27, 110, 125, 0.82) !important;
    backdrop-filter: blur(2px);
}

.maplibregl-cooperative-gesture-screen .maplibregl-cooperative-gesture-screen-title {
    color: #ffffff !important;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
}

/* ==========================================================================
   2. LOCATIONS SECTION
   ========================================================================== */

.odh-footer-locations {
    background: var(--odh-white, #FFFFFF);
    padding: 60px 20px;
}

.odh-footer-locations-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    gap: 60px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Individual location card */
.odh-location-card {
    display: flex;
    gap: 24px;
    flex: 1 1 450px;
    max-width: 500px;
}

.odh-location-image {
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 4px;
}

.odh-location-image img {
    width:250px;
    display: block;
    height:auto;
}

/* Text content */
.odh-location-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.odh-location-name {
    font-family: var(--odh-font-primary, 'Montserrat', sans-serif);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--odh-dark, #2D3748);
    margin: 0 0 6px;
    line-height: 1.2;
}

.odh-location-desc {
    font-family: var(--odh-font-primary, 'Montserrat', sans-serif);
    font-size: 0.85rem;
    color: var(--odh-gray, #445D6C);
    margin: 0 0 12px;
    line-height: 1.4;
}

.odh-location-detail {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-family: var(--odh-font-primary, 'Montserrat', sans-serif);
    font-size: 0.85rem;
    color: var(--odh-gray, #445D6C);
    text-decoration: none;
    margin-bottom: 6px;
    line-height: 1.4;
    transition: color 0.2s ease;
}

.odh-location-detail:hover {
    color: var(--odh-teal, #007C91);
}

.odh-location-detail svg {
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--odh-teal, #007C91);
}

.odh-location-detail span {
    color: inherit;
}

/* ==========================================================================
   3. FOOTER NAV SECTION
   ========================================================================== */

.odh-footer-nav {
    background: var(--odh-white, #FFFFFF);
    padding: 40px 20px 30px;
    border-top: 1px solid #e8ecf0;
}

.odh-footer-nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

/* Brand column (logo + social) */
.odh-footer-brand {
    flex: 0 0 240px;
}

.odh-footer-logo {
    margin-bottom: 20px;
}

.odh-footer-logo img {
    max-width: 200px;
    height: auto;
}

.odh-footer-logo .custom-logo {
    max-width: 200px;
    height: auto;
}

.odh-footer-site-title {
    font-family: var(--odh-font-primary, 'Montserrat', sans-serif);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--odh-blue, #007C91);
    text-decoration: none;
}

/* Social icons */
.odh-footer-social {
    display: flex;
    gap: 12px;
    align-items: center;
}

.odh-footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--odh-teal, #007C91);
    transition: color 0.2s ease, transform 0.2s ease;
}

.odh-footer-social a:hover {
    color: var(--odh-blue, #007C91);
    transform: scale(1.1);
}

.odh-footer-social svg {
    width: 28px;
    height: 28px;
}

/* Menu columns area – CSS grid, auto-fits to however many columns the WP menu has */
.odh-footer-menus {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 32px 40px;
    align-items: start;
}

/* Each top-level menu item = one column */
.odh-footer-col {
    display: flex;
    flex-direction: column;
}

/* Column heading (top-level item label) */
.odh-footer-col-heading {
    display: block;
    font-family: var(--odh-font-primary, 'Montserrat', sans-serif);
    font-size: 1rem;
    font-weight: 700;
    color: var(--odh-dark, #2D3748);
    text-decoration: none;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e8ecf0;
}

a.odh-footer-col-heading:hover {
    color: var(--odh-teal, #007C91);
}

/* Sub-item link list */
.odh-footer-col-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.odh-footer-col-links li {
    margin-bottom: 8px;
}

.odh-footer-col-links li a {
    font-family: var(--odh-font-primary, 'Montserrat', sans-serif);
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--odh-gray, #445D6C);
    text-decoration: none;
    transition: color 0.2s ease;
}

.odh-footer-col-links li a:hover {
    color: var(--odh-teal, #007C91);
}

/* ==========================================================================
   4. HEARTBEAT / EKG DIVIDER
   ========================================================================== */

.odh-heartbeat-divider {
    width: 100%;
    padding: 30px 0 20px;
    background: var(--odh-white, #FFFFFF);
}

/* The horizontal line + centered pulse container */
.odh-heartbeat-line {
    position: relative;
    width: 100%;
    height: 3px;
    background: #C4D600;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* The SVG pulse – fixed width, centered on the line */
.odh-heartbeat-svg {
    position: absolute;
    width: 120px;
    height: 60px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--odh-white, #FFFFFF);
}

/* ==========================================================================
   5. FQHC DISCLAIMER
   ========================================================================== */

.odh-footer-disclaimer {
    background: var(--odh-white, #FFFFFF);
    padding: 20px 20px 30px;
}

.odh-footer-disclaimer-inner {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.odh-footer-disclaimer p {
    font-family: var(--odh-font-primary, 'Montserrat', sans-serif);
    font-size: 0.75rem;
    color: var(--odh-gray, #5A6B7D);
    line-height: 1.6;
    margin: 0;
}

/* ==========================================================================
   6. COPYRIGHT BAR (GP .site-info overrides)
   ========================================================================== */

.site-footer .site-info {
    background: var(--odh-off-white, #F7F9FA) !important;
    border-top: 1px solid #e8ecf0;
}

.site-info .inside-site-info {
    max-width: 1100px;
    margin: 0 auto;
    padding: 18px 20px;
}

.site-info .copyright-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.odh-copyright,
.odh-powered-by {
    font-family: var(--odh-font-primary, 'Montserrat', sans-serif);
    font-size: 0.8rem;
    margin-left: 0;
    color: var(--odh-gray, #445D6C);
    font-weight: 500;
}

.odh-powered-by {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #264193;
}

.odh-powered-by-link {
    display: inline-flex;
    align-items: center;
    line-height: 0;
}

.odh-powered-by-logo {
    height: 15px;
    width: auto;
    display: block;
    vertical-align: middle;
}

/* ==========================================================================
   RESPONSIVE – TABLET (max-width: 900px)
   ========================================================================== */

@media (max-width: 900px) {

    /* Map */
    .odh-footer-map-inner {
        height: 280px;
    }

    /* Locations */
    .odh-footer-locations-inner {
        gap: 24px;
    }

    .odh-location-card {
        max-width: 100%;
        flex-basis: auto;
    }

    /* Footer nav */
    .odh-footer-nav-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .odh-footer-brand {
        flex: none;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .odh-footer-social {
        justify-content: center;
    }

    .odh-footer-menus {
        width: 100%;
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 24px 28px;
    }
}

/* ==========================================================================
   RESPONSIVE – MOBILE (max-width:768px)
   ========================================================================== */

@media (max-width: 768px) {

    /* Map */
    .odh-footer-map-inner {
        height: 240px;
    }

    .odh-map-compass {
        top: 4px;
        right: 8px;
        width: 30px;
        height: 40px;
    }

    .odh-map-compass svg {
        width: 30px;
        height: 40px;
    }

    /* Locations */
    .odh-footer-locations {
        padding: 24px 12px;
        margin-top: -58px;
        z-index: 100;
        display: block;
        position: relative;
        background: transparent;
    }

    .odh-footer-locations-inner {
        flex-direction: row;
        align-items: flex-start;
        gap: 12px;
    }

    .odh-location-card {
        flex: 1 1 0;
        min-width: 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        max-width: none;
        text-align: left;
    }

    .odh-location-image {
        width: 100%;
        max-width: none;
        height: 120px;
    }

    .odh-location-image img {
        width: 100%;
        height: 120px;
        object-fit: cover;
    }

    .odh-location-info {
        align-items: flex-start;
    }

    .odh-location-name {
        font-size: 1rem;
    }

    .odh-location-desc {
        font-size: 0.72rem;
    }

    .odh-location-detail {
        font-size: 0.72rem;
        gap: 5px;
    }

    .odh-location-detail svg {
        width: 13px;
        height: 13px;
    }

    .odh-location-detail {
        justify-content: center;
    }

    /* Footer nav */
    .odh-footer-nav {
        padding: 30px 16px 20px;
    }

    .odh-footer-menus {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px 20px;
    }

    .odh-footer-col-heading,
    .odh-footer-col-links li a {
        text-align: center;
    }
    }

    /* Copyright bar */
    .site-info .copyright-bar {
        flex-direction: column;
        text-align: center;
    }

    .odh-powered-by {
        margin-left: 0;
    }
}
