/* ==========================================================================
   БИЕЛЕКТРА ООД — основен стилов файл
   Статичен сайт, без външни зависимости освен Google Fonts.
   Съдържание:
     1. Токени         8. Карти           15. Контакти/форма
     2. Основа         9. Брояч           16. Footer
     3. Layout        10. Процес          17. Вътрешни страници
     4. Заглавия      11. Split секции    18. Анимации
     5. Бутони        12. Услуги          19. Back-to-top
     6. Header        13. Проекти         20. Responsive
     7. Hero          14. CTA лента       21. Print
   ========================================================================== */

/* --- 1. Дизайн токени -------------------------------------------------- */
:root {
  /* Фирмени цветове (от логото) */
  --orange:        #ee8623;
  --orange-600:    #d9731a;
  --orange-700:    #b85f12;
  --orange-300:    #f7b070;
  --orange-soft:   rgba(238, 134, 35, .12);
  --orange-glow:   rgba(238, 134, 35, .38);

  /* Тъмни повърхности */
  --ink-900:       #0d1218;
  --ink-800:       #141b24;
  --ink-700:       #1d2731;
  --ink-600:       #2a3641;

  /* Светли повърхности */
  --white:         #ffffff;
  --tint:          #fdf7f1;          /* топъл off-white вместо сиво */
  --tint-2:        #f7efe6;
  --line:          #e8e0d8;
  --line-cool:     #e2e6ec;
  --line-dark:     rgba(255, 255, 255, .11);

  /* Текст */
  --text:          #161d26;
  --text-muted:    #62707f;
  --text-invert:   #f1f4f8;
  --text-invert-muted: #a3b1c1;

  /* Размери */
  --wrap:          1220px;
  --wrap-narrow:   880px;
  --radius:        10px;
  --radius-sm:     6px;
  --pill:          100px;
  --topbar-h:      42px;
  --header-h:      104px;

  /* Сенки */
  --shadow-sm:  0 2px 6px rgba(16, 22, 30, .05);
  --shadow-md:  0 6px 18px rgba(16, 22, 30, .07), 0 2px 6px rgba(16, 22, 30, .04);
  --shadow-lg:  0 18px 40px rgba(16, 22, 30, .11), 0 6px 14px rgba(16, 22, 30, .06);
  --shadow-orange: 0 10px 26px rgba(238, 134, 35, .30);

  /* Типография */
  --font-head: 'Oswald', 'Arial Narrow', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;

  --ease:      cubic-bezier(.25, .8, .35, 1);
  --ease-out:  cubic-bezier(.16, 1, .3, 1);
}

/* --- 2. Основа --------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 20px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.75;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg, video { max-width: 100%; height: auto; display: block; }

a { color: var(--orange-600); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--orange); }

h1, h2, h3, h4, h5 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.16;
  margin: 0 0 .5em;
  color: var(--text);
}

h1 { font-size: clamp(2.2rem, 5.4vw, 3.9rem); font-weight: 700; letter-spacing: -.012em; line-height: 1.08; }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.65rem); font-weight: 600; letter-spacing: -.008em; }
h3 { font-size: clamp(1.14rem, 2vw, 1.32rem); }
h4 { font-size: 1.05rem; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0 0 1.2em; padding-left: 1.3em; }
li { margin-bottom: .45em; }

strong { font-weight: 600; color: var(--text); }

::selection { background: var(--orange); color: #fff; }

:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 3px; }

/* --- 3. Layout --------------------------------------------------------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 24px; }
.wrap--narrow { max-width: var(--wrap-narrow); }

.section { padding: clamp(52px, 6.5vw, 88px) 0; position: relative; }
.section--tight { padding: clamp(38px, 4.5vw, 56px) 0; }
.section--tint { background: var(--tint); }
.section--dark { background: var(--ink-900); color: var(--text-invert); }
.section--dark h2, .section--dark h3, .section--dark h4 { color: var(--white); }
.section--dark p { color: var(--text-invert-muted); }

/* Деликатен технически шарж във фона на светли секции */
.section--pattern::before {
  content: '';
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='104' viewBox='0 0 120 104'%3E%3Cpath d='M30 2 60 19v34L30 70 0 53V19z' fill='none' stroke='%23c9a882' stroke-width='1'/%3E%3Cpath d='M90 2l30 17v34L90 70 60 53V19z' fill='none' stroke='%23c9a882' stroke-width='1'/%3E%3Cpath d='M60 53l30 17v34' fill='none' stroke='%23c9a882' stroke-width='1'/%3E%3C/svg%3E");
  opacity: .16;
  pointer-events: none;
}
.section--pattern > .wrap { position: relative; z-index: 1; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--orange); color: #fff; padding: 12px 20px; z-index: 999; font-weight: 600;
}
.skip-link:focus { left: 0; color: #fff; }

/* --- 4. Заглавия на секции --------------------------------------------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-head);
  font-size: .84rem; font-weight: 500;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--orange-600);
  margin-bottom: 14px;
}
.eyebrow::after { content: ''; width: 42px; height: 2px; background: var(--orange); flex: none; }
.section--dark .eyebrow { color: var(--orange-300); }

.section-head { max-width: 720px; margin-bottom: clamp(30px, 4vw, 48px); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center .eyebrow::before {
  content: ''; width: 42px; height: 2px; background: var(--orange); flex: none;
}
.section-head p { font-size: 1.05rem; color: var(--text-muted); margin-top: -.15em; }
.section--dark .section-head p { color: var(--text-invert-muted); }

/* Оранжево подчертаване на дума в заглавие */
.mark {
  position: relative; display: inline-block; color: inherit;
}
.mark::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: .06em;
  height: .11em; background: var(--orange); border-radius: 2px;
  transform: scaleX(0); transform-origin: left;
  transition: transform .7s .35s var(--ease-out);
}
.is-visible .mark::after, .mark.is-visible::after { transform: scaleX(1); }

