﻿/* ========== HOME PAGE - 깔끔한 선택 허브 ========== */
/* 모든 스타일은 .home-page 범위로 제한 (다른 페이지에 영향 없음) */

.home-page {
    --color-primary: #8b5cf6;
    --color-primary-dark: #7c3aed;
    --color-primary-light: #a78bfa;
    --color-secondary: #ec4899;
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-error: #ef4444;
    --color-gray-50: #f9fafb;
    --color-gray-100: #f3f4f6;
    --color-gray-200: #e5e7eb;
    --color-gray-300: #d1d5db;
    --color-gray-400: #9ca3af;
    --color-gray-500: #6b7280;
    --color-gray-600: #4b5563;
    --color-gray-700: #374151;
    --color-gray-800: #1f2937;
    --color-gray-900: #111827;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    
    /* 폰트 렌더링 최적화 */
    font-family: var(--site-font) !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* ========== 컨테이너 & 기본 구조 ========== */
.home-page .container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.home-page > section {
    padding: 72px var(--spacing-md);
}

.home-page > section:nth-child(even) {
    background-color: var(--color-gray-50);
}

/* ========== SECTION HEADER (공통 레이아웃) ========== */
.home-page .section-header {
    text-align: center;
    margin-bottom: 56px;
}

.home-page .section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-gray-900);
    margin: 0 0 12px 0;
    line-height: 1.2;
}

.home-page .section-subtitle {
    font-size: 1rem;
    color: var(--color-gray-600);
    margin: 0;
}

/* ========== HERO SECTION ========== */
.home-page .hero {
    padding: 140px var(--spacing-md) 100px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    background-attachment: fixed;
    position: relative;
    color: white;
    text-align: center;
    pointer-events: none;
}

.home-page .hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.12);
    pointer-events: none;
}

.home-page .hero-content {
    max-width: 960px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.home-page .hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin: 0 0 20px 0;
    line-height: 1.25;
    color: #ffffff;
    letter-spacing: -0.01em;
    word-spacing: 0.05em;
}

.home-page .hero-subtitle {
    font-size: 1.1rem;
    margin: 0 0 44px 0;
    opacity: 0.9;
    line-height: 1.6;
    color: #ffffff;
    text-align: center;
    letter-spacing: -0.01em;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.home-page .hero-cta-buttons {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 32px;
    align-items: center;
}

.home-page .btn {
    padding: 14px 36px;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    letter-spacing: 0.3px;
    pointer-events: auto;
}

.home-page .btn-primary {
    background-color: white;
    color: var(--color-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.home-page .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.home-page .btn-secondary {
    background-color: transparent;
    color: white;
    border: 2px solid white;
}

.home-page .btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: white;
}

.home-page .hero-helper-link {
    font-size: 0.875rem;
    margin-top: 20px;
}

.home-page .link-secondary {
    color: white;
    text-decoration: none;
    opacity: 0.85;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.6);
}

.home-page .link-secondary:hover {
    opacity: 1;
    border-bottom-color: white;
}

/* ========== RECOMMENDED ROUTES (추천 루트) ========== */
.home-page .recommended-routes {
    background-color: white;
}

.home-page .routes-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
    margin-top: 56px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.home-page .route-card {
    background: white;
    border: 2px solid var(--color-gray-200);
    border-radius: var(--radius-xl);
    padding: 28px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    min-height: 420px;
}

.home-page .route-card:hover {
    border-color: var(--color-primary);
    box-shadow: 0 12px 32px rgba(139, 92, 246, 0.1);
    transform: translateY(-4px);
}

.home-page .route-header {
    margin-bottom: 12px;
    flex-shrink: 0;
}

.home-page .route-badge {
    display: inline-block;
    background-color: var(--color-gray-100);
    color: var(--color-gray-700);
    padding: 6px 12px;
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 10px;
    width: fit-content;
}

.home-page .route-card h3 {
    font-size: 1.3rem;
    color: var(--color-gray-900);
    margin: 0;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.home-page .route-description {
    color: var(--color-gray-600);
    margin: 12px 0;
    font-size: 0.9rem;
    line-height: 1.6;
    height: 58px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-shrink: 0;
}

.home-page .route-steps {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: auto;
    padding-top: 16px;
    flex-grow: 1;
    justify-content: flex-start;
}

.home-page .step {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 36px;
}

.home-page .step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background-color: var(--color-primary);
    color: white;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.home-page .step-link {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.home-page .step-link:hover {
    color: var(--color-primary-dark);
    text-decoration: underline;
}

/* ========== TOP 6 CALCULATORS ========== */
.home-page .top-calculators {
    background-color: var(--color-gray-50);
}

.home-page .top-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.home-page .top-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 24px;
    background: white;
    border: 2px solid var(--color-gray-200);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
    min-height: 180px;
}

.home-page .top-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.home-page .top-card:hover {
    border-color: var(--color-primary);
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.15);
    transform: translateY(-4px);
}

.home-page .top-card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    background-color: var(--color-warning);
    color: white;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
}

