/* Enhanced Gallery Styles to match screenshot - without filter buttons */

/* Gallery Hero Section */
.gallery-hero {
    height: 65vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 20px;
    background: url('https://www.bmw-m.com/content/dam/bmw/marketBMW_M/www_bmw-m_com/topics/magazine-article-pool/2024/wallpaper/m-wallpaper/3-0-csl/bmw-3-0-csl-mi-05.jpg') no-repeat center center; /* Replace with your image */
    background-size: cover;
    position: relative;
}

.gallery-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: transparent; /* Dark overlay */
}

.gallery-hero-content {
    position: relative;
    z-index: 1;
}

.gallery-hero-content h1 {
    font-size: 5rem; /* Larger size to match screenshot */
    margin-bottom: 20px;
    text-transform: uppercase; /* All caps to match screenshot */
    font-weight: 700; /* Bolder font */
    letter-spacing: 3px; /* Spacing between letters */
    text-shadow: 2px 2px 4px black;
}

.gallery-hero-content p {
    font-size: 1.4rem; /* Larger text */
    color: white;
    max-width: 600px;
    margin: 0 auto;
    font-weight: 300; /* Lighter weight for subtext */
}

/* Social Icons in Gallery Hero */
.gallery-hero .social-icons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.gallery-hero .social-icon {
    color: white;
    font-size: 24px;
    transition: color 0.3s ease;
}

.gallery-hero .social-icon:hover {
    color: #FF8300; /* Orange accent color */
}

/* Gallery Section */
.gallery-section {
    padding: 80px 0;
    background-color: transparent; /* Translucent black to match screenshot */
}

.container {
    width: 90%;
    max-width: 1600px;
    margin: 0 auto;
}

/* Gallery Grid - Improved layout to match screenshot */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px; /* Increased gap for better spacing */
    padding-top: 20px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 0; /* Square corners to match screenshot */
    box-shadow: 0 4px 12px black;
    cursor: pointer;
    height: 300px;
    opacity: 1;
    transform: scale(1);
    transition: all 0.4s ease;
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.gallery-item:hover .gallery-image {
    transform: scale(1.05);
}

/* Overlay always visible with text at bottom */
.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: transparent; /* Changed to transparent so image shows through */
    padding: 15px;
    transform: translateY(0);
    transition: background-color 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    background-color: transparent; /* Remains transparent on hover */
}

.gallery-title {
    color: #FF8300;
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.gallery-description {
    color: white;
    font-size: 14px;
}

/* Improved Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color:black;
    text-align: center;
}

.lightbox-img {
    max-width: 90%;
    max-height: 80%;
    margin-top: 50px;
    object-fit: contain;
    box-shadow: 0 0 20px black;
}

.lightbox-caption {
    color: white;
    padding: 15px;
    font-size: 18px;
    max-width: 800px;
    margin: 0 auto;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 5px;
    margin-top: 15px;
}

.lightbox-caption h3 {
    color: #FF8300;
    margin-bottom: 8px;
}

.vehicle-info {
    font-style: italic;
    color: #ddd;
    font-size: 0.9em;
    margin-top: 10px;
}

.close-lightbox {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    transition: color 0.3s;
}

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

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: black;
    border: none;
    color: white;
    font-size: 24px;
    padding: 20px;
    cursor: pointer;
    z-index: 1001;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.lightbox-nav:hover {
    background-color: rgba(255, 131, 0, 0.7);
}

.prev-img {
    left: 20px;
}

.next-img {
    right: 20px;
}

/* Responsive Styles */
@media screen and (max-width: 992px) {
    .gallery-hero-content h1 {
        font-size: 4rem;
    }
    
    .gallery-hero-content p {
        font-size: 1.2rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 20px;
    }
    
    .gallery-item {
        height: 250px;
    }
}

@media screen and (max-width: 768px) {
    .gallery-hero {
        height: 50vh;
    }
    
    .gallery-hero-content h1 {
        font-size: 3rem;
    }
    
    .gallery-section {
        padding: 50px 0;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
    }
    
    .gallery-item {
        height: 220px;
    }
    
    .lightbox-img {
        max-height: 70%;
    }
    
    .lightbox-caption {
        font-size: 16px;
    }
    
    .lightbox-nav {
        font-size: 20px;
        padding: 15px;
        width: 50px;
        height: 50px;
    }
    
    .quick-add-btn {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}

@media screen and (max-width: 576px) {
    .gallery-hero-content h1 {
        font-size: 2.5rem;
    }
    
    .gallery-hero-content p {
        font-size: 1rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .gallery-item {
        height: 250px;
    }
}
