@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&family=Noto+Sans+KR:wght@300;400;500;700;900&display=swap');

:root {
    --primary: #004a99;
    --primary-dark: #003366;
    --accent: #00c2cb;
    --gold: #d4af37;
    --bg-light: #f4f7fa;
    --bg-white: #ffffff;
    --text-main: #1a1a1a;
    --text-muted: #666666;
    --border: #e0e6ed;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --radius: 8px;
    --max-width: 1200px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Noto Sans KR', 'Inter', sans-serif;
    background: var(--bg-light);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

ul {
    list-style: none;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}



/* 금융·주요뉴스 공통 마퀴 (JS에서 duration 설정) */
@keyframes ticker-marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* ══════════════════════════════════════
   ② Info Bar (최종편집 / 날짜 / 날씨 / 링크)
══════════════════════════════════════ */
.info-bar {
    background: #f8f9fa;
    border-bottom: 1px solid var(--border);
    height: 38px;
    font-size: 13px;
    color: var(--text-muted);
}

.info-bar-left {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #555;
    flex-shrink: 0;
}

.info-chip {
    font-size: 12.5px;
}

.info-sep {
    color: #ccc;
}

.info-bar-right {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 12.5px;
    flex-shrink: 0;
}

.info-bar-right a:hover {
    color: var(--primary);
}

/* 전국 날씨 위젯 (한 지역씩 순환) */
.weather-strip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 145px;
    height: 32px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.03);
    margin: 0 10px;
}

.weather-city {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-size: 13px;
    color: #333;
    animation: weatherFadeIn 0.5s ease forwards;
}

@keyframes weatherFadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.weather-city .wc-name {
    font-weight: 800;
    color: var(--primary-dark);
}

.weather-city .wc-icon {
    font-size: 16px;
    min-width: 20px;
    text-align: center;
}

.weather-city .wc-temp {
    color: #e04040;
    font-weight: 700;
}

/* ══════════════════════════════════════
   ③ 메인 헤더 (로고)
══════════════════════════════════════ */
header {
    background: var(--bg-white);
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    /* Reduced gap to bring ads closer to branding */
}

.header-ad {
    width: 250px;
    /* Slightly wider to feel more substantial */
    height: 80px;
    background: #fdfdfd;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e0e0e0;
    flex-shrink: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    /* Soft shadow */
}

.header-ad a {
    display: block;
    width: 100%;
    height: 100%;
}

.header-ad img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.3s;
}

.header-ad:hover img {
    transform: scale(1.05);
}

.brand {
    flex: 1;
    text-align: center;
}

.brand h1 {
    font-size: 38px;
    font-weight: 900;
    color: var(--primary-dark);
    letter-spacing: -1.5px;
    line-height: 1.1;
}

.brand span {
    font-size: 11px;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 2.5px;
    opacity: 0.9;
}

@media (max-width: 992px) {
    .brand h1 {
        font-size: 32px;
    }
}

/* ══════════════════════════════════════
   상단 고정 래퍼: 네비 + 주요 뉴스 (함께 스크롤 고정)
══════════════════════════════════════ */
.site-sticky-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

/* ══════════════════════════════════════
   ④ 네비게이션
══════════════════════════════════════ */
.nav-wrap {
    background: var(--primary-dark);
    position: relative;
    z-index: 2;
    box-shadow: none;
}

nav {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

nav ul {
    display: flex;
    list-style: none;
}

/* 기본 nav 링크 */
nav>ul>li>a {
    display: block;
    padding: 14px 20px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 700;
    font-size: 14.5px;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
}

nav>ul>li>a:hover,
nav>ul>li>a.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border-bottom: 3px solid var(--accent);
}

/* ── 드롭다운 컨테이너 ── */
.has-dropdown {
    position: relative;
}

.drop-arrow {
    display: inline-block;
    font-size: 11px;
    margin-left: 3px;
    transition: transform 0.25s;
    vertical-align: middle;
}

.has-dropdown:hover .drop-arrow,
.has-dropdown.open .drop-arrow {
    transform: rotate(180deg);
}

/* ── 드롭다운 메뉴 ── */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    /* Align to the left of the parent link */
    min-width: 220px;
    /* Set a reasonable width for the list */
    background: #003366;
    /* Match primary-dark */
    border-bottom: 2px solid var(--accent);
    border-radius: 0 0 8px 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 2000;
    /* Vertical structure */
    flex-direction: column;
    overflow: hidden;
    animation: dropDown 0.25s ease;
}