.home-page .top-card-icon {
    font-size: 2.5rem;
    line-height: 1;
}

.home-page .top-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
    text-align: center;
}

.home-page .top-card p {
    font-size: 0.85rem;
    color: var(--color-gray-600);
    margin: 0;
    text-align: center;
}

.home-page .top-card-level {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
}

.home-page .top-card-level.beginner {
    background-color: #dbeafe;
    color: #075985;
}

.home-page .top-card-level.intermediate {
    background-color: #fef3c7;
    color: #92400e;
}

.home-page .top-card-level.advanced {
    background-color: #fecaca;
    color: #7f1d1d;
}

/* ========== TOP CARDS EXPANSION (모바일 더보기/접기) ========== */
.home-page .top-card-hidden {
    display: none;
}

.home-page .top-cards-expanded .top-card-hidden {
    display: flex;
}

.home-page .top-cards-button-wrapper {
    display: none;
    text-align: center;
    margin-top: 32px;
}

.home-page .top-cards-button-wrapper.show {
    display: block;
}

.home-page .top-cards-toggle-btn {
    padding: 12px 32px;
    background-color: var(--color-primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.home-page .top-cards-toggle-btn:hover {
    background-color: var(--color-primary-dark);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.home-page .top-cards-toggle-btn:active {
    transform: scale(0.98);
}

/* ========== DIRECTORY ACCORDION ========== */
.home-page .calculators-directory {
    background-color: white;
}

.home-page .directory-header {
    text-align: center;
    margin-bottom: 40px;
}

.home-page .directory-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-gray-900);
    margin: 0 0 8px 0;
}

.home-page .directory-subtitle {
    color: var(--color-gray-600);
    margin: 0;
}

/* 검색 & 필터 바 */
.home-page .search-filter-bar {
    background: white;
    padding: 24px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-gray-200);
    margin-bottom: 32px;
}

.home-page .search-input-wrapper {
    position: relative;
    margin-bottom: 16px;
}

.home-page .search-input {
    width: 100%;
    padding: 12px 40px 12px 16px;
    border: 2px solid var(--color-gray-200);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.home-page .search-input-wrapper {
    position: relative;
    flex: 1;
    max-width: 500px;
}

.home-page .search-input {
    width: 100%;
    padding: 10px 12px 10px 40px;
    border: 2px solid var(--color-gray-200);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.home-page .search-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.home-page .search-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-gray-400);
    transition: color 0.3s ease;
}

.home-page .search-btn:hover {
    color: var(--color-primary);
}

.home-page .search-clear {
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-gray-400);
    transition: color 0.3s ease;
}

.home-page .search-clear:hover {
    color: var(--color-gray-600);
}

.home-page .search-icon {
    display: block;
}

/* 검색 결과 없음 메시지 */
.home-page .no-search-result {
    padding: 24px;
    text-align: center;
    background: var(--color-gray-50);
    border: 1px solid var(--color-gray-200);
    border-radius: var(--radius-lg);
    margin: 16px 0;
    color: var(--color-gray-600);
    font-size: 1rem;
}

.home-page .no-search-result.is-hidden {
    display: none !important;
}

.home-page .is-hidden {
    display: none !important;
}

/* Accordion */
.home-page .category-accordion {
    margin-bottom: 16px;
    border: 2px solid var(--color-gray-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.home-page .category-accordion[open] {
    border-color: var(--color-primary);
}

.home-page .accordion-header {
    cursor: pointer;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    user-select: none;
    transition: background-color 0.3s ease;
}

.home-page .category-accordion[open] .accordion-header {
    background-color: var(--color-gray-50);
}

.home-page .accordion-header:hover {
    background-color: var(--color-gray-50);
}

.home-page .accordion-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    color: var(--color-primary);
    transition: transform 0.3s ease;
}

.home-page .category-accordion[open] .accordion-icon {
    transform: rotate(90deg);
}

.home-page .accordion-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-gray-900);
    margin: 0;
    flex: 1;
}

