/* socialsystems.ru — main stylesheet
   Inspired by rostec.ru palette & layout.
   No frameworks. Single file.
*/

:root {
  --bg-page: #ffffff;
  --bg-soft: #f5f6f8;
  --bg-dark: #1a1a1a;
  --bg-darker: #111;
  --bg-card: #ffffff;
  --primary: #0041a0;
  --primary-dark: #003278;
  --accent: #e31e24;
  --text: #1d1d1f;
  --text-muted: #6b7280;
  --text-light: #ffffff;
  --border: #e5e7eb;
  --border-strong: #c8ccd2;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow-md: 0 4px 16px rgba(0,0,0,.08);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.12);
  --max-w: 1280px;
  --gap: 24px;
  --radius: 4px;
  --transition: .2s ease;
  --font-base: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-base);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); text-decoration: underline; }
h1, h2, h3, h4 { font-weight: 600; line-height: 1.25; margin: 0 0 .5em; color: var(--text); }
h1 { font-size: 36px; }
h2 { font-size: 28px; }
h3 { font-size: 22px; }
h4 { font-size: 18px; }
p { margin: 0 0 1em; }
hr { border: 0; border-top: 1px solid var(--border); margin: 32px 0; }
ul, ol { padding-left: 1.4em; margin: 0 0 1em; }
li { margin-bottom: .35em; }
table { border-collapse: collapse; width: 100%; margin: 1em 0; }
th, td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border); }
th { background: var(--bg-soft); font-weight: 600; }

/* --- layout helpers --- */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.section { padding: 56px 0; }
.section-tight { padding: 32px 0; }
.section-dark { background: var(--bg-dark); color: var(--text-light); }
.section-dark h1, .section-dark h2, .section-dark h3, .section-dark h4 { color: var(--text-light); }
.section-soft { background: var(--bg-soft); }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }

