/* Gallery Page Specific Styles */
.gallery-section {
    padding: var(--spacing-3xl) var(--spacing-md);
    background: white;
}

.gallery-filter {
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
    margin-bottom: var(--spacing-2xl);
    padding: 0 var(--spacing-md);
}

.filter-btn {
    padding: var(--spacing-xs) var(--spacing-lg);
    border: 2px solid var(--border-light);
    background: white;
    color: var(--text-dark);
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
    min-width: 120px;
    text-align: center;
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--accent-gold);
    color: var(--text-dark);
    border-color: var(--accent-gold);
    transform: translateY(-2px);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-2xl);
    padding: 0 var(--spacing-md);
}

.gallery-item {
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: var(--transition);
    height: 250px;
    background: white;
    border: 1px solid var(--border-light);
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-gold);
}

.gallery-image {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-item:hover .gallery-image img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 50%, transparent 100%);
    color: white;
    padding: var(--spacing-lg);
    opacity: 0;
    transition: var(--transition);
    backdrop-filter: blur(5px);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-info h3 {
    color: white;
    font-size: 1.1rem;
    margin-bottom: var(--spacing-xs);
    font-weight: 700;
}

.gallery-info p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
    line-height: 1.4;
}

.gallery-load-more {
    text-align: center;
    margin-top: var(--spacing-2xl);
    padding: 0 var(--spacing-md);
}

/* Video Gallery */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
    padding: 0 var(--spacing-md);
}

.video-item {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}

.video-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-gold);
}

.video-wrapper {
    padding: var(--spacing-lg);
    text-align: center;
}

.video-container {
    position: relative;
    width: 100%;
    height: 180px;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: var(--spacing-lg);
    background: var(--light-bg);
}

.video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Style video controls */
.video-container video::-webkit-media-controls-panel {
    background: rgba(0, 0, 0, 0.7);
}

.video-container video::-webkit-media-controls-play-button {
    background-color: var(--accent-gold);
    border-radius: 50%;
}

.video-wrapper h3 {
    margin-bottom: var(--spacing-sm);
    color: var(--text-dark);
    font-size: 1.1rem;
    font-weight: 700;
}

.video-wrapper p {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Gallery Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.gallery-modal .modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    margin: 5vh auto;
    background: transparent;
    border-radius: var(--radius-lg);
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

.gallery-modal-content {
    position: relative;
    width: 100%;
    height: 100%;
}

.gallery-modal-image {
    width: 100%;
    max-height: 70vh;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--primary-dark);
}

.gallery-modal-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.gallery-modal-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: var(--spacing-lg);
    backdrop-filter: blur(10px);
}

.gallery-modal-info h2 {
    color: white;
    margin-bottom: var(--spacing-xs);
    font-size: 1.3rem;
    font-weight: 700;
}

.gallery-modal-info p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    line-height: 1.5;
}

.gallery-modal-nav {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 var(--spacing-lg);
    transform: translateY(-50%);
    pointer-events: none;
}

.gallery-nav-btn {
    pointer-events: auto;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-dark);
    border: none;
    font-size: 1.3rem;
    font-weight: 900;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.9;
}

.gallery-nav-btn:hover {
    background: var(--accent-gold);
    transform: scale(1.1);
    opacity: 1;
}

.modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: transparent;
    color: white;
    font-size: 2.5rem;
    border: none;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    z-index: 1001;
}

.modal-close:hover {
    color: var(--accent-gold);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }
    
    .gallery-item {
        height: 220px;
    }
    
    .video-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .video-container {
        height: 160px;
    }
    
    .gallery-filter {
        gap: var(--spacing-xs);
        margin-bottom: var(--spacing-xl);
    }
    
    .filter-btn {
        padding: var(--spacing-xs) var(--spacing-md);
        font-size: 0.85rem;
        min-width: 100px;
    }
    
    .gallery-modal .modal-content {
        max-width: 95vw;
        margin: 2vh auto;
    }
    
    .gallery-modal-nav {
        padding: 0 var(--spacing-sm);
    }
    
    .gallery-nav-btn {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .modal-close {
        top: -35px;
        right: 0;
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .gallery-item {
        height: 200px;
    }
    
    .video-container {
        height: 140px;
    }
    
    .gallery-modal-image {
        max-height: 60vh;
    }
    
    .gallery-modal-info {
        padding: var(--spacing-md);
    }
    
    .gallery-modal-info h2 {
        font-size: 1.1rem;
    }
    
    .gallery-modal-info p {
        font-size: 0.85rem;
    }
}

/* RTL Gallery */
body[dir="rtl"] .gallery-filter {
    direction: rtl;
}

body[dir="rtl"] .gallery-nav-btn:first-child {
    transform: rotate(180deg) translateY(50%);
}

body[dir="rtl"] .gallery-nav-btn:last-child {
    transform: rotate(180deg) translateY(50%);
}

body[dir="rtl"] .modal-close {
    right: auto;
    left: 0;
}