/* تصميم معرض الصور */

/* Hero Section للمعرض */
.gallery-hero {
    height: 50vh;
    background: linear-gradient(rgba(249, 122, 0, 0.8), rgba(56, 102, 65, 0.8)),
                url('https://images.unsplash.com/photo-1544551763-46a013bb70d5?w=1920&h=1080&fit=crop') center/cover;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    margin-top: 76px;
}

.gallery-hero .hero-title {
    font-size: 3rem;
    font-weight: 800;
    color: white;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.gallery-hero .hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0;
}

/* فلاتر المعرض */
.gallery-filters {
    margin-bottom: 3rem;
}

.filter-btn {
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    color: var(--text-dark);
    padding: 0.75rem 1.5rem;
    margin: 0 0.5rem 0.5rem 0;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    cursor: pointer;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

/* شبكة المعرض */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
    background: var(--bg-white);
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(249, 122, 0, 0.9), rgba(56, 102, 65, 0.9));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-content {
    text-align: center;
    color: white;
    padding: 1rem;
}

.gallery-content h4 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.gallery-content p {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.gallery-content i {
    font-size: 1.5rem;
    opacity: 0.8;
}

/* تأثيرات التصفية */
.gallery-item.hide {
    display: none;
}

.gallery-item.show {
    display: block;
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Lightbox Modal */
.lightbox-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

.lightbox-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    text-align: center;
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    color: white;
    font-size: 40px;
    cursor: pointer;
    z-index: 10000;
    transition: var(--transition);
}

.lightbox-close:hover {
    transform: scale(1.2);
    color: var(--primary-color);
}

.lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
    color: white;
    margin-top: 20px;
    text-align: center;
}

.lightbox-caption h4 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: white;
}

.lightbox-caption p {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 0;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
}

