/* =========================================================
   bridge.css — bridge_style 템플릿 (로컬브릿지 리뉴얼 시안 적용)
   style.css(dark_blue 기반 콘텐츠 스타일) 위에 얹어 사용한다.
   - 라이트 기본 + [data-theme="dark"] 다크 토글
   - 유틸리티바 / 헤더 GNB + 전폭 메가메뉴 / 파노라마 히어로 / 웹진 컴포넌트 / 푸터
   - 서브페이지: 페이지 헤더 + 탭메뉴
   ========================================================= */

/* ---------- 디자인 토큰 (색상은 layout_header 인라인 :root 가 우선) ---------- */
:root {
    --primary-dark: #0854A6;
    --primary-darker: #063A75;
    --primary-light: #E7F1FC;
    --primary-hover: #0B62B8;
    --accent-red: #D64545;
    --accent-orange: #E88B2C;
    --accent-green: #1F8A5B;
    --accent-yellow: #F6C445;
    --accent-teal: #00A99D;
    --accent-lime: #7DBE29;

    --bg-alt: #f7f8fa;
    --surface: #f7f8fa;
    --surface-2: #eef1f5;
    --border-strong: #d1d5db;
    --divider: #eceff3;
    --text-invert: #ffffff;
    --utility-bg: #f4f6f9;
    --utility-text: #4b5563;

    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.06);
    --shadow-lg: 0 8px 24px rgba(15, 23, 42, 0.08);

    --radius-sm: 4px;
    --radius: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;

    --pad-desktop: 32px;
    --pad-tablet: 20px;
    --pad-mobile: 16px;

    --lb-col-w: 150px;     /* GNB 항목 = 메가메뉴 컬럼 폭 */
    --lb-search-w: 40px;   /* 돋보기 버튼 폭 */
    --lb-gap: 24px;
    --lb-header-h: 78px;
}
[data-theme="dark"] {
    --primary-dark: #7bb6ec;
    --primary-darker: #8fbde8;
    --primary-light: #123354;
    --primary-hover: #5eaae8;

    --bg-alt: #0f1729;
    --surface: #131b2e;
    --surface-2: #1a2340;
    --border-strong: #2e3d5c;
    --divider: #1c2740;
    --text-invert: #0b1220;
    --utility-bg: #0f1729;
    --utility-text: #b8c0cf;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
}

/* ---------- 베이스 ---------- */
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    font-size: 16px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    word-break: keep-all;
    overflow-wrap: break-word;
    transition: background-color 0.2s ease, color 0.2s ease;
}
@media (max-width: 640px) { body { font-size: 15px; } }

.lb-container {
    width: 100%;
    max-width: var(--container, 1280px);
    margin: 0 auto;
    padding-left: var(--pad-mobile);
    padding-right: var(--pad-mobile);
    box-sizing: border-box;
}
@media (min-width: 768px)  { .lb-container { padding-left: var(--pad-tablet);  padding-right: var(--pad-tablet); } }
@media (min-width: 1024px) { .lb-container { padding-left: var(--pad-desktop); padding-right: var(--pad-desktop); } }

