@charset "utf-8";

/* =========================================
   1. 기본 설정 및 리셋
   ========================================= */
* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

body {
    font-family: "Malgun Gothic", dotum, Georgia, serif;
    background: #fff;
    color: #000;
}

a {
    color: #262626;
    text-decoration: none;
}

ul, ol {
    list-style: none; /* 기본적으로 리스트 스타일 제거 */
}

img {
    margin-right: 8px;
    align-items: center;
}

/* =========================================
   2. 레이아웃 및 공통 스타일
   ========================================= */
#content {
    padding-left: 16px;
}

#content > section:first-of-type {
    margin-top: 14px;
}

.band-notice p {
    display: none;
}

/* 앵커 이동 시 상단 메뉴 가림 방지 */
#excel-func,
#func-automation,
#cond-format,
#related {
    scroll-margin-top: 90px;
}

/* =========================================
   3. 헤더 및 타이틀 영역 (수정됨)
   ========================================= */
.breadcrumb {
    float: none !important;
    clear: both !important;
    display: block !important;
}

.page-header {
    clear: both !important;
    float: none !important;
    height: auto !important;
    display: flow-root !important;
    /* margin-bottom: 10px; */
}

.page-header h1 {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.25;
    margin: 18px 0 10px;
    letter-spacing: -0.02em;
}

.page-header .page-desc {
    position: static !important;
    float: none !important;
    display: block !important;
    margin: 0;
    line-height: 1.7;
}

/* ▼▼▼ [수정된 부분] 상단 설명 영역 리스트 스타일 복구 ▼▼▼ */
.page-desc ul {
    list-style: disc;       /* 점(disc) 기호 표시 */
    padding-left: 20px;     /* 들여쓰기 확보 */
    margin-top: 8px;
    margin-bottom: 8px;
}

.page-desc ol {
    list-style: decimal;    /* 숫자(1, 2, 3...) 표시 */
    padding-left: 20px;
    margin-top: 8px;
    margin-bottom: 8px;
}

.page-desc li {
    list-style-position: outside; /* 텍스트 바깥으로 기호 배치 */
    margin-bottom: 4px;           /* 항목 간 간격 */
}
/* ▲▲▲ [수정 끝] ▲▲▲ */

/* 카테고리 타이틀 */
.category-title {
    display: flex;
    max-width: 1100px;
    font-size: 2rem;
    font-weight: 700;
}

h2.category-title {
    margin-bottom: 5px;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.section-desc {
    margin: -6px 0 12px;
    line-height: 1.7;
    opacity: 0.9;
}

/* 학습 로드맵 (HTML 인라인 스타일 통합) */
section.learning-path ol {
    margin: 0 0 14px; 
    padding-left: 3rem; 
    line-height: 1.7; 
    list-style-type: decimal;
}

/* =========================================
   4. 목차 (TOC)
   ========================================= */
.toc-title,
.toc-desc,
#toc {
    display: block !important;
    clear: both !important;
    float: none !important;
    position: relative !important;
    z-index: 2;
}

.toc-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: #111;
    margin-top: 22px !important;
    letter-spacing: -0.01em;
}

.toc-desc {
    font-size: 0.95rem;
    opacity: 0.75;
    margin: 0 0 12px;
}

#toc {
    margin: 0;
    padding: 16px 18px;
    border: 1px solid #e6e6e6;
    border-radius: 14px;
    background: #fafafa;
}

#toc p {
    display: none;
    margin: 0;
}

#toc ul,
#toc ol {
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

#toc li {
    margin: 0;
    padding: 0;
}

#toc a {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    padding: 9px 12px;
    border: 1px solid #e2e2e2;
    border-radius: 999px;
    background: #fff;
    text-decoration: none;
    color: #222;
    font-size: 0.98rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: 0.15s;
}

#toc a:hover {
    border-color: #cfcfcf;
    transform: translateY(-1px);
}

#toc a:focus-visible {
    outline: 3px solid rgba(0, 0, 0, 0.15);
    outline-offset: 2px;
}

/* =========================================
   5. Hub 추천 영상 스타일
   ========================================= */
.hub-related {
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 15px;
    background-color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin-bottom: 30px; /* 섹션 간 간격 추가 */
}

.hub-related h2 {
    font-size: 1.35rem; /* 기존 h2 스타일과 통일감 유지 */
    font-weight: 700;
    margin: 0 0 8px 0;
    color: #1a1a1a;
}

.hub-related-sub {
    font-size: 14px;
    color: #666;
    margin: 0 0 20px 0;
    line-height: 1.5;
}

.hub-related-list {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.hub-related-item {
    width: calc(50% - 10px); /* 2열 배치 */
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: hidden;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.hub-related-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    border-color: #ddd;
}

.hub-related-link {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    padding: 20px;
    gap: 20px;
    color: inherit; /* reset a tag color */
}

/* 텍스트 영역 */
.hub-text-wrap {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0; /* 말줄임표 작동 필수 */
    justify-content: center;
}

.hub-related-title {
    display: block;
    font-size: 1.1rem;
    font-weight: bold;
    color: #1a1a1a;
    margin-bottom: 6px;
    line-height: 1.3;
    
    /* 한 줄 말줄임표 */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hub-related-desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 1rem;
    color: #666;
    line-height: 1.5;
    letter-spacing: -0.02em;
}

/* 이미지 래퍼 */
.hub-img-wrap {
    width: 120px;
    height: 68px; /* 16:9 비율 최적화 */
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background-color: #f0f0f0;
}

.hub-related-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* =========================================
   6. 카드 리스트 및 콘텐츠 스타일
   ========================================= */
.card-text {
    padding: 10px 8px 12px;
}

.video-title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 5px;
    line-height: 1.4;
}

/* 멤버십 전용 콘텐츠 */
.membership-contents {
    display: flex;
    justify-content: center;
    align-items: center;
    border-left: crimson 5px solid;
    margin: 20px 0;
}

.membership-contents span,
.membership-contents i {
    padding-left: 10px;
    font-size: 1.2rem;
    font-weight: bold;
    color: crimson;
}

/* =========================================
   7. 관련 글 (Related Links)
   ========================================= */
.related-links {
    margin: 34px 0;
    padding-top: 22px;
    border-top: 1px solid #eee;
}

#related h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 8px;
}

.related-desc {
    margin: 8px 0 16px;
    opacity: 0.85;
    line-height: 1.6;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.related-group {
    padding: 14px;
    border: 1px solid #eee;
    border-radius: 14px;
    background: #fff;
}

.related-group h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 10px;
}

.related-group ul {
    margin: 0;
    padding-left: 1.2rem;
    list-style: disc;
    display: grid;
    gap: 10px;
}

.related-group li {
    list-style-position: outside;
}

.related-links a {
    text-decoration: none;
    line-height: 1.4;
}

.related-links a:hover,
.related-links a:focus-visible {
    text-decoration: underline;
}

/* =========================================
   8. 반응형 (Media Queries)
   ========================================= */
@media (max-width: 900px) {
    .page-header h1 {
        font-size: 1.7rem;
    }

    h2.category-title {
        font-size: 1.2rem !important;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }

    #toc {
        padding: 14px 14px;
    }

    #toc a {
        width: 100%;
        justify-content: flex-start;
        font-size: 0.95rem;
        padding: 10px 12px;
    }
}

@media (max-width: 768px) {
    /* Hub 관련 모바일 대응 */
    .hub-related {
        padding: 16px;
    }
    .hub-related-item {
        width: 100%; /* 1열 배치 */
    }
}

@media (max-width: 700px) {
    .band-notice {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .band-notice {
        grid-template-columns: 1fr;
    }
}