@keyframes dropDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.has-dropdown:hover .dropdown-menu,
.has-dropdown.open .dropdown-menu {
    display: flex;
}

.dropdown-menu li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dropdown-menu li:last-child {
    border-bottom: none;
}

.dropdown-menu li a {
    display: block;
    padding: 12px 22px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 13.5px;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.2s;
}

.dropdown-menu li a:hover {
    background: #00c2cb !important;
    color: #ffffff !important;
    font-weight: 800 !important;
}

.dropdown-menu li a.active {
    background: rgba(0, 194, 203, 0.25) !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    border-left: 4px solid var(--accent);
}

.dropdown-menu li a.active:hover {
    background: #00c2cb !important;
    color: #ffffff !important;
}

/* 검색박스 */
.nav-search {
    position: absolute;
    right: 0;
    display: flex;
    align-items: center;
    gap: 0;
    flex-shrink: 0;
}

.nav-search input {
    padding: 6px 12px;
    border: none;
    border-radius: 4px 0 0 4px;
    font-size: 13px;
    width: 160px;
    outline: none;
}

.nav-search button {
    background: var(--accent);
    border: none;
    padding: 6px 10px;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 13px;
}

/* ── 게시판 버튼 (네비 우측 강조 아이템) ── */
.nav-board-li {
    display: flex;
    align-items: center;
    margin-left: 6px;
    margin-right: 185px;
    /* 우측 절대위치 검색박스(~175px)와 겹침 방지 */
}

.nav-board-btn {
    display: inline-flex !important;
    align-items: center;
    gap: 5px;
    padding: 7px 15px !important;
    background: var(--gold) !important;
    color: #1a1a1a !important;
    font-weight: 800 !important;
    font-size: 13.5px !important;
    border-radius: 5px;
    border-bottom: 3px solid transparent !important;
    white-space: nowrap;
    transition: background 0.2s, transform 0.15s !important;
    line-height: 1.2;
}

.nav-board-btn:hover {
    background: #e6c24a !important;
    transform: translateY(-2px);
    border-bottom: 3px solid transparent !important;
}


/* ══════════════════════════════════════
   ⑤ 주요 뉴스 자막 티커 (보험 헤드라인)
   — Seamless Loop: 콘텐츠를 2번 복사해
     translateX(-50%)로 딱 한 바퀴 돌리면
     시작점과 끝점이 동일 → 끊김 없음
══════════════════════════════════════ */
.news-ticker-bar {
    background: #fff;
    border-bottom: 1px solid var(--border);
    height: 40px;
    display: flex;
    align-items: center;
    overflow: hidden;
    position: relative;
    z-index: 1;
    box-shadow: none;
}

.news-ticker-label {
    background: #c0392b;
    color: #fff;
    padding: 0 16px;
    height: 100%;
    display: flex;
    align-items: center;
    font-weight: 800;
    font-size: 13px;
    flex-shrink: 0;
    white-space: nowrap;
}

.news-ticker-wrap {
    flex: 1;
    overflow: hidden;
    height: 100%;
    position: relative;
}

.news-ticker-track {
    display: flex;
    align-items: center;
    height: 100%;
    width: max-content;
    will-change: transform;
    /* 속도는 script.js에서 주요뉴스·금융 동기화 */
    animation: none;
}

.news-ticker-track:hover {
    animation-play-state: paused;
}

.news-ticker-item {
    display: inline-block;
    padding: 0 40px;
    font-size: 14px;
    color: #333;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s;
}

.news-ticker-item:hover {
    color: var(--primary);
}

.news-ticker-item::after {
    content: "▸";
    margin-left: 40px;
    color: var(--accent);
}

/* ══════════════════════════════════════
   히어로 섹션
══════════════════════════════════════ */
.hero-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin: 30px 0;
}

.hero-main {
    position: relative;
    height: 400px;
    border-radius: var(--radius);
    overflow: hidden;
    background: #000;
}

.hero-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
    transition: 0.5s;
}

.hero-main:hover img {
    transform: scale(1.05);
}

.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 40px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    color: #fff;
}

.hero-tag {
    background: var(--accent);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 10px;
    display: inline-block;
}

.hero-title {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 10px;
    line-height: 1.3;
}

