﻿/* ===== 공통 CSS (common.css) ===== */

/* 한글 폰트 스택 정의 */
:root {
    --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo", 
                  "맑은 고딕", "Malgun Gothic", Roboto, "Noto Sans KR", Arial, sans-serif;
    --primary-color: #8b5cf6;
    --primary-dark: #7c3aed;
    --primary-light: #a78bfa;
    --primary-gradient: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 50%, #6d28d9 100%);
    --secondary-color: #64748b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --light-bg: #f5f3ff;
    --dark-text: #1e293b;
    --light-text: #64748b;
    --border-color: #e2e8f0;
    --card-shadow: 0 4px 20px rgba(139, 92, 246, 0.15);
    --transition: all 0.3s ease;
    --header-height: 70px;
    
    /* 보라색 팔레트 */
    --purple-50: #faf5ff;
    --purple-100: #f3e8ff;
    --purple-200: #e9d5ff;
    --purple-300: #d8b4fe;
    --purple-400: #c084fc;
    --purple-500: #a855f7;
    --purple-600: #9333ea;
    --purple-700: #7c3aed;
    --purple-800: #6b21a8;
    --purple-900: #581c87;

    /* 전역 폰트 - 한글 지원 (히어로 기준) */
    --site-font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo", 
                 "맑은 고딕", "Malgun Gothic", Roboto, "Noto Sans KR", Arial, sans-serif;
}

/* 리셋 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--site-font) !important;
    background: #f5f7fa;
    min-height: 100vh;
    line-height: 1.6;
    color: var(--dark-text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* ========== 전역 폰트 통일 (히어로 기준) ========== */
button,
input,
select,
textarea,
label,
p,
span,
small,
strong,
em,
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--site-font) !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== 헤더 ===== */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: #fff;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 로고 - 간단한 텍스트 */
.logo {
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.logo:hover {
    color: var(--primary-dark);
}

/* 메뉴 */
.main-nav {
    margin-left: auto;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: #374151;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-color);
    border-radius: 1px;
}

/* 모바일 메뉴 */
.mobile-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
}

.mobile-nav.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.mobile-nav-title {
    font-weight: 600;
    color: var(--dark-text);
}

.mobile-nav-body {
    padding: 1rem 0;
}

.mobile-nav-list {
    list-style: none;
    padding: 0 1.5rem;
}

.mobile-nav-link {
    display: block;
    padding: 0.75rem 0;
    color: var(--dark-text);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    color: var(--primary-color);
    background: var(--light-bg);
}

/* 햄버거 버튼 */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.hamburger {
    width: 24px;
    height: 2px;
    background: var(--dark-text);
    position: relative;
    transition: var(--transition);
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background: var(--dark-text);
    transition: var(--transition);
}

.hamburger::before {
    top: -8px;
}

.hamburger::after {
    top: 8px;
}

.mobile-menu-btn.active .hamburger {
    background: transparent;
}

.mobile-menu-btn.active .hamburger::before {
    transform: rotate(45deg);
    top: 0;
}

.mobile-menu-btn.active .hamburger::after {
    transform: rotate(-45deg);
    top: 0;
}

/* 모바일 오버레이 */
.mobile-menu-overlay {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 998;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* 반응형 */
@media (max-width: 768px) {
    .main-nav {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .header-container {
        padding: 0 1rem;
    }
    
    .logo {
        font-size: 1.2rem;
    }
}

/* ===== PC 메가 메뉴 ===== */
.mega-nav {
    display: flex;
    height: 100%;
}

.mega-nav-list {
    display: flex;
    height: 100%;
    gap: 5px;
}

.mega-nav-item {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.mega-nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--dark-text);
    border-radius: 8px;
    transition: var(--transition);
    cursor: pointer;
}

.mega-nav-link:hover {
    color: var(--primary-color);
    background: rgba(102, 126, 234, 0.08);
}

.dropdown-arrow {
    transition: transform 0.3s ease;
}

.mega-nav-item:hover .dropdown-arrow {
    transform: rotate(180deg);
}

/* 메가 드롭다운 */
.mega-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    min-width: 400px;
    z-index: 1000;
}

.mega-nav-item:hover .mega-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.mega-dropdown::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid #fff;
}

.mega-dropdown-inner {
    display: flex;
    padding: 25px;
    gap: 30px;
}

