/* 갤러리 슬라이더 스타일 */
.gallery-section {
    padding: 80px 0;
    background: #f8f9fa;
    overflow: hidden; /* 블러된 이미지가 섹션 밖으로 나가지 않도록 */
}

.gallery-header {
    text-align: center;
    margin-bottom: 60px;
}

.gallery-header h2 {
    font-size: 40px;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
    line-height: 1.2;
}
.gallery-header h2 a{
    color: #333;
    text-decoration: none !important;
}

.gallery-header p {
    font-size: 18px;
    color: #666;
    margin: 0;
    line-height: 1.6;
}

.gallery-slider-wrapper {
    position: relative;
    max-width: 100%;
    margin: 0 auto;
    padding: 0; /* 패딩 제거로 전체 너비 활용 */
}

.gallery-swiper {
    overflow: visible;
    padding: 0 60px; /* 좌우 여백을 늘려 블러된 이미지가 더 잘 보이도록 */
}

.gallery-swiper .swiper-wrapper {
    align-items: stretch;
}

.gallery-swiper .swiper-slide {
    height: auto;
    width: auto; /* 자동 크기 - swiper 설정에서 조정 */
    flex-shrink: 0;
    transition: all 0.3s ease; /* 블러 효과를 위한 트랜지션 */
}

/* 모든 슬라이드 기본 상태 - 블러 및 스케일 효과 */
.gallery-swiper .swiper-slide {
    transform: scale(0.85);
    opacity: 0.5;
    transition: all 0.4s ease;
}

.gallery-swiper .swiper-slide .gallery-card {
    filter: blur(4px);
    transition: all 0.4s ease;
}

/* 중앙 영역의 슬라이드들만 선명하게 (활성 + 바로 앞뒤 슬라이드) */
.gallery-swiper .swiper-slide-active,
.gallery-swiper .swiper-slide-next,
.gallery-swiper .swiper-slide-prev {
    transform: scale(1);
    opacity: 1;
}

.gallery-swiper .swiper-slide-active .gallery-card,
.gallery-swiper .swiper-slide-next .gallery-card,
.gallery-swiper .swiper-slide-prev .gallery-card {
    filter: none; /* 블러 제거 */
}

/* 더 멀리 있는 슬라이드들은 더 흐리게 */
.gallery-swiper .swiper-slide:not(.swiper-slide-active):not(.swiper-slide-next):not(.swiper-slide-prev) {
    transform: scale(0.75);
    opacity: 0.3;
}

.gallery-swiper .swiper-slide:not(.swiper-slide-active):not(.swiper-slide-next):not(.swiper-slide-prev) .gallery-card {
    filter: blur(6px);
}

/* 갤러리 카드 링크 스타일 */
.gallery-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.gallery-card-link:hover {
    text-decoration: none;
    color: inherit;
}

/* 갤러리 카드 스타일 */
.gallery-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease, opacity 0.3s ease, transform 0.3s ease, filter 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    opacity: 0.4;
    filter: blur(1px);
    transform: translateY(10px);
}

/* 활성 상태 갤러리 카드 */
.gallery-card.active {
    opacity: 1;
    filter: none;
    transform: translateY(0);
}

.gallery-card:hover {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.gallery-card-image {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
    background: #f0f0f0;
    border-radius: 15px 15px 0 0;
}

.gallery-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.gallery-card:hover .gallery-card-image img {
    transform: scale(1.05);
}

.gallery-card-image .notice-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #dc3545;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    z-index: 2;
}

.gallery-card-content {
    padding: 30px 30px 25px 30px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: center;
}

.gallery-card-title {
    font-size: 1rem;
    font-family: 'GmarketSansMedium' !important;
    color: #333;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gallery-card-date {
    font-size: 16px;
    color: #999;
    margin-bottom: 25px;
    font-weight: 400;
    letter-spacing: 0.3px;
}

.gallery-card-btn {
    display: inline-block;
    padding: 12px 24px;
    background: transparent;
    color: #666;
    text-decoration: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-weight: 500;
    font-size: 14px;
    text-align: center;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    align-self: center;
    margin-top: auto;
}

.gallery-card-btn:hover {
    background: #007bff;
    border-color: #007bff;
    color: white;
    transform: translateY(-1px);
}

/* 네비게이션 버튼 */
.gallery-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    z-index: 10;
    transform: translateY(-50%);
}