/* --- header (top bar + nav) --- */
.topbar {
  background: var(--bg-darker);
  color: #b3b3b3;
  font-size: 13px;
  border-bottom: 1px solid #2a2a2a;
}
.topbar a { color: #b3b3b3; }
.topbar a:hover { color: #fff; }
.topbar .container { display: flex; align-items: center; justify-content: space-between; min-height: 36px; gap: 16px; }
.topbar .topbar-left, .topbar .topbar-right { display: flex; gap: 20px; align-items: center; }
.topbar .badge { color: var(--accent); }

.header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .3s ease, background .3s ease;
}
.header .container { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 24px; transition: min-height .3s ease; }
.header.scrolled { box-shadow: var(--shadow-md); background: rgba(255,255,255,.97); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.header.scrolled .container { min-height: 52px; }
.logo { display: flex; align-items: center; gap: 14px; flex-shrink: 0; transition: gap .3s ease; }
.logo-mark {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 20px; letter-spacing: -0.5px;
  transition: width .3s ease, height .3s ease, font-size .3s ease;
}
.logo-text { font-size: 14px; line-height: 1.2; transition: font-size .3s ease; }
.logo-text .logo-name { font-weight: 700; color: var(--text); display: block; }
.logo-text .logo-sub { color: var(--text-muted); font-size: 12px; transition: font-size .3s ease; }
.header.scrolled .logo { gap: 10px; }
.header.scrolled .logo-mark { width: 36px; height: 36px; font-size: 16px; }
.header.scrolled .logo-text { font-size: 13px; }
.header.scrolled .logo-text .logo-sub { font-size: 11px; }

.desktop-nav ul { list-style: none; padding: 0; margin: 0; display: flex; gap: 2px; align-items: center; }
.desktop-nav li > a, .desktop-nav li > span {
  display: block; padding: 20px 14px; color: var(--text); font-weight: 500; font-size: 15px;
  text-decoration: none; transition: color var(--transition);
  border-bottom: 2px solid transparent; cursor: pointer;
}
.desktop-nav li > a:hover, .desktop-nav li.active > a { color: var(--primary); border-bottom-color: var(--primary); }
.header.scrolled .desktop-nav li > a { padding: 14px 12px; font-size: 14px; }

.main-nav { display: none; }
.main-nav > .mobile-nav-header { display: none; }
.main-nav > .nav-close { display: none; }
.main-nav ul { list-style: none; padding: 0; margin: 0 auto; display: flex; gap: 4px; justify-content: flex-end; flex-wrap: wrap; max-width: var(--max-w); padding: 0 24px; }
.main-nav li > a, .main-nav li > span {
  display: block; padding: 28px 14px; color: var(--text); font-weight: 500; font-size: 15px;
  text-decoration: none; transition: color var(--transition);
  border-bottom: 3px solid transparent;
  cursor: pointer;
}
.main-nav li > a:hover, .main-nav li.active > a { color: var(--primary); border-bottom-color: var(--primary); }

.has-submenu { position: relative; }
.has-submenu > .submenu {
  display: none; position: absolute; top: 100%; left: 0; min-width: 240px;
  background: #fff; box-shadow: var(--shadow-lg); border-radius: 0 0 var(--radius) var(--radius);
  list-style: none; padding: 12px 0; margin: 0; z-index: 100;
}
.has-submenu:hover > .submenu, .has-submenu:focus-within > .submenu { display: block; }
.has-submenu .submenu a { display: block; padding: 10px 20px; color: var(--text); font-weight: 400; font-size: 14px; border: 0; }
.has-submenu .submenu a:hover { background: var(--bg-soft); color: var(--primary); }

.has-submenu > a::after { content: '▾'; margin-left: 8px; font-size: 12px; display: inline-block; transition: transform .3s ease; vertical-align: middle; }
.has-submenu.submenu-open > a::after { transform: rotate(180deg); }

.nav-close { display: none; background: none; border: 0; color: #fff; font-size: 28px; cursor: pointer; padding: 0 4px; line-height: 1; opacity: .8; transition: opacity .15s; }
.nav-close:hover { opacity: 1; }

.burger { display: none; background: none; border: 0; padding: 8px; cursor: pointer; z-index: 210; position: relative; }
.burger-lines span { display: block; width: 18px; height: 2px; background: var(--text); margin: 3px 0; transition: transform .3s ease, opacity .3s ease; transform-origin: center; }
.burger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }
.burger-open-label { display: none; line-height: 1; }

.nav-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 199; opacity: 0; pointer-events: none; transition: opacity .3s ease; }
.nav-overlay.active { opacity: 1; pointer-events: auto; }

body.menu-open { overflow: hidden; }

/* --- contacts map --- */
.contacts-map {
  margin-bottom: 24px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.contacts-map iframe {
  display: block;
  width: 100%;
  height: 400px;
  border: 0;
}

/* --- breadcrumbs --- */
.breadcrumbs { padding: 18px 0; font-size: 13px; color: var(--text-muted); }
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs a:hover { color: var(--primary); }
.breadcrumbs .sep { margin: 0 8px; color: var(--border-strong); }

/* --- hero --- */
.hero {
  background: linear-gradient(135deg, var(--bg-darker) 0%, var(--primary-dark) 100%);
  color: var(--text-light);
  padding: 96px 0 80px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(circle at 80% 20%, rgba(255,255,255,.08), transparent 60%);
}
.hero h1 { color: #fff; font-size: 48px; max-width: 800px; }
.hero p { font-size: 20px; max-width: 700px; color: rgba(255,255,255,.85); margin-bottom: 32px; }
.hero .accent { color: #ff6b70; }
.hero .btn + .btn { margin-top: 8px; }

/* --- hero with image (2-col grid) --- */
.hero-with-image { padding: 64px 0 56px; }
.hero-with-image .container {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center;
  position: relative; z-index: 1;
}
.hero-with-image .hero-content { max-width: 560px; }
.hero-with-image h1 { color: #fff; font-size: 44px; margin: 0 0 16px; }
.hero-with-image .hero-lead { font-size: 18px; color: rgba(255,255,255,.85); line-height: 1.7; margin-bottom: 28px; }
.hero-with-image .hero-image-wrap {
  position: relative; border-radius: 8px; overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
  aspect-ratio: 16/10;
}
.hero-with-image .hero-image-wrap img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.hero-with-image .hero-image-wrap::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(0,65,160,.12) 0%, transparent 60%);
  pointer-events: none;
}
.hero-with-image.compact { padding: 56px 0 48px; }
.hero-with-image.compact .container { grid-template-columns: 1.4fr 1fr; }
.hero-with-image.compact .hero-image-wrap { aspect-ratio: 16/9; max-height: 260px; }
.hero-with-image.compact h1 { font-size: 36px; }

@media (max-width: 900px) {
  .hero-with-image .container { grid-template-columns: 1fr; gap: 24px; }
  .hero-with-image .hero-image-wrap { aspect-ratio: 16/9; max-height: 280px; }
  .hero-with-image h1 { font-size: 32px; }
  .hero-with-image.compact .container { grid-template-columns: 1fr; }
}

/* --- logo image (replacement for logo-mark) --- */
.logo-img {
  width: 48px; height: 48px; display: block; flex-shrink: 0;
  transition: width .3s ease, height .3s ease;
}
.header.scrolled .logo-img { width: 36px; height: 36px; }

/* --- direction cards with icon (replaces photo background) --- */
.dir-card-icon {
  display: block; position: relative; overflow: hidden;
  border-radius: var(--radius); color: var(--text);
  background: #fff; border: 1px solid var(--border);
  padding: 32px 28px; text-decoration: none;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  min-height: 200px;
}
.dir-card-icon:hover {
  transform: translateY(-3px); box-shadow: 0 12px 32px rgba(0,65,160,.12);
  border-color: var(--primary); text-decoration: none;
}
.dir-card-icon .dir-icon {
  width: 64px; height: 64px; margin-bottom: 18px;
  transition: transform .3s ease;
}
.dir-card-icon:hover .dir-icon { transform: scale(1.05); }
.dir-card-icon h3 { font-size: 22px; margin: 0 0 6px; color: var(--text); }
.dir-card-icon p { color: var(--text-muted); font-size: 14px; margin: 0 0 14px; line-height: 1.5; }
.dir-card-icon .dir-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 600; color: var(--primary);
  transition: color var(--transition), gap var(--transition);
}
.dir-card-icon .dir-link::after { content: '→'; transition: transform .2s; }
.dir-card-icon:hover .dir-link::after { transform: translateX(4px); }
.dir-card-icon .dir-accent {
  position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--primary); transform: scaleY(0); transform-origin: top;
  transition: transform .3s ease;
}
.dir-card-icon:hover .dir-accent { transform: scaleY(1); }

/* dir-card-icon variant: full-width icon area (used for /software/).
   Inherits all hover effects of .dir-card-icon (lift, blue shadow, accent bar).
   The icon takes the full card width as a 4:3 hero area; h3/p/link keep side padding. */
.dir-card-icon.dir-card-icon-wide {
  padding: 0 0 24px;
  min-height: 0;
}
.dir-card-icon.dir-card-icon-wide > img {
  display: block;
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  margin: 0 0 18px;
  border-radius: var(--radius) var(--radius) 0 0;
  transition: transform .3s ease;
}
.dir-card-icon.dir-card-icon-wide:hover > img { transform: scale(1.04); }
.dir-card-icon.dir-card-icon-wide h3 { padding: 0 24px; }
.dir-card-icon.dir-card-icon-wide p { padding: 0 24px; margin: 0 0 14px; }
.dir-card-icon.dir-card-icon-wide .dir-link { margin: 0 24px; }

/* --- about + image section --- */
.about-grid {
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: center;
  margin-top: 24px;
}
.about-grid .about-image {
  position: relative; border-radius: 8px; overflow: hidden;
  aspect-ratio: 4/3; box-shadow: var(--shadow-md);
}
.about-grid .about-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.about-grid .about-image::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(0,65,160,.2) 100%);
  pointer-events: none;
}
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; gap: 24px; }
  .about-grid .about-image { aspect-ratio: 16/10; }
}

