/* Gallery Page Styles */

/* Gallery Hero Section */
.gallery-hero {
    width: 100%;
    max-width: 100vw;
    padding: 8rem 2rem 4rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.6) 0%, rgba(118, 75, 162, 0.6) 100%),
                url('../img/team/KakaoTalk_Photo_2026-01-07-17-56-38.png') center/cover no-repeat;
    background-attachment: scroll;
    color: #ffffff;
    text-align: center;
    box-sizing: border-box;
    overflow-x: hidden;
    position: relative;
    margin-top: -20px;
}

.gallery-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 0;
}

.gallery-hero-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 5rem;
    position: relative;
    z-index: 1;
}

.gallery-hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.gallery-hero-subtitle {
    font-size: 1.5rem;
    font-weight: 400;
    line-height: 1.6;
    color: #f0f0f0;
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

/* Gallery Content Section */
.gallery-content {
    width: 100%;
    max-width: 100vw;
    padding: 6rem 2rem;
    background-color: #ffffff;
    box-sizing: border-box;
    overflow-x: hidden;
}

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

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    width: 100%;
}

.gallery-item {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

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

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

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%);
    padding: 2rem 1.5rem 1.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.gallery-caption {
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Tablet Styles */
@media screen and (max-width: 1024px) {
    .gallery-hero {
        padding: 7rem 2rem 3.5rem;
    }

    .gallery-hero-title {
        font-size: 2.8rem;
    }

    .gallery-hero-subtitle {
        font-size: 1.3rem;
    }

    .gallery-content {
        padding: 5rem 2rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }
}

/* Mobile Styles */
@media screen and (max-width: 768px) {
    .gallery-hero {
        padding: 6rem 1.5rem 3rem;
        margin-top: 80px;
    }

    .gallery-hero-title {
        font-size: 2.2rem;
        margin-bottom: 1rem;
    }

    .gallery-hero-subtitle {
        font-size: 1.2rem;
    }

    .gallery-content {
        padding: 4rem 1.5rem;
    }

    .gallery-container {
        padding: 0;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .gallery-item {
        aspect-ratio: 16 / 9;
    }

    .gallery-overlay {
        padding: 1.5rem 1rem 1rem;
        opacity: 1;
    }

    .gallery-caption {
        font-size: 1rem;
    }
}

/* Small Mobile Styles */
@media screen and (max-width: 480px) {
    .gallery-hero {
        padding: 5rem 1rem 2.5rem;
    }

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

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

    .gallery-content {
        padding: 3rem 1rem;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .gallery-item {
        aspect-ratio: 16 / 9;
    }

    .gallery-overlay {
        padding: 1.25rem 0.875rem 0.875rem;
    }

    .gallery-caption {
        font-size: 0.95rem;
    }
}

/* Extra Small Mobile Styles */
@media screen and (max-width: 360px) {
    .gallery-hero {
        padding: 4rem 0.75rem 2rem;
    }

    .gallery-hero-title {
        font-size: 1.6rem;
    }

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

    .gallery-content {
        padding: 2.5rem 0.75rem;
    }

    .gallery-caption {
        font-size: 0.9rem;
    }
}

/* Lightbox Modal Styles */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.lightbox-image {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    color: #ffffff;
    font-size: 3rem;
    font-weight: 300;
    cursor: pointer;
    z-index: 10000;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
}

.lightbox-close:hover {
    background-color: rgba(0, 0, 0, 0.8);
    transform: rotate(90deg);
}

.lightbox-caption {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 1rem 2rem;
    border-radius: 25px;
    max-width: 80%;
    word-wrap: break-word;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #ffffff;
    font-size: 2.5rem;
    font-weight: 300;
    cursor: pointer;
    padding: 1rem 1.5rem;
    background-color: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    user-select: none;
}

.lightbox-prev {
    left: 2rem;
}

.lightbox-next {
    right: 2rem;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background-color: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1);
}

/* Mobile Styles for Lightbox */
@media screen and (max-width: 768px) {
    .lightbox-image {
        max-width: 95%;
        max-height: 85%;
    }

    .lightbox-close {
        top: 1rem;
        right: 1rem;
        font-size: 2.5rem;
        width: 45px;
        height: 45px;
    }

    .lightbox-caption {
        bottom: 1rem;
        font-size: 1rem;
        padding: 0.75rem 1.5rem;
        max-width: 90%;
    }

    .lightbox-prev,
    .lightbox-next {
        font-size: 2rem;
        width: 50px;
        height: 50px;
        padding: 0.75rem 1rem;
    }

    .lightbox-prev {
        left: 1rem;
    }

    .lightbox-next {
        right: 1rem;
    }
}

@media screen and (max-width: 480px) {
    .lightbox-close {
        top: 0.75rem;
        right: 0.75rem;
        font-size: 2rem;
        width: 40px;
        height: 40px;
    }

    .lightbox-caption {
        bottom: 0.75rem;
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }

    .lightbox-prev,
    .lightbox-next {
        font-size: 1.5rem;
        width: 45px;
        height: 45px;
        padding: 0.5rem;
    }

    .lightbox-prev {
        left: 0.5rem;
    }

    .lightbox-next {
        right: 0.5rem;
    }
}

