/* ==========================================================================
   Craft Community Page Styles
   Created: 2026-01-03
   Updated: 2026-01-03 (Modern UIX Match)
   ========================================================================== */

/* Modern Community Header Styling - Teal/Emerald Gradient */
.community-header-section {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    padding: 12px 0;
    margin-top: 10px;
    position: relative;
    overflow: hidden;
}

.community-header-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.community-header-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.community-header {
    position: relative;
    z-index: 1;
}

.community-title {
    font-size: 1.5rem;
    font-weight: 700;
    font-style: normal;
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    margin-bottom: 5px;
    letter-spacing: -0.5px;
}

.community-subtitle {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    margin: 0 auto 8px;
    line-height: 1.4;
}

.header-decoration {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.decoration-line {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    border-radius: 2px;
}

.decoration-icon {
    font-size: 1.2rem;
    color: #ffffff;
    animation: community-bounce 2s ease-in-out infinite;
}

@keyframes community-bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

/* ==========================================================================
   MODERN COMMUNITY POST CARDS (Matched to Deal Cards)
   ========================================================================== */

.community-post-card {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.community-post-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(17, 153, 142, 0.2);
}

/* Image Container */
.community-post-card .card-img-wrapper {
    position: relative;
    overflow: hidden;
    height: 200px;
    background-color: #f8f9fa;
}

.community-post-card .card-img-top {
    height: 100%;
    width: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.community-post-card:hover .card-img-top {
    transform: scale(1.08);
}

/* Image Overlay on Hover */
.community-post-card .card-img-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, 0.4) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.community-post-card:hover .card-img-wrapper::after {
    opacity: 1;
}

/* No Image Placeholder */
.community-no-image {
    height: 200px;
    background: linear-gradient(135deg, #e0f7fa, #b2ebf2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.community-no-image i {
    font-size: 3rem;
    color: #80deea;
}

/* Badges */
.post-badge-type {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(255, 255, 255, 0.95);
    color: #1a1a2e;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    z-index: 2;
    backdrop-filter: blur(5px);
}

.post-badge-featured {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
    color: #1a1a2e;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(253, 160, 133, 0.4);
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Card Body */
.community-post-card .card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* Author Section */
.post-author {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.post-author img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-right: 10px;
}

.post-author-info {
    display: flex;
    flex-direction: column;
}

.post-author-name {
    font-weight: 700;
    font-size: 0.9rem;
    color: #2d3748;
}

.post-date {
    font-size: 0.75rem;
    color: #a0aec0;
}

.community-post-card .card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 8px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.community-post-card .card-text {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 15px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Tags */
.post-tags {
    margin-bottom: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.post-tag-badge {
    background-color: #f7fafc;
    color: #718096;
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 500;
    transition: all 0.2s;
}

.post-tag-badge:hover {
    background-color: #edf2f7;
    color: #4a5568;
}

/* Stats Row */
.post-stats {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #f1f5f9;
    margin-bottom: 15px;
}

.post-stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: #718096;
    cursor: pointer;
    transition: color 0.2s;
}

.post-stat-item:hover {
    color: #11998e;
}

.post-stat-item.active {
    color: #e53e3e;
}

.post-stat-item i {
    font-size: 1rem;
}

/* Action Button */
.btn-view-post {
    background: linear-gradient(135deg, #11998e, #38ef7d);
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(17, 153, 142, 0.3);
    display: block;
    width: 100%;
}

.btn-view-post:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(17, 153, 142, 0.4);
    color: white;
}

/* Community Stats Section (Existing) */
.community-stats-section {
    padding: 25px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin: 20px 0;
    margin-top: 40px;
}

.stats-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.stats-header {
    text-align: center;
    margin-bottom: 20px;
}

.stats-badge {
    display: inline-block;
    background: linear-gradient(135deg, #11998e, #38ef7d);
    color: white;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.stats-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2d3748;
    margin: 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    text-align: center;
    padding: 15px 10px;
    background: linear-gradient(145deg, #f8fafc, #edf2f7);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    font-size: 1rem;
    color: white;
}

.members-icon {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.posts-icon {
    background: linear-gradient(135deg, #11998e, #38ef7d);
}

.comments-icon {
    background: linear-gradient(135deg, #f093fb, #f5576c);
}

.likes-icon {
    background: linear-gradient(135deg, #fa709a, #fee140);
}

.stat-value {
    font-size: 1.4rem;
    font-weight: 800;
    color: #2d3748;
    line-height: 1.2;
}

.stat-label {
    font-size: 0.7rem;
    color: #718096;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

.stats-cta {
    text-align: center;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #11998e, #38ef7d);
    color: white;
    padding: 10px 24px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(17, 153, 142, 0.3);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(17, 153, 142, 0.4);
    color: white;
}

.cta-button i {
    font-size: 0.8rem;
}

/* Responsive */
@media (max-width: 768px) {
    .community-title {
        font-size: 1.3rem;
    }

    .community-post-card .card-img-wrapper,
    .community-no-image {
        height: 180px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}