/* --- 5. Бутони --------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-head);
  font-size: .95rem; font-weight: 500;
  letter-spacing: .09em; text-transform: uppercase;
  padding: 16px 32px;
  border: 2px solid transparent;
  border-radius: var(--pill);
  cursor: pointer; line-height: 1; white-space: nowrap;
  position: relative; overflow: hidden;
  transition: color .25s var(--ease), background .25s var(--ease),
              border-color .25s var(--ease), transform .25s var(--ease),
              box-shadow .25s var(--ease);
}
.btn svg { width: 17px; height: 17px; flex: none; transition: transform .3s var(--ease); }
.btn:hover svg { transform: translateX(4px); }

.btn--primary { background: var(--orange); color: #fff; border-color: var(--orange); }
.btn--primary:hover {
  background: var(--orange-700); border-color: var(--orange-700); color: #fff;
  transform: translateY(-3px); box-shadow: var(--shadow-orange);
}

.btn--ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--orange); color: var(--orange-700); transform: translateY(-3px); }

.btn--ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.38); }
.btn--ghost-light:hover { background: #fff; border-color: #fff; color: var(--ink-900); transform: translateY(-3px); }

.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* Текстова връзка със стрелка */
.link-arrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-head); font-size: .88rem; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--text); position: relative; padding-bottom: 4px;
}
.link-arrow::after {
  content: ''; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%;
  background: var(--orange); transform: scaleX(.34); transform-origin: left;
  transition: transform .35s var(--ease);
}
.link-arrow svg { width: 15px; height: 15px; color: var(--orange); transition: transform .3s var(--ease); }
.link-arrow:hover { color: var(--orange-700); }
.link-arrow:hover::after { transform: scaleX(1); }
.link-arrow:hover svg { transform: translateX(5px); }