/* 서브페이지 컨텐츠 래퍼 (style.css .container 폭/여백 보정) */
.container { padding: 0 var(--pad-mobile); }
@media (min-width: 768px)  { .container { padding: 0 var(--pad-tablet); } }
@media (min-width: 1024px) { .container { padding: 0 var(--pad-desktop); } }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ---------- 버튼 ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    height: 46px; padding: 0 20px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-size: 15px; font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease;
    white-space: nowrap;
    box-sizing: border-box;
}
.btn:hover { text-decoration: none; }
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-hover); color: #fff; }
.btn--ghost { background: transparent; border-color: var(--border-strong); color: var(--text); }
.btn--ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn--white { background: #fff; color: var(--primary); }
.btn--white:hover { background: #fff; color: var(--primary-dark); }
.btn--sm { height: 38px; padding: 0 16px; font-size: 14px; }

/* =========================================================
   유틸리티 바
   ========================================================= */
.utility-bar {
    background: var(--utility-bg);
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    color: var(--utility-text);
}
.utility-bar__inner {
    display: flex; justify-content: space-between; align-items: center;
    height: 38px;
}
.utility-bar__group { display: flex; align-items: center; gap: 16px; }
.utility-bar a { color: var(--utility-text); text-decoration: none; }
.utility-bar a:hover { color: var(--primary); }
.utility-bar__sep { color: var(--border-strong); }
.utility-bar__user { display: inline-flex; align-items: center; gap: 4px; color: var(--text); font-weight: 600; }
.utility-bar__admin { color: var(--primary) !important; font-weight: 600; }

.utility-bar .theme-toggle {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    font-size: 13px;
    font-family: inherit;
    color: var(--utility-text);
    cursor: pointer;
    transition: all 0.15s ease;
}
.utility-bar .theme-toggle:hover { border-color: var(--primary); color: var(--primary); }
.utility-bar .theme-toggle i { font-size: 14px; }

@media (max-width: 767px) { .utility-bar { display: none; } }

/* =========================================================
   헤더 & GNB
   ========================================================= */
header.site-header.lb-header {
    position: sticky; top: 0; z-index: 1000;
    height: auto;
    background: var(--bg) !important;
    backdrop-filter: none;
    border-bottom: 1px solid var(--border);
    width: 100%;
}
.site-header__inner {
    display: flex;
    align-items: center;
    gap: var(--lb-gap);
    height: var(--lb-header-h);
}
@media (max-width: 767px) { .site-header__inner { height: 60px; gap: 12px; } }

/* 브랜드 로고 (심볼 + "로컬브릿지 LOCAL BRIDGE" 한 줄) */
.brand.brand--lb {
    display: flex; align-items: center; gap: 10px;
    flex-direction: row;
    flex-shrink: 0;
    text-decoration: none;
    color: var(--text);
}
.brand.brand--lb:hover { text-decoration: none; }
.brand--lb__mark {
    width: 32px; height: 32px;
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    color: var(--primary);
    box-sizing: border-box;
}
.brand--lb__mark svg { width: 100%; height: 100%; display: block; }
.brand--lb__text { display: inline-flex; align-items: baseline; gap: 4px; white-space: nowrap; line-height: 1; }
.brand--lb__ko { font-size: 1em; font-weight: 700; letter-spacing: -0.03em; color: var(--text); }
.brand--lb__en { font-size: 0.8em; font-weight: 600; color: var(--primary); letter-spacing: -0.5px; }
@media (max-width: 767px) {
    .brand--lb__mark { width: 30px; height: 30px; }
    .brand--lb__text { font-size: 17px !important; gap: 6px; }
}
@media (max-width: 420px) { .brand--lb__en { display: none; } }

/* GNB — 우측 정렬(돋보기 왼쪽), 고정 폭 컬럼으로 메가메뉴 컬럼과 정렬 */
.gnb { display: flex; margin-left: auto; flex-shrink: 0; }
.gnb__list {
    display: grid;
    grid-template-columns: repeat(var(--lb-menu-count, 5), var(--lb-col-w));
    margin: 0; padding: 0; list-style: none;
}
.gnb__item { position: static; min-width: 0; }
.gnb__link {
    display: block;
    position: relative;
    padding: 0 32px !important;
    line-height: var(--lb-header-h);
    font-size: 18px; font-weight: 600;
    color: var(--text);
    text-decoration: none;
    text-align: center;
    white-space: nowrap;
    transition: color 0.15s ease;
}
.gnb__link:hover, .gnb__link.is-active { color: var(--primary); text-decoration: none; }
@media (max-width: 1279px) {
    :root { --lb-col-w: 112px; --lb-gap: 16px; }
    .gnb__link { font-size: 15px; padding: 0 6px; }
    .gnb__link.is-active::after { left: 6px; right: 6px; }
}

/* 메가메뉴 — 헤더 전폭 레이어, GNB 컬럼 아래 정렬 (첨부 시안 형식) */
.mega-menu {
    position: absolute;
    top: 100%; left: 0px; right: 0;
    background: var(--bg-elevated);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
    opacity: 0; visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
    z-index: 999;
    max-height: 0;
    overflow: hidden;
}
.mega-menu.is-open {
    opacity: 1; visibility: visible; transform: translateY(0);
    max-height: 600px;
}
.mega-menu__inner {
    display: flex;
    justify-content: flex-end;
    gap: var(--lb-gap);
    padding: 12px 0 40px;
}
.mega-menu__spacer--right { width: var(--lb-search-w); flex-shrink: 0; }
.mega-menu__cols {
    display: grid;
    grid-template-columns: repeat(var(--lb-menu-count, 5), var(--lb-col-w));
}
.mega-menu__col { padding: 0 0px 0 34px; min-width: 100%; }
.mega-menu__col a {
    display: block;
    padding: 9px 0;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    border-bottom: 1px solid var(--divider);
    transition: padding-left 0.15s ease, color 0.15s ease;
    word-break: keep-all;
}
.mega-menu__col a:hover { color: var(--primary); padding-left: 4px; }
@media (max-width: 1279px) { .mega-menu__col { padding: 0 8px; } }
@media (max-width: 1023px) { .mega-menu { display: none; } }

/* 헤더 검색: 돋보기 버튼 → 클릭 시 헤더 아래 레이어 */
.header-search-btn {
    width: var(--lb-search-w); height: 40px;
    display: inline-flex; align-items: center; justify-content: center;
    border: none; background: none; cursor: pointer;
    color: var(--text);
    font-size: 24px;
    border-radius: 50%;
    flex-shrink: 0;
    transition: color 0.15s ease, background 0.15s ease;
}
.header-search-btn:hover, .header-search-btn.is-active { color: var(--primary); background: var(--primary-light); }

.search-layer {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--bg-elevated);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
    opacity: 0; visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
    z-index: 998;
}
.search-layer.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
.search-layer__form {
    display: flex; align-items: center; gap: 10px;
    max-width: 720px; margin: 0 auto;
    padding: 22px 0;
    position: relative;
}
.search-layer__icon { font-size: 22px; color: var(--text-muted); flex-shrink: 0; }
.search-layer__form input {
    flex: 1; min-width: 0;
    height: 48px; padding: 0 16px;
    border: 1px solid var(--border); border-radius: 999px;
    background: var(--surface); color: var(--text);
    font-size: 16px; font-family: inherit; outline: none;
    box-sizing: border-box;
}
.search-layer__form input::placeholder { color: var(--text-muted); }
.search-layer__form input:focus { border-color: var(--primary); background: var(--bg); }
.search-layer__close {
    width: 40px; height: 40px; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    border: none; background: none; cursor: pointer;
    color: var(--text-muted); font-size: 22px; border-radius: 50%;
}
.search-layer__close:hover { color: var(--text); background: var(--surface-2); }
@media (max-width: 767px) {
    .search-layer__form { padding: 14px 0; gap: 6px; }
    .search-layer__icon { display: none; }
    .search-layer__form input { height: 42px; font-size: 15px; }
}

/* 모바일: 햄버거/테마 토글 */
.lb-header .hamburger,
.lb-header .theme-toggle-mobile {
    display: none;
    width: 40px; height: 40px;
    align-items: center; justify-content: center;
    border: none; background: none; cursor: pointer;
    color: var(--text);
    font-size: 24px;
}
.lb-header .hamburger { margin-left: auto; }
.lb-header .theme-toggle-mobile { margin-left: auto; font-size: 20px; }
.lb-header .theme-toggle-mobile + .hamburger { margin-left: 0; }
@media (max-width: 1023px) {
    .lb-header .gnb { display: none; }
    .lb-header .header-search-btn { margin-left: auto; }
    .lb-header .hamburger, .lb-header .theme-toggle-mobile { display: inline-flex; margin-left: 0; }
}

/* 모바일 메뉴 드로어 */
.mobile-menu {
    position: fixed; inset: 0; z-index: 2000;
    background: rgba(11, 18, 32, 0.5);
    opacity: 0; visibility: hidden;
    transition: all 0.2s ease;
}
.mobile-menu.is-open { opacity: 1; visibility: visible; }
.mobile-menu__panel {
    position: absolute; top: 0; right: 0; bottom: 0;
    width: min(320px, 88vw);
    background: var(--bg);
    transform: translateX(100%);
    transition: transform 0.25s ease;
    display: flex; flex-direction: column;
    overflow-y: auto;
}
.mobile-menu.is-open .mobile-menu__panel { transform: translateX(0); }
.mobile-menu__head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 20px; border-bottom: 1px solid var(--border);
}
.mobile-menu__brand { font-size: 18px; font-weight: 900; color: var(--primary); }
.mobile-menu__close { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border: none; background: none; color: var(--text); font-size: 22px; cursor: pointer; }
.mobile-menu__search { position: relative; padding: 12px 20px 4px; }
.mobile-menu__search input {
    width: 100%; height: 40px; padding: 0 40px 0 14px;
    border: 1px solid var(--border); border-radius: 999px;
    background: var(--surface); color: var(--text); font-size: 14px; font-family: inherit; outline: none; box-sizing: border-box;
}
.mobile-menu__search button { position: absolute; right: 24px; top: 14px; width: 36px; height: 36px; border: none; background: none; color: var(--text-muted); font-size: 18px; cursor: pointer; }
.mobile-menu__body { padding: 8px 0; }
.mobile-menu__group { border-bottom: 1px solid var(--divider); padding: 10px 0; }
.mobile-menu__group-title {
    display: block;
    font-size: 15px; font-weight: 700; color: var(--primary);
    padding: 6px 20px;
    text-decoration: none;
}
.mobile-menu__link { display: block; padding: 10px 20px 10px 32px; font-size: 14px; color: var(--text); text-decoration: none; }
.mobile-menu__link:hover { background: var(--surface); }
.mobile-menu__foot { margin-top: auto; padding: 16px 20px; border-top: 1px solid var(--border); display: flex; gap: 8px; }
.mobile-menu__foot .btn { flex: 1; }

