/* ========================================
   DUAL MAP EMBED — Google Maps + Apple Maps
   Toggle between providers with branded UI
   ======================================== */

/* Section Container (inner pages) */
.map-embed-section {
    padding: 4rem 2rem 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

.map-embed-section .map-embed-header {
    margin-bottom: 2rem;
}

.map-embed-section .map-embed-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--secondary-dark, #2a2a2a);
    margin-bottom: 0.5rem;
    position: relative;
    padding-bottom: 1rem;
}

.map-embed-section .map-embed-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(135deg, var(--accent-orange, #ff8c00), #ffaa33);
    border-radius: 2px;
}

.map-embed-section .map-embed-subtitle {
    font-size: 1.05rem;
    color: #777;
    line-height: 1.6;
    margin-top: 0.75rem;
}

/* ─── Toggle Bar (shared) ─── */
.map-toggle-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.map-toggle-switch {
    display: inline-flex;
    align-items: center;
    background: #f0f0f0;
    border-radius: 12px;
    padding: 4px;
    gap: 0;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.06);
}

.map-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1.2rem;
    border: none;
    background: transparent;
    border-radius: 9px;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    color: #888;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.map-toggle-btn:hover:not(.active) {
    color: #555;
    background: rgba(0, 0, 0, 0.04);
}

.map-toggle-btn.active {
    background: white;
    color: var(--secondary-dark, #2a2a2a);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
}

.map-toggle-btn .map-toggle-icon {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.map-toggle-btn .map-toggle-icon svg {
    width: 18px;
    height: 18px;
}

.map-toggle-btn .map-toggle-icon img {
    width: 18px;
    height: 18px;
}

/* Directions link */
.map-directions-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-orange, #ff8c00);
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 0.5rem 0;
}

.map-directions-link:hover {
    color: #e67e00;
    gap: 0.65rem;
}

.map-directions-link i {
    font-size: 0.8rem;
}

/* ─── Map Frame Container (inner pages) ─── */
.map-embed-frame {
    position: relative;
    width: 100%;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1), 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.06);
    background: #1a1a2e;
}

.map-embed-pane {
    display: none;
    width: 100%;
    height: 380px;
}

.map-embed-pane.active {
    display: block;
}

/* CRITICAL: Inner wrappers must fill pane height */
.map-embed-pane > div {
    width: 100%;
    height: 100%;
}

/* Google Maps iframe */
.map-embed-pane iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

/* Apple Maps container */
.map-embed-pane .apple-map-container {
    width: 100%;
    height: 100%;
    position: relative;
}

/* Apple Maps placeholder (shared — inner + homepage) */
.apple-map-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #2d2d50 100%);
    color: rgba(255, 255, 255, 0.7);
    font-family: inherit;
    gap: 1rem;
    padding: 2rem;
    text-align: center;
}

.apple-map-placeholder .placeholder-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: rgba(255, 140, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--accent-orange, #ff8c00);
}

.apple-map-placeholder .placeholder-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: white;
}

.apple-map-placeholder .placeholder-text {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
    max-width: 360px;
    line-height: 1.6;
}

.apple-map-placeholder .placeholder-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding: 0.6rem 1.4rem;
    background: rgba(255, 140, 0, 0.15);
    border: 1px solid rgba(255, 140, 0, 0.3);
    border-radius: 10px;
    color: var(--accent-orange, #ff8c00);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.apple-map-placeholder .placeholder-link:hover {
    background: rgba(255, 140, 0, 0.25);
    border-color: rgba(255, 140, 0, 0.5);
}

/* Info strip below map */
.map-embed-info {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding: 1.25rem 0 0;
}

.map-info-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.88rem;
    color: #888;
}

.map-info-item i {
    color: var(--accent-orange, #ff8c00);
    font-size: 0.85rem;
}

.map-info-item strong {
    color: var(--secondary-dark, #2a2a2a);
    font-weight: 700;
}


/* ═══════════════════════════════════════════
   HOMEPAGE COVERAGE MAP — Dark Theme Toggle
   ═══════════════════════════════════════════ */

/* Toggle overlay inside the coverage-map container */
.coverage-map .map-toggle-overlay {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.coverage-map .map-toggle-switch {
    background: rgba(26, 26, 46, 0.8);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 140, 0, 0.2);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.coverage-map .map-toggle-btn {
    color: rgba(255, 255, 255, 0.5);
    padding: 0.45rem 1rem;
    font-size: 0.82rem;
}

.coverage-map .map-toggle-btn:hover:not(.active) {
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.06);
}

.coverage-map .map-toggle-btn.active {
    background: rgba(255, 140, 0, 0.2);
    color: white;
    box-shadow: 0 2px 8px rgba(255, 140, 0, 0.2);
    border: 1px solid rgba(255, 140, 0, 0.3);
}

/* Homepage Apple Maps pane — overlays the Google Map */
.coverage-map .homepage-apple-pane {
    position: absolute;
    top: 6px;
    left: 6px;
    right: 6px;
    bottom: 6px;
    border-radius: 16px;
    overflow: hidden;
    z-index: 3;
    display: none;
}

.coverage-map .homepage-apple-pane.active {
    display: block;
}

.coverage-map .homepage-apple-pane .apple-map-placeholder {
    border-radius: 16px;
}

/* Directions link — dark variant for homepage */
.coverage-map .map-directions-link {
    padding: 0.4rem 0.75rem;
    background: rgba(26, 26, 46, 0.8);
    backdrop-filter: blur(12px);
    border-radius: 9px;
    border: 1px solid rgba(255, 140, 0, 0.2);
    font-size: 0.82rem;
}

.coverage-map .map-directions-link:hover {
    background: rgba(255, 140, 0, 0.15);
    border-color: rgba(255, 140, 0, 0.4);
}


/* ─── Responsive (Inner Pages) ─── */
@media (max-width: 768px) {
    .map-embed-section {
        padding: 3rem 1.5rem 2rem;
    }

    .map-embed-section .map-embed-title {
        font-size: 1.6rem;
    }

    .map-toggle-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .map-embed-pane {
        height: 300px;
    }

    .map-embed-frame {
        border-radius: 14px;
    }

    .map-embed-info {
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .map-toggle-btn {
        padding: 0.5rem 0.9rem;
        font-size: 0.82rem;
    }

    .map-embed-pane {
        height: 260px;
    }
}

/* ─── Responsive (Homepage) ─── */
@media (max-width: 768px) {
    .coverage-map .map-toggle-overlay {
        top: 10px;
        right: 10px;
        gap: 0.5rem;
    }

    .coverage-map .map-toggle-btn {
        padding: 0.4rem 0.75rem;
        font-size: 0.78rem;
    }

    .coverage-map .map-directions-link {
        font-size: 0.78rem;
        padding: 0.35rem 0.6rem;
    }

    .coverage-map .homepage-apple-pane {
        top: 4px;
        left: 4px;
        right: 4px;
        bottom: 4px;
        border-radius: 12px;
    }
}
