/* Import base styles from main stylesheet */
@import url('style.css');

/* Gallery-specific styles */

/* Gallery Hero Section */
.gallery-hero {
    background: linear-gradient(135deg, #0056b3 0%, #003d80 100%);
    color: white;
    text-align: center;
    padding: 120px 20px 80px;
    margin-top: 70px; /* Account for fixed header */
}

.gallery-hero h1 {
    font-size: 2.8rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.gallery-hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
    opacity: 0.9;
}

/* Image Gallery Section */
.image-gallery-section {
    padding: 80px 0;
    background-color: #f8f9fa;
}

.slideshow-container {
    position: relative;
    max-width: 1000px;
    margin: 0 auto 50px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.slide {
    display: none;
    position: relative;
}

.slide.active {
    display: block;
}

.slide img {
    width: 100%;
    height: 600px;
    object-fit: cover;
    display: block;
}

.slide-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 30px 20px 20px;
    font-size: 1.1rem;
    font-weight: 500;
}

/* Navigation Arrows */
.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    color: #0056b3;
    font-size: 1.5rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-arrow:hover {
    background: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transform: translateY(-50%) scale(1.1);
}

.prev-arrow {
    left: 20px;
}

.next-arrow {
    right: 20px;
}

/* Slide Counter */
.slide-counter {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Thumbnail Navigation */
.thumbnail-nav {
    max-width: 1000px;
    margin: 0 auto;
}

.thumbnail-container {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 10px 0;
    scrollbar-width: thin;
    scrollbar-color: #0056b3 #f1f1f1;
}

.thumbnail-container::-webkit-scrollbar {
    height: 8px;
}

.thumbnail-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.thumbnail-container::-webkit-scrollbar-thumb {
    background: #0056b3;
    border-radius: 10px;
}

.thumbnail-container::-webkit-scrollbar-thumb:hover {
    background: #003d80;
}

.thumbnail {
    flex-shrink: 0;
    width: 80px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid transparent;
}

.thumbnail:hover {
    transform: scale(1.05);
}

.thumbnail.active {
    border-color: #0056b3;
    transform: scale(1.1);
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Video Gallery Section */
.video-gallery-section {
    padding: 80px 0;
    background-color: white;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    max-width: 800px; /* Reduced max-width for vertical videos */
    margin: 0 auto;
}

.video-item {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.video-wrapper {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 177.78%; /* 9:16 aspect ratio for 1080x1920 (1920/1080 = 1.7778) */
    overflow: hidden;
}

.video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-info {
    padding: 25px;
}

.video-info h3 {
    color: #0056b3;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.video-info p {
    color: #555;
    line-height: 1.6;
}

/* Gallery CTA Section */
.gallery-cta-section {
    background: linear-gradient(135deg, #e6f0fa 0%, #cce6ff 100%);
    text-align: center;
    padding: 80px 20px;
}

.gallery-cta-section h2 {
    font-size: 2.2rem;
    color: #0056b3;
    margin-bottom: 20px;
    font-weight: 700;
}

.gallery-cta-section p {
    font-size: 1.2rem;
    color: #555;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 14px 35px;
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    text-align: center;
    text-decoration: none;
}

.btn-primary {
    background-color: #0056b3;
    color: white;
    border-color: #0056b3;
}

.btn-secondary {
    background-color: transparent;
    color: #0056b3;
    border-color: #0056b3;
}

.btn-primary:hover {
    background-color: #004a99;
    border-color: #004a99;
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-secondary:hover {
    background-color: #0056b3;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .gallery-hero h1 {
        font-size: 2.2rem;
    }

    .gallery-hero p {
        font-size: 1.1rem;
    }

    .slide img {
        height: 300px;
    }

    .nav-arrow {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .prev-arrow {
        left: 10px;
    }

    .next-arrow {
        right: 10px;
    }

    .slide-caption {
        font-size: 1rem;
        padding: 20px 15px 15px;
    }

    .video-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        max-width: 400px; /* Narrower for mobile vertical videos */
    }

    .video-item {
        margin: 0 10px;
    }

    .video-wrapper {
        padding-bottom: 177.78%; /* Keep the 9:16 aspect ratio */
    }

    .gallery-cta-section h2 {
        font-size: 1.8rem;
    }

    .gallery-cta-section p {
        font-size: 1.1rem;
    }

    .btn {
        padding: 12px 25px;
        width: 100%;
        max-width: 300px;
    }

    .cta-buttons {
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .gallery-hero {
        padding: 100px 15px 60px;
    }

    .gallery-hero h1 {
        font-size: 1.8rem;
    }

    .gallery-hero p {
        font-size: 1rem;
    }

    .slideshow-container {
        margin: 0 10px 30px;
    }

    .slide img {
        height: 250px;
    }

    .thumbnail {
        width: 60px;
        height: 45px;
    }

    .video-grid {
        max-width: 320px; /* Even narrower for small phones */
    }

    .gallery-cta-section h2 {
        font-size: 1.6rem;
    }

    .section-title {
        font-size: 1.8rem;
    }
}

/* Loading Animation */
.slide img {
    transition: opacity 0.5s ease-in-out;
}

.slide img.loading {
    opacity: 0.5;
}

/* Keyboard Navigation Indicator */
.slideshow-container:focus-within {
    outline: 3px solid #0056b3;
    outline-offset: 5px;
}

/* Video controls styling */
video::-webkit-media-controls-panel {
    background-color: rgba(0, 0, 0, 0.8);
}

video::-webkit-media-controls-play-button,
video::-webkit-media-controls-volume-slider,
video::-webkit-media-controls-timeline {
    filter: invert(1);
}