/**
 * BGD Service-Area Hub Styles
 * Reuses the landing-page design tokens (--bgd-primary, etc.).
 * All classes prefixed bgd- to avoid theme conflicts.
 */

.bgd-hub {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    color: var(--bgd-text, #1a1a1a);
    line-height: 1.6;
}

/* ---------- Hero (image-backed, matches landing pages) ---------- */
.bgd-hub-hero {
    position: relative;
    overflow: hidden;
    padding: 6rem 0 7rem;
    min-height: 520px;
    display: flex;
    align-items: center;
    background-color: #1a1a1a; /* fallback while the photo loads */
    background-size: cover;
    background-position: center right; /* anchor the room photo to the right */
    background-repeat: no-repeat;
    color: var(--bgd-text, #1a1a1a);
    text-align: left;
}

/* Light wash so left-aligned dark text stays readable over the photo,
   fading to fully transparent on the right so the Bay Gold room photo
   is what's visible on the right of the fold. */
.bgd-hub-hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0.97) 0%,
        rgba(255, 255, 255, 0.92) 30%,
        rgba(255, 255, 255, 0.70) 55%,
        rgba(255, 255, 255, 0.25) 75%,
        rgba(255, 255, 255, 0) 100%
    );
}
/* No photo configured → drop the wash so text stays readable on the dark fallback. */
.bgd-hub-hero:not([style*="background-image"]) .bgd-hub-hero-overlay {
    display: none;
}
.bgd-hub-hero:not([style*="background-image"]) {
    color: #fff;
}

.bgd-hub-hero .bgd-container {
    position: relative;
    z-index: 2;
    width: 100%;
}

.bgd-hub-hero-content {
    max-width: 560px;
}

.bgd-hub-hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.15;
    margin: 1rem 0 0.75rem;
    color: var(--bgd-text, #1a1a1a);
    letter-spacing: -0.01em;
}

.bgd-hub-subhead {
    font-size: 1.15rem;
    color: var(--bgd-text-muted, #4b5563);
    margin: 0 0 1.75rem;
    max-width: 560px;
}

.bgd-hub .bgd-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #fff;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--bgd-text, #1a1a1a);
}

.bgd-hub .bgd-stars {
    color: var(--bgd-stars, #fbbf24);
    letter-spacing: 1px;
}

.bgd-hub .bgd-hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: flex-start;
    flex-wrap: wrap;
}

/* ---------- Map (own section, below the fold) ---------- */
.bgd-hub-map-section {
    padding: 3.5rem 0 1rem;
}

.bgd-hub-map {
    height: 520px;
    width: 100%;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
    background: #eef2f5;
    z-index: 0; /* keep Leaflet panes under sticky theme headers */
}

