/* ==========================================================================
   1. 부드러운 스크롤 (스르르륵 내려가는 핵심) & 위치 보정
   ========================================================================== */
html {
    scroll-behavior: smooth; /* CSS만으로 클릭 시 스르륵 부드럽게 이동 */
}

/* 스크롤 도착 시 고정 헤더에 제목이 가려지지 않도록 상단 여백 보정 */
.scroll-target {
    scroll-margin-top: 110px;
}


/* ==========================================================================
   2. 2단 서브 레이아웃 전체 구조
   ========================================================================== */
.sub-layout-main {
    width: 100%;
    background-color: #f8f9fa;
    padding: 40px 0 80px 0;
}

.sub-layout-container {
    max-width: 1400px;
    margin: 30px auto 0 auto;
    /*padding: 0 20px;*/
    display: flex;
    flex-direction: column;
    gap: 30px;
    box-sizing: border-box;
}

/* PC 화면 (1024px 이상)에서 2단 나란히 배치 */
@media (min-width: 1024px) {
    .sub-layout-container {
        flex-direction: row;
        gap: 50px;
    }
}


/* ==========================================================================
   3. [좌측] TOC 네비게이션 바
   ========================================================================== */
.sub-toc-aside {
    width: 100%;
}

@media (min-width: 1024px) {
    .sub-toc-aside {
        width: 280px;
        flex-shrink: 0;
    }
}

.sub-toc-nav {
    /*background-color: #ffffff;*/
    /*padding: 0 20px;*/
    border-radius: 12px;

    /*border: 1px solid #e5e7eb;*/
    /*box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);*/
}

@media (min-width: 1024px) {
    .sub-toc-nav {
        padding: 20px;
        position: sticky;
        top: 100px;
    }
}

.sub-toc-title {
    font-size: 18px;
    font-weight: 700;
    color: #111111;
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid #eee;
}

.toc-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.toc-link {
    display: block;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    color: #555555;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.toc-link:hover {
    background-color: #f3f4f6;
    color: #111111;
}

/* 활성화 상태 (Active - JS 스크롤스파이 연동 시 적용) */
.toc-link.active {
    background-color: #C74C1B;
    color: #ffffff;
    font-weight: 700;
}

/* 서브 메뉴 (3-1 등) 스타일 */
.toc-sub-menu {
    list-style: none;
    margin: 4px 0 0 12px;
    padding-left: 10px;
    border-left: 2px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.toc-sub-menu .toc-link {
    font-size: 14px;
    padding: 6px 10px;
}

.toc-sub-menu .toc-link.active {
    background-color: rgba(163, 28, 14, 0.1);
    color: #C74C1B;
    font-weight: 700;
}


/* ==========================================================================
   4. [우측] 본문 컨텐츠 디자인
   ========================================================================== */
.sub-content-article {
    flex: 1;
    background-color: #ffffff;
    padding: 30px 20px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    gap: 60px;
}

@media (min-width: 768px) {
    .sub-content-article {
        padding: 40px;
    }
}

.content-heading-main {
    font-size: 32px;
    font-weight: 800;
    color: #111111;
    margin: 0;
}

.content-heading-sub {
    font-size: 26px;
    font-weight: 700;
    color: #111111;
    margin: 0;
}

.content-heading-tertiary {
    font-size: 22px;
    font-weight: 700;
    color: #111111;
    margin: 0;
}

.content-description {
    margin-top: 14px;
    font-size: 17px;
    line-height: 1.8;
    color: #444444;
}

.content-sub-text {
    margin-top: 8px;
    font-size: 15px;
    color: #666666;
}

.sub-section-box {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid #eee;
}

.content-image-wrap {
    margin-top: 20px;
}

.content-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}
/* ==========================================================================
   5. 모바일(1024px 미만) 최적화: 인스타그램 해시태그 스타일 칩 네비게이션
   ========================================================================== */
