/* Team Gallery CSS - Modern with Parallax */

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

/* Team Gallery Specific Variables */
:root {
    --team-hero-height: 100vh;
    --gallery-gap: 24px;
    --gallery-item-radius: 16px;
    --overlay-gradient: linear-gradient(135deg, rgba(25, 54, 95, 0.9) 0%, rgba(251, 194, 19, 0.8) 100%);
    --card-shadow: 0 8px 32px rgba(25, 54, 95, 0.12);
    --card-shadow-hover: 0 20px 60px rgba(25, 54, 95, 0.25);
    --transition-smooth: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-bounce: all 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --parallax-speed: 0.5;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Hero Section */
.team-hero {
    position: relative;
    height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #19365f;
    background-size: 200% 200%;
    animation: gradientShift 8s ease infinite;
}

.hero-content {
    text-align: center;
    color: white;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    color: white;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    margin-bottom: 0;
    line-height: 1.6;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    color: rgba(255, 255, 255, 0.9);
}

/* Gallery Section */
.team-gallery {
    padding: 80px 0;
    background: #f8f9fa;
}

.team-gallery .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.gallery-grid {
    column-count: 3;
    column-gap: 20px;
    width: 100%;
}

@media (max-width: 1024px) {
    .gallery-grid {
        column-count: 2;
        column-gap: 20px;
    }
}

@media (max-width: 768px) {
    .gallery-grid {
        column-count: 1;
        column-gap: 15px;
    }
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    background: white;
    opacity: 0;
    transform: translateY(20px);
    break-inside: avoid;
    margin-bottom: 20px;
    display: inline-block;
    width: 100%;
    page-break-inside: avoid;
    -webkit-column-break-inside: avoid;
    column-break-inside: avoid;
}

/* Spacer for masonry layout - helps position items in opposite columns */
.gallery-spacer {
    break-inside: avoid;
    page-break-inside: avoid;
    -webkit-column-break-inside: avoid;
    column-break-inside: avoid;
    height: 400px;
    margin-bottom: 20px;
    display: inline-block;
    width: 100%;
    visibility: hidden;
    pointer-events: none;
}

@media (max-width: 768px) {
    .gallery-spacer {
        display: none;
    }
}

.gallery-item.aos-animate {
    opacity: 1;
    transform: translateY(0);
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.gallery-image {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.gallery-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
    object-fit: cover;
    object-position: center;
}

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

/* Video Gallery Items */
.gallery-video-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #000;
}

.gallery-video-element {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
    object-fit: cover;
    object-position: center;
}

.gallery-item:hover .gallery-video-element {
    transform: scale(1.08);
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    cursor: pointer;
    z-index: 10;
}

.gallery-item:hover .video-overlay {
    background: rgba(0, 0, 0, 0.3);
}

.play-button,
.pause-button,
.volume-button,
.mute-button {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    position: absolute;
    z-index: 11;
}

.volume-button,
.mute-button {
    width: 50px;
    height: 50px;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.6);
}

.volume-button i,
.mute-button i {
    font-size: 1.2rem;
    color: #ffffff;
}

.play-button i,
.pause-button i {
    font-size: 2rem;
    color: #19365f;
}

.play-button i {
    margin-left: 5px;
}

.gallery-item:hover .play-button,
.gallery-item:hover .pause-button {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.gallery-item:hover .volume-button,
.gallery-item:hover .mute-button {
    transform: scale(1.1);
    background: rgba(0, 0, 0, 0.8);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

/* Ensure buttons are properly positioned and visible on hover */
.gallery-item:hover .video-overlay {
    pointer-events: auto;
}

/* Lightbox Video Styles */
.lightbox-video {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    opacity: 0;
}

.lightbox.active .lightbox-video {
    transform: scale(1);
    opacity: 1;
    animation: videoZoomIn 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.1s both;
}

@keyframes videoZoomIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Full-Screen Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    backdrop-filter: blur(10px);
}

.lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    animation: lightboxFadeIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes lightboxFadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(10px);
    }
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0.8) translateY(50px);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.lightbox.active .lightbox-content {
    transform: scale(1) translateY(0);
    animation: lightboxSlideIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes lightboxSlideIn {
    from {
        transform: scale(0.8) translateY(50px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.lightbox-image {
    max-width: 100%;
    max-height: 600px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transform: scale(0.9) rotate(2deg);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    opacity: 0;
}

.lightbox.active .lightbox-image {
    transform: scale(1) rotate(0deg);
    opacity: 1;
    animation: imageZoomIn 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.1s both;
}

@keyframes imageZoomIn {
    from {
        transform: scale(0.9) rotate(2deg);
        opacity: 0;
    }
    to {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 24px;
    color: #333;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 10000;
    transform: scale(0) rotate(180deg);
    opacity: 0;
}

.lightbox.active .lightbox-close {
    transform: scale(1) rotate(0deg);
    opacity: 1;
    animation: buttonSlideIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.2s both;
}

@keyframes buttonSlideIn {
    from {
        transform: scale(0) rotate(180deg);
        opacity: 0;
    }
    to {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}



/* Image transition effects */
.lightbox-image.transitioning {
    animation: imageTransition 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes imageTransition {
    0% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
    50% {
        transform: scale(0.95) rotate(1deg);
        opacity: 0.7;
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

/* Enhanced Scroll Effects */
.gallery-item {
    will-change: transform, opacity;
}

.gallery-item.scroll-reveal {
    animation: revealFromBottom 0.8s ease-out forwards;
}

@keyframes revealFromBottom {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Smooth scrolling enhancement */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

/* Enhanced hover effects */
.gallery-item:hover {
    z-index: 10;
}

.gallery-item:hover .gallery-image img {
    filter: brightness(1.1) contrast(1.05);
}

/* Responsive Design */
@media (max-width: 768px) {
    .team-hero {
        height: 60vh;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .team-gallery {
        padding: 60px 0;
    }
    
    .gallery-item {
        margin-bottom: 15px;
    }
    
    .lightbox-close {
        width: 40px;
        height: 40px;
        font-size: 20px;
        top: 15px;
        right: 20px;
    }
}

@media (max-width: 480px) {
    .team-hero {
        height: 50vh;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .team-gallery {
        padding: 40px 0;
    }
    
    .gallery-item {
        margin-bottom: 15px;
    }
    
    .lightbox-close {
        width: 35px;
        height: 35px;
        font-size: 18px;
        top: 10px;
        right: 15px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .hero-background {
        background-attachment: scroll;
    }
}

/* Print Styles */
@media print {
    .team-hero {
        display: none;
    }
    
    .gallery-item {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
}
