/* =========================================================
   رادیک وب - استایل بخش نمونه کارها
   فایل: assets/css/portfolio.css
   پیشوند: pf-
   نسخه: 1.0
   ========================================================= */

/* ═══════════════════════════════════════════════════════════
   ۱. بخش اصلی
   ═══════════════════════════════════════════════════════════ */
.pf-section {
    position: relative;
    padding: 80px 20px 70px;
    background: var(--rw-body-bg, #F8FAFC);
    direction: rtl;
    overflow: hidden;
}

.pf-section::before {
    content: "";
    position: absolute;
    top: 100px;
    right: -150px;
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, 
        rgba(37, 99, 235, 0.04) 0%, 
        transparent 65%);
    border-radius: 50%;
    pointer-events: none;
}

.pf-container {
    position: relative;
    z-index: 2;
    max-width: 1300px;
    margin: 0 auto;
}

/* ═══════════════════════════════════════════════════════════
   ۲. هدر بخش
   ═══════════════════════════════════════════════════════════ */
.pf-header {
    text-align: center;
    margin-bottom: 40px;
}

.pf-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: linear-gradient(135deg, 
        rgba(37, 99, 235, 0.1), 
        rgba(30, 58, 138, 0.08));
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: 30px;
    font-family: 'Shabnam-Bold-P', Tahoma, sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: var(--rw-primary, #2563EB);
    margin-bottom: 20px;
    animation: pfFadeIn 0.7s ease 0.1s both;
}

