/* ==========================================================================
   communities.css  –  European Awami League  –  Community News page styles
   ========================================================================== */

/* --------------------------------------------------------------------------
   Page heading
   -------------------------------------------------------------------------- */
.communities-header {
    text-align: center;
    margin-bottom: 40px;
}

.communities-header h1 {
    color: #006633;
    font-size: 2em;
    margin-bottom: 10px;
}

.communities-header p {
    color: #666;
    font-size: 1.1em;
}

/* --------------------------------------------------------------------------
   Filter bar
   -------------------------------------------------------------------------- */
.filter-wrapper {
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    padding: 5px 20px;
}

.filter-header {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.filter-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

/* Horizontally scrollable pill row */
.country-filter {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 8px;
    padding: 10px 5px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;          /* Firefox */
    white-space: nowrap;
    scroll-behavior: smooth;
    flex: 1;
}

.country-filter::-webkit-scrollbar          { height: 4px; }
.country-filter::-webkit-scrollbar-track   { background: #f1f1f1; border-radius: 10px; }
.country-filter::-webkit-scrollbar-thumb   { background: #006633; border-radius: 10px; }
.country-filter::-webkit-scrollbar-thumb:hover { background: #ff9933; }

/* Scroll arrow buttons */
.scroll-btn {
    background: #006633;
    color: #fff;
    border: none;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease, transform 0.15s ease;
    flex-shrink: 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    border-radius: 25%;
}

.scroll-btn:hover  { background: #ff9933; transform: scale(1.05); }
.scroll-btn:active { transform: scale(0.95); }

/* Filter pill buttons */
.filter-btn {
    background: #f0f0f0;
    border: none;
    padding: 6px 16px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.85em;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 0.3s ease, color 0.3s ease, transform 0.2s ease;
}

.filter-btn:hover {
    background: #ff9933;
    color: #fff;
    transform: translateY(-2px);
}

.filter-btn.active {
    background: #006633;
    color: #fff;
    box-shadow: 0 2px 5px rgba(0, 102, 51, 0.3);
}

/* --------------------------------------------------------------------------
   Post list
   -------------------------------------------------------------------------- */
.community-list {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.community-item {
    margin-bottom: 30px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.community-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.community-row {
    display: flex;
    flex-wrap: wrap;
}

/* Image column */
.community-image-col {
    flex: 0 0 280px;
    background: linear-gradient(135deg, #006633, #008844);
    display: flex;
    align-items: center;
    justify-content: center;
}

.community-image-col img {
    width: 100%;
    height: 220px;
    display: block;
}

/* Icon column (no-image fallback) */
.community-icon-col {
    flex: 0 0 280px;
    /* background: linear-gradient(135deg, #006633, #008844);*/
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4em;
    color: #fff;
    min-height: 160px;
}

/* Text column */
.community-content-col {
    flex: 1;
    padding: 20px 25px;
}

/* Country badge */
.community-country-badge {
    display: inline-block;
    background: #ff9933;
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.7em;
    margin-bottom: 12px;
    font-weight: 500;
}

/* Post title */
.community-content-col h3 {
    margin: 0 0 8px;
    font-size: 1.3em;
}

.community-content-col h3 a {
    color: #333;
    text-decoration: none;
}

.community-content-col h3 a:hover { color: #ff9933; }

/* Meta line (date, city) */
.community-meta {
    display: flex;
    gap: 15px;
    font-size: 0.75em;
    color: #888;
    margin-bottom: 12px;
}

/* Excerpt */
.community-content-col p {
    color: #555;
    font-size: 0.9em;
    line-height: 1.6;
    margin-bottom: 15px;
}

/* Read-more link */
.read-more {
    color: #ff9933;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.85em;
    display: inline-block;
}

.read-more:hover { text-decoration: underline; }

/* --------------------------------------------------------------------------
   Empty / no-results states
   -------------------------------------------------------------------------- */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: #f9f9f9;
    border-radius: 12px;
    color: #666;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .filter-wrapper {
        padding: 8px 15px;
        border-radius: 10px;
    }

    .filter-header { gap: 10px; }

    .scroll-btn {
        width: 28px;
        height: 28px;
        font-size: 18px;
    }

    .filter-btn {
        padding: 5px 12px;
        font-size: 0.8em;
    }

    .country-filter { gap: 6px; }

    .community-image-col,
    .community-icon-col {
        flex: 0 0 100%;
        max-height: 200px;
    }

    .community-content-col { flex: 0 0 100%; }

    .community-row { flex-direction: column; }
}

/* Hide scroll buttons on touch-only devices (finger-swipe is enough) */
@media (hover: none) and (pointer: coarse) {
    .scroll-btn { display: none !important; }
    .country-filter { padding: 10px 5px; }
}
