/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
}

body {
    background-color: #000;
    color: #fff;
    overflow-x: hidden;
}

/* Navbar Styles */
.navbar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: background-color 0.3s ease;
    background-color: rgba(0, 0, 0, 0.9);
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #fff;
    text-decoration: none;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 40px;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #f0f0f0;
}

/* Mobile Menu Styles */
.mobile-menu {
    display: none;
    cursor: pointer;
    font-size: 24px;
    color: #fff;
}

@media screen and (max-width: 768px) {
    .navbar {
        padding: 20px;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background-color: rgba(0, 0, 0, 0.9);
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        margin: 15px 0;
    }

    .mobile-menu {
        display: block;
    }
}

/* Page Header Styles */
.page-header {
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url('../images/Festivals/Khalid-1_C_webp.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #111;
    margin-top: 70px;
    position: relative;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.page-header h1 {
    font-size: 48px;
    font-weight: 700;
    letter-spacing: 2px;
    position: relative;
    z-index: 2;
}

/* Portfolio Intro Styles */
.portfolio-intro {
    max-width: 800px;
    margin: 50px auto;
    text-align: center;
    padding: 0 20px;
}

.portfolio-intro p {
    font-size: 18px;
    line-height: 1.6;
    color: #ccc;
}

/* Filter Controls */
.filter-controls {
    display: flex;
    justify-content: center;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.filter-btn {
    background: none;
    border: 1px solid #444;
    color: #fff;
    padding: 8px 20px;
    margin: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background-color: #fff;
    color: #000;
}

/* Gallery Container Styles */
.gallery-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
    overflow: hidden;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    width: 100%;
    margin: 0;
    padding: 0;
}

/* Gallery Item Styles */
.gallery-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.gallery-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-item:hover {
    transform: scale(1.02);
    z-index: 10;
}

/* Gallery Item Sizes Using CSS Grid */
.gallery-item.normal {
    grid-column: span 1.5;
    grid-row: span 1;
}

.gallery-item.wide {
    grid-column: span 1;
    grid-row: span 1;
}

.gallery-item.tall {
    grid-column: span 1;
    grid-row: span 2;
}

.gallery-item.big {
    grid-column: span 2;
    grid-row: span 2;
}

/* Gallery Overlay Styles */
.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.gallery-overlay h3 {
    font-size: 18px;
    margin-bottom: 5px;
}

.gallery-overlay p {
    font-size: 14px;
    color: #ccc;
}

/* Loading Indicator */
.loader {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #555;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 100px auto;
    display: none;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* No Results Message */
.no-results {
    text-align: center;
    padding: 50px;
    font-size: 18px;
    color: #ccc;
    display: none;
}

/* Lightbox Styles */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.show {
    opacity: 1;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    font-size: 30px;
    color: #fff;
    cursor: pointer;
    transition: color 0.3s ease;
}

.lightbox-close:hover {
    color: #ccc;
}

.lightbox-nav {
    position: absolute;
    width: 100%;
    display: flex;
    justify-content: space-between;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-prev,
.lightbox-next {
    font-size: 24px;
    color: #fff;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 15px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.7;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background-color: rgba(255, 255, 255, 0.2);
    opacity: 1;
}

.lightbox-caption {
    position: absolute;
    bottom: -40px;
    left: 0;
    width: 100%;
    text-align: center;
    color: #fff;
    font-size: 16px;
}

/* Footer Styles */
footer {
    background-color: #111;
    padding: 50px 0;
    text-align: center;
    margin-top: 100px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.footer-logo {
    flex: 1;
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 20px;
}

.footer-links {
    flex: 1;
    display: flex;
    justify-content: center;
    list-style: none;
    margin-bottom: 20px;
}

.footer-links li {
    margin: 0 15px;
}

.footer-links a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #ddd;
}

.social-links {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    list-style: none;
    margin-bottom: 20px;
}

.social-links li {
    margin: 0 10px;
}

.social-links a {
    color: #fff;
    font-size: 20px;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: #ddd;
}

.copyright {
    width: 100%;
    text-align: center;
    padding-top: 20px;
    font-size: 14px;
    color: #888;
}

/* Responsive Adjustments */
@media screen and (max-width: 1200px) {
    .gallery-item {
        width: 33.3333%; /* 3 items per row */
    }
}

@media screen and (max-width: 992px) {
    .gallery-item {
        width: 50%; /* 2 items per row */
    }
}

@media screen and (max-width: 768px) {
    .gallery-item {
        width: 100%; /* 1 item per row */
    }

    .page-header h1 {
        font-size: 36px;
    }
}
