/* 자료실 — support/downloads.html (notice.html 톤 통일) */

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.downloads-page { overflow-x: hidden; }

.dl-container {
    width: min(1200px, 100% - 2.5rem);
    margin-inline: auto;
}

/* Hero — 레이아웃은 hero-unified.css */
.dl-hero-bg {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(115deg, rgba(6, 12, 24, 0.94) 0%, rgba(15, 39, 68, 0.9) 50%, rgba(6, 12, 24, 0.88) 100%),
        radial-gradient(ellipse 70% 80% at 85% 30%, rgba(16, 185, 129, 0.15), transparent 55%);
    pointer-events: none;
    z-index: 0;
}
.dl-hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 50% 60% at 15% 60%, rgba(37, 99, 235, 0.22), transparent 55%);
    pointer-events: none;
}
.dl-hero h1 {
    margin: 0 0 0.85rem;
    font-size: clamp(1.85rem, 4vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.2;
}
.dl-hero-lead {
    margin: 0;
    font-size: clamp(0.95rem, 2vw, 1.08rem);
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.7;
}

.dl-main { padding: 2.5rem 0 4.5rem; }

/* Featured */
.dl-section-title {
    margin: 0 0 1.25rem;
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}
.dl-featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2.5rem;
}
@media (max-width: 900px) {
    .dl-featured-grid { grid-template-columns: 1fr; }
}
.dl-featured-card {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.25s var(--ease-out), border-color 0.25s, transform 0.25s;
}
.dl-featured-card:hover {
    border-color: rgba(37, 99, 235, 0.25);
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}
.dl-featured-card.has-cover {
    padding: 0;
    overflow: hidden;
}
.dl-featured-cover {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #eef2f7;
    border-bottom: 1px solid var(--border);
}
.dl-featured-cover img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 35%;
}
.dl-featured-card.has-cover .dl-featured-title,
.dl-featured-card.has-cover .dl-featured-desc,
.dl-featured-card.has-cover .dl-featured-meta,
.dl-featured-card.has-cover .dl-featured-actions {
    margin-left: 1.5rem;
    margin-right: 1.5rem;
}
.dl-featured-card.has-cover .dl-featured-title {
    margin-top: 1.25rem;
}
.dl-featured-card.has-cover .dl-featured-actions {
    margin-bottom: 1.5rem;
}
.dl-file-icon {
    position: relative;
    width: 52px;
    height: 52px;
    margin-bottom: 1rem;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(124, 58, 237, 0.1));
    border: 1px solid rgba(37, 99, 235, 0.15);
    display: grid;
    place-items: center;
    font-size: 0.62rem;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: 0.02em;
}
.dl-file-icon::before {
    content: '';
    position: absolute;
    inset: 8px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 28' fill='none'%3E%3Cpath d='M4 2h11l5 5v19a2 2 0 01-2 2H4a2 2 0 01-2-2V4a2 2 0 012-2z' fill='%232563eb' fill-opacity='0.12' stroke='%232563eb' stroke-width='1.5'/%3E%3Cpath d='M15 2v6h6' stroke='%232563eb' stroke-width='1.5'/%3E%3Cpath d='M7 14h10M7 18h8' stroke='%232563eb' stroke-width='1.2' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
    pointer-events: none;
}
.dl-featured-card .dl-file-icon {
    font-size: 0;
}
.dl-featured-title {
    margin: 0 0 0.5rem;
    font-size: 1.02rem;
    font-weight: 700;
    line-height: 1.4;
}
.dl-featured-desc {
    margin: 0 0 1rem;
    flex: 1;
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.6;
}
.dl-featured-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.15rem;
    font-size: 0.82rem;
}
.dl-meta-date { color: var(--text-muted); }
.dl-featured-actions .btn { width: 100%; justify-content: center; }

/* Toolbar */
.dl-toolbar-card {
    padding: 1.25rem 1.35rem;
    margin-bottom: 1.5rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}
