/* ============ Вътрешни страници ============ */

/* hero със снимка */
.page-hero .ph-grid { display: grid; grid-template-columns: 1fr; gap: 48px; align-items: center; }
.page-hero.has-media .ph-grid { grid-template-columns: 1.05fr .95fr; }
.page-hero .eyebrow { margin: 18px 0 0; }
.page-hero h1 { max-width: 820px; }
.ph-lead { color: rgba(226, 234, 255, .82); font-size: 18px; max-width: 640px; margin-bottom: 26px; }
.page-hero .btn { margin-top: 4px; }
.ph-media { position: relative; }
.ph-media::before { content: ""; position: absolute; inset: 8% -4% -6% 8%; border-radius: 32px; background: var(--grad-cyan); opacity: .35; filter: blur(40px); }
.ph-media img { position: relative; width: 100%; max-height: 380px; object-fit: cover; border-radius: 26px; box-shadow: 0 30px 60px rgba(0, 0, 0, .45); border: 1px solid rgba(255, 255, 255, .15); background: #fff; }
.page-hero.has-media { padding-bottom: 96px; }
.ph-media.contain img { object-fit: contain; padding: 28px; background: linear-gradient(160deg, #FFFFFF, #E6EDFB); }

/* общи секции */
.section.inner { padding: 88px 0; }
.section.inner + .section.inner { padding-top: 0; }
.sh-sub { color: var(--muted); font-size: 18px; margin-top: 12px; }
.sub-h { font-size: clamp(24px, 2.8vw, 34px); font-weight: 800; margin: 56px 0 28px; text-align: center; }
.intro { max-width: 860px; margin: 0 auto 56px; text-align: center; font-size: 20px; line-height: 1.6; color: var(--ink-2); }
.narrow { max-width: 860px; }
.container.narrow { margin: 0 auto; }

/* редуващи се редове снимка/текст */
.frows { display: grid; gap: 72px; }
.frow { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.frow.rev .frow-media { order: 2; }
.frow.noimg { grid-template-columns: 1fr; max-width: 860px; }
.frow-media { position: relative; }
.frow-media::before { content: ""; position: absolute; inset: 10% -3% -5% 10%; border-radius: 28px; background: var(--grad-cyan); opacity: .18; }
.frow-media img { position: relative; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 24px; box-shadow: var(--shadow-lg); background: #fff; }
.product-rows .frow-media img { object-fit: contain; padding: 28px; background: linear-gradient(160deg, #F4F7FD, #E6EDFB); box-shadow: var(--shadow); }
.frow-num { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--blue-50); color: var(--blue); font: 800 15px/1 var(--head); margin-bottom: 18px; }
.frow-text h3 { font-size: clamp(22px, 2.4vw, 30px); font-weight: 800; margin-bottom: 14px; }
.frow-text p { font-size: 17px; line-height: 1.75; color: var(--ink-2); }
.frow-text p + p { margin-top: 12px; }

/* карти с предимства */
.icards { display: grid; gap: 22px; }
.icards.cols-2 { grid-template-columns: repeat(2, 1fr); }
.icards.cols-3 { grid-template-columns: repeat(3, 1fr); }
.icards.cols-4 { grid-template-columns: repeat(4, 1fr); }
.icard { position: relative; padding: 30px 26px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; overflow: hidden; }
.icard::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--grad-cyan); transform: scaleX(0); transform-origin: left; transition: transform .3s; }
.icard:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.icard:hover::after { transform: scaleX(1); }
.c-num, .c-ico { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; color: #fff; background: var(--grad-cyan); font: 800 15px/1 var(--head); margin-bottom: 18px; box-shadow: 0 10px 22px rgba(47, 107, 255, .3); }
.c-ico svg { width: 22px; height: 22px; stroke-width: 2.6; }
.icard h3 { font-size: 19px; font-weight: 700; margin-bottom: 10px; line-height: 1.3; }
.icard p { color: var(--ink-2); font-size: 15.5px; line-height: 1.65; }

/* CTA */
.cta-wrap { padding-top: 0 !important; }
.cta { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; padding: 44px 48px; border-radius: 30px; color: #fff; background: radial-gradient(500px 240px at 90% 0%, rgba(34, 211, 238, .45), transparent 70%), var(--grad); box-shadow: 0 24px 60px rgba(47, 107, 255, .3); overflow: hidden; }
.cta h2 { font-size: clamp(26px, 3vw, 38px); font-weight: 800; }
.cta p { color: rgba(255, 255, 255, .85); margin-top: 8px; }

/* галерия */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.gallery figure { margin: 0; padding: 24px; border-radius: 24px; background: linear-gradient(160deg, #F4F7FD, #E6EDFB); border: 1px solid var(--line); display: grid; place-items: center; transition: transform .2s; }
.gallery figure:hover { transform: translateY(-5px); }
.gallery img { max-height: 340px; width: auto; }

/* в разработка */
.wip { text-align: center; padding: 20px 0; }
.wip img { max-width: 420px; width: 100%; margin: 0 auto 28px; }
.wip h2 { font-size: clamp(26px, 3vw, 38px); font-weight: 800; margin-bottom: 26px; }

/* Datecs таблица */
.dpv b { display: block; font: 800 22px/1.1 var(--head); color: var(--blue); }
.dpv small { display: block; font: 500 13px/1.4 var(--body); color: var(--muted); white-space: normal; margin-top: 4px; }

/* табове с много бутони */
.ptabs.wrap { border-radius: 22px; }
.ptab .cnt, .chip .cnt { display: inline-grid; place-items: center; min-width: 24px; height: 20px; padding: 0 6px; margin-left: 6px; border-radius: 999px; font-size: 11.5px; background: var(--bg-soft); color: var(--muted); }
.ptab.on .cnt, .chip.on .cnt { background: rgba(255, 255, 255, .25); color: #fff; }
a.ptab { display: inline-flex; align-items: center; }

/* лога на клиенти */
.logo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 16px; }
.logo-cell { aspect-ratio: 1; border-radius: 18px; background: #fff; border: 1px solid var(--line); display: grid; place-items: center; padding: 14px; transition: transform .2s, box-shadow .2s, border-color .2s; }
.logo-cell:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #CFDCFA; }
.logo-cell { overflow: hidden; min-width: 0; }
.logo-cell img { width: 100%; height: 100%; object-fit: contain; }

/* контакти */
.office { padding-top: 0 !important; margin-top: -60px; position: relative; z-index: 2; }
.office-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.ocard { padding: 30px 28px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); }
.ocard h3 { font-size: 15px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 16px 0 8px; }
.ocard p { color: var(--ink-2); line-height: 1.65; }
.ocard p + p { margin-top: 8px; }
.ocard .big { font: 800 22px/1.3 var(--head); color: var(--ink); }
.ocard a { color: var(--blue); font-weight: 600; }
.ocard.duty { background: var(--grad); color: #fff; border: 0; }
.ocard.duty h3, .ocard.duty p, .ocard.duty .big, .ocard.duty a { color: #fff; }
.ocard.duty .o-ico { background: rgba(255, 255, 255, .2); box-shadow: none; }
.o-ico { display: inline-grid; place-items: center; width: 50px; height: 50px; border-radius: 15px; color: #fff; background: var(--grad-cyan); box-shadow: 0 10px 22px rgba(47, 107, 255, .3); }
.o-ico svg { width: 24px; height: 24px; }
.ct-h { font-size: 24px; font-weight: 800; margin-bottom: 20px; }
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.person { display: flex; gap: 16px; align-items: flex-start; padding: 22px; border-radius: 20px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); }
.p-ava { flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--grad); color: #fff; font: 800 17px/1 var(--head); }
.p-ava svg { width: 24px; height: 24px; }
.person h4 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.person a { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 15px; padding: 3px 0; }
.person a:hover { color: var(--blue); }
.person a svg { width: 16px; height: 16px; color: var(--blue); flex: none; }
.person.help-card { background: var(--blue-50); border-color: #D5E2FF; }
.person.help-card .btn { color: #fff; margin-top: 8px; display: inline-flex; padding: 0 20px; height: 44px; }

/* дистрибутори */
.dist-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.dist-top .sub-h { margin: 0; text-align: left; color: var(--ink); }
.dsearch { position: relative; display: block; width: 340px; max-width: 100%; }
.dsearch svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); }
.dsearch input { width: 100%; height: 50px; padding: 0 18px 0 46px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font: 500 15px var(--body); box-shadow: var(--shadow); outline: none; }
.dsearch input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(47, 107, 255, .15); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 36px; }
.chip { height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: #fff; cursor: pointer; font: 600 14px/1 var(--body); color: var(--ink-2); transition: all .15s; }
.chip:hover { border-color: var(--blue); color: var(--blue); }
.chip.on { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 8px 18px rgba(47, 107, 255, .3); }
.city-block { margin-bottom: 40px; }
.city-h { display: flex; align-items: center; gap: 10px; font-size: 24px; font-weight: 800; margin-bottom: 16px; }
.city-h span { font-size: 13px; padding: 3px 10px; border-radius: 999px; background: var(--blue-50); color: var(--blue); }
.dgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.dcard { padding: 22px; border-radius: 18px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); }
.dcard h4 { font-size: 17px; font-weight: 800; margin-bottom: 10px; }
.dcard ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; font-size: 14.5px; color: var(--ink-2); line-height: 1.5; word-break: break-word; }
.dcard a { color: var(--blue); }
.empty-msg { text-align: center; color: var(--muted); padding: 40px 0; }

/* за компанията */
.about { display: grid; gap: 18px; max-width: 920px; margin: 0 auto; }
.about-item { display: flex; gap: 22px; align-items: flex-start; padding: 26px 28px; border-radius: 22px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); }
.a-num { flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--grad-cyan); color: #fff; font: 800 16px/1 var(--head); }
.about-item p { font-size: 17.5px; line-height: 1.7; color: var(--ink-2); }
.about-links { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 36px; }

/* партньори */
.partners { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.partner { display: grid; grid-template-columns: 170px 1fr; gap: 24px; align-items: start; padding: 28px; border-radius: 24px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); }
.pt-logo { display: grid; place-items: center; aspect-ratio: 1.3; border-radius: 18px; background: var(--bg-soft); padding: 18px; }
.pt-logo img { max-height: 70px; width: auto; object-fit: contain; }
.partner h3 { font-size: 20px; font-weight: 800; margin-bottom: 8px; }
.partner p { color: var(--ink-2); font-size: 15.5px; line-height: 1.65; }

/* препоръки */
.reviews { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: start; }
.review { position: relative; margin: 0; padding: 32px 28px 26px; border-radius: 24px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); }
.review .q { width: 42px; height: 42px; color: var(--blue); opacity: .35; stroke-width: 2.4; }
.review blockquote { margin: 10px 0 22px; color: var(--ink-2); font-size: 15.5px; line-height: 1.7; }
.review blockquote p + p { margin-top: 10px; }
.review figcaption { display: flex; align-items: center; gap: 14px; padding-top: 18px; border-top: 1px solid var(--line); font-weight: 700; font-size: 15px; }
.review figcaption img { width: 56px; height: 56px; object-fit: contain; border-radius: 14px; background: var(--bg-soft); padding: 4px; }

/* новини */
.news { display: grid; gap: 26px; max-width: 1040px; margin: 0 auto; }
.news-item { display: grid; grid-template-columns: 300px 1fr; gap: 32px; align-items: start; padding: 28px; border-radius: 26px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); }
.news-img { aspect-ratio: 4 / 3; border-radius: 18px; background: var(--bg-soft); display: grid; place-items: center; padding: 22px; }
.news-img img { max-height: 100%; object-fit: contain; }
.news-body time { font-size: 13px; font-weight: 700; color: var(--blue); letter-spacing: .06em; }
.news-body h2 { font-size: 24px; font-weight: 800; margin: 8px 0 14px; }
.news-body p { color: var(--ink-2); line-height: 1.7; }
.news-body p + p { margin-top: 10px; }

/* блог */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.posts .post-img { aspect-ratio: 16 / 8; }
.prose { font-size: 17.5px; line-height: 1.8; color: var(--ink-2); }
.prose > * + * { margin-top: 18px; }
.prose h2, .prose h3, .prose h4 { color: var(--ink); font-weight: 800; margin-top: 40px; line-height: 1.25; }
.prose h2 { font-size: 28px; } .prose h3 { font-size: 23px; } .prose h4 { font-size: 19px; }
.prose a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.prose ul, .prose ol { padding-left: 24px; }
.prose li + li { margin-top: 6px; }
.prose img { max-width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--line); box-shadow: var(--shadow); margin: 8px 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; display: block; overflow-x: auto; }
.prose td, .prose th { border: 1px solid var(--line); padding: 8px 12px; }
.prose strong, .prose b { color: var(--ink); }
.post-nav { margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--line); }

/* база знания */
.kb-search { margin: 0 auto 40px; width: 560px; }
.kb-topic { padding: 32px; border-radius: 26px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); margin-bottom: 24px; }
.kb-topic-h { display: flex; gap: 18px; align-items: center; margin-bottom: 24px; }
.kb-ico { flex: none; display: grid; place-items: center; width: 58px; height: 58px; border-radius: 18px; background: var(--grad); color: #fff; font: 800 20px/1 var(--head); }
.kb-topic h2 { font-size: 26px; font-weight: 800; }
.kb-topic-h p { color: var(--muted); margin-top: 4px; }
.kb-cols { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.kb-group h4 { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.kb-group a { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 12px; color: var(--ink); font-weight: 600; transition: background .15s, color .15s; }
.kb-group a:hover { background: var(--blue-50); color: var(--blue); }
.kb-group a svg { width: 18px; height: 18px; color: var(--blue); flex: none; }
.kb-group a.hide, .kb-topic.hide { display: none; }
.kb-layout { display: grid; grid-template-columns: 270px 1fr; gap: 48px; align-items: start; }
.kb-side { position: sticky; top: 100px; padding: 22px; border-radius: 20px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); }
.kb-side h4 { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.kb-side nav a { display: block; padding: 9px 12px; border-radius: 10px; font-weight: 600; font-size: 14.5px; color: var(--ink-2); }
.kb-side nav a:hover { background: var(--bg-soft); }
.kb-side nav a.on { background: var(--blue-50); color: var(--blue); }
.kb-side .btn { margin-top: 16px; width: 100%; justify-content: center; height: 44px; }

/* форма */
.form { max-width: 860px; margin: 0 auto; padding: 40px; border-radius: 28px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); }
.form h2 { font-size: 26px; font-weight: 800; margin-bottom: 26px; }
.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 26px; }
.fgrid label { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 7px 4px; font-weight: 600; font-size: 14.5px; color: var(--ink-2); }
.fgrid label.full { grid-column: 1 / -1; }
.fgrid input, .fgrid select, .fgrid textarea { width: 100%; padding: 13px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg-soft); font: 500 15px var(--body); color: var(--ink); outline: none; transition: border-color .15s, box-shadow .15s, background .15s; }
.fgrid input:focus, .fgrid select:focus, .fgrid textarea:focus { border-color: var(--blue); background: #fff; box-shadow: 0 0 0 4px rgba(47, 107, 255, .15); }
.req { color: #E5484D; }
.form-note { margin-top: 14px; color: var(--muted); font-size: 13.5px; }

/* плакат */
.poster { display: block; max-width: 760px; margin: 0 auto; border-radius: 22px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.copy-link { margin-left: auto; }
.copy-link:hover { color: #fff; }

/* мобилни */
@media (max-width: 1024px) {
  .page-hero.has-media .ph-grid { grid-template-columns: 1fr; }
  .ph-media img { max-height: 300px; }
  .frow, .frow.rev { grid-template-columns: 1fr; gap: 28px; }
  .frow.rev .frow-media { order: 0; }
  .icards.cols-3, .icards.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .office-grid, .reviews { grid-template-columns: 1fr; }
  .partners { grid-template-columns: 1fr; }
  .kb-layout { grid-template-columns: 1fr; }
  .kb-side { position: static; }
  .gallery { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .section.inner { padding: 64px 0; }
  .icards.cols-2, .icards.cols-3, .icards.cols-4, .grid-2, .kb-cols, .fgrid { grid-template-columns: 1fr; }
  .frows { gap: 48px; }
  .intro { font-size: 17px; }
  .cta { padding: 32px 24px; }
  .partner { grid-template-columns: 1fr; }
  .news-item { grid-template-columns: 1fr; padding: 20px; }
  .gallery { grid-template-columns: 1fr; }
  .logo-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .logo-cell { border-radius: 14px; padding: 8px; }
  .form { padding: 24px 18px; }
  .about-item { padding: 20px; gap: 14px; }
  .copy { flex-wrap: wrap; }
}

/* заглавна част със снимка на фона */
.page-hero.has-bg { background-size: cover; background-position: center; background-repeat: no-repeat; isolation: isolate; }
.page-hero.has-bg::after { content: ""; position: absolute; inset: 0; z-index: -1; background:
  radial-gradient(600px 400px at 85% 20%, rgba(47, 107, 255, .45), transparent 65%),
  linear-gradient(100deg, rgba(7, 15, 40, .94) 0%, rgba(10, 26, 70, .86) 45%, rgba(14, 30, 95, .62) 100%); }
.page-hero.has-bg::before { z-index: -1; }
@media (max-width: 1024px) {
  .page-hero.has-bg::after { background: linear-gradient(180deg, rgba(7, 15, 40, .9), rgba(12, 28, 80, .82)); }
}
/* Контакти: Google Maps на фона */
.page-hero.map-hero { padding: 0; min-height: 560px; display: flex; align-items: center; background: #0B1C47; }
.page-hero.map-hero::before { display: none; }
.page-hero.map-hero { overflow: hidden; }
.map-bg { position: absolute; left: 0; top: -200px; width: 150%; height: calc(100% + 200px); border: 0; }
.map-hero .container { position: relative; z-index: 2; pointer-events: none; padding-top: 48px; padding-bottom: 120px; }
.map-card { pointer-events: auto; max-width: 460px; padding: 30px 32px; border-radius: 26px; color: #fff;
  background: linear-gradient(150deg, rgba(8, 18, 48, .94), rgba(16, 32, 100, .9)); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 30px 70px rgba(7, 15, 40, .45); border: 1px solid rgba(255, 255, 255, .12); }
.map-card h1 { font-size: clamp(32px, 4vw, 46px); margin: 12px 0 10px; }
.map-card .ph-lead { margin-bottom: 22px; font-size: 16.5px; }
@media (max-width: 640px) {
  .page-hero.map-hero { min-height: 0; flex-direction: column; align-items: stretch; }
  .map-bg { position: relative; top: 0; left: 0; width: 100%; height: 320px; order: 2; }
  .map-hero .container { padding-top: 24px; padding-bottom: 24px; }
  .map-card { max-width: none; }
  .map-hero + .office { margin-top: 0; padding-top: 48px !important; }
}
.person .p-role { margin: -4px 0 8px; font-size: 13.5px; font-weight: 600; color: var(--blue); }

/* формуляри: съобщения и грешки */
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-msg { margin-top: 18px; padding: 14px 18px; border-radius: 14px; font-weight: 600; }
.form-msg.ok { background: #E7F8EF; color: #067647; border: 1px solid #ABEFC6; }
.form-msg.err { background: #FDECEC; color: #B42318; border: 1px solid #FECDCA; }
.field-err { color: #B42318; font-size: 13px; font-weight: 600; }
.fgrid [aria-invalid="true"] { border-color: #E5484D; background: #FFF7F7; }
.form button[disabled] { opacity: .6; cursor: progress; }
.fgrid label > input, .fgrid label > select, .fgrid label > textarea, .fgrid label > .field-err { grid-column: 1 / -1; }
.fgrid label .req { justify-self: start; }
