/* Post grid (2 columns on desktop) */
.wrap {
    max-width: 1200px;
    margin: 60px auto 0;
    padding: 16px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

/* Post card */
.post {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
    border: 1px solid #e4e6eb;
    padding-bottom: 20px;
}

.head {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 12px 16px 0;
    margin-top: 20px;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    background: #dfe3ee;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.meta {
    display: flex;
    flex-direction: column;
}

.name {
    font-weight: 600;
}

.sub {
    color: #65676b;
    font-size: 13px;
}

.text {
    padding: 8px 16px 10px;
    font-size: 15px;
}

/* Image grids */
.media {
    padding: 0 16px;
}

.media-grid {
    display: grid;
    gap: 2px;
    border-top: 1px solid #e4e6eb;
    overflow: hidden;
    border-radius: 0 0 12px 12px;
}

.media-grid .item {
    position: relative;
    background: #f1f3f5;
    display: block;
    cursor: pointer;
}

.media-grid .item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 2x2 preview grid */
.media-grid.count-4 {
    grid-template-columns: 1fr 1fr;
}

.media-grid.count-4 .item {
    aspect-ratio: 1 / 1;
}

/* +N overlay (blurry) */
.more {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 26px;
    color: #fff;
    background: rgba(0,0,0,.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.75);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
    z-index: 1000;
}

.lightbox:target {
    opacity: 1;
    pointer-events: auto;
}

.lb-panel {
    max-width: 1000px;
    width: 100%;
    max-height: 90vh;
    overflow: auto;
    background: #111;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0,0,0,.5);
}

.lb-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    color: #e5e7eb;
    position: sticky;
    top: 0;
    background: #111;
    border-bottom: 1px solid rgba(255,255,255,.15);
}

.lb-title {
    font-weight: 700;
}

.lb-close {
    color: #e5e7eb;
    text-decoration: none;
    font-weight: 700;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,.25);
}

.lb-grid {
    display: grid;
    gap: 6px;
    padding: 12px;
}

.lb-grid {
    grid-template-columns: 1fr;
}

.lb-grid img {
    width: 100%;
    display: block;
    border-radius: 10px;
    background: #222;
}


/* -----------------------------------------------------
   PAGINATION (Previous / Next Only)
----------------------------------------------------- */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 40px 0; /* spacing above and below pagination */
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid #e4e6eb;
    color: #111;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.25s ease;
}

/* Hover animation */
.page-btn:hover {
    background: #f5f6f7;
    transform: translateY(-2px);
}

/* Primary button (Next) */
.page-btn.primary {
    background: linear-gradient(90deg, #6076ED 0%, #0020CB 50%, #0019A2 90%, #0D249E 100%);   /* Face to Face blue tone */
    border-color: #0866ff;
    color: #fff;
}

/* Disabled state */
.page-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f2f2f2;
    border-color: #e0e0e0;
    color: #999;
    box-shadow: none;
    transform: none;
}

/* ----------------------------------
   MEDIA QUERIES (all at the end)
----------------------------------- */
@media (min-width: 800px) {
    .wrap {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 560px) {
    .lb-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 900px) {
    .lb-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
