/* Community Page Styles */

/* Base & Typography */
.page-community-wrapper {
    font-family: 'Inter', sans-serif;
    /* Ensuring modern font */
    color: #fff;
    background-color: #000;
    /* Dark base */
    overflow-x: hidden;
}

/* Hero Section */
.community-hero {
    position: relative;
    height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.community-hero-media {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.community-hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
    /* Slight dim for text readability */
    background: linear-gradient(45deg, #2c3e50, #4ca1af);
    /* Fallback gradient */
}

.community-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    /* Muted darkening */
    z-index: 2;
}

.community-hero-content {
    position: relative;
    z-index: 3;
    max-width: 800px;
    padding: 0 20px;
}

.community-hero-eyebrow {
    display: inline-block;
    background-color: #a8bd62;
    color: #132a13;
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid #132a13;
    letter-spacing: 0.5px;
}

.community-hero-headline {
    font-size: 4rem;
    font-weight: 700;
    line-height: 1.1;
    margin-top: 10px;
    margin-bottom: 1.5rem;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.community-hero-subtext {
    font-size: 1.25rem;
    line-height: 1.6;
    color: #e0e0e0;
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* CTAs */
.community-hero-ctas {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.community-btn {
    display: inline-flex;
    align-items: center;
    padding: 15px 30px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.community-btn-primary {
    background-color: #FEFAE0;
    color: #132A13;
}

.community-btn-primary:hover {
    background-color: #FEFAE0;
    color: #132A13 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

.community-btn-outline {
    background-color: transparent;
    border: 2px solid #FEFAE0;
    color: #FEFAE0 !important;
}

.community-btn-outline:hover {
    background-color: #FEFAE0;
    color: #132A13 !important;
    transform: translateY(-2px);
}

.btn-icon {
    margin-right: 8px;
    font-size: 1.1em;
}

/* Stats Section */
.community-stats-section {
    padding: 100px 20px;
    background-color: #111;
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Gradient Fade from Hero to Stats */
.community-stats-section::before {
    content: '';
    position: absolute;
    top: -150px;
    left: 0;
    width: 100%;
    height: 151px;
    background: linear-gradient(to bottom, transparent, #111);
    z-index: 10;
    pointer-events: none;
}

.community-stats-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
    max-width: 1200px;
    width: 100%;
}

.community-stat-card {
    background: rgba(255, 255, 255, 0.05);
    /* Glass-like effect */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    min-width: 250px;
    flex: 1;
    backdrop-filter: blur(10px);
    opacity: 0;
    /* Valid state for animation */
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.community-stat-card.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.stat-number {
    display: block;
    font-size: 3rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 1.1rem;
    color: #a8b2c1;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {

    .community-hero-content {
        padding-top: 70px;
    }

    .community-hero-headline {
        font-size: 2.5rem;
    }

    .community-hero-subtext {
        font-size: 1rem;
    }

    .community-hero-ctas {
        flex-direction: column;
        width: 100%;
    }

    .community-btn {
        width: 100%;
        justify-content: center;
    }

    .community-stats-container {
        flex-direction: column;
        align-items: center;
    }

    .community-stat-card {
        width: 100%;
        max-width: 350px;
    }
}

/* ============================
   Global Member Map Section
   ============================ */
.community-map-section {
    padding: 80px 20px;
    background-color: #0a0a0a;
    /* Slightly darker to separate sections */
    text-align: center;
    position: relative;
    z-index: 5;
}

.map-header {
    margin-bottom: 40px;
}

.map-title {
    font-size: 3rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 30px;
}

.map-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
}

.map-filter-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #a8b2c1;
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.map-filter-btn:hover,
.map-filter-btn.active {
    background: #fff;
    color: #000;
    border-color: #fff;
}

.community-map-container {
    width: 100%;
    height: 600px;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 40px;
    background-color: #1a1a1a;
    /* Loading state bg */
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.map-cta-container {
    margin-top: 20px;
}

.map-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #FEFAE0;
    /* Primary cream color */
    color: #132A13;
    /* Dark text */
    padding: 15px 30px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid #FEFAE0;
    margin-top: 20px;
}

.map-cta-btn:hover {
    background-color: transparent;
    color: #FEFAE0;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(254, 250, 224, 0.2);
}

/* Leaflet Dark Mode Overrides */
.leaflet-container {
    background: #0a0a0a !important;
    font-family: 'Inter', sans-serif !important;
}

/* Custom Popup Styling */
.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
    background: #1a1a1a !important;
    color: #fff !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5) !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.leaflet-popup-content {
    margin: 15px !important;
    font-size: 1rem;
    line-height: 1.4;
}

.leaflet-popup-content b {
    color: #a8bd62;
    font-size: 1.1em;
}

/* responsive title */
@media (max-width: 768px) {
    .map-title {
        font-size: 2rem;
    }

    .community-map-container {
        height: 400px;
    }
}

/* Hide Leaflet Attribution */
.leaflet-control-attribution {
    display: none !important;
}