/* ==========================================================================
   WelfareFinder - Redesigned Premium UI
   Modern card-based layout with glassmorphism effects
   ========================================================================== */
:root {
    /* Color Palette */
    --primary-color: #0f172a;
    --accent-color: #2563eb;
    --accent-light: #3b82f6;
    --warm-accent: #f59e0b;
    --success-color: #059669;
    --gradient-start: #2563eb;
    --gradient-end: #7c3aed;

    --bg-color: #f1f5f9;
    --surface-color: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;

    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
    --shadow-lg: 0 10px 25px -5px rgba(0,0,0,0.1), 0 8px 10px rgba(0,0,0,0.04);
    --shadow-premium: 0 20px 40px -10px rgba(0,0,0,0.08);
    --shadow-card-hover: 0 20px 40px -10px rgba(37,99,235,0.15);

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-pill: 9999px;

    --font-family: 'Inter', 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
}

[data-theme="dark"] {
    --bg-color: #020617;
    --surface-color: #0f172a;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --border-color: #1e293b;
    --shadow-card-hover: 0 20px 40px -10px rgba(37,99,235,0.25);
}

/* Base Reset & Typography */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.75;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   Navigation & Header
   ========================================================================== */
.top-banner {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    text-align: center;
    padding: 0.6rem;
    font-size: 0.8rem;
    font-weight: 500;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

[data-theme="dark"] .navbar {
    background-color: rgba(2, 6, 23, 0.85);
}

.nav-links {
    display: none;
    list-style: none;
    gap: 2rem;
}

@media (min-width: 1024px) { .nav-links { display: flex; } }

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.2s;
    position: relative;
}

.nav-links a.active {
    color: var(--accent-color);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-color);
    border-radius: 1px;
}

.nav-links a:hover { color: var(--accent-color); }

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: -0.025em;
}

[data-theme="dark"] .logo { color: var(--text-main); }

.logo span { color: var(--accent-color); }

/* ==========================================================================
   Hero Section - Redesigned
   ========================================================================== */
.hero-section {
    padding: 5rem 5% 4rem;
    text-align: center;
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(37,99,235,0.12), transparent),
        radial-gradient(ellipse 60% 40% at 80% 50%, rgba(124,58,237,0.08), transparent),
        radial-gradient(ellipse 60% 40% at 20% 80%, rgba(59,130,246,0.06), transparent);
    position: relative;
    overflow: hidden;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    background: rgba(37,99,235,0.08);
    border: 1px solid rgba(37,99,235,0.15);
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: 2rem;
}

.hero-content h1 {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 1.5rem;
    letter-spacing: -0.04em;
}

.hero-content h1 span {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-content > p {
    max-width: 700px;
    margin: 0 auto 2.5rem;
    font-size: 1.15rem;
    color: var(--text-muted);
    line-height: 1.8;
}

/* Hero Stats */
.hero-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 900;
    color: var(--accent-color);
    line-height: 1;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-top: 0.4rem;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border-color);
}

@media (max-width: 480px) {
    .stat-divider { display: none; }
    .hero-stats { gap: 1.5rem; }
}

/* ==========================================================================
   Search Bars
   ========================================================================== */
.search-bar {
    display: flex;
    align-items: center;
    background: var(--surface-color);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-pill);
    padding: 0.5rem 0.5rem 0.5rem 1.5rem;
    max-width: 700px;
    margin: 0 auto;
    box-shadow: var(--shadow-lg);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-bar:focus-within {
    border-color: var(--accent-color);
    box-shadow: var(--shadow-lg), 0 0 0 4px rgba(37,99,235,0.1);
}

.search-bar i {
    color: var(--text-muted);
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.search-bar input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 1rem;
    color: var(--text-main);
    min-width: 0;
}

.search-btn {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    border: none;
    border-radius: var(--radius-pill);
    padding: 0.75rem 1.75rem;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.2s, transform 0.2s;
    flex-shrink: 0;
}

.search-btn:hover { opacity: 0.9; transform: scale(1.02); }

