/*
 * howtouse/common.css
 * howtouse 하위 페이지(about/features/student/parent/teacher/jayulsigan) 공통 스타일
 * DESIGN.md의 Yuja Lemon v2 토큰을 그대로 사용한다.
 */

:root {
    --yuja-lemon: #FFE135;
    --yuja-lemon-amber: #F5C800;
    --yuja-forest: #142814;
    --yuja-forest-mid: #1E3D1E;
    --yuja-lemon-tint: #FEFCE8;
    --leaf-green: #4CAA48;
    --leaf-green-mid: #388E3C;
    --leaf-green-deep: #2D7A29;
    --leaf-green-light: #B8E0B5;
    --leaf-green-tint: #E8F5E7;
    --canvas: #FFFFFF;
    --canvas-cream: #F7F6F3;
    --surface: #F1F0EE;
    --hairline: #E8E7E4;
    --hairline-strong: #D3D1CB;
    --ink-deep: #1A1A1A;
    --ink: #37352F;
    --charcoal: #4B4945;
    --slate: #6F6E69;
    --steel: #9B9A97;
}

html, body {
    margin: 0;
    padding: 0;
}

body.howtouse-page {
    font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-color: var(--canvas);
    color: var(--ink);
    letter-spacing: -0.01em;
    line-height: 1.6;
}

/* ====== 서브 페이지 상단 네비 (뒤로가기 + 브레드크럼) ====== */
.howtouse-topbar {
    background-color: var(--canvas-cream);
    border-bottom: 1px solid var(--hairline);
    padding: 0.9rem 1.5rem;
}

.howtouse-topbar-inner {
    max-width: 880px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.howtouse-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--leaf-green-deep);
    text-decoration: none;
    white-space: nowrap;
}

.howtouse-back-link:hover { color: var(--leaf-green-mid); }

.howtouse-breadcrumb {
    font-size: 0.8rem;
    color: var(--steel);
}

.howtouse-breadcrumb a {
    color: var(--steel);
    text-decoration: none;
}

.howtouse-breadcrumb a:hover { color: var(--leaf-green-mid); }

/* ====== 서브 페이지 히어로 ====== */
.howtouse-page-hero {
    background-color: var(--canvas-cream);
    text-align: center;
    padding: 2.75rem 1.5rem 2rem;
}

.howtouse-page-hero .page-icon {
    font-size: 2.5rem;
    line-height: 1;
    margin-bottom: 0.75rem;
}

.howtouse-page-hero h1 {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin: 0 0 0.6rem;
    color: var(--ink-deep);
}

.howtouse-page-hero p {
    font-size: 1rem;
    color: var(--slate);
    max-width: 560px;
    margin: 0 auto;
}

/* ====== 본문 컨테이너 ====== */
.howtouse-content {
    max-width: 780px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem 4rem;
}

.howtouse-content h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--ink-deep);
    margin: 2.25rem 0 1rem;
    padding-top: 0.25rem;
}

.howtouse-content h2:first-child { margin-top: 0; }

.howtouse-content h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--ink);
    margin: 1.5rem 0 0.6rem;
}

.howtouse-content p {
    font-size: 0.98rem;
    color: var(--charcoal);
    margin: 0 0 0.9rem;
}

/* ====== 카드형 박스 ====== */
.htc-card {
    background-color: var(--canvas);
    border: 1px solid var(--hairline);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.htc-card-tint {
    background-color: var(--leaf-green-tint);
    border-color: var(--leaf-green-light);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.htc-card-lemon {
    background-color: var(--yuja-lemon-tint);
    border: 1px solid #F5E9A8;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.htc-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1rem;
}

@media (min-width: 640px) {
    .htc-grid-2 { grid-template-columns: repeat(2, 1fr); }
}

.htc-feature-item {
    display: flex;
    gap: 0.9rem;
    align-items: flex-start;
}

.htc-feature-item .htc-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background-color: var(--leaf-green-tint);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
}

.htc-feature-item h4 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
    color: var(--ink-deep);
}

.htc-feature-item p {
    font-size: 0.92rem;
    color: var(--slate);
    margin: 0;
}

/* ====== 배지 ====== */
.htc-badge {
    display: inline-block;
    background-color: var(--leaf-green);
    color: #FFFFFF;
    font-size: 0.72rem;
    font-weight: 700;
    border-radius: 9999px;
    padding: 0.2rem 0.65rem;
    margin-bottom: 0.5rem;
}

/* ====== CTA 버튼 ====== */
.htc-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background-color: var(--yuja-lemon-amber);
    color: #FFFFFF;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.8rem 1.6rem;
    border-radius: 9999px;
    text-decoration: none;
    transition: transform 0.15s ease;
}

