/* ===================================
   VAAX Design System
   Breakpoints: 
   - Mobile: max-width 767px
   - Tablet: 768px - 1023px  
   - Desktop: 1024px+
   =================================== */

:root {
    /* Brand Colors */
    --primary-color: #65a30d;
    --primary-color-hover: #4d7c0f;
    --secondary-color: #475569;

    /* Background & Surface */
    --background-color: #ffffff;
    --card-bg: #ffffff;

    /* Text */
    --text-main: #111827;
    --text-muted: #4b5563;

    /* Borders */
    --border-color: #d1d5db;
    --line-gray: #9ca3af;

    /* Touch Target (minimum 44px for mobile) */
    --touch-target-min: 44px;
}

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

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
    background-color: var(--background-color);
    color: var(--text-main);
    line-height: 1.6;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

.hidden {
    display: none !important;
}

a {
    text-decoration: none;
    color: inherit;
}

a:hover {
    color: var(--primary-color);
}

/* Admin Link (Footer) */
.admin-link {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

.admin-link:hover {
    color: var(--primary-color) !important;
    text-decoration: underline !important;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.25rem;
}

/* Header */
header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    margin-bottom: 2rem;
}

.gnb {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.25rem;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    /* 왼쪽 정렬 */
    gap: 0.5rem;
    /* 로고와 텍스트 간격 최소화 */
    font-weight: 600;
    flex-wrap: nowrap;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: nowrap;
    flex-shrink: 0;
    white-space: nowrap;
}

.gnb a {
    color: var(--text-main);
    padding: 0.5rem 0;
    font-size: 1.1rem;
    white-space: nowrap;
}

.gnb a.active {
    color: var(--primary-color);
    border-bottom: 3px solid var(--primary-color);
}

.header-logo {
    height: 3.96rem;
    /* 5.5rem * 0.9 * 0.8 = 3.96rem */
    width: auto;
    vertical-align: middle;
    margin-right: 1.2rem;
    object-fit: contain;
    transform: scaleX(1.2);
    /* 가로 120% */
}

.logo-link {
    display: flex;
    align-items: center;
    padding: 0 !important;
    margin-right: 4rem;
}

.logo-link:hover {
    border-bottom: none !important;
}


/* New Header Styles */
.header-right-section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    /* 줄 간격 매우 좁게 */
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.slogan-container {
    display: flex;
    flex-direction: column;
    /* 세로로 쌓기 */
    gap: 0rem;
    /* since와 슬로건 사이 간격 제거 */
}

.slogan-since {
    display: block;
    /* 한 줄 차지 */
    font-size: 0.85rem;
    color: #9ca3af;
    /* 회색 */
    font-weight: 500;
    line-height: 1.2;
    margin-bottom: 0.1rem;
}

.header-slogan-text {
    display: block;
    /* 한 줄 차지 */
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 500;
    line-height: 1.3;
}

.slogan-highlight {
    font-weight: 700;
    color: #84cc16;
    /* Lime Green */
}

.slogan-sub {
    font-weight: 300;
    /* 가는 글자 */
    font-size: 0.85em;
    /* 1단계 축소 */
    margin-left: 0.3rem;
}