@media (max-width: 1023.98px) {
    /* 모바일: 본문 위 여백 없이 (2026-11-27 요청 · 성범죄 혐의분류 8개 + 징계 페이지만 이 레이아웃을 씀) */
    /*   위 여백을 0 으로 하면 안쪽 .sub-layout-container 의 위 마진이 밖으로 빠져나와(마진 겹침) 그 자리에 흰 배경이 보였음
         → flow-root 로 마진을 회색 영역 안에 가두고, 간격은 30 → 16px 로 좁힘 */
    .sub-layout-main {
        padding-top: 0;
        display: flow-root;
    }

    .sub-layout-container {
        flex-direction: column;
        gap: 20px;
        padding: 0 12px;
        margin-top: 16px;
    }

    /* 모바일 목차(칩): 스크롤해도 화면 위에 고정 (2026-11-27 요청) — top 은 사이트 모바일 상단 바 높이만큼 */
    .sub-toc-aside {
        width: 100%;
        background: #ffffff;
        border: 1px solid #e5e7eb;
        border-radius: 12px;
        padding: 16px;
        position: -webkit-sticky;
        position: sticky;
        top: var(--anlab-sub-toc-top, 64px);
        z-index: 90;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    }

    .sub-toc-title {
        font-size: 16px;
        font-weight: 700;
        padding-bottom: 8px;
        margin-bottom: 12px;
        border-bottom: 1px solid #eee;
        color: #111;
    }

    .toc-menu-list {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 8px;
        padding-bottom: 4px;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .toc-menu-list::-webkit-scrollbar {
        display: none;
    }

    .toc-item {
        flex-shrink: 0;
    }

    .toc-link {
        display: inline-block;
        padding: 8px 14px;
        font-size: 14px;
        font-weight: 500;
        background-color: #f1f3f5;
        border: 1px solid #e9ecef;
        border-radius: 20px;
        color: #495057;
        text-decoration: none;
        white-space: nowrap;
        transition: all 0.2s ease;
    }

    .toc-link:hover {
        background-color: #e2e6ea;
        color: #111;
    }

    .toc-link.active {
        background-color: #C74C1B !important;
        border-color: #C74C1B !important;
        color: #ffffff !important;
        font-weight: 700;
        box-shadow: 0 2px 6px rgba(163, 28, 14, 0.3);
    }

    .toc-sub-menu {
        display: none;
    }
}
/*
---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
PC 전용 하단 고정 바 전체 레이아웃 */
.anlab-bottom-sticky-bar { display: none; }

@media (min-width: 1280px) {
    .anlab-bottom-sticky-bar { display: block; position: fixed; bottom: 0 !important; top: auto !important; left: 0; width: 100%; z-index: 999; background-color: #161616; border-top: 1px solid rgba(201, 176, 139, 0.2); box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5); }
}

.anlab-bottom-sticky-bar .bottom-bar-container {
    margin: 0 auto;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
}

/* 1. 대표전화 사선 뱃지 */
.anlab-bottom-sticky-bar .call-badge-zone { position: relative; height: 100%; display: flex; align-items: center; margin-right: 30px; }
.anlab-bottom-sticky-bar .call-badge-link { position: relative; display: flex; align-items: center; height: 100px; padding: 0 75px 10px 35px; background: linear-gradient(135deg, #D9652F 0%, #C74C1B 55%, #A43F14 100%); color: #ffffff; text-decoration: none; clip-path: polygon(0 0, 88% 0, 100% 100%, 0 100%); transition: filter 0.2s ease; }
.anlab-bottom-sticky-bar .call-badge-link:hover { filter: brightness(1.15); }
.anlab-bottom-sticky-bar .call-badge-content { display: flex; flex-direction: column; justify-content: center; }
.anlab-bottom-sticky-bar .call-badge-content .sub-label { font-size: 15px; font-weight: 500; color: #FFE3D2; letter-spacing: -0.3px; line-height: 1.1; }
.anlab-bottom-sticky-bar .call-badge-content .main-number { font-size: 30px; font-weight: 900; letter-spacing: -0.5px; color: #ffffff; line-height: 1.2; }

/* 2. 빠른 상담 신청 폼 */
.anlab-bottom-sticky-bar .quick-lead-form { display: flex; align-items: center; gap: 16px; flex: 1; justify-content: center; }
.anlab-bottom-sticky-bar .form-inputs-wrap { display: flex; align-items: center; gap: 14px; }

/* 입력 필드 (사이즈 및 폰트 확대) */
.anlab-bottom-sticky-bar .input-field input { width: 190px; height: 44px; padding: 0 14px; border-radius: 6px; border: 1px solid #555; background-color: #ffffff; color: #111111; font-size: 15px; font-weight: 500; outline: none; transition: border-color 0.2s ease; }
.anlab-bottom-sticky-bar .input-field input:focus { border-color: #C74C1B; box-shadow: 0 0 0 2px rgba(199, 76, 27, 0.25); }
.anlab-bottom-sticky-bar .input-field input::placeholder { color: #888888; font-size: 14px; }

/* 개인정보 동의 영역 (사이즈 및 폰트 확대) */
.anlab-bottom-sticky-bar .privacy-check-wrap { display: flex; align-items: center; gap: 8px; margin: 0 10px; }
.anlab-bottom-sticky-bar .privacy-label { display: flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.anlab-bottom-sticky-bar .privacy-label input[type="checkbox"] { accent-color: #C74C1B; width: 16px; height: 16px; cursor: pointer; }
.anlab-bottom-sticky-bar .privacy-text { font-size: 14px; color: #fff; letter-spacing: -0.5px; font-weight: 500; }
.anlab-bottom-sticky-bar .privacy-more-btn { background: none; border: none; padding: 0; font-size: 13px; color: #bbbbbb; text-decoration: underline; cursor: pointer; margin-left: 2px; }
.anlab-bottom-sticky-bar .privacy-more-btn:hover { color: #ffffff; }

/* 제출 버튼 (사이즈 및 폰트 확대) */
.anlab-bottom-sticky-bar .submit-btn { height: 44px; padding: 0 28px; background: linear-gradient(135deg, #D9652F 0%, #C74C1B 55%, #A43F14 100%); border-radius: 6px; color: #ffffff; font-size: 15px; font-weight: 700; cursor: pointer; white-space: nowrap; transition: transform 0.1s ease, filter 0.2s ease; }
.anlab-bottom-sticky-bar .submit-btn:hover { filter: brightness(1.15); transform: translateY(-1px); }
.anlab-bottom-sticky-bar .submit-btn:active { transform: translateY(0); }
/* ==========================================================================
   hub 브랜드색 (2026-11-30) — 허브 메인 섹션(main-sections.css) · 성공사례 본문(case-content.css)을 이 사이트 색으로
   · 허브 CSS 는 색을 변수로 쓰고 기본값은 assault 와인/빨강 → 여기서 변수만 덮어쓰면 마약 사이트만 주황
   · body 에 두는 이유: 허브 CSS 의 :root 값보다 가까운 조상이라 이쪽이 이김 (허브 CSS 가 나중에 불려도 상관없음)
   · .hubcase 는 요소 자체에 변수를 두므로 body .hubcase 로 한 단계 더 구체적으로
   ========================================================================== */
body {
    --hubms-accent: #C74C1B;          /* 변호사 · 성공사례 · 작은 라벨 · 제목 강조 */
    --hubms-accent-hover: #A33A12;
    --hubms-accent-alt: #C74C1B;      /* 상황별 안내 · 고객후기 */
    --hubms-hero-accent: #C74C1B;     /* 히어로 강조 */
    --hubms-btn-bg: #C74C1B;          /* 히어로 Primary 버튼 */
    --hubms-btn-bg-hover: #A33A12;
    --hubms-point: #C74C1B;           /* 오시는 길 지도 말풍선 */
    --hubt-color-accent: #C74C1B;     /* 작은 라벨 · 제목 강조 줄 — 허브 :root 에서 var(--hubms-accent) 로 이미 계산돼 내려오므로 직접 지정 */
}
body .hubms-review-section,
body .hubms-review-lb {
    --hubms-review-accent: #C74C1B;   /* 허브에서 var(--hubms-accent-alt) 로 이 요소에 정의 → 같은 이유로 직접 지정 */
    --hubms-review-accent-hover: #A33A12;
    --hubms-review-accent-bg: #fbefe9;
}
body .hubms-loc {
    --hubms-loc-point: #C74C1B;       /* 오시는 길 탭 · 지도 링크 (허브가 .hubms-loc 요소에 정의) */
}
/* (2026-12-02) 성공사례 본문 · 상단 소개(.hub-content-inner · .hubcase-intro · .hubcase)는 drug 색으로 덮지 않음
   → 허브 편집기 「본문 색감」 그대로: 「기본 (버건디)」= 허브 기본 버건디, 다른 색을 고르면 그 글의 요소 style 이 적용
   (12/01 에는 body 에 --hubcase-accent: #C74C1B 를 두어 「기본」이 drug 주황으로 보였음 — 되돌리려면 이 주석 아래에 그 규칙을 다시 넣으면 됨) */

/* (2026-12-01) /qna/ 목록 · 하단 상담 상자 (mu-plugins/anlab-qna 의 .aqx 가 자기 <style> 에서 버건디 #8b1e2d 를 씀)
   → 플러그인은 assault 와 같은 파일로 두고 색만 여기서 덮어씀 (body .aqx 가 .aqx 보다 구체적이라 이김) */
body .aqx {
    --aqx-p: #C74C1B;
    --aqx-ps: #fbefe9;
}

/* (2026-12-02) 예전 메인(home.php 의 #home-hero) 위 여백 — 허브 메인편집을 쓰면 해당 없음
   예전 헤더는 히어로 위에 겹쳐 있어서 히어로가 padding-top 140px(모바일) · 180px(PC) 로 헤더 자리를 비워 뒀음
   → 새 GNB 는 본문 위에 따로 있으니 그만큼 줄임 (PC 높이도 930 → 812 로 줄여 첫 화면에 변호사 줄이 보이게) */
body .anlab-home-hero { padding-top: 40px; }
@media (min-width: 1280px) {
    body .anlab-home-hero { padding-top: 62px; height: 812px; }
}
