/*
Theme Name: Soft4You
Theme URI: https://soft-4-you.ru
Author: Soft4You
Description: Ультрабыстрая тема для каталога программного обеспечения. Оптимизирована под плагин WP-AutoParser AI.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: soft4you
License: GPL-2.0-or-later
*/

/* ========== CSS Variables ========== */
:root {
    --color-bg: #f5f7fa;
    --color-surface: #ffffff;
    --color-primary: #2563eb;
    --color-primary-hover: #1d4ed8;
    --color-primary-light: #eff6ff;
    --color-text: #1e293b;
    --color-text-secondary: #64748b;
    --color-border: #e2e8f0;
    --color-success: #16a34a;
    --color-success-hover: #15803d;
    --color-star: #f59e0b;
    --color-tag-bg: #f1f5f9;
    --color-tag-text: #475569;
    --color-windows: #0078d4;
    --color-android: #3ddc84;
    --color-ios: #333333;
    --color-linux: #e95420;
    --color-macos: #a2aaad;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,.08);
    --shadow-lg: 0 8px 30px rgba(0,0,0,.12);
    --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --max-width: 1200px;
    --header-height: 60px;
}

/* ========== Reset & Base ========== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font-main);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--color-primary-hover); }
ul, ol { list-style: none; }
h1, h2, h3, h4, h5, h6 { line-height: 1.3; font-weight: 700; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.15rem; }

/* ========== Utilities ========== */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 16px; width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ========== Header ========== */
.site-header {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-height);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
    gap: 16px;
}
.site-logo {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--color-text);
    white-space: nowrap;
    display: flex;
    align-items: center;
    letter-spacing: -.5px;
}
.site-logo span { color: var(--color-primary); }
.site-logo:hover { color: var(--color-text); }

/* Navigation */
.main-nav ul {
    display: flex;
    gap: 4px;
    align-items: center;
}
.main-nav a {
    display: block;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    color: var(--color-text);
    font-size: .95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .3px;
    transition: background .2s, color .2s;
}
.main-nav a:hover,
.main-nav .current-menu-item > a {
    background: var(--color-primary-light);
    color: var(--color-primary);
}

/* Mobile menu */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--color-text);
}
.menu-toggle svg { width: 24px; height: 24px; }

/* Header search */
.header-search {
    position: relative;
    width: 240px;
}
.header-search input {
    width: 100%;
    padding: 8px 36px 8px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: .875rem;
    background: var(--color-bg);
    color: var(--color-text);
    transition: border-color .2s;
}
.header-search input:focus {
    outline: none;
    border-color: var(--color-primary);
}
.header-search button {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: var(--color-text-secondary);
}

/* ========== Hero Section ========== */
.hero {
    background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%);
    padding: 56px 0 48px;
    color: #fff;
    text-align: center;
}
.hero h1 {
    font-size: 2rem;
    margin-bottom: 8px;
    font-weight: 800;
}
.hero p {
    font-size: 1.05rem;
    opacity: .85;
    margin-bottom: 24px;
}
.hero-search {
    max-width: 560px;
    margin: 0 auto;
    position: relative;
}
.hero-search input {
    width: 100%;
    padding: 14px 50px 14px 20px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    box-shadow: var(--shadow-lg);
    color: var(--color-text);
}
.hero-search input:focus { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.hero-search button {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--color-primary);
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
}
.hero-search button:hover { background: var(--color-primary-hover); }

/* Platform pills */
.platform-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}
.platform-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    border-radius: 50px;
    background: rgba(255,255,255,.15);
    color: #fff;
    font-size: .85rem;
    font-weight: 500;
    transition: background .2s;
    backdrop-filter: blur(4px);
}
.platform-pill:hover { background: rgba(255,255,255,.25); color: #fff; }

/* ========== Section ========== */
.section {
    padding: 40px 0;
}
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 12px;
}
.section-title {
    font-size: 1.35rem;
    display: flex;
    align-items: center;
    gap: 8px;
}
.section-title .icon { font-size: 1.5rem; }
.section-link {
    font-size: .875rem;
    font-weight: 500;
    white-space: nowrap;
}

