/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colors - Navy, Gold, White Theme */
    --primary: #B99253;
    --primary-light: #7B3900;
    --accent: #7B3900;
    --accent-dark: #263b66;
    --background: hsl(0, 0%, 100%);
    --secondary: hsl(220, 30%, 98%);
    --text: hsl(220, 20%, 20%);
    --text-muted: hsl(220, 10%, 50%);
    --border: hsl(220, 15%, 90%);
    --shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.2);
    --shadow-gold: 0 10px 40px -10px rgba(212, 175, 55, 0.4);
    
    /* Typography */
    --font-primary: 'Poppins', sans-serif;
    --font-arabic: 'Cairo', sans-serif;
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: var(--font-primary);
    color: var(--text);
    background: var(--background);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Hero Section */
.hero {
    position: relative;
    height: 50vh;
    min-height: 400px;

    background:
        linear-gradient(
            135deg,
            rgba(15, 23, 42, 0.7),
            rgba(59, 130, 246, 0.6)
        ),
        url("../assets/bg6.jpeg");

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}


.hero-title {
    color: white;
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(250, 250, 250, 0.3);
    animation: fadeInUp 0.8s ease-out;
}

.hero-subtitle {
    color: white;
    font-size: clamp(1rem, 2vw, 1.25rem);
    font-weight: 300;
    opacity: 0.95;
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

/* Gallery Section */
.gallery-section {
    padding: 5rem 0;
    background: var(--background);
}

/* Filter Tabs */
.filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 3rem;
    animation: fadeInUp 0.8s ease-out;
}

.filter-btn {
    padding: 0.75rem 2rem;
    border: 2px solid var(--border);
    background: white;
    color: var(--text);
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: 500;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border-color: var(--primary);
    box-shadow: var(--shadow-gold);
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    animation: fadeIn 0.8s ease-out;
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 4/3;
    background: var(--secondary);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.gallery-item.hidden {
    display: none;
}

.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;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
    padding: 1.5rem;
    transform: translateY(100%);
    transition: var(--transition);
}

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

.gallery-overlay h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

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

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

.load-more-btn {
    padding: 1rem 3rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border: none;
    border-radius: 50px;
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-gold);
}

.load-more-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px -10px rgba(212, 175, 55, 0.5);
}

.load-more-btn.hidden {
    display: none;
}

/* Stats Section */
.stats-section {
    padding: 5rem 0;
    background: var(--secondary);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.stat-card {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-gold);
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* CTA Section */
.cta-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, var(--accent-dark), var(--primary-light));
    color: white;
    text-align: center;
}

.cta-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 1rem;
}

.cta-text {
    font-size: clamp(1rem, 2vw, 1.25rem);
    margin-bottom: 2rem;
    opacity: 0.95;
}

.cta-btn {
    display: inline-block;
    padding: 1rem 3rem;
    background: white;
    color: var(--primary);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.cta-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px -10px rgba(255, 255, 255, 0.3);
}

/* Lightbox Modal */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    animation: fadeIn 0.3s ease-out;
}

.lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    animation: scaleIn 0.3s ease-out;
}

.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    color: white;
    font-size: 3rem;
    font-weight: 300;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10000;
}

.lightbox-close:hover {
    color: var(--primary);
    transform: scale(1.2);
}

#lightboxImage {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: var(--shadow-gold);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(185, 146, 83, 0.8);
    color: white;
    border: none;
    font-size: 2rem;
    padding: 1rem 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    border-radius: 4px;
}

.lightbox-nav:hover {
    background: rgba(185, 146, 83, 1);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-caption {
    text-align: center;
    color: white;
    font-size: 1.25rem;
    margin-top: 1rem;
    padding: 1rem;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Scroll Animations */
.scroll-reveal {
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero {
        height: 40vh;
        min-height: 300px;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }

    .filter-tabs {
        gap: 0.5rem;
    }

    .filter-btn {
        padding: 0.6rem 1.25rem;
        font-size: 0.9rem;
    }

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

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

    .lightbox-nav {
        font-size: 1.5rem;
        padding: 0.75rem 1rem;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .gallery-section {
        padding: 3rem 0;
    }

    .stats-section,
    .cta-section {
        padding: 3rem 0;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .filter-tabs {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 0.5rem;
    }

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