/* Gallery Page Styles */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Gallery Hero Section */
.gallery-hero {
    height: 40vh;
    background: linear-gradient(135deg, #e76f51 0%, #f4a261 50%, #e9c46a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    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('/img/desert-safari-dubai-4.avif') center/cover;
    opacity: 0.3;
    z-index: 1;
}

.gallery-hero .hero-content {
    position: relative;
    z-index: 2;
}

.gallery-hero h1 {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.gallery-hero p {
    font-size: 1.3rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Gallery Content */
.gallery-content {
    padding: 80px 0;
    background: #f8f9fa;
}

/* Gallery Filter */
.gallery-filter {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 50px;
}

.filter-btn {
    background: white;
    border: 2px solid #e76f51;
    color: #e76f51;
    padding: 12px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background: #e76f51;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(231, 111, 81, 0.3);
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
}

.gallery-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.gallery-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(231, 111, 81, 0.9), rgba(244, 162, 97, 0.9));
    opacity: 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-content h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    font-weight: bold;
}

.gallery-content p {
    font-size: 1rem;
    margin-bottom: 15px;
    opacity: 0.9;
}

.gallery-overlay i {
    font-size: 2rem;
    opacity: 0.8;
}

/* Load More Button */
.load-more-container {
    text-align: center;
}

.load-more-btn {
    background: linear-gradient(135deg, #e76f51, #f4a261);
    color: white;
    border: none;
    padding: 15px 35px;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.load-more-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(231, 111, 81, 0.3);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 80%;
    border-radius: 10px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
}

.close:hover {
    color: #e76f51;
}

.modal-caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: white;
    padding: 20px 0;
    font-size: 1.2rem;
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
}

.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
}

.nav-btn {
    background: rgba(231, 111, 81, 0.8);
    color: white;
    border: none;
    font-size: 2rem;
    padding: 15px 20px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    background: rgba(231, 111, 81, 1);
    transform: scale(1.1);
}

/* Filter Animation */
.gallery-item.hide {
    display: none;
}

.gallery-item.show {
    display: block;
    animation: showItem 0.5s ease;
}

@keyframes showItem {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .gallery-hero h1 {
        font-size: 2.2rem;
    }
    
    .gallery-hero p {
        font-size: 1.1rem;
    }
    
    .gallery-content {
        padding: 50px 0;
    }
    
    .gallery-filter {
        flex-direction: column;
        align-items: center;
    }
    
    .filter-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .gallery-item img {
        height: 200px;
    }
    
    .gallery-content h3 {
        font-size: 1.2rem;
    }
    
    .gallery-content p {
        font-size: 0.9rem;
    }
    
    .modal-content {
        max-width: 95%;
        max-height: 70%;
    }
    
    .nav-btn {
        font-size: 1.5rem;
        padding: 10px 15px;
    }
    
    .close {
        font-size: 30px;
        top: 10px;
        right: 20px;
    }
}

@media (max-width: 480px) {
    .gallery-hero h1 {
        font-size: 1.8rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-item img {
        height: 180px;
    }
    
    .filter-btn {
        padding: 8px 16px;
        font-size: 0.8rem;
    }
    
    .load-more-btn {
        padding: 12px 25px;
        font-size: 1rem;
    }
    
    .modal-caption {
        font-size: 1rem;
        bottom: 20px;
        width: 90%;
    }
    
    .nav-btn {
        font-size: 1.2rem;
        padding: 8px 12px;
    }
}

/* Hidden items for load more functionality */
.gallery-item.hidden {
    display: none;
}