@media (max-width: 768px) {
    .gnb {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .header-right-section {
        width: 100%;
        gap: 1rem;
    }

    .header-slogan-text {
        font-size: 0.9rem;
        max-width: 100%;
    }

    .nav-links {
        width: 100%;
        flex-wrap: nowrap;
        gap: 1rem;
        padding-top: 0.5rem;
        border-top: 1px solid var(--border-color);
        justify-content: space-between;
    }

    .nav-links a {
        white-space: nowrap;
    }

    .gnb a {
        font-size: 0.85rem;
    }

    .header-logo {
        width: 58%;
        height: auto;
        max-height: 5rem;
    }
}

.header-announcement {
    max-width: 1200px;
    margin: 0.25rem auto 0;
    padding: 0 1rem;
    color: #ef4444;
    font-size: 0.6rem;
    text-align: left;
    font-weight: 600;
    line-height: 1.2;
}

/* General Styles */
h1 {
    font-size: clamp(1.6rem, 3vw, 2rem);
    margin-bottom: 0.75rem;
    color: var(--text-main);
}

.subtitle {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

/* 2x2 Dashboard Grid */
/* 2x2 Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

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

.dashboard-section {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.dashboard-section h2 {
    font-size: clamp(1.2rem, 2.3vw, 1.4rem);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-more {
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 500;
}

.preview-list {
    list-style: none;
}

.preview-list li {
    padding: 0.75rem 0.25rem;
    border-bottom: 1px solid var(--border-color);
}

.preview-list li:last-child {
    border-bottom: none;
}

.preview-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: block;
    margin-bottom: 0.2rem;
}

/* Global Scrollbar to prevent layout shift */
html {
    overflow-y: scroll;
}

/* News Item (List View) - Unified Style */
.news-item {
    background: var(--card-bg);
    border: 1.5px solid var(--line-gray);
    border-radius: 10px;
    padding: clamp(1.1rem, 2vw, 1.5rem);
    margin-bottom: clamp(1rem, 1.6vw, 1.25rem);
}

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

/* Member Page List */
.news-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.news-header {
    margin-bottom: 1rem;
}

.news-title {
    font-size: clamp(1.15rem, 2.4vw, 1.5rem);
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    line-height: 1.3;
}

.news-title a {
    color: inherit;
}

.news-title a:hover {
    text-decoration: underline;
    color: var(--primary-color-hover);
}

.news-meta {
    font-size: 0.9rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.source-link {
    color: var(--primary-color);
    font-weight: 500;
}

.news-body {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 1.5rem;
    align-items: flex-start;
}


/* Image handling - PC: fixed width beside text */
.news-image {
    flex-shrink: 0;
}

.news-image img {
    width: 240px;
    height: auto;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Summary Box with Gray Line */
.news-summary {
    /* Simplified Summary Box */
    flex: 1;
    font-size: clamp(1rem, 1.9vw, 1.08rem);
    line-height: 1.75;
    color: #1f2937;
    margin-top: -5px;
    padding: 0.5rem 0;
    /* Improved readability */
}

.item-list {
    display: grid;
    grid-template-columns: 1fr;
    /* Changed to 1 column */
    gap: 1.5rem;
}

.news-item {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
    height: 100%;
    /* Match height */
}

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

    .news-body {
        flex-direction: column;
    }

    .news-image {
        width: 100%;
    }

    .news-image img {
        width: 100%;
        max-width: 100%;
        border-radius: 10px;
    }

    .news-summary {
        margin-top: 0.5rem;
    }
}

/* Custom Highlight */
.highlight {
    background-color: #e5f7da;
    color: #111827;
    padding: 2px 4px;
    border-radius: 4px;
    font-weight: 400;
}

.summary-list {
    list-style-type: disc;
    padding-left: 1.2rem;
}

.summary-list li {
    margin-bottom: 0.6rem;
}

/* New format section titles */
.summary-section-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--primary-color);
    margin-top: 0.8rem;
    margin-bottom: 0.4rem;
    padding-bottom: 0.2rem;
    border-bottom: 1px dashed var(--border-color);
}

.summary-section-title:first-child {
    margin-top: 0;
}

.meaning-box {
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    background: #f3f6fb;
    border-radius: 8px;
    border-left: 4px solid var(--line-gray);
}

.meaning-line {
    color: var(--text-muted);
    margin-bottom: 0.35rem;
}

.meaning-line:last-child {
    margin-bottom: 0;
}

/* Styled Table with Gray Lines */
.table-responsive {
    overflow-x: auto;
    background: var(--card-bg);
    border: 1.5px solid var(--line-gray);
    /* Outer gray border */
    border-radius: 10px;
    margin-bottom: 2rem;
}

table,
.styled-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 520px;
}

.styled-table {
    border: 1.5px solid var(--line-gray);
    border-radius: 10px;
    overflow: hidden;
    background: var(--card-bg);
    margin-bottom: 1.25rem;
}

th {
    background: #f1f5f9;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 2px solid var(--line-gray);
    /* Header gray line */
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--line-gray);
    /* Row gray line */
    color: var(--text-main);
}

tr:last-child td {
    border-bottom: none;
}

tr:hover {
    background-color: #f8fafc;
}

.col-idx {
    width: 50px;
    text-align: center;
    color: var(--text-muted);
}

.col-company {
    width: 140px;
    font-weight: 600;
}

.col-title a:hover {
    text-decoration: underline;
    color: var(--primary-color);
}

.col-date {
    width: 180px;
    text-align: center;
    color: var(--text-muted);
}

.col-count {
    width: 120px;
    text-align: right;
    font-weight: 700;
    color: var(--primary-color);
}