.hero-side {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.side-news-card {
    background: #fff;
    padding: 15px;
    border-radius: var(--radius);
    display: flex;
    gap: 15px;
    border: 1px solid var(--border);
    transition: 0.3s;
}

.side-news-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.side-news-thumb {
    width: 100px;
    height: 70px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.side-news-info h4 {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ══════════════════════════════════════
   메인 콘텐츠 레이아웃
══════════════════════════════════════ */
.main-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    margin-bottom: 60px;
}

.section-title {
    font-size: 20px;
    font-weight: 900;
    color: var(--primary-dark);
    margin-bottom: 20px;
    padding-left: 12px;
    border-left: 5px solid var(--accent);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.article-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.article-item {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    border: 1px solid var(--border);
    transition: 0.3s;
}

.article-item:hover {
    box-shadow: var(--shadow);
}

.article-img {
    width: 240px;
    height: 160px;
    object-fit: cover;
    flex-shrink: 0;
}

.article-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.article-cat {
    font-size: 12px;
    color: var(--accent);
    font-weight: 800;
    margin-bottom: 5px;
}

.article-h {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 10px;
    line-height: 1.3;
}

.article-p {
    font-size: 14px;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ══════════════════════════════════════
   사이드바
══════════════════════════════════════ */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.widget {
    background: #fff;
    border-radius: var(--radius);
    padding: 20px;
    border: 1px solid var(--border);
}

.widget-title {
    font-size: 16px;
    font-weight: 800;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-dark);
    margin-bottom: 15px;
}

.rank-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px dotted var(--border);
    transition: background 0.2s;
}

.rank-item:last-child {
    border-bottom: none;
}

.rank-item:hover {
    background: #fcfcfc;
}

.rank-num {
    font-weight: 900;
    font-size: 18px;
    color: var(--primary);
    min-width: 20px;
}

.rank-img {
    width: 60px;
    height: 45px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
}

.rank-txt {
    font-size: 13.5px;
    font-weight: 700;
    line-height: 1.4;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}



.ad-card {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    padding: 25px;
    border-radius: var(--radius);
    text-align: center;
}

.ad-card h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

.ad-card p {
    font-size: 13px;
    opacity: 0.9;
    margin-bottom: 20px;
}

.btn-gold {
    background: var(--gold);
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: 800;
    display: inline-block;
}

/* ══════════════════════════════════════
   푸터
══════════════════════════════════════ */
footer {
    background: #222;
    color: #ccc;
    padding: 60px 0 30px;
    font-size: 14px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    font-size: 24px;
    font-weight: 900;
    color: #fff;
    margin-bottom: 5px;
}

.footer-links h4 {
    color: #fff;
    margin-bottom: 20px;
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid #333;
    padding-top: 20px;
    font-size: 12px;
}

/* 🔝 상단 바로가기 버튼 */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

#back-to-top.show {
    opacity: 0.6;
    visibility: visible;
}

#back-to-top:hover {
    opacity: 1;
    background: var(--accent);
    transform: translateY(-5px);
}

/* ─────────────────────────────────────
   인피드 광고 (뉴스 리스트 중간 삽입)
───────────────────────────────────── */
.ad-in-feed {
    border: none !important;
    margin: 15px 0 !important;
    cursor: default !important;
    background: none !important;
    box-shadow: none !important;
}

.ad-in-feed-content {
    width: 100%;
    border-radius: var(--radius);
    padding: 25px 35px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.ad-in-feed-label {
    position: absolute;
    top: 0;
    left: 0;
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
    font-size: 9px;
    padding: 2px 10px;
    font-weight: 800;
    border-radius: 0 0 8px 0;
    letter-spacing: 1.5px;
    backdrop-filter: blur(4px);
}


/* ─────────────────────────────────────
   필터 칩 스타일
───────────────────────────────────── */
.btn-filter:hover {
    background: #f0f7ff !important;
}

.filter-chip {
    padding: 6px 14px;
    border: 1px solid #ddd;
    background: #f1f3f5;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: #495057;
    cursor: pointer;
    transition: 0.2s;
}

.filter-chip:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.filter-chip.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 2px 6px rgba(0, 74, 153, 0.3);
}

/* ─────────────────────────────────────
   관리자 모달 스타일
───────────────────────────────────── */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: none;
}

.admin-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 400px;
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    z-index: 10001;
    display: none;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
}

.admin-modal h3 {
    margin-bottom: 10px;
    font-weight: 900;
    color: var(--primary-dark);
}

.admin-modal p {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.5;
}

.admin-modal form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.admin-modal input,
.admin-modal select,
.admin-modal textarea {
    padding: 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 14px;
    outline-color: var(--accent);
}

.btn-full {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 6px;
    background: var(--primary);
    color: #fff;
    font-weight: 800;
    cursor: pointer;
    transition: 0.2s;
}

.btn-full:hover {
    filter: brightness(1.1);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    color: #aaa;
    cursor: pointer;
}

.modal-close:hover {
    color: #333;
}