.home-page .accordion-count {
    color: var(--color-gray-500);
    font-size: 0.95rem;
    font-weight: 600;
}

.home-page .accordion-content {
    padding: 24px;
    border-top: 2px solid var(--color-gray-100);
    background-color: white;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.home-page .category-accordion[open] .accordion-content {
    max-height: 3000px;
}

.home-page .cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 16px;
}

.home-page .cards-grid .card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px;
    background: var(--color-gray-50);
    border: 2px solid var(--color-gray-200);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    cursor: pointer;
    min-height: 120px;
}

.home-page .cards-grid .card:hover {
    border-color: var(--color-primary);
    box-shadow: 0 6px 16px rgba(139, 92, 246, 0.12);
    transform: translateY(-2px);
}

.home-page .cards-grid .card-icon {
    font-size: 1.8rem;
}

.home-page .cards-grid .card-name {
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    color: var(--color-gray-900);
}

.home-page .cards-grid .card-desc {
    font-size: 0.7rem;
    color: var(--color-gray-500);
    text-align: center;
}

/* ========== FEATURES/WHY US ========== */
.home-page .features-section {
    background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
    padding: 72px 0;
}

.home-page .features-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
    margin-top: 64px;
    align-items: stretch;
}

.home-page .feature-card {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    padding: 28px 24px 24px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    min-height: 280px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease;
}

.home-page .feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
    border-color: var(--color-primary);
}

.home-page .feature-icon {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    background: linear-gradient(135deg, #f3e8ff 0%, #fce7f3 100%);
    margin-bottom: 16px;
    flex-shrink: 0;
}

.home-page .feature-title {
    font-size: 1.0625rem;
    font-weight: 800;
    letter-spacing: -0.015em;
    line-height: 1.3;
    color: #111827;
    margin: 0 0 12px 0;
    min-height: 52px;
    display: flex;
    align-items: flex-start;
}

.home-page .feature-description {
    font-size: 0.9375rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    line-height: 1.65;
    color: rgba(0, 0, 0, 0.72);
    margin: 0;
    flex: 1;
    word-break: keep-all;
}

/* ========== SEO/FAQ SECTION ========== */
.home-page .seo-faq-section {
    background-color: white;
}

.home-page .seo-accordion {
    border: 2px solid var(--color-gray-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.home-page .seo-accordion[open] {
    border-color: var(--color-primary);
}

.home-page .seo-accordion-header {
    cursor: pointer;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    user-select: none;
    transition: background-color 0.3s ease;
}

.home-page .seo-accordion[open] .seo-accordion-header {
    background-color: var(--color-gray-50);
}

.home-page .seo-accordion-header:hover {
    background-color: var(--color-gray-50);
}

.home-page .seo-accordion-header .accordion-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    color: var(--color-primary);
    transition: transform 0.3s ease;
}

.home-page .seo-accordion[open] .seo-accordion-header .accordion-icon {
    transform: rotate(90deg);
}

.home-page .seo-accordion-header .accordion-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-gray-900);
    margin: 0;
}

.home-page .seo-article {
    padding: 32px 24px;
    border-top: 2px solid var(--color-gray-100);
    background-color: white;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.home-page .seo-accordion[open] .seo-article {
    max-height: 5000px;
}

.home-page .seo-article h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-gray-900);
    margin: 24px 0 12px 0;
}

.home-page .seo-article h3:first-child {
    margin-top: 0;
}

.home-page .seo-article p {
    color: var(--color-gray-700);
    line-height: 1.7;
    margin: 12px 0;
}

.home-page .seo-article a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.home-page .seo-article a:hover {
    color: var(--color-primary-dark);
    text-decoration: underline;
}

.home-page .faq-list {
    margin-top: 32px;
}

