/* Community Page Styles */

:root {
    --map-bg: #f8f9fa;
    --gold: #FFD700;
    --silver: #C0C0C0;
    --bronze: #CD7F32;
}

/* --- Hero Section --- */
.community-hero {
    padding: 120px 0 80px;
    background: radial-gradient(circle at 100% 0%, rgba(66, 133, 244, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 0% 100%, rgba(52, 168, 83, 0.05) 0%, transparent 50%);
    overflow: hidden;
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin: 1.5rem 0 2.5rem;
    line-height: 1.6;
}

.hero-cta {
    display: flex;
    gap: 1rem;
}

/* Avatar Cloud Visual */
.hero-visual {
    flex: 1;
    position: relative;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-cloud {
    position: relative;
    width: 400px;
    height: 400px;
}

.avatar {
    position: absolute;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: var(--shadow-2);
    object-fit: cover;
    animation: float 6s ease-in-out infinite;
}

.a1 {
    top: 10%;
    left: 20%;
    animation-delay: 0s;
    width: 80px;
    height: 80px;
    z-index: 2;
}

.a2 {
    top: 60%;
    right: 10%;
    animation-delay: 1s;
}

.a3 {
    bottom: 10%;
    left: 30%;
    animation-delay: 2s;
    width: 50px;
    height: 50px;
}

.a4 {
    top: 30%;
    right: 30%;
    animation-delay: 3s;
    width: 70px;
    height: 70px;
    z-index: 1;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

/* --- Stats Section --- */
.stats-section {
    padding: 60px 0;
    border-bottom: 1px solid var(--surface-border);
    background: #fff;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-card h3 {
    font-size: 3rem;
    font-weight: 700;
    color: var(--google-blue);
    margin-bottom: 0.5rem;
    line-height: 1;
}

.stat-card span {
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 1px;
}

/* --- Map Section --- */
.map-section {
    padding: 100px 0;
    background: var(--map-bg);
    position: relative;
}

.map-container {
    position: relative;
    max-width: 1000px;
    margin: 60px auto 0;
    height: 500px;
    /* Placeholder height */
}

.world-map {
    width: 100%;
    height: 100%;
    background: url('../assets/images/world_map_placeholder.svg') no-repeat center center/contain;
    /* Styles for pulsing dots */
    position: relative;
}

/* If real SVG is missing, use a radial placeholder */
.world-map:empty {
    background: radial-gradient(circle, #e8eaed 2px, transparent 2.5px);
    background-size: 20px 20px;
    opacity: 0.5;
}

.map-dot {
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--google-blue);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 0 0 rgba(66, 133, 244, 0.7);
    animation: pulse-blue 2s infinite;
}

.map-dot.red {
    background: var(--google-red);
    animation: pulse-red 2s infinite;
}

.map-dot.green {
    background: var(--google-green);
    animation: pulse-green 2s infinite;
}

@keyframes pulse-blue {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(66, 133, 244, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 20px rgba(66, 133, 244, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(66, 133, 244, 0);
    }
}

/* Live Feed Overlay */
.live-feed-card {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 12px;
    width: 300px;
    box-shadow: var(--shadow-3);
    text-align: left;
    border: 1px solid var(--surface-border);
}

.live-feed-card h4 {
    font-size: 0.9rem;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.live-indicator {
    width: 8px;
    height: 8px;
    background: var(--google-red);
    border-radius: 50%;
    display: inline-block;
    animation: blink 1s infinite;
}

@keyframes blink {
    50% {
        opacity: 0.5;
    }
}

.feed-list {
    max-height: 150px;
    overflow: hidden;
    position: relative;
}

.feed-item {
    font-size: 0.85rem;
    margin-bottom: 8px;
    display: flex;
    gap: 8px;
    align-items: flex-start;
    animation: slideInLeft 0.5s ease;
}

.feed-item img {
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

.feed-text {
    color: var(--text-secondary);
}

.feed-text strong {
    color: var(--text-primary);
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* --- Contributors Section --- */
.contributors-section {
    padding: 100px 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

.view-all {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--google-blue);
    font-weight: 500;
    text-decoration: none;
}

.contributors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.contributor-card {
    background: #fff;
    border-radius: 20px;
    padding: 40px 24px;
    text-align: center;
    border: 1px solid var(--surface-border);
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contributor-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-2);
}

.contributor-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
}

.contributor-card.gold {
    border-top: 6px solid var(--gold);
}

.contributor-card.silver {
    border-top: 6px solid var(--silver);
}

.contributor-card.bronze {
    border-top: 6px solid var(--bronze);
}

.badge-icon {
    position: absolute;
    top: 20px;
    right: 20px;
    color: var(--text-tertiary);
}

.contributor-card.gold .badge-icon {
    color: var(--gold);
}

.contributor-card.silver .badge-icon {
    color: var(--silver);
}

.contributor-card.bronze .badge-icon {
    color: var(--bronze);
}

.c-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin-bottom: 1rem;
    object-fit: cover;
}

.c-role {
    font-size: 0.875rem;
    color: var(--google-blue);
    display: block;
    margin-bottom: 0.5rem;
}

.c-bio {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.c-stats {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    font-size: 0.875rem;
    color: var(--text-tertiary);
    font-weight: 500;
}

.c-stats span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* --- Hubs Section --- */
.hubs-section {
    padding: 80px 0 120px;
    background: var(--surface-light);
}

.hubs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.hub-card {
    background: #fff;
    padding: 30px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    color: var(--text-primary);
    border: 1px solid var(--surface-border);
    transition: all 0.3s ease;
}

.hub-card:hover {
    border-color: var(--google-blue);
    background: #f8faff;
}

.hub-icon {
    font-family: 'Material Icons Round';
    font-size: 3rem;
    color: var(--google-blue);
    margin-bottom: 1rem;
}

.hub-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.hub-count {
    font-size: 0.85rem;
    color: var(--text-tertiary);
}

/* Responsive */
@media (max-width: 992px) {
    .hero-container {
        flex-direction: column;
        text-align: center;
        gap: 3rem;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-cta {
        justify-content: center;
    }
}

/* --- Social Connect Section --- */
.social-connect-section {
    padding: 100px 0;
    background: #fff;
}

.social-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
}

.social-card {
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    border: 1px solid var(--surface-border);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.social-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-2);
}

/* Brand Colors (Subtle backgrounds) */
.social-card.linkedin:hover {
    border-color: #0077b5;
    background: #f0f7fb;
}

.social-card.twitter:hover {
    border-color: #000;
    background: #f5f5f5;
}

.social-card.youtube:hover {
    border-color: #ff0000;
    background: #fff0f0;
}

.social-card.instagram:hover {
    border-color: #e1306c;
    background: #fff0f5;
}

.s-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--surface-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.social-card:hover .s-icon {
    background: #fff;
    transform: scale(1.1);
}

.social-card.linkedin .s-icon {
    color: #0077b5;
}

.social-card.twitter .s-icon {
    color: #000;
}

.social-card.youtube .s-icon {
    color: #ff0000;
}

.social-card.instagram .s-icon {
    color: #e1306c;
}

.btn-social {
    margin-top: auto;
    display: inline-block;
    padding: 8px 20px;
    border-radius: 50px;
    background: var(--surface-dim);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.social-card:hover .btn-social {
    background: var(--text-primary);
    /* Defaults to dark, override per brand if needed */
    color: #fff;
}

.social-card.linkedin:hover .btn-social {
    background: #0077b5;
}

.social-card.twitter:hover .btn-social {
    background: #000;
}

.social-card.youtube:hover .btn-social {
    background: #ff0000;
}

.social-card.instagram:hover .btn-social {
    background: #e1306c;
}


/* --- Events Section --- */
.events-section {
    padding: 100px 0;
    background: var(--surface-light);
}

.events-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.event-item {
    background: #fff;
    border-radius: 16px;
    padding: 20px 30px;
    display: flex;
    align-items: center;
    gap: 2rem;
    border: 1px solid var(--surface-border);
    transition: transform 0.2s ease;
}

.event-item:hover {
    transform: translateX(10px);
    border-color: var(--google-blue);
}

.event-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #e8f0fe;
    color: var(--google-blue);
    padding: 10px;
    border-radius: 12px;
    min-width: 70px;
    text-align: center;
}

.d-month {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.d-day {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
}

.event-info {
    flex: 1;
}

.event-info h3 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.event-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

/* --- Newsletter Section --- */
.newsletter-section {
    padding: 100px 0;
    background: #fff;
}

.newsletter-box {
    background: linear-gradient(135deg, #202124 0%, #3c4043 100%);
    border-radius: 24px;
    padding: 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
    gap: 4rem;
}

.nl-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.nl-content p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    max-width: 500px;
}

.nl-form {
    display: flex;
    gap: 1rem;
    flex: 1;
    max-width: 500px;
}

.nl-input {
    flex: 1;
    padding: 16px 24px;
    border-radius: 50px;
    border: none;
    font-size: 1rem;
    outline: none;
}

.nl-input:focus {
    box-shadow: 0 0 0 4px rgba(66, 133, 244, 0.5);
}

@media (max-width: 768px) {
    .event-item {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .newsletter-box {
        flex-direction: column;
        text-align: center;
        padding: 40px 24px;
        gap: 2rem;
    }

    .nl-form {
        flex-direction: column;
        width: 100%;
    }
}

/* SVG Icon overrides */
.s-icon svg {
    width: 32px;
    height: 32px;
}

/* --- Calendar Modal --- */
.calendar-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.calendar-modal-backdrop.active {
    display: flex;
    opacity: 1;
}

.calendar-modal-content {
    background: #fff;
    width: 90%;
    max-width: 800px;
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

.calendar-header {
    padding: 24px;
    background: #fff;
    border-bottom: 1px solid var(--surface-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.calendar-header h2 {
    font-size: 1.5rem;
    margin: 0;
}

.cal-nav {
    display: flex;
    gap: 12px;
    align-items: center;
}

.btn-icon {
    background: transparent;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
    color: var(--text-primary);
}

.btn-icon:hover {
    background: var(--surface-dim);
}

.calendar-body {
    padding: 24px;
    overflow-y: auto;
}

.cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 12px;
    font-size: 0.9rem;
}

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.cal-day {
    aspect-ratio: 1;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.95rem;
    position: relative;
    border: 1px solid transparent;
}

.cal-day:hover:not(.empty) {
    background: var(--surface-light);
}

.cal-day.today {
    background: #e8f0fe;
    color: var(--google-blue);
    font-weight: 700;
}

.cal-day.selected {
    border-color: var(--google-blue);
    background: #f1f3f4;
}

.cal-day.empty {
    cursor: default;
}

/* Event Day Highlight */
.cal-day.has-event {
    background: #e8f0fe;
    color: var(--google-blue);
    font-weight: 700;
    border: 1px solid rgba(66, 133, 244, 0.3);
}

.cal-day.has-event:hover {
    background: #d2e3fc;
    border-color: var(--google-blue);
}

/* --- Event Popup --- */
.event-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: #fff;
    width: 320px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
    z-index: 2001;
    display: none;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.event-popup.active {
    display: block;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.ep-content {
    position: relative;
    padding: 24px;
}

.ep-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
}

.ep-header {
    margin-bottom: 16px;
}

.ep-header h3 {
    margin: 0 0 8px;
    font-size: 1.2rem;
    line-height: 1.3;
}

.ep-date-badge {
    display: inline-block;
    background: var(--google-blue);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.ep-body {
    margin-bottom: 20px;
}

.ep-body p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.ep-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-primary);
}

.ep-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ep-meta .material-icons-round {
    font-size: 18px;
    color: var(--text-tertiary);
}

.ep-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ep-actions .btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}