/**
 * Home Main Styles
 * 홈 메인 화면 스타일 (오방색 테마)
 */

/* ==================== 컨테이너 ==================== */
#home-main-section {
    width: 100%;
    min-height: 100vh;
    overflow-y: auto;
}

.home-main-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

/* ==================== 로고 섹션 ==================== */
.home-main-logo {
    text-align: center;
    margin-bottom: 3rem;
}

.logo-circle {
    width: 180px;
    height: 180px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1 0%, #ec4899 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}

.logo-title {
    font-size: 1.8rem;
    font-weight: 900;
    color: white;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.2);
    margin: 0;
}

.logo-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    font-weight: 500;
}


/* Logo subtitle action button */
.logo-subtitle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0.75rem 1.5rem;
  border: 2px solid var(--accent-primary);
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  background: var(--card-bg);
  color: var(--text-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.logo-subtitle-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.logo-subtitle-btn:active {
  transform: translateY(0);
}



/* ==================== 탭 네비게이션 ==================== */
.home-main-tabs {
    display: flex;
    gap: 1rem;
    margin: 0 auto 2rem;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
    max-width: 720px;
}

.tab-button {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--card-bg);
    color: var(--text-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
}

/* 오방색 테마 */
.tab-button[data-tab="origin"] {
    border: 2px solid #2563EB;
}

.tab-button[data-tab="origin"].active {
    background: #2563EB;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.tab-button[data-tab="method"] {
    border: 2px solid #DC2626;
}

.tab-button[data-tab="method"].active {
    background: #DC2626;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
}

.tab-button[data-tab="usage"] {
    border: 2px solid #FBBF24;
}

.tab-button[data-tab="usage"].active {
    background: #FBBF24;
    color: #1F2937;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.4);
}

.tab-button[data-tab="faq"] {
    border: 2px solid #9CA3AF;
}

.tab-button[data-tab="faq"].active {
    background: #F9FAFB;
    color: #1F2937;
    border-color: #D1D5DB;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(156, 163, 175, 0.3);
}

.tab-button[data-tab="comparison"] {
    border: 2px solid #10B981;
}

.tab-button[data-tab="comparison"].active {
    background: #10B981;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.tab-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ==================== 탭 콘텐츠 ==================== */
.home-main-content {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    min-height: 400px;
    line-height: 1.8;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

.tab-content h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
}

.tab-content > p {
    font-size: 1.05rem;
    line-height: 1.9;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.tab-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tab-content ul li {
    font-size: 1rem;
    line-height: 1.9;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    padding-left: 1.5rem;
    position: relative;
}

.tab-content ul li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #6366f1;
    font-size: 1.5rem;
    line-height: 1.3;
}

.tab-content ul li strong {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.tab-content ul li br + text,
.tab-content ul li strong + br {
    display: none;
}

/* ==================== FAQ 아코디언 ==================== */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: #6366f1;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.faq-question {
    padding: 1.25rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.faq-question::before {
    content: '▶';
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-question::before {
    transform: rotate(90deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding: 0 1.25rem;
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding: 0 1.25rem 1.25rem;
}

/* ==================== 무료/유료 비교 탭 ==================== */
.comparison-view {
    animation: fadeIn 0.3s ease;
}

.comparison-intro {
    font-size: 1.05rem;
    line-height: 1.9;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    text-align: center;
    padding: 1.25rem 2rem;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(99, 102, 241, 0.1) 100%);
    border-radius: 12px;
    border-left: 4px solid #10B981;
}

.comparison-table-wrapper {
    margin: 2rem 0;
    overflow-x: auto;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-bg);
}

.comparison-table thead {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: white;
}

.comparison-table th {
    padding: 1.2rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    text-align: center;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.comparison-table th.th-feature {
    text-align: left;
    width: 40%;
}

.comparison-table th.th-free {
    width: 30%;
    background: rgba(255, 255, 255, 0.1);
}

.comparison-table th.th-pro {
    width: 30%;
    background: rgba(255, 255, 255, 0.15);
}

.comparison-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s ease;
}

.comparison-table tbody tr:hover {
    background: rgba(16, 185, 129, 0.05);
}

.comparison-table td {
    padding: 1.1rem 1.5rem;
    font-size: 1rem;
    border: 1px solid var(--border-color);
    text-align: center;
}

.comparison-table td.feat-name {
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
}

/* 카테고리 헤더 행 */
.comp-category-row {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(139, 92, 246, 0.12) 100%);
}

.comp-category-row td {
    padding: 1.1rem 1.5rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: left;
    border: 2px solid var(--border-color);
    border-left: 4px solid #6366f1;
}

/* 상태별 스타일 */
.feat-status {
    font-weight: 600;
}

.feat-status.status-included {
    color: #10B981;
    background: rgba(16, 185, 129, 0.12);
}

.feat-status.status-excluded {
    color: #EF4444;
    background: rgba(239, 68, 68, 0.08);
    opacity: 0.7;
}

.feat-status.status-new {
    color: #8B5CF6;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(168, 85, 247, 0.15) 100%);
    font-weight: 700;
}

.feat-status.status-extended {
    color: #3B82F6;
    background: rgba(59, 130, 246, 0.12);
    font-weight: 600;
}

/* 하단 푸터 */
.comparison-footer {
    margin-top: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.5rem 2rem;
    background: var(--bg-primary);
    border-radius: 12px;
    border: 2px solid var(--border-color);
}

.license-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1rem;
    color: var(--text-secondary);
}

.badge-icon {
    font-size: 1.5rem;
}

.badge-text strong {
    color: #10B981;
    font-weight: 700;
}

.btn-upgrade-pro {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    white-space: nowrap;
}

.btn-upgrade-pro:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.btn-upgrade-pro:active {
    transform: translateY(0);
}

.btn-icon {
    font-size: 1.2rem;
    animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% { 
        transform: scale(1) rotate(0deg); 
    }
    50% { 
        transform: scale(1.2) rotate(180deg); 
    }
}

/* ==================== 반응형 (모바일) ==================== */
@media (max-width: 768px) {
    .home-main-container {
        padding: 2rem 1rem;
    }

    .logo-circle {
        width: 140px;
        height: 140px;
    }

    .logo-title {
        font-size: 1.4rem;
    }

    .logo-subtitle {
        font-size: 1rem;
    }

    .home-main-tabs {
        flex-direction: column;
        gap: 0.75rem;
    }

    .tab-button {
        width: 100%;
        text-align: center;
        white-space: normal;
}

    .home-main-content {
        padding: 1.5rem;
    }

    .tab-content h2 {
        font-size: 1.5rem;
    }

    .tab-content > p,
    .tab-content ul li {
        font-size: 0.95rem;
    }

    .tab-content ul li {
        padding-left: 1.2rem;
        margin-bottom: 1.5rem;
    }

    .tab-content ul li strong {
        font-size: 1rem;
    }

    .faq-question {
        font-size: 1rem;
    }
    
    /* 비교표 모바일 대응 */
    .comparison-intro {
        padding: 1rem 1.5rem;
        font-size: 0.95rem;
    }
    
    .comparison-table-wrapper {
        overflow-x: auto;
        margin: 1.5rem -1.5rem;
        padding: 0 1.5rem;
    }
    
    .comparison-table {
        min-width: 550px;
    }
    
    .comparison-table th,
    .comparison-table td {
        font-size: 0.9rem;
        padding: 0.85rem 1rem;
    }
    
    .comp-category-row td {
        font-size: 1rem;
        padding: 0.9rem 1rem;
    }
    
    .comparison-footer {
        flex-direction: column;
        gap: 1.2rem;
        padding: 1.5rem;
    }
    
    .license-badge {
        font-size: 0.9rem;
        text-align: center;
    }
    
    .btn-upgrade-pro {
        width: 100%;
        justify-content: center;
    }
}

/* Dark theme: brighter border for subtitle button */
[data-theme="dark"] .logo-subtitle-btn {
  border-color: rgba(255, 255, 255, 0.35);
}

[data-theme="dark"] .logo-subtitle-btn:hover {
  border-color: rgba(255, 255, 255, 0.5);
}