.home-page .faq-item {
    margin-bottom: 12px;
    border: 1px solid var(--color-gray-200);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.home-page .faq-question {
    cursor: pointer;
    padding: 16px;
    background-color: var(--color-gray-50);
    font-weight: 600;
    color: var(--color-gray-900);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.home-page .faq-question::after {
    content: '▼';
    font-size: 0.8rem;
    color: var(--color-gray-500);
    transition: transform 0.3s ease;
}

.home-page .faq-item[open] .faq-question::after {
    transform: rotate(180deg);
}

.home-page .faq-answer {
    padding: 16px;
    background-color: white;
    border-top: 1px solid var(--color-gray-200);
}

.home-page .faq-answer p {
    color: var(--color-gray-700);
    line-height: 1.6;
    margin: 0;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
    .home-page .hero-title {
        font-size: 2.5rem;
        line-height: 1.3;
    }

    .home-page .hero-subtitle {
        font-size: 1.05rem;
        line-height: 1.6;
    }
}

@media (max-width: 768px) {
    .home-page > section {
        padding: 56px var(--spacing-md);
    }

    .home-page .hero {
        padding: 80px var(--spacing-md) 60px;
    }

    .home-page .hero-title {
        font-size: 1.75rem;
        line-height: 1.3;
        letter-spacing: -0.01em;
        margin-bottom: 16px;
    }

    .home-page .hero-subtitle {
        font-size: 0.95rem;
        line-height: 1.5;
        margin-bottom: 32px;
        max-width: 100%;
    }

    .home-page .hero-cta-buttons {
        flex-direction: column;
        gap: 10px;
        margin-bottom: 24px;
    }

    .home-page .btn {
        width: 100%;
        padding: 13px 24px;
        font-size: 0.9rem;
    }

    .home-page .routes-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .home-page .route-card {
        min-height: 380px;
    }

    .home-page .top-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .home-page .top-cards-button-wrapper.show {
        display: block;
    }

    .home-page .cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    .home-page .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        margin-top: 48px;
    }

    .home-page .feature-card {
        padding: 24px 20px 20px;
        min-height: 270px;
    }

    .home-page .feature-icon {
        width: 60px;
        height: 60px;
        font-size: 1.8rem;
        margin-bottom: 12px;
    }

    .home-page .feature-title {
        font-size: 1rem;
        min-height: 48px;
        margin-bottom: 10px;
    }

    .home-page .feature-description {
        font-size: 0.875rem;
        line-height: 1.6;
    }

    .home-page .filter-buttons {
        justify-content: center;
    }
}

@media (max-width: 640px) {
    .home-page .features-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-top: 48px;
    }

    .home-page .feature-card {
        padding: 24px 18px 20px;
        min-height: auto;
    }

    .home-page .feature-icon {
        width: 56px;
        height: 56px;
        font-size: 1.6rem;
        margin-bottom: 12px;
    }

    .home-page .feature-title {
        font-size: 0.975rem;
        min-height: auto;
        line-height: 1.3;
        margin-bottom: 8px;
    }

    .home-page .feature-description {
        font-size: 0.8125rem;
        line-height: 1.6;
    }
}

@media (max-width: 480px) {
    .home-page .hero-title {
        font-size: 1.5rem;
    }

    .home-page .section-title {
        font-size: 1.5rem;
    }

    .home-page .top-cards-grid {
        grid-template-columns: 1fr;
    }

    .home-page .cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }

    .home-page .features-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-top: 36px;
    }

    .home-page .feature-card {
        padding: 20px 16px;
    }

    .home-page .feature-icon {
        width: 52px;
        height: 52px;
        font-size: 1.4rem;
        margin-bottom: 10px;
    }

    .home-page .feature-title {
        font-size: 0.9375rem;
        margin-bottom: 6px;
    }

    .home-page .feature-description {
        font-size: 0.8rem;
        line-height: 1.55;
    }
}

/* ========== ROUTE SECTION (추천 루트) - 가독성 + CTA 강화 ========== */
.home-page .route-section {
    padding: 48px var(--spacing-md);
    background-color: white;
}

.home-page .route-container {
    max-width: 1100px;
    margin: 0 auto;
}

.home-page .route-section-header {
    text-align: center;
    margin-bottom: 48px;
}

/* 섹션 타이틀: 26~28px 확대 */
.home-page .route-section-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--color-gray-900);
    margin: 0 0 12px 0;
    line-height: 1.2;
}

/* 섹션 서브문구: 15~16px 확대 */
.home-page .route-section-subtitle {
    font-size: 0.9375rem;
    color: var(--color-gray-600);
    margin: 0 0 20px 0;
    line-height: 1.6;
    font-weight: 500;
}