/* ══════════════════════════════════════
   반응형 (Mobile & Tablet)
══════════════════════════════════════ */
/* 모바일 내비게이션 전용 항목 */
.mobile-only-li {
    display: none;
}

/* 모바일 상단바(영문+햄버거): PC에서는 숨김 */
.nav-mobile-top.mobile-only {
    display: none;
}

/* 햄버거 버튼 스타일 */
#mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    padding: 12px 10px;
    flex-shrink: 0;
}

#mobile-toggle span {
    display: block;
    width: 22px;
    height: 3px;
    background: #fff;
    border-radius: 2px;
    transition: 0.3s;
}

/* 열린 상태: 틸 배경 + 왼쪽 화살표(닫기) — 스크린샷과 유사 */
#mobile-toggle.active {
    width: 36px;
    height: 36px;
    padding: 0;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    border-radius: 4px;
}

#mobile-toggle.active span:nth-child(1) {
    width: 0;
    height: 0;
    background: transparent;
    border: 7px solid transparent;
    border-right-color: #fff;
    border-left: 0;
    transform: none;
    margin-left: -3px;
}

#mobile-toggle.active span:nth-child(2) {
    display: none;
}

#mobile-toggle.active span:nth-child(3) {
    display: none;
}

@media (max-width: 900px) {
    .container {
        padding: 0 20px;
    }

    header {
        padding: 15px 0;
    }

    .brand h1 {
        font-size: 30px;
        letter-spacing: -1px;
    }

    /* 휴대폰: 영문 타이틀 자리 → 광고 2개 나란히, 한글 제목은 아래 한 줄 */
    .brand-tagline-desktop {
        display: none !important;
    }

    .header-inner {
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 8px 12px;
    }

    .header-ad {
        display: flex !important;
        flex: 1 1 calc(50% - 14px);
        max-width: 200px;
        width: auto;
        height: 58px;
        order: 0;
    }

    .brand {
        order: 1;
        flex: 1 1 100%;
        min-width: 0;
    }

    /* 메인 레이아웃 및 히어로 복구 */
    .hero-grid {
        grid-template-columns: 1fr;
        margin: 20px 0;
        gap: 15px;
    }

    .hero-main {
        height: 350px;
    }

    .hero-overlay {
        padding: 25px;
        box-sizing: border-box;
        width: 100%;
    }

    .hero-title {
        font-size: 24px;
        line-height: 1.35;
        width: 100%;
        word-break: keep-all;
    }

    .hero-side {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    /* 레이아웃 */
    .main-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        margin-top: 30px;
    }

    /* 네비게이션 모바일: 펼침 시 문서 흐름에 넣어 sticky 헤더(뉴스바 포함)와 함께 고정 */
    .nav-wrap {
        min-height: 48px;
        height: auto;
    }

    .nav-search {
        display: none;
    }

    /* 모바일: 청색 바 한 줄 — 영문(왼쪽) + 햄버거(오른쪽), 아래에 메뉴 펼침 */
    .nav-mobile-top.mobile-only {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        width: 100%;
        flex: 0 0 100%;
        order: 0;
        min-height: 48px;
        box-sizing: border-box;
        padding-right: 0;
    }

    .nav-mobile-tagline {
        margin: 0;
        flex: 1;
        min-width: 0;
        font-size: 8.5px;
        font-weight: 700;
        color: rgba(255, 255, 255, 0.95);
        text-transform: uppercase;
        letter-spacing: 0.07em;
        line-height: 1.3;
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    #mobile-toggle {
        display: flex;
        order: unset;
        z-index: 10002;
        flex-shrink: 0;
        margin-left: 0;
    }

    nav {
        min-height: 48px;
        display: flex !important;
        flex-wrap: wrap;
        width: 100%;
        justify-content: flex-start !important;
        align-items: center;
    }

    nav:has(#main-nav-ul.active) .nav-mobile-top.mobile-only {
        border-bottom: 1px solid rgba(255, 255, 255, 0.12);
        padding-bottom: 6px;
        margin-bottom: 0;
    }

    #main-nav-ul {
        display: none;
        position: static;
        order: 1;
        flex: 1 1 100%;
        width: 100%;
        background: var(--primary-dark);
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: stretch;
        padding: 0;
        gap: 0;
        box-shadow: none;
        border-top: 1px solid rgba(255, 255, 255, 0.12);
        z-index: 10001;
    }

    #main-nav-ul.active {
        display: flex;
    }

    #main-nav-ul>li {
        width: 100%;
        flex: none;
        min-width: 0;
        display: block !important;
    }

    .nav-home-li {
        margin-right: 0;
    }

    /* 데스크톱 nav > ul > li > a 와 동일: 가로 읽기, 동일 굵기·여백 느낌 */
    #main-nav-ul>li>a.nav-link {
        width: 100%;
        display: block;
        box-sizing: border-box;
        padding: 14px 20px !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
        font-size: 14.5px !important;
        font-weight: 700;
        line-height: 1.35;
        white-space: normal;
        word-break: keep-all;
        writing-mode: horizontal-tb !important;
        text-orientation: mixed !important;
        letter-spacing: 0;
        text-align: left;
    }

    #main-nav-ul>li>a.nav-link.active {
        border-bottom-color: rgba(255, 255, 255, 0.08) !important;
        border-bottom-width: 1px !important;
        box-shadow: inset 0 -3px 0 var(--accent);
    }

    #main-nav-ul>li>a .drop-arrow {
        display: inline-block;
        margin-left: 4px;
        font-size: 11px;
        vertical-align: middle;
    }

    /* 드롭다운: PC와 같은 패널색, 모바일은 부모 아래 전체폭 아코디언 */
    .has-dropdown:hover .dropdown-menu {
        display: none !important;
    }

    #main-nav-ul .has-dropdown {
        position: relative;
    }

    #main-nav-ul .dropdown-menu {
        display: none !important;
        position: static !important;
        top: auto !important;
        left: auto !important;
        transform: none !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        margin: 0 !important;
        background: rgba(0, 0, 0, 0.22) !important;
        border: none !important;
        border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        z-index: 1;
        flex-direction: column !important;
        padding: 0;
        animation: none;
    }

    #main-nav-ul .has-dropdown.open .dropdown-menu {
        display: flex !important;
    }

    #main-nav-ul .dropdown-menu li a {
        padding: 12px 20px 12px 28px !important;
        font-size: 13.5px !important;
        font-weight: 600;
        writing-mode: horizontal-tb !important;
        text-orientation: mixed !important;
        white-space: normal;
        word-break: keep-all;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    }

    #main-nav-ul .dropdown-menu li:last-child a {
        border-bottom: none !important;
    }

    /* 광고 및 날씨 가리기 */
    .header-ad {
        display: none;
    }

    .weather-strip {
        display: none;
    }

    /* 상단 정보바 재배치 (날짜 아래 로그인 링크) */
    .info-bar {
        height: auto;
        padding: 8px 0;
    }

    .info-bar .flex-between {
        flex-direction: column;
        gap: 6px;
    }

    .info-bar-left {
        width: 100%;
        justify-content: center;
        font-size: 11px;
    }

    .info-bar-right {
        display: flex !important;
        width: 100%;
        justify-content: center;
        margin-top: 4px;
        padding-top: 4px;
        border-top: 1px solid rgba(0, 0, 0, 0.05);
        gap: 15px;
    }

}

