/* =====================================================
   Web Portfolio Manager — Frontend Stylesheet
   ===================================================== */

/* ---------- Reset & Wrapper ---------- */
.wpm-portfolio-wrap {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    width: 100%;
    box-sizing: border-box;
}

.wpm-portfolio-wrap *,
.wpm-portfolio-wrap *::before,
.wpm-portfolio-wrap *::after {
    box-sizing: inherit;
}

/* ---------- Grid ---------- */
.wpm-grid {
    display: grid;
    gap: 24px;
    margin: 0 0 40px;
}

.wpm-cols-1 { grid-template-columns: 1fr; }
.wpm-cols-2 { grid-template-columns: repeat(2, 1fr); }
.wpm-cols-3 { grid-template-columns: repeat(3, 1fr); }
.wpm-cols-4 { grid-template-columns: repeat(4, 1fr); }
.wpm-cols-5 { grid-template-columns: repeat(5, 1fr); }
.wpm-cols-6 { grid-template-columns: repeat(6, 1fr); }

/* ---------- Card ---------- */
.wpm-card {
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    transition: box-shadow .25s ease, transform .25s ease;
}

.wpm-card:hover {
    box-shadow: 0 8px 32px rgba(0,0,0,.14);
    transform: translateY(-3px);
}

.wpm-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* ---------- Image Area ---------- */
.wpm-card-image {
    position: relative;
    width: 100%;
    padding-top: 0;          /* 3:2 aspect ratio */
    overflow: hidden;
    background: #f1f5f9;
    height: 400px;
    overflow: hidden;
    border: 1px solid #00000024;
}

.wpm-card-image img {
    /* position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform .4s ease; */
     object-fit: cover;
    width: 100%;
    transform: translateY(0);
    transition: 2s ease-out
}

.wpm-card:hover .wpm-card-image img {
    object-fit: cover;
    width: 100%;
    transform: translateY(calc(-100% + 300px));
    transition: 7s ease-out
}

/* Overlay on hover */
.wpm-card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .25s ease;
    backdrop-filter: blur(2px);
}

.wpm-card:hover .wpm-card-overlay {
    opacity: 1;
}

.wpm-visit-btn {
    display: inline-block;
    background: #fff;
    color: #0f172a;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .04em;
    padding: 9px 20px;
    border-radius: 50px;
    text-transform: uppercase;
    transition: background .2s, color .2s;
}

.wpm-card:hover .wpm-visit-btn {
    background: #3b82f6;
    color: #fff;
}

/* Placeholder when no image */
.wpm-no-image {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #94a3b8;
}

.wpm-no-image svg {
    width: 36px;
    height: 36px;
}

.wpm-no-image span {
    font-size: 12px;
    letter-spacing: .05em;
    text-transform: uppercase;
}

/* ---------- Card Footer ---------- */
.wpm-card-footer {
    padding: 14px 16px;
    border-top: 1px solid #f1f5f9;
    background: #fff;
}

.wpm-site-name {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: .01em;
}

/* ---------- Pagination ---------- */
.wpm-pagination {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin: 40px 0 20px;
}

.wpm-page-list {
    display: flex;
    align-items: center;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
    justify-content: center;
}

.wpm-page-list li {
    margin: 0;
    padding: 0;
}

.wpm-page-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 10px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    color: #374151;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all .2s ease;
    line-height: 1;
}

.wpm-page-btn:hover {
    border-color: #3b82f6;
    color: #3b82f6;
    background: #eff6ff;
    text-decoration: none;
}

.wpm-page-btn.wpm-active {
    border-color: #3b82f6;
    background: #3b82f6;
    color: #fff;
    cursor: default;
    pointer-events: none;
}

.wpm-page-btn.wpm-prev,
.wpm-page-btn.wpm-next {
    font-size: 18px;
}

.wpm-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    color: #9ca3af;
    font-size: 16px;
    letter-spacing: .1em;
}

.wpm-page-info {
    font-size: 13px;
    color: #9ca3af;
    margin: 0;
    text-align: center;
}

/* ---------- Empty State ---------- */
.wpm-empty {
    text-align: center;
    padding: 60px 20px;
    color: #64748b;
    background: #f8fafc;
    border: 2px dashed #e2e8f0;
    border-radius: 12px;
    font-size: 15px;
}

/* ---------- Responsive ---------- */
@media ( max-width: 1024px ) {
    .wpm-cols-4,
    .wpm-cols-5,
    .wpm-cols-6 { grid-template-columns: repeat(3, 1fr); }
}

@media ( max-width: 768px ) {
    .wpm-cols-3,
    .wpm-cols-4,
    .wpm-cols-5,
    .wpm-cols-6 { grid-template-columns: repeat(2, 1fr); }
    .wpm-grid { gap: 16px; }
    .wpm-page-btn { min-width: 36px; height: 36px; font-size: 13px; }
}

@media ( max-width: 480px ) {
    .wpm-cols-2,
    .wpm-cols-3,
    .wpm-cols-4,
    .wpm-cols-5,
    .wpm-cols-6 { grid-template-columns: 1fr; }
}