.lightbox-prev,
.lightbox-next {
    background: rgba(249, 122, 0, 0.8);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
    pointer-events: all;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-prev {
    margin-left: -25px;
}

.lightbox-next {
    margin-right: -25px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: var(--primary-color);
    transform: scale(1.1);
}

/* التصميم المتجاوب */
@media (max-width: 768px) {
    .gallery-hero .hero-title {
        font-size: 2.5rem;
    }
    
    .gallery-hero .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    
    .gallery-item img {
        height: 250px;
    }
    
    .filter-btn {
        padding: 0.5rem 1rem;
        margin: 0 0.25rem 0.5rem 0;
        font-size: 0.8rem;
    }
    
    .lightbox-close {
        top: -40px;
        font-size: 30px;
    }
    
    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .lightbox-prev {
        margin-left: -20px;
    }
    
    .lightbox-next {
        margin-right: -20px;
    }
}

@media (max-width: 576px) {
    .gallery-hero {
        height: 40vh;
    }
    
    .gallery-hero .hero-title {
        font-size: 2rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .gallery-item img {
        height: 200px;
    }
    
    .gallery-content h4 {
        font-size: 1rem;
    }
    
    .gallery-content p {
        font-size: 0.8rem;
    }
    
    .gallery-content i {
        font-size: 1.2rem;
    }
}

/* تأثيرات إضافية */
.gallery-item {
    animation: fadeInUp 0.6s ease forwards;
}

.gallery-item:nth-child(1) { animation-delay: 0.1s; }
.gallery-item:nth-child(2) { animation-delay: 0.2s; }
.gallery-item:nth-child(3) { animation-delay: 0.3s; }
.gallery-item:nth-child(4) { animation-delay: 0.4s; }
.gallery-item:nth-child(5) { animation-delay: 0.5s; }
.gallery-item:nth-child(6) { animation-delay: 0.6s; }
.gallery-item:nth-child(7) { animation-delay: 0.7s; }
.gallery-item:nth-child(8) { animation-delay: 0.8s; }
.gallery-item:nth-child(9) { animation-delay: 0.9s; }
.gallery-item:nth-child(10) { animation-delay: 1.0s; }
.gallery-item:nth-child(11) { animation-delay: 1.1s; }
.gallery-item:nth-child(12) { animation-delay: 1.2s; }
.gallery-item:nth-child(13) { animation-delay: 1.3s; }
.gallery-item:nth-child(14) { animation-delay: 1.4s; }
.gallery-item:nth-child(15) { animation-delay: 1.5s; }

/* تحسينات الأداء */
.gallery-item img {
    will-change: transform;
}

.gallery-overlay {
    will-change: opacity;
}

/* تأثيرات التحميل */
.gallery-item.loading {
    opacity: 0;
    transform: translateY(20px);
}

.gallery-item.loaded {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.6s ease;
}


/* تصميم معرض الصور */

/* Hero Section للمعرض */
.gallery-hero {
    height: 50vh;
    background: linear-gradient(rgba(249, 122, 0, 0.8), rgba(56, 102, 65, 0.8)),
                url('https://images.unsplash.com/photo-1544551763-46a013bb70d5?w=1920&h=1080&fit=crop') center/cover;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    margin-top: 76px;
}

.gallery-hero .hero-title {
    font-size: 3rem;
    font-weight: 800;
    color: white;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.gallery-hero .hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0;
}

/* فلاتر المعرض */
.gallery-filters {
    margin-bottom: 3rem;
    display: none;
}

.filter-btn {
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    color: var(--text-dark);
    padding: 0.75rem 1.5rem;
    margin: 0 0.5rem 0.5rem 0;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    cursor: pointer;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

/* شبكة المعرض */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
    background: var(--bg-white);
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(249, 122, 0, 0.9), rgba(56, 102, 65, 0.9));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-content {
    text-align: center;
    color: white;
    padding: 1rem;
}

.gallery-content h4 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.gallery-content p {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.gallery-content i {
    font-size: 1.5rem;
    opacity: 0.8;
}

/* تأثيرات التصفية */
.gallery-item.hide {
    display: none;
}

.gallery-item.show {
    display: block;
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Lightbox Modal */
.lightbox-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

.lightbox-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    text-align: center;
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    color: white;
    font-size: 40px;
    cursor: pointer;
    z-index: 10000;
    transition: var(--transition);
}

.lightbox-close:hover {
    transform: scale(1.2);
    color: var(--primary-color);
}

.lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
    color: white;
    margin-top: 20px;
    text-align: center;
}

.lightbox-caption h4 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: white;
}

.lightbox-caption p {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 0;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
}

.lightbox-prev,
.lightbox-next {
    background: rgba(249, 122, 0, 0.8);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
    pointer-events: all;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-prev {
    margin-left: -25px;
}

.lightbox-next {
    margin-right: -25px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: var(--primary-color);
    transform: scale(1.1);
}

/* التصميم المتجاوب */
@media (max-width: 768px) {
    .gallery-hero .hero-title {
        font-size: 2.5rem;
    }
    
    .gallery-hero .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    
    .gallery-item img {
        height: 250px;
    }
    
    .filter-btn {
        padding: 0.5rem 1rem;
        margin: 0 0.25rem 0.5rem 0;
        font-size: 0.8rem;
    }
    
    .lightbox-close {
        top: -40px;
        font-size: 30px;
    }
    
    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .lightbox-prev {
        margin-left: -20px;
    }
    
    .lightbox-next {
        margin-right: -20px;
    }
}

@media (max-width: 576px) {
    .gallery-hero {
        height: 40vh;
    }
    
    .gallery-hero .hero-title {
        font-size: 2rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .gallery-item img {
        height: 200px;
    }
    
    .gallery-content h4 {
        font-size: 1rem;
    }
    
    .gallery-content p {
        font-size: 0.8rem;
    }
    
    .gallery-content i {
        font-size: 1.2rem;
    }
}

/* تأثيرات إضافية */
.gallery-item {
    animation: fadeInUp 0.6s ease forwards;
}

.gallery-item:nth-child(1) { animation-delay: 0.1s; }
.gallery-item:nth-child(2) { animation-delay: 0.2s; }
.gallery-item:nth-child(3) { animation-delay: 0.3s; }
.gallery-item:nth-child(4) { animation-delay: 0.4s; }
.gallery-item:nth-child(5) { animation-delay: 0.5s; }
.gallery-item:nth-child(6) { animation-delay: 0.6s; }
.gallery-item:nth-child(7) { animation-delay: 0.7s; }
.gallery-item:nth-child(8) { animation-delay: 0.8s; }
.gallery-item:nth-child(9) { animation-delay: 0.9s; }
.gallery-item:nth-child(10) { animation-delay: 1.0s; }
.gallery-item:nth-child(11) { animation-delay: 1.1s; }
.gallery-item:nth-child(12) { animation-delay: 1.2s; }
.gallery-item:nth-child(13) { animation-delay: 1.3s; }
.gallery-item:nth-child(14) { animation-delay: 1.4s; }
.gallery-item:nth-child(15) { animation-delay: 1.5s; }

/* تحسينات الأداء */
.gallery-item img {
    will-change: transform;
}

.gallery-overlay {
    will-change: opacity;
}

/* تأثيرات التحميل */
.gallery-item.loading {
    opacity: 0;
    transform: translateY(20px);
}

.gallery-item.loaded {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.6s ease;
}


