
        :root {
            --primary: #0f172a;
            --accent: #3b82f6;
            --bg-body: #f8fafc;
            --bg-white: #ffffff;
            --text-main: #1e293b;
            --text-muted: #64748b;
            --border: #e2e8f0;
            --radius: 12px;
            --container: 1200px;
        }
        * { margin: 0; padding: 0; box-sizing: border-box; }
        body { font-family: 'Vazirmatn', sans-serif; background-color: var(--bg-body); color: var(--text-main); line-height: 1.6; }
        a { text-decoration: none; color: inherit; transition: 0.3s; }
        img { max-width: 100%; display: block; object-fit: cover; }
        .container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
        

        /* عنوان صفحه */
        .page-header { text-align: center; margin: 50px 0 40px; }
        .page-header h1 { font-size: 2.5rem; color: var(--primary); font-weight: 800; margin-bottom: 10px; }
        .page-header p { color: var(--text-muted); font-size: 1.1rem; }

        /* دکمه‌های فیلتر گالری */
        .filter-nav { display: flex; justify-content: center; gap: 12px; margin-bottom: 40px; flex-wrap: wrap; }
        .filter-btn {
            padding: 10px 24px;
            border-radius: 8px;
            border: 1px solid var(--border);
            background: var(--bg-white);
            color: var(--text-muted);
            cursor: pointer;
            font-family: 'Vazirmatn', sans-serif;
            font-weight: 600;
            font-size: 0.95rem;
            transition: 0.3s;
        }
        .filter-btn:hover { border-color: var(--accent); color: var(--accent); }
        .filter-btn.active { background: var(--primary); color: white; border-color: var(--primary); }

        /* گرید گالری */
        .gallery-grid { 
            display: grid; 
            grid-template-columns: repeat(3, 1fr); 
            gap: 20px; 
            margin-bottom: 60px; 
        }
        .gallery-item { 
            position: relative; 
            border-radius: var(--radius); 
            overflow: hidden; 
            cursor: pointer; 
            height: 260px;
            display: none; /* پیش‌فرض مخفی */
            animation: scaleUp 0.4s ease;
        }
        .gallery-item.show { display: block; } /* نمایش آیتم‌های انتخاب شده */
        .gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: 0.4s; }
        .gallery-item:hover img { transform: scale(1.08); }
        
        .gallery-overlay { 
            position: absolute; 
            inset: 0; 
            background: linear-gradient(to top, rgba(15, 23, 42, 0.8), transparent); 
            display: flex; 
            flex-direction: column;
            justify-content: flex-end; 
            padding: 20px;
            color: white; 
            opacity: 0; 
            transition: 0.3s; 
        }
        .gallery-item:hover .gallery-overlay { opacity: 1; }
        .gallery-overlay h3 { font-size: 1.2rem; margin-bottom: 5px; }
        .gallery-overlay span { font-size: 0.85rem; opacity: 0.9; }

        @keyframes scaleUp { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }



        @media(max-width: 992px) {
            .gallery-grid { grid-template-columns: repeat(2, 1fr); }
        }
        @media(max-width: 768px) {
            .gallery-grid { grid-template-columns: 1fr; }
            .page-header h1 { font-size: 2rem; }
        }
        
                /* ===== استایل کامل گالری ===== */
        
        /* صفحه اصلی */
        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 20px;
        }

        .page-header {
            text-align: center;
            padding: 40px 0 20px;
        }

        .page-header h1 {
            font-size: 2.5rem;
            color: #333;
            position: relative;
            display: inline-block;
        }

        .page-header h1::after {
            content: '';
            position: absolute;
            bottom: -10px;
            left: 50%;
            transform: translateX(-50%);
            width: 60px;
            height: 4px;
            background: #00a793;
            border-radius: 2px;
        }

        /* ===== دکمه‌های فیلتر ===== */
        .filter-nav {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            justify-content: center;
            margin: 30px 0 40px;
        }

        .filter-btn {
            padding: 10px 28px;
            border: 2px solid #00a793;
            background: transparent;
            color: #00a793;
            border-radius: 30px;
            cursor: pointer;
            font-weight: 600;
            font-size: 14px;
            transition: all 0.3s ease;
            -webkit-tap-highlight-color: transparent;
            font-family: inherit;
        }

        .filter-btn:hover {
            background: #00a793;
            color: #fff;
            transform: translateY(-2px);
            box-shadow: 0 4px 15px rgba(0,167,147,0.3);
        }

        .filter-btn.active {
            background: #00a793;
            color: #fff;
            box-shadow: 0 4px 15px rgba(0,167,147,0.3);
        }

        .filter-btn:active {
            transform: scale(0.95);
        }

        /* ===== گرید گالری ===== */
        .gallery-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
            gap: 25px;
            padding: 10px 0 40px;
        }

        .gallery-item {
            position: relative;
            overflow: hidden;
            border-radius: 12px;
            cursor: pointer;
            box-shadow: 0 4px 15px rgba(0,0,0,0.08);
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            background: #f8f8f8;
        }

        .gallery-item:hover {
            transform: translateY(-8px);
            box-shadow: 0 12px 35px rgba(0,0,0,0.15);
        }

        .gallery-item.hide {
            display: none !important;
        }

        .gallery-item img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.5s ease;
            display: block;
        }

        .gallery-item:hover img {
            transform: scale(1.08);
        }

        /* ===== اوورلی (Overlay) ===== */
        .gallery-overlay {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            background: linear-gradient(transparent, rgba(0,0,0,0.75));
            padding: 40px 20px 20px;
            opacity: 0;
            transform: translateY(10px);
            transition: opacity 0.3s ease, transform 0.3s ease;
        }

        .gallery-item:hover .gallery-overlay {
            opacity: 1;
            transform: translateY(0);
        }

        .gallery-overlay h3 {
            color: #fff;
            font-size: 16px;
            font-weight: 600;
            margin: 0;
            text-shadow: 0 2px 8px rgba(0,0,0,0.3);
        }

        /* ===== پیام خالی ===== */
        .no-result-msg {
            grid-column: 1 / -1;
            text-align: center;
            padding: 60px 20px;
            color: #999;
            font-size: 18px;
            background: #f9f9f9;
            border-radius: 12px;
        }

        .no-result-msg span {
            font-size: 40px;
            display: block;
            margin-bottom: 10px;
        }

        /* ===== لایت‌باکس ===== */
        .lightbox {
            display: none;
            position: fixed;
            z-index: 99999;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.92);
            justify-content: center;
            align-items: center;
            flex-direction: column;
            backdrop-filter: blur(5px);
        }

        .lightbox.active {
            display: flex;
        }

        .image-container {
            width: 80%;
            height: 75%;
            display: flex;
            justify-content: center;
            align-items: center;
            overflow: hidden;
            position: relative;
            touch-action: none;
        }

        #lightboxImg {
            max-width: 95%;
            max-height: 95%;
            object-fit: contain;
            transition: transform 0.25s ease;
            transform: scale(1);
            cursor: grab;
            border-radius: 8px;
            box-shadow: 0 0 40px rgba(0,0,0,0.5);
            touch-action: none;
            -webkit-user-select: none;
            user-select: none;
        }

        #lightboxImg:active {
            cursor: grabbing;
        }

        /* دکمه ضربدر */
        .close {
            position: absolute;
            top: 25px;
            right: 40px;
            color: #fff;
            font-size: 45px;
            font-weight: bold;
            cursor: pointer;
            z-index: 10;
            transition: all 0.3s ease;
            text-shadow: 0 0 20px rgba(0,0,0,0.8);
            padding: 10px;
            min-width: 50px;
            min-height: 50px;
            display: flex;
            align-items: center;
            justify-content: center;
            -webkit-tap-highlight-color: transparent;
            line-height: 1;
        }

        .close:hover {
            color: #ff4444;
            transform: rotate(90deg);
        }

        /* دکمه‌های قبلی و بعدی */
        .prev, .next {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            background: rgba(255,255,255,0.12);
            backdrop-filter: blur(8px);
            color: white;
            font-size: 35px;
            padding: 18px 24px;
            border: 2px solid rgba(255,255,255,0.15);
            cursor: pointer;
            z-index: 10;
            border-radius: 50%;
            transition: all 0.3s ease;
            min-width: 60px;
            min-height: 60px;
            display: flex;
            align-items: center;
            justify-content: center;
            -webkit-tap-highlight-color: transparent;
            line-height: 1;
        }

        .prev { left: 25px; }
        .next { right: 25px; }

        .prev:hover, .next:hover {
            background: rgba(255,255,255,0.25);
            border-color: rgba(255,255,255,0.4);
            transform: translateY(-50%) scale(1.05);
        }

        .prev:active, .next:active {
            transform: translateY(-50%) scale(0.95);
        }

        /* شمارنده */
        .counter {
            position: absolute;
            bottom: 30px;
            left: 50%;
            transform: translateX(-50%);
            color: #fff;
            font-size: 16px;
            background: rgba(0,0,0,0.6);
            padding: 8px 24px;
            border-radius: 30px;
            backdrop-filter: blur(8px);
            border: 1px solid rgba(255,255,255,0.1);
            z-index: 10;
            font-weight: 600;
            letter-spacing: 1px;
        }

        /* عنوان عکس در لایت‌باکس */
        .image-title {
            position: absolute;
            bottom: 80px;
            left: 50%;
            transform: translateX(-50%);
            color: #fff;
            font-size: 18px;
            background: rgba(0,0,0,0.5);
            padding: 8px 24px;
            border-radius: 20px;
            backdrop-filter: blur(8px);
            border: 1px solid rgba(255,255,255,0.08);
            z-index: 10;
            text-align: center;
            max-width: 80%;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            font-weight: 500;
        }

        /* دکمه‌های زوم */
        .zoom-controls {
            position: absolute;
            bottom: 90px;
            left: 50%;
            transform: translateX(-50%);
            display: flex;
            gap: 12px;
            z-index: 10;
        }

        .zoom-controls button {
            background: rgba(255,255,255,0.08);
            backdrop-filter: blur(8px);
            color: white;
            border: 1px solid rgba(255,255,255,0.15);
            padding: 10px 22px;
            font-size: 22px;
            border-radius: 12px;
            cursor: pointer;
            transition: all 0.3s ease;
            min-width: 50px;
            min-height: 50px;
            -webkit-tap-highlight-color: transparent;
            font-family: inherit;
            line-height: 1;
        }

        .zoom-controls button:hover {
            background: rgba(255,255,255,0.2);
            transform: scale(1.08);
        }

        .zoom-controls button:active {
            transform: scale(0.92);
        }

        /* ===== ریسپانسیو ===== */
        
        /* تبلت */
        @media (max-width: 992px) {
            .gallery-grid {
                grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
                gap: 20px;
            }
            
            .gallery-item img {
                height: 100%;
            }
            
            .page-header h1 {
                font-size: 2rem;
            }
        }

        /* موبایل */
        @media (max-width: 768px) {
            .container {
                padding: 0 12px;
            }
            
            .page-header {
                padding: 25px 0 15px;
            }
            
            .page-header h1 {
                font-size: 1.6rem;
            }
            
            .page-header h1::after {
                width: 40px;
                height: 3px;
                bottom: -8px;
            }
            
            .gallery-grid {
                grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
                gap: 12px;
                padding: 5px 0 30px;
            }
            
            .gallery-item img {
                height: 100%;
                border-radius: 8px;
            }
            
            .filter-btn {
                padding: 8px 16px;
                font-size: 12px;
            }
            
            .filter-nav {
                gap: 6px;
                margin: 20px 0 25px;
            }
            
            .gallery-overlay h3 {
                font-size: 13px;
            }
            
            /* لایت‌باکس موبایل */
            .image-container {
                width: 95%;
                height: 55%;
            }
            
            .prev, .next {
                font-size: 20px;
                padding: 12px 16px;
                min-width: 44px;
                min-height: 44px;
            }
            
            .prev { left: 8px; }
            .next { right: 8px; }
            
            .close {
                top: 12px;
                right: 15px;
                font-size: 32px;
                min-width: 44px;
                min-height: 44px;
            }
            
            .counter {
                font-size: 14px;
                padding: 5px 16px;
                bottom: 20px;
            }
            
            .zoom-controls {
                bottom: 60px;
                gap: 6px;
            }
            
            .zoom-controls button {
                padding: 6px 14px;
                font-size: 16px;
                min-width: 38px;
                min-height: 38px;
            }
            
            .image-title {
                font-size: 14px;
                bottom: 70px;
                padding: 5px 16px;
                max-width: 90%;
                white-space: normal;
            }
        }

        /* موبایل خیلی کوچک */
        @media (max-width: 480px) {
            .gallery-grid {
                grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
                gap: 8px;
                padding: 5px 0 20px;
            }
            
            .gallery-item img {
                height: 100%;
                border-radius: 6px;
            }
            
            .filter-btn {
                padding: 6px 12px;
                font-size: 11px;
            }
            
            .filter-nav {
                gap: 4px;
                margin: 15px 0 20px;
            }
            
            .page-header h1 {
                font-size: 1.3rem;
            }
            
            /* لایت‌باکس موبایل خیلی کوچک */
            .image-container {
                height: 48%;
            }
            
            .prev, .next {
                font-size: 16px;
                padding: 8px 12px;
                min-width: 36px;
                min-height: 36px;
            }
            
            .close {
                font-size: 26px;
                top: 10px;
                right: 12px;
                min-width: 36px;
                min-height: 36px;
            }
            
            .counter {
                font-size: 12px;
                padding: 4px 14px;
                bottom: 16px;
            }
            
            .zoom-controls {
                bottom: 50px;
                gap: 4px;
            }
            
            .zoom-controls button {
                font-size: 14px;
                padding: 5px 10px;
                min-width: 32px;
                min-height: 32px;
            }
            
            .image-title {
                font-size: 12px;
                bottom: 60px;
                padding: 4px 12px;
                max-width: 95%;
            }
        }

        /* ===== بهینه‌سازی لمسی ===== */
        @media (pointer: coarse) {
            .filter-btn,
            .close,
            .prev,
            .next,
            .zoom-controls button {
                min-height: 44px;
                min-width: 44px;
            }
            
            .gallery-item {
                cursor: default;
            }
        }

        /* ===== انیمیشن ===== */
        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: scale(0.95);
            }
            to {
                opacity: 1;
                transform: scale(1);
            }
        }

        .gallery-item.show {
            animation: fadeIn 0.4s ease forwards;
        }

        /* اسکرول‌بار لایت‌باکس */
        .lightbox::-webkit-scrollbar {
            width: 0;
        }
