/**
 * Zaki Portfolio Widget — Styles (zpf- prefix)
 */

/* ─── Section ─────────────────────────────────────────── */
.zpf-sec {
    width: 100%;
    position: relative;
    overflow: hidden;
    padding: 90px 0 100px;
    background: #fff;
    isolation: isolate
}

.zpf-sec::before {
    content: "";
    position: absolute;
    top: -2px;
    left: 0;
    right: 0;
    height: 80px;
    background: #f0f4ff;
    clip-path: ellipse(55% 100% at 50% 0%);
    z-index: 1
}

.zpf-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: .22;
    z-index: 0;
    pointer-events: none
}

.zpf-blob-1 {
    width: 520px;
    height: 520px;
    top: 80px;
    left: -180px;
    background: radial-gradient(circle, #bfdbfe, transparent 65%)
}

.zpf-blob-2 {
    width: 440px;
    height: 440px;
    bottom: 60px;
    right: -140px;
    background: radial-gradient(circle, #ddd6fe, transparent 65%)
}

.zpf-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px
}

/* ─── Header ──────────────────────────────────────────── */
.zpf-head {
    text-align: center;
    margin-bottom: 16px;
    position: relative;
    z-index: 2
}

.zpf-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(37, 99, 235, .08);
    color: #2563eb;
    font-weight: 800;
    font-size: .88rem;
    border: 1px solid rgba(37, 99, 235, .18);
    margin-bottom: 16px;
    letter-spacing: .04em
}

.zpf-kicker::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #2563eb;
    display: inline-block
}

.zpf-title {
    font-size: clamp(1.9rem, 2.8vw + .7rem, 2.9rem);
    font-weight: 900;
    line-height: 1.18;
    letter-spacing: -.03em;
    color: #0f172a;
    margin-bottom: 14px
}

.zpf-hl {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent
}

.zpf-desc {
    color: #475569;
    font-size: 1.06rem;
    max-width: 520px;
    margin: 0 auto 40px;
    line-height: 1.8
}

/* ─── Filter Tabs ─────────────────────────────────────── */
.zpf-filter-tabs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 44px;
    position: relative;
    z-index: 2
}

.zpf-ftab {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    border-radius: 999px;
    font-family: inherit;
    font-size: .90rem;
    font-weight: 700;
    border: 1px solid rgba(148, 163, 184, .32);
    background: #fff;
    color: #475569;
    cursor: pointer;
    transition: all .2s cubic-bezier(.4, 0, .2, 1);
    box-shadow: 0 2px 8px rgba(15, 23, 42, .05);
    user-select: none
}

.zpf-ftab:hover {
    border-color: rgba(37, 99, 235, .30);
    color: #2563eb;
    transform: translateY(-1px)
}

.zpf-ftab.active {
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 8px 22px rgba(37, 99, 235, .30)
}

/* ─── Grid ────────────────────────────────────────────── */
.zpf-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
    position: relative;
    z-index: 2;
    margin-bottom: 48px
}

.zpf-card {
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    box-shadow: 0 8px 28px rgba(15, 23, 42, .10);
    border: 1px solid rgba(148, 163, 184, .22);
    transition: transform .28s cubic-bezier(.4, 0, .2, 1), box-shadow .28s cubic-bezier(.4, 0, .2, 1);
    background: #0f172a;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end
}

.zpf-card:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 28px 64px rgba(15, 23, 42, .18)
}

.zpf-card[style*="span 7"] .zpf-name {
    font-size: 1.35rem
}

.zpf-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform 6s ease;
    z-index: 0
}

.zpf-card:hover .zpf-bg {
    transform: scale(1.06)
}

.zpf-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(5, 10, 25, .92) 0%, rgba(5, 10, 25, .55) 45%, rgba(5, 10, 25, .10) 100%);
    z-index: 1;
    transition: opacity .28s ease
}

.zpf-card:hover .zpf-overlay {
    background: linear-gradient(to top, rgba(5, 10, 25, .95) 0%, rgba(5, 10, 25, .65) 50%, rgba(5, 10, 25, .20) 100%)
}

.zpf-content {
    position: relative;
    z-index: 2;
    padding: 24px 24px 26px
}

.zpf-cat {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .04em;
    color: #fff;
    background: rgba(37, 99, 235, .55);
    border: 1px solid rgba(99, 162, 255, .35);
    backdrop-filter: blur(8px);
    margin-bottom: 10px
}

.zpf-name {
    font-size: 1.15rem;
    font-weight: 900;
    color: #fff;
    line-height: 1.3;
    margin-bottom: 8px
}

.zpf-excerpt {
    font-size: .87rem;
    color: rgba(255, 255, 255, .70);
    line-height: 1.65;
    margin-bottom: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden
}

.zpf-results {
    display: flex;
    gap: 8px;
    flex-wrap: wrap
}

.zpf-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 11px;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 800;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .20);
    color: rgba(255, 255, 255, .90);
    backdrop-filter: blur(6px)
}