.col-meta {
    width: 160px;
    text-align: center;
    color: var(--text-muted);
    font-weight: 600;
}

.text-decoration-none {
    text-decoration: none;
}

.text-dark {
    color: var(--text-main);
}

.fw-bold {
    font-weight: 700;
}

@media (max-width: 640px) {
    .container {
        padding: 1.25rem 0.5rem 1.5rem;
        /* Reduced horizontal padding from 1rem to 0.5rem */
    }

    .preview-list li {
        padding: 0.65rem 0;
    }

    .news-summary {
        padding: 1rem 0.5rem;
        /* Reduced from 1rem to 0.5rem */
    }

    .news-item {
        padding: 1rem 0.75rem;
        /* Reduced horizontal padding */
    }

    table,
    .styled-table {
        min-width: 100%;
    }

    th,
    td {
        padding: 0.75rem 0.4rem;
        /* Reduced horizontal padding from 0.6rem to 0.4rem */
        font-size: 0.95rem;
    }

    .col-company,
    .col-meta,
    .col-date,
    .col-count,
    .col-dept {
        white-space: normal;
    }
}

/* Member News Tile Grid */
.member-news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

@media (max-width: 900px) {
    .member-news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .member-news-grid {
        grid-template-columns: 1fr;
    }
}

.member-news-tile {
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.member-news-tile:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    border-color: var(--primary-color);
}

.tile-image {
    width: 100%;
    height: 140px;
    overflow: hidden;
    background: #f1f5f9;
}

.tile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tile-content {
    padding: 0.9rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.tile-title {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-main);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}

.tile-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: auto;
}

.tile-source {
    color: var(--primary-color);
    font-weight: 500;
}

.tile-date {
    white-space: nowrap;
}