.mega-column {
    flex: 1;
    min-width: 150px;
}

.mega-column-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(102, 126, 234, 0.2);
}

.mega-submenu li {
    margin-bottom: 8px;
}

.mega-submenu a {
    display: flex;
    flex-direction: column;
    padding: 12px 15px;
    border-radius: 10px;
    transition: var(--transition);
    position: relative;
}

.mega-submenu a:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    transform: translateX(5px);
}

.mega-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.3rem;
}

.mega-submenu a {
    padding-left: 50px;
}

.mega-submenu a span:not(.mega-icon):not(.mega-desc) {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--dark-text);
}

.mega-desc {
    font-size: 0.8rem;
    color: var(--light-text);
    margin-top: 3px;
}

/* ===== 햄버거 메뉴 버튼 (모바일) ===== */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
    position: absolute;
    right: 20px;
}

.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--dark-text);
    position: relative;
    transition: var(--transition);
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background: var(--dark-text);
    left: 0;
    transition: var(--transition);
}

.hamburger::before {
    top: -7px;
}

.hamburger::after {
    top: 7px;
}

.mobile-menu-btn.active .hamburger {
    background: transparent;
}

.mobile-menu-btn.active .hamburger::before {
    top: 0;
    transform: rotate(45deg);
}

.mobile-menu-btn.active .hamburger::after {
    top: 0;
    transform: rotate(-45deg);
}

/* ===== 모바일 전용 사이드 메뉴 ===== */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
}

.mobile-nav {
    position: fixed;
    top: 0;
    right: -320px;
    width: 320px;
    max-width: 85vw;
    height: 100vh;
    background: #fff;
    z-index: 1002;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.2);
}

.mobile-nav.active {
    right: 0;
}

.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
}

.mobile-nav-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
}

.mobile-nav-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    color: #fff;
    transition: var(--transition);
}

.mobile-nav-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.mobile-nav-body {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}

.mobile-nav-category {
    margin-bottom: 10px;
    border-radius: 12px;
    overflow: hidden;
    background: #f8f9fa;
}

.mobile-category-btn {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark-text);
    cursor: pointer;
    transition: var(--transition);
}

.mobile-category-btn:hover {
    background: rgba(102, 126, 234, 0.1);
}

.mobile-category-btn.active {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: #fff;
}

.category-arrow {
    transition: transform 0.3s ease;
}

.mobile-category-btn.active .category-arrow {
    transform: rotate(90deg);
}

.mobile-submenu {
    display: none;
    padding: 10px 15px 15px;
    background: #fff;
}

.mobile-submenu.active {
    display: block;
}

.mobile-submenu li {
    margin-bottom: 5px;
}

.mobile-submenu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 10px;
    font-size: 0.95rem;
    color: var(--dark-text);
    transition: var(--transition);
}

.mobile-submenu a:hover {
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary-color);
}

.mobile-icon {
    font-size: 1.2rem;
}

.mobile-nav-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 15px;
    justify-content: center;
}

.mobile-nav-footer a {
    color: var(--light-text);
    font-size: 0.9rem;
    transition: var(--transition);
}

.mobile-nav-footer a:hover {
    color: var(--primary-color);
}

/* ===== 계산기 탭 ===== */
.calculator-tabs {
    padding: 4rem 0;
    background: #f8f9fa;
}

.tabs-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-text);
    margin-bottom: 3rem;
}

.tabs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.tab-card {
    display: block;
    background: #fff;
    border-radius: 16px;
    padding: 2rem;
    text-decoration: none;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    border: 2px solid transparent;
}

.tab-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(139, 92, 246, 0.2);
    border-color: var(--primary-color);
}

.tab-icon {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 1rem;
}

.tab-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dark-text);
    text-align: center;
    margin-bottom: 0.5rem;
}

.tab-desc {
    color: var(--light-text);
    text-align: center;
    line-height: 1.5;
}

/* 반응형 */
@media (max-width: 768px) {
    .tabs-title {
        font-size: 1.5rem;
    }
    
    .tabs-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .tab-card {
        padding: 1.5rem;
    }
    
    .tab-icon {
        font-size: 2.5rem;
    }
    
    .tab-title {
        font-size: 1.3rem;
    }
}