.bgd-hub-map-fallback {
    padding: 2rem;
    text-align: center;
    color: var(--bgd-text-muted, #6b7280);
}

/* Leaflet popup content */
.bgd-map-popup h4 {
    margin: 0 0 0.4rem;
    font-size: 1.05rem;
    color: var(--bgd-primary, #2B6CB0);
}
.bgd-map-popup ul {
    margin: 0;
    padding: 0;
    list-style: none;
}
.bgd-map-popup li { margin: 0.15rem 0; }
.bgd-map-popup a {
    color: var(--bgd-text, #1a1a1a);
    text-decoration: none;
    font-weight: 500;
}
.bgd-map-popup a:hover {
    color: var(--bgd-primary, #2B6CB0);
    text-decoration: underline;
}

/* ---------- Directory ---------- */
.bgd-hub-directory {
    padding: 3.5rem 0;
    background: var(--bgd-bg-section, #f8fafc);
}

.bgd-hub-region { margin-bottom: 2.5rem; }

.bgd-hub-region-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--bgd-border, #e5e7eb);
    color: var(--bgd-primary-dark, #215387);
}

.bgd-hub-city-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}

.bgd-hub-city {
    background: #fff;
    border: 1px solid var(--bgd-border, #e5e7eb);
    border-radius: 10px;
    padding: 0;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}
.bgd-hub-city[open],
.bgd-hub-city:hover {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.bgd-hub-city-summary {
    cursor: pointer;
    list-style: none;
    padding: 1rem 1.15rem;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
.bgd-hub-city-summary::-webkit-details-marker { display: none; }
.bgd-hub-city-summary::after {
    content: '+';
    position: absolute;
    right: 1.15rem;
    font-size: 1.25rem;
    color: var(--bgd-primary, #2B6CB0);
    font-weight: 700;
}
.bgd-hub-city { position: relative; }
.bgd-hub-city[open] > .bgd-hub-city-summary::after { content: '\2212'; }

.bgd-hub-city-name {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--bgd-text, #1a1a1a);
}
.bgd-hub-city-meta {
    font-size: 0.85rem;
    color: var(--bgd-text-muted, #6b7280);
}

.bgd-hub-service-links {
    margin: 0;
    padding: 0 1.15rem 1rem;
    list-style: none;
    border-top: 1px solid var(--bgd-border, #e5e7eb);
}
.bgd-hub-service-links li { margin: 0.55rem 0 0; }
.bgd-hub-service-links a {
    color: var(--bgd-primary, #2B6CB0);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
}
.bgd-hub-service-links a:hover { text-decoration: underline; }

/* ---------- Services overview ---------- */
.bgd-hub-services { padding: 3.5rem 0; }

.bgd-hub-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
}
.bgd-hub-service-card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1.5rem;
    border: 1px solid var(--bgd-border, #e5e7eb);
    border-radius: 12px;
    text-decoration: none;
    background: #fff;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.bgd-hub-service-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}
.bgd-hub-service-card-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--bgd-text, #1a1a1a);
}
.bgd-hub-service-card-cta {
    color: var(--bgd-primary, #2B6CB0);
    font-weight: 600;
    font-size: 0.9rem;
}

/* ---------- Final CTA ---------- */
.bgd-hub-cta {
    padding: 3.5rem 0;
    text-align: center;
    background: var(--bgd-bg-section, #f8fafc);
}
.bgd-hub-cta h2 {
    font-size: 1.9rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
}
.bgd-hub-cta p {
    color: var(--bgd-text-muted, #6b7280);
    margin: 0 auto 1.5rem;
    max-width: 560px;
}
.bgd-hub-cta .bgd-hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ---------- Homepage shortcode module ---------- */
.bgd-areas-module {
    padding: 2.5rem 0;
    text-align: center;
}
.bgd-areas-module-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0 0 0.35rem;
}
.bgd-areas-module-sub {
    color: var(--bgd-text-muted, #6b7280);
    margin: 0 auto 1.5rem;
    max-width: 560px;
}
.bgd-areas-module-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: center;
    max-width: 900px;
    margin: 0 auto 1.5rem;
}
.bgd-areas-module-grid a {
    display: inline-block;
    padding: 0.55rem 1.05rem;
    border: 1px solid var(--bgd-border, #e5e7eb);
    border-radius: 999px;
    text-decoration: none;
    color: var(--bgd-primary-dark, #215387);
    font-weight: 600;
    font-size: 0.95rem;
    background: #fff;
    transition: all 0.15s ease;
}
.bgd-areas-module-grid a:hover {
    background: var(--bgd-primary, #2B6CB0);
    color: #fff;
    border-color: var(--bgd-primary, #2B6CB0);
}

/* No-photo fallback: keep hero text legible on the dark background. */
.bgd-hub-hero:not([style*="background-image"]) h1,
.bgd-hub-hero:not([style*="background-image"]) .bgd-hub-subhead {
    color: #fff;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .bgd-hub-hero {
        padding: 3rem 0 3.5rem;
        min-height: auto;
        background-position: center;
    }
    /* Stack vertically: darken the top so text is readable over the photo. */
    .bgd-hub-hero-overlay {
        background: linear-gradient(
            to bottom,
            rgba(255, 255, 255, 0.95) 0%,
            rgba(255, 255, 255, 0.88) 60%,
            rgba(255, 255, 255, 0.70) 100%
        );
    }
    .bgd-hub-hero-content { max-width: 100%; }
    .bgd-hub-map { height: 420px; }
}

@media (max-width: 640px) {
    .bgd-hub-hero h1 { font-size: 1.9rem; }
    .bgd-hub .bgd-hero-cta { justify-content: stretch; }
    .bgd-hub .bgd-hero-cta .bgd-btn { flex: 1 1 auto; text-align: center; justify-content: center; }
    .bgd-hub-map { height: 360px; }
    .bgd-hub-city-grid { grid-template-columns: 1fr; }
}
