
        :root {
            --primary-color: #2563eb;
            --secondary-color: #f59e0b;
            --dark-color: #1e293b;
            --light-bg: #f8fafc;
            --white: #ffffff;
            --text-color: #334155;
            --border-color: #e2e8f0;
            --radius: 12px;
        }

        * { margin: 0; padding: 0; box-sizing: border-box; }
        body { font-family: 'Vazirmatn', sans-serif; background-color: var(--light-bg); color: var(--text-color); }
        a { text-decoration: none; color: inherit; transition: 0.3s; }
        img { max-width: 100%; display: block; }
        .container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }


        /* --- استایل گالری --- */
        .page-header { background-color: var(--dark-color); color: var(--white); padding: 80px 0; text-align: center; background-size: cover; background-attachment: fixed; }
        .page-header h1 { font-size: 2.5rem; margin-bottom: 10px; }
        .page-header p { opacity: 0.8; }

        .gallery-section { padding: 60px 0; }

        /* دکمه‌های فیلتر دسته‌بندی */
        .filter-nav { display: flex; justify-content: center; gap: 15px; margin-bottom: 50px; flex-wrap: wrap; }
        .filter-btn { padding: 10px 30px; background: var(--white); border: 1px solid var(--border-color); border-radius: 50px; cursor: pointer; font-family: inherit; font-weight: 500; color: #64748b; transition: 0.3s; }
        .filter-btn:hover { border-color: var(--primary-color); color: var(--primary-color); }
        .filter-btn.active { background-color: var(--primary-color); color: var(--white); border-color: var(--primary-color); box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3); }

        /* گرید تصاویر */
        .gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 25px; }
        
        .gallery-item { 
            position: relative; 
            border-radius: var(--radius); 
            overflow: hidden; 
            box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1); 
            cursor: pointer; 
            background: var(--white);
            /* انیمیشن مخفی کردن */
            transition: all 0.4s ease;
        }
        
        /* کلاس مخفی کردن برای فیلتر */
        .gallery-item.hide { display: none; }

        .gallery-img { width: 100%; height: 250px; object-fit: cover; transition: transform 0.5s ease; }
        .gallery-item:hover .gallery-img { transform: scale(1.1); }

        .gallery-overlay { 
            position: absolute; 
            top: 0; left: 0; width: 100%; height: 100%; 
            background: linear-gradient(to top, rgba(0,0,0,0.7), transparent); 
            opacity: 0; 
            transition: 0.3s; 
            display: flex; 
            align-items: flex-end; 
            padding: 20px;
        }
        .gallery-item:hover .gallery-overlay { opacity: 1; }
        
        .gallery-caption { color: white; font-weight: 700; transform: translateY(20px); transition: 0.3s; }
        .gallery-item:hover .gallery-caption { transform: translateY(0); }

        @media (max-width: 768px) {
            .filter-nav { gap: 10px; }
            .filter-btn { padding: 8px 20px; font-size: 0.9rem; }
        }
        
                /* ===== استایل گالری ===== */
        .gallery-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
            gap: 20px;
            padding: 20px 0;
        }

        .gallery-item {
            position: relative;
            overflow: hidden;
            border-radius: 12px;
            cursor: pointer;
            box-shadow: 0 4px 15px rgba(0,0,0,0.1);
            transition: transform 0.3s, box-shadow 0.3s;
        }

        .gallery-item:hover {
            transform: translateY(-5px);
            box-shadow: 0 8px 25px rgba(0,0,0,0.2);
        }

        .gallery-item.hide {
            display: none !important;
        }

        .gallery-img {
            width: 100%;
            height: 250px;
            object-fit: cover;
            transition: transform 0.5s;
        }

        .gallery-item:hover .gallery-img {
            transform: scale(1.05);
        }

        .gallery-overlay {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            background: linear-gradient(transparent, rgba(0,0,0,0.7));
            padding: 30px 15px 15px;
            opacity: 0;
            transition: opacity 0.3s;
        }

        .gallery-item:hover .gallery-overlay {
            opacity: 1;
        }

        .gallery-caption {
            color: #fff;
            font-size: 14px;
            font-weight: 500;
        }

        /* ===== دکمه‌های فیلتر ===== */
        .filter-nav {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            justify-content: center;
            margin: 20px 0 30px;
        }

        .filter-btn {
            padding: 10px 25px;
            border: 2px solid #00a793;
            background: transparent;
            color: #00a793;
            border-radius: 30px;
            cursor: pointer;
            font-weight: 600;
            font-size: 14px;
            transition: all 0.3s;
            -webkit-tap-highlight-color: transparent;
        }

        .filter-btn:hover {
            background: #00a793;
            color: #fff;
            transform: scale(1.05);
        }

        .filter-btn.active {
            background: #00a793;
            color: #fff;
            box-shadow: 0 4px 15px rgba(0,167,147,0.3);
        }

        /* ===== لایت‌باکس ===== */
        .lightbox {
            display: none;
            position: fixed;
            z-index: 9999;
            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;
        }

        .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 30px rgba(0,0,0,0.5);
            touch-action: none;
            -webkit-user-select: none;
            user-select: none;
        }

        .close {
            position: absolute;
            top: 25px;
            right: 40px;
            color: #fff;
            font-size: 45px;
            font-weight: bold;
            cursor: pointer;
            z-index: 10;
            transition: 0.3s;
            text-shadow: 0 0 10px 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;
        }

        .close:hover {
            color: #ff4444;
            transform: rotate(90deg);
        }

        .prev, .next {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            background: rgba(255,255,255,0.15);
            backdrop-filter: blur(5px);
            color: white;
            font-size: 35px;
            padding: 18px 22px;
            border: 2px solid rgba(255,255,255,0.2);
            cursor: pointer;
            z-index: 10;
            border-radius: 50%;
            transition: 0.3s;
            min-width: 60px;
            min-height: 60px;
            display: flex;
            align-items: center;
            justify-content: center;
            -webkit-tap-highlight-color: transparent;
        }

        .prev { left: 25px; }
        .next { right: 25px; }

        .prev:hover, .next:hover {
            background: rgba(255,255,255,0.3);
            border-color: white;
        }

        .counter {
            position: absolute;
            bottom: 30px;
            left: 50%;
            transform: translateX(-50%);
            color: #fff;
            font-size: 16px;
            background: rgba(0,0,0,0.7);
            padding: 8px 20px;
            border-radius: 30px;
            backdrop-filter: blur(5px);
            border: 1px solid rgba(255,255,255,0.2);
            z-index: 10;
            font-weight: bold;
            letter-spacing: 1px;
        }

        .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.1);
            backdrop-filter: blur(5px);
            color: white;
            border: 1px solid rgba(255,255,255,0.3);
            padding: 10px 20px;
            font-size: 22px;
            border-radius: 12px;
            cursor: pointer;
            transition: 0.3s;
            min-width: 50px;
            min-height: 50px;
            -webkit-tap-highlight-color: transparent;
        }

        .zoom-controls button:hover {
            background: rgba(255,255,255,0.3);
            transform: scale(1.1);
        }

        .zoom-controls button:active {
            transform: scale(0.95);
        }

        .image-title {
            position: absolute;
            bottom: 80px;
            left: 50%;
            transform: translateX(-50%);
            color: #fff;
            font-size: 18px;
            background: rgba(0,0,0,0.6);
            padding: 8px 20px;
            border-radius: 20px;
            backdrop-filter: blur(5px);
            border: 1px solid rgba(255,255,255,0.1);
            z-index: 10;
            text-align: center;
            max-width: 80%;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        /* ===== ریسپانسیو ===== */
        @media (max-width: 992px) {
            .gallery-grid {
                grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
                gap: 15px;
            }
            .gallery-img {
                height: 200px;
            }
        }

        @media (max-width: 768px) {
            .gallery-grid {
                grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
                gap: 10px;
                padding: 10px 0;
            }
            .gallery-img {
                height: 160px;
            }
            .filter-btn {
                padding: 8px 16px;
                font-size: 12px;
            }
            .filter-nav {
                gap: 6px;
                margin: 10px 0 20px;
            }
            .image-container {
                width: 95%;
                height: 55%;
            }
            .prev, .next {
                font-size: 20px;
                padding: 10px 14px;
                min-width: 40px;
                min-height: 40px;
            }
            .prev { left: 8px; }
            .next { right: 8px; }
            .close {
                top: 12px;
                right: 15px;
                font-size: 30px;
                min-width: 40px;
                min-height: 40px;
            }
            .counter {
                font-size: 14px;
                padding: 5px 15px;
                bottom: 20px;
            }
            .zoom-controls {
                bottom: 60px;
                gap: 6px;
            }
            .zoom-controls button {
                padding: 6px 12px;
                font-size: 16px;
                min-width: 35px;
                min-height: 35px;
            }
            .image-title {
                font-size: 14px;
                bottom: 70px;
                padding: 5px 15px;
                max-width: 90%;
                white-space: normal;
            }
        }

        @media (max-width: 480px) {
            .gallery-grid {
                grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
                gap: 8px;
            }
            .gallery-img {
                height: 130px;
            }
            .filter-btn {
                padding: 6px 12px;
                font-size: 11px;
            }
            .image-container {
                height: 50%;
            }
            .prev, .next {
                font-size: 16px;
                padding: 8px 10px;
                min-width: 32px;
                min-height: 32px;
            }
            .close {
                font-size: 25px;
                top: 10px;
                right: 12px;
                min-width: 32px;
                min-height: 32px;
            }
            .counter {
                font-size: 12px;
                padding: 4px 12px;
                bottom: 15px;
            }
            .zoom-controls {
                bottom: 50px;
                gap: 4px;
            }
            .zoom-controls button {
                font-size: 14px;
                padding: 5px 10px;
                min-width: 30px;
                min-height: 30px;
            }
            .image-title {
                font-size: 12px;
                bottom: 60px;
                padding: 4px 12px;
            }
        }

        @media (pointer: coarse) {
            .filter-btn,
            .close,
            .prev,
            .next,
            .zoom-controls button {
                min-height: 44px;
                min-width: 44px;
            }
        }
