/* ==========================================================================
   COMMUNITY PAGE STYLES
   ========================================================================== */

/* Global Section Padding for Community */

.community-page .subpage-hero {
    background: linear-gradient(135deg, var(--pastel-lavender) 0%, var(--pastel-white) 100%);
    padding: 60px 0;
    border-bottom: 1px solid var(--color-border);
}

/* DECORATIVE BACKGROUND */
.comm-bg-decor {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.decor-ring {
    position: absolute;
    border: 1px solid rgba(138, 75, 175, 0.08);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.ring-1 {
    width: 600px;
    height: 600px;
    left: 10%;
    animation: orbit 30s linear infinite;
}

.ring-2 {
    width: 800px;
    height: 800px;
    left: 90%;
    animation: orbit 40s linear infinite reverse;
}

.ring-flower {
    position: absolute;
    width: 40px;
    height: 40px;
    object-fit: contain;
    opacity: 0.15;
    animation: spin-flower 8s linear infinite;
}

.rf-1 { top: -20px; left: 50%; }
.rf-2 { bottom: -20px; left: 50%; }
.rf-3 { right: -20px; top: 50%; }

@keyframes orbit {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes spin-flower {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Community Intro */
.community-intro {
    position: relative;
    overflow: hidden;
    padding: 80px 0;
    background: linear-gradient(135deg, var(--pastel-white) 0%, var(--pastel-lavender) 100%);
}
.community-intro-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.intro-text-content h2 {
    font-size: 2.8rem;
    margin-bottom: 2rem;
    line-height: 1.2;
}

.comm-blob-wrapper {
    position: relative;
    padding: 2rem;
}

.blob-accent {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    background: linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-accent-light) 100%);
    top: 0; left: 0;
    z-index: 0;
    animation: blob-morph 15s ease-in-out infinite alternate;
}

.comm-intro-img {
    position: relative;
    z-index: 1;
    width: 100%;
    border-radius: 30px;
    box-shadow: var(--shadow-card);
}

/* Floating Icons */
.floating-icons {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0; left: 0;
    z-index: 2;
    pointer-events: none;
}

.f-icon {
    position: absolute;
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-card);
    color: var(--color-primary);
    font-size: 1.5rem;
    animation: float 4s ease-in-out infinite;
    border: 1px solid var(--color-primary-lighter);
}

.fi-1 { top: 5%; right: 5%; animation-delay: 0s; }
.fi-2 { bottom: 15%; left: -5%; animation-delay: 1s; color: var(--color-secondary); }
.fi-3 { top: 35%; left: -10%; animation-delay: 2.5s; color: var(--color-orange); }
.fi-4 { bottom: 10%; right: -5%; animation-delay: 1.5s; color: var(--color-accent); }

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

/* Ecosystem Section */
.ecosystem-content {
    max-width: 800px;
    margin: 0 auto;
}

.eco-card {
    padding: 3rem;
    border-radius: 30px;
    text-align: center;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--theme-color);
    background: linear-gradient(135deg, var(--pastel-sky) 0%, var(--pastel-mint) 100%);
    transition: var(--transition);
    --theme-color: var(--color-primary);
    --theme-light: var(--pastel-rose);
}

.eco-card-theme {
    --theme-color: var(--pastel-lavender-deep);
    --theme-light: var(--pastel-lavender);
}

.eco-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-card);
}

.eco-card-theme:hover {
    border-color: var(--theme-color);
}

.eco-icon {
    font-size: 3rem;
    color: var(--color-primary);
    margin-bottom: 2rem;
}

.eco-card p {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--color-text);
}

/* Features Grid */
.comm-features {
    background: linear-gradient(135deg, var(--pastel-lemon) 0%, #fffbeb 100%);
    position: relative;
    padding: 80px 0;
}

.comm-features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.comm-feature-item {
    padding: 3rem;
    border-radius: 30px;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--theme-color);
    background: var(--theme-light);
    transition: var(--transition);
    --theme-color: var(--color-primary);
    --theme-light: var(--color-primary-lighter);
}

.feature-events {
    --theme-color: var(--pastel-rose-deep);
    --theme-light: var(--pastel-rose);
}

.feature-discussions {
    --theme-color: var(--pastel-peach-deep);
    --theme-light: var(--pastel-peach);
}

.comm-feature-item:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: var(--shadow-card);
}

.feature-events:hover {
    border-color: var(--theme-color);
}

.feature-discussions:hover {
    border-color: var(--theme-color);
}

.feature-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.feature-icon {
    font-size: 2rem;
    color: var(--theme-color);
    background: white;
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.feature-icon i {
    line-height: 1; /* Eliminates vertical space issues with icons */
}

.feature-list {
    list-style: none;
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 600;
    color: var(--color-primary-dark);
}

.feature-list li i {
    color: var(--theme-color);
}

.discussion-highlight {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--color-primary-lighter);
    border-left: 4px solid var(--color-primary);
    border-radius: 0 15px 15px 0;
    font-style: italic;
}

/* Responsive */
@media (max-width: 992px) {
    .community-intro-grid, .comm-features-grid {
        grid-template-columns: 1fr;
    }
    
    .intro-visual {
        order: -1;
    }
}

@media (max-width: 768px) {
    .intro-text-content h2 {
        font-size: 2.22rem;
    }
    
    .eco-card, .comm-feature-item {
        padding: 2rem 1.5rem;
    }

    .feature-header {
        display: flex;
        flex-direction: row; /* Ensure it stays a row on mobile */
        align-items: center;
        text-align: center;
        justify-content: center;
        gap: 1.25rem;
    }

    .feature-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
        display: flex; /* Ensure flex is active on mobile */
        align-items: center;
        justify-content: center;
    }

    .feature-header h2 {
        font-size: 1.7rem; /* Reduce font size on mobile to fit better */
        margin-bottom: 0;
    }
}