.home-page .route-header-divider {
    height: 2px;
    width: 48px;
    background: linear-gradient(90deg, var(--color-primary) 0%, transparent 100%);
    margin: 0 auto;
}

/* 4카드 그리드 */
.home-page .route-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

/* 카드 기본 스타일 */
.home-page .route-card-v2 {
    background: white;
    border: 1px solid #EAEAF2;
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: all 0.25s ease;
}

.home-page .route-card-v2:hover {
    border-color: #E0D9FF;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.home-page .route-card-v2:focus-within {
    border-color: #7B61FF;
    outline: none;
    box-shadow: 0 0 0 3px rgba(123, 97, 255, 0.1);
}

/* 카드 배지 */
.home-page .route-card-badge {
    display: inline-block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-gray-700);
    background: var(--color-gray-50);
    padding: 4px 10px;
    border-radius: 6px;
    margin-bottom: 12px;
    width: fit-content;
}

/* 카드 제목: 20~22px 확대 */
.home-page .route-card-title {
    font-size: 1.3125rem;
    font-weight: 800;
    color: var(--color-gray-900);
    margin: 0 0 8px 0;
    line-height: 1.3;
}

/* 카드 설명: 14.5~15.5px 확대 */
.home-page .route-card-description {
    font-size: 0.9375rem;
    line-height: 1.65;
    color: #555;
    margin: 0 0 20px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-weight: 500;
}

/* 카드 리스트 컨테이너 */
.home-page .route-card-list {
    display: flex;
    flex-direction: column;
    gap: 11px;
    margin-top: auto;
}

/* ========== 리스트 항목: "클릭 유도형" 디자인 ========== */
.home-page .route-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 14px;
    background: #F7F7FF;
    border: 1.5px solid #ECECFA;
    border-radius: 12px;
    color: #333;
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.6;
    transition: all 0.2s ease;
    min-height: 44px;
    cursor: pointer;
}

/* 호버: 배경 선명, 테두리 퍼플, 그림자 강화 */
.home-page .route-list-item:hover {
    background: #F0EDFF;
    border-color: #7B61FF;
    box-shadow: 0 4px 12px rgba(123, 97, 255, 0.18);
    color: #333;
}

/* 액티브: 살짝 눌리는 효과 */
.home-page .route-list-item:active {
    transform: translateY(1px);
    box-shadow: 0 2px 8px rgba(123, 97, 255, 0.12);
}

/* 포커스: 키보드 접근성 */
.home-page .route-list-item:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* 번호 배지: 24px 원형 */
.home-page .route-list-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--color-primary);
    color: white;
    border-radius: 50%;
    font-size: 0.8125rem;
    font-weight: 800;
    flex-shrink: 0;
}

/* 리스트 텍스트: 15~16px 확대 */
.home-page .route-list-text {
    flex: 1;
    font-size: 0.9375rem;
    font-weight: 600;
}

/* 우측 화살표: chevron 애니메이션 */
.home-page .route-list-arrow {
    color: #ccc;
    font-size: 1.25rem;
    font-weight: 400;
    flex-shrink: 0;
    transition: all 0.2s ease;
    transform: translateX(0);
}

.home-page .route-list-item:hover .route-list-arrow {
    color: var(--color-primary);
    transform: translateX(3px);
}

/* ========== 반응형: 태블릿 (860px 이하) ========== */
@media (max-width: 860px) {
    .home-page .route-cards-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .home-page .route-section-title {
        font-size: 1.5rem;
        font-weight: 800;
    }

    .home-page .route-section-subtitle {
        font-size: 0.9rem;
    }

    .home-page .route-card-v2 {
        padding: 22px;
    }

    .home-page .route-card-title {
        font-size: 1.1875rem;
        font-weight: 800;
    }

    .home-page .route-card-description {
        font-size: 0.9rem;
        line-height: 1.6;
        margin-bottom: 18px;
    }

    .home-page .route-card-list {
        gap: 10px;
    }

    .home-page .route-list-item {
        padding: 12px 13px;
        font-size: 0.9rem;
        font-weight: 600;
        min-height: 42px;
    }

    .home-page .route-list-text {
        font-size: 0.9rem;
    }
}

