/* ===== Design Improvements CSS ===== */
/* 2025년 12월 15일 - 디자인 개선 사항 */

/* ===== 1. 탭 버튼 활성 상태 애니메이션 ===== */
.tab-button {
    position: relative;
    overflow: hidden;
}

/* 탭 버튼 하단 밑줄 애니메이션 */
.tab-button::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #10b981, #34d399);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(-50%);
}

.tab-button:hover::after {
    width: 60%;
}

.tab-button.active::after {
    width: 100%;
    left: 0;
    transform: translateX(0);
}

/* 탭 버튼 활성 상태 개선 */
.tab-button.active {
    border-bottom-color: transparent !important;
    background: linear-gradient(180deg, rgba(16, 185, 129, 0.05) 0%, rgba(16, 185, 129, 0.1) 100%);
}

/* 탭 아이콘 활성 상태 애니메이션 */
.tab-button .tab-icon {
    transition: transform 0.3s ease, color 0.3s ease;
}

.tab-button.active .tab-icon {
    transform: scale(1.1);
    color: #059669;
}

.tab-button:hover .tab-icon {
    transform: scale(1.05);
}

/* ===== 2. 버튼 Hover 상태 일관성 개선 ===== */
/* 공통 버튼 스타일 */
button,
.btn,
[class*="btn-"] {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Primary 버튼 hover */
.btn-primary:hover,
button.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(30, 64, 175, 0.3);
}

/* Solution 버튼 hover 개선 */
.solution-btn-compact {
    position: relative;
    overflow: hidden;
}

.solution-btn-compact::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.solution-btn-compact:hover::before {
    left: 100%;
}

