/**
 * Gallery Page Styles - Ultra Professional Design
 * معرض الصور - تصميم احترافي عالمي
 */

/* Gallery Hero */
.gallery-hero,
body .gallery-hero,
section.gallery-hero {
    position: relative;
    height: auto !important;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-top: 0 !important;
    padding: 200px 0 20px !important;
    min-height: auto !important;
    background: linear-gradient(135deg, #000000, #1a1a1a, #2c2c2c) !important;
}

.hero-background {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: transparent !important;
}

.gallery-hero .hero-background {
    background: transparent !important;
}

.gallery-hero::before,
.gallery-hero::after {
    display: none !important;
    content: none !important;
}

.animated-bg {
    display: none !important;
}

.hero-decoration {
    display: none !important;
}

@keyframes bgRotate {
    from { transform: rotate(0deg) scale(1.5); }
    to { transform: rotate(360deg) scale(1.5); }
}

.gallery-hero .hero-content {
    position: relative;
    z-index: 2;
    text-align: center !important;
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    background: transparent !important;
}

.gallery-hero .container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.gallery-hero .hero-title {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 20px;
}

.gallery-hero .title-accent {
    background: linear-gradient(135deg, #D4AA40, #F2E8C9, #BF9835);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gallery-hero .hero-subtitle {
    font-size: 1.1rem;
    color: #aaaaaa;
    max-width: 600px;
    margin: 0 auto;
}

/* Hero Badge */
.gallery-hero .hero-badge {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #D4AA40, #BF9835);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 10px 40px rgba(212, 170, 64, 0.4);
}

.gallery-hero .hero-badge i {
    font-size: 2.5rem;
    color: #000000;
}

/* Gallery Filters */
.gallery-filters {
    background: white;
    padding: 20px 0;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 80px;
    z-index: 100;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
}

.filters-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 25px;
    background: #f8f9fa;
    border: 2px solid transparent;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.filter-btn:hover {
    background: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-color: transparent;
}

.filter-btn img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.filter-btn .count {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    font-size: 0.85rem;
}

.filter-btn.active .count {
    background: rgba(255, 255, 255, 0.3);
}

/* Gallery Section */
.gallery-section {
    padding: 60px 0;
    background: #fafafa;
    min-height: 600px;
}

/* Masonry Grid */
.gallery-masonry {
    margin-top: 30px;
}

.gallery-item {
    width: calc(33.333% - 20px);
    margin-bottom: 20px;
    position: relative;
}

@media (max-width: 992px) {
    .gallery-item {
        width: calc(50% - 20px);
    }
}

@media (max-width: 576px) {
    .gallery-item {
        width: 100%;
    }
}

.item-inner {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    background: white;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
}

.gallery-item:hover .item-inner {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.item-inner img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.6s ease;
}

.gallery-item:hover .item-inner img {
    transform: scale(1.1);
}

/* Item Overlay */
.item-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(0, 0, 0, 0.8) 100%
    );
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding: 30px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .item-overlay {
    opacity: 1;
}

.overlay-content {
    color: white;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.gallery-item:hover .overlay-content {
    transform: translateY(0);
}

.overlay-content h4 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.overlay-content p {
    font-size: 0.95rem;
    opacity: 0.9;
}

.overlay-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    margin-top: auto;
}

.gallery-item:hover .overlay-actions {
    transform: translateY(0);
}

.action-btn {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 2px solid white;
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background: white;
    color: var(--primary-color);
    transform: scale(1.1);
}

.view-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.download-btn:hover {
    background: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
}

/* Item Badge */
.item-badge {
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 15px;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #ffffff;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: calc(100% - 30px);
    border: 1px solid rgba(212, 170, 64, 0.3);
}

.badge-logo {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.8);
    flex-shrink: 0;
}

.badge-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
    color: #ffffff;
}

[dir="rtl"] .item-badge {
    direction: rtl;
}

/* No Images */
.no-images {
    text-align: center;
    padding: 100px 20px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.no-images-icon {
    font-size: 5rem;
    color: #e0e0e0;
    margin-bottom: 20px;
}

.no-images h3 {
    font-size: 1.8rem;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.no-images p {
    font-size: 1.1rem;
    color: var(--text-light);
}

/* Load More Button */
.load-more-container {
    text-align: center;
    margin-top: 50px;
}

.load-more-btn {
    padding: 15px 40px;
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.load-more-btn:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-color: transparent;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(212, 170, 64, 0.3);
}

/* Gallery Stats */
.gallery-stats {
    padding: 80px 0;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    position: relative;
    overflow: hidden;
}

.gallery-stats::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml,...') repeat;
    opacity: 0.05;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.stat-card {
    text-align: center;
    padding: 40px 30px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.stat-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    font-size: 1.8rem;
    color: white;
    box-shadow: 0 10px 30px rgba(212, 170, 64, 0.3);
}

.stat-number {
    font-size: 3rem;
    font-weight: 900;
    color: white;
    margin-bottom: 10px;
    line-height: 1;
}

.stat-label {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Lightbox Customization */
.lb-data .lb-caption {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.5;
}

.lb-data .lb-number {
    font-size: 1rem;
    color: #999;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 992px) {
    .gallery-hero {
        height: 350px;
    }

    .hero-title {
        font-size: 3rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
        flex-direction: column;
        gap: 10px;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .filters-container {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 10px;
    }

    .filter-btn {
        flex-shrink: 0;
    }
}

@media (max-width: 576px) {
    .gallery-hero {
        height: 300px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .stat-number {
        font-size: 2.5rem;
    }
}

/* Print Styles */
@media print {
    .gallery-hero,
    .gallery-filters,
    .gallery-stats {
        display: none;
    }

    .gallery-item {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}