/* ========== 반응형: 모바일 (640px 이하) ========== */
@media (max-width: 640px) {
    .home-page .route-section {
        padding: 36px 16px;
    }

    .home-page .route-section-header {
        margin-bottom: 36px;
    }

    .home-page .route-section-title {
        font-size: 1.25rem;
        font-weight: 800;
        margin-bottom: 10px;
    }

    .home-page .route-section-subtitle {
        font-size: 0.8125rem;
        line-height: 1.5;
        margin-bottom: 16px;
    }

    .home-page .route-cards-grid {
        gap: 16px;
    }

    .home-page .route-card-v2 {
        padding: 20px;
    }

    .home-page .route-card-badge {
        font-size: 0.75rem;
        margin-bottom: 10px;
    }

    .home-page .route-card-title {
        font-size: 1.0625rem;
        font-weight: 800;
        margin-bottom: 6px;
    }

    .home-page .route-card-description {
        font-size: 0.8125rem;
        line-height: 1.55;
        margin-bottom: 14px;
    }

    .home-page .route-card-list {
        gap: 9px;
    }

    .home-page .route-list-item {
        padding: 11px 12px;
        font-size: 0.875rem;
        font-weight: 600;
        min-height: 44px;
        gap: 10px;
    }

    .home-page .route-list-badge {
        width: 22px;
        height: 22px;
        font-size: 0.75rem;
        font-weight: 800;
    }

    .home-page .route-list-text {
        font-size: 0.875rem;
        font-weight: 600;
    }

    .home-page .route-list-arrow {
        font-size: 1.1rem;
    }

    .home-page .route-list-item:hover .route-list-arrow {
        transform: translateX(2px);
    }
}

/* ========== 모바일 최적화 (<=480px) - 제목/부제/카드 가독성 강화 ========== */
@media (max-width: 480px) {
    /* 공통 컨테이너 패딩 정리 */
    .home-page .container {
        padding-left: 16px;
        padding-right: 16px;
    }

    .home-page > section {
        padding: 32px 16px;
    }

    /* ===== 섹션 타이틀/부제 전면 정렬 강화 ===== */
    .home-page .section-header {
        margin-bottom: 36px;
    }

    .home-page .section-title {
        font-size: 24px;
        line-height: 1.25;
        letter-spacing: -0.02em;
        text-align: center;
        word-break: keep-all;
        overflow-wrap: break-word;
        max-width: 20ch;
        margin: 0 auto 10px;
        padding: 0 12px;
    }

    .home-page .section-subtitle {
        font-size: 15px;
        line-height: 1.5;
        text-align: center;
        color: rgba(0, 0, 0, 0.65);
        word-break: keep-all;
        overflow-wrap: break-word;
        max-width: 28ch;
        margin: 0 auto;
        padding: 0 12px;
    }

    /* 줄바꿈 제어용 클래스 */
    .no-break {
        white-space: nowrap;
    }

    .mobile-break {
        display: block;
    }

    /* ===== TOP 6 카드 모바일 레이아웃 최적화 ===== */
    .home-page .top-cards-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 14px;
        margin-top: 28px;
    }

    .home-page .top-card {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        gap: 10px;
        padding: 18px 16px;
        border-radius: 16px;
        border: 1px solid rgba(0, 0, 0, 0.06);
        box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
        overflow: hidden;
        min-height: auto;
        position: relative;
        text-align: center;
    }

    .home-page .top-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 4px;
        background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
        border-radius: 0;
    }

    .home-page .top-card-icon {
        font-size: 2rem;
        line-height: 1;
        margin-top: 4px;
    }

    .home-page .top-card h3 {
        font-size: 18px;
        line-height: 1.3;
        word-break: keep-all;
        margin: 10px 0 6px;
        color: var(--color-gray-900);
        font-weight: 700;
    }

    .home-page .top-card p {
        font-size: 14px;
        line-height: 1.45;
        color: rgba(0, 0, 0, 0.6);
        word-break: keep-all;
        margin: 0 0 12px;
        max-width: 100%;
    }

    .home-page .top-card-level {
        display: inline-block;
        font-size: 12px;
        font-weight: 600;
        padding: 6px 10px;
        border-radius: var(--radius-sm);
        margin-bottom: 8px;
    }

    .home-page .top-card-badge {
        position: absolute;
        top: 8px;
        right: 8px;
        font-size: 0.65rem;
        font-weight: 700;
        padding: 3px 6px;
    }

    /* ===== Hero 타이포 모바일 최적화 ===== */
    .home-page .hero {
        padding: 80px 16px 60px;
    }

    .home-page .hero-title {
        font-size: 24px;
        line-height: 1.35;
        letter-spacing: -0.02em;
        word-break: keep-all;
        overflow-wrap: break-word;
    }

    .home-page .hero-subtitle {
        font-size: 14px;
        line-height: 1.55;
        letter-spacing: -0.01em;
    }

    /* ===== Route 섹션 타이틀 최적화 ===== */
    .home-page .route-section-title {
        font-size: 24px;
        line-height: 1.25;
        letter-spacing: -0.02em;
        word-break: keep-all;
        max-width: 22ch;
        margin: 0 auto 8px;
    }

    .home-page .route-section-subtitle {
        font-size: 15px;
        line-height: 1.5;
        word-break: keep-all;
        max-width: 26ch;
        margin: 0 auto;
    }

    /* ===== Directory 타이틀 최적화 ===== */
    .home-page .directory-title {
        font-size: 24px;
        line-height: 1.25;
        letter-spacing: -0.02em;
        word-break: keep-all;
        max-width: 20ch;
        margin: 0 auto 8px;
    }

    .home-page .directory-subtitle {
        font-size: 14px;
        line-height: 1.5;
        word-break: keep-all;
        max-width: 28ch;
        margin: 0 auto;
    }

    /* ===== Feature 카드 모바일 정렬 ===== */
    .home-page .features-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-top: 28px;
    }

    .home-page .feature-card {
        padding: 20px 16px;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .home-page .feature-icon {
        width: 52px;
        height: 52px;
        font-size: 1.6rem;
        margin: 0 auto 12px;
    }

    .home-page .feature-title {
        font-size: 16px;
        line-height: 1.35;
        word-break: keep-all;
        min-height: auto;
        margin-bottom: 8px;
    }

    .home-page .feature-description {
        font-size: 13px;
        line-height: 1.6;
        word-break: keep-all;
        color: rgba(0, 0, 0, 0.65);
    }
}

