/**
 * Feature Explanation Section — Horizontal Scroll Carousel Design
 * @version 2.0.0
 */

/* ── 메인 섹션 ── */
.feature-explanation-section {
    background: linear-gradient(135deg, var(--color-indigo-50) 0%, var(--color-purple-50) 100%);
    padding: 4rem 0;
    margin-top: 3rem;
}

[data-theme='dark'] .feature-explanation-section {
    background: linear-gradient(135deg, var(--color-indigo-950) 0%, var(--color-purple-950) 100%);
}

.feature-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ── 기능 소개 ── */
.feature-intro {
    text-align: center;
    margin-bottom: 3.5rem;
}

.feature-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--color-slate-900);
    margin-bottom: 1.25rem;
    line-height: 1.2;
}

[data-theme='dark'] .feature-title { color: #f1f5f9; }

.feature-description {
    font-size: 1.1rem;
    color: var(--color-slate-600);
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.7;
}

[data-theme='dark'] .feature-description { color: #94a3b8; }

/* ── 섹션 서브 컨테이너 ── */
.how-it-works-section,
.advantages-section,
.use-cases-section,
.tips-section {
    margin-bottom: 3.5rem;
    position: relative;
}

/* ── JS가 추가하는 섹션 헤더 ── */
.fes-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.fes-header .section-title {
    margin-bottom: 0;
    text-align: left;
    flex: 1;
}

/* JS 없을 때 섹션 제목 기본 스타일 유지 */
.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-slate-900);
    margin-bottom: 1.25rem;
    text-align: center;
}

