/* ===== 1. 공통 변수 및 초기화 ===== */
:root {
    --dz-blue: #0056de; --dz-bg: #edf2f4; --dz-text: #334155; --dz-gray: #4b5563;
    --dz-light-gray: #e2e8f0; --white: #ffffff; --accent: #FF7F6F; --middle-point: #6366f1;
    --green: #10b981; --teal: #3daea4; --purple: #7c3aed; --soft-blue: #eff6ff;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Pretendard', sans-serif; background-color: var(--white); color: var(--dz-text); line-height: 1.7; word-break: keep-all; font-size: 18px; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
a { text-decoration: none; }

/* ===== 2. 헤더 & 푸터 ===== */
header { height: 90px; display: flex; align-items: center; border-bottom: 1px solid var(--dz-light-gray); position: sticky; top: 0; background: var(--white); z-index: 100; }
.nav-wrapper { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.logo { font-size: 28px; font-weight: 800; color: var(--teal); letter-spacing: -1.2px; }

.gnb { display: flex; gap: 30px; }
.gnb a { font-size: 18px; font-weight: 700; color: var(--dz-gray); position: relative; padding: 8px 0; transition: color 0.3s; }
.gnb a::after { content: ''; position: absolute; width: 0; height: 2px; bottom: 0; left: 0; background-color: var(--dz-blue); transition: width 0.3s ease; }
.gnb a:hover, .gnb a.active { color: var(--dz-blue); }
.gnb a:hover::after, .gnb a.active::after { width: 100%; }

.whale-btn { background: var(--dz-blue); color: var(--white); padding: 8px 16px; border-radius: 6px; font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; transition: 0.2s; }
.whale-btn:hover { background: #0046b5; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,86,222,0.2); }

footer { background: #f8fafc; border-top: 1px solid #e2e8f0; padding: 60px 0; margin-top: 80px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 50px; }
.footer-grid p { color: #475569; font-size: 17px; line-height: 1.6; margin: 8px 0; }

/* ===== 3. 히어로 및 공통 섹션 ===== */
/* ✅ 공통 및 서브페이지 히어로는 무조건 중앙 정렬! */
.hero { background-color: var(--dz-bg); padding: 60px 0; text-align: center; overflow: hidden; border-bottom: 1px solid #e2e8f0; }

/* ✅ 서브페이지용 히어로(hero-main) 확실하게 중앙 정렬 고정 */
.hero-main { padding: 90px 0; text-align: center; }
.hero-main .hero-tags { justify-content: center; }

/* ✅ 메인 페이지(hero-grid)만 좌측 정렬 적용! */
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 50px; align-items: center; position: relative; text-align: left; }
.hero-text h1 { font-size: 42px; font-weight: 800; line-height: 1.4; margin-bottom: 24px; color: #1e293b; }
.hero-text h1 span.highlight { color: var(--accent); }

/* ✅ 서브 타이틀 글자 크기 16px로 조정됨 */
.hero-text p { font-size: 16px; color: var(--dz-gray); margin-bottom: 35px; }

/* ✅ 태그 정렬 (기본: 중앙, 메인페이지: 좌측) */
.hero-tags { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.hero-grid .hero-tags { justify-content: flex-start; }
.hero-tags span { background: rgba(255,255,255,0.7); padding: 10px 20px; border-radius: 8px; font-size: 16px; color: #2d8a83; font-weight: 700; border: 1px solid rgba(0,0,0,0.05); }

.hero-visual { position: relative; display: flex; justify-content: center; align-items: center; }
.hero-visual::before { content: ''; position: absolute; width: 320px; height: 320px; background: radial-gradient(circle, rgba(0,86,222,0.08) 0%, rgba(255,255,255,0) 70%); z-index: 1; }
.reading-graphics { position: relative; z-index: 2; width: 100%; display: flex; justify-content: center; }
.reading-graphics svg { width: 260px; height: auto; filter: drop-shadow(0 10px 20px rgba(0,0,0,0.05)); }

.section-padding { padding: 100px 0; }
.section-title { font-size: 34px; font-weight: 800; text-align: center; margin-bottom: 50px; color: #334155; }
.sub-section-title { font-size: 28px; font-weight: 700; margin: 60px 0 30px; color: #1e293b; display: flex; align-items: center; gap: 10px; }

/* ===== 4. [통합] 하얀색 카드 디자인 공통화 ===== */
.info-box, .class-card, .step-card, .summary-item, .curriculum-box, .rule-card {
    background: var(--white);
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05); 
}
.info-box { border-radius: 18px; padding: 50px; margin-bottom: 50px; }
.class-card { border-radius: 20px; padding: 35px; }
.step-card { border-radius: 20px; padding: 40px; background: #f8fafc; transition: transform 0.3s; }
.summary-item { border-radius: 15px; padding: 30px; width: 300px; transition: transform 0.2s; }
.curriculum-box { border-radius: 20px; padding: 40px 50px; margin-bottom: 30px; display: flex; justify-content: space-between; align-items: center; gap: 40px; transition: transform 0.2s; }
.rule-card { border-radius: 16px; padding: 30px; text-align: center; box-shadow: none; }

.step-card:hover, .summary-item:hover, .curriculum-box:hover { transform: translateY(-3px); border-color: var(--dz-blue); }

/* ===== 5. [통합] 리스트(•, ✓ 아이콘) 공통화 ===== */
.info-list li, .content-list li, .step-card li, .step-list li { list-style: none; position: relative; color: #475569; }
.info-list li, .step-card li, .step-list li { margin-bottom: 12px; }
.content-list li { margin-bottom: 6px; padding-left: 15px; font-size: 16px; }
.info-list li { padding-left: 28px; font-size: 18px; }
.step-card li, .step-list li { padding-left: 30px; font-size: 17px; }

.info-list li::before, .content-list li::before, .step-card li::before, .step-list li::before { position: absolute; left: 0; font-weight: 900; color: var(--dz-blue); }
.info-list li::before, .content-list li::before { content: "•"; top: 0; }
.step-card li::before { content: "✓"; }
.step-list li::before { content: '\f00c'; font-family: 'Font Awesome 6 Free'; font-size: 16px; top: 2px; }

/* ===== 6. [통합] 작은 태그/배지 공통화 ===== */
.status-badge, .class-tag, .step-tag, .ref-tag { display: inline-block; border-radius: 4px; font-weight: 700; }
.status-badge { padding: 4px 10px; font-size: 14px; }
.status-ing { background: #eef5ff; color: var(--dz-blue); }
.class-tag { padding: 5px 12px; font-size: 13px; margin-bottom: 15px; }
.tag-student { background: #eef2ff; color: var(--dz-blue); }
.tag-parent { background: #ecfdf5; color: var(--green); }
.tag-purple { background: #f3e8ff; color: #9333ea; }
.step-tag { color: var(--dz-blue); font-size: 15px; margin-bottom: 15px; display: block; }
.ref-tag { background: #f1f5f9; padding: 6px 14px; border-radius: 6px; font-size: 14px; font-weight: 600; color: #64748b; margin-bottom: 25px; align-self: flex-start; }

/* ===== 7. 테이블 및 학년별 그리드 ===== */
.table-wrapper { overflow-x: auto; margin-bottom: 45px; border: 1px solid #e2e8f0; border-radius: 12px; }
table { width: 100%; border-collapse: collapse; min-width: 800px; font-size: 18px; table-layout: fixed; }
th { background: #f8fafc; padding: 18px; font-weight: 700; border-bottom: 2px solid #e2e8f0; color: #475569; }
td { padding: 18px; text-align: center; border-bottom: 1px solid #f0f0f0; color: #475569; transition: background 0.2s; }
tbody tr:hover { background-color: #f4f9ff; }
tbody tr:hover td { color: var(--dz-blue); }

.grade-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 25px; }
.grade-item { background: var(--white); border: 1px solid #eee; border-radius: 14px; padding: 25px; display: flex; align-items: center; gap: 20px; transition: all 0.2s; cursor: pointer; }
.grade-item:hover { border-color: #cbd5e1; background-color: #fcfdfe; transform: translateY(-3px); box-shadow: 0 4px 12px rgba(0,0,0,0.03); }
.grade-num { width: 55px; height: 55px; background: #f1f5f9; border-radius: 10px; display: flex; justify-content: center; align-items: center; font-size: 22px; font-weight: 800; color: var(--dz-blue); flex-shrink: 0; }
.grade-item.middle .grade-num { background: #eef2ff; color: var(--middle-point); }
.grade-info h3 { font-size: 20px; font-weight: 700; color: #475569; }
.grade-info p { font-size: 16px; color: #64748b; }

/* ===== 8. 이펙트 섹션 (100.html) ===== */
.effect-section { padding: 100px 0; background-color: #fcfdfe; }
.effect-stack { display: flex; flex-direction: column; gap: 20px; max-width: 900px; margin: 0 auto; }
.effect-card { background: #ffffff; border: 1px solid #e2e8f0; border-radius: 16px; padding: 30px 45px; display: flex; align-items: center; gap: 35px; position: relative; overflow: hidden; transition: all 0.3s; box-shadow: 0 4px 6px rgba(0,0,0,0.02); }
.effect-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; }
.effect-card:hover { transform: translateX(10px); box-shadow: 0 10px 25px rgba(0,0,0,0.06); border-color: #cbd5e1; }
.level-1::before { background-color: #ef4444; } .level-1 .level-icon { background-color: #fef2f2; color: #ef4444; }
.level-2::before { background-color: #10b981; } .level-2 .level-icon { background-color: #ecfdf5; color: #10b981; }
.level-3::before { background-color: #0ea5e9; } .level-3 .level-icon { background-color: #f0f9ff; color: #0ea5e9; }
.level-special::before { background-color: #6366f1; } .level-special .level-icon { background-color: #eef2ff; color: #6366f1; }
.level-icon { width: 55px; height: 55px; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 22px; font-weight: 800; flex-shrink: 0; }
.effect-info h4 { font-size: 23px; font-weight: 800; color: #1e293b; margin-bottom: 6px; }
.effect-info p { font-size: 17px; color: #64748b; line-height: 1.5; }

/* ===== 9. 기타 모듈 (도서, 명상바 등) ===== */
.rule-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; margin: 40px 0; }
.class-grid, .step-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-top: 30px; }
.class-card h2 { font-size: 24px; font-weight: 800; margin-bottom: 20px; display: flex; align-items: center; gap: 10px; }
.step-card h3 { font-size: 22px; font-weight: 800; margin-bottom: 20px; color: #1e293b; }
.info-row { display: flex; margin-bottom: 12px; border-bottom: 1px dashed #f1f5f9; padding-bottom: 10px; font-size: 17px; }
.info-label { width: 70px; font-weight: 800; color: #64748b; flex-shrink: 0; }
.content-box { background: #f8fafc; border-radius: 10px; padding: 18px; margin-top: 15px; }

.book-section { padding: 100px 0 120px; text-align: center; border-top: 1px solid #f1f5f9; margin-top: 50px; }
.book-title { font-size: 28px; font-weight: 800; margin-bottom: 50px; display: flex; align-items: center; justify-content: center; gap: 12px; color: #334155; }
.book-grid { display: flex; justify-content: center; gap: 50px; flex-wrap: wrap; }
.book-grid .book-item { width: 180px; transition: all 0.25s ease; cursor: pointer; }
.book-grid .book-item:hover { transform: translateY(-2px); }
.book-grid .book-img { width: 150px; height: 210px; margin: 0 auto 15px; border-radius: 6px; display: flex; justify-content: center; align-items: center; padding: 12px; border: 1px solid #e2e8f0; background: #fff; transition: all 0.3s; box-shadow: 2px 4px 10px rgba(0,0,0,0.05); }
.book-grid.tiny-books { display: grid; grid-template-columns: repeat(5, 1fr); gap: 30px; max-width: 800px; margin: 0 auto; justify-items: center; }
.book-grid.tiny-books .book-item { max-width: 120px; width: 100%; text-align: center; }
.book-img-container { width: 100%; aspect-ratio: 3/4; overflow: hidden; border-radius: 6px; box-shadow: 0 4px 12px rgba(0,0,0,0.08); margin-bottom: 12px; border: 1px solid #e2e8f0; }
.book-photo { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.book-grid.tiny-books .book-item:hover .book-photo { transform: scale(1); }

.info-bar { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 25px 40px; margin: 40px auto 60px; max-width: 900px; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05); display: flex; justify-content: space-around; }
.info-item { display: flex; align-items: center; gap: 15px; }
.info-item:not(:last-child) { border-right: 1px solid #f1f5f9; padding-right: 40px; }
.info-item i { color: var(--dz-blue); font-size: 24px; }
.info-item div { display: flex; flex-direction: column; }
.info-item .label { font-size: 13px; color: #64748b; font-weight: 600; margin-bottom: 2px; }
.info-item .value { font-size: 17px; font-weight: 700; color: #1e293b; }

.summary-section { padding: 80px 0; text-align: center; }
.summary-title { font-size: 28px; font-weight: 800; margin-bottom: 40px; color: #334155; }
.summary-grid { display: flex; justify-content: center; gap: 30px; flex-wrap: wrap; }
.summary-item i { font-size: 30px; color: #94a3b8; margin-bottom: 15px; display: block; }
.text-area { display: flex; flex-direction: column; flex: 1; }
.text-area h2 { font-size: 30px; font-weight: 800; color: #0f172a; margin-bottom: 10px; display: flex; align-items: center; gap: 12px; }

/* ===== 10. 반응형 미디어 쿼리 통합 ===== */
@media (max-width: 1024px) {
    /* ✅ 태블릿/모바일에서는 다시 메인 페이지도 중앙 정렬 */
    .hero-grid { grid-template-columns: 1fr; gap: 40px; text-align: center; }
    .hero-grid .hero-tags { justify-content: center; }
    
    .hero { text-align: center; }
    .reading-graphics { justify-content: center; }
    .grade-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
    .step-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .gnb { display: none; }
    .hero, .hero-main { padding: 70px 0; text-align: center; }
    .hero-text h1 { font-size: 32px; }
    .reading-graphics svg { width: 180px; }
    .hero-visual::before { width: 200px; height: 200px; }
    .grade-grid, .class-grid, .footer-grid { grid-template-columns: 1fr; }
    .footer-grid { text-align: center; }
    .info-box, .curriculum-box { padding: 30px 20px; }
    .book-grid.tiny-books { grid-template-columns: repeat(3, 1fr); gap: 20px; }
    .book-grid.tiny-books .book-item { max-width: 100px; }
    .info-bar { flex-direction: column; gap: 20px; padding: 25px; margin: 20px; }
    .info-item:not(:last-child) { border-right: none; border-bottom: 1px solid #f1f5f9; padding-right: 0; padding-bottom: 15px; }
    .curriculum-box, .effect-card { flex-direction: column; text-align: center; }
    .effect-card { padding: 25px; gap: 20px; align-items: flex-start; text-align: left; }
    .effect-card::before { width: 100%; height: 6px; bottom: auto; }
    .text-area { align-items: center; }
    .ref-tag { align-self: center; }
    .step-list li { text-align: left; }
    .summary-grid { gap: 20px; }
    .summary-item { width: 100%; max-width: 300px; }
}
@media (max-width: 480px) {
    .book-grid.tiny-books { grid-template-columns: repeat(2, 1fr); }
}
