        .portfolio-menu button {
            transition: all 0.3s ease;
        }
        
        /* ساختار آجرچینی (Masonry) */
        .portfolio-grid {
            column-count: 2;
            column-gap: 1.5rem;
        }
        
        @media (min-width: 576px) {
            .portfolio-grid {
                column-count: 4;
            }
        }
        
        @media (min-width: 992px) {
            .portfolio-grid {
                column-count: 4;
            }
        }
        
        /* ساختار کارت‌ها با انیمیشن ترنزیشن */
        .portfolio-item {
            display: inline-block;
            width: 100%;
            margin-bottom: 1.5rem;
            cursor: pointer;
            break-inside: avoid;
            
            /* ترنزیشن روان روی شفافیت و مقیاس */
            opacity: 1;
            transform: scale(1);
            transition: opacity 0.3s ease, transform 0.3s ease;
        }
        
        .portfolio-item:hover {
            transform: scale(1.02);
        }

        .portfolio-item img {
            width: 100%;
            height: auto;
            border-radius: 8px;
            object-fit: cover;
            display: block;
        }

        /* حالت محو شده قبل از display: none */
        .portfolio-item.fade-out {
            opacity: 0;
            transform: scale(0.85);
        }

        /* لایت‌باکس بدون اسکرول */
        #lightboxModal {
            overflow: hidden !important;
        }

        #lightboxModal .modal-dialog {
            max-width: 95vw;
            width: auto;
            margin: 0 auto;
            display: flex;
            align-items: center;
            justify-content: center;
            min-height: 100vh;
        }

        #lightboxModal .modal-content {
            background: transparent;
            border: 0;
            box-shadow: none;
            width: auto;
            max-width: 100%;
        }

        #lightboxModal .modal-body {
            padding: 0;
            position: relative;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            max-height: 90vh; 
            max-width: 95vw;  
        }

        #lightboxImage {
            display: block;
            max-width: 90vw;
            max-height: 85vh; 
            width: auto;
            height: auto;
            object-fit: contain;
            border-radius: 12px;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
            background-color: #000;
        }

        .modal-backdrop.show {
            opacity: 0.95 !important;
        }

        /* دکمه Close روی تصویر */
        #lightboxModal .btn-close {
            position: absolute;
            inset-block-start: -20px;
            inset-inline-end: -20px;
            z-index: 1000;
            background-color: var(--primary-color-darker);
            background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e");
            background-size: 10px;
            border-radius: 50%;
            width: 32px;
            height: 32px;
            opacity: 1;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
            border: none;
        }

        /* دکمه‌های ناوبری لایت‌باکس */
        .lightbox-nav-btn {
            position: absolute;
            inset-block-start: 50%;
            transform: translateY(-50%);
            width: 46px;
            height: 46px;
            border: none;
            border-radius: 50%;
            background-color: rgba(0, 0, 0, 0.75);
            color: #fff;
            font-size: 24px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            z-index: 99998;
            transition: background-color 0.2s ease;
        }

        .lightbox-nav-btn:hover {
            background-color: rgba(0, 0, 0, 0.95);
        }

        .btn-prev {
            inset-inline-start: 10px;
        }

        .btn-next {
            inset-inline-end: 10px;
        }

        .lightbox-counter {
            position: absolute;
            inset-block-end: 15px;
            inset-inline-start: 50%;
            transform: translateX(-50%);
            background-color: rgba(0, 0, 0, 0.8);
            color: #fff;
            padding: 4px 12px;
            border-radius: 20px;
            font-size: 13px;
            z-index: 99997;
        }

        @media (max-width: 576px) {
            #lightboxModal .btn-close {
                inset-block-start: 10px;
                inset-inline-end: 10px;
            }
            #lightboxImage {
                max-width: 95vw;
                max-height: 80vh;
            }
        }