/* ===== GALLERY STYLES - ستایلەکانی معرض الصور ===== */

/* Gallery Hero Section */
.gallery-hero {
    background: var(--gradient-primary);
    padding: 4rem 0;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.gallery-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/pattern.png') repeat;
    opacity: 0.1;
    animation: backgroundMove 20s linear infinite;
}

@keyframes backgroundMove {
    0% { transform: translateX(0) translateY(0); }
    100% { transform: translateX(-100px) translateY(-100px); }
}

.gallery-hero-content {
    position: relative;
    z-index: 2;
}

.gallery-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.gallery-subtitle {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.gallery-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 2rem;
}

.gallery-stats .stat-item {
    text-align: center;
    padding: 1rem 2rem;
    background: rgba(255,255,255,0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

.gallery-stats .stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-gold);
}

.gallery-stats .stat-label {
    font-size: 1rem;
    opacity: 0.8;
}

/* Gallery Controls */
.gallery-controls {
    background: var(--white);
    padding: 2rem 0;
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.gallery-controls .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.gallery-filters {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: var(--light-gray);
    border: 2px solid transparent;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-family);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-btn:hover {
    background: var(--primary-green);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(26, 76, 61, 0.3);
}

.filter-btn.active {
    background: var(--primary-green);
    color: white;
    border-color: var(--accent-gold);
}

.filter-btn i {
    font-size: 0.9rem;
}

.gallery-search {
    flex: 1;
    max-width: 400px;
}

.search-box {
    position: relative;
    width: 100%;
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem;
    border: 2px solid var(--border-light);
    border-radius: 25px;
    font-family: var(--font-family);
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(26, 76, 61, 0.1);
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--medium-gray);
}

/* Gallery Section */
.gallery-section {
    padding: 3rem 0;
    background: var(--background-light);
    min-height: 60vh;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.gallery-item {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.4s ease;
    cursor: pointer;
    position: relative;
}

.gallery-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.2);
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: all 0.4s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.7) 100%);
    opacity: 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
}

.gallery-item:hover .gallery-item-overlay {
    opacity: 1;
}

.gallery-item-info {
    color: white;
    width: 100%;
}

.gallery-item-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.gallery-item-category {
    font-size: 0.9rem;
    opacity: 0.8;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.gallery-item-category i {
    color: var(--accent-gold);
}

/* Loading Spinner */
.gallery-loading {
    text-align: center;
    padding: 3rem;
}

.loading-spinner {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.loading-spinner i {
    font-size: 2rem;
    color: var(--primary-green);
}

.loading-spinner p {
    color: var(--medium-gray);
    font-size: 1rem;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 3rem;
    color: var(--medium-gray);
}

.no-results i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.no-results h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

/* Gallery Lightbox */
.gallery-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.95);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.gallery-lightbox.active {
    display: flex;
}

.lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    cursor: pointer;
}

.lightbox-content {
    background: white;
    border-radius: 15px;
    max-width: 90vw;
    max-height: 90vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 2;
    overflow: hidden;
}

.lightbox-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-light);
    background: var(--background-light);
}

.lightbox-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-dark);
}

.lightbox-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--medium-gray);
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.lightbox-close:hover {
    background: var(--light-gray);
    color: var(--text-dark);
}

.lightbox-body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-height: 400px;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--text-dark);
    transition: all 0.3s ease;
    z-index: 3;
}

.lightbox-nav:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.lightbox-prev {
    left: 1rem;
}

.lightbox-next {
    right: 1rem;
}

.lightbox-image-container {
    position: relative;
    max-width: 100%;
    max-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 10px;
}

.lightbox-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--primary-green);
    font-size: 2rem;
}

.lightbox-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-light);
    background: var(--background-light);
}

.lightbox-info {
    display: flex;
    gap: 1rem;
    color: var(--medium-gray);
    font-size: 0.9rem;
}

.lightbox-actions {
    display: flex;
    gap: 0.5rem;
}

.lightbox-btn {
    background: var(--light-gray);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dark);
    transition: all 0.3s ease;
}

.lightbox-btn:hover {
    background: var(--primary-green);
    color: white;
    transform: scale(1.1);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--primary-green);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    z-index: 100;
    box-shadow: 0 4px 15px rgba(26, 76, 61, 0.3);
}

.back-to-top:hover {
    background: var(--secondary-green);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(26, 76, 61, 0.4);
}

.back-to-top.show {
    display: flex;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .gallery-title {
        font-size: 3rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .gallery-hero {
        padding: 3rem 0;
    }
    
    .gallery-title {
        font-size: 2.5rem;
    }
    
    .gallery-subtitle {
        font-size: 1.1rem;
    }
    
    .gallery-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .gallery-controls .container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .gallery-filters {
        justify-content: center;
    }
    
    .gallery-search {
        max-width: none;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }
    
    .lightbox-content {
        margin: 1rem;
        max-width: calc(100vw - 2rem);
        max-height: calc(100vh - 2rem);
    }
    
    .lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .lightbox-prev {
        left: 0.5rem;
    }
    
    .lightbox-next {
        right: 0.5rem;
    }
    
    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 480px) {
    .gallery-title {
        font-size: 2rem;
    }
    
    .gallery-subtitle {
        font-size: 1rem;
    }
    
    .gallery-stats .stat-number {
        font-size: 2rem;
    }
    
    .filter-btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .gallery-item img {
        height: 200px;
    }
    
    .lightbox-header,
    .lightbox-footer {
        padding: 1rem;
    }
    
    .lightbox-title {
        font-size: 1.1rem;
    }
    
    .lightbox-info {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Animation Classes */
.gallery-item {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Masonry Layout for Different Image Sizes */
.gallery-grid.masonry {
    columns: 4;
    column-gap: 1.5rem;
}

.gallery-grid.masonry .gallery-item {
    break-inside: avoid;
    margin-bottom: 1.5rem;
    display: block;
}

@media (max-width: 1200px) {
    .gallery-grid.masonry {
        columns: 3;
    }
}

@media (max-width: 768px) {
    .gallery-grid.masonry {
        columns: 2;
    }
}

@media (max-width: 480px) {
    .gallery-grid.masonry {
        columns: 1;
    }
} 