:root {
    --main-color: rgba(183, 144, 36, 1);
    --secondary-color: rgba(41, 45, 100, 1);
}

.posts-page {
    background: #f8f9fb;
    padding: 80px 0;
}

.post-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: all 0.3s ease;
    margin-bottom: 30px;
    height: 100%;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.post-card__img {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.post-card--event .post-card__img {
    height: auto;
    aspect-ratio: 4 / 5;
}

.post-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.post-card:hover .post-card__img img {
    transform: scale(1.05);
}

.post-card__date {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--main-color);
    color: #fff;
    padding: 10px 15px;
    border-radius: 10px;
    text-align: center;
}

.post-card__date-day {
    font-size: 24px;
    font-weight: 800;
    line-height: 1;
}

.post-card__date-month {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.post-card__content {
    padding: 25px;
}

.post-card__meta {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.post-card__meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #6b7280;
    font-size: 13px;
}

.post-card__meta-item i {
    color: var(--main-color);
}

.post-card__title {
    font-size: 20px;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    /* Standard property for compatibility */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card__title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.post-card__title a:hover {
    color: var(--main-color);
}

.post-card__excerpt {
    color: #6b7280;
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    /* Standard property for compatibility */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--main-color);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: gap 0.3s ease;
}

.post-card__link:hover {
    gap: 12px;
    color: var(--secondary-color);
}

.no-posts {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.06);
}

.no-posts__icon {
    font-size: 64px;
    color: #d1d5db;
    margin-bottom: 20px;
}

.no-posts__title {
    font-size: 24px;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.no-posts__desc {
    color: #6b7280;
    font-size: 16px;
}

/* Pagination */
.pagination-wrapper {
    margin-top: 50px;
    display: flex;
    justify-content: center;
}

.pagination-wrapper .pagination {
    gap: 8px;
}

.pagination-wrapper .page-link {
    border: none;
    border-radius: 10px;
    padding: 12px 18px;
    color: var(--secondary-color);
    font-weight: 600;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.pagination-wrapper .page-item.active .page-link {
    background: var(--main-color);
    color: #fff;
}

.pagination-wrapper .page-link:hover {
    background: var(--main-color);
    color: #fff;
}

/* Sidebar */
.sidebar-widget {
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.06);
    margin-bottom: 30px;
}

.sidebar-widget__title {
    font-size: 20px;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f1f5f9;
    position: relative;
}

.sidebar-widget__title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: 0;
    width: 50px;
    height: 2px;
    background: var(--main-color);
}

.type-filter__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.type-filter__item {
    margin-bottom: 8px;
}

.type-filter__link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    border-radius: 10px;
    color: #4b5563;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.type-filter__link:hover,
.type-filter__link.active {
    background: rgba(183, 144, 36, 0.1);
    color: var(--main-color);
}

.type-filter__link i {
    width: 20px;
    color: var(--main-color);
}

.type-filter__count {
    margin-right: auto;
    background: #f1f5f9;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.recent-posts__item {
    display: flex;
    gap: 15px;
    padding-bottom: 15px;
    margin-bottom: 15px;
    border-bottom: 1px solid #f1f5f9;
}

.recent-posts__item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.recent-posts__img {
    width: 80px;
    height: 70px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
}

.recent-posts__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recent-posts__content {
    flex: 1;
}

.recent-posts__title {
    font-size: 14px;
    font-weight: 600;
    color: var(--secondary-color);
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    /* Standard property for compatibility */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.recent-posts__title a {
    color: inherit;
    text-decoration: none;
}

.recent-posts__title a:hover {
    color: var(--main-color);
}

.recent-posts__date {
    font-size: 12px;
    color: #9ca3af;
}

/* Loading state */
.posts-loading {
    display: none;
    text-align: center;
    padding: 40px;
}

.posts-loading.active {
    display: block;
}

.posts-loading__spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f1f5f9;
    border-top-color: var(--main-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.posts-grid {
    min-height: 200px;
    transition: opacity 0.3s ease;
}

.posts-grid.loading {
    opacity: 0.5;
    pointer-events: none;
}

/* ============================================================
   POSTS LISTING — Mobile Responsive
   ============================================================ */
@media (max-width: 767px) {

    .posts-page {
        padding: 40px 0;
    }

    /* Post card image height reduction */
    .post-card__img {
        height: 180px;
    }

    /* Post card content padding */
    .post-card__content {
        padding: 16px;
    }

    /* Post card title size */
    .post-card__title {
        font-size: 17px;
    }

    /* Sidebar — reduce padding */
    .sidebar-widget {
        padding: 20px;
    }

    /* Type filter link padding */
    .type-filter__link {
        padding: 10px 12px;
        font-size: 14px;
    }

    /* Pagination */
    .pagination-wrapper .page-link {
        padding: 8px 12px;
        font-size: 13px;
    }
}

@media (max-width: 576px) {
    .post-card__title {
        font-size: 15px;
    }

    .post-card__excerpt {
        font-size: 13px;
    }
}