.search-bar-mini {
    display: flex;
    background: var(--surface-color);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-pill);
    padding: 0.25rem;
    max-width: 400px;
    width: 100%;
    transition: border-color 0.2s;
}

.search-bar-mini:focus-within { border-color: var(--accent-color); }

.search-bar-mini input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.5rem 1.25rem;
    font-size: 0.95rem;
    outline: none;
    color: var(--text-main);
}

.search-bar-mini button {
    background: var(--accent-color);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: transform 0.2s;
}

.search-bar-mini button:hover { transform: scale(1.05); }

/* ==========================================================================
   Home - Latest Posts Cards
   ========================================================================== */
.home-latest-section {
    padding: 4rem 5% 2rem;
}

.home-insight-section {
    padding-top: 2rem;
    padding-bottom: 4rem;
}

.home-section-container {
    max-width: 1200px;
    margin: 0 auto;
}

.home-section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.home-section-title h2 {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.home-section-title h2 i {
    color: var(--accent-color);
    font-size: 1.2rem;
}

.home-section-title p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-top: 0.3rem;
}

.view-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-pill);
    transition: background 0.2s;
}

.view-all-btn:hover {
    background: rgba(37,99,235,0.08);
}

/* Home News Cards Grid */
.home-news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.home-news-card {
    background: var(--surface-color);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    border: 1px solid var(--border-color);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.home-news-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    opacity: 0;
    transition: opacity 0.3s;
}

.home-news-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
    border-color: transparent;
}

.home-news-card:hover::before {
    opacity: 1;
}

