/**
 * company-gallery.css - Styles for the Sri Lanka tourism gallery page
 * Modern, elegant, premium design for showcasing beautiful Sri Lanka images
 */

/* =============================================
 * GALLERY HERO SECTION
 * ============================================= */

 .gallery-hero {
    position: relative;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.5)), 
                url('../images/slider/heritage-srilanka-main-slider.jpg');
    background-size: cover;
    background-position: center;
    color: #fff;
    padding: 120px 0 80px;
    margin-bottom: 30px;
    overflow: hidden;
}

.gallery-hero h1 {
    font-family: 'Raleway', sans-serif;
    font-weight: 700;
    margin-bottom: 20px;
    position: relative;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.5);
}

.gallery-hero h1::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--accent-gold);
}

.gallery-hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
}

.gallery-hero-glow {
    position: absolute;
    bottom: -50px;
    left: 0;
    width: 100%;
    height: 100px;
    background: radial-gradient(ellipse at center, rgba(248, 180, 0, 0.3) 0%, rgba(0, 0, 0, 0) 70%);
    pointer-events: none;
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.hero-badges .badge {
    font-size: 0.85rem;
    padding: 8px 20px;
    margin: 0 5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.hero-badges .badge:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* =============================================
 * GALLERY FILTER SECTION
 * ============================================= */

.gallery-filter {
    background-color: #1a1a1a;
    border-radius: 10px;
    margin: -50px auto 30px;
    max-width: 90%;
    position: relative;
    z-index: 10;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    padding: 15px 0;
}

.btn-filter {
    background-color: transparent;
    border: 2px solid #333;
    color: #ccc;
    border-radius: 50px;
    padding: 8px 20px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin: 5px;
}

.btn-filter:hover, .btn-filter.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(33, 147, 176, 0.3);
}

/* =============================================
 * GALLERY MAIN SECTION
 * ============================================= */

.gallery-main {
    padding: 30px 0 60px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
    transition: all 0.5s ease;
    height: 280px;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.7s ease;
}

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

.gallery-item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 60%);
    opacity: 0.8;
    transition: all 0.5s ease;
}

.gallery-item:hover .gallery-item-overlay {
    background: linear-gradient(to top, rgba(33, 147, 176, 0.7) 0%, rgba(0, 0, 0, 0.2) 100%);
    opacity: 1;
}

.gallery-item-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    color: white;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.5s ease;
}

.gallery-item:hover .gallery-item-caption {
    transform: translateY(0);
    opacity: 1;
}

.gallery-item-caption h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    font-weight: 600;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.gallery-item-caption p {
    font-size: 0.9rem;
    margin-bottom: 0;
    opacity: 0.9;
}

.gallery-item-tags {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: flex-end;
}

.gallery-item-tag {
    background-color: rgba(248, 180, 0, 0.85);
    color: black;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

/* Gallery item sizes */
.gallery-item.wide {
    grid-column: span 2;
}

.gallery-item.tall {
    grid-row: span 2;
    height: 580px;
}

/* Masonry layout adjustments */
.masonry-gallery {
    column-count: 3;
    column-gap: 20px;
}

.masonry-gallery .gallery-item {
    display: inline-block;
    width: 100%;
    margin-bottom: 20px;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .masonry-gallery {
        column-count: 2;
    }
}

@media (max-width: 576px) {
    .masonry-gallery {
        column-count: 1;
    }
    
    .gallery-item.wide, .gallery-item.tall {
        grid-column: auto;
        grid-row: auto;
        height: 280px;
    }
}

/* =============================================
 * INSTAGRAM FEED SECTION
 * ============================================= */

.instagram-feed {
    background-color: #111;
    padding: 60px 0;
    border-top: 1px solid #222;
    border-bottom: 1px solid #222;
}

.instagram-item {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    height: 200px;
}

.instagram-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s ease;
}

.instagram-item:hover img {
    transform: scale(1.05);
}

.instagram-item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.4s ease;
}

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

.instagram-icon {
    color: white;
    font-size: 2rem;
}

/* =============================================
 * CTA SECTION
 * ============================================= */

.gallery-cta {
    padding: 60px 0;
}

.cta-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, #6dd5ed 100%);
    color: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.cta-card h2 {
    font-size: 2rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.cta-card p {
    font-size: 1.1rem;
    margin-bottom: 0;
    opacity: 0.9;
}

.cta-card::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 60%);
    transform: rotate(30deg);
}

.cta-card .btn {
    background-color: white;
    color: var(--primary-color);
    font-weight: 600;
    padding: 12px 25px;
    transition: all 0.3s ease;
}

.cta-card .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* =============================================
 * LOADING ANIMATION 
 * ============================================= */

.loading-animation {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
}

/* Fade-in animation for gallery items */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gallery-item {
    animation: fadeIn 0.5s ease forwards;
}

/* Staggered loading effect */
.gallery-item:nth-child(1) { animation-delay: 0.1s; }
.gallery-item:nth-child(2) { animation-delay: 0.2s; }
.gallery-item:nth-child(3) { animation-delay: 0.3s; }
.gallery-item:nth-child(4) { animation-delay: 0.4s; }
.gallery-item:nth-child(5) { animation-delay: 0.5s; }
.gallery-item:nth-child(6) { animation-delay: 0.6s; }
.gallery-item:nth-child(7) { animation-delay: 0.7s; }
.gallery-item:nth-child(8) { animation-delay: 0.8s; }
.gallery-item:nth-child(9) { animation-delay: 0.9s; }
.gallery-item:nth-child(10) { animation-delay: 1s; }
.gallery-item:nth-child(n+11) { animation-delay: 1.1s; }

/* Responsive Adjustments */
@media (max-width: 992px) {
    .gallery-hero {
        padding: 100px 0 60px;
    }
    
    .gallery-filter {
        margin-top: -40px;
    }
    
    .gallery-item {
        height: 250px;
    }
    
    .gallery-item.tall {
        height: 400px;
    }
}

@media (max-width: 768px) {
    .gallery-hero h1 {
        font-size: 2.2rem;
    }
    
    .gallery-hero p {
        font-size: 1rem;
    }
    
    .hero-badges .badge {
        font-size: 0.75rem;
        padding: 6px 15px;
    }
    
    .btn-filter {
        padding: 6px 15px;
        font-size: 0.9rem;
    }
    
    .cta-card {
        padding: 30px;
    }
    
    .cta-card h2 {
        font-size: 1.6rem;
    }
    
    .cta-card p {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .gallery-hero {
        padding: 80px 0 50px;
    }
    
    .gallery-filter {
        margin-top: -30px;
        padding: 10px;
    }
    
    .gallery-item {
        height: 220px;
    }
}

/* =============================================
 * LIGHTBOX CUSTOMIZATION 
 * ============================================= */

.lb-data .lb-caption {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
}

.lb-data .lb-details {
    width: 100%;
    text-align: center;
}

.lb-nav a.lb-next, .lb-nav a.lb-prev {
    opacity: 0.8;
}

.lb-outerContainer {
    border-radius: 5px 5px 0 0;
}

.lb-dataContainer {
    border-radius: 0 0 5px 5px;
}