/* stedosoft.com – основен стил. Цветовете са в :root; тъмната тема – по настройката на устройството. */
:root {
  --orange: #ee7f1a;
  --orange-dark: #c9640a;
  --ink: #1d2228;
  --text: #2b3138;
  --muted: #5d6670;
  --line: #e3e6ea;
  --bg: #ffffff;
  --bg-alt: #f5f6f8;
  --card: #ffffff;
  --hero-bg: linear-gradient(135deg, #1d2228 0%, #2e353d 55%, #4a3423 100%);
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 32, .06), 0 6px 20px rgba(16, 24, 32, .06);
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f1f3f5; --text: #d9dde2; --muted: #9aa3ad; --line: #2c333b;
    --bg: #14181d; --bg-alt: #1a1f25; --card: #1d232a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.6 var(--font); color: var(--text); background: var(--bg); }
img { max-width: 100%; height: auto; }
a { color: var(--orange-dark); }
@media (prefers-color-scheme: dark) { a { color: var(--orange); } }
h1, h2, h3 { color: var(--ink); line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 820px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 60ch; }
.sr, .hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }
ul.plain { list-style: none; margin: 0; padding: 0; }
ul.plain li { margin: 0 0 .35em; }

/* Бутони */
.btn { display: inline-flex; align-items: center; gap: .4em; padding: .75em 1.4em; border-radius: 999px; border: 2px solid var(--orange);
  background: var(--orange); color: #fff; font-weight: 600; text-decoration: none; cursor: pointer; font: inherit; font-weight: 600; transition: background .15s; }
.btn:hover { background: var(--orange-dark); border-color: var(--orange-dark); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--bg-alt); border-color: var(--muted); }
.btn:disabled { opacity: .6; cursor: wait; }

/* Горна лента */
.topbar { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.topbar-in { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 800; letter-spacing: .04em; font-size: 1.1rem; }
.brand img { width: 45px; height: auto; }
.brand-light { color: #fff; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav > a, .nav-item > a { display: block; padding: 10px 12px; border-radius: 8px; color: var(--text); text-decoration: none; font-weight: 500; }
.nav > a:hover, .nav-item > a:hover, .nav a.on { color: var(--orange-dark); background: var(--bg-alt); }
.nav .lang { border: 1px solid var(--line); margin-left: 6px; font-weight: 700; font-size: .85rem; }
.nav-item { position: relative; }
.sub { display: none; position: absolute; top: 100%; left: 0; min-width: 340px; padding: 8px; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); }
.sub-narrow { min-width: 200px; }
.sub a { display: block; padding: 8px 12px; border-radius: 8px; text-decoration: none; color: var(--text); }
.sub a:hover { background: var(--bg-alt); }
.sub small { display: block; color: var(--muted); }
.has-sub:hover .sub, .has-sub:focus-within .sub { display: block; }
.menu-btn { display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 10px; background: transparent; cursor: pointer; }
.bars, .bars::before, .bars::after { display: block; width: 20px; height: 2px; background: var(--ink); margin: 0 auto; position: relative; content: ""; }
.bars::before { position: absolute; top: -6px; } .bars::after { position: absolute; top: 6px; }

@media (max-width: 920px) {
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch; padding: 8px 16px 16px;
    background: var(--bg); border-bottom: 1px solid var(--line); max-height: calc(100vh - 68px); overflow-y: auto; }
  .nav.open { display: flex; }
  .sub { display: block; position: static; box-shadow: none; border: 0; padding: 0 0 0 12px; min-width: 0; background: transparent; }
  .sub small { display: none; }
  .nav .lang { margin: 8px 0 0; text-align: center; }
}