/* ===== 계산기 페이지 스타일 ===== */
.page-header {
    text-align: center;
    padding: 4rem 0 2rem;
    background: #f8f9fa;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark-text);
    margin-bottom: 1rem;
}

.page-subtitle {
    font-size: 1.2rem;
    color: var(--light-text);
    max-width: 600px;
    margin: 0 auto;
}

.calculator-section {
    padding: 4rem 0;
}

.calculator-container {
    width: 100%;
    max-width: 920px;
    margin: 0 auto;
    padding: 0 16px;
    box-sizing: border-box;
}

.calculator-inputs,
.calculator-results {
    background: #fff;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--card-shadow);
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dark-text);
    margin-bottom: 1.5rem;
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    font-weight: 500;
    color: var(--dark-text);
    margin-bottom: 0.5rem;
}

.input-group input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.calculate-btn {
    width: 100%;
    padding: 1rem;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.calculate-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.3);
}

.calculate-btn.secondary {
    background: var(--secondary-color);
}

.calculate-btn.secondary:hover {
    background: #475569;
}

.results-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.result-label {
    font-weight: 500;
    color: var(--dark-text);
}

.result-value {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.result-value.success {
    color: var(--success-color);
}

.result-value.warning {
    color: #f59e0b;
}

.result-value.danger {
    color: var(--danger-color);
}

.seo-content {
    padding: 4rem 0;
    margin: 0 auto;
}

.seo-content h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-text);
    margin-bottom: 1.5rem;
}

.seo-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dark-text);
    margin: 2rem 0 1rem;
}

.seo-content p,
.seo-content li {
    line-height: 1.7;
    color: var(--light-text);
}

.seo-content ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.seo-content li {
    margin-bottom: 0.5rem;
}

.cta-section {
    padding: 4rem 0;
    text-align: center;
    background: #f8f9fa;
}

.cta-section h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-text);
    margin-bottom: 2rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-btn {
    display: inline-block;
    padding: 1rem 2rem;
    background: var(--primary-color);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: var(--transition);
}

.cta-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.3);
}

/* 리포트 스타일 */
.report-preview {
    background: #fff;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--card-shadow);
    margin-bottom: 2rem;
}

.report-header {
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.report-header h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--dark-text);
    margin-bottom: 0.5rem;
}

.report-content .report-section {
    margin-bottom: 2rem;
}

.report-content .report-section h4 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--dark-text);
    margin-bottom: 1rem;
    border-left: 4px solid var(--primary-color);
    padding-left: 1rem;
}

.report-data {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    line-height: 1.6;
}

.report-data p {
    margin: 0.5rem 0;
    color: var(--dark-text);
}

.report-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* 반응형 */
@media (max-width: 768px) {
    .page-title {
        font-size: 2rem;
    }
    
    .calculator-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .calculator-inputs,
    .calculator-results {
        padding: 1.5rem;
    }
    
    .section-title {
        font-size: 1.3rem;
    }
    
    .seo-content h2 {
        font-size: 1.5rem;
    }
    
    .cta-section h2 {
        font-size: 1.5rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-btn {
        width: 200px;
    }
}

/* ===== 푸터 ===== */
.main-footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    padding: 25px 20px;
    font-size: 0.9rem;
}

/* ===== 반응형 - 태블릿/모바일 ===== */
@media (max-width: 992px) {
    .mega-nav {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }
}

/* 기존 main-nav 스타일 (하위 호환) */
.main-nav {
    display: none;
}

/* ===== 유틸리티 클래스 ===== */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

/* ===== 카카오 광고 스타일 ===== */
.ad-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    margin: 20px auto;
    max-width: 100%;
    background: linear-gradient(145deg, #f8fafc, #f1f5f9);
    border-radius: 16px;
    border: 1px solid #e2e8f0;
}

