.posts-section .label {
    margin-bottom: 28px;
}

.posts-section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 28px;
}

.posts-section-head .label {
    margin-bottom: 0;
}

.post-sort {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.post-sort-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 14px;
    border: 1px solid var(--border-strong);
    color: var(--muted);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.post-sort-link:hover {
    color: var(--text);
    border-color: var(--gold);
}

.post-sort-link-active {
    border-color: var(--gold);
    color: var(--gold);
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1px;
    background: var(--border);
}

.post-card {
    background: var(--bg-2);
    padding: 28px;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: background 0.2s;
}

.post-card-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gold);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.post-card:hover {
    background: rgba(212, 160, 23, 0.03);
}

.post-card:hover .post-card-bar {
    transform: scaleX(1);
}

.post-card-date {
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--gold);
    opacity: 0.7;
}

.post-card-title {
    font-family: var(--font-head);
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--text);
    line-height: 1.05;
}

.post-card-desc {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.8;
    font-weight: 300;
}

.post-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 40px;
}

.post-pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid var(--border-strong);
    color: var(--muted);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 12px;
    transition: border-color 0.2s, color 0.2s;
}

.post-pagination-link:hover {
    color: var(--text);
    border-color: var(--gold);
}

.post-pagination-link-active {
    border-color: var(--gold);
    color: var(--gold);
}

.post-detail-hero .post-detail-date {
    display: block;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gold);
    opacity: 0.75;
    margin-top: -8px;
    margin-bottom: 4px;
}

.post-detail-media {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 2px;
}

.post-detail-media img,
.post-detail-media video {
    width: 100%;
    height: 100%;
    max-height: 520px;
    object-fit: cover;
    display: block;
}

.media-lightbox-trigger {
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
    border: 0;
    background: none;
    cursor: zoom-in;
    font: inherit;
}

body.lightbox-open {
    overflow: hidden;
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: rgba(7, 7, 6, 0.94);
}

.lightbox[hidden] {
    display: none;
}

.lightbox-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border: 1px solid var(--border-strong);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 24px;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border-strong);
    background: var(--bg-2);
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: border-color 0.18s ease, color 0.18s ease;
}

.lightbox-close:hover {
    border-color: var(--gold);
    color: var(--gold);
}

@media (max-width: 600px) {
    .lightbox {
        padding: 16px;
    }

    .lightbox-close {
        top: 12px;
        right: 12px;
    }
}

.post-detail-back {
    margin-top: 32px;
}

.post-detail-back a {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gold);
    text-decoration: none;
    border-bottom: 1px solid rgba(212, 160, 23, 0.25);
    transition: border-color 0.18s ease;
}

.post-detail-back a:hover {
    border-color: var(--gold);
}

@media (max-width: 760px) {
    .post-grid {
        grid-template-columns: 1fr;
    }

    .post-detail-media {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .post-card {
        padding: 22px;
    }

    .post-card-title {
        font-size: 19px;
    }
}