/* ========== Software Card Grid ========== */
.soft-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}
.soft-card {
    background: var(--color-surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    overflow: hidden;
    transition: box-shadow .2s, transform .15s;
    display: flex;
    flex-direction: column;
}
.soft-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.soft-card-thumb {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--color-bg);
    position: relative;
}
.soft-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.soft-card-platform {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 2px 10px;
    border-radius: 50px;
    font-size: .7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #fff;
}
.platform-windows { background: var(--color-windows); }
.platform-android { background: var(--color-android); color: #000; }
.platform-ios { background: var(--color-ios); }
.platform-linux { background: var(--color-linux); }
.platform-macos { background: var(--color-macos); color: #000; }

/* Platform tags used inline (soft-header, cards) */
.soft-tag.platform-windows { background: var(--color-windows); color: #fff; }
.soft-tag.platform-android { background: var(--color-android); color: #000; }
.soft-tag.platform-ios { background: var(--color-ios); color: #fff; }
.soft-tag.platform-linux { background: var(--color-linux); color: #fff; }
.soft-tag.platform-macos { background: #555; color: #fff; }

.soft-card-body {
    padding: 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.soft-card-title {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.soft-card-title a { color: var(--color-text); }
.soft-card-title a:hover { color: var(--color-primary); }
.soft-card-desc {
    font-size: .88rem;
    color: var(--color-text-secondary);
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}
.soft-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: .82rem;
    color: var(--color-text-secondary);
}
.soft-card-rating { display: flex; align-items: center; gap: 4px; }
.star { color: var(--color-star); }
.soft-card-version {
    background: var(--color-tag-bg);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-weight: 500;
}

/* ========== Single Software Page ========== */
.single-soft {
    padding: 32px 0 48px;
}
.single-soft-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
    align-items: start;
}

/* Main content */
.soft-main {
    min-width: 0;
}
.soft-header {
    background: var(--color-surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    padding: 24px;
    margin-bottom: 20px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
}
.soft-icon {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-md);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--color-bg);
}
.soft-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.soft-header-info { flex: 1; min-width: 0; }
.soft-header-info h1 {
    font-size: 1.5rem;
    margin-bottom: 4px;
    word-wrap: break-word;
}
.soft-short-desc {
    color: var(--color-text-secondary);
    font-size: .9rem;
    margin-bottom: 10px;
}
.soft-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.soft-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 50px;
    background: var(--color-tag-bg);
    color: var(--color-tag-text);
    font-size: .75rem;
    font-weight: 500;
}
.soft-tag.active {
    background: var(--color-primary);
    color: #fff;
}
.btn-outline {
    display: inline-block;
    padding: 8px 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text);
    background: transparent;
    text-align: center;
    cursor: pointer;
    transition: background .2s, color .2s;
}
.btn-outline:hover {
    background: var(--color-primary-light);
    color: var(--color-primary);
}

/* Content blocks */
.soft-content-block {
    background: var(--color-surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    padding: 24px;
    margin-bottom: 20px;
}
.soft-content-block h2 {
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--color-border);
}
.soft-content-block p { margin-bottom: 12px; }
.soft-content-block ul,
.soft-content-block ol {
    margin: 0 0 12px 20px;
    list-style: disc;
}
.soft-content-block ol { list-style: decimal; }
.soft-content-block li { margin-bottom: 4px; }
.soft-content-block pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 16px;
    border-radius: var(--radius-sm);
    overflow-x: auto;
    margin-bottom: 12px;
    font-size: .85rem;
    line-height: 1.5;
}
.soft-content-block img {
    border-radius: var(--radius-sm);
    margin: 12px 0;
}

/* Screenshots gallery */
.screenshots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}
.screenshots-grid a {
    display: block;
    border-radius: var(--radius-sm);
    overflow: hidden;
    aspect-ratio: 16/10;
    background: var(--color-bg);
}
.screenshots-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s;
}
.screenshots-grid a:hover img { transform: scale(1.03); }

/* Sidebar */
.soft-sidebar {
    position: sticky;
    top: calc(var(--header-height) + 16px);
}
.sidebar-card {
    background: var(--color-surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    padding: 20px;
    margin-bottom: 16px;
}
.sidebar-card h3 {
    margin-bottom: 14px;
    font-size: 1rem;
}

/* Download bar (under header) */
.soft-download-bar {
    background: var(--color-surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    padding: 20px 24px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
}
.soft-download-bar .btn-download {
    flex-shrink: 0;
    margin-bottom: 0;
    width: auto;
    min-width: 220px;
}
.soft-download-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: .85rem;
    color: var(--color-text-secondary);
}
.soft-download-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    background: var(--color-tag-bg);
    border-radius: var(--radius-sm);
    font-weight: 500;
}

/* Download button */
.btn-download {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 24px;
    background: var(--color-success);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: background .2s, transform .1s;
    text-align: center;
    margin-bottom: 12px;
}
.btn-download:hover { background: var(--color-success-hover); color: #fff; transform: translateY(-1px); }
.btn-download:active { transform: translateY(0); }
.btn-download svg { width: 20px; height: 20px; }

/* Specs table */
.specs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .85rem;
}
.specs-table tr { border-bottom: 1px solid var(--color-border); }
.specs-table tr:last-child { border-bottom: none; }
.specs-table td { padding: 8px 0; }
.specs-table td:first-child {
    color: var(--color-text-secondary);
    white-space: nowrap;
    padding-right: 12px;
    width: 40%;
}
.specs-table td:last-child {
    font-weight: 500;
    word-break: break-word;
}

/* Rating display */
.rating-display {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}
.rating-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--color-primary);
}
.rating-stars { display: flex; gap: 2px; color: var(--color-star); }
.rating-stars .empty { color: var(--color-border); }