.ad-container-sidebar {
    position: sticky;
    top: 90px;
    padding: 15px;
    margin: 20px 0;
    background: linear-gradient(145deg, #f8fafc, #f1f5f9);
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    text-align: center;
}

.ad-label {
    font-size: 0.7rem;
    color: #94a3b8;
    text-align: center;
    margin-bottom: 8px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* 메인 페이지 광고 */
.ad-banner-main {
    display: flex;
    justify-content: center;
    padding: 25px 0;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border-bottom: 1px solid #e2e8f0;
}

/* 푸터 상단 광고 */
.ad-banner-footer {
    display: flex;
    justify-content: center;
    padding: 30px 20px;
    background: linear-gradient(180deg, #f1f5f9 0%, #e2e8f0 100%);
}

/* 사이드바 광고 (계산기 페이지) */
.content-with-ad {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.main-calculator {
    min-width: 0;
}

.sidebar-ad {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

@media (max-width: 1024px) {
    .content-with-ad {
        grid-template-columns: 1fr;
    }
    
    .sidebar-ad {
        display: none;
    }
    
    .ad-container-sidebar {
        display: none;
    }
}

@media (max-width: 768px) {
    .ad-container {
        padding: 15px 10px;
        margin: 15px auto;
    }
    
    .ad-banner-main,
    .ad-banner-footer {
        padding: 20px 10px;
    }
}

/* ========== SEO CONTENT MOBILE OPTIMIZE ========== */
/* 모든 계산기 페이지의 SEO 콘텐츠 영역 가독성 최적화 */

.seo-content {
    max-width: 980px;
    margin: 24px auto 0;
    padding: 0 24px 32px;
    color: #111;
}

.seo-content * {
    box-sizing: border-box;
}

/* 제목 스타일 */
.seo-content h2,
.seo-content h3,
.seo-content h4,
.seo-content h5,
.seo-content h6 {
    word-break: keep-all;
    overflow-wrap: break-word;
    line-height: 1.25;
    margin: 22px 0 12px;
    color: #1f2937;
}

.seo-content h2 {
    font-size: 26px;
    font-weight: 700;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 12px;
}

.seo-content h3 {
    font-size: 21px;
    font-weight: 700;
}

.seo-content h4 {
    font-size: 18px;
    font-weight: 600;
}

/* 문단 스타일 */
.seo-content p {
    line-height: 1.7;
    margin: 10px 0;
    word-break: keep-all;
    overflow-wrap: break-word;
    font-size: 15px;
    color: #374151;
}

/* 리스트 스타일 */
.seo-content ul,
.seo-content ol {
    margin: 10px 0 14px;
    padding-left: 20px;
}

.seo-content li {
    line-height: 1.65;
    margin: 6px 0;
    word-break: keep-all;
    overflow-wrap: break-word;
    font-size: 15px;
    color: #374151;
}

.seo-content ol li {
    margin-left: 8px;
}

/* 강조 박스 공통 스타일 (팁/주의/정의/정보 등) */
.seo-content .note,
.seo-content .tip,
.seo-content .warn,
.seo-content .info,
.seo-content .callout,
.seo-content .highlight,
.seo-content .alert {
    border-radius: 14px;
    padding: 14px 14px;
    margin: 14px 0;
    border-left: 4px solid #8b5cf6;
}

.seo-content .note,
.seo-content .info,
.seo-content .callout {
    background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
    border-left-color: #8b5cf6;
    color: #5b21b6;
}

.seo-content .tip {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-left-color: #10b981;
    color: #065f46;
}

.seo-content .warn,
.seo-content .alert {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-left-color: #f59e0b;
    color: #92400e;
}

/* 인라인 코드/코드블럭 */
.seo-content code {
    word-break: break-word;
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
}

.seo-content pre {
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: anywhere;
    border-radius: 14px;
    padding: 12px 12px;
    overflow: auto;
    background: #1f2937;
    color: #f3f4f6;
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
    line-height: 1.6;
    margin: 14px 0;
    border: 1px solid #374151;
}

/* 링크/강조 */
.seo-content a {
    color: #8b5cf6;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: all 0.2s ease;
}

.seo-content a:hover {
    color: #7c3aed;
    text-decoration-thickness: 2px;
}

.seo-content strong,
.seo-content b {
    font-weight: 700;
    color: #1f2937;
}

/* 이미지/iframe 안전 */
.seo-content img,
.seo-content iframe {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 12px auto;
    border-radius: 8px;
}

/* 표: 기본은 PC에서 그대로 */
.seo-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 14px 0;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.seo-content th {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    padding: 12px 10px;
    text-align: left;
    font-weight: 700;
    border-bottom: 2px solid #7c3aed;
}

.seo-content td {
    padding: 10px 10px;
    vertical-align: top;
    word-break: keep-all;
    overflow-wrap: break-word;
    border-bottom: 1px solid #e5e7eb;
}

.seo-content tr:last-child td {
    border-bottom: none;
}

/* FAQ/아코디언 */
.seo-content .faq-item {
    margin: 10px 0;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.seo-content .faq-q {
    font-weight: 700;
    line-height: 1.4;
    word-break: keep-all;
    padding: 12px;
    background: #f9fafb;
    cursor: pointer;
    transition: all 0.2s ease;
}

.seo-content .faq-q:hover {
    background: #f3f4f6;
}

.seo-content .faq-a {
    margin-top: 0;
    line-height: 1.7;
    padding: 12px;
    background: white;
    color: #374151;
}

/* ========== MOBILE OPTIMIZE (768px 이하) ========== */
@media (max-width: 768px) {
    .seo-content {
        padding: 0 16px 28px;
        margin: 20px auto 0;
    }

    .seo-content h2 {
        font-size: 20px;
        margin: 18px 0 10px;
        padding-bottom: 10px;
    }

    .seo-content h3 {
        font-size: 17px;
        margin: 16px 0 10px;
    }

    .seo-content h4 {
        font-size: 15px;
        margin: 14px 0 8px;
    }

    .seo-content h5 {
        font-size: 14px;
        margin: 12px 0 8px;
    }

    .seo-content p,
    .seo-content li {
        font-size: 14px;
    }

    /* 긴 숫자/긴 단어/URL로 인한 가로 넘침 방지 */
    .seo-content {
        overflow-wrap: anywhere;
    }

    /* 표는 모바일에서 가로 스크롤 래퍼로 감싸서 깨짐 방지 */
    .seo-content table {
        min-width: 640px;
        margin: 14px 0;
    }

    .seo-content .table-scroll {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 8px;
        margin: 14px 0;
        border: 1px solid #e5e7eb;
    }

    .seo-content .table-scroll::-webkit-scrollbar {
        height: 8px;
    }

    .seo-content .table-scroll::-webkit-scrollbar-track {
        background: #f3f4f6;
        border-radius: 4px;
    }

    .seo-content .table-scroll::-webkit-scrollbar-thumb {
        background: #d1d5db;
        border-radius: 4px;
    }

    .seo-content .table-scroll::-webkit-scrollbar-thumb:hover {
        background: #9ca3af;
    }

    /* 코드블럭도 가로 스크롤 가능하게 */
    .seo-content pre {
        max-width: 100%;
        overflow-x: auto;
    }

    /* 강조 박스 여백 조정 */
    .seo-content .note,
    .seo-content .tip,
    .seo-content .warn,
    .seo-content .info,
    .seo-content .callout,
    .seo-content .highlight,
    .seo-content .alert {
        padding: 12px 12px;
        margin: 12px 0;
        font-size: 14px;
    }

    /* 리스트 여백 조정 */
    .seo-content ul,
    .seo-content ol {
        margin: 8px 0 12px;
        padding-left: 18px;
    }

    .seo-content li {
        margin: 4px 0;
    }

    /* FAQ 컴팩트하게 */
    .seo-content .faq-q,
    .seo-content .faq-a {
        padding: 10px;
        font-size: 14px;
    }

    /* 이미지 마진 조정 */
    .seo-content img,
    .seo-content iframe {
        margin: 10px auto;
    }
}

/* ========== EXTRA SMALL MOBILE (420px 이하) ========== */
@media (max-width: 420px) {
    .seo-content {
        padding: 0 12px 24px;
    }

    .seo-content h2 {
        font-size: 19px;
        margin: 16px 0 9px;
    }

    .seo-content h3 {
        font-size: 16px;
        margin: 14px 0 9px;
    }

    .seo-content h4 {
        font-size: 14px;
        margin: 12px 0 7px;
    }

    .seo-content p,
    .seo-content li {
        font-size: 13.5px;
    }

    .seo-content ul,
    .seo-content ol {
        padding-left: 16px;
    }

    .seo-content .note,
    .seo-content .tip,
    .seo-content .warn,
    .seo-content .info,
    .seo-content .callout {
        padding: 10px;
        font-size: 13px;
    }

    .seo-content table {
        min-width: 500px;
        font-size: 12px;
    }

    .seo-content th,
    .seo-content td {
        padding: 8px;
    }

    .seo-content code {
        font-size: 12px;
    }

    .seo-content pre {
        font-size: 12px;
        padding: 10px;
    }
}

