/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #000;
}

/* Hide navbar on gallery page for a clean, immersive layout */
.navbar {
    display: none;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.btn {
    display: inline-block;
    background: #d4af37;
    color: #000;
    padding: 12px 25px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
}

.btn:hover {
    background: #b8860b;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.section {
    padding: 80px 0;
}

.section h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2.5rem;
    color: #fff;
    position: relative;
}

.section h2::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: #d4af37;
    margin: 10px auto;
}

/* Hero Section */
.hero {
    height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    position: relative;
}

.hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--hero-bg, url("../assets/images/GALLERY/Cherished Memories With Our Travelers/1.jpg"))
                center/cover no-repeat fixed;
    filter: grayscale(1) blur(4px);
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    padding: 0 20px;
}

.hero-heading {
    font-size: 4rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 20px;
    letter-spacing: 2px;
    opacity: 0;
    transform: translateY(10px) scale(0.95);
    filter: blur(4px);
    animation: heroTextReveal 0.8s ease-out forwards;
}

.hero-subheading {
    font-size: 1.5rem;
    font-style: italic;
    margin-bottom: 40px;
    color: #d4af37;
    opacity: 0;
    transform: translateY(10px) scale(0.95);
    filter: blur(4px);
    animation: heroTextReveal 0.8s ease-out 0.15s forwards;
}

.logo-watermark {
    position: absolute;
    top: 30px;
    right: 30px;
    font-size: 2rem;
    color: rgba(212, 175, 55, 0.3);
    opacity: 0.5;
}

.scroll-down {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    z-index: 3;
    cursor: pointer;
    animation: fadeInUp 1s ease-out 1.1s both;
}

.scroll-text {
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    letter-spacing: 0.35rem;
    color: rgba(255, 255, 255, 0.85);
    text-transform: uppercase;
}

.scroll-arrow {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    animation: bounceDown 2.1s ease-in-out infinite;
    transition: transform 0.3s ease, background 0.3s ease;
}

.scroll-arrow i {
    color: #ffffff;
    font-size: 1.3rem;
}

.scroll-arrow:hover {
    background: rgba(212, 175, 55, 0.25);
    transform: scale(1.08);
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translate(-50%, 20px);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

@keyframes bounceDown {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(11px);
    }
}