.gallery-button-prev,
.gallery-button-next {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: all;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.gallery-button-prev:hover,
.gallery-button-next:hover {
    background: white;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.gallery-button-prev i,
.gallery-button-next i {
    font-size: 16px;
    color: #333;
}

.gallery-button-prev {
    left: -25px; /* 슬라이더 외부 위치 */
    z-index: 20;
}

.gallery-button-next {
    right: -25px; /* 슬라이더 외부 위치 */
    z-index: 20;
}

/* 빈 갤러리 스타일 */
.empty-gallery {
    text-align: center;
    padding: 80px 20px;
    color: #888;
    font-size: 18px;
}

/* 반응형 디자인 */
@media (max-width: 1200px) {
    .gallery-slider-wrapper {
        padding: 0;
    }
    
    .gallery-swiper {
        padding: 0 50px;
    }
    
    .gallery-button-prev {
        left: -20px;
    }

    .gallery-button-next {
        right: -20px;
    }
}

@media (max-width: 992px) {
    .gallery-section {
        padding: 60px 0;
    }
    
    .gallery-header h2 {
        font-size: 32px;
    }
    
    .gallery-header p {
        font-size: 16px;
    }
    
    .gallery-slider-wrapper {
        padding: 0;
    }
    
    .gallery-swiper {
        padding: 0 40px;
    }
    
    .gallery-button-prev,
    .gallery-button-next {
        width: 45px;
        height: 45px;
    }
    
    .gallery-button-prev i,
    .gallery-button-next i {
        font-size: 14px;
    }
    
    .gallery-button-prev {
        left: -15px;
    }

    .gallery-button-next {
        right: -15px;
    }
}

@media (max-width: 768px) {
    .gallery-header {
        margin-bottom: 40px;
    }
    
    .gallery-header h2 {
        font-size: 28px;
    }
    
    .gallery-header p {
        font-size: 15px;
    }
    
    .gallery-card-image {
        height: 220px;
    }
    
    .gallery-card-content {
        padding: 25px;
    }
    
    .gallery-card-title {
        font-size: 18px;
        margin-bottom: 12px;
    }
    
    .gallery-card-date {
        font-size: 14px;
        margin-bottom: 18px;
    }
    
    .gallery-card-btn {
        padding: 10px 20px;
        font-size: 13px;
    }
    
    /* 모바일에서도 블러 효과 유지 */
    .gallery-swiper .swiper-slide {
        transform: scale(0.9);
        opacity: 0.6;
    }
    
    .gallery-swiper .swiper-slide .gallery-card {
        filter: blur(2px);
    }
    
    .gallery-swiper .swiper-slide-active {
        transform: scale(1);
        opacity: 1;
    }
    
    .gallery-swiper .swiper-slide-active .gallery-card {
        filter: none;
    }
    
    .gallery-nav {
        display: flex; /* 모바일에서도 네비게이션 표시 */
    }
    
    .empty-gallery {
        padding: 60px 20px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .gallery-section {
        padding: 40px 0;
    }
    
    .gallery-header h2 {
        font-size: 24px;
    }
    
    .gallery-header p {
        font-size: 14px;
    }
    
    .gallery-slider-wrapper {
        padding: 0;
    }
    
    .gallery-swiper {
        padding: 0 20px;
    }
    
    .gallery-card-image {
        height: 180px;
    }
    
    .gallery-card-content {
        padding: 20px;
    }
    
    .gallery-card-title {
        font-size: 16px;
        margin-bottom: 10px;
    }
    
    .gallery-card-date {
        font-size: 13px;
        margin-bottom: 15px;
    }
    
    .gallery-card-btn {
        padding: 9px 18px;
        font-size: 12px;
    }
    
    /* 작은 모바일에서는 블러 효과 약하게 */
    .gallery-swiper .swiper-slide {
        transform: scale(0.98);
        opacity: 0.8;
    }
    
    .gallery-swiper .swiper-slide .gallery-card {
        filter: blur(0.5px);
    }
    
    .gallery-swiper .swiper-slide-active {
        transform: scale(1);
        opacity: 1;
    }
    
    .gallery-swiper .swiper-slide-active .gallery-card {
        filter: none;
    }
}

/* 스와이퍼 기본 스타일 오버라이드 - 위의 블러 효과를 우선 적용 */

/* 로딩 상태 */
.gallery-card.loading {
    pointer-events: none;
}

.gallery-card.loading .gallery-card-image img {
    opacity: 0.5;
    filter: blur(2px);
}

/* 호버 효과 개선 */
@media (min-width: 769px) {
    .gallery-card {
        cursor: pointer;
    }
    
    .gallery-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(135deg, transparent 0%, rgba(0, 123, 255, 0.05) 100%);
        opacity: 0;
        transition: opacity 0.3s ease;
        pointer-events: none;
        z-index: 1;
    }
    
    .gallery-card:hover::before {
        opacity: 1;
    }
}
