.video-gallery-section {
    padding: 6rem 0;
    background: #f4f9fa; /* Light Teal background tint */
    font-family: 'Inter', -apple-system, sans-serif;
    color: #333333;
}

.gallery-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    flex-direction: column;
    gap: 5rem;
    box-sizing: border-box;
}

/* Video Block */
.video-wrapper {
    background: #ffffff;
    border: 1px solid rgba(15, 82, 186, 0.05);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 10px 40px rgba(15, 82, 186, 0.03);
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 3rem;
    align-items: center;
    box-sizing: border-box;
}

.video-info {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.video-section-title {
    font-family: 'Poppins', -apple-system, sans-serif;
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.2;
    color: #0b2240;
    margin: 0;
}

.video-section-title span {
    color: #008080;
}

.video-section-headline {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #555555;
    margin: 0;
}

.video-frame-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.video-frame-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Gallery Block */
.gallery-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.gallery-header-section {
    text-align: center;
    max-width: 650px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.gallery-title {
    font-family: 'Poppins', -apple-system, sans-serif;
    font-size: 2.25rem;
    font-weight: 700;
    color: #0b2240;
    margin: 0;
}

.gallery-title span {
    color: #008080;
}

.gallery-subtitle {
    font-size: 1rem;
    color: #666666;
    margin: 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    grid-template-rows: 240px 240px;
    gap: 1.5rem;
}

/* 3-Layer Gallery Card System */
.gallery-card-wrapper {
    opacity: 0;
    will-change: transform, opacity;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.gallery-card-wrapper.item-1 {
    grid-column: 1;
    grid-row: 1 / span 2;
}

.gallery-card-wrapper.item-2 {
    grid-column: 2;
    grid-row: 1;
}

.gallery-card-wrapper.item-3 {
    grid-column: 3;
    grid-row: 1;
}

.gallery-card-wrapper.item-4 {
    grid-column: 2 / span 2;
    grid-row: 2;
}

.gallery-card-wrapper.animate-gallery {
    animation: galleryFadeInUp 0.8s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

.gallery-card-float {
    animation: galleryCardFloat 5s ease-in-out infinite;
    will-change: transform;
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
}

.gallery-card {
    position: relative;
    background: #ffffff;
    border-radius: 24px;
    overflow: hidden;
    height: 100%;
    border: 3px solid #ffffff; /* Clean white border */
    box-shadow: 0 10px 30px rgba(6, 26, 53, 0.06);
    transition: transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-sizing: border-box;
    will-change: transform, box-shadow;
    display: block;
}

.gallery-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(6, 26, 53, 0.15), 0 0 20px rgba(0, 128, 128, 0.12);
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1), filter 0.8s ease;
}

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

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, transparent 40%, rgba(6, 26, 53, 0.85) 100%);
    transition: background 0.5s ease;
    z-index: 1;
}

.gallery-card:hover .gallery-overlay {
    background: linear-gradient(180deg, rgba(6, 26, 53, 0.25) 0%, rgba(6, 26, 53, 0.95) 100%);
}

.gallery-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1.75rem;
    z-index: 2;
    box-sizing: border-box;
    color: #ffffff;
    display: flex;
    flex-direction: column;
}

.gallery-facility-name {
    font-family: 'Poppins', -apple-system, sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    color: #ffffff;
    transition: transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.gallery-facility-desc {
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.88);
    margin: 0.4rem 0 0 0;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    line-height: 1.4;
}

.gallery-explore-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: #00e5ff;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    margin-top: 0.85rem;
}

.gallery-explore-btn .arrow {
    transition: transform 0.3s ease;
}

.gallery-card:hover .gallery-facility-desc {
    opacity: 1;
    transform: translateY(0);
}

.gallery-card:hover .gallery-facility-name {
    transform: translateY(-8px);
}

.gallery-card:hover .gallery-explore-btn {
    opacity: 1;
    transform: translateY(0);
}

.gallery-card:hover .gallery-explore-btn .arrow {
    transform: translateX(4px);
}

/* Gallery Footer CTA */
.gallery-footer {
    text-align: center;
    margin-top: 3.5rem;
}

.explore-all-facilities-btn {
    display: inline-block;
    padding: 0.9rem 2.6rem;
    background: #008080;
    color: #ffffff !important;
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 4px 15px rgba(0, 128, 128, 0.2);
}

.explore-all-facilities-btn:hover {
    background: #006666;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 102, 102, 0.35);
}

/* Animations */
@keyframes galleryFadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes galleryCardFloat {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-4px);
    }
    100% {
        transform: translateY(0);
    }
}

/* Responsive Overrides */
@media (max-width: 1024px) {
    .video-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 2rem;
    }
    .gallery-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 220px 220px;
        gap: 1.25rem;
    }
    .gallery-card-wrapper.item-1 {
        grid-column: 1;
        grid-row: 1 / span 2;
        height: 100%;
    }
    .gallery-card-wrapper.item-2 {
        grid-column: 2;
        grid-row: 1;
    }
    .gallery-card-wrapper.item-3 {
        grid-column: 2;
        grid-row: 2;
    }
    .gallery-card-wrapper.item-4 {
        grid-column: 1 / span 2;
        grid-row: 3;
        height: 220px;
    }
}

@media (max-width: 768px) {
    .video-gallery-section {
        padding: 4rem 0;
    }
    .gallery-container {
        gap: 3.5rem;
        padding: 0 1.5rem;
    }
    .video-section-title, .gallery-title {
        font-size: 1.8rem;
    }
    
    /* Swipe snapping mobile carousel */
    .gallery-grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 1.25rem;
        padding: 0.5rem 0 1.5rem 0;
        -webkit-overflow-scrolling: touch;
    }
    
    .gallery-card-wrapper {
        flex: 0 0 85%;
        scroll-snap-align: center;
        height: 320px !important;
    }
    
    .gallery-card-wrapper.item-1,
    .gallery-card-wrapper.item-2,
    .gallery-card-wrapper.item-3,
    .gallery-card-wrapper.item-4 {
        grid-column: auto !important;
        grid-row: auto !important;
    }
    
    .gallery-facility-desc {
        opacity: 1 !important;
        transform: none !important;
    }
    
    .gallery-explore-btn {
        opacity: 1 !important;
        transform: none !important;
    }
    
    .gallery-card:hover .gallery-facility-name {
        transform: none !important;
    }
    
    .gallery-grid::-webkit-scrollbar {
        display: none;
    }
    
    .gallery-grid {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
}

/* Reduced Motion Settings */
@media (prefers-reduced-motion: reduce) {
    .gallery-card-wrapper.animate-gallery {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
    .gallery-card-float {
        animation: none !important;
    }
    .gallery-image {
        transition: none !important;
    }
    .gallery-card:hover .gallery-image {
        transform: none !important;
    }
}