/* Related posts */
.related-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}
.related-item {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: background .2s;
}
.related-item:hover { background: var(--color-bg); }
.related-item-thumb {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--color-bg);
}
.related-item-thumb img { width: 100%; height: 100%; object-fit: cover; }
.related-item-title {
    font-size: .8rem;
    font-weight: 600;
    color: var(--color-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ========== Download Page ========== */
.download-page {
    padding: 60px 0;
    text-align: center;
    min-height: 60vh;
    display: flex;
    align-items: center;
}
.download-box {
    max-width: 520px;
    margin: 0 auto;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    padding: 40px;
    box-shadow: var(--shadow-md);
}
.download-box h1 {
    font-size: 1.3rem;
    margin-bottom: 8px;
}
.download-box p {
    color: var(--color-text-secondary);
    margin-bottom: 24px;
}
.download-timer {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 4px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-primary);
    position: relative;
}
.download-timer-ring {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 4px solid transparent;
    border-top-color: var(--color-primary);
    animation: timer-spin 1s linear infinite;
}
@keyframes timer-spin { to { transform: rotate(360deg); } }
.download-timer.done { border-color: var(--color-success); color: var(--color-success); }
.download-timer.done .download-timer-ring { display: none; }

.btn-download-final {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 40px;
    background: var(--color-success);
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: background .2s, transform .1s;
    margin: 0 auto;
}
.btn-download-final.visible { display: inline-flex; }
.btn-download-final:hover { background: var(--color-success-hover); color: #fff; transform: translateY(-1px); }

.download-note {
    margin-top: 20px;
    font-size: .8rem;
    color: var(--color-text-secondary);
}

/* ========== Archive ========== */
.archive-header {
    padding: 32px 0 8px;
}
.archive-header h1 { margin-bottom: 4px; }
.archive-header p { color: var(--color-text-secondary); }

.archive-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 24px;
    align-items: start;
}
.archive-sidebar {
    position: sticky;
    top: calc(var(--header-height) + 16px);
}
.sidebar-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.sidebar-list li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 10px;
    border-radius: var(--radius-sm);
    color: var(--color-text);
    font-size: .95rem;
    transition: background .2s, color .2s;
}
.sidebar-list li a:hover,
.sidebar-list li.active a {
    background: var(--color-primary-light);
    color: var(--color-primary);
}
.sidebar-count {
    font-size: .8rem;
    color: var(--color-text-secondary);
    background: var(--color-tag-bg);
    padding: 1px 7px;
    border-radius: 50px;
    font-weight: 600;
}

