/* ═══════════════════════════════════════════════════
   Royal Sojitz Locations — Map + List
   Mobile-first
   ═══════════════════════════════════════════════════ */

/* ─── Layout ─── */
.locations-section { text-align: center; position: relative; overflow: hidden; }
.locations-section > .container { position: relative; z-index: 1; }
.locations-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    text-align: left;
    margin-top: 10px;
}

/* ─── List ─── */
.locations-list {
    display: flex; flex-direction: column; gap: 0;
    max-height: 360px; overflow-y: auto;
    border: 1px solid rgba(0,0,0,0.08);
    border-bottom: none;
}
.locations-list::-webkit-scrollbar { width: 4px; }
.locations-list::-webkit-scrollbar-track { background: transparent; }
.locations-list::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 2px; }

/* ─── Card ─── */
.location-card {
    display: flex; align-items: flex-start; gap: 14px;
    padding: 16px; cursor: pointer;
    background: #fff; border: none;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    text-align: left; width: 100%;
    font-family: inherit; font-size: inherit;
    transition: background 0.25s ease;
}
.location-card:hover { background: #f8f9f4; }
.location-card.active {
    background: rgba(114, 23, 11, 0.04);
    border-left: 3px solid #72170b;
}

/* Thumbnail */
.location-card-thumb {
    flex-shrink: 0; width: 56px; height: 56px;
    border-radius: 6px; overflow: hidden;
}
.location-card-thumb img {
    width: 100%; height: 100%; object-fit: cover;
}

/* Info */
.location-card-info { flex: 1; min-width: 0; }
.location-card-info h3 {
    font-size: 0.95rem; font-weight: 600; margin: 0 0 4px;
    color: #1a1a18; line-height: 1.3;
}
.location-address {
    font-size: 0.82rem; color: #4a4a45; line-height: 1.5; margin: 0 0 4px;
}
.location-phone {
    font-size: 0.82rem; margin: 0 0 6px;
}
.location-phone a { color: #1a1a18; }
.location-phone a:hover { color: #72170b; }

/* Links: Directions + Google Maps */
.location-links {
    display: flex; gap: 14px; flex-wrap: wrap;
}
.location-link {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 11px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.5px;
    padding: 2px 0; min-height: 44px;
}
.location-link--directions { color: #72170b; }
.location-link--directions:hover { color: #8a1e0e; }
.location-link--gmaps { color: #4a4a45; }
.location-link--gmaps:hover { color: #1a1a18; }
.location-link svg { flex-shrink: 0; }

/* ─── Map ─── */
.locations-map-wrap {
    border: 1px solid rgba(0,0,0,0.08);
}
.locations-map {
    width: 100%; height: 360px;
    background: #f0f1ec;
    z-index: 0;
}

/* ─── Marker Pin (L.icon — image-based for smooth flyTo sync) ─── */
.leaflet-marker-icon {
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

/* ─── Popup ─── */
.rsvl-popup { font-family: 'Montserrat', sans-serif; font-size: 13px; line-height: 1.5; }
.rsvl-popup strong { font-size: 14px; color: #1a1a18; }
.rsvl-popup-addr { color: #4a4a45; font-size: 12px; }
.rsvl-popup-links {
    margin-top: 8px; font-size: 11px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.5px;
}
.rsvl-popup-links a { color: #72170b; }
.rsvl-popup-links a:hover { color: #8a1e0e; text-decoration: underline; }

/* ─── Reset Button ─── */
.rsvl-reset-btn a {
    display: flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; font-size: 20px; line-height: 1;
    color: #333; background: #fff;
}
.rsvl-reset-btn a:hover { background: #f4f4f4; color: #72170b; }

/* Leaflet popup overrides */
.leaflet-popup-content-wrapper {
    border-radius: 4px !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12) !important;
}
.leaflet-popup-content { margin: 12px 14px !important; }

/* ═══════════════════════════════════════════════════
   Tablet — 768px+
   ═══════════════════════════════════════════════════ */
@media (min-width: 768px) {
    .locations-layout {
        grid-template-columns: 380px 1fr;
        min-height: 480px;
    }
    .locations-list {
        max-height: 480px;
        border-bottom: 1px solid rgba(0,0,0,0.08);
        border-right: none;
    }
    .locations-map { height: 100%; min-height: 480px; }
    .locations-map-wrap {
        border-left: none;
    }
}

/* ═══════════════════════════════════════════════════
   Desktop — 1024px+
   ═══════════════════════════════════════════════════ */
@media (min-width: 1024px) {
    .locations-layout {
        grid-template-columns: 400px 1fr;
        min-height: 540px;
    }
    .locations-list { max-height: 540px; }
    .locations-map { min-height: 540px; }
    .location-card { padding: 20px; }
}

/* ═══════════════════════════════════════════════════
   Large desktop — 1280px+
   ═══════════════════════════════════════════════════ */
@media (min-width: 1280px) {
    .locations-layout {
        grid-template-columns: 420px 1fr;
        min-height: 580px;
    }
    .locations-list { max-height: 580px; }
    .locations-map { min-height: 580px; }
}
