/* کانتینر اصلی */
.wfg-section {
    margin: 40px 0;
    clear: both;
}

.wfg-heading {
    font-size: 1.4rem;
    margin-bottom: 20px;
    font-weight: 700;
    position: relative;
    padding-right: 15px;
}

/* خط تزیینی کنار تایتل */
.wfg-heading::before {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 25px;
    background: #0073aa; /* رنگ برند */
    border-radius: 4px;
}

/* رپر اسلایدر */
.wfg-carousel-container {
    position: relative;
    padding: 10px 0;
}

/* ترک اسلایدر (محل قرارگیری عکس‌ها) */
.wfg-track {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    padding-bottom: 20px; /* فضا برای سایه */
    /* مخفی کردن اسکرول بار */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.wfg-track::-webkit-scrollbar {
    display: none;
}

/* کارت‌های تصویر */
.wfg-card {
    /* فرمول نمایش 4.5 آیتم در دسکتاپ */
    flex: 0 0 22%; 
    aspect-ratio: 1 / 1; /* مربعی */
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    scroll-snap-align: start;
    background: #fff;
}

.wfg-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

/* افکت هاور جذاب */
.wfg-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.wfg-card:hover img {
    transform: scale(1.1);
}

/* آیکون زوم روی هاور */
.wfg-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.wfg-card:hover .wfg-overlay {
    opacity: 1;
}

.wfg-zoom-icon {
    font-size: 24px;
    color: #fff;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(4px);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* دکمه‌های ناوبری مدرن */
.wfg-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: #fff;
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s;
    opacity: 0.8;
}

.wfg-nav-btn:hover {
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
    background: #0073aa;
}

/* ساخت فلش با CSS */
.wfg-nav-btn::after {
    content: '';
    border: solid #333;
    border-width: 0 2px 2px 0;
    display: inline-block;
    padding: 3px;
}

.wfg-nav-btn:hover::after {
    border-color: #fff;
}

.wfg-prev { left: -20px; }
.wfg-prev::after { transform: rotate(135deg); margin-left: 2px; }

.wfg-next { right: -20px; }
.wfg-next::after { transform: rotate(-45deg); margin-right: 2px; }

/* ---- استایل لایت‌باکس (Popup) ---- */
.wfg-lightbox {
    display: none; /* پیش فرض مخفی */
    position: fixed;
    z-index: 99999;
    inset: 0;
    background-color: rgba(0,0,0,0.85);
    backdrop-filter: blur(8px); /* افکت شیشه‌ای تار */
    align-items: center;
    justify-content: center;
    flex-direction: column;
    animation: fadeIn 0.3s;
}

.wfg-lightbox-content {
    max-width: 90%;
    max-height: 85vh;
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
    animation: zoomIn 0.3s;
}

.wfg-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.wfg-close:hover {
    color: #fff;
    transform: rotate(90deg);
}

.wfg-caption {
    margin-top: 15px;
    color: #ccc;
    font-size: 16px;
}

/* انیمیشن‌ها */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes zoomIn {
    from { transform: scale(0.9); }
    to { transform: scale(1); }
}

/* ---- ریسپانسیو موبایل ---- */
@media (max-width: 768px) {
    .wfg-card {
        flex: 0 0 60%; /* نمایش 1.5 آیتم در موبایل */
    }
    .wfg-nav-btn {
        display: none; /* حذف دکمه‌ها در موبایل */
    }
    .wfg-track {
        padding-right: 15px; /* فاصله از راست برای شروع */
    }
}