/* Community Hero */
.community-hero {
    padding: 120px 0 80px;
    background: var(--gradient-primary);
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.community-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/community-pattern.svg');
    background-size: cover;
    opacity: 0.1;
    animation: float 20s ease-in-out infinite;
}

.community-hero .container {
    position: relative;
    z-index: 2;
}

.community-hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
}

.community-hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 40px;
}

.community-stats {
    display: flex;
    justify-content: center;
    gap: 80px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 3rem;
    font-family: var(--font-primary);
    font-weight: 900;
    color: var(--accent-gold);
    margin-bottom: 10px;
}

.stat-label {
    font-size: 1.1rem;
    opacity: 0.8;
}

/* Community Navigation */
.community-nav {
    padding: 30px 0;
    background: var(--deep-blue);
    color: white;
    position: sticky;
    top: 70px;
    z-index: 100;
}

.community-nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-tabs {
    display: flex;
    gap: 30px;
}

.tab-btn {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    padding: 10px 0;
    position: relative;
    transition: all 0.3s ease;
}

.tab-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--accent-gold);
    transition: width 0.3s ease;
}

.tab-btn.active::after,
.tab-btn:hover::after {
    width: 100%;
}

.tab-btn.active {
    color: var(--accent-gold);
}

/* Community Content */
.community-content {
    padding: 60px 0;
    background: var(--warm-beige);
}

.content-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
}

.main-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    min-height: 600px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Post Filters */
.post-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #eee;
}

.filter-select {
    padding: 10px 20px;
    border: 2px solid #ddd;
    border-radius: 25px;
    background: white;
    color: var(--primary-dark);
    font-size: 1rem;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.filter-select:focus {
    outline: none;
    border-color: var(--accent-gold);
}

.search-box {
    display: flex;
    gap: 10px;
}

.search-box input {
    padding: 10px 20px;
    border: 2px solid #ddd;
    border-radius: 25px;
    width: 300px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--accent-gold);
}

.search-box button {
    padding: 10px 20px;
    background: var(--accent-gold);
    border: none;
    border-radius: 25px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-box button:hover {
    background: var(--accent-red);
    transform: scale(1.05);
}

/* Posts List */
.posts-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.post-item {
    background: var(--warm-beige);
    border-radius: 15px;
    padding: 25px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.post-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 15px;
}

.post-author {
    display: flex;
    align-items: center;
    gap: 15px;
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-info h4 {
    color: var(--primary-dark);
    margin-bottom: 5px;
}

.post-meta {
    display: flex;
    gap: 15px;
    font-size: 0.9rem;
    color: #666;
}

.post-category {
    background: var(--accent-teal);
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 700;
}

.post-title {
    color: var(--primary-dark);
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.post-content {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
}

.post-tags {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tag {
    background: rgba(46, 196, 182, 0.2);
    color: var(--accent-teal);
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
}

.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

.post-actions {
    display: flex;
    gap: 20px;
}

.action-btn {
    background: transparent;
    border: none;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.3s ease;
}

.action-btn:hover {
    color: var(--accent-gold);
}

.action-btn.liked {
    color: var(--accent-red);
}

.post-stats {
    display: flex;
    gap: 20px;
    font-size: 0.9rem;
    color: #999;
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.widget {
    background: white;
    border-radius: 20px;
    padding: 30px;
}

.widget h3 {
    color: var(--primary-dark);
    margin-bottom: 20px;
    font-size: 1.3rem;
}

/* Online Members */
.online-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.online-member {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 10px;
    transition: background 0.3s ease;
}

.online-member:hover {
    background: var(--warm-beige);
}

.member-status {
    width: 10px;
    height: 10px;
    background: #4CAF50;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.online-member-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
}

.online-member-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.online-member-name {
    font-weight: 500;
    color: var(--primary-dark);
}

/* Trending Topics */
.topics-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.topic-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.topic-item:last-child {
    border-bottom: none;
}

.topic-name {
    color: var(--primary-dark);
    font-weight: 500;
    cursor: pointer;
    transition: color 0.3s ease;
}

.topic-name:hover {
    color: var(--accent-gold);
}

.topic-count {
    color: #999;
    font-size: 0.9rem;
}

/* Guidelines */
.guidelines ul {
    list-style: none;
}

.guidelines li {
    padding: 10px 0;
    padding-left: 25px;
    position: relative;
    color: #666;
    line-height: 1.5;
}

.guidelines li::before {
    content: '✨';
    position: absolute;
    left: 0;
    color: var(--accent-gold);
}

/* Create Post Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 20px;
    padding: 40px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.modal-header h3 {
    color: var(--primary-dark);
    font-size: 1.5rem;
}

.close-modal {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #999;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: var(--accent-red);
}

.create-post-form .form-group {
    margin-bottom: 20px;
}

.create-post-form input,
.create-post-form select,
.create-post-form textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.create-post-form input:focus,
.create-post-form select:focus,
.create-post-form textarea:focus {
    outline: none;
    border-color: var(--accent-gold);
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
}

/* Questions Tab */
.questions-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.question-item {
    background: var(--warm-beige);
    border-radius: 15px;
    padding: 25px;
    transition: all 0.3s ease;
}

.question-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 15px;
}

.question-status {
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 700;
}

.question-status.answered {
    background: var(--accent-teal);
    color: white;
}

.question-status.unanswered {
    background: #ddd;
    color: #666;
}

.question-title {
    color: var(--primary-dark);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.question-excerpt {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.6;
}

.question-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.answer-count {
    color: var(--accent-teal);
    font-weight: 700;
}

/* Responsive */
@media (max-width: 768px) {
    .content-layout {
        grid-template-columns: 1fr;
    }
    
    .community-nav .container {
        flex-direction: column;
        gap: 20px;
    }
    
    .nav-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 10px;
        width: 100%;
    }
    
    .post-filters {
        flex-direction: column;
        gap: 15px;
    }
    
    .search-box input {
        width: 100%;
    }
    
    .modal-content {
        width: 95%;
        padding: 30px 20px;
    }
    
    .community-stats {
        gap: 40px;
    }
    
    .stat-number {
        font-size: 2rem;
    }
}