/* --- Category accordion --- */
.cat-parent-row {
    display: flex;
    align-items: center;
}
.cat-parent-row > a {
    flex: 1;
    min-width: 0;
}
.cat-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    background: none;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: transform .25s, color .2s, background .2s;
}
.cat-toggle:hover {
    background: var(--color-tag-bg);
    color: var(--color-text);
}
.cat-parent.open > .cat-parent-row .cat-toggle {
    transform: rotate(180deg);
}
.cat-children {
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding-left: 14px;
    margin-top: 2px;
    border-left: 2px solid var(--color-border);
}
.cat-children li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 10px;
    border-radius: var(--radius-sm);
    color: var(--color-text);
    font-size: .9rem;
    transition: background .2s, color .2s;
}
.cat-children li a:hover,
.cat-children li.active a {
    background: var(--color-primary-light);
    color: var(--color-primary);
}

.archive-content {
    min-width: 0;
}

/* ========== Search Results ========== */
.search-header {
    padding: 32px 0 8px;
}

/* ========== Breadcrumbs ========== */
.breadcrumbs {
    padding: 12px 0 12px 16px;
    font-size: .84rem;
    color: var(--color-text-secondary);
}
.breadcrumbs a { color: var(--color-text-secondary); }
.breadcrumbs a:hover { color: var(--color-primary); }
.breadcrumbs span { margin: 0 6px; }

/* ========== Pagination ========== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 4px;
    padding: 32px 0;
}
.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: var(--radius-sm);
    font-size: .875rem;
    font-weight: 500;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-text-secondary);
    transition: all .2s;
}
.pagination a:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}
.pagination .current {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

/* ========== Footer ========== */
.site-footer {
    margin-top: auto;
    background: #1e293b;
    color: #94a3b8;
    padding: 48px 0 0;
    font-size: .85rem;
}
.footer-top {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 32px;
    border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer-brand p {
    margin-top: 8px;
    color: #94a3b8;
    font-size: .85rem;
    line-height: 1.5;
}
.footer-logo {
    font-size: 1.4rem;
    font-weight: 900;
    color: #fff;
    letter-spacing: -.5px;
}
.footer-logo span { color: var(--color-primary); }
.footer-logo:hover { color: #fff; }
.footer-menus {
    display: contents;
}
.footer-menu-col h4 {
    color: #fff;
    font-size: .9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 16px;
}
.footer-menu-col ul {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.footer-menu-col a {
    color: #94a3b8;
    transition: color .2s;
    font-size: .85rem;
}
.footer-menu-col a:hover { color: #fff; }
.footer-bottom {
    padding: 20px 0;
    text-align: center;
    color: #64748b;
    font-size: .8rem;
}

/* ========== Lightbox ========== */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,.85);
    align-items: center;
    justify-content: center;
    padding: 20px;
    cursor: zoom-out;
}
.lightbox.active { display: flex; }
.lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: var(--radius-sm);
    cursor: default;
}
.lightbox-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
}

/* ========== 404 ========== */
.page-404 {
    text-align: center;
    padding: 80px 0;
}
.page-404 h1 { font-size: 4rem; color: var(--color-primary); margin-bottom: 8px; }
.page-404 p { color: var(--color-text-secondary); margin-bottom: 24px; }

/* ========== Responsive ========== */
@media (max-width: 960px) {
    .single-soft-layout {
        grid-template-columns: 1fr;
    }
    .soft-sidebar {
        position: static;
    }
    .soft-download-bar {
        flex-direction: column;
        text-align: center;
    }
    .footer-top {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .archive-layout {
        grid-template-columns: 1fr;
    }
    .archive-sidebar {
        position: static;
        order: 2;
    }
    .archive-content {
        order: 1;
    }
}

@media (max-width: 768px) {
    .header-search { display: none; }
    .menu-toggle { display: block; }
    .main-nav {
        display: none;
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--color-surface);
        border-bottom: 1px solid var(--color-border);
        box-shadow: var(--shadow-md);
        padding: 8px;
    }
    .main-nav.open { display: block; }
    .main-nav ul { flex-direction: column; }
    .main-nav a { padding: 10px 16px; }
    .hero h1 { font-size: 1.5rem; }
    .soft-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
    .soft-header { flex-direction: column; align-items: center; text-align: center; }
    .soft-tags { justify-content: center; }
    .screenshots-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
    .section { padding: 24px 0; }
}

@media (max-width: 480px) {
    .soft-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .soft-card-body { padding: 10px; }
    .soft-card-desc { display: none; }
    .platform-pills { gap: 4px; }
    .platform-pill { font-size: .75rem; padding: 4px 10px; }
}