.home-news-card .card-date {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.home-news-card .card-date i {
    font-size: 0.7rem;
}

.home-news-card .card-title {
    font-size: 1.1rem;
    font-weight: 800;
    line-height: 1.4;
    margin-bottom: 0.75rem;
    color: var(--text-main);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.home-news-card .card-summary {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.home-news-card .card-read-more {
    margin-top: 1.25rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent-color);
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: gap 0.2s;
}

.home-news-card:hover .card-read-more {
    gap: 0.6rem;
}

/* Home Insight Cards */
.home-insight-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.home-insight-card {
    background: var(--surface-color);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    border: 1px solid var(--border-color);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.home-insight-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
    border-color: transparent;
}

.home-insight-card .insight-card-tag {
    display: inline-block;
    padding: 0.35rem 0.9rem;
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    width: fit-content;
}

.home-insight-card .insight-card-tag.empathy { background: #fee2e2; color: #dc2626; }
.home-insight-card .insight-card-tag.practical { background: #dcfce7; color: #16a34a; }
.home-insight-card .insight-card-tag.future { background: #dbeafe; color: #2563eb; }

[data-theme="dark"] .home-insight-card .insight-card-tag.empathy { background: rgba(220,38,38,0.15); }
[data-theme="dark"] .home-insight-card .insight-card-tag.practical { background: rgba(22,163,74,0.15); }
[data-theme="dark"] .home-insight-card .insight-card-tag.future { background: rgba(37,99,235,0.15); }

.home-insight-card .insight-card-title {
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.4;
    margin-bottom: 0.75rem;
    color: var(--text-main);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.home-insight-card .insight-card-excerpt {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.home-insight-card .card-read-more {
    margin-top: 1.25rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent-color);
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: gap 0.2s;
}

.home-insight-card:hover .card-read-more {
    gap: 0.6rem;
}

/* ==========================================================================
   Notifier Quick Section
   ========================================================================== */
.notifier-quick-section { padding: 0 5% 5rem; }
.notifier-container {
    max-width: 1200px;
    margin: 0 auto;
    background: var(--surface-color);
    padding: 3rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-premium);
    border: 1px solid var(--border-color);
}

.notifier-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.notifier-card {
    display: flex;
    gap: 1.5rem;
    padding: 2rem;
    background: var(--bg-color);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    transition: transform 0.2s, box-shadow 0.2s;
}

.notifier-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.notifier-header {
    margin-bottom: 0.5rem;
}

.notifier-header h2 {
    font-size: 1.6rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
}

.notifier-header h2 span { color: var(--accent-color); }

.notifier-header p {
    color: var(--text-muted);
    font-size: 1rem;
}

.card-icon {
    font-size: 2rem;
    color: var(--accent-color);
    flex-shrink: 0;
}

.card-info h3 {
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.card-info p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.card-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    text-decoration: none;
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    font-weight: 700;
    transition: opacity 0.2s, transform 0.2s;
}

.card-btn:hover { opacity: 0.9; transform: scale(1.02); }

/* ==========================================================================
   Policy List & Benefits Tab
   ========================================================================== */
.policy-list-section, .welfare-news-section {
    padding: 5rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.section-header {
    margin-bottom: 3rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .section-header { flex-direction: row; justify-content: space-between; align-items: flex-end; }
}

.section-header .header-text h2 {
    font-size: 1.75rem;
    font-weight: 900;
}

.section-header .header-text p {
    color: var(--text-muted);
    font-size: 1rem;
    margin-top: 0.5rem;
}

.policy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2rem;
}

/* Filter Chips */
.filter-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
}

.filter-chip {
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-pill);
    border: 2px solid var(--border-color);
    background: var(--surface-color);
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-chip:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.filter-chip.active {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    border-color: transparent;
    color: white;
}

/* Result Count Badge */
.result-count {
    display: inline-block;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    font-size: 0.9rem;
    font-weight: 700;
    padding: 0.2rem 0.75rem;
    border-radius: var(--radius-pill);
    margin-left: 0.5rem;
    vertical-align: middle;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 5rem 2rem;
    color: var(--text-muted);
}

.no-results i {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

/* ==========================================================================
   News Tab
   ========================================================================== */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.news-card {
    background: var(--surface-color);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    border-left: 5px solid;
    border-image: linear-gradient(180deg, var(--gradient-start), var(--gradient-end)) 1;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.news-card h4 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    font-weight: 800;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-date {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    letter-spacing: 0.05em;
}

/* Section Title */
.section-title h3 {
    font-size: 1.75rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.section-title h3 i {
    color: var(--accent-color);
}

.section-title p {
    color: var(--text-muted);
}

.section-title.secondary {
    margin-top: 5rem;
    padding-top: 5rem;
    border-top: 1px solid var(--border-color);
}

/* ==========================================================================
   Insight Cards (News Tab)
   ========================================================================== */
.insight-grid {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    margin-top: 3rem;
}

.insight-card {
    background: var(--surface-color);
    border-radius: var(--radius-xl);
    padding: 3.5rem;
    box-shadow: var(--shadow-premium);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.insight-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card-hover);
}

.insight-tag {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.empathy .insight-tag { background: #fee2e2; color: #dc2626; }
.practical .insight-tag { background: #dcfce7; color: #16a34a; }
.future .insight-tag { background: #dbeafe; color: #2563eb; }

[data-theme="dark"] .empathy .insight-tag { background: rgba(220,38,38,0.15); }
[data-theme="dark"] .practical .insight-tag { background: rgba(22,163,74,0.15); }
[data-theme="dark"] .future .insight-tag { background: rgba(37,99,235,0.15); }

.insight-card h4 {
    font-size: 1.75rem;
    font-weight: 900;
    margin-bottom: 2rem;
    color: var(--text-main);
    line-height: 1.3;
}

.insight-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-main);
}

.insight-body p { margin-bottom: 1.5rem; }
.insight-body ul {
    list-style: none;
    margin-bottom: 1.5rem;
    display: grid;
    gap: 1rem;
}

.insight-body ul li {
    padding-left: 1.5rem;
    position: relative;
}

.insight-body ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.65em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-color);
}

.insight-body .highlight {
    background: var(--bg-color);
    padding: 2rem;
    border-radius: var(--radius-md);
    border-left: 5px solid var(--accent-color);
    font-weight: 600;
    margin-top: 2rem;
}

.insight-section { margin-top: 3rem; }

/* ==========================================================================
   Tab System & Animations
   ========================================================================== */
.tab-content {
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.hidden { display: none !important; }

/* ==========================================================================
   Modal
   ========================================================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: 1rem;
}

.modal-content {
    background: var(--surface-color);
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    border-radius: var(--radius-xl);
    padding: 3rem;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-premium);
}

.close-modal-btn {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-muted);
    line-height: 1;
    transition: color 0.2s;
}

.close-modal-btn:hover { color: var(--text-main); }

.legal-text { font-size: 0.95rem; color: var(--text-muted); }
.legal-text p { margin-bottom: 1rem; }

/* ==========================================================================
   Coupang Partners Banner
   ========================================================================== */
.coupang-banner-section {
    padding: 4rem 5%;
    background: var(--bg-color);
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.coupang-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.coupang-disclosure {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ==========================================================================
   Footer
   ========================================================================== */
footer {
    background: var(--primary-color);
    color: white;
    padding: 5rem 5% 3rem;
}

.footer-content { max-width: 1200px; margin: 0 auto; }
.footer-top {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 900;
    color: white;
    margin-bottom: 1rem;
    letter-spacing: -0.025em;
}

.footer-logo span { color: var(--accent-light); }

.footer-brand p {
    color: #94a3b8;
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer-nav h4, .footer-legal h4 {
    color: white;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.footer-nav ul, .footer-legal ul { list-style: none; margin-top: 1.5rem; }
.footer-nav a, .footer-legal a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.9rem;
    display: block;
    margin-bottom: 0.75rem;
    transition: color 0.2s;
}

.footer-nav a:hover, .footer-legal a:hover { color: white; }

.footer-bottom {
    border-top: 1px solid #1e293b;
    padding-top: 2rem;
    text-align: center;
    font-size: 0.85rem;
    color: #64748b;
}

/* ==========================================================================
   Nav Controls
   ========================================================================== */
.nav-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-toggle {
    background: none;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: grid;
    place-items: center;
    color: var(--text-muted);
    transition: all 0.2s;
}

.theme-toggle:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.login-btn {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    border: none;
    border-radius: var(--radius-pill);
    padding: 0.5rem 1.5rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s;
}

.login-btn:hover { opacity: 0.9; transform: scale(1.02); }

.login-btn i { margin-right: 0.35rem; }

.hidden { display: none !important; }

/* User menu (after sign-in) */
.user-menu {
    position: relative;
}

.user-trigger {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-pill);
    padding: 0.3rem 0.9rem 0.3rem 0.3rem;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-main);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.user-trigger:hover {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.08);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--accent-color);
    flex-shrink: 0;
}

.user-name {
    font-size: 0.9rem;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-trigger .fa-chevron-down {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.user-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    min-width: 260px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 0.5rem;
    z-index: 1200;
    animation: dropdown-in 0.15s ease-out;
}

@keyframes dropdown-in {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.user-dropdown-header {
    padding: 0.85rem 0.85rem 0.6rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 0.4rem;
}

.user-dropdown-name {
    font-weight: 800;
    color: var(--text-main);
    font-size: 0.95rem;
}

.user-dropdown-email {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
    word-break: break-all;
}

.user-dropdown-section {
    padding: 0.25rem 0;
}

.user-dropdown-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.55rem 0.85rem;
    font-size: 0.88rem;
    color: var(--text-muted);
}

.user-dropdown-row i {
    margin-right: 0.4rem;
    color: var(--accent-color);
}

.subscription-status {
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.2rem 0.65rem;
    border-radius: var(--radius-pill);
    background: var(--border-color);
    color: var(--text-muted);
}

.subscription-status.active {
    background: rgba(5,150,105,0.12);
    color: var(--success-color);
}

.subscription-status.inactive {
    background: rgba(245,158,11,0.12);
    color: var(--warm-accent);
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    background: transparent;
    border: none;
    padding: 0.7rem 0.85rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-align: left;
    transition: background 0.15s;
}

.user-dropdown-item:hover {
    background: rgba(37,99,235,0.08);
    color: var(--accent-color);
}

/* Subscribed state — dim the form subtly */
.subscribe-form.subscribed {
    opacity: 0.7;
}

.subscribe-form.subscribed input {
    pointer-events: none;
}

@media (max-width: 640px) {
    .user-name { display: none; }
    .user-dropdown {
        right: -0.5rem;
        min-width: 240px;
    }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 768px) {
    .home-news-grid {
        grid-template-columns: 1fr;
    }

    .home-insight-grid {
        grid-template-columns: 1fr;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .policy-grid {
        grid-template-columns: 1fr;
    }

    .hero-section {
        padding: 3.5rem 5% 3rem;
    }

    .notifier-container {
        padding: 2rem;
    }

    .insight-card {
        padding: 2rem;
    }
}

/* ==========================================================================
   Newsletter Layout (Home tab redesigned as "이번 호")
   ========================================================================== */
.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.newsletter-masthead {
    padding: 4.5rem 5% 3rem;
    text-align: center;
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(37,99,235,0.12), transparent),
        radial-gradient(ellipse 60% 40% at 80% 50%, rgba(124,58,237,0.08), transparent);
    border-bottom: 1px solid var(--border-color);
}

.masthead-inner {
    max-width: 760px;
    margin: 0 auto;
}

.issue-meta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.4rem 1rem;
    background: rgba(37,99,235,0.08);
    border: 1px solid rgba(37,99,235,0.18);
    border-radius: var(--radius-pill);
    margin-bottom: 1.5rem;
}

.issue-dot { opacity: 0.5; }

.masthead-title {
    font-family: 'Georgia', 'Pretendard', serif;
    font-size: clamp(2.2rem, 5.5vw, 3.6rem);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
}

.masthead-title span {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-style: italic;
}

.masthead-tagline {
    font-size: 1.08rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 2rem;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

/* Subscribe form */
.subscribe-form {
    display: flex;
    gap: 0.5rem;
    max-width: 520px;
    margin: 0 auto 0.75rem;
    background: var(--surface-color);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-pill);
    padding: 0.4rem 0.4rem 0.4rem 1.5rem;
    box-shadow: var(--shadow-lg);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.subscribe-form:focus-within {
    border-color: var(--accent-color);
    box-shadow: var(--shadow-lg), 0 0 0 4px rgba(37,99,235,0.12);
}

.subscribe-form input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 1rem;
    color: var(--text-main);
    min-width: 0;
}

.subscribe-btn {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    border: none;
    border-radius: var(--radius-pill);
    padding: 0.75rem 1.5rem;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.2s, transform 0.2s;
}

.subscribe-btn:hover { opacity: 0.92; transform: scale(1.02); }

.subscribe-note {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}

.subscribe-note.success { color: var(--success-color); font-weight: 600; }
.subscribe-note.error { color: #dc2626; font-weight: 600; }

.masthead-search {
    display: flex;
    align-items: center;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-pill);
    padding: 0.35rem 0.35rem 0.35rem 1.25rem;
    max-width: 580px;
    margin: 0 auto 2.5rem;
    box-shadow: var(--shadow-sm);
}

.masthead-search i { color: var(--text-muted); margin-right: 0.6rem; flex-shrink: 0; }

.masthead-search input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.95rem;
    color: var(--text-main);
    min-width: 0;
    padding: 0.5rem 0;
}

.masthead-search .search-btn {
    padding: 0.55rem 1.25rem;
    font-size: 0.88rem;
}

/* Newsletter sections */
.newsletter-section {
    padding: 4rem 5% 3rem;
}

.newsletter-section-muted {
    background: var(--bg-color);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.newsletter-container {
    max-width: 760px;
    margin: 0 auto;
}

.newsletter-section-header {
    margin-bottom: 2rem;
    text-align: left;
}

.section-kicker {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    margin-bottom: 0.6rem;
}

.newsletter-section-header h2 {
    font-size: 1.75rem;
    font-weight: 900;
    color: var(--text-main);
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.newsletter-section-header h2 i {
    color: var(--accent-color);
    font-size: 1.35rem;
}

.newsletter-section-footer {
    margin-top: 2rem;
    text-align: center;
}

/* Feature (top story) card */
.newsletter-feature {
    margin-bottom: 1rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

@media (max-width: 768px) {
    .newsletter-feature { grid-template-columns: 1fr; }
}

.feature-card {
    display: block;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-left: 5px solid var(--accent-color);
    border-radius: var(--radius-lg);
    padding: 2rem 2.25rem;
    text-decoration: none;
    color: inherit;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s;
    box-shadow: var(--shadow-sm);
}

.feature-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-card-hover);
    border-left-color: var(--gradient-end);
}

.feature-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--warm-accent);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.75rem;
}

.feature-date {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.feature-title {
    font-size: 1.5rem;
    font-weight: 900;
    line-height: 1.35;
    letter-spacing: -0.01em;
    margin-bottom: 1rem;
    color: var(--text-main);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.feature-summary {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 1.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.feature-read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--accent-color);
    font-weight: 700;
    font-size: 0.92rem;
    transition: gap 0.2s;
}

.feature-card:hover .feature-read-more { gap: 0.7rem; }

/* Newsletter list items */
.newsletter-list {
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--border-color);
}

.newsletter-list-item {
    display: grid;
    grid-template-columns: 110px 1fr 24px;
    gap: 1.25rem;
    align-items: start;
    padding: 1.5rem 0.5rem;
    border-bottom: 1px solid var(--border-color);
    text-decoration: none;
    color: inherit;
    transition: background 0.2s, padding-left 0.2s;
}

.newsletter-list-item:hover {
    background: rgba(37,99,235,0.04);
    padding-left: 1rem;
}

.list-item-date {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--accent-color);
    letter-spacing: 0.02em;
    padding-top: 0.25rem;
}

.list-item-title {
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.45;
    color: var(--text-main);
    margin-bottom: 0.4rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.list-item-summary {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.list-item-arrow {
    color: var(--text-muted);
    font-size: 0.9rem;
    padding-top: 0.5rem;
    transition: color 0.2s, transform 0.2s;
}

.newsletter-list-item:hover .list-item-arrow {
    color: var(--accent-color);
    transform: translateX(3px);
}

/* Newsletter insight list */
.newsletter-insight-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
}

.newsletter-insight-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}

.newsletter-insight-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-card-hover);
    border-color: transparent;
}

.newsletter-insight-card .insight-card-tag {
    display: inline-block;
    align-self: flex-start;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 0.3rem 0.75rem;
    border-radius: var(--radius-pill);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.9rem;
    background: rgba(37,99,235,0.1);
    color: var(--accent-color);
}
.newsletter-insight-card .insight-card-tag.empathy { background: rgba(245,158,11,0.12); color: var(--warm-accent); }
.newsletter-insight-card .insight-card-tag.practical { background: rgba(37,99,235,0.1); color: var(--accent-color); }
.newsletter-insight-card .insight-card-tag.future { background: rgba(5,150,105,0.1); color: var(--success-color); }

.newsletter-insight-card .insight-card-title {
    font-size: 1.1rem;
    font-weight: 800;
    line-height: 1.45;
    color: var(--text-main);
    margin-bottom: 0.6rem;
}

.newsletter-insight-card .insight-card-excerpt {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
    margin-bottom: 1rem;
}

.newsletter-insight-card .card-read-more {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent-color);
    display: inline-flex;
    gap: 0.3rem;
    transition: gap 0.2s;
}

.newsletter-insight-card:hover .card-read-more { gap: 0.6rem; }

@media (max-width: 640px) {
    .newsletter-masthead { padding: 3rem 5% 2.5rem; }
    .subscribe-form {
        flex-direction: column;
        border-radius: var(--radius-md);
        padding: 0.75rem;
        gap: 0.75rem;
    }
    .subscribe-form input { padding: 0.75rem 1rem; }
    .subscribe-btn { width: 100%; padding: 0.85rem; }

    .feature-card { padding: 1.5rem 1.5rem; }
    .feature-title { font-size: 1.25rem; }

    .newsletter-list-item {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        padding: 1.25rem 0;
    }
    .newsletter-list-item:hover { padding-left: 0; }
    .list-item-arrow { display: none; }
    .list-item-date { padding-top: 0; }

    .newsletter-insight-list { grid-template-columns: 1fr; }

    .newsletter-section-header h2 { font-size: 1.4rem; }
}
