/* =========================
   PAGE
========================= */
.community-page {
    background: #f5f6fa;
}

/* =========================
   LAYOUT
========================= */
.community-section {
    width: 100%;
    padding: 25px 0 40px;
}

.community-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 20px 0;
}

/* =========================
   TITLE
========================= */
.page-title {
    text-align: center;
    font-size: 34px;
    margin: 10px 0 5px;
}

.page-subtitle {
    text-align: center;
    color: #777;
    margin-bottom: 20px;
}

.community-topbar {
    display: flex;
    justify-content: flex-end;
    margin-top: -27px;
    margin-bottom: -17px;
}

.subscribe-btn {
    background: #d52b1e;
    color: #fff;
    text-decoration: none;
    padding: 10px 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    transition: all 0.2s ease;
    box-shadow: 0 6px 18px rgba(213,43,30,0.18);
    border: 1px solid rgba(255,255,255,0.15);
}

.subscribe-btn:hover {
    background: #b92318;
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(213,43,30,0.28);
}

/* =========================
   FILTER BAR
========================= */
.community-filter-bar {
    display: flex;
    justify-content: center;
    margin: 30px 0 40px;
}

.community-filter-bar form {
    display: flex;
    gap: 10px;
    align-items: center;
    background: #fff;
    padding: 12px;
    border-radius: 16px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.08);
    max-width: 900px;
    width: 100%;
}

.community-filter-bar input {
    flex: 2;
    padding: 12px 14px;
    border: 1px solid #eee;
    border-radius: 12px;
    font-size: 14px;
    outline: none;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.community-filter-bar input:focus {
    border-color: #111;
    box-shadow: 0 0 0 3px rgba(0,0,0,0.05);
}

.community-filter-bar select {
    flex: 1;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid #eee;
    font-size: 14px;
    background: #fff;
    outline: none;
}

.community-filter-bar button {
    padding: 12px 16px;
    background: #111;
    color: #fff;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
}

.community-filter-bar button:hover {
    background: #333;
    transform: translateY(-1px);
}

.reset-btn {
    padding: 12px 14px;
    background: #f2f2f2;
    border-radius: 12px;
    text-decoration: none;
    color: #111;
    transition: all 0.2s ease;
    font-weight: 500;
}

.reset-btn:hover {
    background: #e6e6e6;
}

/* =========================
   GRID
========================= */
.community-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 25px;
}

/* =========================
   CARD
========================= */
.community-card {
    position: relative;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 6px 16px rgba(0,0,0,0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.community-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(0,0,0,0.10);
}

/* =========================
   FEATURED CARD
========================= */
.featured-card {
    position: relative;
    transform: scale(1.02);
    box-shadow: 0 18px 40px rgba(0,0,0,0.10);
    overflow: hidden;
    background: linear-gradient(180deg, #ffffff 0%, #f9f9ff 100%);
}

.featured-card:hover {
    transform: scale(1.03);
}

/* Top accent bar */
.featured-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    height: 4px;
    width: 100%;
    background: linear-gradient(90deg, #ffcc70, #ff6b6b, #6b5bff);
}

/* Featured badge */
.featured-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #111;
    color: #fff;
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 20px;
    z-index: 5;
    font-weight: 600;
}

/* =========================
   IMAGE
========================= */
.community-image img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.no-image {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eee;
    color: #777;
    font-size: 14px;
}

/* =========================
   CONTENT
========================= */
.community-content {
    padding: 16px;
}

.community-content h2 {
    font-size: 18px;
    margin-bottom: 10px;
    line-height: 1.4;
}

/* =========================
   META
========================= */
.meta {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.meta span {
    font-size: 12px;
    padding: 5px 10px;
    border-radius: 20px;
    background: #f1f1f1;
    font-weight: 500;
}

.meta-city {
    background: #e8f0fe;
}

.meta-category {
    background: #fce8e6;
}

/* =========================
   DESCRIPTION
========================= */
.community-content p {
    font-size: 14px;
    color: #444;
    line-height: 1.6;
}

/* =========================
   CONTACT
========================= */
.community-contact {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 13px;
}

.contact-item {
    display: flex;
    flex-direction: column;
    padding: 8px 0;
    border-top: 1px solid rgba(0,0,0,0.06);
}

/* LABEL */
.contact-item .label {
    color: #888;
    font-size: 12px;
    text-align: left;
    font-weight: 500;
}

/* VALUE */
.contact-item a,
.contact-item span {
    display: block;
    text-align: right;
    font-size: 14px;
    color: #111;
    margin-top: 2px;
    word-break: break-word;
}

.contact-item a {
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.contact-item a:hover {
    opacity: 0.7;
}

/* =========================
   PAGINATION
========================= */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 50px 0 20px;
    padding: 0 10px;
}

.pagination a,
.pagination span {
    min-width: 44px;
    height: 44px;
    padding: 0 14px;
    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 12px;

    font-size: 14px;
    font-weight: 600;
    text-decoration: none;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        transform 0.15s ease,
        box-shadow 0.2s ease;

    user-select: none;
}

/* Default page buttons */
.pagination a {
    background: #fff;
    color: #222;
    border: 1px solid rgba(0,0,0,0.08);

    box-shadow:
        0 2px 6px rgba(0,0,0,0.04),
        0 8px 20px rgba(0,0,0,0.03);
}

/* Hover */
.pagination a:hover {
    background: #111;
    color: #fff;
    transform: translateY(-2px);

    box-shadow:
        0 8px 20px rgba(0,0,0,0.10);
}

/* Active/current page */
.pagination a.active {
    background: #111;
    color: #fff;
    border-color: #111;

    box-shadow:
        0 10px 22px rgba(0,0,0,0.18);
}

/* Prev / Next */
.pagination a:first-child,
.pagination a:last-child {
    padding: 0 18px;
    font-weight: 700;
}

/* Dots */
.pagination .dots {
    background: transparent;
    border: none;
    box-shadow: none;
    min-width: auto;
    padding: 0 2px;
    color: #888;
    pointer-events: none;
}

/* =========================
   MOBILE
========================= */
@media (max-width: 768px) {

    .community-wrapper {
        padding: 10px 14px 0;
    }

    .community-topbar {
        justify-content: center;
        margin-top: 0;
        margin-bottom: 15px;
    }

    .page-title {
        font-size: 28px;
    }

    .community-filter-bar form {
        flex-direction: column;
        align-items: stretch;
    }

    .community-filter-bar input,
    .community-filter-bar select,
    .community-filter-bar button,
    .reset-btn {
        width: 100%;
    }

    .community-grid {
        gap: 18px;
    }

    .community-card {
        border-radius: 14px;
    }

    .pagination {
        gap: 8px;
        margin-top: 40px;
    }

    .pagination a,
    .pagination span {
        min-width: 40px;
        height: 40px;
        font-size: 13px;
        border-radius: 10px;
    }

    .pagination a:first-child,
    .pagination a:last-child {
        padding: 0 14px;
    }
}