/**
 * @TAG: TDD-IMPLEMENTATION-GREEN
 * Services Gallery CSS - 서비스 갤러리 Owl Carousel 구현
 * GREEN Phase: 테스트 통과를 위한 CSS 구현
 */

/* Services Section */
.services-section {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 100px 60px;
}

.services-gallery {
    position: relative;
    padding: 40px 0;
    margin: 60px 0;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Owl Carousel 스타일 오버라이드 */
.owl-carousel {
    position: relative;
}

.owl-stage-outer {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    background: transparent;
    padding: 20px 0;
    min-height: 280px;
}

.owl-stage {
    position: relative;
    display: flex;
    transition: transform 0.5s ease-in-out;
    padding: 0;
}

.item {
    flex: 0 0 auto;
    width: 320px;
    margin-right: 30px;
    min-width: 320px !important;
}

/* 새로운 서비스 아이템 스타일 */
.service-item {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    padding-top: 50px;
    text-align: center;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.service-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.service-thumbnail {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    z-index: 2;
}

.service-thumbnail i {
    font-size: 1.5rem;
    color: white;
    transition: all 0.3s ease;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.service-thumbnail:hover i {
    transform: scale(1.1);
    color: #ffd700;
}

.service-content {
    padding: 60px 20px 20px 20px;
    text-align: center;
}

.service-title {
    font-size: 1.2em;
    font-weight: 700;
    color: var(--dark);
    margin: 0 0 10px 0;
}

.service-content p {
    font-size: 0.9em;
    color: var(--gray);
    margin: 0;
    line-height: 1.4;
}

/* Owl Carousel 네비게이션 스타일 */
.owl-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    pointer-events: none;
}

.owl-nav .owl-prev,
.owl-nav .owl-next {
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: 50%;
    color: white;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    pointer-events: all;
    transition: all 0.3s ease;
}

.owl-nav .owl-prev:hover,
.owl-nav .owl-next:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
}

.owl-nav .owl-prev.disabled,
.owl-nav .next.disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    transform: none;
}

/* Owl Carousel 도트 네비게이션 제거됨 */

/* 기존 애니메이션 키프 유지 */
@keyframes slideGallery {
    0% { transform: translateX(0); }
    100% { transform: translateX(-220px); } /* 아이템 너비 (200px) + gap (20px) */
}

.services-container.auto-slide {
    animation: slideGallery 1.5s ease-in-out forwards;
}

/* 호환성을 위한 기존 네비게이션 버튼 스타일 (추후 제거 가능) */
.services-nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    display: none; /* Owl Carousel 네비게이션 사용하므로 숨김 */
}

.service-nav-btn {
    background: var(--primary);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-nav-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
}

.service-nav-btn:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    transform: none;
}

/* Owl Carousel 반응형 스타일 조정 */
@media (max-width: 1200px) {
    .owl-item {
        width: 180px;
        margin-right: 15px;
    }
}

@media (max-width: 1024px) {
    .owl-item {
        width: 220px;
        margin-right: 15px;
    }
}

@media (max-width: 768px) {
    .services-section {
        padding: 60px 30px;
    }

    .services-gallery {
        padding: 30px 20px;
        margin: 40px 20px;
    }

    .owl-stage-outer {
        padding: 0 10px;
    }

    .owl-item {
        width: 280px;
        margin-right: 15px;
    }

    .service-thumbnail {
        height: 140px;
    }

    .service-title {
        font-size: 15px;
    }

    /* 모바일에서는 네비게이션 숨김 */
    .owl-nav {
        display: none; /* 모바일에서는 터치식 네비게이션 사용 */
    }

    /* owl-dots 제거됨 */
}

@media (max-width: 480px) {
    .services-gallery {
        padding: 20px 15px;
        margin: 30px 15px;
    }

    .owl-stage-outer {
        padding: 0 5px;
    }

    .owl-item {
        width: 260px;
        margin-right: 10px;
    }

    .service-thumbnail {
        height: 130px;
    }

    /* 모바일에서는 네비게이션 숨김 */
    .owl-nav {
        display: none;
    }
}