/* --- decorative divider --- */
.section-divider {
  display: flex; align-items: center; gap: 16px;
  margin: 0 0 32px; padding-bottom: 16px;
  border-bottom: 3px solid var(--primary);
}
.section-divider .accent-bar {
  width: 4px; height: 28px; background: var(--accent); flex-shrink: 0;
}
.section-divider h2 { font-size: 32px; margin: 0; padding: 0; border: 0; }

/* --- buttons (strict, rostec-style) --- */
.btn {
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 28px; font-weight: 600; font-size: 15px;
  background: var(--accent); color: #fff; border-radius: var(--radius);
  text-decoration: none; cursor: pointer; border: 2px solid var(--accent);
  transform: translateY(0);
  transition:
    transform 250ms cubic-bezier(.4,0,.2,1),
    box-shadow 250ms cubic-bezier(.4,0,.2,1),
    background-color 250ms cubic-bezier(.4,0,.2,1),
    border-color 250ms cubic-bezier(.4,0,.2,1),
    color 250ms cubic-bezier(.4,0,.2,1);
  box-shadow: 0 1px 2px rgba(0,0,0,.08);
}
.btn::after {
  content: '\2192'; font-size: 18px; line-height: 1;
  display: inline-block; transform: translateX(0);
  transition: transform 250ms cubic-bezier(.4,0,.2,1);
}
.btn:hover {
  background: #c01a1f; border-color: #c01a1f; color: #fff; text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(227,30,36,.35);
}
.btn:hover::after { transform: translateX(6px); }
.btn:active { transform: translateY(0); box-shadow: 0 2px 6px rgba(227,30,36,.25); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.btn-secondary {
  background: transparent; color: #fff; border: 2px solid #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.08);
}
.btn-secondary::after { color: #fff; }
.btn-secondary:hover {
  background: #fff; color: var(--primary); border-color: #fff;
  box-shadow: 0 8px 20px rgba(0,65,160,.35);
}
.btn-secondary:hover::after { color: var(--primary); }
.btn-secondary:active { box-shadow: 0 2px 6px rgba(0,65,160,.25); }
.btn-secondary:focus-visible { outline-color: #fff; }

.btn-primary { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); box-shadow: 0 8px 20px rgba(0,65,160,.35); }
.btn-primary:active { box-shadow: 0 2px 6px rgba(0,65,160,.25); }
.btn-primary:focus-visible { outline-color: var(--primary); }

/* --- doc tables (gkTable2) --- */
.gkTable2 {
  border: 1px solid var(--border); border-radius: 8px; overflow: hidden;
  margin: 16px 0; box-shadow: 0 1px 3px rgba(0,0,0,.04);
  width: 100%;
}
.gkTable2 .gkTableColor td {
  background: var(--bg-soft); padding: 14px 18px; font-size: 15px;
  border-bottom: 1px solid var(--border);
}
.gkTable2 .odd td { background: #fff; }
.gkTable2 td { padding: 10px 18px; }
.gkTable2 td:last-child { width: 130px; white-space: nowrap; }

/* --- download buttons in doc tables --- */
.gkTable2 a[href$=".pdf"]::before { content: '\2B07\FE0F'; font-size: 12px; margin-right: 4px; }
.gkTable2 a[href$=".pdf"] {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 16px; font-weight: 600; font-size: 13px;
  background: var(--primary); color: #fff; border-radius: var(--radius);
  text-decoration: none; border: 2px solid var(--primary);
  transition: background-color 200ms, box-shadow 200ms, transform 200ms;
}
.gkTable2 a[href$=".pdf"]:hover {
  background: var(--primary-dark); border-color: var(--primary-dark);
  box-shadow: 0 4px 12px rgba(0,65,160,.3); transform: translateY(-1px);
  color: #fff; text-decoration: none;
}
.gkTable2 a[href$=".pdf"]:active { transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .btn, .btn::after { transition: background-color 100ms linear, color 100ms linear, border-color 100ms linear; }
  .btn:hover { transform: none; }
  .btn:hover::after { transform: none; }
  .card { transition: none; }
  .card:hover { transform: none; }
  .gallery img { transition: none; }
  .gallery a:hover img { transform: none; }
}
@media (hover: none) {
  .btn:hover { transform: none; }
  .btn:hover::after { transform: none; }
}

/* --- cards --- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 3px solid transparent;
  border-radius: 6px;
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  display: flex; flex-direction: column;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,.1); border-top-color: var(--primary); text-decoration: none; }
.card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 6px 6px 0 0; }
.card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.card-body h3 { font-size: 18px; margin: 0 0 8px; }
.card-body p { color: var(--text-muted); font-size: 14px; margin: 0 0 12px; }
.card-link { color: var(--primary); font-weight: 600; font-size: 14px; margin-top: auto; }

/* catalog cards — overlay style */
.catalog-card {
  display: block; position: relative; overflow: hidden;
  border-radius: 8px; color: #fff; text-decoration: none;
  aspect-ratio: 4/3;
}
.catalog-card img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; transition: transform .4s ease, opacity .4s ease;
}
.catalog-card::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.1) 0%, rgba(0,0,0,.75) 100%);
  transition: background .4s ease;
}
.catalog-card:hover { text-decoration: none; }
.catalog-card:hover img { transform: scale(1.05); opacity: .9; }
.catalog-card:hover::after { background: linear-gradient(180deg, rgba(0,65,160,.15) 0%, rgba(0,65,160,.8) 100%); }
.catalog-card-body {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 24px; z-index: 1;
}
.catalog-card-body h3 { font-size: 20px; margin: 0 0 6px; color: #fff; font-weight: 600; }
.catalog-card-body p { font-size: 14px; margin: 0; color: rgba(255,255,255,.85); line-height: 1.5; }
.catalog-card-link {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 12px; font-size: 13px; font-weight: 600;
  color: #fff; opacity: 0; transform: translateY(8px);
  transition: opacity .3s ease, transform .3s ease;
}
.catalog-card:hover .catalog-card-link { opacity: 1; transform: translateY(0); }
.catalog-card-link::after { content: '\2192'; transition: transform .2s; }
.catalog-card:hover .catalog-card-link::after { transform: translateX(4px); }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--gap);
}
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
}
.card-grid-2 { grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); }
.card-grid-3 { grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); }
.card-grid-4 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

