/* ═══════════════════════════════════════════
   복지포커스 - 스타일시트
   ═══════════════════════════════════════════ */

:root {
    --primary: #003366;
    --primary-light: #0066CC;
    --accent: #D4652E;
    --bg: #FFFFFF;
    --bg-gray: #F5F7FA;
    --bg-dark: #1a1a2e;
    --text: #2D3436;
    --text-light: #636E72;
    --text-muted: #B2BEC3;
    --border: #DFE6E9;
    --success: #00B894;
    --warning: #FDCB6E;
    --error: #E17055;
    --radius: 8px;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --transition: all 0.2s ease;
    --font: 'Noto Sans KR', -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.7; }
a { color: var(--primary-light); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent); }
img { max-width: 100%; }

/* Container */
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 760px; margin: 0 auto; padding: 0 20px; }

/* ─── Navbar ─── */
.navbar {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 100;
    backdrop-filter: blur(10px);
}
.nav-container { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.nav-logo { display: flex; align-items: baseline; gap: 2px; font-weight: 900; font-size: 1.3rem; }
.logo-well { color: var(--primary); }
.logo-partners { color: var(--primary-light); }
.logo-weekly { font-size: 0.55rem; color: var(--accent); font-weight: 700; letter-spacing: 2px; margin-left: 6px; text-transform: uppercase; }
.nav-menu { display: flex; list-style: none; gap: 28px; align-items: center; }
.nav-menu a { color: var(--text); font-size: 0.95rem; font-weight: 500; }
.nav-menu a:hover { color: var(--primary-light); }
.nav-subscribe { background: var(--primary); color: #fff !important; padding: 8px 20px; border-radius: 20px; font-size: 0.85rem !important; }
.nav-subscribe:hover { background: var(--primary-light); color: #fff !important; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; flex-direction: column; gap: 5px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--text); transition: var(--transition); }

/* ─── Hero ─── */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, #004080 50%, var(--primary-light) 100%);
    color: #fff; padding: 80px 20px; text-align: center;
}
.hero h1 { font-size: 2.5rem; font-weight: 900; line-height: 1.3; margin-bottom: 16px; }
.hero-sub { font-size: 1.1rem; opacity: 0.9; margin-bottom: 32px; }
.hero-subscribe { max-width: 460px; margin: 0 auto; }
.hero-subscribe-row { display: flex; gap: 8px; }
.hero-subscribe input[type="email"] {
    flex: 1; padding: 14px 20px; border: none; border-radius: var(--radius);
    font-size: 1rem; font-family: var(--font);
}
.hero-subscribe button {
    padding: 14px 28px; background: var(--accent); color: #fff; border: none;
    border-radius: var(--radius); font-size: 1rem; font-weight: 700; cursor: pointer;
    font-family: var(--font); transition: var(--transition);
}
.hero-subscribe button:hover { background: #B8552A; }
.hero-note { font-size: 0.85rem; opacity: 0.7; margin-top: 12px; }

/* ─── 개인정보 동의 체크박스 ─── */
.privacy-check {
    display: flex; align-items: center; gap: 6px;
    font-size: 0.8rem; cursor: pointer; margin-top: 10px;
}
.privacy-check input[type="checkbox"] {
    width: 16px; height: 16px; accent-color: var(--accent);
    cursor: pointer; flex-shrink: 0;
}
.privacy-check span { line-height: 1.3; }
.privacy-check a { text-decoration: underline; }
.privacy-check--hero { justify-content: center; color: rgba(255,255,255,0.8); }
.privacy-check--hero a { color: rgba(255,255,255,0.95); }
.privacy-check--mini { font-size: 0.75rem; color: rgba(255,255,255,0.8); white-space: nowrap; margin-top: 0; }
.privacy-check--mini a { color: rgba(255,255,255,0.95); }
.privacy-check--sidebar { color: var(--text-muted); margin: 8px 0; }
.privacy-check--sidebar a { color: var(--text-muted); }

/* ─── Sections ─── */
.section { padding: 60px 0; }
.section-gray { background: var(--bg-gray); }
.section-title { font-size: 1.5rem; font-weight: 700; color: var(--primary); margin-bottom: 24px; }
.page-title { font-size: 2rem; font-weight: 900; color: var(--primary); margin-bottom: 8px; }
.page-desc { color: var(--text-light); margin-bottom: 32px; }

/* ─── Briefing Card ─── */
.briefing-card {
    background: var(--bg); border-radius: var(--radius); padding: 28px;
    box-shadow: var(--shadow); border-left: 4px solid var(--primary); margin-bottom: 20px;
    transition: var(--transition);
}
.briefing-card:hover { box-shadow: var(--shadow-lg); }
.briefing-card.featured { border-left-color: var(--accent); }
.briefing-meta { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.briefing-date { font-size: 0.85rem; color: var(--text-light); }
.briefing-badge { background: var(--accent); color: #fff; padding: 2px 10px; border-radius: 12px; font-size: 0.75rem; font-weight: 700; }
.briefing-count { font-size: 0.85rem; color: var(--text-muted); }
.briefing-card h3 { font-size: 1.25rem; margin-bottom: 8px; }
.briefing-card h3 a { color: var(--text); }
.briefing-card h3 a:hover { color: var(--primary-light); }
.briefing-card p { color: var(--text-light); font-size: 0.95rem; }

/* ─── Article Grid ─── */
.article-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.article-card {
    background: var(--bg); border-radius: var(--radius); padding: 24px;
    box-shadow: var(--shadow); transition: var(--transition);
}
.article-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.article-source { font-size: 0.8rem; color: var(--primary-light); font-weight: 600; margin-bottom: 8px; }
.article-card h4 { font-size: 1.05rem; margin-bottom: 8px; line-height: 1.4; }
.article-card h4 a { color: var(--text); }
.article-card p { font-size: 0.9rem; color: var(--text-light); margin-bottom: 12px; }
.article-footer { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--text-muted); }
.article-category { background: var(--bg-gray); padding: 2px 10px; border-radius: 10px; }

/* ─── Article Detail ─── */
.article-detail, .briefing-detail { padding: 40px 0 60px; }
.article-header, .briefing-header { margin-bottom: 32px; }
.article-header h1, .briefing-header h1 { font-size: 1.8rem; line-height: 1.4; margin: 12px 0; }
.article-source-tag { background: var(--primary); color: #fff; padding: 4px 14px; border-radius: 14px; font-size: 0.8rem; }
.article-meta { display: flex; gap: 16px; color: var(--text-light); font-size: 0.9rem; flex-wrap: wrap; }
.briefing-summary { font-size: 1.1rem; color: var(--text-light); }
.article-summary-box {
    background: var(--bg-gray); border-radius: var(--radius); padding: 24px; margin-bottom: 24px;
    border-left: 3px solid var(--primary-light);
}
.article-summary-box h3 { font-size: 0.9rem; color: var(--primary-light); margin-bottom: 8px; }
.article-keywords { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.keyword-tag { background: var(--bg-gray); color: var(--text-light); padding: 4px 14px; border-radius: 14px; font-size: 0.85rem; }
.article-original { margin-top: 32px; }

/* ─── Briefing Body ─── */
.briefing-body { line-height: 1.9; }
.briefing-body h2 { font-size: 1.4rem; color: var(--primary); margin: 32px 0 12px; padding-bottom: 8px; border-bottom: 2px solid var(--border); }
.briefing-body h3 { font-size: 1.15rem; color: var(--primary-light); margin: 24px 0 8px; }
.briefing-body ul, .briefing-body ol { margin: 12px 0; padding-left: 24px; }
.briefing-body li { margin-bottom: 6px; }
.briefing-body blockquote {
    border-left: 3px solid var(--accent); margin: 16px 0; padding: 12px 20px;
    background: var(--bg-gray); border-radius: 0 var(--radius) var(--radius) 0;
}

.briefing-share { display: flex; align-items: center; gap: 12px; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--border); }
.briefing-nav { display: flex; justify-content: space-between; margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--border); }
.nav-prev, .nav-next { font-size: 0.9rem; }

/* ─── Subscribe ─── */
.subscribe-section { text-align: center; max-width: 500px; margin: 0 auto; }
.subscribe-section h2 { font-size: 1.5rem; color: var(--primary); margin-bottom: 8px; }
.subscribe-section p { color: var(--text-light); margin-bottom: 24px; }
.subscribe-form { display: flex; gap: 8px; }
.subscribe-form input {
    flex: 1; padding: 12px 16px; border: 2px solid var(--border); border-radius: var(--radius);
    font-size: 1rem; font-family: var(--font);
}
.subscribe-form input:focus { outline: none; border-color: var(--primary-light); }

/* ─── Buttons ─── */
.btn {
    display: inline-block; padding: 10px 24px; border-radius: var(--radius); font-size: 0.95rem;
    font-weight: 600; border: none; cursor: pointer; font-family: var(--font); transition: var(--transition);
    text-align: center;
}
.btn-sm { padding: 6px 16px; font-size: 0.85rem; }
.btn-full { width: 100%; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-light); color: #fff; }
.btn-secondary { background: var(--primary-light); color: #fff; }
.btn-secondary:hover { background: var(--primary); color: #fff; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: #B8552A; color: #fff; }
.btn-outline { background: transparent; border: 2px solid var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--primary-light); color: var(--primary-light); }

/* ─── Footer ─── */
.footer { background: var(--bg-dark); color: #ccc; padding: 40px 0 20px; margin-top: 60px; }
.footer-content { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 24px; margin-bottom: 24px; }
.footer-brand { font-size: 1.3rem; font-weight: 900; }
.footer-brand p { font-size: 0.85rem; font-weight: 400; margin-top: 4px; }
.footer-info p { font-size: 0.85rem; line-height: 1.8; }
.footer-bottom { border-top: 1px solid #333; padding-top: 16px; font-size: 0.8rem; color: #888; }

/* ─── Archive ─── */
.archive-list { display: flex; flex-direction: column; gap: 16px; }

/* ─── Empty State ─── */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-light); }

/* ─── Toast ─── */
#toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.toast {
    padding: 14px 24px; border-radius: var(--radius); color: #fff; font-size: 0.9rem;
    animation: slideIn 0.3s ease; min-width: 280px; box-shadow: var(--shadow-lg);
}
.toast-success { background: var(--success); }
.toast-error { background: var(--error); }
.toast-info { background: var(--primary-light); }
@keyframes slideIn { from { transform: translateX(100%); opacity:0; } to { transform: translateX(0); opacity:1; } }

/* ─── Alerts ─── */
.alert { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 16px; font-size: 0.9rem; }
.alert-error { background: #ffeaea; color: var(--error); border: 1px solid var(--error); }

/* ════════════════════════════════════
   Admin Styles
   ════════════════════════════════════ */
.admin-body { display: flex; min-height: 100vh; background: var(--bg-gray); }

.admin-sidebar {
    width: 220px; background: var(--bg-dark); color: #fff; padding: 24px 0;
    position: fixed; top: 0; left: 0; height: 100vh; z-index: 50;
}
.admin-logo { padding: 0 20px 24px; border-bottom: 1px solid #333; font-size: 1.2rem; font-weight: 900; }
.admin-logo small { display: block; font-size: 0.7rem; color: #888; font-weight: 400; margin-top: 2px; }
.admin-nav { padding: 16px 0; }
.admin-nav a {
    display: block; padding: 10px 20px; color: #aaa; font-size: 0.9rem;
    transition: var(--transition);
}
.admin-nav a:hover, .admin-nav a.active { color: #fff; background: rgba(255,255,255,0.08); }

.admin-main { margin-left: 220px; flex: 1; padding: 24px 32px; }
.admin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.admin-header h1 { font-size: 1.5rem; color: var(--primary); }
.admin-header h1 small { font-size: 0.85rem; color: var(--text-muted); font-weight: 400; }
.admin-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Stats Grid */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card {
    background: #fff; border-radius: var(--radius); padding: 20px; text-align: center;
    box-shadow: var(--shadow);
}
.stat-number { font-size: 2rem; font-weight: 900; color: var(--primary); }
.stat-label { font-size: 0.85rem; color: var(--text-light); margin-top: 4px; }

/* Admin Grid & Cards */
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.admin-card { background: #fff; border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.admin-card h2 { font-size: 1.1rem; color: var(--primary); margin-bottom: 16px; }

/* Admin Table */
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.admin-table th { text-align: left; padding: 10px 12px; border-bottom: 2px solid var(--border); color: var(--text-light); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; }
.admin-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); }
.admin-table tr:hover { background: var(--bg-gray); }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); font-size: 0.85rem; }

/* Status Badges */
.status-badge { padding: 3px 10px; border-radius: 12px; font-size: 0.75rem; font-weight: 600; }
.status-success, .status-published { background: #e6fff5; color: var(--success); }
.status-running, .status-draft { background: #fff8e1; color: #f0a500; }
.status-error { background: #ffeaea; color: var(--error); }
.status-approved { background: #e3f2fd; color: var(--primary-light); }

/* Importance */
.importance { padding: 2px 10px; border-radius: 10px; font-size: 0.8rem; font-weight: 600; }
.importance.high { background: #ffeaea; color: var(--error); }
.importance.mid { background: #fff8e1; color: #f0a500; }
.importance.low { background: var(--bg-gray); color: var(--text-muted); }

/* Mini Card */
.mini-card { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); }
.mini-card strong { font-size: 0.9rem; }
.mini-card small { display: block; color: var(--text-muted); font-size: 0.8rem; }

/* Filter Bar */
.filter-bar { margin-bottom: 20px; }
.filter-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filter-form select, .filter-form input[type="text"] {
    padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius);
    font-size: 0.9rem; font-family: var(--font); background: #fff;
}

/* Pagination */
.pagination { display: flex; gap: 4px; justify-content: center; margin-top: 24px; }
.page-link { padding: 8px 14px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 0.85rem; color: var(--text); }
.page-link.active, .page-link:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Briefing Item */
.briefing-item { margin-bottom: 16px; }
.briefing-item-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.briefing-item-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

/* Editor */
.editor-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; height: calc(100vh - 200px); }
.editor-pane, .preview-pane { display: flex; flex-direction: column; }
.editor-pane h3, .preview-pane h3 { font-size: 0.9rem; color: var(--text-light); margin-bottom: 8px; }
#md-editor {
    flex: 1; width: 100%; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius);
    font-family: 'Consolas', 'Monaco', monospace; font-size: 0.9rem; line-height: 1.7; resize: none;
}
#md-preview {
    flex: 1; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius);
    overflow-y: auto; background: #fff;
}
.edit-meta { margin-bottom: 16px; display: flex; gap: 16px; align-items: center; }

/* Login */
.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: var(--bg-gray); }
.login-box { background: #fff; padding: 40px; border-radius: var(--radius); box-shadow: var(--shadow-lg); text-align: center; width: 360px; }
.login-box h1 { font-size: 1.5rem; margin-bottom: 4px; }
.login-box p { color: var(--text-light); margin-bottom: 24px; }
.login-box input {
    width: 100%; padding: 12px 16px; border: 2px solid var(--border); border-radius: var(--radius);
    font-size: 1rem; margin-bottom: 16px; font-family: var(--font);
}
.login-box input:focus { outline: none; border-color: var(--primary-light); }

/* ═══════════════════════════════════
   Media Homepage Styles
   ═══════════════════════════════════ */

/* Mini Hero */
.mini-hero { background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: #fff; padding: 14px 0; }
.mini-hero-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.mini-hero-sub { font-size: 0.85rem; opacity: 0.8; margin-left: 12px; }
.mini-subscribe { display: flex; gap: 6px; }
.mini-subscribe input { padding: 8px 14px; border: none; border-radius: var(--radius); font-size: 0.85rem; width: 200px; font-family: var(--font); }
.mini-subscribe button { padding: 8px 16px; background: var(--accent); color: #fff; border: none; border-radius: var(--radius); font-size: 0.85rem; font-weight: 600; cursor: pointer; font-family: var(--font); }

/* Main Layout (2-column) */
.main-layout { display: grid; grid-template-columns: 1fr 320px; gap: 32px; padding-top: 32px; padding-bottom: 40px; }
.main-content { min-width: 0; }

/* Home Section */
.home-section { margin-bottom: 36px; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; border-bottom: 2px solid var(--primary); padding-bottom: 8px; }
.section-header h2 { font-size: 1.2rem; color: var(--primary); margin: 0; }
.more-link { font-size: 0.85rem; color: var(--primary-light); font-weight: 500; }

/* Headline Card */
.headline-card { background: var(--bg-gray); border-radius: var(--radius); padding: 24px; margin-bottom: 16px; }
.headline-card h3 { font-size: 1.35rem; line-height: 1.4; margin-bottom: 8px; }
.headline-card h3 a { color: var(--text); }
.headline-card h3 a:hover { color: var(--primary-light); }
.headline-card p { color: var(--text-light); font-size: 0.95rem; margin-bottom: 12px; }
.headline-meta { display: flex; gap: 12px; font-size: 0.8rem; color: var(--text-muted); flex-wrap: wrap; }

/* News Grid */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.news-card { padding: 16px; border-bottom: 1px solid var(--border); }
.news-card h4 { font-size: 0.95rem; line-height: 1.4; margin-bottom: 6px; }
.news-card h4 a { color: var(--text); }
.news-card h4 a:hover { color: var(--primary-light); }
.news-card-meta { display: flex; gap: 10px; font-size: 0.8rem; color: var(--text-muted); flex-wrap: wrap; }
.source-tag { color: var(--primary-light); font-weight: 500; }

/* News List (full page) */
.news-list-full { display: flex; flex-direction: column; gap: 0; }
.news-list-item { padding: 20px 0; border-bottom: 1px solid var(--border); }
.news-list-item h3 { font-size: 1.15rem; margin-bottom: 6px; }
.news-list-item h3 a { color: var(--text); }
.news-list-item h3 a:hover { color: var(--primary-light); }
.news-list-item p { color: var(--text-light); font-size: 0.9rem; margin-bottom: 8px; }

/* Clipping List (외부 뉴스 링크) */
.clipping-list { display: flex; flex-direction: column; gap: 0; }
.clipping-item { padding: 12px 0; border-bottom: 1px solid var(--border); }
.clipping-item a { color: var(--text); font-size: 0.95rem; font-weight: 500; }
.clipping-item a:hover { color: var(--primary-light); }
.clipping-meta { display: flex; gap: 10px; margin-top: 4px; font-size: 0.8rem; color: var(--text-muted); }
.cat-tag { background: var(--bg-gray); padding: 1px 8px; border-radius: 10px; }

/* Column List */
.column-list { display: flex; flex-direction: column; gap: 0; }
.column-card { padding: 24px 0; border-bottom: 1px solid var(--border); }
.column-card h3 { font-size: 1.2rem; margin: 6px 0; }
.column-card h3 a { color: var(--text); }
.column-card h3 a:hover { color: var(--primary-light); }
.column-card p { color: var(--text-light); font-size: 0.9rem; }
.column-type-tag { background: var(--primary); color: #fff; padding: 3px 12px; border-radius: 12px; font-size: 0.75rem; font-weight: 600; }

/* Sidebar */
.sidebar { position: sticky; top: 80px; align-self: start; }
.sidebar-section { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
.sidebar-section h3 { font-size: 1rem; color: var(--primary); margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.sidebar-item { padding: 8px 0; border-bottom: 1px solid #f0f0f0; }
.sidebar-item a { color: var(--text); font-size: 0.9rem; font-weight: 500; display: block; margin-top: 2px; }
.sidebar-item a:hover { color: var(--primary-light); }
.sidebar-item small { color: var(--text-muted); font-size: 0.8rem; }
.sidebar-tag { font-size: 0.7rem; color: var(--primary-light); font-weight: 600; }
.sidebar-subscribe p { font-size: 0.85rem; color: var(--text-light); margin-bottom: 12px; }
.sidebar-subscribe input { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 0.9rem; margin-bottom: 8px; font-family: var(--font); }
.cat-list { display: flex; flex-wrap: wrap; gap: 6px; }
.cat-link { background: var(--bg-gray); padding: 4px 12px; border-radius: 14px; font-size: 0.8rem; color: var(--text-light); }
.cat-link:hover { background: var(--primary); color: #fff; }

/* ─── Nav Search ─── */
.nav-search-wrap { display: flex; align-items: center; }
.nav-search-form { display: flex; align-items: center; position: relative; }
.nav-search-input {
    width: 140px; padding: 6px 30px 6px 12px; border: 1px solid var(--border); border-radius: 20px;
    font-size: 0.85rem; font-family: var(--font); transition: var(--transition); background: var(--bg-gray);
}
.nav-search-input:focus { outline: none; border-color: var(--primary-light); width: 200px; background: #fff; }
.nav-search-btn {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
    background: none; border: none; cursor: pointer; color: var(--text-light); padding: 4px;
}

/* ─── Search Page ─── */
.search-page-form { display: flex; gap: 8px; margin-bottom: 24px; }
.search-input-lg {
    flex: 1; padding: 14px 20px; border: 2px solid var(--border); border-radius: var(--radius);
    font-size: 1.1rem; font-family: var(--font);
}
.search-input-lg:focus { outline: none; border-color: var(--primary-light); }
.search-result-count { color: var(--text-light); margin-bottom: 24px; font-size: 0.95rem; }
.search-section { margin-bottom: 32px; }
.search-section h2 { font-size: 1.1rem; color: var(--primary); padding-bottom: 8px; border-bottom: 2px solid var(--border); margin-bottom: 12px; }
.search-item { padding: 16px 0; border-bottom: 1px solid #f0f0f0; }
.search-item h3 { font-size: 1.05rem; margin-bottom: 4px; }
.search-item h3 a { color: var(--text); }
.search-item h3 a:hover { color: var(--primary-light); }
.search-item p { color: var(--text-light); font-size: 0.9rem; margin-bottom: 6px; }

/* ─── About Page ─── */
.about-content { line-height: 1.9; }
.about-section { margin-bottom: 40px; }
.about-section h2 { font-size: 1.3rem; color: var(--primary); margin-bottom: 12px; padding-bottom: 8px; border-bottom: 2px solid var(--border); }
.about-features { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.about-feature { background: var(--bg-gray); border-radius: var(--radius); padding: 20px; }
.about-feature h3 { font-size: 1rem; color: var(--primary); margin-bottom: 6px; }
.about-feature p { font-size: 0.9rem; color: var(--text-light); }
.about-contact { background: var(--bg-gray); border-radius: var(--radius); padding: 20px; }
.about-contact p { font-size: 0.9rem; margin-bottom: 4px; }

/* ─── Editor Profiles ─── */
.editor-list { display: flex; flex-direction: column; gap: 16px; }
.editor-card { display: flex; gap: 16px; align-items: flex-start; background: var(--bg-gray); border-radius: var(--radius); padding: 20px; }
.editor-avatar {
    width: 56px; height: 56px; border-radius: 50%; background: var(--primary);
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem; font-weight: 700; flex-shrink: 0;
}
.editor-info strong { display: block; font-size: 1rem; }
.editor-role { font-size: 0.8rem; color: var(--primary-light); font-weight: 600; }
.editor-info p { font-size: 0.9rem; color: var(--text-light); margin-top: 6px; }

/* ─── Popular Articles Sidebar ─── */
.sidebar-popular { display: flex; gap: 10px; align-items: flex-start; }
.popular-rank {
    flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%; background: var(--primary);
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: 0.75rem; font-weight: 700;
}

/* ─── Image Thumbnails ─── */
.headline-image { border-radius: var(--radius); overflow: hidden; margin-bottom: 16px; max-height: 320px; }
.headline-image img { width: 100%; height: 100%; object-fit: cover; }
.news-card-thumb { border-radius: 6px; overflow: hidden; height: 120px; margin-bottom: 8px; }
.news-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.news-list-item { display: flex; gap: 16px; }
.news-list-thumb { flex-shrink: 0; width: 160px; height: 100px; border-radius: 6px; overflow: hidden; }
.news-list-thumb img { width: 100%; height: 100%; object-fit: cover; }
.news-list-content { flex: 1; min-width: 0; }

/* ─── View Count / Meta ─── */
.meta-views { color: var(--text-muted); font-size: 0.8rem; }
.meta-author { font-weight: 500; }

/* ─── Related Articles ─── */
.related-articles { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); }
.related-articles h3 { font-size: 1.1rem; color: var(--primary); margin-bottom: 12px; }
.related-list { display: flex; flex-direction: column; gap: 0; }
.related-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 0; border-bottom: 1px solid #f0f0f0; color: var(--text);
}
.related-item:hover { color: var(--primary-light); }
.related-item strong { font-size: 0.95rem; font-weight: 500; }
.related-item span { font-size: 0.8rem; color: var(--text-muted); flex-shrink: 0; margin-left: 16px; }

/* ─── Footer Links ─── */
.footer-links { display: flex; gap: 16px; align-items: center; }
.footer-links a { color: #aaa; font-size: 0.9rem; }
.footer-links a:hover { color: #fff; }

/* ─── Editor Toolbar ─── */
.editor-toolbar { margin-bottom: 16px; display: flex; flex-direction: column; gap: 8px; }
.editor-title-input {
    width: 100%; padding: 12px 16px; border: 2px solid var(--border); border-radius: var(--radius);
    font-size: 1.3rem; font-weight: 700; font-family: var(--font);
}
.editor-title-input:focus { outline: none; border-color: var(--primary-light); }
.editor-meta-input {
    width: 100%; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius);
    font-size: 0.9rem; font-family: var(--font);
}
.editor-meta-input:focus { outline: none; border-color: var(--primary-light); }

/* ─── Search Filters ─── */
.search-filter-select {
    padding: 14px 16px; border: 2px solid var(--border); border-radius: var(--radius);
    font-size: 0.95rem; font-family: var(--font); background: #fff; min-width: 140px;
}
.search-filter-select:focus { outline: none; border-color: var(--primary-light); }

/* ─── Dark Mode ─── */
.dark-toggle {
    background: none; border: 1px solid var(--border); border-radius: 20px;
    padding: 6px 12px; cursor: pointer; font-size: 0.85rem; color: var(--text-light);
    font-family: var(--font); transition: var(--transition);
}
.dark-toggle:hover { border-color: var(--primary-light); color: var(--primary-light); }

body.dark-mode {
    --bg: #1a1a2e;
    --bg-gray: #16213e;
    --bg-dark: #0f0f23;
    --text: #e0e0e0;
    --text-light: #a0a0b0;
    --text-muted: #6b6b80;
    --border: #2d2d44;
    --shadow: 0 2px 12px rgba(0,0,0,0.3);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.4);
}
body.dark-mode .navbar { background: var(--bg); border-color: var(--border); }
body.dark-mode .article-card,
body.dark-mode .briefing-card,
body.dark-mode .sidebar-section { background: #16213e; }
body.dark-mode .headline-card { background: #16213e; }
body.dark-mode .admin-table td { border-color: var(--border); }
body.dark-mode .nav-search-input { background: var(--bg-gray); color: var(--text); border-color: var(--border); }
body.dark-mode .stat-card { background: #16213e; }
body.dark-mode .admin-card { background: #16213e; }
body.dark-mode input, body.dark-mode select, body.dark-mode textarea {
    background: var(--bg-gray); color: var(--text); border-color: var(--border);
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
    .hero h1 { font-size: 1.8rem; }
    .hero-subscribe-row { flex-direction: column; }
    .nav-toggle { display: flex; }
    .nav-menu { display: none; position: absolute; top: 64px; left: 0; right: 0; background: #fff; flex-direction: column; padding: 16px 20px; border-bottom: 1px solid var(--border); box-shadow: var(--shadow); gap: 12px; }
    .nav-menu.active { display: flex; }
    .nav-search-input { width: 100%; }
    .nav-search-input:focus { width: 100%; }
    .admin-sidebar { transform: translateX(-100%); }
    .admin-main { margin-left: 0; padding: 16px; }
    .admin-grid { grid-template-columns: 1fr; }
    .editor-layout { grid-template-columns: 1fr; height: auto; }
    #md-editor { min-height: 300px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .article-grid { grid-template-columns: 1fr; }
    .filter-form { flex-direction: column; }
    .filter-form select, .filter-form input[type="text"] { width: 100%; }
    .main-layout { grid-template-columns: 1fr; }
    .sidebar { position: static; }
    .mini-hero-inner { flex-direction: column; text-align: center; }
    .mini-subscribe input { width: 160px; }
    .news-grid { grid-template-columns: 1fr; }
    .about-features { grid-template-columns: 1fr; }
    .news-list-item { flex-direction: column; }
    .news-list-thumb { width: 100%; height: 180px; }
    .search-page-form { flex-direction: column; }
}
