/* ===========================
   POSTS / FEED
   =========================== */

.posts-feed {
    margin-top: var(--space-5);
}

.post-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: var(--space-4);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.post-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.post-user {
    font-weight: 600;
    font-size: 16px;
}

.post-profile-pic {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.post-media {
    width: 100%;
    max-height: 260px;
    object-fit: cover;
    border-radius: var(--radius);
    margin-top: var(--space-3);
}

.post-caption {
    font-size: 14px;
    color: var(--text-light);
}

.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.like-btn {
    background: var(--accent-soft);
    color: var(--accent-hover);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
}

.like-btn:hover {
    background: var(--accent);
    color: #fff;
}

.liked {
    color: #ff6b6b;
}

/* GRID FOR 4+ MEDIA */
.post-media-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    margin-top: 10px;
}

.post-media-grid img,
.post-media-grid video {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
}

/* SLIDER FOR 1–3 MEDIA */
.post-media-slider {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 320px;
    border-radius: 10px;
}

.post-media-slider .slide {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 100%;
    transition: left 0.3s ease;
}

.post-media-slider .slide.active {
    left: 0;
}

.post-media-slider .slide.prev {
    left: -100%;
}

.post-media-slider img,
.post-media-slider video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.like-btn:active {
    transform: scale(0.9);
}

.liked {
    animation: likedPulse 0.4s ease;
}

@keyframes likedPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.25);
    }

    100% {
        transform: scale(1);
    }
}