/* direction cards (large) */
.dir-card {
  display: block; position: relative; overflow: hidden; border-radius: var(--radius);
  background: var(--bg-dark); aspect-ratio: 16/10; color: #fff;
}
.dir-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; transition: opacity .3s; }
.dir-card:hover img { opacity: .7; }
.dir-card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(0,0,0,.7) 100%); }
.dir-card .dir-content { position: absolute; left: 0; right: 0; bottom: 0; padding: 24px; z-index: 1; }
.dir-card h3 { color: #fff; font-size: 22px; margin: 0 0 4px; }
.dir-card p { color: rgba(255,255,255,.85); font-size: 14px; margin: 0; }

/* --- news --- */
.news-list { display: grid; gap: 0; }
.news-item {
  display: grid; grid-template-columns: 260px 1fr; gap: 24px;
  padding: 24px 0; border-bottom: 1px solid var(--border);
  transition: background .2s;
}
.news-item:hover { background: rgba(0,65,160,.02); }
.news-item:last-child { border-bottom: 0; }
.news-item .news-img {
  width: 260px; height: 160px; object-fit: cover;
  border-radius: 8px; background: var(--bg-soft);
  transition: transform .3s, box-shadow .3s;
}
.news-item:hover .news-img { transform: scale(1.02); box-shadow: 0 4px 16px rgba(0,0,0,.1); }
.news-item .news-date {
  display: inline-block; padding: 3px 10px; border-radius: 4px;
  background: var(--bg-soft); color: var(--text-muted); font-size: 12px;
  margin-bottom: 8px; font-weight: 500;
}
.news-item h3 { font-size: 18px; margin: 0 0 8px; line-height: 1.4; }
.news-item h3 a { color: var(--text); transition: color .2s; }
.news-item h3 a:hover { color: var(--primary); text-decoration: none; }
.news-item p { color: var(--text-muted); font-size: 14px; margin: 0; line-height: 1.6; }

.news-big {
  display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start;
  margin-bottom: 32px; padding-bottom: 32px; border-bottom: 1px solid var(--border);
}
.news-big .news-img { width: 100%; height: 360px; object-fit: cover; border-radius: var(--radius); }
.news-big .news-date { color: var(--text-muted); font-size: 14px; margin-bottom: 8px; }
.news-big h2 { font-size: 32px; margin: 0 0 12px; }
.news-big h2 a { color: var(--text); }
.news-big p { color: var(--text-muted); font-size: 16px; }

/* --- device detail page --- */
.device-hero {
  background: linear-gradient(135deg, var(--bg-darker) 0%, var(--primary-dark) 100%);
  color: var(--text-light); padding: 64px 0 56px; position: relative; overflow: hidden;
}
.device-hero::before {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(circle at 80% 20%, rgba(255,255,255,.06), transparent 60%);
}
.device-hero .container { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; position: relative; z-index: 1; }
.device-hero h1 { font-size: 44px; margin: 0 0 12px; color: #fff; }
.device-hero .device-sku {
  display: inline-block; padding: 4px 12px; border-radius: 4px;
  background: rgba(255,255,255,.12); color: rgba(255,255,255,.8);
  font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase;
  margin-bottom: 16px; font-weight: 500;
}
.device-hero .device-summary { font-size: 17px; color: rgba(255,255,255,.8); line-height: 1.7; }
.device-hero img { width: 100%; max-width: 440px; margin: 0 auto; border-radius: 8px; }

/* section tabs (non-sticky) */
.device-tabs {
  background: #fff; border-bottom: 1px solid var(--border);
}
.device-tabs .container { display: flex; gap: 0; overflow-x: auto; }
.device-tabs a {
  display: block; padding: 14px 20px;
  color: var(--text-muted); font-size: 14px; font-weight: 500;
  text-decoration: none; white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}
.device-tabs a:hover { color: var(--primary); text-decoration: none; }
.device-tabs a.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }

/* anchor offset */
.device-section { scroll-margin-top: 20px; }

.device-specs table {
  border: none; border-radius: 8px; overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.device-specs th {
  width: 45%; border-bottom: 1px solid var(--border);
  font-weight: 600; color: var(--text);
  background: var(--bg-soft);
}
.device-specs td { border-bottom: 1px solid var(--border); }
.device-specs tr:nth-child(even) th,
.device-specs tr:nth-child(even) td { background: rgba(0,65,160,.02); }
.device-specs tr:last-child th,
.device-specs tr:last-child td { border-bottom: none; }
.device-specs tr:hover th,
.device-specs tr:hover td { background: rgba(0,65,160,.05); }

.gallery { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin: 16px 0; }
.gallery a { display: block; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--border); transition: transform var(--transition); }
.gallery a:hover img { transform: scale(1.04); }

/* --- listing description --- */
.listing-desc {
  font-size: 17px; line-height: 1.7; color: var(--text-muted);
  max-width: 760px; margin: 0 0 40px;
  padding-left: 20px; border-left: 3px solid var(--primary);
}

/* --- news detail --- */
.news-hero-date {
  display: inline-block; padding: 4px 12px; border-radius: 4px;
  background: rgba(255,255,255,.12); color: rgba(255,255,255,.8);
  font-size: 13px; letter-spacing: .5px;
  margin-bottom: 12px; font-weight: 500;
}
.news-detail-img {
  margin-bottom: 32px; border-radius: 8px; overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,.1);
}
.news-detail-img img { width: 100%; max-height: 480px; object-fit: cover; }
.article-body img { border-radius: 6px; margin: 16px auto; }
/* alignment для картинки в <p class="ql-align-*"> (Quill WYSIWYG) */
.article-body p.ql-align-left   > img { display: block; margin: 16px auto 16px 0; }
.article-body p.ql-align-center  > img { display: block; margin: 16px auto; }
.article-body p.ql-align-right  > img { display: block; margin: 16px 0 16px auto; }

