/* ---------------------------------------------------------
   [style.css] 전체 수정본 (정렬 및 가독성 최적화)
   --------------------------------------------------------- */
   
/* 1. 기본 설정 (Reset & Typography) */
:root {
    --primary: #2563eb;       /* 신뢰감 있는 블루 */
    --primary-dark: #1e40af;
    --text-main: #111827;     /* 가독성 좋은 진한 검정 */
    --text-sub: #4b5563;      /* 눈이 편한 회색 */
    --bg-light: #f3f4f6;
    --white: #ffffff;
    --border: #e5e7eb;
    --radius: 12px;           /* 둥글기 통일 */
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
    background-color: var(--white);
    color: var(--text-main);
    line-height: 1.6;
    word-break: keep-all; /* 한글 단어 잘림 방지 */
}

a { text-decoration: none; color: inherit; transition: 0.2s; }
ul { list-style: none; }

/* 레이아웃 공통 */
.inner { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.section { padding: 80px 0; }
.bg-gray { background-color: var(--bg-light); }

/* 2. 헤더 */
header {
    height: 70px;
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; background: rgba(255,255,255,0.9);
    backdrop-filter: blur(8px); z-index: 100;
    display: flex; align-items: center;
}
header .inner { width: 100%; display: flex; justify-content: space-between; align-items: center; }
.logo a { font-weight: 800; font-size: 1.3rem; color: var(--primary); letter-spacing: -0.5px; }
nav ul { display: flex; gap: 24px; }
nav a { font-size: 0.95rem; font-weight: 600; color: var(--text-sub); }
nav a:hover { color: var(--primary); }

/* 3. 히어로 섹션 */
.hero {
    text-align: center; padding: 100px 0;
    background: linear-gradient(180deg, #eff6ff 0%, #ffffff 100%);
}
.hero h1 {
    font-size: 2.8rem; font-weight: 800; line-height: 1.2;
    margin-bottom: 20px; letter-spacing: -1px; color: #1f2937;
}
.hero p { font-size: 1.1rem; color: var(--text-sub); margin-bottom: 30px; }
.hero-btns { display: flex; justify-content: center; gap: 12px; }
.btn-primary {
    background: var(--primary); color: white; padding: 12px 28px;
    border-radius: 50px; font-weight: 700;
}
.btn-secondary {
    background: white; border: 1px solid var(--border); padding: 12px 28px;
    border-radius: 50px; font-weight: 700; color: var(--text-sub);
}

/* 4. 카드 그리드 (핵심 수정 부분) */
.grid-container {
    display: grid;
    /* 카드의 최소 너비를 320px로 잡아서 너무 좁아지지 않게 함 */
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 30px;
    transition: transform 0.2s, box-shadow 0.2s;
    
    /* [정렬 핵심] Flexbox로 내부 요소를 세로 정렬 */
    display: flex;
    flex-direction: column;
    height: 100%; /* 그리드 셀 높이를 꽉 채움 */
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 20px rgba(0,0,0,0.08);
    border-color: var(--primary);
}

.icon-box {
    width: 48px; height: 48px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; margin-bottom: 20px;
}

/* 제목 높이 고정 (줄바꿈이 생겨도 정렬 유지) */
.card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 12px;
    min-height: 3.2rem; /* 2줄 높이 확보 */
    display: flex;
    align-items: center; /* 텍스트 세로 중앙 정렬 */
}

/* 본문 내용 */
.card p {
    color: var(--text-sub);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 24px;
    flex-grow: 1; /* 남은 공간을 p태그가 차지해서 버튼을 바닥으로 밈 */
}

/* 하단 링크 버튼 */
.link-text {
    font-weight: 700;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: auto; /* [중요] 무조건 바닥에 붙임 */
    padding-top: 15px;
    border-top: 1px solid #f3f4f6;
    width: 100%;
}
.link-text i { font-size: 0.8rem; transition: margin 0.2s; }
.link-text:hover i { margin-left: 5px; }

/* 5. 툴 리스트 스타일 */
.tool-list { display: flex; flex-direction: column; gap: 20px; }
.tool-card {
    background: white; border: 1px solid var(--border);
    border-radius: var(--radius); padding: 24px;
    display: flex; align-items: center; justify-content: space-between;
    transition: 0.2s;
}
.tool-card:hover { border-color: var(--primary); }
.tool-info h3 { font-size: 1.1rem; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.tool-info p { margin-top: 6px; color: var(--text-sub); font-size: 0.95rem; }
.tag { font-size: 0.75rem; padding: 2px 8px; border-radius: 4px; background: #eff6ff; color: var(--primary); }
.btn-sm {
    padding: 8px 16px; border: 1px solid var(--border); background: white;
    border-radius: 6px; cursor: pointer; color: var(--text-sub); font-weight: 600;
}
.btn-sm:hover { background: var(--bg-light); color: var(--text-main); }

/* 모바일 대응 */
@media (max-width: 768px) {
    .hero h1 { font-size: 2rem; }
    .tool-card { flex-direction: column; align-items: flex-start; gap: 16px; }
    .btn-sm { width: 100%; }
}

/* 로드맵 스타일 보강 */
.roadmap-container { display: flex; gap: 20px; flex-wrap: wrap; }
.step-card-link { flex: 1; min-width: 280px; display: block; }
.step-card {
    background: var(--bg-light); padding: 30px; border-radius: var(--radius);
    height: 100%; transition: 0.2s; border: 1px solid transparent;
}
.step-card:hover { background: white; border-color: var(--primary); box-shadow: 0 10px 20px rgba(0,0,0,0.05); }
.step-num { font-size: 2rem; font-weight: 900; color: #cbd5e1; margin-bottom: 10px; }
.step-card h3 { font-size: 1.2rem; margin-bottom: 10px; font-weight: 700; }
.step-card p { font-size: 0.95rem; color: var(--text-sub); }

/* =========================================
   📖 상세 페이지 (Reading Mode) 전용 스타일
   ========================================= */

/* 1. 본문 컨테이너: 글 읽기 가장 편한 너비와 중앙 정렬 */
.post-content {
    max-width: 740px; /* 너무 넓으면 눈이 아픕니다. 최적 너비 설정 */
    margin: 0 auto;   /* 중앙 정렬 */
    padding: 60px 20px 100px; /* 위아래 여백 넉넉하게 */
}

/* 2. 게시글 헤더 (제목 영역) */
.post-header {
    text-align: center;
    margin-bottom: 60px;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 40px;
}

.post-header h1 {
    font-size: 1.3rem; /* 제목 크기 조정 */
    line-height: 1.4;  /* 줄 간격 조정 */
    font-weight: 800;
    color: #111827;
    margin-bottom: 16px;
    word-break: keep-all; /* 단어 단위로 줄바꿈 */
    letter-spacing: -0.02em;
}

.post-meta {
    color: #6b7280;
    font-size: 1rem;
    font-weight: 500;
}

.category {
    display: inline-block;
    background-color: #eff6ff;
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 100px;
    margin-bottom: 20px;
}

/* 3. 본문 타이포그래피 (가독성 핵심) */
.post-body {
    font-size: 1.125rem; /* 18px: 요즘 웹 트렌드는 폰트가 큼직합니다 */
    line-height: 1.8;    /* 줄 간격을 넓게 시원시원하게 */
    color: #374151;      /* 완전 검정이 아닌 짙은 회색으로 눈 피로 감소 */
}

/* 본문 내 소제목 (h2, h3) 디자인 */
.post-body h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #111827;
    margin-top: 60px;    /* 소제목 위는 넓게 */
    margin-bottom: 20px; /* 소제목 아래는 적당히 */
    padding-bottom: 10px;
    border-bottom: 2px solid #f3f4f6; /* 밑줄 포인트 */
}

.post-body h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1f2937;
    margin-top: 40px;
    margin-bottom: 16px;
}

/* 문단 간격 */
.post-body p {
    margin-bottom: 24px; /* 문단 사이를 띄워줍니다 */
    word-break: keep-all;
}

/* 리스트 스타일 (글머리 기호) */
.post-body ul, .post-body ol {
    margin-bottom: 30px;
    padding-left: 20px;
    background: #f9fafb; /* 리스트 배경 살짝 회색 */
    padding: 24px 24px 24px 40px;
    border-radius: 12px;
}

.post-body li {
    margin-bottom: 12px; /* 리스트 항목 사이 간격 */
    line-height: 1.7;
}

/* 강조 박스 (Highlight Box) */
.highlight-box {
    background-color: #eff6ff; /* 연한 파랑 배경 */
    border: 1px solid #dbeafe;
    border-radius: 16px;
    padding: 28px;
    margin: 40px 0;
}

.highlight-box strong {
    display: block;
    font-size: 1.1rem;
    color: var(--primary);
    margin-bottom: 10px;
}

/* 인용구 (Blockquote) */
blockquote {
    border-left: 5px solid var(--primary);
    background: #f8fafc;
    margin: 30px 0;
    padding: 20px 30px;
    font-style: italic;
    color: #4b5563;
    border-radius: 0 8px 8px 0;
}

/* 나쁜 예 / 좋은 예 박스 */
.comparison-container {
    display: flex;
    gap: 20px;
    margin: 30px 0;
}
.comparison-box {
    flex: 1;
    padding: 24px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}
.comparison-box h4 {
    margin-top: 0 !important; /* 소제목 마진 초기화 */
    font-size: 1.1rem !important;
}

/* 하단 버튼 영역 */
.post-footer {
    margin-top: 80px;
    text-align: center;
    border-top: 1px solid #e5e7eb;
    padding-top: 40px;
}

/* 모바일 최적화 */
@media (max-width: 768px) {
    .post-content { padding: 40px 20px; }
    .post-header h1 { font-size: 1.3rem; }
    .post-body { font-size: 1.05rem; } /* 모바일은 폰트 약간 작게 */
    .post-body h2 { font-size: 1.5rem; margin-top: 40px; }
    .comparison-container { flex-direction: column; } /* 박스 세로 정렬 */
}

/* ---------------------------------------------------
   [New] 뉴스레터 & 푸터 스타일 개선
   --------------------------------------------------- */

/* 1. 뉴스레터 (Call to Action Card Style) */
.newsletter-section {
    padding: 100px 0;
    /* 배경은 흰색 유지하되, 내부 컨텐츠를 카드 형태로 만듦 */
    background-color: #ffffff;
}
.newsletter-content {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%); /* 다크 그레이디언트 */
    color: white;
    text-align: center;
    padding: 60px 40px;
    border-radius: 24px; /* 둥근 모서리 */
    box-shadow: 0 20px 40px rgba(0,0,0,0.1); /* 그림자 효과 */
    max-width: 900px;
    margin: 0 auto;
}
.newsletter-content h2 { font-size: 2rem; margin-bottom: 16px; font-weight: 800; }
.newsletter-content p { font-size: 1.1rem; color: #cbd5e1; margin-bottom: 40px; }

.newsletter-form {
    display: flex; gap: 10px; justify-content: center;
    max-width: 500px; margin: 0 auto;
}
.newsletter-form input {
    flex: 1; padding: 16px 24px; border-radius: 50px; border: none; font-size: 1rem;
    outline: none; box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.newsletter-form button {
    padding: 16px 32px; border-radius: 50px; border: none;
    background: var(--primary); color: white; font-weight: 700; cursor: pointer;
    font-size: 1rem; transition: 0.2s; box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.newsletter-form button:hover { background: var(--primary-dark); transform: translateY(-2px); }

/* 모바일 대응 */
@media (max-width: 600px) {
    .newsletter-content { padding: 40px 20px; border-radius: 16px; }
    .newsletter-form { flex-direction: column; }
    .newsletter-form button { width: 100%; }
}

/* 2. 푸터 (깔끔하고 정돈된 스타일) */
.site-footer {
    background-color: #f8fafc; /* 아주 연한 회색 배경 */
    border-top: 1px solid var(--border);
    padding: 80px 0 30px;
    margin-top: 0;
}
.footer-grid {
    display: grid;
    /* 4개 컬럼: 로고(2), 링크(1), 링크(1), 링크(1) */
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}
.footer-col h3 { font-size: 1.5rem; font-weight: 800; margin-bottom: 20px; color: var(--text-main); }
.footer-col h4 { font-size: 1.1rem; font-weight: 700; margin-bottom: 20px; color: var(--text-main); }
.footer-col p { color: var(--text-sub); line-height: 1.6; margin-bottom: 20px; font-size: 0.95rem; }
.footer-col ul li { margin-bottom: 12px; }
.footer-col a { color: var(--text-sub); font-size: 0.95rem; transition: color 0.2s; }
.footer-col a:hover { color: var(--primary); text-decoration: underline; }

.social-icons { display: flex; gap: 16px; font-size: 1.2rem; }
.social-icons a { color: #94a3b8; }
.social-icons a:hover { color: var(--primary); text-decoration: none; }

.footer-bottom {
    text-align: center;
    border-top: 1px solid #e2e8f0;
    padding-top: 30px;
    color: #94a3b8;
    font-size: 0.85rem;
}

@media (max-width: 768px) {
    .footer-grid { grid-template-columns: 1fr; gap: 40px; } /* 모바일에서 한 줄로 */
}
