/* 기본 리셋 및 전역 스타일 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 헤더 스타일 */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo i {
    font-size: 2rem;
    color: #ffd700;
}

/* 사이트 공통 로고 아이콘을 이미지로 교체 */
.logo i.fas.fa-robot {
    display: none;
}

.logo h1::before {
    content: '';
    display: inline-block;
    width: 59px;
    height: 59px;
    background-image: url('img/mainicon.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    vertical-align: middle;
    position: relative;
    top: -2px;
}

/* 사이트 네임 옆 Beta 뱃지 */
.logo h1::after {
    content: 'BETA';
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #ffd700;
    background: rgba(255, 215, 0, 0.12);
    border: 1px solid rgba(255, 215, 0, 0.6);
    border-radius: 999px;
    vertical-align: middle;
    position: relative;
    top: -2px;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
}

.nav {
    display: flex;
    gap: 30px;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #ffd700;
}

/* 메인 콘텐츠 */
.main {
    padding: 2rem 0;
}

/* 히어로 섹션 */
.hero {
    text-align: center;
    padding: 3rem 0;
    background: white;
    border-radius: 15px;
    margin-bottom: 3rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.hero-description {
    font-size: 1.2rem;
    color: #7f8c8d;
    max-width: 600px;
    margin: 0 auto;
}

/* 히어로 공지 배지 */
.hero-notice {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.9rem;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    background: #f1f5ff;
    border: 1px solid #e1e7ff;
    color: #3b4cca;
    font-weight: 600;
    font-size: 0.95rem;
}
.hero-notice i { color: #3b4cca; }

/* 서비스 섹션 */
.services {
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 2rem;
    color: #2c3e50;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.service-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
}

.service-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    margin: 0 auto 1.5rem;
}

.service-icon i {
    font-size: 2rem;
    color: white;
}

.service-title {
    font-size: 1.3rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.service-description {
    text-align: center;
    color: #7f8c8d;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.service-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #e74c3c;
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.service-card[data-route="data-analysis"] .service-badge {
    background: #2ecc71;
}

/* 통계 섹션 */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    background: white;
    padding: 3rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 3rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    color: #7f8c8d;
    font-weight: 500;
}

/* 푸터 */
.footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 1rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .service-grid {
        grid-template-columns: 1fr;
    }

    .stats {
        grid-template-columns: repeat(2, 1fr);
        padding: 2rem;
    }

    .nav {
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero {
        padding: 2rem 1rem;
    }

    .service-card {
        padding: 1.5rem;
    }

    .stats {
        grid-template-columns: 1fr;
    }
}

/* 로딩 애니메이션 */
.loading {
    display: none;
    text-align: center;
    padding: 2rem;
}

.loading.show {
    display: block;
}

/* 부드러운 전환 효과 */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 스마트 단어 강조: 글자별 바운스 효과 */
.smart-word {
    display: inline-flex;
    gap: 0.12em;
    font-weight: 800;
    color: #1b2559;
}

.smart-word .letter {
    display: inline-block;
    transform-origin: bottom center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 8px 24px rgba(102, 126, 234, 0.25);
    animation: smartBounce 1.6s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}

.smart-word .letter:nth-child(1) { animation-delay: 0s; }
.smart-word .letter:nth-child(2) { animation-delay: 0.08s; }
.smart-word .letter:nth-child(3) { animation-delay: 0.16s; }

@keyframes smartBounce {
    0% { transform: translateY(0) scale(1); filter: saturate(1); }
    20% { transform: translateY(-6px) scale(1.04); filter: saturate(1.1); }
    40% { transform: translateY(0) scale(1); }
    60% { transform: translateY(-3px) scale(1.02); }
    100% { transform: translateY(0) scale(1); }
}

/* 데스크톱(≥1024px) 4열 및 카드 축소 오버라이드 */
@media (min-width: 1024px) {
    .service-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.25rem;
    }
    .service-card {
        padding: 1.4rem;
        border-radius: 14px;
    }
    .service-icon {
        width: 56px;
        height: 56px;
        margin: 0 auto 1.1rem;
    }
    .service-icon i {
        font-size: 1.5rem;
    }
    .service-title {
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
    }
    .service-description {
        font-size: 0.95rem;
        margin-bottom: 0.25rem;
    }
}

/* 태블릿(≤768px) 2열 오버라이드 */
@media (max-width: 768px) {
    .service-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

/* 모바일(≤480px) 카드 패딩 축소 */
@media (max-width: 480px) {
    .service-card {
        padding: 1.1rem;
    }
    .service-grid {
        grid-template-columns: 1fr;
    }
} 