.section-title {
  font-size: 32px; margin: 0 0 32px; padding-bottom: 16px;
  border-bottom: 3px solid var(--primary); display: inline-block;
}
.section-title small { color: var(--text-muted); font-size: 16px; font-weight: 400; display: block; margin-top: 4px; }

/* --- project sections --- */
.project-section {
  background: var(--bg-soft);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}
.project-section h3 {
  font-size: 18px;
  margin: 0 0 12px;
  color: var(--primary);
  text-transform: none;
  font-weight: 600;
}
.project-section-body p { margin: 0 0 8px; }
.project-section-body p:last-child { margin-bottom: 0; }
.project-section-body a { font-weight: 600; }
.project-section .section-banner { margin: 0 0 16px; border-radius: var(--radius); overflow: hidden; background: var(--bg-soft); aspect-ratio: 16/9; }
.project-section .section-banner img { width: 100%; height: 100%; display: block; object-fit: cover; }

/* --- footer --- */
.footer {
  background: var(--bg-darker); color: #aaa; padding: 56px 0 24px;
}
.footer a { color: #ccc; }
.footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.footer h4 { color: #fff; font-size: 15px; margin: 0 0 16px; text-transform: uppercase; letter-spacing: .5px; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer ul li { margin-bottom: 8px; }
.footer .footer-about p { font-size: 14px; line-height: 1.7; }
.footer .footer-bottom { margin-top: 40px; padding-top: 24px; border-top: 1px solid #2a2a2a; font-size: 13px; color: #777; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; }

/* --- tags --- */
.tag {
  display: inline-block; padding: 3px 10px; background: var(--bg-soft); color: var(--text-muted);
  border-radius: 12px; font-size: 12px; margin-right: 4px; text-decoration: none;
}
.tag:hover { background: var(--primary); color: #fff; text-decoration: none; }
.tag.tag-accent { background: var(--accent); color: #fff; }

/* --- filters --- */
.filters { margin: 0 0 24px; display: flex; gap: 8px; flex-wrap: wrap; }
.filter-btn {
  padding: 6px 14px; background: var(--bg-soft); color: var(--text);
  border: 1px solid var(--border); border-radius: 20px; cursor: pointer; font-size: 14px;
  transition: all var(--transition);
}
.filter-btn:hover, .filter-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* --- alert/note --- */
.note { padding: 16px 20px; background: #fff8e1; border-left: 4px solid #ffc107; margin: 16px 0; font-size: 14px; }

/* --- responsive --- */
@media (max-width: 1100px) {
  .topbar, .header { display: none; }
  .desktop-nav { display: none; }
  .burger { display: flex; align-items: center; justify-content: center; position: fixed; top: 12px; right: 12px; z-index: 210; width: 44px; height: 44px; background: var(--primary); border-radius: 12px; border: 0; cursor: pointer; padding: 0; box-shadow: 0 2px 8px rgba(0,65,160,.3); }
  .burger-lines { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; }
  .burger-lines span { display: block; width: 18px; height: 2px; background: #fff; flex-shrink: 0; margin: 0; }
  .burger-open-label { display: none; color: #fff; }
  .burger.open .burger-lines { display: none !important; }
  .burger.open .burger-open-label { display: block !important; }
  .main-nav { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: #fff; z-index: 200; padding: 0; overflow-y: auto; flex-direction: column; }
  .main-nav.open { display: flex; }
  .mobile-nav-header { display: flex; align-items: center; justify-content: space-between; padding: 0 16px; height: 52px; border-bottom: 1px solid var(--border); background: linear-gradient(135deg, var(--bg-darker) 0%, var(--primary-dark) 100%); color: #fff; flex-shrink: 0; }
  .mobile-nav-title { font-size: 17px; font-weight: 700; letter-spacing: .3px; }
  .nav-close { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; background: rgba(255,255,255,.12); border: 0; color: #fff; border-radius: 8px; font-size: 20px; cursor: pointer; }
  .nav-close:hover { background: rgba(255,255,255,.2); }
  .main-nav ul { list-style: none; flex-direction: column; align-items: stretch; gap: 0; padding: 4px 0; max-width: none; margin: 0; }
  .main-nav li > a, .main-nav li > span { display: block; padding: 14px 20px; border: 0; font-size: 16px; font-weight: 500; color: var(--text); text-decoration: none; transition: background .15s, color .15s; margin: 0 8px; border-radius: 8px; cursor: pointer; }
  .main-nav li > a:hover, .main-nav li.active > a { background: rgba(0,65,160,.06); color: var(--primary); text-decoration: none; }
  .has-submenu > .submenu { position: static; box-shadow: none; padding: 0; max-height: 0; overflow: hidden; transition: max-height .3s ease; display: block; background: transparent; min-width: 0; border-radius: 0; list-style: none; }
  .has-submenu.submenu-open > .submenu { max-height: 500px; }
  .has-submenu .submenu li a { padding: 10px 20px 10px 36px; font-size: 14px; color: var(--text-muted); margin: 0 8px; border-radius: 6px; border-left: 2px solid transparent; transition: all .15s; display: block; text-decoration: none; }
  .has-submenu .submenu li a:hover { background: rgba(0,65,160,.04); color: var(--primary); border-left-color: var(--primary); text-decoration: none; }
}
@media (max-width: 1280px) and (min-width: 1101px) {
  .desktop-nav li > a, .desktop-nav li > span { padding: 20px 10px; font-size: 14px; }
}
@media (max-width: 1024px) {
  .device-hero .container { grid-template-columns: 1fr; gap: 32px; }
  .device-hero h1 { font-size: 32px; }
  .device-hero img { max-width: 320px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .news-big { grid-template-columns: 1fr; }
  .news-big .news-img { height: 280px; }
  .hero h1 { font-size: 36px; }
  .hero p { font-size: 17px; }
  .catalog-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 768px) {
  .topbar .topbar-left { display: none; }
  .topbar .container { justify-content: flex-end; }
  .topbar .topbar-right { gap: 12px; }
  .news-item { grid-template-columns: 1fr; }
  .news-item .news-img { width: 100%; height: 200px; }
  .section { padding: 40px 0; }
  .hero { padding: 56px 0; }
  .hero h1 { font-size: 28px; }
  .footer-grid { grid-template-columns: 1fr; }
  .card-grid, .card-grid-2, .card-grid-3, .card-grid-4 { grid-template-columns: 1fr; }
  .catalog-grid { grid-template-columns: 1fr; }
  .catalog-card { aspect-ratio: 16/9; }
  .device-hero { padding: 40px 0; }
  .device-hero h1 { font-size: 28px; }
  .device-tabs .container { gap: 0; }
  .device-tabs a { padding: 12px 14px; font-size: 13px; }
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .device-specs table, article table { display: block; width: 100%; border: none; border-radius: 0; box-shadow: none; overflow: visible; }
  .device-specs tbody, article table tbody { display: block; }
  .device-specs tr, article table tr { display: block; padding: 12px 0; border-bottom: 1px solid var(--border); }
  .device-specs th, .device-specs td,
  article table th, article table td { display: block; width: 100% !important; box-sizing: border-box; border: none; padding: 0; }
  .device-specs th, article table th { padding-bottom: 4px; background: none; font-weight: 600; color: var(--text); }
  .device-specs td, article table td { color: var(--text-muted); }
  .device-specs tr:last-child, article table tr:last-child { border-bottom: none; }
}