.htc-btn-primary:active { transform: scale(0.95); }

.htc-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background-color: transparent;
    color: var(--ink);
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.65rem 1.2rem;
    border: 1px solid var(--hairline-strong);
    border-radius: 8px;
    text-decoration: none;
}

/* ====== 목록 ====== */
.howtouse-content ul.htc-list {
    padding-left: 1.1rem;
    margin: 0 0 1rem;
}

.howtouse-content ul.htc-list li {
    margin-bottom: 0.5rem;
    color: var(--charcoal);
}

/* ====== 다크 밴드 (강조 구간, 페이지당 1곳만) ====== */
.htc-band-dark {
    background-color: var(--yuja-forest);
    color: #FFFFFF;
    padding: 2.5rem 1.5rem;
    margin: 2.5rem -1.5rem;
    text-align: center;
}

.htc-band-dark h2 {
    color: #FFFFFF;
}

.htc-band-dark p {
    color: rgba(255,255,255,0.75);
}

/* ====== 다음/이전 페이지 내비게이션 ====== */
.howtouse-pagenav {
    max-width: 780px;
    margin: 0 auto;
    padding: 0 1.5rem 3rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.howtouse-pagenav a {
    flex: 1;
    min-width: 160px;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 1rem 1.25rem;
    border: 1px solid var(--hairline);
    border-radius: 12px;
    text-decoration: none;
    color: var(--ink);
    transition: border-color 0.2s;
}

.howtouse-pagenav a:hover { border-color: var(--leaf-green-light); }

.howtouse-pagenav .pagenav-label {
    font-size: 0.75rem;
    color: var(--steel);
    font-weight: 600;
}

.howtouse-pagenav .pagenav-title {
    font-size: 0.95rem;
    font-weight: 700;
}

.howtouse-pagenav .pagenav-next {
    text-align: right;
    align-items: flex-end;
}

/* ====== 학년 탭 (자료실용) ====== */
.htc-tabs {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.75rem;
}

.htc-tab-btn {
    padding: 0.65rem 1.4rem;
    border-radius: 9999px;
    border: 1px solid var(--hairline-strong);
    background: var(--canvas);
    color: var(--ink);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.htc-tab-btn:hover { border-color: var(--leaf-green); }

.htc-tab-btn.active {
    background-color: var(--leaf-green);
    border-color: var(--leaf-green);
    color: #FFFFFF;
}

.htc-tab-panel { display: none; }
.htc-tab-panel.active { display: block; }

/* ====== 자료 목록 (문서 카드) ====== */
.htc-doc-group {
    margin-bottom: 1.5rem;
}

.htc-doc-group-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--steel);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.6rem;
}

.htc-doc-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 1.1rem;
    background: var(--canvas);
    border: 1px solid var(--hairline);
    border-radius: 10px;
    margin-bottom: 0.6rem;
    flex-wrap: wrap;
}

.htc-doc-item .doc-info {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-width: 0;
}

.htc-doc-item .doc-icon {
    flex-shrink: 0;
    font-size: 1.2rem;
}

.htc-doc-item .doc-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--ink);
}

.htc-doc-item .doc-desc {
    font-size: 0.8rem;
    color: var(--steel);
    margin-top: 0.1rem;
}

.htc-doc-item .doc-links {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.htc-doc-link {
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.4rem 0.85rem;
    border-radius: 8px;
    text-decoration: none;
    white-space: nowrap;
}

.htc-doc-link.view {
    background: var(--surface);
    color: var(--ink);
    border: 1px solid var(--hairline-strong);
}

.htc-doc-link.download {
    background: var(--leaf-green);
    color: #FFFFFF;
}

/* ====== 푸터 (index.html과 동일) ====== */
.site-footer {
    width: 100%;
    background-color: #142814;
    color: #6b7c65;
    margin-top: 0;
}

.footer-container {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    max-width: 1080px;
    margin: 0 auto;
    padding: 1.5rem 2.5rem;
    gap: 1.5rem;
}

.footer-copy {
    font-size: 0.8rem;
    color: #6b7c65;
    font-weight: 500;
    white-space: nowrap;
}

.footer-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer-links a {
    font-size: 0.8rem;
    color: #6b7c65;
    text-decoration: none;
    transition: color 0.2s;
    white-space: nowrap;
}

.footer-links a:hover { color: #FFE135; }

@media (max-width: 768px) {
    .footer-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 1.25rem;
        gap: 0.75rem;
    }
    .footer-links {
        justify-content: center;
        gap: 1.2rem;
    }
}