/* ========== 모바일 2열 레이아웃 (360px 이상 480px 이하) ========== */
@media (min-width: 360px) and (max-width: 480px) {
    .home-page .top-cards-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .home-page .top-card {
        padding: 16px 12px;
        gap: 8px;
        min-height: auto;
    }

    .home-page .top-card-icon {
        font-size: 1.8rem;
        margin-top: 2px;
    }

    .home-page .top-card h3 {
        font-size: 16px;
        line-height: 1.3;
        margin: 8px 0 4px;
    }

    .home-page .top-card p {
        font-size: 12px;
        line-height: 1.4;
        margin: 0 0 10px;
    }

    .home-page .top-card-level {
        font-size: 11px;
        padding: 4px 8px;
    }
}

/* ═══════════════════════════════════════════════════════════════
   목적형 섹션 스타일 (카테고리 → 목적별 분류)
   ═══════════════════════════════════════════════════════════════ */

/* 카테고리 최상단 설명 */
.home-page .category-intro {
    margin-bottom: 2rem;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.08) 0%, rgba(236, 72, 153, 0.08) 100%);
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--color-primary);
}

.home-page .category-description {
    margin: 0;
    font-size: 0.95rem;
    color: var(--color-gray-700);
    line-height: 1.6;
    font-weight: 500;
}

/* 목적형 섹션 컨테이너 */
.home-page .purpose-section {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--color-gray-200);
}

.home-page .purpose-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* 목적형 섹션 헤더 */
.home-page .purpose-header {
    margin-bottom: 1.5rem;
}

.home-page .purpose-title {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-gray-900);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.home-page .purpose-desc {
    margin: 0;
    font-size: 0.9rem;
    color: var(--color-gray-600);
    line-height: 1.5;
}

/* 반응형 - 태블릿 이하 */
@media (max-width: 768px) {
    .home-page .category-intro {
        margin-bottom: 1.5rem;
        padding: 0.875rem;
    }

    .home-page .category-description {
        font-size: 0.9rem;
    }

    .home-page .purpose-section {
        margin-bottom: 2rem;
        padding-bottom: 1.5rem;
    }

    .home-page .purpose-header {
        margin-bottom: 1.25rem;
    }

    .home-page .purpose-title {
        font-size: 1rem;
    }

    .home-page .purpose-desc {
        font-size: 0.85rem;
    }
}

/* ═══════════════════════════════════════════════════════════════
   탭 필터 스타일 + 카드 그리드 (통합)
   ═══════════════════════════════════════════════════════════════ */