/* =========================================================
   파노라마 히어로 슬라이더
   ========================================================= */
.pano-hero {
    position: relative;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    overflow: hidden;
}
.pano-hero__stage { position: relative; width: 100%; height: 520px; overflow: hidden; }
@media (max-width: 1279px) { .pano-hero__stage { height: 460px; } }
@media (max-width: 1023px) { .pano-hero__stage { height: 420px; } }
@media (max-width: 767px)  { .pano-hero__stage { height: 340px; } }
@media (max-width: 480px)  { .pano-hero__stage { height: 300px; } }

.pano-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 0.6s ease; pointer-events: none; }
.pano-slide.is-active { opacity: 1; pointer-events: auto; }
.pano-slide__bg { position: absolute; inset: 0; z-index: 0; background-size: cover; background-position: center; }
.pano-slide__bg::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(90deg, rgba(0,20,40,0.72) 0%, rgba(0,20,40,0.55) 50%, rgba(0,20,40,0.28) 100%);
}
.pano-slide--g1 .pano-slide__bg { background-image: linear-gradient(120deg, #0F6FCF 0%, #063A75 100%); }
.pano-slide--g2 .pano-slide__bg { background-image: linear-gradient(120deg, #0a4a7e 0%, #005f57 100%); }
.pano-slide--g3 .pano-slide__bg { background-image: linear-gradient(120deg, #063A75 0%, #4a2e75 100%); }
.pano-slide--g4 .pano-slide__bg { background-image: linear-gradient(120deg, #10527d 0%, #2f6b3b 100%); }

.pano-slide__inner {
    position: relative; z-index: 2;
    height: 100%;
    display: flex; flex-direction: column; justify-content: flex-end;
    padding: 40px 0 56px;
    color: #fff;
    box-sizing: border-box;
}
.pano-slide__link { display: block; color: inherit; text-decoration: none; }
.pano-slide__link:hover { text-decoration: none; }
.pano-slide__cat {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 5px 14px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 999px;
    font-size: 12px; font-weight: 500;
    margin-bottom: 20px;
    letter-spacing: 0.02em;
}
.pano-slide__cat::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-lime); display: inline-block; }
.pano-slide__title {
    color: #fff;
    font-size: 44px; font-weight: 900;
    line-height: 1.25; letter-spacing: -0.025em;
    margin: 0 0 16px;
    max-width: 900px;
    text-wrap: pretty;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.pano-slide__desc {
    color: rgba(255,255,255,0.9);
    font-size: 17px; line-height: 1.65;
    max-width: 680px;
    margin: 0 0 24px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.pano-slide__meta { display: flex; gap: 14px; align-items: center; font-size: 13px; color: rgba(255,255,255,0.85); }
.pano-slide__meta strong { color: #fff; font-weight: 700; }
@media (max-width: 1023px) { .pano-slide__title { font-size: 34px; } .pano-slide__desc { font-size: 15px; } }
@media (max-width: 767px) {
    .pano-slide__inner { padding: 24px 0 40px; }
    .pano-slide__title { font-size: 22px; margin-bottom: 10px; }
    .pano-slide__desc { font-size: 14px; -webkit-line-clamp: 3; margin-bottom: 14px; }
    .pano-slide__cat { margin-bottom: 12px; font-size: 11px; padding: 4px 10px; }
    .pano-slide__meta { font-size: 12px; gap: 10px; }
}

.pano-controls { position: absolute; bottom: 24px; right: 0; left: 0; z-index: 5; pointer-events: none; }
.pano-controls__inner { display: flex; justify-content: flex-end; gap: 10px; align-items: center; pointer-events: auto; }
.pano-controls__count { color: #fff; font-size: 14px; font-variant-numeric: tabular-nums; margin-right: 6px; letter-spacing: 0.05em; }
.pano-controls__count strong { font-weight: 900; font-size: 18px; }
.pano-controls__count small { color: rgba(255,255,255,0.6); margin-left: 4px; }
.pano-controls button {
    width: 40px; height: 40px;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,0.35);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    transition: all 0.15s ease;
}
.pano-controls button:hover { background: rgba(255,255,255,0.15); border-color: rgba(255,255,255,0.4); }
.pano-controls button svg { width: 16px; height: 16px; }
@media (max-width: 640px) {
    .pano-controls { bottom: 12px; }
    .pano-controls button { width: 34px; height: 34px; }
    .pano-controls__count { font-size: 12px; }
    .pano-controls__count strong { font-size: 15px; }
}
.pano-progress { position: absolute; bottom: 0; left: 0; right: 0; height: 3px; background: rgba(255,255,255,0.15); display: flex; z-index: 4; }
.pano-progress__seg { flex: 1; background: transparent; border: none; padding: 0; cursor: pointer; transition: background 0.3s ease; position: relative; overflow: hidden; }
.pano-progress__seg.is-active { background: rgba(255,255,255,0.35); }
.pano-progress__seg.is-active::before {
    content: ''; position: absolute; inset: 0; background: #fff;
    transform-origin: left;
    animation: pano-progress-fill var(--pano-interval, 5s) linear forwards;
}
.pano-hero.is-paused .pano-progress__seg.is-active::before { animation-play-state: paused; }
@keyframes pano-progress-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* =========================================================
   이슈 밴드
   ========================================================= */
.notice-band { background: var(--bg-elevated); border-bottom: 1px solid var(--border); }
.notice-band__inner { display: flex; align-items: center; gap: 16px; height: 52px; overflow: hidden; }
.notice-band__label {
    flex-shrink: 0;
    background: var(--primary); color: #fff;
    padding: 3px 12px; border-radius: 3px;
    font-size: 12px; font-weight: 700;
}
.notice-band__items { display: flex; gap: 28px; min-width: 0; overflow: hidden; }
.notice-band__items a {
    color: var(--text); font-size: 14px; text-decoration: none;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    display: inline-flex; align-items: center; gap: 8px;
}
.notice-band__items a:hover { color: var(--primary); }
.notice-band__items time { color: var(--text-muted); font-size: 12px; }
@media (max-width: 767px) {
    .notice-band__items { gap: 16px; }
    .notice-band__items a:not(:first-child) { display: none; }
}

/* =========================================================
   섹션 & 컬럼 헤더
   ========================================================= */
.section { padding: 56px 0; }
.section--alt { background: var(--surface); }
@media (max-width: 767px) { .section { padding: 36px 0; } }

.col-head {
    display: flex; align-items: baseline; justify-content: space-between;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--text);
    margin-bottom: 20px;
}
.col-head__title {
    font-size: 22px; font-weight: 900; letter-spacing: -0.02em;
    color: var(--text);
    display: flex; align-items: baseline; gap: 10px;
    margin: 0;
}
.col-head__title a { color: inherit; text-decoration: none; }
.col-head__title::before { content: ''; width: 6px; height: 22px; background: var(--primary); border-radius: 2px; transform: translateY(3px); flex-shrink: 0; }
.col-head__eyebrow { font-size: 11px; font-weight: 700; color: var(--primary); letter-spacing: 0.1em; text-transform: uppercase; margin-left: 10px; }
.col-head__more { font-size: 13px; color: var(--text-muted); white-space: nowrap; text-decoration: none; }
.col-head__more:hover { color: var(--primary); }
@media (max-width: 640px) { .col-head__title { font-size: 18px; } .col-head__eyebrow { display: none; } }

/* =========================================================
   웹진형 컴포넌트
   ========================================================= */
.mag-card {
    display: flex; flex-direction: column;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.2s ease;
    color: var(--text);
    text-decoration: none;
    min-width: 0;
}
.mag-card:hover { border-color: var(--primary); box-shadow: 0 8px 20px rgba(15,111,207,0.08); transform: translateY(-2px); text-decoration: none; }
.mag-card__thumb {
    aspect-ratio: 16/10;
    background: var(--surface-2);
    position: relative;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted);
    font-size: 12px;
    overflow: hidden;
}
.mag-card__thumb--43 { aspect-ratio: 4/3; }
.mag-card__thumb--169 { aspect-ratio: 16/9; }
.mag-card__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s ease; }
.mag-card:hover .mag-card__thumb img { transform: scale(1.04); }
.mag-card__thumb-cat {
    position: absolute; top: 12px; left: 12px;
    padding: 4px 10px;
    background: var(--primary);
    color: #fff;
    border-radius: 3px;
    font-size: 11px; font-weight: 700;
    letter-spacing: 0.02em;
    z-index: 1;
}
.mag-card__thumb-cat--dark { background: rgba(0,0,0,0.6); }
.mag-card__play {
    width: 64px; height: 64px; border-radius: 50%;
    background: rgba(255,255,255,0.15); backdrop-filter: blur(6px);
    display: flex; align-items: center; justify-content: center;
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
    color: #fff; font-size: 30px;
    z-index: 1;
}
.mag-card__thumb--video { background: linear-gradient(135deg, #0F6FCF, #063A75); color: #fff; }
.mag-card__thumb--video-2 { background: linear-gradient(135deg, #0a4a7e, #005f57); }
.mag-card__thumb--video-3 { background: linear-gradient(135deg, #063A75, #4a2e75); }
.mag-card__thumb--ph { background: repeating-linear-gradient(45deg, var(--surface), var(--surface) 10px, var(--surface-2) 10px, var(--surface-2) 20px); }
.mag-card__thumb--ph i { font-size: 32px; opacity: 0.5; }
.mag-card__body { padding: 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.mag-card__body--lg { padding: 24px; }
.mag-card__title {
    font-size: 18px; font-weight: 700; line-height: 1.4;
    color: var(--text);
    margin: 0;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.mag-card__title--lg { font-size: 22px; -webkit-line-clamp: 3; }
.mag-card__excerpt {
    font-size: 14px; color: var(--text-muted); line-height: 1.65;
    margin: 0;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.mag-card__excerpt--3 { -webkit-line-clamp: 3; }
.mag-card__meta {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    font-size: 12px; color: var(--text-muted);
    margin-top: auto; padding-top: 10px;
    border-top: 1px solid var(--divider);
}
.mag-card__meta strong { color: var(--text-secondary); font-weight: 500; }
@media (max-width: 640px) {
    .mag-card {
        flex-direction: row;
        background: transparent;
        border: none; border-bottom: 1px solid var(--border);
        border-radius: 0;
        box-shadow: none !important;
        transform: none !important;
        padding: 14px 0;
    }
    .mag-card__thumb, .mag-card__thumb--43, .mag-card__thumb--169 {
        width: 110px; aspect-ratio: 1; flex-shrink: 0;
        border-radius: var(--radius-sm);
        margin-right: 12px;
    }
    .mag-card__thumb-cat { font-size: 9px; padding: 2px 6px; top: 6px; left: 6px; }
    .mag-card__play { width: 36px; height: 36px; font-size: 18px; }
    .mag-card__body, .mag-card__body--lg { padding: 0; }
    .mag-card__excerpt { display: none; }
    .mag-card__title, .mag-card__title--lg { font-size: 15px; -webkit-line-clamp: 3; }
    .mag-card__meta { padding-top: 6px; border-top: none; font-size: 11px; }
}

.mag-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 1023px) { .mag-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .mag-grid { grid-template-columns: 1fr; gap: 0; } }
.mag-grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1023px) { .mag-grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .mag-grid--4 { grid-template-columns: 1fr; gap: 0; } }

.lb-two { display: grid; grid-template-columns: 1fr 1.3fr; gap: 32px; align-items: start; }
@media (max-width: 1023px) { .lb-two { grid-template-columns: 1fr; } }

.mag-line { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--divider); color: var(--text); text-decoration: none; }
.mag-line:last-child { border-bottom: none; }
.mag-line:hover { text-decoration: none; }
.mag-line__num { flex-shrink: 0; font-size: 22px; font-weight: 900; color: var(--primary); line-height: 1; min-width: 26px; letter-spacing: -0.03em; }
.mag-line__body { min-width: 0; }
.mag-line__title {
    font-size: 15px; font-weight: 700; line-height: 1.45;
    color: var(--text);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.mag-line:hover .mag-line__title { color: var(--primary); }
.mag-line__meta { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

.region-tag {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 8px;
    border: 1px solid var(--border-strong);
    border-radius: 3px;
    font-size: 11px; font-weight: 700;
    color: var(--text-secondary);
    background: var(--bg);
}
[data-theme="dark"] .region-tag { background: transparent; }

.lb-empty { padding: 40px 0; text-align: center; color: var(--text-muted); font-size: 14px; }

/* =========================================================
   뉴스레터 CTA
   ========================================================= */
.cta-band {
    background: linear-gradient(120deg, var(--primary) 0%, var(--primary-darker) 100%);
    color: #fff;
    border-radius: var(--radius-lg);
    padding: 40px 44px;
    display: flex; align-items: center; justify-content: space-between; gap: 32px;
}
[data-theme="dark"] .cta-band { background: linear-gradient(120deg, #1d5fa6 0%, #0b2a4d 100%); }
.cta-band h2 { color: #fff; font-size: 26px; font-weight: 900; letter-spacing: -0.02em; margin: 0 0 8px; }
.cta-band p { color: rgba(255,255,255,0.85); font-size: 15px; margin: 0; }
.cta-band p strong { color: #fff; }
.cta-band__form { display: flex; gap: 8px; flex-shrink: 0; }
.cta-band__form input {
    height: 46px; width: 280px; padding: 0 16px;
    border: 1px solid rgba(255,255,255,0.3); border-radius: var(--radius);
    background: rgba(255,255,255,0.12); color: #fff; font-size: 15px; font-family: inherit; outline: none;
    box-sizing: border-box;
}
.cta-band__form input::placeholder { color: rgba(255,255,255,0.7); }
.cta-band__form input:focus { background: rgba(255,255,255,0.2); border-color: #fff; }
.cta-band__msg { font-size: 13px; margin-top: 8px; color: #fff; min-height: 18px; }
@media (max-width: 1023px) {
    .cta-band { flex-direction: column; align-items: flex-start; padding: 32px 28px; }
    .cta-band__form { width: 100%; }
    .cta-band__form input { flex: 1; width: auto; }
}
@media (max-width: 640px) {
    .cta-band h2 { font-size: 20px; }
    .cta-band__form { flex-direction: column; }
}

/* =========================================================
   서브페이지: 페이지 헤더 + 브레드크럼 + 탭메뉴
   ========================================================= */
.lb-page-header {
    padding: 40px 0 0;
    margin: 0 0 24px;
    border-bottom: 1px solid var(--border);
}
.lb-page-header__top { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.lb-page-header__eyebrow { font-size: 13px; font-weight: 700; color: var(--primary); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 8px; }
.lb-page-header h1 { font-size: 34px; font-weight: 900; letter-spacing: -0.02em; margin: 0; color: var(--text); line-height: 1.25; }
.lb-page-header__desc { color: var(--text-secondary); margin: 10px 0 0; max-width: 760px; font-size: 15px; }
.lb-breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-muted); flex-wrap: wrap; }
.lb-breadcrumb a { color: var(--text-muted); text-decoration: none; display: inline-flex; align-items: center; }
.lb-breadcrumb a:hover { color: var(--primary); }
.lb-breadcrumb__sep { color: var(--border-strong); }
.lb-breadcrumb__current { color: var(--text); font-weight: 500; }

/* 서브페이지 탭메뉴: 형제 메뉴 또는 게시판 카테고리 */
.lb-tabs {
    display: flex; gap: 0;
    margin: 22px 0 -1px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.lb-tabs::-webkit-scrollbar { display: none; }
.lb-tabs__tab {
    padding: 12px 20px;
    font-size: 15px; font-weight: 500;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    text-decoration: none;
    transition: all 0.15s ease;
    display: inline-flex; align-items: center; gap: 6px;
}
.lb-tabs__tab small { font-size: 12px; color: var(--text-muted); font-weight: 400; }
.lb-tabs__tab:hover { color: var(--text); text-decoration: none; }
.lb-tabs__tab.is-active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 700; }
.lb-tabs__tab.is-active small { color: var(--primary); }
@media (max-width: 767px) {
    .lb-page-header { padding-top: 24px; margin-bottom: 16px; }
    .lb-page-header h1 { font-size: 24px; }
    .lb-page-header__desc { font-size: 14px; }
    .lb-tabs { margin-top: 14px; }
    .lb-tabs__tab { padding: 10px 14px; font-size: 14px; }
}

/* 서브페이지 그리드: 좌측 카테고리 사이드바 대신 상단 탭메뉴 사용 → 본문 + 우측 위젯 2단 */
.subpage-grid { grid-template-columns: minmax(0, 1fr) 280px; margin-top: 0; }
.subpage-grid-spaced { margin-top: 0; }
.subpage-leftnav { display: none !important; }
.subpage-center { margin-top: 0; }
.mobile-only-tabs { display: none !important; }
@media (max-width: 992px) { .subpage-grid { grid-template-columns: 1fr; } }

/* 글쓰기·수정·일반페이지 등 기존 상단 밴드(board-header-full / sub-breadcrumb-bar) 라이트 보정 */
.board-header-full {
    background: var(--surface) !important;
    border-bottom: 1px solid var(--border);
    padding: 36px 0 !important;
}
.board-header-full h2, .board-title-white { color: var(--text) !important; font-weight: 900 !important; letter-spacing: -0.02em; margin: 0; }
.sub-breadcrumb-bar { background: var(--bg); }
.sub-breadcrumb-bar .home-icon, .sub-breadcrumb-bar .dropdown-toggle { color: var(--text); background: var(--bg); }
.sub-breadcrumb-bar .dropdown-menu { background: var(--bg-elevated); }
.sub-breadcrumb-bar .dropdown-menu a { color: var(--text); border-bottom-color: var(--divider); }
.content-title-area h2 { color: var(--text) !important; font-weight: 900 !important; letter-spacing: -0.02em; }

/* =========================================================
   푸터
   ========================================================= */
.site-footer.lb-footer {
    background: var(--surface);
    border-top: 3px solid var(--primary);
    padding: 44px 0 28px;
    margin-top: 60px;
    font-size: 14px;
    color: var(--text-secondary);
}
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 20px; padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid var(--border); align-items: center; }
.footer-links a { color: var(--text); font-weight: 500; text-decoration: none; }
.footer-links a:hover { color: var(--primary); }
.footer-links__sep { color: var(--border-strong); }
.footer-main { display: grid; grid-template-columns: 1.5fr 1fr; gap: 32px; padding-bottom: 24px; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.footer-brand { font-size: 18px; font-weight: 900; color: var(--primary); letter-spacing: -0.02em; margin-bottom: 12px; }
.footer-info { color: var(--text-muted); font-size: 13px; line-height: 1.9; }
.footer-info span { margin-right: 12px; }
.footer-copy { color: var(--text-muted); }
.footer-family { display: flex; flex-direction: column; gap: 8px; }
.footer-family label { font-size: 12px; color: var(--text-muted); }
.footer-family__select {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    color: var(--text);
    font-size: 13px;
    font-family: inherit;
    height: 40px;
}
.footer-sns { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.footer-sns a {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px;
    color: var(--text-secondary); font-size: 13px; text-decoration: none; background: var(--bg);
}
.footer-sns a:hover { border-color: var(--primary); color: var(--primary); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; color: var(--text-muted); font-size: 13px; flex-wrap: wrap; gap: 8px; }
.footer-top { color: var(--text-secondary); text-decoration: none; display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.footer-top:hover { color: var(--primary); }
@media (max-width: 767px) {
    .site-footer.lb-footer { margin-top: 40px; padding: 28px 0 20px; }
    .footer-main { grid-template-columns: 1fr; gap: 20px; }
    .footer-links { gap: 4px 14px; font-size: 12px; }
}

/* =========================================================
   style.css(dark_blue) 잔여 규칙 보정
   ========================================================= */

.container-fluid-homepage { flex: 1; }
.subpage-grid { margin-top: 0; }
