/* Import base styles for common elements and fonts */
@import url('../base.css');

/* Community Section Specific Styles */
.community-section {
    position: relative;
    padding: 4rem 0;
    overflow: hidden;
    background-image: url('/assets/site/blog/background-lg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    z-index: 0;
}

.community-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(10, 15, 45, 0.85),
        rgba(10, 15, 45, 0.95)
    );
    z-index: 1;
}

.community-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 255, 0, 0.15); /* Green overlay with reduced opacity */
    z-index: 2;
    pointer-events: none;
}

.community-content-wrapper {
    position: relative;
    z-index: 3;
}

/* Community Grid */
.community-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 columns on desktop */
    gap: 2rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

/* Community Card */
.community-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.community-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 255, 0, 0.15);
    border-color: rgba(0, 255, 0, 0.15);
    background: rgba(255, 255, 255, 0.05);
}

/* Card Header & Image */
.community-card-header {
    position: relative;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    overflow: hidden;
}

.community-card-image-link {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.community-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.community-card:hover .community-card-image {
    transform: scale(1.05);
}

/* Category Badge */
.community-card-category {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 255, 0, 0.15);
    color: #fff;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(0, 255, 0, 0.25);
}

/* Card Content */
.community-card-content {
    padding: 1.5rem;
}

/* Meta Info */
.community-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

.community-card-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.community-card-author-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.community-card-author-name {
    color: rgba(255, 255, 255, 0.8);
}

.community-card-date {
    color: rgba(255, 255, 255, 0.6);
}

/* Title */
.community-card-title {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 1rem 0;
    line-height: 1.4;
}

.community-card-title a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.community-card-title a:hover {
    color: var(--cryptids-green, #00ff00);
}

/* Description */
.community-card-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Read More Button */
.community-card-read-more {
    color: var(--cryptids-green, #00ff00);
    font-family: 'Gameria', sans-serif;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(0, 255, 0, 0.2);
    border-radius: 20px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.community-card-read-more:hover {
    background: rgba(0, 255, 0, 0.1);
    border-color: rgba(0, 255, 0, 0.3);
    padding-right: 1.25rem;
    color: #fff;
}

.community-card-read-more-icon {
    transition: transform 0.3s ease;
}

.community-card-read-more:hover .community-card-read-more-icon {
    transform: translateX(3px);
}

/* Responsive Grid Adjustments */
@media (max-width: 1400px) {
    .community-grid {
        grid-template-columns: repeat(3, 1fr); /* 3 columns on smaller desktop */
    }
}

@media (max-width: 1200px) {
    .community-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columns on tablet landscape */
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .community-section {
        padding: 3rem 0;
    }

    .community-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columns on tablet */
        gap: 1.25rem;
    }

    .community-card-title {
        font-size: 1.2rem;
    }
}

@media (max-width: 576px) {
    .community-section {
        padding: 2rem 0;
    }

    .community-grid {
        grid-template-columns: 1fr; /* 1 column on mobile */
        gap: 1rem;
    }
}