.home-page .section-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 16px 0 20px;
    padding: 0;
}

.home-page .section-tabs .tab-btn {
    padding: 8px 14px;
    background: #ffffff;
    border: 1px solid var(--color-gray-300);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-gray-700);
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.home-page .section-tabs .tab-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.home-page .section-tabs .tab-btn.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #ffffff;
}

/* 카드 그리드 - 기본 및 반응형 */
.home-page .cards-grid {
    display: grid !important;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.home-page .cards-grid .calc-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px;
    background: var(--color-gray-50);
    border: 2px solid var(--color-gray-200);
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    cursor: pointer;
    min-height: 110px;
    text-align: center;
}

.home-page .cards-grid .calc-card:hover {
    border-color: var(--color-primary);
    box-shadow: 0 4px 8px rgba(139, 92, 246, 0.15);
    transform: translateY(-2px);
}

.home-page .cards-grid .card-icon {
    font-size: 1.8rem;
    display: block;
}

.home-page .cards-grid .card-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--color-gray-900);
    line-height: 1.3;
}

.home-page .cards-grid .card-desc {
    font-size: 0.75rem;
    color: var(--color-gray-500);
}

/* 카드 숨김 처리 */
.home-page .cards-grid .calc-card.is-hidden {
    display: none !important;
}

/* 태블릿 (768px ~ 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .home-page .cards-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* 모바일 (767px 이하) */
@media (max-width: 767px) {
    .home-page .cards-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .home-page .cards-grid .calc-card {
        min-height: 100px;
        padding: 12px;
        font-size: 0.85rem;
    }

    .home-page .cards-grid .card-icon {
        font-size: 1.5rem;
    }

    .home-page .cards-grid .card-name {
        font-size: 0.8rem;
    }

    .home-page .cards-grid .card-desc {
        font-size: 0.7rem;
    }

    .home-page .section-tabs {
        gap: 6px;
    }

    .home-page .section-tabs .tab-btn {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
}

/* ========== 금융 계산기 필터 탭 ========== */
.home-page .finance-filter-tabs,
.home-page .marketing-filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
    padding: 16px 0;
    border-bottom: 2px solid var(--color-gray-200);
}

.home-page .filter-tab {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--color-gray-300);
    border-radius: 20px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-gray-600);
    cursor: pointer;
    transition: all 0.3s ease;
}

.home-page .filter-tab:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: var(--color-primary) opacity 0.1;
}

.home-page .filter-tab.active {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.home-page .calc-card.hidden {
    display: none;
}

/* ========== 카테고리 섹션 펼침/접힘 상태 관리 ========== */

.home-page .category-section {
    /* 기본 상태: details 태그는 기본적으로 열림 */
    margin-bottom: 2rem;
}

/* 섹션 헤더 (항상 보임) */
.home-page .category-section > summary {
    cursor: pointer;
    padding: 1.5rem;
    background: var(--color-gray-100);
    border-radius: 0.75rem;
    font-weight: 600;
    color: var(--color-gray-800);
    transition: all 0.3s ease;
    user-select: none;
}

.home-page .category-section > summary:hover {
    background: var(--color-gray-200);
}

.home-page .category-section > summary[aria-expanded="true"] {
    background: var(--color-primary);
    color: white;
}

/* 섹션 본문 (펼침/접힘 애니메이션) */
.home-page .category-section > .accordion-content {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        overflow: hidden;
    }
    to {
        opacity: 1;
        max-height: 10000px;
        overflow: visible;
    }
}

/* <details> 요소가 closed일 때 본문 숨김 */
.home-page .category-section:not([open]) > .accordion-content {
    display: none;
}

/* 아코디언 아이콘 회전 애니메이션 */
.home-page .category-section > summary .accordion-icon {
    display: inline-block;
    transition: transform 0.3s ease;
    margin-right: 0.5rem;
}

.home-page .category-section[open] > summary .accordion-icon {
    transform: rotate(90deg);
}

@media (max-width: 768px) {
    .home-page .finance-filter-tabs,
    .home-page .marketing-filter-tabs {
        gap: 8px;
        margin-bottom: 16px;
        padding: 12px 0;
    }

    .home-page .filter-tab {
        padding: 6px 12px;
        font-size: 0.85rem;
    }

    .home-page .category-section > summary {
        padding: 1rem;
        font-size: 1rem;
    }
}