/* Начална снимка */
.hero { position: relative; color: #fff; background: var(--hero-bg); overflow: hidden; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero.has-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,var(--overlay)) 0%, rgba(0,0,0,calc(var(--overlay) * .55)) 100%); }
.hero-in { position: relative; z-index: 1; padding: clamp(64px, 12vw, 140px) 16px; }
.hero h1 { color: #fff; max-width: 18ch; }
.hero .lead { color: rgba(255,255,255,.88); font-size: clamp(1.05rem, 2vw, 1.3rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.hero .btn-ghost { color: #fff; border-color: rgba(255,255,255,.5); }
.hero .btn-ghost:hover { background: rgba(255,255,255,.12); }

.stats { background: var(--ink); color: #fff; }
@media (prefers-color-scheme: dark) { .stats { background: #0f1216; } }
.stats-in { display: flex; justify-content: space-around; flex-wrap: wrap; gap: 16px; padding: 22px 16px; text-align: center; }
.stats strong { display: block; font-size: 2rem; color: var(--orange); line-height: 1.1; }
.stats span { color: rgba(255,255,255,.75); font-size: .9rem; }

/* Секции и карти */
.section { padding: clamp(48px, 7vw, 88px) 0; }
.section-alt { background: var(--bg-alt); }
.section-title { text-align: center; }
.section-lead { text-align: center; color: var(--muted); max-width: 60ch; margin: 0 auto 32px; }
.page-head { background: var(--bg-alt); padding: clamp(40px, 6vw, 72px) 0 clamp(28px, 4vw, 48px); border-bottom: 1px solid var(--line); }
.page-head .hero-actions { margin-top: 16px; }
.crumbs { font-size: .9rem; color: var(--muted); margin-bottom: 8px; }
.crumbs a { color: var(--muted); }
.cat-title { margin: 32px 0 16px; }
.cat-title:first-child { margin-top: 0; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.cards-3 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card + .card { margin-top: 0; }
aside .card, .cta-grid > div > .card { margin-bottom: 20px; }
a.card { text-decoration: none; color: inherit; display: block; transition: transform .15s, border-color .15s; }
a.card:hover { transform: translateY(-2px); border-color: var(--orange); }
.product-card { border-top: 4px solid var(--cat, var(--orange)); display: flex !important; flex-direction: column; }
.product-card .tag { align-self: flex-start; }
.product-card h3 { font-size: 1.4rem; margin: 6px 0 2px; }
.product-card .tagline { font-weight: 600; color: var(--ink); margin-bottom: .5em; }
.product-card .more { margin-top: auto; color: var(--orange-dark); font-weight: 600; }
.tag { display: inline-block; font-size: .75rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--muted);
  background: var(--bg-alt); border: 1px solid var(--line); padding: 2px 8px; border-radius: 999px; margin-right: 6px; }

/* Клиенти */
.client-cloud { list-style: none; padding: 0; margin: 24px 0 32px; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.client-cloud li { padding: 10px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; font-weight: 600; color: var(--ink); font-size: .95rem; }
/* Логата: височина до 40px, дългите – до 160px широки; белите – на тъмен фон (отметка в панела) */
.client-cloud li.has-logo { background: #fff; padding: 10px 14px; display: grid; place-items: center; min-height: 62px; }
.client-cloud li.dark { background: #1d2228; border-color: #1d2228; }
.client-cloud img { height: 40px; width: auto; max-width: 160px; object-fit: contain; display: block; filter: grayscale(1); opacity: .8; }
/* SVG без собствени размери (само viewBox) иначе се свива до 0 */
.client-cloud img[src$=".svg"] { width: 120px; }
.client-cloud li:hover img { filter: none; opacity: 1; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.chip { font: inherit; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--text); cursor: pointer; }
.chip span { color: var(--muted); font-size: .85em; }
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip.on span { color: inherit; opacity: .7; }
.client-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.client { display: flex; gap: 14px; align-items: flex-start; padding: 16px; }
.client-logo { flex: 0 0 56px; height: 56px; border-radius: 12px; background: var(--bg-alt); display: grid; place-items: center; overflow: hidden; }
.client-logo.has-logo { flex-basis: 120px; background: #fff; border: 1px solid var(--line); padding: 6px; }
.client-logo.dark { background: #1d2228; border-color: #1d2228; }
.client-logo img { width: 100%; height: 44px; object-fit: contain; }
.client-logo span { font-size: 1.4rem; font-weight: 800; color: var(--orange); }
.client strong { display: block; }
.client strong a { color: var(--ink); text-decoration: none; }
.client strong a:hover { color: var(--orange-dark); }
.client small { display: block; }
.client-tags { display: block; margin-top: 6px; }

/* Продукт */
.product-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 40px; align-items: start; }
@media (max-width: 920px) { .product-grid { grid-template-columns: 1fr; } }
.prose { font-size: 1.05rem; }
.prose h2 { margin-top: 1.4em; }
.prose img { border-radius: var(--radius); }
.product-img { margin-bottom: 24px; }
.checks { list-style: none; padding: 0; margin: 0; }
.checks li { position: relative; padding-left: 28px; margin-bottom: .6em; }
.checks li::before { content: ""; position: absolute; left: 4px; top: .45em; width: 12px; height: 7px; border-left: 2.5px solid var(--orange); border-bottom: 2.5px solid var(--orange); transform: rotate(-45deg); }
.files li { margin-bottom: .8em; }
.files small { display: block; }

/* Новини */
.post-card { padding: 0; overflow: hidden; }
.post-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: var(--bg-alt); }
.post-card-body { padding: 18px 20px 20px; }
.post-card h3 { margin-top: 8px; }
.post-img { width: 100%; border-radius: var(--radius); margin: 16px 0 24px; }

/* Контакти и формуляр */
.depts { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.dept .phone a { font-size: 1.15rem; font-weight: 600; color: var(--ink); text-decoration: none; }
.dept .phone a:hover { color: var(--orange-dark); }
.cta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
@media (max-width: 920px) { .cta-grid { grid-template-columns: 1fr; } }
.cta .depts { margin-top: 20px; }
.inquiry label { display: block; margin-bottom: 14px; }
.inquiry label span { display: block; font-size: .9rem; font-weight: 600; margin-bottom: 4px; color: var(--ink); }
.inquiry input, .inquiry select, .inquiry textarea, .search { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg); color: var(--text); }
.inquiry input:focus, .inquiry select:focus, .inquiry textarea:focus, .search:focus { outline: 2px solid var(--orange); outline-offset: 1px; border-color: transparent; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 560px) { .grid-2 { grid-template-columns: 1fr; } }
.form-msg { margin: 12px 0 0; font-weight: 600; }
.form-msg.ok { color: #2f7d6d; } .form-msg.err { color: #c0392b; }

/* Изтегляния, речник, медии */
.downloads { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.downloads h2 a { color: var(--ink); text-decoration: none; }
.search { margin-bottom: 16px; }
.letters { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 24px; }
.letters a { min-width: 34px; text-align: center; padding: 4px 6px; border-radius: 8px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 600; }
.letters a:hover { border-color: var(--orange); }
.glossary { margin: 0; }
.glossary .letter { color: var(--orange); border-bottom: 1px solid var(--line); padding-bottom: 4px; margin-top: 32px; scroll-margin-top: 84px; }
.term { padding: 12px 0; border-bottom: 1px dashed var(--line); scroll-margin-top: 84px; }
.term dt a { font-weight: 700; color: var(--ink); text-decoration: none; }
.term dd { margin: 4px 0 0; }
.term dd p { margin: 0 0 .5em; }
.term:target { background: color-mix(in srgb, var(--orange) 10%, transparent); }
.press li { margin-bottom: 14px; }

/* Долна част */
.footer { background: var(--ink); color: rgba(255,255,255,.78); padding: 48px 0 0; margin-top: 0; }
@media (prefers-color-scheme: dark) { .footer { background: #0f1216; } }
.footer a { color: #fff; text-decoration: none; }
.footer a:hover { color: var(--orange); }
.footer h3 { color: #fff; font-size: 1rem; }
.footer .muted { color: rgba(255,255,255,.6); }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 28px; }
@media (max-width: 920px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 20px 16px; margin-top: 32px; border-top: 1px solid rgba(255,255,255,.12); font-size: .875rem; }

/* Ключова цифра в картата на продукта */
.key-fig { margin: auto 0 14px; padding-top: 12px; border-top: 1px solid var(--line); line-height: 1.2; }
.key-fig strong { font-size: 1.5rem; color: var(--orange-dark); font-weight: 800; margin-right: 4px; }
.key-fig span { color: var(--muted); font-size: .9rem; }
.key-fig + .more { margin-top: 0; }