[data-theme='dark'] .section-title { color: #f1f5f9; }

/* ── 내비게이션 버튼 ── */
.fes-nav {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.fes-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: white;
    border: 1.5px solid var(--color-neutral-200, #e2e8f0);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-slate-600);
    transition: background 0.18s, border-color 0.18s, color 0.18s, transform 0.15s;
    flex-shrink: 0;
}

.fes-btn:hover:not(:disabled) {
    background: var(--color-primary-50, #eff6ff);
    border-color: var(--color-primary-400, #60a5fa);
    color: var(--color-primary-600, #2563eb);
    transform: scale(1.08);
}

.fes-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

[data-theme='dark'] .fes-btn {
    background: #334155;
    border-color: #475569;
    color: #94a3b8;
}

[data-theme='dark'] .fes-btn:hover:not(:disabled) {
    background: #475569;
    border-color: #60a5fa;
    color: #93c5fd;
}

/* ── 스크롤 트랙 (그리드 컨테이너 → 수평 스크롤) ── */
.steps-grid,
.advantages-grid,
.use-cases-grid,
.tips-container {
    display: flex;
    gap: 1.25rem;
    overflow-x: auto;
    overflow-y: visible;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding: 0.5rem 0.25rem 1rem;
    scrollbar-width: none;
    /* 마지막 카드 다음 여백으로 다음 카드 있다는 힌트 */
    padding-right: 3rem;
    cursor: grab;
    -webkit-user-select: none;
    user-select: none;
}

.steps-grid::-webkit-scrollbar,
.advantages-grid::-webkit-scrollbar,
.use-cases-grid::-webkit-scrollbar,
.tips-container::-webkit-scrollbar {
    display: none;
}

/* ── 통합 카드 기본 스타일 ── */
.step-card,
.advantage-item,
.use-case-card,
.tip-item {
    /* 스크롤 스냅 */
    flex: 0 0 260px;
    scroll-snap-align: start;

    /* 시각 */
    background: white;
    border-radius: 1rem;
    padding: 1.75rem 1.5rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.04);

    /* 레이아웃: 수직 정렬 통일 */
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    gap: 0;

    /* 최소 높이 통일 */
    min-height: 200px;

    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.step-card:hover,
.advantage-item:hover,
.use-case-card:hover,
.tip-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.1);
}

[data-theme='dark'] .step-card,
[data-theme='dark'] .advantage-item,
[data-theme='dark'] .use-case-card,
[data-theme='dark'] .tip-item {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

/* ── step-card 아이콘 ── */
.step-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: var(--color-purple-100, #f3e8ff);
    border-radius: 14px;
    margin-bottom: 1.25rem;
    color: var(--color-purple-600, #9333ea);
    flex-shrink: 0;
}

[data-theme='dark'] .step-icon {
    background: var(--color-purple-900, #3b0764);
    color: var(--color-purple-300, #d8b4fe);
}

.step-card h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-slate-900);
    margin-bottom: 0.6rem;
    line-height: 1.4;
}

[data-theme='dark'] .step-card h4 { color: #f1f5f9; }

.step-card p {
    font-size: 0.875rem;
    color: var(--color-slate-600);
    line-height: 1.6;
    margin: 0;
}

[data-theme='dark'] .step-card p { color: #cbd5e1; }

/* ── advantage-item (수평 → 수직 통일) ── */
.advantage-item {
    flex-direction: column;
}

.advantage-icon {
    font-size: 2rem;
    line-height: 1;
    margin-bottom: 1rem;
    flex-shrink: 0;
}

.advantage-content {
    flex: 1;
}

.advantage-content h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-slate-900);
    margin-bottom: 0.5rem;
}

[data-theme='dark'] .advantage-content h4 { color: #f1f5f9; }

.advantage-content p {
    font-size: 0.875rem;
    color: var(--color-slate-600);
    line-height: 1.6;
    margin: 0;
}

[data-theme='dark'] .advantage-content p { color: #cbd5e1; }

/* ── use-case-card ── */
.use-case-card h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-slate-900);
    margin-bottom: 0.6rem;
}

[data-theme='dark'] .use-case-card h4 { color: #f1f5f9; }

.use-case-card p {
    font-size: 0.875rem;
    color: var(--color-slate-600);
    line-height: 1.6;
    margin: 0;
}

[data-theme='dark'] .use-case-card p { color: #cbd5e1; }

/* ── tip-item (수평 → 수직 통일) ── */
.tip-item {
    flex-direction: column;
}

.tip-icon {
    font-size: 2rem;
    line-height: 1;
    margin-bottom: 1rem;
    flex-shrink: 0;
}

.tip-content {
    flex: 1;
}

.tip-content h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-slate-900);
    margin-bottom: 0.5rem;
}

[data-theme='dark'] .tip-content h4 { color: #f1f5f9; }

.tip-content p {
    font-size: 0.875rem;
    color: var(--color-slate-600);
    line-height: 1.6;
    margin: 0;
}

[data-theme='dark'] .tip-content p { color: #cbd5e1; }

/* ── 도트 인디케이터 ── */
.fes-dots {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-top: 0.75rem;
}

.fes-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--color-neutral-300, #cbd5e1);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s, width 0.25s;
}

.fes-dot.active {
    background: var(--color-primary-500, #3b82f6);
    width: 20px;
    border-radius: 4px;
    transform: none;
}

[data-theme='dark'] .fes-dot { background: #475569; }
[data-theme='dark'] .fes-dot.active { background: #60a5fa; }

/* ── 반응형 ── */
@media (max-width: 768px) {
    .feature-content { padding: 0 1rem; }

    .feature-title { font-size: 1.75rem; }
    .feature-description { font-size: 1rem; }
    .section-title { font-size: 1.25rem; }

    .step-card,
    .advantage-item,
    .use-case-card,
    .tip-item {
        flex: 0 0 220px;
        min-height: 170px;
        padding: 1.25rem;
    }

    .step-icon { width: 52px; height: 52px; }
}

@media (max-width: 480px) {
    .feature-explanation-section { padding: 2.5rem 0; }
    .feature-title { font-size: 1.5rem; }

    .step-card,
    .advantage-item,
    .use-case-card,
    .tip-item {
        flex: 0 0 calc(85vw);
    }
}