@media (max-width: 600px) {
    .hero-main {
        height: 320px;
    }

    .hero-title {
        font-size: 20px;
    }

    .hero-side {
        grid-template-columns: 1fr;
    }

    .article-item {
        flex-direction: column;
    }

    .article-img {
        width: 100%;
        height: 180px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}


/* 🔝 상단 바로가기 버튼 */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    /* 반투명 기본 상태 */
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

#back-to-top.show {
    opacity: 0.6;
    /* 반투명 상태 */
    visibility: visible;
}

#back-to-top:hover {
    opacity: 1;
    /* 호버 시 진하게 */
    background: var(--accent);
    transform: translateY(-5px);
}

/* ─────────────────────────────────────
   인피드 광고 (뉴스 리스트 중간 삽입)
───────────────────────────────────── */
.ad-in-feed {
    border: none !important;
    margin: 15px 0 !important;
    cursor: default !important;
    background: none !important;
    box-shadow: none !important;
}

.ad-in-feed-content {
    width: 100%;
    border-radius: var(--radius);
    padding: 25px 35px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.ad-in-feed-label {
    position: absolute;
    top: 0;
    left: 0;
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
    font-size: 9px;
    padding: 2px 10px;
    font-weight: 800;
    border-radius: 0 0 8px 0;
    letter-spacing: 1.5px;
    backdrop-filter: blur(4px);
}

@media (max-width: 768px) {
    .ad-in-feed-content {
        padding: 20px;
    }

    .ad-in-feed-content>div {
        flex-direction: column;
        text-align: center;
        gap: 15px !important;
    }

    .ad-in-feed-content button {
        width: 100%;
    }
}