/*
Theme Name: VPS Community
Theme URI: https://vps-community.ru/
Author: VPS Community
Description: Lightweight knowledge-base theme for VPS administration guides.
Version: 1.2.1
Requires at least: 6.6
Requires PHP: 8.2
Text Domain: vps-community
*/

:root {
  --bg: #07111f;
  --surface: #0e1b2e;
  --surface-2: #14243a;
  --text: #eaf1fb;
  --muted: #9fb0c7;
  --accent: #49d3a4;
  --accent-2: #69a9ff;
  --line: rgba(255, 255, 255, .1);
  --max: 1140px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background: radial-gradient(circle at 80% 0, #12305a 0, transparent 32rem), var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.7;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 100; padding: .75rem 1rem; color: #062117; background: var(--accent); border-radius: 8px; font-weight: 800; }
.skip-link:focus { top: 1rem; }
.wrap { width: min(calc(100% - 2rem), var(--max)); margin-inline: auto; }
.site-header { border-bottom: 1px solid var(--line); background: rgba(7, 17, 31, .82); backdrop-filter: blur(14px); position: sticky; top: 0; z-index: 10; }
.header-inner { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.brand { display: flex; align-items: center; gap: .75rem; color: var(--text); font-weight: 800; letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand-logo { display: block; width: 205px; height: auto; }
.site-nav { display: flex; flex-wrap: wrap; gap: 1.25rem; font-size: .94rem; }
.site-nav a { color: var(--muted); }
.hero { padding: clamp(4rem, 9vw, 8rem) 0 4rem; }
.eyebrow { color: var(--accent); text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; font-weight: 800; }
.hero h1 { max-width: 850px; margin: .65rem 0 1rem; font-size: clamp(2.6rem, 7vw, 5.4rem); line-height: .98; letter-spacing: -.055em; }
.hero p { max-width: 700px; color: var(--muted); font-size: 1.15rem; }
.search-form { display: flex; max-width: 680px; margin-top: 2rem; }
.search-field { flex: 1; min-width: 0; padding: 1rem 1.1rem; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 12px 0 0 12px; font: inherit; }
.search-submit { padding: 0 1.35rem; color: #062117; background: var(--accent); border: 0; border-radius: 0 12px 12px 0; font-weight: 800; cursor: pointer; }
.homepage-resource { margin-top: 1rem; font-size: .95rem !important; }
.section { padding: 2rem 0 5rem; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 1.5rem; }
.section-head h2, .archive-title { margin: 0; font-size: clamp(1.7rem, 4vw, 2.6rem); letter-spacing: -.035em; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.card { padding: 1.4rem; border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(145deg, rgba(20, 36, 58, .9), rgba(14, 27, 46, .72)); }
.card h2 { margin: .5rem 0 .6rem; font-size: 1.18rem; line-height: 1.32; }
.card h2 a { color: var(--text); }
.card p { margin: 0; color: var(--muted); font-size: .94rem; }
.meta { color: var(--muted); font-size: .8rem; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: 1.25rem; color: var(--muted); font-size: .84rem; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs [aria-current="page"] { overflow: hidden; max-width: 34rem; white-space: nowrap; text-overflow: ellipsis; }
.archive-description { max-width: 800px; margin: -1rem 0 2rem; color: var(--muted); }
.category-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-top: 2rem; }
.category-card { padding: 1.25rem; border: 1px solid var(--line); border-radius: 16px; background: rgba(14, 27, 46, .72); }
.category-card strong { display: block; color: var(--text); }
.category-card span { color: var(--muted); font-size: .9rem; }
.content-layout { display: grid; grid-template-columns: minmax(0, 760px) minmax(220px, 1fr); gap: 3rem; padding: 4rem 0; }
.article { min-width: 0; }
.article h1 { margin: .5rem 0 1rem; font-size: clamp(2rem, 5vw, 3.8rem); line-height: 1.05; letter-spacing: -.045em; }
.article-body { margin-top: 2rem; }
.article-body h2, .article-body h3 { margin-top: 2.3rem; line-height: 1.25; }
.article-body pre { overflow-x: auto; padding: 1rem; border: 1px solid var(--line); border-radius: 12px; background: #030a13; }
.article-body code { padding: .15rem .35rem; border-radius: 5px; background: #101f33; font-size: .9em; }
.article-body pre code { padding: 0; background: transparent; }
.article-body blockquote { margin-left: 0; padding-left: 1.2rem; color: var(--muted); border-left: 3px solid var(--accent); }
.related-guides { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.related-guides h2 { margin-top: 0; }
.related-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.related-grid article { padding: 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.article-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--line); font-size: .92rem; }
.article-nav div:last-child { text-align: right; }
.empty-state { max-width: 680px; padding: 2rem; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.editorial-note { margin: 2rem 0; padding: 1.25rem 1.35rem; color: var(--text); border: 1px solid rgba(73, 211, 164, .35); border-radius: 14px; background: rgba(73, 211, 164, .07); }
.editorial-note p:first-child { margin-top: 0; }
.editorial-note p:last-child, .editorial-note ul:last-child, .editorial-note pre:last-child { margin-bottom: 0; }
.editorial-note h3 { margin: 1.2rem 0 .5rem; font-size: 1rem; }
.sidebar { align-self: start; position: sticky; top: 100px; padding: 1.25rem; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.sidebar h2 { margin-top: 0; font-size: 1rem; }
.sidebar ul { margin: 0; padding-left: 1.1rem; }
.pagination { margin-top: 2rem; }
.site-footer { padding: 2rem 0; color: var(--muted); border-top: 1px solid var(--line); font-size: .9rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 1rem; }

@media (max-width: 820px) {
  .grid, .category-grid { grid-template-columns: 1fr 1fr; }
  .content-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .site-nav { display: none; }
}
@media (max-width: 540px) {
  .grid, .category-grid, .related-grid, .article-nav { grid-template-columns: 1fr; }
  .article-nav div:last-child { text-align: left; }
  .footer-inner { display: block; }
}