.zpf-chip.green {
    background: rgba(16, 185, 129, .22);
    border-color: rgba(16, 185, 129, .35);
    color: #6ee7b7
}

.zpf-chip.blue {
    background: rgba(37, 99, 235, .22);
    border-color: rgba(99, 162, 255, .35);
    color: #93c5fd
}

.zpf-chip.violet {
    background: rgba(124, 58, 237, .22);
    border-color: rgba(167, 139, 250, .35);
    color: #c4b5fd
}

.zpf-chip.amber {
    background: rgba(245, 158, 11, .22);
    border-color: rgba(252, 211, 77, .35);
    color: #fcd34d
}

.zpf-arrow {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .15);
    border: 1px solid rgba(255, 255, 255, .25);
    backdrop-filter: blur(8px);
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 1rem;
    z-index: 3;
    opacity: 0;
    transform: scale(.75);
    transition: opacity .22s ease, transform .22s ease
}

.zpf-card:hover .zpf-arrow {
    opacity: 1;
    transform: scale(1)
}

/* ─── More Link ───────────────────────────────────────── */
.zpf-more-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    position: relative;
    z-index: 2;
    margin-bottom: 48px
}

.zpf-more-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(to left, rgba(148, 163, 184, .35), transparent);
    max-width: 260px
}

.zpf-more-line.zpf-right {
    background: linear-gradient(to right, rgba(148, 163, 184, .35), transparent)
}

.zpf-btn-more {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 26px;
    border-radius: 999px;
    font-family: inherit;
    font-size: .97rem;
    font-weight: 800;
    text-decoration: none;
    color: #1d4ed8;
    background: rgba(37, 99, 235, .07);
    border: 1px solid rgba(37, 99, 235, .22);
    transition: all .22s cubic-bezier(.4, 0, .2, 1);
    cursor: pointer;
    white-space: nowrap
}

.zpf-btn-more:hover {
    background: rgba(37, 99, 235, .13);
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(37, 99, 235, .16)
}

/* ─── Tech Strip ──────────────────────────────────────── */
.zpf-tech-strip {
    background: #f8faff;
    border: 1px solid rgba(148, 163, 184, .25);
    border-radius: 24px;
    padding: 36px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 32px;
    position: relative;
    z-index: 2;
    box-shadow: 0 4px 18px rgba(15, 23, 42, .05)
}

.zpf-tech-left h3 {
    font-size: 1.15rem;
    font-weight: 900;
    color: #0f172a;
    margin-bottom: 8px
}

.zpf-tech-left p {
    font-size: .91rem;
    color: #475569;
    line-height: 1.7;
    max-width: 340px
}

.zpf-tech-divider {
    width: 1px;
    height: 80px;
    background: linear-gradient(to bottom, transparent, rgba(148, 163, 184, .40), transparent)
}

.zpf-tech-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end
}

.zpf-ticon {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 14px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid rgba(148, 163, 184, .28);
    font-size: .82rem;
    font-weight: 800;
    color: #334155;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .05);
    transition: transform .18s ease, box-shadow .18s ease
}

.zpf-ticon:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(15, 23, 42, .10)
}

/* ─── Reveal ──────────────────────────────────────────── */
.zpf-reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .65s cubic-bezier(.4, 0, .2, 1), transform .65s cubic-bezier(.4, 0, .2, 1)
}

.zpf-reveal.is-on {
    opacity: 1;
    transform: translateY(0)
}

.elementor-editor-active .zpf-reveal,
.elementor-editor-preview .zpf-reveal {
    opacity: 1 !important;
    transform: translateY(0) !important;
    transition: none !important
}

@media(prefers-reduced-motion:reduce) {
    .zpf-reveal {
        transition: none;
        transform: none;
        opacity: 1
    }

    .zpf-card,
    .zpf-bg,
    .zpf-ticon,
    .zpf-ftab {
        transition: none
    }
}

/* ─── Responsive ──────────────────────────────────────── */
@media(max-width:1024px) {
    .zpf-card[style*="span 7"] {
        grid-column: span 12 !important;
        min-height: 340px
    }

    .zpf-card[style*="span 5"] {
        grid-column: span 12 !important;
        min-height: 280px
    }
}

@media(max-width:768px) {
    .zpf-card[style*="span 4"] {
        grid-column: span 6 !important;
        min-height: 260px
    }

    .zpf-tech-strip {
        grid-template-columns: 1fr;
        gap: 20px
    }

    .zpf-tech-divider {
        width: 100%;
        height: 1px
    }

    .zpf-tech-icons {
        justify-content: flex-start
    }
}

@media(max-width:640px) {
    .zpf-sec {
        padding: 64px 0 72px
    }

    .zpf-card[style*="span 4"] {
        grid-column: span 12 !important;
        min-height: 240px
    }

    .zpf-card[style*="span 7"] {
        min-height: 300px
    }

    .zpf-tech-strip {
        padding: 26px 22px
    }

    .zpf-filter-tabs {
        gap: 6px
    }

    .zpf-ftab {
        padding: 8px 14px;
        font-size: .84rem
    }
}