/* Masonry Grid (Flexbox) */
.masonry-grid {
    display: flex;
    gap: 16px;
    padding: 10px 0;
}

/* Columns */
.masonry-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 1;
    min-width: 0;
}

/* Responsive */
@media (max-width: 1400px) {
    /* JS handles column count, CSS handles styling */
}

@media (max-width: 992px) {}

@media (max-width: 576px) {}

/* Card */
.masonry-item {
    width: 100%;
}

/* IMAGE WRAPPER */
.img-wrap {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #fff;
    display: block;
    min-height: 100px;
    /* Prevent collapse */
}

.img-ratio {
    position: relative;
    width: 100%;
}

.img-wrap img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;

    opacity: 0;
    filter: blur(14px);
    transform: scale(1.08);

    transition:
        opacity .45s ease,
        filter .45s ease,
        transform .45s ease;
}

/* PLACEHOLDER (while loading) */
.img-placeholder {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,
            #f0f0f0 25%,
            #e6e6e6 37%,
            #f0f0f0 63%);
    background-size: 400% 100%;
    animation: shimmer 1.4s infinite;
}


/* IMAGE LOADED STATE */
.img-wrap img.img-loaded {
    opacity: 1;
    filter: blur(0);
    transform: scale(1);
}

/* SHIMMER ANIMATION */
@keyframes shimmer {
    0% {
        background-position: 100% 0;
    }

    100% {
        background-position: -100% 0;
    }
}

.skeleton {
    background: linear-gradient(90deg,
            #f0f0f0 25%,
            #e6e6e6 37%,
            #f0f0f0 63%);
    background-size: 400% 100%;
    animation: shimmer 1.4s infinite;
}

.customs-card {
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: transform .3s cubic-bezier(0.2, 0, 0.2, 1), box-shadow .3s ease;
    max-height: 615px !important;
    /* CARD ka max-height */
    display: flex;
    flex-direction: column;
}

/* Max height for cards on large screens */
@media (min-width: 992px) {
    .img-wrap {
        overflow: hidden;
    }

    .img-wrap img {
        object-fit: cover;
        width: 100%;
    }
}

/* Apply to all screens if needed */
.img-wrap {
    flex: 1;
    /* Image area ko flexible banao */
    overflow: hidden;
}

.img-wrap img {
    object-fit: cover;
    height: 100%;
}

.customs-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

.customs-card img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform .5s ease;
}

.customs-card:hover .img-wrap img {
    transform: scale(1.05);
}

.card-post-title {
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
    line-height: 1.4;
    transition: color 0.2s ease;
}


.author-avatar {
    border: 1px solid rgba(0, 0, 0, 0.05);
    background: #fff;
}

/* Hover Icons Styling */
.card-hover-icons {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(10px);
    transition: all 0.3s ease;
    z-index: 10;
}

.customs-card:hover .card-hover-icons {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(0);
}

.icon-box {
    transition: all 0.2s ease;
}

.icon-box:hover {
    background-color: var(--lavender) !important;
}

.icon-box:hover i {
    color: white !important;
}

/* Ad Card Custom Styling */
.ad-card {
    border: 2px dashed rgba(0, 0, 0, 0.08) !important;
    background-color: #fff !important;
}

.ad-badge span {
    color: #64748b;
    border-color: #e2e8f0 !important;
    font-size: 10px;
    background: #fff;
}


/* masonry fix */
.masonry-item,
.skeleton-item {
    width: 100%;
}

/* skeleton animation */
.skeleton {
    background: linear-gradient(90deg,
            #f0f0f0 25%,
            #e6e6e6 37%,
            #f0f0f0 63%);
    background-size: 400% 100%;
    animation: shimmer 3.2s ease infinite;
    border-radius: 8px;
}

@keyframes shimmer {
    0% {
        background-position: 100% 0
    }

    100% {
        background-position: -100% 0
    }
}

.skeleton-img {
    width: 100%;
}

.skeleton-title {
    height: 14px;
    width: 80%;
}

.skeleton-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
}

.skeleton-name {
    height: 12px;
    width: 80px;
}

.skeleton-views {
    height: 12px;
    width: 40px;
}

.skeleton {
    opacity: 0.85;
}

/* ===== Card Title Hover Overlay ===== */
.card-title-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 36px 14px 14px;
    background: linear-gradient(to top, rgba(0,0,0,0.72) 0%, transparent 100%);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.28s ease, transform 0.28s ease;
    pointer-events: none;
    
}

.customs-card:hover .card-title-overlay {
    opacity: 1;
    transform: translateY(0);
}

.card-title-overlay-text {
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

/* ===== Designer Profile Cards ===== */
.designer-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.designer-profile-card {
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.06) !important;
}

.designer-profile-card:hover {
    border-color: rgba(0,0,0,0.12) !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.04);
}

.project-gallery .gallery-item {
    background: #f8fafc;
    border: 1px solid rgba(0,0,0,0.04);
}

.hover-scale {
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.gallery-item:hover .hover-scale {
    transform: scale(1.08);
}

.follow-btn {
    transition: all 0.2s ease;
}

.follow-btn:active {
    transform: scale(0.95);
}

.dot {
    width: 3px;
    height: 3px;
    background: #cbd5e1;
    border-radius: 50%;
    display: inline-block;
}

.text-pink {
    color: #e83e8c;
}

.hover-bg-neutral-50:hover {
    background-color: #f8fafc;
}

@media (max-width: 768px) {
    .project-gallery {
        flex-wrap: wrap;
    }
    .project-gallery .gallery-item {
        flex: 0 0 calc(33.333% - 8px);
    }
    .designer-profile-card {
        padding: 16px !important;
    }
}