/* 카드 hover 효과 통일 */
.feature-card,
.management-card,
.value-card,
.info-card,
.paradigm-card-v2,
.feature-detail-card,
.solution-card-compact {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card:hover,
.management-card:hover,
.value-card:hover,
.info-card:hover,
.paradigm-card-v2:hover,
.feature-detail-card:hover,
.solution-card-compact:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

/* ===== 3. 섹션 간격 개선 ===== */
/* 메인 섹션 간격 통일 */
.paradigm-section-v2,
.solutions-section-compact {
    padding-top: 60px;
    padding-bottom: 60px;
}

/* 회사소개 섹션 간격 */
.company-info-section {
    padding: 60px 0 40px;
}

/* 푸터 내 회사정보 섹션은 패딩 제거 (푸터 정렬 문제 해결) */
footer.main-footer .company-info-section,
.main-footer .company-info-section {
    padding: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin: 0 !important;
}

.core-values-section {
    padding: 60px 0 40px;
}

.clients-section {
    padding: 60px 0 80px;
}

/* 섹션 헤더 간격 */
.section-header {
    margin-bottom: 40px;
}

/* ===== 4. 푸터 마진 조정 ===== */
.main-footer {
    margin-top: 0 !important;
}

/* 페이지별 푸터 마진 제거 */
.company-about-container + .main-footer,
.tab-content + .main-footer {
    margin-top: 0;
}

/* ===== 5. 추가 개선 사항 ===== */
/* 스크롤 스무스 */
html {
    scroll-behavior: smooth;
}

/* 포커스 상태 개선 (접근성) */
.tab-button:focus-visible,
button:focus-visible,
.btn:focus-visible {
    outline: 2px solid #10b981;
    outline-offset: 2px;
}

/* 로딩 스피너 개선 */
.spinner-border {
    animation: spinner-border 0.75s linear infinite;
}

@keyframes spinner-border {
    to {
        transform: rotate(360deg);
    }
}

/* 이미지 로딩 플레이스홀더 */
img {
    background-color: #f3f4f6;
}

img[src=""],
img:not([src]) {
    visibility: hidden;
}

/* ===== 6. 반응형 개선 ===== */
@media (max-width: 768px) {
    /* 탭 버튼 모바일 최적화 */
    .tab-button {
        min-width: 80px;
        padding: 12px 8px;
    }

    .tab-button .tab-label {
        font-size: 0.8rem;
    }

    .tab-button .tab-icon {
        font-size: 1.2rem;
    }

    /* 섹션 간격 모바일 조정 */
    .paradigm-section-v2,
    .solutions-section-compact,
    .company-info-section,
    .core-values-section,
    .clients-section {
        padding-top: 40px;
        padding-bottom: 40px;
    }

    .section-header {
        margin-bottom: 30px;
    }
}

/* ===== 7. 애니메이션 성능 최적화 ===== */
.tab-button,
.feature-card,
.management-card,
.value-card,
.info-card,
.paradigm-card-v2,
.feature-detail-card,
.solution-card-compact {
    will-change: transform;
}

/* GPU 가속 활성화 */
.hero-slide,
.rotating-image-item {
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* ===== 8. 회사소개 페이지 SVG 아이콘 스타일 ===== */
.info-icon-svg svg,
.vm-icon-svg svg {
    width: 100% !important;
    height: 100% !important;
    color: #3b82f6 !important;
    fill: #3b82f6 !important;
}

.info-icon-svg,
.vm-icon-svg {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== 9. 마이크로 인터랙션 강화 ===== */

/* 링크 호버 효과 */
a:not(.nav-link):not(.btn):not(.solution-btn-compact) {
    position: relative;
    transition: color 0.2s ease;
}

a:not(.nav-link):not(.btn):not(.solution-btn-compact):hover {
    color: #2563eb;
}

/* 네비게이션 링크 호버 애니메이션 */
.nav-link {
    position: relative;
    transition: color 0.3s ease, transform 0.2s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #2563eb, #3b82f6);
    transition: width 0.3s ease, left 0.3s ease;
}

.nav-link:hover::after {
    width: 80%;
    left: 10%;
}

.nav-link.active::after {
    width: 100%;
    left: 0;
}

/* 버튼 클릭 피드백 (active 상태) */
button:active,
.btn:active,
.solution-btn-compact:active {
    transform: scale(0.97) !important;
    transition: transform 0.1s ease !important;
}

/* 버튼 리플 효과 기본 설정 */
.ripple-effect {
    position: relative;
    overflow: hidden;
}

.ripple-effect::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 60%);
    transform: scale(0);
    opacity: 0;
    transition: transform 0.5s ease, opacity 0.3s ease;
}

.ripple-effect:active::after {
    transform: scale(2);
    opacity: 1;
    transition: transform 0s, opacity 0s;
}

/* 아이콘 호버 애니메이션 */
.fas, .far, .fab {
    transition: transform 0.2s ease, color 0.2s ease;
}

button:hover .fas,
button:hover .far,
button:hover .fab,
a:hover .fas,
a:hover .far,
a:hover .fab {
    transform: scale(1.1);
}

/* 텍스트 선택 색상 */
::selection {
    background-color: #2563eb;
    color: white;
}

::-moz-selection {
    background-color: #2563eb;
    color: white;
}

/* 입력 필드 포커스 효과 */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
    border-color: #2563eb;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

/* 카드 아이콘 호버 효과 */
.card-icon-compact,
.paradigm-icon,
.feature-icon {
    transition: transform 0.3s ease, color 0.3s ease;
}

.solution-card-compact:hover .card-icon-compact,
.paradigm-card-v2:hover .paradigm-icon,
.feature-card:hover .feature-icon {
    transform: scale(1.15) rotate(5deg);
}

/* 체크마크/완료 아이콘 애니메이션 */
@keyframes checkBounce {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.check-icon-animated {
    animation: checkBounce 0.4s ease;
}

/* 로딩 도트 애니메이션 */
@keyframes loadingDots {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

.loading-dots span {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin: 0 4px;
    background-color: #2563eb;
    border-radius: 50%;
    animation: loadingDots 1.4s infinite ease-in-out both;
}

.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }

/* 스크롤 표시기 */
.scroll-indicator {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #2563eb, #10b981);
    z-index: 9999;
    transition: width 0.1s ease;
}

/* 페이드 인 애니메이션 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.5s ease forwards;
}

/* 숫자 카운트업 효과용 */
@keyframes countUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.count-up {
    animation: countUp 0.5s ease forwards;
}

/* Back to Top 버튼 개선 */
.back-to-top-btn {
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
}

.back-to-top-btn:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.35);
}

.back-to-top-btn:active {
    transform: translateY(-2px) scale(1);
}

/* 툴팁 애니메이션 */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    padding: 8px 12px;
    background: #1f2937;
    color: white;
    font-size: 12px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 1000;
}

[data-tooltip]:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-5px);
}