@keyframes heroTextReveal {
    from {
        opacity: 0;
        transform: translateY(15px) scale(0.95);
        filter: blur(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

/* Quote Section */
.quote-section {
    background-color: #111;
    padding: 40px 0;
}

.quote-container {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.quote {
    font-size: 1.8rem;
    font-style: italic;
    color: #d4af37;
    min-height: 60px;
    transition: opacity 0.5s ease;
}

/* Animated Divider */
.divider {
    display: flex;
    justify-content: center;
    padding: 20px 0;
    background-color: #000;
}

.line {
    width: 0;
    height: 3px;
    background: #d4af37;
    animation: expandLine 1.5s ease forwards;
}

@keyframes expandLine {
    0% {
        width: 0;
    }
    100% {
        width: 200px;
    }
}

/* Collage-style Gallery Layout */
.gallery {
    --g: 6px; /* the gap */
    display: grid;
    width: 100%;
    max-width: 1000px; /* wider on desktop */
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 120px;
    gap: var(--g);
    margin: 0 auto;
}

.gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale();
    cursor: pointer;
    opacity: 0;
    transform: scale(0.9) translateY(10px);
    transition: opacity 0.5s ease, transform 0.5s ease, filter 0.5s ease;
}

.gallery img:hover {
    filter: grayscale(0);
}

.gallery img.in-view {
    opacity: 1;
    transform: scale(1) translateY(0);
}

/* Desktop collage positions (mosaic) */
.gallery img:nth-child(1) {
    grid-column: 1 / span 2;
    grid-row: 1 / span 2;
}

.gallery img:nth-child(2) {
    grid-column: 3 / span 2;
    grid-row: 1 / span 1;
}

.gallery img:nth-child(3) {
    grid-column: 3 / span 2;
    grid-row: 2 / span 2;
}

.gallery img:nth-child(4) {
    grid-column: 1 / span 1;
    grid-row: 3 / span 2;
}

.gallery img:nth-child(5) {
    grid-column: 2 / span 1;
    grid-row: 3 / span 1;
}

.gallery img:nth-child(6) {
    grid-column: 2 / span 1;
    grid-row: 4 / span 1;
}

.gallery img:nth-child(7) {
    grid-column: 3 / span 1;
    grid-row: 4 / span 1;
}

.gallery img:nth-child(8) {
    grid-column: 4 / span 1;
    grid-row: 4 / span 1;
}

@media (max-width: 768px) {
    .gallery {
        max-width: 100%;
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 140px; /* taller on mobile */
    }

    /* Let images flow naturally on mobile for a tall collage */
    .gallery img {
        grid-column: auto;
        grid-row: auto;
    }
}

.download-btn:hover {
    background: #b8860b;
    transform: translateY(-2px);
}

/* Lightbox Modal */
.lightbox-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox-overlay.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

@media (max-width: 768px) {
    .lightbox-content {
        width: 100%;
        padding: 0 12px;
    }

    .lightbox-img {
        max-height: 60vh;
    }

    .lightbox-caption {
        margin-top: 8px;
    }

    .lightbox-thumbs-row {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        bottom: 10px; /* stick to bottom of viewport */
        margin-top: 0;
        padding-bottom: 0;
    }

    .close-btn {
        display: none; /* hide close button on mobile */
    }
}

.lightbox-img {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    max-height: 70vh;
    opacity: 0;
    transform: scale(0.97) translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    border: 3px solid #d4af37;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #d4af37;
    background: rgba(0, 0, 0, 0.7);
    color: #d4af37;
    font-size: 1.4rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.close-btn:hover {
    background: rgba(212, 175, 55, 0.85);
    color: #000;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.lightbox-caption {
    text-align: center;
    color: #fff;
    margin-top: 15px;
    font-size: 1.2rem;
}

.lightbox-img.active {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.lightbox-thumbs-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 15px;
    width: 100%;
}

.lightbox-thumbs {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 5px;
    justify-content: center;
}

.lightbox-thumb {
    width: 70px;
    height: 70px;
    object-fit: cover;
    cursor: pointer;
    opacity: 0.6;
    border: 2px solid transparent;
    border-radius: 4px;
    flex-shrink: 0;
    transition: opacity 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.lightbox-thumb.active {
    opacity: 1;
    border-color: #d4af37;
    transform: scale(1.05);
}

.lightbox-arrow {
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(212, 175, 55, 0.7);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.lightbox-arrow:hover {
    background: rgba(212, 175, 55, 0.8);
    color: #000;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.download-lightbox-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: #d4af37;
    color: #000;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.download-lightbox-btn:hover {
    background: #b8860b;
    transform: translateY(-2px);
}

/* Footer */
.footer {
    background: #111;
    color: #fff;
    padding: 40px 0;
    text-align: center;
}

.footer-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.footer-text {
    font-size: 1.2rem;
    color: #d4af37;
}

@keyframes arrowBounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Fade-in on scroll */
.fade-in-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero-heading {
        font-size: 3rem;
    }
    
    .hero-subheading {
        font-size: 1.3rem;
    }
    
    .quote {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .hero-heading {
        font-size: 2.5rem;
    }
    
    .hero-subheading {
        font-size: 1.1rem;
    }
    
    .nav-menu {
        display: none;
    }
    
    .section h2 {
        font-size: 2rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .quote {
        font-size: 1.3rem;
    }

    /* Hide close button on mobile */
    .close-btn {
        display: none !important;
    }
}

@media (max-width: 576px) {
    .hero-heading {
        font-size: 2rem;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .logo-watermark {
        top: 20px;
        right: 20px;
        font-size: 1.5rem;
    }
    
    .footer-text {
        font-size: 1rem;
    }
}