.pf-badge i {
    font-size: 14px;
    color: var(--rw-primary, #2563EB);
}

.pf-title {
    font-family: 'Lalezar-ExtraBold', sans-serif;
    font-size: 40px;
    font-weight: 800;
    color: var(--rw-heading, #1E3A8A);
    margin: 0 0 15px;
    line-height: 1.3;
    letter-spacing: 0.5px;
    animation: pfFadeIn 0.7s ease 0.2s both;
}

.pf-subtitle {
    font-family: 'Shabnam-Bold-P', Tahoma, sans-serif;
    font-size: 15px;
    color: var(--rw-muted, #6B7280);
    margin: 0;
    line-height: 1.8;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    animation: pfFadeIn 0.7s ease 0.3s both;
}

@keyframes pfFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ═══════════════════════════════════════════════════════════
   ۳. دکمه‌های فیلتر
   ═══════════════════════════════════════════════════════════ */
.pf-filters {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 40px;
    flex-wrap: wrap;
    padding: 0 10px;
}

.pf-filter {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    background: var(--rw-card-bg, #FFFFFF);
    border: 2px solid rgba(0, 0, 0, 0.06);
    border-radius: 50px;
    font-family: 'Shabnam-Bold-P', Tahoma, sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: var(--rw-text, #1F2937);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.pf-filter i {
    font-size: 14px;
    color: var(--rw-primary, #2563EB);
    transition: color 0.3s ease;
}

.pf-filter:hover {
    border-color: var(--rw-primary, #2563EB);
    color: var(--rw-primary, #2563EB);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.15);
}

.pf-filter.rw-active {
    background: linear-gradient(135deg, 
        var(--rw-primary, #2563EB), 
        var(--rw-secondary, #1E3A8A));
    color: #fff;
    border-color: transparent;
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.3);
}

.pf-filter.rw-active i {
    color: #fff;
}

/* ═══════════════════════════════════════════════════════════
   ۴. گرید نمونه کارها
   ═══════════════════════════════════════════════════════════ */
.pf-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 50px;
}

/* ═══ آیتم ═══ */
.pf-item {
    animation: pfFadeInUp 0.6s ease both;
}

.pf-item[data-index="0"] { animation-delay: 0.05s; }
.pf-item[data-index="1"] { animation-delay: 0.1s; }
.pf-item[data-index="2"] { animation-delay: 0.15s; }
.pf-item[data-index="3"] { animation-delay: 0.2s; }
.pf-item[data-index="4"] { animation-delay: 0.25s; }
.pf-item[data-index="5"] { animation-delay: 0.3s; }

.pf-item.pf-hidden {
    display: none;
}

@keyframes pfFadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ═══════════════════════════════════════════════════════════
   ۵. کارت نمونه‌کار
   ═══════════════════════════════════════════════════════════ */
.pf-card {
    position: relative;
    background: var(--rw-card-bg, #FFFFFF);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.06),
        0 1px 3px rgba(0, 0, 0, 0.04);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.pf-card:hover {
    transform: translateY(-8px);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.15),
        0 10px 20px rgba(0, 0, 0, 0.08);
}

/* ═══════════════════════════════════════════════════════════
   ۶. تصویر
   ═══════════════════════════════════════════════════════════ */
.pf-image {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: linear-gradient(135deg, 
        rgba(37, 99, 235, 0.05), 
        rgba(30, 58, 138, 0.03));
}

.pf-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.pf-card:hover .pf-image img {
    transform: scale(1.1);
}

.pf-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, 
        var(--rw-primary, #2563EB), 
        var(--rw-secondary, #1E3A8A));
    color: rgba(255, 255, 255, 0.6);
    font-size: 60px;
}

.pf-placeholder i {
    font-size: 60px;
    opacity: 0.5;
    color: #fff;
}

/* ═══ Overlay هاور ═══ */
.pf-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, 
        rgba(37, 99, 235, 0.9), 
        rgba(30, 58, 138, 0.85));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    z-index: 2;
}

.pf-card:hover .pf-overlay {
    opacity: 1;
    visibility: visible;
}

.pf-overlay-content {
    display: flex;
    gap: 12px;
    transform: translateY(20px);
    transition: transform 0.4s ease 0.1s;
}

.pf-card:hover .pf-overlay-content {
    transform: translateY(0);
}

.pf-overlay-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: #fff;
    color: var(--rw-primary, #2563EB);
    border-radius: 50%;
    text-decoration: none;
    font-size: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.pf-overlay-btn:hover {
    transform: scale(1.1) rotate(5deg);
    background: var(--rw-accent, #DBEAFE);
    color: var(--rw-primary-hover, #1D4ED8);
}

.pf-overlay-btn i {
    color: inherit;
    font-size: 20px;
}

/* ═══ برچسب دسته ═══ */
.pf-cat-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--rw-primary, #2563EB);
    border-radius: 50px;
    font-family: 'Shabnam-Bold-P', Tahoma, sans-serif;
    font-size: 11px;
    font-weight: 700;
    z-index: 3;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.pf-card:hover .pf-cat-badge {
    background: var(--rw-primary, #2563EB);
    color: #fff;
}

/* ═══════════════════════════════════════════════════════════
   ۷. اطلاعات کارت
   ═══════════════════════════════════════════════════════════ */
.pf-info {
    padding: 22px 20px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
    text-align: right;
}

.pf-card-title {
    font-family: 'Lalezar-ExtraBold', sans-serif;
    font-size: 19px;
    font-weight: 800;
    color: var(--rw-heading, #1E3A8A);
    margin: 0 0 8px;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.pf-card:hover .pf-card-title {
    color: var(--rw-primary, #2563EB);
}

.pf-card-desc {
    font-family: 'Shabnam-Bold-P', Tahoma, sans-serif;
    font-size: 12px;
    line-height: 1.9;
    color: var(--rw-muted, #6B7280);
    margin: 0 0 15px;
    flex: 1;
}

.pf-card-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--rw-primary, #2563EB);
    text-decoration: none;
    font-family: 'Shabnam-Bold-P', Tahoma, sans-serif;
    font-size: 13px;
    font-weight: 700;
    transition: all 0.3s ease;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.pf-card-link i {
    font-size: 14px;
    transition: transform 0.3s ease;
    color: inherit;
}

.pf-card-link:hover {
    color: var(--rw-primary-hover, #1D4ED8);
    gap: 12px;
}

.pf-card-link:hover i {
    transform: translateX(-5px);
}

/* ═══════════════════════════════════════════════════════════
   ۸. دکمه مشاهده همه
   ═══════════════════════════════════════════════════════════ */
.pf-footer {
    text-align: center;
    padding-top: 10px;
}

.pf-view-all {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background: linear-gradient(135deg, 
        var(--rw-primary, #2563EB), 
        var(--rw-secondary, #1E3A8A));
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    font-family: 'Shabnam-Bold-P', Tahoma, sans-serif;
    font-size: 14px;
    font-weight: 700;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.25);
    position: relative;
    overflow: hidden;
}

.pf-view-all::before {
    content: '';
    position: absolute;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.15);
    transition: right 0.5s ease;
}

.pf-view-all:hover::before {
    right: 0;
}

.pf-view-all:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.35);
    color: #fff;
}

.pf-view-all span,
.pf-view-all i {
    position: relative;
    z-index: 2;
}

.pf-view-all i {
    font-size: 15px;
    transition: transform 0.35s ease;
    color: inherit;
}

.pf-view-all:hover i {
    transform: translateX(-6px);
}

.pf-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--rw-muted, #6B7280);
    font-family: 'Shabnam-Bold-P', Tahoma, sans-serif;
    font-size: 14px;
}

/* ═══════════════════════════════════════════════════════════
   ۹. ریسپانسیو
   ═══════════════════════════════════════════════════════════ */

/* لپ‌تاپ کوچک */
@media (max-width: 1100px) {
    .pf-section { padding: 70px 18px 60px; }
    .pf-title { font-size: 34px; }
    .pf-grid { gap: 20px; }
    .pf-image { height: 200px; }
    .pf-card-title { font-size: 17px; }
    .pf-filter { padding: 9px 18px; font-size: 12px; }
}

/* تبلت */
@media (max-width: 900px) {
    .pf-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
}

/* موبایل */
@media (max-width: 600px) {
    .pf-section { padding: 50px 14px 45px; }
    .pf-header { margin-bottom: 30px; }
    .pf-title { font-size: 26px; }
    .pf-subtitle { font-size: 13px; }
    .pf-badge { font-size: 12px; padding: 6px 16px; }
    
    .pf-filters {
        gap: 8px;
        margin-bottom: 30px;
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 10px;
        padding-left: 5px;
        padding-right: 5px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }
    .pf-filters::-webkit-scrollbar {
        height: 4px;
    }
    .pf-filters::-webkit-scrollbar-thumb {
        background: rgba(37, 99, 235, 0.3);
        border-radius: 4px;
    }
    .pf-filter {
        flex-shrink: 0;
        padding: 8px 16px;
        font-size: 12px;
    }
    
    .pf-grid { grid-template-columns: 1fr; gap: 16px; }
    .pf-image { height: 200px; }
    .pf-info { padding: 18px 16px 16px; }
    .pf-card-title { font-size: 17px; }
    .pf-card-desc { font-size: 12px; }
    .pf-card-link { font-size: 12px; }
    .pf-overlay-btn { width: 44px; height: 44px; font-size: 18px; }
    .pf-overlay-btn i { font-size: 18px; }
    .pf-cat-badge { font-size: 10px; padding: 5px 12px; }
    
    .pf-view-all { padding: 12px 24px; font-size: 13px; }
}

/* موبایل کوچک */
@media (max-width: 380px) {
    .pf-section { padding: 40px 10px 35px; }
    .pf-title { font-size: 22px; }
    .pf-image { height: 170px; }
    .pf-card-title { font-size: 15px; }
    .pf-card-desc { font-size: 11px; }
    .pf-filter { padding: 7px 14px; font-size: 11px; }
}