.tile-member-badge {
    display: inline-block;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.member-directory-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

.member-directory-section h2 {
    margin-bottom: 0.5rem;
}

.empty-msg {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Archive Enhancements */
.page-header {
    margin-bottom: 1.5rem;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 0.35rem;
}

/* Title Row - 제목과 설명을 한 줄에 배치 (PC) */
.title-row {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    flex-wrap: wrap;
}

.title-row h1 {
    margin-bottom: 0;
}

.title-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 400;
}

@media (max-width: 768px) {
    .title-row {
        flex-direction: column;
        gap: 0.25rem;
    }
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
    margin-bottom: 1.5rem;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.section-heading h2,
.section-heading h3 {
    margin-bottom: 0.25rem;
}

.pill {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.9rem;
    white-space: nowrap;
}

.today-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.news-card {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    background: #fff;
}

.news-card-title {
    font-size: 1.05rem;
    margin-bottom: 0.25rem;
}

.news-card-title a {
    color: var(--primary-color);
}

.news-card-title a:hover {
    color: var(--primary-color-hover);
}

.news-card-meta {
    color: var(--text-muted);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.news-meta .published-date,
.news-card-meta .published-date {
    color: var(--text-muted);
}

.news-card-summary {
    color: var(--text-main);
    font-size: 0.95rem;
}

.news-card-thumb {
    margin: 0.35rem 0;
}

.news-card-thumb img {
    width: 100%;
    border-radius: 8px;
    object-fit: cover;
}

.calendar-section {
    position: relative;
    overflow: visible;
}

.calendar-container {
    display: grid;
    gap: 1rem;
    position: relative;
}

.calendar-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.calendar-nav .ghost-btn {
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-weight: 700;
}

.month-label {
    font-weight: 800;
    color: var(--text-main);
}

.month-block {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    width: 100%;
}

.month-header {
    padding: 0.75rem 1rem;
    background: #f1f5f9;
    font-weight: 700;
    color: var(--text-main);
}

.weekday-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    background: #f8fafc;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.9rem;
}

.weekday-row div {
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border-color);
}

.weekday-row .weekend {
    color: #e02424;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.25rem;
    padding: 0.75rem;
}

.calendar-cell {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    min-height: 29px;
    padding: 0.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: #fff;
    cursor: pointer;
}

.calendar-cell.weekend .cell-date,
.calendar-cell.holiday .cell-date {
    color: #e02424;
}

.calendar-cell.has-articles {
    background: #e6f8d7;
    border-color: #b9e3a0;
}

.calendar-cell.empty {
    opacity: 0.5;
    cursor: default;
}

.calendar-cell.active {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.cell-date {
    align-self: flex-start;
    background: transparent;
    border: none;
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-main);
    cursor: pointer;
    white-space: nowrap;
}

.cell-header {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    justify-content: space-between;
    flex-wrap: nowrap;
    min-height: 1.5rem;
}

.run-count {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0;
    background: transparent;
    color: #2563eb;
    font-weight: 400;
    font-size: 0.85rem;
    align-self: center;
    margin-left: auto;
    white-space: nowrap;
}

/* Header with Search */
.header-with-search {
    display: flex;
    align-items: flex-end;
    /* Align bottom to match title baseline roughly */
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.header-search {
    flex: 1;
    min-width: 280px;
    max-width: 400px;
    margin-top: 0;
    /* Override default marginTop of .search-bar */
}

/* Reduced Calendar Width */
.calendar-section {
    max-width: 650px;
    /* Approx 65% of standard 1000-1200px container */
    margin: 0 auto 1.5rem auto;
    /* Center it */
    width: 100%;
}

/* Adjust search bar specific for header usage */
.search-bar {
    display: flex;
    gap: 0.5rem;
}

.search-bar input {
    flex: 1;
    padding: 0.6rem 1rem;
    /* Slightly compact */
    border: 1px solid var(--line-gray);
    border-radius: 10px;
    font-size: 0.95rem;
}

.search-bar .primary-btn {
    padding: 0.6rem 1rem;
    /* Slightly compact */
    min-width: 4.5rem;
    height: auto;
    white-space: normal;
    word-break: keep-all;
    line-height: 1.2;
    border: 1px solid var(--line-gray);
    border-radius: 10px;
    background: #fff;
    color: var(--text-main);
    font-weight: 700;
    cursor: pointer;
    flex-shrink: 0;
}

.search-bar .primary-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.search-results.hidden {
    display: none;
}

.search-results .section-heading.compact {
    padding: 0;
    margin-bottom: 0.75rem;
}

.ghost-btn {
    border: 1px solid var(--border-color);
    background: #fff;
    color: var(--text-main);
    padding: 0.35rem 0.75rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.ghost-btn.subtle {
    border-color: transparent;
    background: #f8fafc;
}

.ghost-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

.modal.hidden {
    display: none;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
}

.modal-body {
    position: relative;
    background: #fff;
    border-radius: 14px;
    padding: 1.25rem;
    width: min(500px, 90vw);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.18);
    z-index: 1;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.modal-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.modal-run {
    width: 100%;
    text-align: left;
    border: 1px solid var(--border-color);
    background: #f8fafc;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.modal-run:hover {
    border-color: var(--primary-color);
    background: rgba(37, 99, 235, 0.08);
}

.modal-run-title {
    font-weight: 800;
    color: var(--text-main);
}

.modal-run-sub {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-top: 0.2rem;
}

.run-popover {
    position: absolute;
    left: 0;
    top: 0;
    transform: none;
    background: #fff;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    padding: 0.75rem;
    width: min(320px, 90vw);
    z-index: 4;
}

.popover-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.popover-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(64px, 1fr));
    gap: 0.4rem;
    margin-top: 0.25rem;
}

.popover-list .modal-run {
    margin: 0;
}

.modal-run.compact {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    padding: 0.6rem 0.4rem;
}

@media (max-width: 640px) {
    .calendar-section {
        position: relative;
        overflow: visible;
    }

    .calendar-grid {
        grid-template-columns: repeat(7, minmax(0, 1fr));
        gap: 0.2rem;
    }

    .calendar-cell {
        min-height: 36px;
        padding: 0.2rem 0.15rem;
        /* Further reduced padding */
    }

    .cell-date {
        font-size: 0.75rem;
        /* Smaller font for mobile */
        white-space: nowrap;
    }

    .cell-header {
        gap: 0;
        /* No gap */
    }

    .run-count {
        font-size: 0.65rem;
        /* Smaller count font */
        margin-left: 0;
    }

    .section-heading h2 {
        font-size: 1.1rem;
        /* Smaller date title */
    }

    .pill {
        font-size: 0.75rem;
        /* Smaller pill text */
        padding: 0.3rem 0.6rem;
    }
}

/* Mobile Card Layout for Member Directory Table */
@media (max-width: 768px) {
    .member-directory-section .styled-table thead {
        display: none;
    }

    .member-directory-section .styled-table,
    .member-directory-section .styled-table tbody,
    .member-directory-section .styled-table tr {
        display: block;
        width: 100%;
    }

    .member-directory-section .styled-table tr {
        background: var(--card-bg);
        border: 1px solid var(--border-color);
        border-radius: 10px;
        padding: 1rem;
        margin-bottom: 0.75rem;
    }

    .member-directory-section .styled-table td {
        display: block;
        border: none;
        padding: 0.25rem 0;
        text-align: left;
        width: 100%;
    }

    .member-directory-section .styled-table td.col-company {
        font-size: 1.1rem;
        font-weight: 700;
        margin-bottom: 0.5rem;
        padding-bottom: 0.5rem;
        border-bottom: 1px solid var(--border-color);
    }

    .member-directory-section .styled-table td.col-title {
        font-size: 0.95rem;
        color: var(--primary-color);
        line-height: 1.4;
        margin-bottom: 0.5rem;
    }

    .member-directory-section .styled-table td.col-title a {
        display: block;
    }

    .member-directory-section .styled-table td.col-date {
        font-size: 0.85rem;
        color: var(--text-muted);
        width: auto;
        display: inline-block;
    }

    .member-directory-section .styled-table td.col-count {
        font-size: 0.85rem;
        color: var(--primary-color);
        width: auto;
        display: inline-block;
        text-align: left;
    }

    .member-directory-section .styled-table td.col-count::before {
        content: " · ";
        color: var(--text-muted);
    }

    /* Gov Table Mobile Card Layout */
    .gov-table-section .styled-table thead {
        display: none;
    }

    .gov-table-section .styled-table,
    .gov-table-section .styled-table tbody,
    .gov-table-section .styled-table tr {
        display: block;
        width: 100%;
    }

    .gov-table-section .styled-table tr {
        background: var(--card-bg);
        border: 1px solid var(--border-color);
        border-radius: 10px;
        padding: 1rem;
        margin-bottom: 0.75rem;
    }

    .gov-table-section .styled-table td {
        display: block;
        border: none;
        padding: 0.25rem 0;
        text-align: left;
        width: 100%;
    }

    .gov-table-section .styled-table td.col-idx {
        display: none;
    }

    .gov-table-section .styled-table td.col-title {
        font-size: 1rem;
        font-weight: 600;
        color: var(--primary-color);
        line-height: 1.4;
        margin-bottom: 0.5rem;
        padding-bottom: 0.5rem;
        border-bottom: 1px solid var(--border-color);
    }

    .gov-table-section .styled-table td.col-dept {
        font-size: 0.85rem;
        color: var(--text-muted);
        display: inline-block;
        width: auto;
    }

    .gov-table-section .styled-table td.col-manager::before {
        content: " · ";
    }

    .gov-table-section .styled-table td.col-date {
        font-size: 0.85rem;
        color: var(--text-muted);
        display: block;
        margin-top: 0.35rem;
        width: 100%;
    }
}

/* Word Cloud Styles */
.wordcloud-section {
    text-align: left;
    margin-bottom: 30px;
    width: 100%;
}

.wordcloud-section h3 {
    margin-bottom: 0.75rem;
}

.wordcloud-legend {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: #555;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.wordcloud-img {
    width: 100%;
    height: auto;
    border: 1px solid #eee;
    border-radius: 8px;
    display: block;
}

@media (max-width: 768px) {
    .wordcloud-img {
        width: 100%;
    }

    .wordcloud-legend {
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
    }
}

/* ===================================
   Image Placeholder (AI/XR Categories)
   =================================== */
.image-placeholder {
    width: 240px;
    height: 135px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 2rem;
    letter-spacing: 0.1em;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.image-placeholder.ai {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.image-placeholder.xr {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

/* Tile view placeholders (smaller) */
.tile-placeholder {
    width: 100%;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 0.1em;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.tile-placeholder.ai {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.tile-placeholder.xr {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

@media (max-width: 768px) {
    .image-placeholder {
        width: 100%;
        height: 120px;
        border-radius: 10px;
        font-size: 1.5rem;
    }
}

/* ===================================
   Discussion Feature Styles
   ==================================== */

/* 인라인 액션 링크 (제목 옆) */
.inline-actions {
    margin-left: 1rem;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
}

.action-link {
    color: var(--primary-color);
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.2s;
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
}

.action-link:hover {
    opacity: 0.7;
    text-decoration: underline;
}

.action-separator {
    margin: 0 0.5rem;
    color: var(--text-muted);
}

/* New Header Layout with Title Actions */
.news-header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.news-header-top .news-title {
    margin-bottom: 0;
    flex: 1;
}

.title-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
    align-items: center;
}

/* Ensure Discuss/Share buttons are consistent */
.discuss-btn-sm {
    display: inline-block;
    min-width: 40px;
    padding: 0.1rem 0.5rem;
    background: transparent;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: 600;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    line-height: 1.1;
}

@media (max-width: 480px) {
    .news-header-top {
        flex-direction: column;
        gap: 0.5rem;
    }

    .title-actions {
        align-self: flex-start;
    }
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .inline-actions {
        display: block;
        margin-left: 0;
        margin-top: 0.5rem;
        font-size: 0.8rem;
    }
}

/* 정부과제용 토론/공유 링크 (테이블 내) */
.col-discuss {
    width: 80px;
    text-align: center;
}

.discuss-btn-sm:hover {
    background: rgba(101, 163, 13, 0.05);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.discuss-btn-sm:hover {
    background: rgba(101, 163, 13, 0.05);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* 토론 게시글 배지 */
.discuss-badge {
    background: var(--primary-color);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    margin-right: 0.5rem;
    display: inline-block;
}

/* 토론 게시글 배경색  */
.discussion-post {
    background: linear-gradient(90deg, #f0fdf4 0%, white 100%);
}

/* 정부과제 모바일 목록형 */
.gov-mobile-list {
    display: none;
}

@media (max-width: 768px) {
    .gov-mobile-list {
        display: block;
    }

    .gov-list-item {
        padding: 1rem;
        border-bottom: 1px solid #e2e8f0;
        background: white;
    }

    .gov-list-item:hover {
        background: #f8fafc;
    }

    .list-item-title {
        font-size: 0.95rem;
        font-weight: 600;
        margin-bottom: 0.5rem;
    }

    .list-item-title a {
        color: var(--text-primary);
        text-decoration: none;
    }

    .list-item-title a:hover {
        color: var(--primary-color);
    }

    .list-item-meta {
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
        margin-bottom: 0.5rem;
        font-size: 0.8rem;
        color: var(--text-muted);
    }

    .list-item-schedule {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        margin-bottom: 0.75rem;
        font-size: 0.75rem;
        color: var(--text-muted);
    }

    .schedule-item {
        background: #f1f5f9;
        padding: 0.25rem 0.5rem;
        border-radius: 4px;
    }

    .list-item-actions {
        display: flex;
        gap: 0.5rem;
        justify-content: flex-start;
    }
}

/* 간단한 뉴스 목록형 */
.simple-news-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.news-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
    transition: background 0.2s;
}

.news-list-item:hover {
    background: #f8fafc;
}

.list-item-content {
    flex: 1;
    min-width: 0;
}

.item-badge {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
}

.list-item-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
}

.list-item-title a {
    color: var(--text-primary);
    text-decoration: none;
}

.list-item-title a:hover {
    color: var(--primary-color);
}

.list-item-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.list-item-actions {
    display: flex;
    gap: 0.5rem;
    margin-left: 1rem;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .simple-news-list .news-list-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .simple-news-list .list-item-actions {
        margin-left: 0;
        margin-top: 0.75rem;
        padding-top: 0.75rem;
        border-top: 1px solid #e2e8f0;
        width: 100%;
    }
}


/* 액션 버튼 - 기사 하단 */
.news-actions {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid #e2e8f0;
}

.discuss-btn {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(101, 163, 13, 0.2);
}

.discuss-btn:hover {
    background: var(--primary-color-hover);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(101, 163, 13, 0.3);
}

.share-btn {
    background: white;
    color: #475569;
}

.share-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e0;
    transform: translateY(-2px);
}

.source-btn {
    background: white;
    color: #475569;
}

.source-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e0;
    transform: translateY(-2px);
}

/* 정부과제용 토론 버튼 (테이블 내) */
.col-discuss {
    width: 100px;
    text-align: center;
}


/* 게시판 토론 배지 */
.discuss-badge {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-right: 0.5rem;
    vertical-align: middle;
}

/* 토론 게시글 배경색 */
.discussion-post {
    background: linear-gradient(90deg, #f0fdf4 0%, white 100%) !important;
}

/* 정부과제 카드용 토론 버튼 */
.gov-card .news-actions {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .action-btn {
        padding: 0.55rem 0.85rem;
        font-size: 0.8rem;
        gap: 0.3rem;
    }

    .discuss-btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    .news-actions {
        margin-top: 1rem;
        padding-top: 0.75rem;
        gap: 0.5rem;
        justify-content: center;
    }
}

/* Category Tab UI */
.category-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

.category-tab {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
    background: transparent;
    border: none;
    cursor: pointer;
    position: relative;
    transition: color 0.2s;
}

.category-tab:hover {
    color: var(--primary-color);
}

.category-tab.active {
    color: var(--primary-color);
}

.category-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-color);
}

@media (max-width: 768px) {
    .category-tabs {
        gap: 0;
    }

    .category-tab {
        flex: 1;
        text-align: center;
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
}

/* NEW Badge - Global Style */
.new-badge {
    display: inline-block;
    background-color: #ef4444;
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 3px;
    margin-left: 4px;
    vertical-align: middle;
}

/* ===================================
   RESPONSIVE STYLES - CONSOLIDATED
   =================================== */

/* --- TABLET BREAKPOINT (768px - 1023px) --- */
@media (min-width: 768px) and (max-width: 1023px) {
    .container {
        padding: 1.5rem 1rem;
    }

    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }

    .gnb a {
        font-size: 1rem;
    }

    .nav-links {
        gap: 1.5rem;
    }

    .news-image img {
        width: 180px;
    }
}

/* --- MOBILE BREAKPOINT (max-width: 767px) --- */
@media (max-width: 767px) {

    /* Base Typography - Ensure readable font sizes */
    body {
        font-size: 1rem;
        /* 16px base */
        line-height: 1.65;
    }

    /* Container */
    .container {
        padding: 1rem 0.75rem;
    }

    /* Header - Mobile Optimized */
    header {
        padding: 0.75rem 0;
        margin-bottom: 1rem;
    }

    .gnb {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
        padding: 0 0.75rem;
    }

    .logo-link {
        margin-right: 0;
        justify-content: center;
    }

    .header-logo {
        width: 50%;
        max-width: 180px;
        height: auto;
    }

    .header-right-section {
        width: 100%;
        gap: 0.75rem;
    }

    /* Navigation - Horizontal Scroll */
    .nav-links {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        gap: 0;
        padding: 0.5rem 0;
        border-top: 1px solid var(--border-color);
        justify-content: flex-start;
    }

    .nav-links::-webkit-scrollbar {
        display: none;
    }

    .nav-links a {
        flex-shrink: 0;
        padding: 0.6rem 0.85rem;
        min-height: var(--touch-target-min);
        display: flex;
        align-items: center;
        font-size: 1rem;
        /* Increased from 0.9rem */
        white-space: nowrap;
    }

    .gnb a {
        font-size: 1rem;
        /* Increased from 0.9rem */
    }

    /* Slogan - Hide on Mobile */
    .slogan-container {
        display: none;
    }

    /* Dashboard Grid - Single Column */
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .dashboard-section {
        padding: 1rem;
    }

    .dashboard-section h2 {
        font-size: 1.2rem;
        /* Increased from 1.1rem */
    }

    /* Preview List - Readable text */
    .preview-list li {
        padding: 0.85rem 0;
        min-height: var(--touch-target-min);
    }

    .preview-list li a,
    .preview-title {
        font-size: 1rem;
        /* Ensure readable size */
        display: block;
        padding: 0.25rem 0;
        line-height: 1.5;
    }

    .preview-date {
        font-size: 0.9rem;
        /* Slightly smaller for meta info */
    }

    /* News Items */
    .news-item {
        padding: 1rem;
        margin-bottom: 0.75rem;
    }

    .news-body {
        flex-direction: column;
    }

    .news-image {
        width: 100%;
        order: -1;
        margin-bottom: 0.75rem;
    }

    .news-image img {
        width: 100%;
        max-height: 200px;
        object-fit: cover;
    }

    .news-title {
        font-size: 1.15rem;
        /* Increased from 1.1rem */
        line-height: 1.4;
    }

    .news-summary {
        font-size: 1rem;
        /* Increased from 0.95rem */
        padding: 0.5rem 0;
        line-height: 1.7;
    }

    .news-meta {
        font-size: 0.9rem;
        /* Meta info slightly smaller */
    }

    /* Tables - Card View */
    .table-responsive {
        border: none;
        background: transparent;
    }

    /* Touch-Friendly Buttons */
    .action-btn,
    .primary-btn,
    .ghost-btn {
        min-height: var(--touch-target-min);
        padding: 0.6rem 1rem;
        font-size: 1rem;
        /* Ensure readable button text */
    }

    .discuss-btn-sm {
        min-height: 36px;
        padding: 0.5rem 0.85rem;
        font-size: 0.9rem;
        /* Increased from 0.8rem */
    }

    /* Category Tabs - Full Width */
    .category-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .category-tabs::-webkit-scrollbar {
        display: none;
    }

    .category-tab {
        flex: none;
        padding: 0.75rem 1rem;
        min-height: var(--touch-target-min);
        font-size: 1rem;
        /* Ensure readable tab text */
    }

    /* Cards */
    .card {
        padding: 1rem;
        margin-bottom: 1rem;
        border-radius: 10px;
    }

    /* Modal */
    .modal-body {
        width: 95vw;
        max-height: 85vh;
    }

    /* Word Cloud */
    .wordcloud-section h3 {
        font-size: 1.1rem;
        /* Increased from 1rem */
    }

    /* Page Titles */
    .title-row {
        flex-direction: column;
        gap: 0.25rem;
    }

    h1 {
        font-size: 1.5rem;
        line-height: 1.3;
    }

    .subtitle,
    .title-desc {
        font-size: 0.95rem;
        /* Readable subtitle */
    }

    /* Eyebrow text */
    .eyebrow {
        font-size: 0.8rem;
    }

    /* Footer */
    footer {
        padding: 1.5rem 0.75rem;
        font-size: 0.85rem;
        /* Increased from 0.8rem */
    }

    /* Table text in card mode */
    .styled-table td,
    .styled-table th {
        font-size: 0.95rem;
    }

    /* Member news tiles */
    .tile-title {
        font-size: 1rem;
        /* Increased from 0.95rem */
    }

    .tile-meta {
        font-size: 0.85rem;
    }

    /* === MOBILE CONTENT WIDTH OPTIMIZATION === */

    /* Reduce container padding for more content space */
    .container {
        padding: 0.75rem 0.5rem;
    }

    /* News item - less padding for wider content */
    .news-item {
        padding: 0.75rem 0.5rem;
        margin-bottom: 0.5rem;
        border-radius: 8px;
    }

    /* Summary section title - reduce border width */
    .summary-section-title {
        font-size: 1rem;
        padding-left: 0.5rem;
        border-left: 3px solid var(--primary-color);
        border-bottom: none;
        margin-top: 0.6rem;
        margin-bottom: 0.3rem;
    }

    /* Summary list - reduce left padding for more text space */
    .summary-list {
        padding-left: 0.75rem;
        margin: 0;
    }

    .summary-list li {
        margin-bottom: 0.5rem;
        padding-left: 0.25rem;
    }

    /* Meaning box - reduce padding and border */
    .meaning-box {
        padding: 0.5rem 0.6rem;
        margin-top: 0.5rem;
        border-left-width: 3px;
        border-radius: 6px;
    }

    /* Highlight spans - less padding */
    .highlight {
        padding: 1px 3px;
    }

    /* News header - tighter layout */
    .news-header {
        margin-bottom: 0.5rem;
    }

    .news-header-top {
        gap: 0.5rem;
        margin-bottom: 0.35rem;
    }

    /* News meta - more compact */
    .news-meta {
        gap: 0.25rem;
    }

    /* News body - less gap */
    .news-body {
        gap: 0.75rem;
    }

    /* Page header - less margin */
    h1 {
        font-size: 1.35rem;
        margin-bottom: 0.5rem;
    }

    .subtitle {
        margin-bottom: 1rem;
        font-size: 0.85rem;
    }

    /* === GLOBAL CONTENT AREA SPACING === */

    /* All cards and content boxes - tighter padding */
    .card,
    .dashboard-section,
    .news-item,
    article {
        padding: 0.75rem !important;
    }

    /* All lists - reduced indentation */
    ul,
    ol {
        padding-left: 1rem;
    }

    li {
        margin-bottom: 0.4rem;
    }

    /* Section titles with left border */
    h2,
    h3,
    h4 {
        font-size: 1.1rem;
    }

    /* Paragraphs - tighter spacing */
    p {
        margin-bottom: 0.75rem;
    }

    /* Table responsive wrapper */
    .table-responsive {
        margin-bottom: 1rem;
    }

    /* Archive pages */
    .page-header {
        margin-bottom: 1rem;
    }
}