/* --- 6. Топ лента + Header --------------------------------------------- */
.topbar {
  background: var(--ink-900);
  color: var(--text-invert-muted);
  font-size: .86rem;
  border-bottom: 1px solid var(--line-dark);
}
.topbar__inner {
  display: flex; align-items: center; gap: 26px;
  height: var(--topbar-h);
}
.topbar__item { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.topbar__item svg { width: 15px; height: 15px; color: var(--orange); flex: none; }
.topbar a { color: var(--text-invert-muted); }
.topbar a:hover { color: var(--orange-300); }
/* Facebook бутонът е премахнат — работното време държи десния край. */
.topbar__item--addr { margin-left: auto; }
.topbar__socials { margin-left: auto; display: flex; gap: 6px; }
.topbar__socials a {
  width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.topbar__socials a:hover { background: var(--orange); color: #fff; }
.topbar__socials svg { width: 15px; height: 15px; }

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(13, 18, 24, .94);
  backdrop-filter: saturate(170%) blur(14px);
  -webkit-backdrop-filter: saturate(170%) blur(14px);
  border-bottom: 1px solid var(--line-dark);
  transition: box-shadow .3s var(--ease), background .3s var(--ease);
}
.site-header.is-scrolled {
  background: rgba(13, 18, 24, .99);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .3);
}

.header-inner { display: flex; align-items: center; gap: 22px; height: var(--header-h); }

.logo { display: flex; align-items: center; flex: none; margin-right: auto; }
.logo svg { height: 76px; width: auto; color: #fff; transition: transform .3s var(--ease); }
.logo:hover svg { transform: scale(1.04); }

.nav { display: flex; align-items: center; gap: 2px; }
.nav a {
  font-family: var(--font-head);
  font-size: .95rem; font-weight: 400;
  letter-spacing: .09em; text-transform: uppercase;
  color: var(--text-invert-muted);
  padding: 12px 15px;
  position: relative;
  transition: color .22s var(--ease);
}
.nav a::after {
  content: ''; position: absolute; left: 15px; right: 15px; bottom: 6px;
  height: 2px; background: var(--orange);
  transform: scaleX(0); transform-origin: center;
  transition: transform .3s var(--ease);
}
.nav a:hover { color: #fff; }
.nav a:hover::after { transform: scaleX(1); }
.nav a.is-active { color: #fff; }
.nav a.is-active::after { transform: scaleX(1); }

.header-cta {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-head); font-weight: 500;
  font-size: .92rem; letter-spacing: .09em; text-transform: uppercase;
  color: #fff; background: var(--orange);
  padding: 14px 24px; border-radius: var(--pill); flex: none;
  transition: background .22s var(--ease), transform .22s var(--ease), box-shadow .22s var(--ease);
}
.header-cta:hover {
  background: var(--orange-700); color: #fff;
  transform: translateY(-2px); box-shadow: var(--shadow-orange);
}
.header-cta svg { width: 16px; height: 16px; transition: transform .3s var(--ease); }
.header-cta:hover svg { transform: translateX(4px); }

/* Бутон „обади се“ — само на телефон */
.header-call {
  display: none; width: 46px; height: 46px; flex: none;
  place-items: center; border-radius: 50%;
  background: var(--orange); color: #fff;
}
.header-call svg { width: 19px; height: 19px; }
.header-call:hover { background: var(--orange-700); color: #fff; }

.nav-toggle {
  display: none; width: 46px; height: 46px;
  background: transparent; border: 1px solid var(--line-dark);
  border-radius: var(--radius-sm); cursor: pointer; padding: 0;
  align-items: center; justify-content: center; flex: none;
}
.nav-toggle span { display: block; width: 20px; height: 2px; background: #fff; position: relative; transition: background .2s; }
.nav-toggle span::before, .nav-toggle span::after {
  content: ''; position: absolute; left: 0; width: 20px; height: 2px; background: #fff;
  transition: transform .28s var(--ease), top .28s var(--ease);
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { top: 0; transform: rotate(-45deg); }

/* --- 7. Hero слайдер ---------------------------------------------------- */
.hero {
  position: relative; background: var(--ink-900);
  color: var(--text-invert); overflow: hidden; isolation: isolate;
}

/* Всички слайдове седят в една клетка на грида — така секцията е
   висока колкото най-високия слайд и нищо не подскача при смяна. */
.hero__slides { display: grid; }
.hero-slide {
  grid-area: 1 / 1; position: relative; overflow: hidden;
  opacity: 0; visibility: hidden;
  transition: opacity .75s var(--ease), visibility 0s .75s;
}
.hero-slide.is-active { opacity: 1; visibility: visible; transition: opacity .75s var(--ease), visibility 0s 0s; }

/* Фон на слайда — бавно приближаване, докато слайдът е на екрана */
.hero-slide__bg {
  position: absolute; inset: 0; z-index: 0;
  background: center / cover no-repeat;
  opacity: .82;
  transform: scale(1.07);
}
.hero-slide.is-active .hero-slide__bg {
  transform: scale(1);
  transition: transform 9s linear;
}

/* Затъмняване — плътно отляво под текста, отворено отдясно към снимката */
.hero-slide::after {
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(97deg,
      rgba(13,18,24,.96) 0%, rgba(13,18,24,.90) 38%,
      rgba(13,18,24,.58) 64%, rgba(13,18,24,.26) 100%);
}

/* Диагонални ленти — влизат отдясно при смяна на слайда */
.hero-slide__stripes { position: absolute; inset: 0; z-index: 2; overflow: hidden; pointer-events: none; }
.hero-slide__stripes i {
  position: absolute; top: -30%; height: 170%; display: block;
  transform-origin: top; opacity: 0;
  transition: transform 1.1s var(--ease-out), opacity 1.1s var(--ease-out);
}
.hero-slide__stripes i:nth-child(1) { right: 9%;  width: 108px; background: var(--orange); transform: skewX(-19deg) translateX(300px); }
.hero-slide__stripes i:nth-child(2) { right: 18%; width: 34px;  background: var(--orange); transform: skewX(-19deg) translateX(220px); }
.hero-slide__stripes i:nth-child(3) { right: 22%; width: 14px;  background: #ffffff;       transform: skewX(-19deg) translateX(180px); }
.hero-slide__stripes i:nth-child(4) { right: -4%; width: 78px;  background: var(--ink-700); transform: skewX(-19deg) translateX(340px); }
.hero-slide.is-active .hero-slide__stripes i { transform: skewX(-19deg) translateX(0); }
.hero-slide.is-active .hero-slide__stripes i:nth-child(1) { opacity: .80; transition-delay: .18s; }
.hero-slide.is-active .hero-slide__stripes i:nth-child(2) { opacity: .34; transition-delay: .26s; }
.hero-slide.is-active .hero-slide__stripes i:nth-child(3) { opacity: .09; transition-delay: .32s; }
.hero-slide.is-active .hero-slide__stripes i:nth-child(4) { opacity: .75; transition-delay: .10s; }

/* Изрязаната фигура — влиза отдясно */
.hero-slide__figure {
  position: absolute; z-index: 3; right: clamp(8px, 4vw, 96px); bottom: 0;
  height: 93%; width: auto; max-width: 44%;
  object-fit: contain; object-position: bottom center;
  filter: drop-shadow(-22px 6px 44px rgba(0,0,0,.55));
  opacity: 0; transform: translateX(180px); pointer-events: none;
  transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
}
.hero-slide.is-active .hero-slide__figure { opacity: 1; transform: none; transition-delay: .5s; }

.hero__inner {
  position: relative; z-index: 4;
  padding: clamp(62px, 9.5vw, 126px) 0 clamp(72px, 8vw, 116px);
  max-width: 660px;
}
.hero h1 { color: #fff; margin-bottom: .38em; }
.hero h1 .mark::after { height: .1em; background: var(--orange); bottom: .02em; }
.hero__lead {
  font-size: clamp(1.02rem, 1.55vw, 1.16rem);
  color: #c7d2df; max-width: 590px; margin-bottom: 2.1em;
}

/* Стъпаловидно появяване на текста — същата логика като в референтния сайт */
.hero-slide .eyebrow,
.hero-slide h1,
.hero-slide .hero__lead,
.hero-slide .btn-row {
  opacity: 0;
  transition: opacity .9s var(--ease-out), transform .9s var(--ease-out);
}
.hero-slide .eyebrow    { transform: translateX(-110px); }
.hero-slide h1          { transform: translateX(110px); }
.hero-slide .hero__lead { transform: translateX(-110px); }
.hero-slide .btn-row    { transform: perspective(500px) translateY(70px); }

.hero-slide.is-active .eyebrow    { opacity: 1; transform: none; transition-delay: .22s; }
.hero-slide.is-active h1          { opacity: 1; transform: none; transition-delay: .38s; }
.hero-slide.is-active .hero__lead { opacity: 1; transform: none; transition-delay: .54s; }
.hero-slide.is-active .btn-row    { opacity: 1; transform: none; transition-delay: .72s; transition-duration: 1.1s; }
.hero-slide.is-active h1 .mark::after { transform: scaleX(1); transition: transform .7s 1.05s var(--ease-out); }

/* Стрелки вдясно */
.hero__controls {
  position: absolute; z-index: 6; top: 50%; right: clamp(12px, 2.2vw, 34px);
  transform: translateY(-50%); display: flex; flex-direction: column; gap: 10px;
}
.hero__arrow {
  width: 52px; height: 52px; border-radius: 50%; padding: 0;
  border: 1px solid rgba(255,255,255,.26); background: rgba(13,18,24,.42);
  color: #fff; display: grid; place-items: center; cursor: pointer;
  transition: background .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease);
}
.hero__arrow svg { width: 20px; height: 20px; }
.hero__arrow--prev svg { transform: rotate(180deg); }
.hero__arrow:hover { background: var(--orange); border-color: var(--orange); transform: scale(1.08); }
.hero__arrow:focus-visible { outline: 2px solid var(--orange-300); outline-offset: 3px; }

/* Точки долу вляво — всяка е и лента на времето до следващия слайд */
.hero__foot {
  position: absolute; z-index: 6; left: 0; right: 0;
  bottom: clamp(20px, 3vw, 36px); pointer-events: none;
}
.hero__foot .wrap { display: flex; }
.hero__dots { display: flex; gap: 10px; pointer-events: auto; }
.hero__dot {
  width: 40px; height: 4px; padding: 0; border: 0; border-radius: 3px;
  background: rgba(255,255,255,.24); cursor: pointer;
  position: relative; overflow: hidden;
  transition: background .3s var(--ease);
}
.hero__dot:hover { background: rgba(255,255,255,.45); }
.hero__dot:focus-visible { outline: 2px solid var(--orange-300); outline-offset: 4px; }
.hero__dot::after {
  content: ''; position: absolute; inset: 0;
  background: var(--orange); transform: scaleX(0); transform-origin: left;
}
.hero__dot.is-on::after { animation: heroDotFill var(--hero-delay, 7000ms) linear forwards; }
.hero--slider.is-paused .hero__dot.is-on::after { animation-play-state: paused; }
@keyframes heroDotFill { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* Лента с четирите услуги под hero */
.hero-strip { background: var(--ink-800); border-top: 1px solid var(--line-dark); }
.hero-strip__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.hero-strip__item {
  display: flex; align-items: center; gap: 15px;
  padding: 26px 22px;
  border-left: 1px solid var(--line-dark);
  color: var(--text-invert);
  font-family: var(--font-head); font-size: .98rem; font-weight: 400;
  letter-spacing: .06em; text-transform: uppercase;
  position: relative; overflow: hidden;
  transition: color .25s var(--ease);
}
.hero-strip__item:first-child { border-left: none; }
.hero-strip__item::before {
  content: ''; position: absolute; inset: 0; background: var(--orange);
  transform: translateY(100%); transition: transform .35s var(--ease); z-index: 0;
}
.hero-strip__item:hover::before { transform: translateY(0); }
.hero-strip__item > * { position: relative; z-index: 1; }
.hero-strip__item svg { width: 26px; height: 26px; color: var(--orange); flex: none; transition: color .25s var(--ease), transform .35s var(--ease); }
.hero-strip__item:hover { color: #fff; }
.hero-strip__item:hover svg { color: #fff; transform: scale(1.12) rotate(-6deg); }

/* --- 8. Карти ---------------------------------------------------------- */
.grid { display: grid; gap: 24px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
/* Картите на услугите: броят им се мени от панела, затова мрежата се
   нагажда сама. При 4 излиза същото като преди; при 3 или 5 не остава
   самотна карта на долния ред. */
.grid--cards { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.card {
  background: var(--white);
  border: 1px solid var(--line-cool);
  border-radius: var(--radius);
  padding: 34px 30px;
  position: relative; overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
}
.card::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: var(--orange); transform: scaleX(0); transform-origin: left;
  transition: transform .4s var(--ease);
}
.card:hover { transform: translateY(-7px); box-shadow: var(--shadow-lg); border-color: transparent; }
.card:hover::after { transform: scaleX(1); }
.section--dark .card { background: var(--ink-800); border-color: var(--line-dark); }
.section--dark .card p { color: var(--text-invert-muted); }

.card__icon {
  width: 60px; height: 60px; display: grid; place-items: center;
  background: var(--orange-soft); border-radius: var(--radius-sm);
  color: var(--orange-600); margin-bottom: 22px; flex: none;
  transition: background .35s var(--ease), color .35s var(--ease), transform .45s var(--ease);
}
.card__icon svg { width: 30px; height: 30px; }
.card:hover .card__icon { background: var(--orange); color: #fff; transform: rotate(-7deg) scale(1.06); }

.card h3 { margin-bottom: .45em; }
.card p { color: var(--text-muted); font-size: .96rem; }
.card .link-arrow { margin-top: auto; padding-top: 20px; }
.section--dark .card .link-arrow { color: #fff; }

/* --- 9. Брояч ---------------------------------------------------------- */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; background: var(--line-dark);
  border: 1px solid var(--line-dark); border-radius: var(--radius); overflow: hidden;
}
.stat { background: var(--ink-800); padding: 36px 24px; text-align: center; transition: background .3s var(--ease); }
.stat:hover { background: var(--ink-700); }
.stat__num {
  font-family: var(--font-head); font-weight: 700;
  font-size: clamp(2.2rem, 4.2vw, 3.1rem);
  color: var(--orange); line-height: 1; margin-bottom: 10px;
}
.stat__label { font-size: .9rem; color: var(--text-invert-muted); letter-spacing: .04em; }

/* --- 10. Процес -------------------------------------------------------- */
.steps { counter-reset: step; }
.step {
  display: grid; grid-template-columns: 84px 1fr; gap: 24px;
  padding: 28px 0; border-top: 1px solid var(--line-cool); align-items: start;
  transition: background .3s var(--ease);
}
.step:last-child { border-bottom: 1px solid var(--line-cool); }
.step__num {
  counter-increment: step;
  font-family: var(--font-head); font-weight: 700; font-size: 2.3rem; line-height: 1;
  color: var(--orange); opacity: .92;
}
.step__num::before { content: '0' counter(step); }
.step h3 { margin-bottom: .3em; }
.step p { color: var(--text-muted); margin: 0; font-size: .97rem; }

/* --- 11. Split секции -------------------------------------------------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 4.5vw, 62px); align-items: center; }
.split--reverse .split__media { order: -1; }
.split__media { position: relative; }
.split__media img, .split__media svg {
  width: 100%; border-radius: var(--radius); box-shadow: var(--shadow-lg);
}
/* оранжева рамка-акцент зад изображението */
.split__media::before {
  content: ''; position: absolute; inset: 18px -18px -18px 18px;
  border: 2px solid var(--orange); border-radius: var(--radius); z-index: -1;
  opacity: .55;
}

.check-list { list-style: none; padding: 0; margin: 0 0 1.6em; }
.check-list li { position: relative; padding-left: 34px; margin-bottom: .72em; color: var(--text-muted); }
.check-list li::before {
  content: ''; position: absolute; left: 0; top: .44em;
  width: 21px; height: 21px; border-radius: 50%;
  background: var(--orange-soft);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d9731a' stroke-width='3.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-size: 13px; background-repeat: no-repeat; background-position: center;
}
.section--dark .check-list li { color: var(--text-invert-muted); }

/* --- 12. Услуги — детайлни блокове ------------------------------------- */
.service-block { padding: clamp(38px, 5.5vw, 66px) 0; border-top: 1px solid var(--line-cool); }
.service-block:first-of-type { border-top: none; padding-top: 0; }
.service-block__head { display: flex; gap: 22px; align-items: flex-start; margin-bottom: 30px; }
.service-block__head .card__icon { margin-bottom: 0; }
.service-block__head h2 { margin-bottom: .2em; }
.service-block__head p { color: var(--text-muted); margin: 0; }

.tag-list { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 0; }
.tag-list li {
  background: var(--tint); border: 1px solid var(--line);
  padding: 8px 18px; border-radius: var(--pill);
  font-size: .89rem; color: var(--text-muted); margin: 0;
  transition: all .25s var(--ease);
}
.tag-list li:hover { background: var(--orange); border-color: var(--orange); color: #fff; }

/* --- 13. Проекти ------------------------------------------------------- */
.project {
  border: 1px solid var(--line-cool); border-radius: var(--radius);
  overflow: hidden; background: var(--white);
  display: flex; flex-direction: column;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.project:hover { transform: translateY(-7px); box-shadow: var(--shadow-lg); }
.project__media { aspect-ratio: 4 / 3; background: var(--ink-800); overflow: hidden; position: relative; }
.project__media img, .project__media svg {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .6s var(--ease);
}
.project:hover .project__media img { transform: scale(1.07); }
.project__media::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(13,18,24,.5));
  opacity: 0; transition: opacity .35s var(--ease);
}
.project:hover .project__media::after { opacity: 1; }
.project__body { padding: 24px 26px 28px; }
.project__cat {
  font-family: var(--font-head); font-size: .78rem;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--orange-600); display: block; margin-bottom: 9px;
}
.project h3 { font-size: 1.16rem; margin-bottom: .35em; }
.project p { font-size: .94rem; color: var(--text-muted); margin: 0; }

/* --- 14. CTA лента ----------------------------------------------------- */
.cta-band { background: var(--ink-900); position: relative; overflow: hidden; }
.cta-band__stripes { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.cta-band__stripes i {
  position: absolute; top: -30%; height: 170%; display: block; transform: skewX(-19deg);
}
.cta-band__stripes i:nth-child(1) { right: 3%;  width: 92px; background: var(--orange); opacity: .80; }
.cta-band__stripes i:nth-child(2) { right: 13%; width: 30px; background: var(--orange); opacity: .34; }
.cta-band__stripes i:nth-child(3) { right: 17%; width: 13px; background: #fff; opacity: .09; }
.cta-band__inner {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: space-between;
  gap: 36px; flex-wrap: wrap;
  padding: clamp(44px, 6vw, 74px) 0;
}
.cta-band h2 { color: #fff; margin-bottom: .32em; max-width: 620px; }
.cta-band p { color: var(--text-invert-muted); margin: 0; max-width: 560px; }

/* --- 15. Контакти и форма ---------------------------------------------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.12fr; gap: clamp(30px, 4.5vw, 58px); align-items: start; }

.contact-card {
  border: 1px solid var(--line-cool); border-radius: var(--radius);
  padding: 26px 28px 28px; background: var(--white); margin-bottom: 18px;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.contact-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--orange-300); }
.contact-card h3 { font-size: 1.12rem; margin-bottom: .1em; }
.contact-card__role { font-size: .88rem; color: var(--text-muted); margin-bottom: 16px; }
.contact-line { display: flex; align-items: center; gap: 12px; padding: 7px 0; font-size: 1rem; }
.contact-line svg { width: 18px; height: 18px; color: var(--orange); flex: none; }
.contact-line a { color: var(--text); font-weight: 500; }
.contact-line a:hover { color: var(--orange-700); }
.section--dark .contact-line a, .section--dark .contact-line span { color: #fff; }

.form { background: var(--tint); border-radius: var(--radius); padding: clamp(24px, 3.5vw, 40px); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: .88rem; font-weight: 500; margin-bottom: 7px; color: var(--text); }
.field .req { color: var(--orange-600); }
.field input, .field select, .field textarea {
  width: 100%; font-family: inherit; font-size: 1rem; color: var(--text);
  padding: 14px 16px; background: var(--white);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  transition: border-color .22s var(--ease), box-shadow .22s var(--ease);
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--orange); box-shadow: 0 0 0 4px var(--orange-soft);
}
.field--check { display: flex; gap: 11px; align-items: flex-start; }
.field--check input { width: 18px; height: 18px; flex: none; margin-top: 4px; accent-color: var(--orange); }
.field--check label { font-size: .88rem; color: var(--text-muted); font-weight: 400; margin: 0; line-height: 1.6; }
.field__error { display: none; color: #c0392b; font-size: .84rem; margin-top: 6px; }
.field.has-error input, .field.has-error textarea, .field.has-error select { border-color: #c0392b; }
.field.has-error .field__error { display: block; }

.form-note { font-size: .85rem; color: var(--text-muted); margin-top: 16px; }
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; }

.form-status { padding: 14px 18px; border-radius: var(--radius-sm); margin-bottom: 18px; font-size: .95rem; display: none; }
.form-status.is-ok   { display: block; background: #e7f6ec; color: #1d6b38; border: 1px solid #b9e3c8; }
.form-status.is-fail { display: block; background: #fdecea; color: #a5281b; border: 1px solid #f5c4bd; }

.map-embed { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line-cool); line-height: 0; }
.map-embed iframe { width: 100%; height: 380px; border: 0; }

/* --- 16. Footer -------------------------------------------------------- */
.site-footer {
  background: var(--ink-900); color: var(--text-invert-muted);
  padding: clamp(46px, 5.5vw, 70px) 0 0; font-size: .95rem;
  position: relative;
}
.footer-grid { display: grid; grid-template-columns: 1.7fr 1fr 1fr 1.25fr; gap: 40px; padding-bottom: 46px; }
.site-footer h4 {
  color: #fff; font-size: .9rem; letter-spacing: .16em;
  text-transform: uppercase; font-weight: 500; margin-bottom: 20px;
  position: relative; padding-bottom: 12px;
}
.site-footer h4::after { content: ''; position: absolute; left: 0; bottom: 0; width: 30px; height: 2px; background: var(--orange); }
.site-footer a { color: var(--text-invert-muted); }
.site-footer a:hover { color: var(--orange-300); }
.footer-logo svg { height: 78px; width: auto; color: #fff; margin-bottom: 18px; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: .62em; }
.footer-links a { display: inline-block; transition: transform .22s var(--ease), color .22s var(--ease); }
.footer-links a:hover { transform: translateX(4px); }

.social { display: flex; gap: 10px; margin-top: 20px; }
.social a {
  width: 42px; height: 42px; display: grid; place-items: center;
  border: 1px solid var(--line-dark); border-radius: 50%;
  transition: all .25s var(--ease);
}
.social a:hover { background: var(--orange); border-color: var(--orange); color: #fff; transform: translateY(-3px); }
.social svg { width: 18px; height: 18px; }

.footer-bottom {
  border-top: 1px solid var(--line-dark); padding: 22px 0;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .87rem;
}
.footer-bottom p { margin: 0; }

/* --- 17. Вътрешни страници --------------------------------------------- */
.page-hero {
  background: var(--ink-900); color: var(--text-invert);
  padding: clamp(48px, 6.5vw, 82px) 0; position: relative; overflow: hidden; isolation: isolate;
}
.page-hero__bg {
  position: absolute; inset: 0; z-index: -3;
  background: url('../images/hero-bg.svg') center / cover no-repeat; opacity: .34;
}
.page-hero::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(97deg, rgba(13,18,24,.97) 30%, rgba(13,18,24,.62));
}
.page-hero__inner { position: relative; z-index: 1; max-width: 760px; }
.page-hero h1 { color: #fff; margin-bottom: .3em; }
.page-hero p { color: #bcc7d5; font-size: 1.06rem; margin: 0; max-width: 620px; }

.breadcrumbs { font-size: .85rem; color: var(--text-invert-muted); margin-bottom: 18px; display: flex; gap: 9px; flex-wrap: wrap; }
.breadcrumbs a { color: var(--text-invert-muted); }
.breadcrumbs a:hover { color: var(--orange-300); }
.breadcrumbs span { opacity: .5; }

.prose h2 { margin-top: 1.8em; }
.prose h3 { margin-top: 1.5em; }
.prose ul { color: var(--text-muted); }

/* --- 18. Анимации при скрол -------------------------------------------- */
[data-anim] {
  opacity: 0;
  transition: opacity .75s var(--ease-out), transform .75s var(--ease-out);
  will-change: opacity, transform;
}
[data-anim="up"]    { transform: translateY(34px); }
[data-anim="down"]  { transform: translateY(-28px); }
[data-anim="left"]  { transform: translateX(-42px); }
[data-anim="right"] { transform: translateX(42px); }
[data-anim="zoom"]  { transform: scale(.94); }
[data-anim="fade"]  { transform: none; }
[data-anim].is-visible { opacity: 1; transform: none; }

/* Заглавие, което се появява дума по дума */
.split-word { display: inline-block; overflow: hidden; vertical-align: top; }
.split-word > span {
  display: inline-block;
  transform: translateY(105%);
  transition: transform .7s var(--ease-out);
}
.is-visible .split-word > span { transform: none; }

/* Пулсиращ акцент върху иконите в hero лентата */
@keyframes softPulse { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  [data-anim] { opacity: 1 !important; transform: none !important; }
  .split-word > span { transform: none !important; }
  /* Слайдерът остава, но без движение — само видимият слайд се показва */
  .hero-slide.is-active .hero-slide__bg { transform: none; }
  .hero-slide .eyebrow, .hero-slide h1,
  .hero-slide .hero__lead, .hero-slide .btn-row,
  .hero-slide__figure { opacity: 1 !important; transform: none !important; }
  .hero-slide__stripes i { opacity: 1 !important; transform: skewX(-19deg) !important; }
  .hero-slide__stripes i:nth-child(1) { opacity: .80 !important; }
  .hero-slide__stripes i:nth-child(2) { opacity: .34 !important; }
  .hero-slide__stripes i:nth-child(3) { opacity: .09 !important; }
  .hero-slide__stripes i:nth-child(4) { opacity: .75 !important; }
  .hero__dot.is-on::after { animation: none; transform: scaleX(1); }
}

/* --- 19. Back to top --------------------------------------------------- */
.to-top {
  position: fixed; right: 22px; bottom: 28px; z-index: 90;
  display: inline-flex; flex-direction: column; align-items: center; gap: 10px;
  font-family: var(--font-head); font-size: .72rem; letter-spacing: .22em;
  text-transform: uppercase; color: var(--orange-700);
  writing-mode: vertical-rl;
  background: none; border: 0; cursor: pointer; padding: 6px;
  opacity: 0; transform: translateY(14px); pointer-events: none;
  transition: opacity .3s var(--ease), transform .3s var(--ease), color .2s var(--ease);
}
.to-top.is-shown { opacity: 1; transform: none; pointer-events: auto; }
.to-top::after { content: ''; width: 2px; height: 42px; background: var(--orange); border-radius: 2px; }
.to-top:hover { color: var(--orange); transform: translateY(-3px); }

/* --- 20. Responsive ---------------------------------------------------- */
/* Под тази ширина фигурата вече няма къде да застане, без да влезе в текста */
@media (max-width: 1180px) {
  .hero-slide__figure { max-width: 38%; right: 8px; opacity: .55; }
  .hero-slide.is-active .hero-slide__figure { opacity: .55; }
  .hero__inner { max-width: 560px; }
}
@media (max-width: 1000px) {
  .hero-slide__figure { display: none; }
  .hero__inner { max-width: none; }
  .hero-slide::after {
    background: linear-gradient(97deg,
        rgba(13,18,24,.95) 0%, rgba(13,18,24,.88) 50%, rgba(13,18,24,.62) 100%);
  }
  .hero__controls { flex-direction: row; top: auto; bottom: clamp(16px, 3vw, 32px); transform: none; }
  .hero__arrow { width: 44px; height: 44px; }
}

@media (max-width: 1080px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 34px; }
  .grid--4, .grid--cards { grid-template-columns: repeat(2, 1fr); }
  .hero-strip__grid { grid-template-columns: repeat(2, 1fr); }
  .hero-strip__item:nth-child(3) { border-left: none; }
  .hero-strip__item:nth-child(n+3) { border-top: 1px solid var(--line-dark); }
  .topbar__item--addr { display: none; }
}

@media (max-width: 920px) {
  :root { --header-h: 86px; }
  .nav-toggle { display: inline-flex; }

  /* Панел отдясно, а не падащ списък: по-лесно се затваря с палец
     и не крие съдържанието зад себе си на цял екран. */
  .nav {
    position: fixed; top: 0; right: 0; bottom: 0; left: auto; z-index: 80;
    width: min(88vw, 360px);
    flex-direction: column; align-items: stretch;
    background: var(--ink-900); border-left: 1px solid var(--line-dark);
    padding: calc(18px + env(safe-area-inset-top)) 22px
             calc(24px + env(safe-area-inset-bottom));
    padding-right: calc(22px + env(safe-area-inset-right));
    gap: 0;
    transform: translateX(100%); visibility: hidden;
    transition: transform .3s var(--ease), visibility .3s;
    overflow-y: auto; overscroll-behavior: contain;
    box-shadow: -18px 0 46px rgba(0,0,0,.4);
  }
  .nav.is-open { transform: none; visibility: visible; }

  /* 44px минимална цел за пръст — важи и за връзките, и за бутоните */
  .nav a {
    padding: 15px 4px; min-height: 44px; display: flex; align-items: center;
    font-size: 1.06rem; border-bottom: 1px solid var(--line-dark);
  }
  .nav a::after { left: 4px; right: auto; width: 26px; bottom: 9px; }

  .header-cta { display: none; }
  .header-call { display: grid; min-width: 44px; min-height: 44px; }
  .nav-toggle { min-width: 44px; min-height: 44px; }

  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; }
  .split--reverse .split__media { order: 0; }
  .split__media::before { inset: 12px -12px -12px 12px; }
  .contact-grid { grid-template-columns: 1fr; }
  /* На тесен екран наклонът на лентите пресича текста — вместо тях
     слагаме прав оранжев акцент по десния ръб. */
  .hero-slide__stripes i, .cta-band__stripes i { display: none; }
  .hero-slide__stripes::after, .cta-band__stripes::after {
    content: ''; position: absolute; top: 0; right: 0; bottom: 0; width: 6px;
    background: linear-gradient(180deg, var(--orange), rgba(238,134,35,.15));
  }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding-inline: 18px; }
  .topbar__item--mail { display: none; }
  .topbar__inner { justify-content: space-between; }

  .grid--2, .grid--3, .grid--4, .grid--cards { grid-template-columns: 1fr; }
  .hero-strip__grid { grid-template-columns: 1fr; }
  .hero-strip__item { border-left: none; border-top: 1px solid var(--line-dark); }
  .hero-strip__item:first-child { border-top: none; }

  .form-row { grid-template-columns: 1fr; gap: 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .step { grid-template-columns: 58px 1fr; gap: 16px; }
  .step__num { font-size: 1.8rem; }
  .btn { width: 100%; }
  .cta-band .btn, .hero .btn { width: auto; }
  .service-block__head { flex-direction: column; gap: 14px; }
  .footer-bottom { flex-direction: column; gap: 8px; }
  .logo svg { height: 62px; }
  .split__media::before { display: none; }
  .to-top { right: 12px; bottom: 16px; }
  .eyebrow { font-size: .78rem; letter-spacing: .14em; }
}

/* --- 21. Print --------------------------------------------------------- */
@media print {
  .topbar, .site-header, .nav-toggle, .cta-band, .btn, .site-footer, .to-top { display: none !important; }
  body { font-size: 12pt; color: #000; }
  .hero, .page-hero { background: #fff; color: #000; }
  .hero h1, .page-hero h1 { color: #000; }
  [data-anim] { opacity: 1 !important; transform: none !important; }
}

/* ==========================================================================
   22. Проекти — карта като връзка, страница на обект, снимки
   ========================================================================== */

/* Цялата карта е една връзка, за да е удобна и с пръст */
.project__link { display: flex; flex-direction: column; height: 100%; color: inherit; }
.project__link:hover { color: inherit; }

.project__count {
  position: absolute; right: 12px; bottom: 12px; z-index: 2;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: var(--pill);
  background: rgba(13,18,24,.72); color: #fff;
  font-family: var(--font-head); font-size: .8rem; letter-spacing: .04em;
  backdrop-filter: blur(3px);
}
.project__count svg { width: 15px; height: 15px; }

.project__body { display: flex; flex-direction: column; flex: 1; }
.project__more {
  margin-top: auto; padding-top: 16px;
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-head); font-size: .84rem;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--orange-600);
}
.project__more svg { width: 16px; height: 16px; transition: transform .3s var(--ease); }
.project:hover .project__more svg { transform: translateX(5px); }

/* --- Страница на обект --------------------------------------------------- */
.project-cover {
  margin: 0 0 clamp(32px, 4vw, 52px);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 16 / 9; background: var(--ink-800);
}
.project-cover img { width: 100%; height: 100%; object-fit: cover; }

.project-detail {
  display: grid; grid-template-columns: minmax(0, 1fr) 340px;
  gap: clamp(30px, 4vw, 60px); align-items: start;
}
.project-detail__text p { font-size: 1.04rem; }

.project-detail__facts {
  background: var(--tint); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px 26px;
  position: sticky; top: calc(var(--header-h) + 20px);
}
.project-detail__facts h3 {
  font-size: .86rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--orange-600); margin-bottom: 18px;
}
.project-detail__facts dl { margin: 0 0 24px; }
.project-detail__facts dl > div {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 11px 0; border-bottom: 1px solid var(--line);
}
.project-detail__facts dl > div:last-child { border-bottom: 0; }
.project-detail__facts dt { color: var(--text-muted); font-size: .92rem; }
.project-detail__facts dd {
  margin: 0; font-weight: 600; text-align: right; font-size: .95rem;
}

/* --- Снимки от обекта ---------------------------------------------------- */
.photo-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.photo-grid__item {
  padding: 0; border: 0; background: var(--ink-800); cursor: zoom-in;
  border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 4 / 3; position: relative;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.photo-grid__item img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .6s var(--ease);
}
.photo-grid__item:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.photo-grid__item:hover img { transform: scale(1.06); }

/* --- Предишен / следващ обект -------------------------------------------- */
.project-nav {
  display: grid; grid-template-columns: 1fr auto 1fr;
  gap: 20px; align-items: center;
}
.project-nav__side { display: flex; flex-direction: column; gap: 3px; color: var(--text); }
.project-nav__side span {
  font-family: var(--font-head); font-size: .78rem;
  letter-spacing: .16em; text-transform: uppercase; color: var(--orange-600);
}
.project-nav__side strong { font-weight: 600; }
.project-nav__side:hover strong { color: var(--orange-600); }
.project-nav__side--next { text-align: right; align-items: flex-end; }

/* ==========================================================================
   23. Език
   ========================================================================== */
.lang-switch { display: flex; align-items: center; gap: 2px; margin-left: 4px; }
.lang-switch a {
  font-family: var(--font-head); font-size: .82rem; font-weight: 500;
  letter-spacing: .08em;
  padding: 7px 10px; border-radius: var(--radius-sm);
  color: var(--text-invert-muted);
  transition: color .2s var(--ease), background .2s var(--ease);
}
.lang-switch a:hover { color: #fff; background: rgba(255,255,255,.08); }
.lang-switch a.is-on { color: var(--orange); font-weight: 600; }
.lang-switch a.is-on:hover { background: none; }

/* В мобилното меню езиците са отделен ред с едри бутони */
.nav__lang { display: none; }

/* ==========================================================================
   24. Мобилно меню
   ========================================================================== */
.nav__close { display: none; }

.nav-backdrop {
  position: fixed; inset: 0; z-index: 70;
  background: rgba(8, 12, 17, .55);
  opacity: 0; pointer-events: none;
  transition: opacity .25s var(--ease);
  backdrop-filter: blur(2px);
}
.nav-backdrop.is-on { opacity: 1; pointer-events: auto; }

/* ==========================================================================
   25. Преглед на снимка на цял екран
   ========================================================================== */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(8, 11, 16, .94);
  display: grid; grid-template-rows: 1fr auto;
  padding: clamp(14px, 3vw, 34px);
  padding-top: calc(clamp(14px, 3vw, 34px) + env(safe-area-inset-top));
  padding-bottom: calc(clamp(14px, 3vw, 34px) + env(safe-area-inset-bottom));
}
.lightbox[hidden] { display: none; }

.lightbox__figure {
  margin: 0; display: grid; place-items: center; min-height: 0;
}
.lightbox__figure img {
  max-width: 100%; max-height: 100%;
  width: auto; height: auto; object-fit: contain;
  border-radius: var(--radius-sm);
}
.lightbox figcaption {
  text-align: center; color: var(--text-invert-muted);
  font-size: .9rem; padding-top: 14px;
}

.lightbox__close,
.lightbox__nav {
  position: absolute; z-index: 2;
  width: 48px; height: 48px; min-width: 44px; min-height: 44px;
  display: grid; place-items: center;
  border: 1px solid rgba(255,255,255,.22); border-radius: 50%;
  background: rgba(255,255,255,.06); color: #fff; cursor: pointer;
  transition: background .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.lightbox__close:hover,
.lightbox__nav:hover { background: var(--orange); border-color: var(--orange); transform: scale(1.06); }
.lightbox__close svg, .lightbox__nav svg { width: 22px; height: 22px; }

.lightbox__close {
  top: calc(16px + env(safe-area-inset-top));
  right: calc(16px + env(safe-area-inset-right));
}
.lightbox__nav { top: 50%; transform: translateY(-50%); }
.lightbox__nav:hover { transform: translateY(-50%) scale(1.06); }
.lightbox__nav--prev { left: clamp(10px, 2vw, 26px); }
.lightbox__nav--next { right: clamp(10px, 2vw, 26px); }

@media (max-width: 640px) {
  .lightbox__nav { top: auto; bottom: calc(18px + env(safe-area-inset-bottom)); transform: none; }
  .lightbox__nav:hover { transform: scale(1.06); }
  .lightbox figcaption { padding-bottom: 60px; }
}

/* ==========================================================================
   26. По-леки снимки на телефон
   Слайдерът зарежда и трите фона наведнъж, за да е плавна смяната.
   На широк екран това са три пъти по ~200 KB и е нормално; на телефон
   през мобилни данни не е. Затова там браузърът взима смалените
   копия, ако ги има — иначе си остава на големите и нищо не се чупи.
   ========================================================================== */
@media (max-width: 760px) {
  .hero-slide__bg { background-image: var(--bg-sm, none); }
}

/* ==========================================================================
   27. Мобилни изключения за менюто и езиците
   Стоят най-накрая нарочно: базовите правила по-горе идват след
   media заявките и иначе биха ги победили по реда на каскадата.
   ========================================================================== */
@media (max-width: 920px) {
  /* ВАЖНО: backdrop-filter върху хедъра прави от него „контейнер“ за
     всичко с position:fixed вътре — менюто оставаше затворено в лентата
     от 68 пиксела вместо да се разгъне на цял екран. На телефон размитият
     фон и без това не се вижда, затова там го махаме и слагаме плътен цвят. */
  .site-header {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: var(--ink-900);
  }
  .site-header.is-scrolled { background: var(--ink-900); }

  /* Лентата с езиците се маха от хедъра — мястото там е за логото,
     телефона и хамбургера. Езиците минават вътре в менюто. */
  .lang-switch { display: none; }

  .nav__close {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; margin: 0 -8px 10px auto;
    border: 0; background: none; color: var(--text-invert-muted); cursor: pointer;
    border-radius: 50%; transition: color .2s var(--ease), background .2s var(--ease);
  }
  .nav__close:hover { color: #fff; background: rgba(255,255,255,.08); }
  .nav__close svg { width: 22px; height: 22px; }

  .nav__lang {
    display: flex; gap: 8px; margin-top: 22px; padding-top: 20px;
    border-top: 1px solid var(--line-dark);
  }
  .nav__lang a {
    flex: 1; min-height: 44px; justify-content: center;
    border: 1px solid var(--line-dark); border-radius: var(--radius-sm);
    font-family: var(--font-head); letter-spacing: .1em;
    color: var(--text-invert-muted); padding: 10px;
  }
  .nav__lang a.is-on {
    background: var(--orange); border-color: var(--orange); color: #fff; font-weight: 600;
  }
}

/* --- 28. Без хоризонтално местене на телефон ---------------------------- */
/* Причината: [data-anim="left"/"right"] държат елемента изместен с 42px
   настрани, докато не влезе в екрана. .wrap има само 24px отстрани, тоест
   18px излизат извън екрана и страницата става по-широка от телефона —
   оттам идва бялото отстрани при бързо скролване.
   На тесен екран местим вертикално; ефектът е същият, а преливане няма. */
@media (max-width: 920px) {
  [data-anim="left"],
  [data-anim="right"] { transform: translateY(30px); }
}

/* Предпазна мрежа, ако утре нещо друго излезе извън екрана.

   ВАЖНО — режем вътре в съдържанието, НИКОГА върху <html> или <body>.
   overflow на корена се пренася върху целия прозорец, а прозорецът не може
   да е „visible“ по едната ос и „clip“ по другата — браузърът отрязва и
   вертикалата и страницата престава да се скролва изобщо. Върху #main това
   не важи: clip + visible е законна комбинация за обикновен елемент.
   clip, а не hidden: hidden прави скрол контейнер и чупи position:sticky. */
@supports (overflow: clip) {
  #main { overflow-x: clip; }
}

/* --- 29. Допълнителните снимки на услуга ------------------------------- */
/* Голямата остава голяма; останалите се нижат под нея като лента и се
   отварят във витрината. Броят им се мени от панела, затова няма
   фиксирани колони — редът се пълни, докъдето стигне. */
.photo-row {
  display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px;
}
.photo-row .photo-grid__item {
  flex: 1 1 110px; max-width: 160px; aspect-ratio: 4 / 3;
  padding: 0; border: 1px solid var(--line); border-radius: var(--radius-sm);
  overflow: hidden; background: none; cursor: pointer;
  transition: border-color .2s var(--ease), transform .2s var(--ease);
}
.photo-row .photo-grid__item:hover {
  border-color: var(--orange); transform: translateY(-2px);
}
.photo-row .photo-grid__item img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
