:root {
  --navy: #0f1b2d;
  --navy-2: #172a44;
  --ink: #14202f;
  --ink-soft: #55657a;
  --bg: #ffffff;
  --bg-tint: #f2f6f9;
  --mint: #37d6a0;
  --mint-dark: #14a874;
  --line: #e1e8ef;
  --radius: 16px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.65; font-size: 17px; }
a { color: inherit; }
img, svg { display: block; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 32px); }

.skip { position: absolute; left: -999px; top: 8px; background: var(--mint); color: var(--navy); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--mint); outline-offset: 3px; }

/* NAV */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(15, 27, 45, .95); backdrop-filter: blur(10px); color: #fff; }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; text-decoration: none; letter-spacing: -.01em; color: #fff; }
.brand svg { color: var(--navy-2); }
.brand span span, .brand-footer span { color: var(--mint); }
.nav-links { list-style: none; display: flex; align-items: center; gap: 28px; font-size: 15px; font-weight: 600; }
.nav-links > li > a:not(.btn) { text-decoration: none; opacity: .85; display: inline-flex; align-items: center; min-height: 44px; }
.nav-links > li > a:not(.btn):hover { opacity: 1; }

/* Падащо меню „Услуги“ (компютър) */
.has-sub { position: relative; }
.sub-trigger::after {
  content: ""; width: 7px; height: 7px; margin-left: 8px; margin-top: -4px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg); transition: transform .2s;
}
.sub {
  list-style: none; position: absolute; top: 100%; left: -18px; min-width: 290px;
  background: #fff; color: var(--ink); border-radius: 14px; padding: 8px;
  box-shadow: 0 24px 60px -20px rgba(0,0,0,.45);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .18s, transform .18s, visibility .18s;
}
.sub::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 14px; }
.has-sub:hover .sub, .has-sub:focus-within .sub { opacity: 1; visibility: visible; transform: none; }
.has-sub:hover .sub-trigger::after, .has-sub:focus-within .sub-trigger::after { transform: rotate(225deg); margin-top: 4px; }
.sub a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px;
  text-decoration: none; font-weight: 600;
}
.sub a:hover, .sub a:focus-visible { background: var(--bg-tint); }
.sub a[aria-current="page"] { background: #effcf6; color: var(--mint-dark); }
.sub-icon { flex: none; width: 32px; height: 32px; border-radius: 8px; background: var(--navy); display: grid; place-items: center; }
.sub-icon svg { width: 17px; height: 17px; fill: none; stroke: var(--mint); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Бутон хамбургер */
.nav-toggle {
  display: none; position: relative; width: 48px; height: 48px; margin-right: -10px;
  background: none; border: 0; border-radius: 10px; cursor: pointer; color: #fff;
}
.nav-toggle span {
  position: absolute; left: 13px; right: 13px; height: 2px; border-radius: 2px;
  background: currentColor; transition: transform .25s, opacity .2s, top .25s;
}
.nav-toggle span:nth-child(1) { top: 16px; }
.nav-toggle span:nth-child(2) { top: 23px; }
.nav-toggle span:nth-child(3) { top: 30px; }
.nav.open .nav-toggle span:nth-child(1) { top: 23px; transform: rotate(45deg); }
.nav.open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav.open .nav-toggle span:nth-child(3) { top: 23px; transform: rotate(-45deg); }

/* Мобилно меню */
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-menu {
    position: absolute; top: 100%; left: 0; right: 0;
    height: calc(100vh - 68px); height: calc(100dvh - 68px);
    overflow-y: auto; overscroll-behavior: contain;
    background: var(--navy); border-top: 1px solid rgba(255,255,255,.08);
    padding: 12px clamp(16px, 4vw, 32px) 32px;
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .2s, transform .2s, visibility .2s;
  }
  .nav.open .nav-menu { opacity: 1; visibility: visible; transform: none; }
  .nav-links { flex-direction: column; align-items: stretch; gap: 0; font-size: 18px; }
  .nav-links > li { border-bottom: 1px solid rgba(255,255,255,.08); }
  .nav-links > li > a:not(.btn) { display: flex; min-height: 56px; opacity: 1; }
  .sub-trigger::after { display: none; }
  .sub {
    position: static; opacity: 1; visibility: visible; transform: none;
    background: transparent; color: #fff; box-shadow: none; min-width: 0;
    padding: 0 0 12px; display: grid; gap: 2px;
  }
  .sub::before { display: none; }
  .sub a { min-height: 52px; font-size: 16px; color: rgba(255,255,255,.85); padding: 8px 10px; }
  .sub a:hover, .sub a:focus-visible { background: rgba(255,255,255,.06); }
  .sub a[aria-current="page"] { background: rgba(55,214,160,.12); color: var(--mint); }
  .sub-icon { background: rgba(255,255,255,.06); }
  .nav-cta { border-bottom: 0 !important; padding-top: 20px; }
  .nav-cta .btn { display: block; text-align: center; padding: 16px; font-size: 17px; }
  body.menu-open { overflow: hidden; }
}

/* BUTTONS */
.btn {
  display: inline-block; text-decoration: none; font-weight: 700; font-size: 16px;
  padding: 14px 26px; border-radius: 10px;
  background: var(--mint); color: var(--navy);
  transition: background .2s, transform .2s;
}
.btn:hover { background: #5be3b4; transform: translateY(-1px); }
.btn-small { padding: 9px 18px; font-size: 14px; }
.btn-outline { background: transparent; color: #fff; box-shadow: inset 0 0 0 2px rgba(255,255,255,.35); }
.btn-outline:hover { background: rgba(255,255,255,.08); }

/* HERO */
.hero {
  background:
    radial-gradient(800px 400px at 85% 10%, rgba(55, 214, 160, .18), transparent 60%),
    linear-gradient(180deg, var(--navy), var(--navy-2));
  color: #fff;
  padding: clamp(56px, 9vw, 110px) 0 clamp(64px, 9vw, 120px);
}
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.eyebrow { font-size: 13px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--mint-dark); margin-bottom: 14px; }
.hero .eyebrow, .section-dark .eyebrow { color: var(--mint); }
h1 { font-size: clamp(36px, 5.2vw, 60px); line-height: 1.08; letter-spacing: -.02em; margin-bottom: 22px; }
h1 .hl { color: var(--mint); }
h2 { font-size: clamp(30px, 3.6vw, 44px); line-height: 1.15; letter-spacing: -.015em; margin-bottom: 16px; }
h3 { font-size: 21px; line-height: 1.3; margin-bottom: 8px; }
.lead { font-size: clamp(17px, 1.6vw, 19px); color: rgba(255,255,255,.78); max-width: 580px; margin-bottom: 32px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* SERP mock: текстовете идват от data-t, за да не се индексират от търсачките */
.serp [data-t]::before { content: attr(data-t); }
.serp { background: #fff; color: var(--ink); border-radius: 18px; padding: 22px; box-shadow: 0 30px 80px -30px rgba(0,0,0,.6); }
.serp-bar { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 999px; padding: 11px 16px; font-size: 15px; color: var(--ink-soft); margin-bottom: 18px; }
.typed { overflow: hidden; white-space: nowrap; border-right: 2px solid var(--mint-dark); animation: typing 2.6s steps(26) .4s both, caret .8s step-end infinite; }
.serp-result { position: relative; padding: 14px 4px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.serp-result.is-top { border-top: 0; background: #effcf6; border-radius: 12px; padding: 14px 16px; animation: rise .6s 3s both; }
.serp-url { font-size: 13px; color: var(--mint-dark); }
.serp-title { font-size: 18px; font-weight: 700; color: #1a4fd6; }
.serp-desc { font-size: 14px; color: var(--ink-soft); }
.serp-badge { position: absolute; top: 12px; right: 12px; background: var(--navy); color: var(--mint); font-weight: 800; font-size: 13px; padding: 3px 10px; border-radius: 999px; }
.line { height: 10px; border-radius: 6px; background: var(--line); }
.w60 { width: 60%; } .w70 { width: 70%; } .w80 { width: 80%; } .w90 { width: 90%; }
@keyframes typing { from { max-width: 0; } to { max-width: 100%; } }
@keyframes caret { 50% { border-color: transparent; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* SECTIONS */
.section { padding: clamp(64px, 8vw, 104px) 0; }
.section-tint { background: var(--bg-tint); }
.section-dark { background: var(--navy); color: #fff; }
.section-lead { color: var(--ink-soft); max-width: 640px; margin-bottom: 44px; font-size: 18px; }

/* SERVICES */
.services { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.service { border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; background: #fff; transition: border-color .2s, box-shadow .2s; }
.service:hover { border-color: var(--mint); box-shadow: 0 20px 40px -24px rgba(15,27,45,.3); }
.service p { color: var(--ink-soft); }
.service-main { grid-column: 1 / -1; display: grid; grid-template-columns: auto 1fr 1fr; gap: 8px 28px; align-items: start; background: var(--bg-tint); }
.service-main .icon { grid-row: span 2; }
.service-main h3 { font-size: 26px; }
.service-main p { grid-column: 2; }
.service-main .ticks { grid-column: 3; grid-row: 1 / span 2; }
.icon { width: 52px; height: 52px; border-radius: 12px; background: var(--navy); display: grid; place-items: center; margin-bottom: 18px; }
.icon svg { width: 26px; height: 26px; fill: none; stroke: var(--mint); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ticks { list-style: none; display: grid; gap: 10px; }
.ticks li { padding-left: 30px; position: relative; font-weight: 600; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 4px; width: 18px; height: 18px; border-radius: 50%; background: var(--mint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12l4 4 8-8' fill='none' stroke='%230f1b2d' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat; }

/* PROCESS */
.process { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; margin-top: 40px; }
.process li { border-top: 2px solid rgba(255,255,255,.15); padding-top: 22px; }
.process p { color: rgba(255,255,255,.7); font-size: 16px; }
.step-n { display: block; font-size: 15px; font-weight: 800; color: var(--mint); margin-bottom: 10px; letter-spacing: .1em; }

/* WHY */
.why { display: grid; grid-template-columns: 1fr 1.2fr; gap: 56px; align-items: start; }
.why-list { list-style: none; display: grid; gap: 18px; }
.why-list li { padding: 20px 22px; border-left: 3px solid var(--mint); background: var(--bg-tint); border-radius: 0 12px 12px 0; color: var(--ink-soft); }
.why-list strong { color: var(--ink); }

/* FAQ */
.faq-wrap { max-width: 860px; }
.faq { margin-top: 28px; display: grid; gap: 12px; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 0 22px; }
.faq summary { cursor: pointer; list-style: none; padding: 20px 32px 20px 0; font-weight: 700; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-size: 24px; color: var(--mint-dark); transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { padding-bottom: 20px; color: var(--ink-soft); }

/* CONTACT */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.contact .section-lead { margin-bottom: 0; }
.contact-cards { display: grid; gap: 14px; }
.contact-card { display: flex; flex-direction: column; gap: 4px; padding: 24px 26px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; transition: border-color .2s, background .2s; }
a.contact-card:hover { border-color: var(--mint); background: #effcf6; }
.label { font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--mint-dark); }
.value { font-size: 21px; font-weight: 700; overflow-wrap: anywhere; }

/* FOOTER */
.footer { background: var(--navy); color: rgba(255,255,255,.72); font-size: 15px; padding-top: 56px; }
.footer-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; padding-bottom: 40px; }
.brand-footer { display: block; font-size: 22px; margin-bottom: 10px; }
.legal-h { font-size: 14px; letter-spacing: .12em; text-transform: uppercase; color: #fff; margin-bottom: 14px; }
.legal dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 20px; }
.legal dt { color: rgba(255,255,255,.5); }
.legal dd { color: #fff; }
.kzp { margin-top: 16px; font-size: 14px; }
.kzp a { color: var(--mint); }
.copy { border-top: 1px solid rgba(255,255,255,.1); padding-top: 20px; padding-bottom: 28px; font-size: 14px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* RESPONSIVE */
@media (max-width: 960px) {
  .hero-grid, .why, .contact, .footer-grid { grid-template-columns: 1fr; gap: 36px; }
  .process { grid-template-columns: 1fr 1fr; }
  .service-main { grid-template-columns: 1fr; }
  .service-main p, .service-main .ticks { grid-column: auto; grid-row: auto; }
  .service-main .icon { grid-row: auto; }
}
@media (max-width: 640px) {
  .services, .process { grid-template-columns: 1fr; }
  .serp { padding: 16px; }
  .legal dl { grid-template-columns: 1fr; gap: 0; }
  .legal dd { margin-bottom: 8px; }
}

.why-text { color: var(--ink-soft); margin-top: 8px; }

/* ---------- SERVICE LINKS (начална страница) ---------- */
.service-link { text-decoration: none; }
.service-link:hover { color: var(--mint-dark); }
.more { display: inline-block; margin-top: 14px; font-weight: 700; font-size: 15px; color: var(--mint-dark); text-decoration: none; }
.more:hover { text-decoration: underline; }
.service-main .more { grid-column: 2; }

/* ---------- SERVICE PAGES ---------- */
.page-hero {
  background:
    radial-gradient(700px 320px at 90% 0%, rgba(55, 214, 160, .16), transparent 60%),
    linear-gradient(180deg, var(--navy), var(--navy-2));
  color: #fff;
  padding: 28px 0 clamp(48px, 7vw, 84px);
}
.page-hero h1 { font-size: clamp(32px, 4.4vw, 52px); }
.page-hero .lead { max-width: 720px; }
.page-hero-grid { display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: start; margin-top: clamp(28px, 5vw, 56px); }
.icon-lg { width: 76px; height: 76px; border-radius: 18px; background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px rgba(55,214,160,.35); margin: 0; }
.icon-lg svg { width: 38px; height: 38px; }
.icon-sm { width: 40px; height: 40px; border-radius: 10px; margin-bottom: 12px; }
.icon-sm svg { width: 20px; height: 20px; }

.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; font-size: 14px; color: rgba(255,255,255,.6); }
.crumbs li + li::before { content: "/"; margin-right: 6px; opacity: .5; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--mint); }
.crumbs [aria-current] { color: #fff; }

.prose { max-width: 820px; }
.prose h2 { font-size: clamp(26px, 3vw, 34px); margin: 48px 0 16px; }
.prose h2:first-child { margin-top: 0; }
.prose p { color: var(--ink-soft); margin-bottom: 16px; }
.prose p a { color: var(--mint-dark); font-weight: 600; }
.prose .ticks { margin: 8px 0 8px; }
.prose .ticks li { font-weight: 400; color: var(--ink-soft); }
.prose .ticks strong { color: var(--ink); }

.kinds { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 8px; }
.kind { background: var(--bg-tint); border-radius: var(--radius); padding: 24px; border-top: 3px solid var(--mint); }
.kind h3 { font-size: 19px; }
.kind p { font-size: 16px; margin: 0; }

.mini-steps { list-style: none; counter-reset: m; display: grid; gap: 14px; }
.mini-steps li { counter-increment: m; position: relative; padding: 18px 20px 18px 64px; background: var(--bg-tint); border-radius: 12px; color: var(--ink-soft); }
.mini-steps li::before { content: counter(m); position: absolute; left: 18px; top: 16px; width: 32px; height: 32px; border-radius: 50%; background: var(--navy); color: var(--mint); font-weight: 800; display: grid; place-items: center; }
.mini-steps strong { color: var(--ink); }

.related { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-top: 24px; }
.related-card { display: flex; flex-direction: column; padding: 22px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; transition: border-color .2s, transform .2s; }
.related-card:hover { border-color: var(--mint); transform: translateY(-3px); }
.related-name { font-weight: 800; margin-bottom: 6px; }
.related-text { font-size: 15px; color: var(--ink-soft); }

/* ---------- FOOTER LINKS ---------- */
.footer-grid { grid-template-columns: 1fr .8fr 1.3fr; }
.footer-links ul { list-style: none; display: grid; gap: 8px; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--mint); }

@media (max-width: 960px) {
  .footer-grid { grid-template-columns: 1fr; }
  .kinds { grid-template-columns: 1fr; }
  .service-main .more { grid-column: auto; }
}
@media (max-width: 640px) {
  .page-hero-grid { grid-template-columns: 1fr; gap: 18px; }
  .icon-lg { width: 60px; height: 60px; }
}
