/* ============================================================
   Project Locator Styles
   Tokens fall back to hex if global custom properties are unset
============================================================= */
.project-locator-section {
    --vp-teal: var(--vp-color-accent, #3197db);
    --vp-teal: var(--vp-color-accent, #3197db);
    --pl-navy: var(--vp-navy, #0d1b3e);
    --pl-border: #e6ecf0;

    padding: 60px 0;
    background: #f8f9fa;
}

.project-locator-section .section-header {
    text-align: center;
    margin-bottom: 40px;
}

.project-locator-section .section-header h2 {
    font-family: 'Archivo', sans-serif;
    font-size: 32px;
    color: var(--vp-teal);
    margin-bottom: 15px;
    font-weight: 700;
}

.project-locator-section .section-header p {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    color: #000;
    max-width: 700px;
    margin: 0 auto;
}

/* ---------- Shell: panel + map ---------- */
.locator-shell {
    display: flex;
    align-items: stretch;
    width: 100%;
    height: 560px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    background: #fff;
    position: relative;
}

.locator-map-wrap {
    flex: 1 1 auto;
    height: 100%;
    position: relative;
}

#projectMap {
    width: 100%;
    height: 100%;
}

/* ---------- Detail panel (hidden by default) ---------- */
.locator-panel {
    flex: 0 0 0;
    width: 0;
    max-width: 340px;
    height: 100%;
    overflow: hidden;
    background: #fff;
    border-right: 1px solid var(--pl-border);
    display: flex;
    flex-direction: column;
    transition: width 0.3s ease, flex-basis 0.3s ease;
}

.locator-panel.is-open {
    flex: 0 0 340px;
    width: 340px;
}

.locator-panel-header {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--vp-teal);
    color: #fff;
    padding: 16px 18px;
}

.locator-back-btn,
.locator-directions-btn {
    flex: 0 0 auto;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s ease;
    padding: 0;
}

.locator-back-btn:hover,
.locator-directions-btn:hover {
    background: rgba(255, 255, 255, 0.28);
    color: #fff;
}

.locator-panel-title {
    flex: 1 1 auto;
    font-family: 'Archivo', sans-serif;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.locator-panel-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 20px 20px 24px;
}

.locator-field {
    margin-bottom: 18px;
}

.locator-field-label {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--vp-teal);
    margin-bottom: 4px;
}

.locator-field-value {
    font-family: 'Inter', sans-serif;
    font-size: 14.5px;
    line-height: 1.5;
    color: var(--pl-navy);
    margin: 0;
}

.locator-field-note {
    font-family: 'Inter', sans-serif;
    font-size: 12.5px;
    font-style: italic;
    color: #8a8f98;
    border-top: 1px dashed var(--pl-border);
    padding-top: 14px;
    margin-top: 4px;
}

/* ---------- Custom Leaflet marker ---------- */
.locator-marker {
    background: var(--vp-teal);
    width: 30px;
    height: 30px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    border: 3px solid #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease, background 0.15s ease;
}

/* .locator-marker i {
    transform: rotate(45deg);
    color: #fff;
    font-size: 13px;
} */

.locator-marker svg {
    color: #fff;
    transform: rotate(45deg);
}

.locator-marker.is-active {
    background: var(--pl-navy);
    transform: rotate(-45deg) scale(1.15);
}

/* =============================================================
   RESPONSIVE — six breakpoints per site convention
================================================================= */

/* ≥1400px */
@media (min-width: 1400px) {
    .locator-panel.is-open {
        flex-basis: 380px;
        width: 380px;
    }
}

/* ≥1200px : default two-pane layout above already applies */

/* ≥992px and <1200px : slightly narrower panel */
@media (max-width: 1199.98px) and (min-width: 992px) {
    .locator-panel.is-open {
        flex-basis: 300px;
        width: 300px;
    }
}

/* <992px : stack panel above map when open */
@media (max-width: 991.98px) {
    .locator-shell {
        flex-direction: column;
        height: auto;
    }

    .locator-panel {
        width: 100%;
        max-width: 100%;
        height: 0;
        border-right: none;
        border-bottom: 1px solid var(--pl-border);
    }

    .locator-panel.is-open {
        flex-basis: auto;
        width: 100%;
        height: 320px;
    }

    .locator-map-wrap {
        height: 420px;
    }
}

/* ≥768px and <992px : (covered by rule above, no extra override needed) */

/* <768px : compact spacing */
@media (max-width: 767.98px) {
    .project-locator-section {
        padding: 44px 0;
    }

    .project-locator-section .section-header h2 {
        font-size: 26px;
    }

    .locator-map-wrap {
        height: 360px;
    }

    .locator-panel.is-open {
        height: 300px;
    }

    .locator-panel-body {
        padding: 16px 16px 20px;
    }
}

/* <576px : single column, compact */
@media (max-width: 575.98px) {
    .locator-panel-title {
        font-size: 13.5px;
    }

    .locator-field-value {
        font-size: 13.5px;
    }

    .locator-map-wrap {
        height: 300px;
    }

    .locator-panel.is-open {
        height: 280px;
    }
}