.dl-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
}
.dl-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.dl-filter {
    padding: 0.55rem 1rem;
    min-height: 44px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s, background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.dl-filter:hover {
    color: var(--text);
    border-color: rgba(37, 99, 235, 0.25);
}
.dl-filter.is-active {
    color: #fff;
    background: var(--accent);
    border-color: var(--accent);
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}
.dl-search { flex: 1 1 220px; max-width: 320px; }
.dl-search input {
    width: 100%;
    min-height: 44px;
    padding: 0.65rem 1rem 0.65rem 2.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg);
    font-family: inherit;
    font-size: 0.9rem;
}
.dl-search input:focus {
    outline: none;
    border-color: rgba(37, 99, 235, 0.45);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
.dl-search-wrap { position: relative; }
.dl-search-wrap::before {
    content: '⌕';
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

/* Badges */
.dl-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
}
.dl-badge--제품소개서 { background: rgba(37, 99, 235, 0.12); color: #1d4ed8; }
.dl-badge--매뉴얼 { background: rgba(124, 58, 237, 0.12); color: #6d28d9; }
.dl-badge--설치자료 { background: rgba(245, 158, 11, 0.15); color: #b45309; }
.dl-badge--기술문서 { background: rgba(16, 185, 129, 0.12); color: #047857; }
.dl-badge--업데이트 { background: rgba(59, 130, 246, 0.12); color: #1d4ed8; }
.dl-badge--기타 { background: rgba(92, 99, 112, 0.15); color: var(--text-muted); }

.dl-count {
    margin: 0 0 1rem;
    font-size: 0.88rem;
    color: var(--text-muted);
}
.dl-count strong { color: var(--text); }
.dl-fallback-note {
    margin: 0 0 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
    background: rgba(37, 99, 235, 0.08);
    border: 1px solid rgba(37, 99, 235, 0.15);
    color: var(--text-muted);
    font-size: 0.92rem;
}
.dl-fallback-note a { color: var(--accent); font-weight: 600; }

/* Table */
.dl-panel {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.dl-panel.is-empty .dl-table-wrap,
.dl-panel.is-empty .dl-cards { display: none; }
.dl-table-wrap { overflow-x: auto; }
.dl-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.dl-table thead th {
    padding: 0.95rem 1.15rem;
    text-align: left;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
    background: rgba(12, 13, 14, 0.03);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.dl-table tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background 0.2s;
}
.dl-table tbody tr:last-child { border-bottom: none; }
.dl-table tbody tr:hover { background: rgba(37, 99, 235, 0.04); }
.dl-table td {
    padding: 1rem 1.15rem;
    vertical-align: middle;
}
.dl-table .col-cat { width: 7rem; }
.dl-table .col-desc { min-width: 10rem; color: var(--text-muted); font-size: 0.85rem; }
.dl-table .col-format { width: 6.5rem; }
.dl-table .col-date { width: 7rem; color: var(--text-muted); font-size: 0.85rem; }
.dl-table .col-action { width: 9.5rem; text-align: right; }
.dl-table-title {
    display: block;
    font-weight: 600;
    color: var(--text);
    line-height: 1.4;
}
.dl-table-desc {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.82rem;
    color: var(--text-muted);
}
.dl-format {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
}
.dl-table-empty {
    text-align: center;
    padding: 2.5rem !important;
    color: var(--text-muted);
}

.btn.is-disabled {
    opacity: 0.65;
    cursor: not-allowed;
    pointer-events: none;
}

/* Cards mobile */
.dl-cards {
    display: none;
    flex-direction: column;
    gap: 0.85rem;
    padding: 1rem;
}
.dl-card {
    padding: 1.15rem 1.25rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: box-shadow 0.2s, border-color 0.2s;
}
.dl-card:hover {
    border-color: rgba(37, 99, 235, 0.2);
    box-shadow: var(--shadow-md);
}
.dl-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
}
.dl-card-title {
    margin: 0 0 0.35rem;
    font-size: 0.98rem;
    font-weight: 700;
}
.dl-card-desc {
    margin: 0 0 0.65rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.55;
}
.dl-card-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.85rem;
}
.dl-card-action { display: flex; justify-content: flex-end; }

.dl-empty {
    margin-top: 1.5rem;
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
    border: 1px dashed var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-elevated);
}
.dl-empty[hidden] { display: none; }

/* CTA box */
.dl-cta {
    margin-top: 2.5rem;
    padding: 2rem 2.25rem;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(124, 58, 237, 0.05));
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-sm);
}
.dl-cta h2 {
    margin: 0 0 0.65rem;
    font-size: 1.2rem;
    font-weight: 800;
}
.dl-cta p {
    margin: 0 0 1.35rem;
    color: var(--text-muted);
    line-height: 1.7;
    max-width: 520px;
    margin-inline: auto;
}
.dl-cta .btn-primary { min-height: 44px; padding-inline: 1.5rem; }

@media (max-width: 768px) {
    .dl-toolbar { flex-direction: column; align-items: stretch; }
    .dl-search { max-width: none; }
    .dl-filter { font-size: 0.8rem; padding-inline: 0.7rem; }
    .dl-table-wrap { display: none; }
    .dl-cards { display: flex; }
    .dl-table .col-action { text-align: left; }
}

@media (min-width: 769px) {
    .dl-cards { display: none !important; }
}
