/* ==========================================================================
   ИНТЕРПОЛИС ЕООД — компоненти
   Слайдер, карти с услуги, портфолио, галерия, лайтбокс, сертификати,
   странична навигация, контакти, партньори.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. HERO СЛАЙДЕР  (начална страница)
   -------------------------------------------------------------------------- */
.slider {
  position: relative;
  height: clamp(420px, 68vh, 640px);
  background: var(--bg-dark);
  overflow: hidden;
}

.slider__track { position: absolute; inset: 0; }

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.85s var(--ease), visibility 0.85s;
}
.slide.is-active { opacity: 1; visibility: visible; }

.slide__img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.07);
  transition: transform 7s linear;
}
.slide.is-active .slide__img { transform: scale(1); }

/* Тъмен градиент, за да е четим текстът върху всяка снимка */
.slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(31, 55, 69, 0.55) 0%, rgba(31, 55, 69, 0.2) 55%, rgba(31, 55, 69, 0) 100%);
}

/* Текстът на слайда стои в тъмна карта, подравнена с контейнера */
.slide__body {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: max(clamp(1rem, 4vw, 2rem), calc((100% - var(--container)) / 2 + 2rem));
  transform: translateY(-50%);
  width: auto;
  max-width: min(560px, calc(100% - 2 * clamp(1rem, 4vw, 2rem)));
  margin: 0;
  padding: clamp(1.75rem, 1rem + 2.5vw, 3rem);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: rgba(20, 41, 53, 0.92);
  border-radius: var(--radius);
  box-shadow: 0 20px 50px rgba(10, 20, 28, 0.35);
}

.slide__eyebrow {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.35rem 0.95rem;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  background: var(--brand);
  border-radius: 100px;
}

/* Параграф, а не заглавие: слайдовете се въртят и не са част от
   структурата на документа — h1 на страницата остава първото заглавие. */
.slide__title {
  color: #fff;
  font-family: var(--font-head);
  font-weight: 400;
  font-size: clamp(1.9rem, 1.3rem + 2.8vw, 3.4rem);
  line-height: 1.1;
  margin: 0 0 1.5rem;
}

/* Много тесен екран — по-компактна карта, за да не се разпада текстът на букви */
@media (max-width: 300px) {
  .slide__body { left: 0.5rem; max-width: calc(100% - 1rem); padding: 1rem; }
  .slide__eyebrow { font-size: 0.68rem; letter-spacing: 0.04em; padding: 0.3rem 0.7rem; }
  .slide__title { font-size: 1.35rem; margin-bottom: 1rem; }
  .slide__cta { padding: 0.7em 1em; font-size: 0.9rem; }
}

/* Съдържанието на активния слайд се появява плавно */
.slide.is-active .slide__eyebrow,
.slide.is-active .slide__title,
.slide.is-active .slide__cta { animation: slide-in 0.75s var(--ease) both; }
.slide.is-active .slide__title { animation-delay: 0.1s; }
.slide.is-active .slide__cta   { animation-delay: 0.2s; }

@keyframes slide-in {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: none; }
}

/* Стрелки */
/* Стрелките са долу вдясно, за да не застъпват картата с текста */
.slider__arrow {
  position: absolute;
  bottom: clamp(1rem, 2vw, 1.75rem);
  z-index: 5;
  width: 50px; height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--dark);
  border: 0;
  border-radius: var(--radius-sm);
  transition: background-color 0.2s var(--ease);
}
.slider__arrow:hover { background: var(--brand); }
.slider__arrow svg { width: 20px; height: 20px; }
.slider__arrow--prev { right: calc(clamp(0.75rem, 2vw, 1.75rem) + 58px); }
.slider__arrow--next { right: clamp(0.75rem, 2vw, 1.75rem); }

@media (max-width: 640px) { .slider__arrow { display: none; } }

/* Точки */
.slider__dots {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  z-index: 5;
  transform: translateX(-50%);
  display: flex;
  gap: 0.6rem;
}

.slider__dot {
  width: 11px; height: 11px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.6);
  transition: background-color 0.22s var(--ease), width 0.22s var(--ease),
              border-radius 0.22s var(--ease);
}
.slider__dot[aria-current="true"] {
  background: var(--brand);
  border-color: var(--brand);
  width: 30px;
  border-radius: 100px;
}

/* --------------------------------------------------------------------------
   2. КАРТИ С УСЛУГИ  (начална страница)
   -------------------------------------------------------------------------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(290px, 100%), 1fr));
  gap: var(--gap);
}
.card-grid--2col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 640px) { .card-grid--2col { grid-template-columns: minmax(0, 1fr); } }

.service-card {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-dark);
  box-shadow: var(--shadow);
  transition: box-shadow 0.32s var(--ease), transform 0.32s var(--ease);
}
.service-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }

.service-card img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.service-card:hover img { transform: scale(1.08); }

.service-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(20, 41, 53, 0.9) 8%, rgba(20, 41, 53, 0.35) 52%, rgba(20, 41, 53, 0.08) 100%);
  transition: background 0.32s var(--ease);
}
.service-card:hover::after {
  background: linear-gradient(to top, rgba(31, 55, 69, 0.95) 8%, rgba(31, 55, 69, 0.55) 60%, rgba(20, 41, 53, 0.15) 100%);
}

.service-card__body {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 2;
  padding: 1.5rem;
  color: #fff;
}

.service-card__title {
  color: #fff;
  font-size: 1.4rem;
  margin: 0;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35);
}

.service-card__more {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--brand);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.service-card:hover .service-card__more { opacity: 1; transform: none; }

/* На тъч устройства няма hover — показваме линка винаги */
@media (hover: none) {
  .service-card__more { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   3. СТАТИСТИКИ
   -------------------------------------------------------------------------- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
  gap: var(--gap);
  text-align: center;
}

.stat {
  padding: 2rem 1.25rem;
  background: #fff;
  border: 0;
  border-bottom: 2px solid var(--brand);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
}
.stat:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }

.stat__num {
  display: block;
  font-family: var(--font-head);
  font-size: clamp(2.2rem, 1.6rem + 2vw, 3rem);
  font-weight: 400;
  line-height: 1;
  color: var(--dark);
  margin-bottom: 0.5rem;
}

.stat__label {
  font-size: 0.92rem;
  color: var(--ink-mute);
  margin: 0;
}

/* --------------------------------------------------------------------------
   4. ДВУКОЛОНЕН БЛОК  (текст + снимка)
   -------------------------------------------------------------------------- */
.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: clamp(2rem, 1.2rem + 3vw, 3.75rem);
  align-items: center;
}

.split--reverse > *:first-child { order: 2; }
@media (max-width: 719px) { .split--reverse > *:first-child { order: 0; } }

.split__media {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.split__media img { border-radius: var(--radius); }
.split__media img { width: 100%; }

/* --------------------------------------------------------------------------
   5. СТРАНИЦА С УСЛУГА  (съдържание + странична навигация)
   -------------------------------------------------------------------------- */
.with-aside {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: clamp(2rem, 1.2rem + 3vw, 3.5rem);
  align-items: start;
}

@media (max-width: 899px) { .with-aside { grid-template-columns: minmax(0, 1fr); } }

.article__media {
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
}
/* Ограничаваме височината, за да не доминират вертикалните снимки */
.article__media img {
  width: 100%;
  max-height: 460px;
  object-fit: cover;
  object-position: center;
}
/* Схеми и документи — показваме изцяло, без изрязване */
.article__media--full img { max-height: none; object-fit: contain; }

/* Панел в страничната колона */
.aside-box {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: var(--gap);
}

/* h2 — за да не се прескача ниво след h1 на страницата */
.aside-box h2 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 2px solid var(--brand);
}

.aside-nav { list-style: none; margin: 0; padding: 0; }
.aside-nav li { margin-bottom: 0.3rem; }

.aside-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.7rem 0.9rem;
  font-size: 0.93rem;
  font-weight: 500;
  color: var(--dark);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease),
              border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.aside-nav a::after { content: "›"; font-size: 1.15em; opacity: 0.55; }
.aside-nav a:hover { border-color: var(--brand); color: var(--dark); transform: translateX(3px); }

.aside-nav a[aria-current="page"] {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.aside-nav a[aria-current="page"]::after { opacity: 1; }

/* Призив за контакт в страничната колона */
.aside-cta {
  background: var(--dark);
  color: #8c9da7;
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  text-align: center;
}
.aside-cta h2 { color: #fff; border: 0; padding: 0; font-size: 1.4rem; }
.aside-cta p { font-size: 0.92rem; margin-bottom: 1.25rem; }
.aside-cta .btn { width: 100%; justify-content: center; }

/* --------------------------------------------------------------------------
   6. ПОРТФОЛИО  (реализирани обекти)
   -------------------------------------------------------------------------- */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
  gap: var(--gap);
}

.project-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
}
.project-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.project-card__media {
  position: relative;
  aspect-ratio: 40 / 28;
  overflow: hidden;
  background: var(--bg-alt);
}

.project-card__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.project-card:hover .project-card__media img { transform: scale(1.07); }

.project-card__tag {
  position: absolute;
  top: 0.9rem; left: 0.9rem;
  z-index: 2;
  padding: 0.32rem 0.8rem;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(31, 55, 69, 0.9);
  border-radius: 100px;
  backdrop-filter: blur(4px);
}

.project-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.35rem 1.4rem 1.5rem;
}

.project-card__title {
  font-size: 1.25rem;
  line-height: 1.3;
  margin-bottom: 0.85rem;
}
.project-card__title a { color: var(--ink); }
.project-card:hover .project-card__title a { color: var(--brand-dark); }

/* Линк към обекта. align-self: flex-start го свива до ширината на текста,
   за да не се появява ръчичка и в празното пространство вдясно от надписа. */
.project-card__more {
  margin-top: auto;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--brand-dark);
  text-decoration: none;
}

.project-card__more:hover,
.project-card__more:focus-visible {
  color: var(--brand-darker);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.project-card__more::after { content: "→"; transition: transform 0.22s var(--ease); }
.project-card:hover .project-card__more::after { transform: translateX(4px); }

/* Текстов списък с реализирани проекти */
.project-list { list-style: none; margin: 0; padding: 0; counter-reset: proj; }

.project-list li {
  position: relative;
  counter-increment: proj;
  padding: 1.1rem 1.25rem 1.1rem 4rem;
  margin-bottom: 0.75rem;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius-sm);
  line-height: 1.65;
  transition: box-shadow 0.22s var(--ease), transform 0.22s var(--ease);
}
.project-list li:hover { box-shadow: var(--shadow); transform: translateX(3px); }

.project-list li::before {
  content: counter(proj, decimal-leading-zero);
  position: absolute;
  left: 1.25rem;
  top: 1.05rem;
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--brand);
}

/* --------------------------------------------------------------------------
   7. ГАЛЕРИЯ И ЛАЙТБОКС
   -------------------------------------------------------------------------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr));
  gap: 0.9rem;
}

.gallery__item {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-alt);
  cursor: zoom-in;
}

.gallery__item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}
.gallery__item:hover img { transform: scale(1.08); }

.gallery__item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(31, 55, 69, 0.55);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}
.gallery__item:hover::after { opacity: 1; }

.gallery__icon {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.gallery__item:hover .gallery__icon { opacity: 1; transform: none; }
.gallery__icon svg { width: 30px; height: 30px; }

/* Лайтбокс */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 4vw, 3rem);
  background: rgba(10, 17, 24, 0.94);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease), visibility 0.3s;
}
.lightbox.is-open { opacity: 1; visibility: visible; }

/* Заключваме скрола под отворения лайтбокс (отделно от менюто в nav.js) */
body.lightbox-open { overflow: hidden; }

.lightbox__img {
  max-width: 100%;
  max-height: 82vh;
  width: auto;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
}

.lightbox__btn {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px; height: 48px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.lightbox__btn:hover { background: var(--brand); border-color: var(--brand); }
.lightbox__btn svg { width: 20px; height: 20px; }

.lightbox__close { top: 1.1rem; right: 1.1rem; }
.lightbox__prev  { left: clamp(0.6rem, 2vw, 1.75rem); top: 50%; transform: translateY(-50%); }
.lightbox__next  { right: clamp(0.6rem, 2vw, 1.75rem); top: 50%; transform: translateY(-50%); }

.lightbox__counter {
  position: absolute;
  bottom: 1.4rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.75);
  letter-spacing: 0.06em;
}

/* --------------------------------------------------------------------------
   8. СЕРТИФИКАТИ И УДОСТОВЕРЕНИЯ
   -------------------------------------------------------------------------- */
.doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr));
  gap: var(--gap);
}

.doc-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.28s var(--ease), transform 0.28s var(--ease),
              border-color 0.28s var(--ease);
}
.doc-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--brand); }

.doc-card__media {
  position: relative;
  padding: 1.25rem;
  background: var(--bg-alt);
  cursor: zoom-in;
}
.doc-card__media img {
  width: 100%;
  aspect-ratio: 4 / 3;              /* хоризонтални документи — удостоверенията */
  object-fit: contain;
  object-position: center;
}

/* Вертикални документи — ISO сертификатите */
.doc-card__media--portrait img { aspect-ratio: 1 / 1.4; }

.doc-card__caption {
  padding: 1rem 1.25rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
  text-align: center;
  border-top: 1px solid var(--line);
}

/* --------------------------------------------------------------------------
   9. ПАРТНЬОРИ
   -------------------------------------------------------------------------- */
.partner-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(255px, 100%), 1fr));
  gap: 0.85rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.partner-grid li {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  min-height: 170px;
  margin: 0;
  padding: 1.25rem 1.15rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 0.93rem;
  line-height: 1.5;
  text-align: center;
  transition: border-color 0.22s var(--ease), box-shadow 0.22s var(--ease),
              transform 0.22s var(--ease);
}
.partner-grid li:hover { border-color: var(--brand); box-shadow: var(--shadow); transform: translateY(-2px); }

.partner-grid img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 72px;
  object-fit: contain;
}

.partner-grid span {
  font-size: 0.85rem;
  color: var(--ink-soft);
}

/* Партньор без лого — само името, с акцентна черта отгоре */
.partner-grid__no-logo span {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
}
.partner-grid__no-logo::before {
  content: "";
  width: 28px; height: 3px;
  background: var(--brand);
  border-radius: 2px;
}

@media (max-width: 640px) {
  .partner-grid li { min-height: 150px; }
  .partner-grid img { max-height: 60px; }
}

/* Лента с логата на партньорите (Начало) — безкрайно превъртане */
.logo-marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.logo-marquee__track {
  display: flex;
  width: max-content;
  animation: logo-marquee 40s linear infinite;
}
.logo-marquee:hover .logo-marquee__track { animation-play-state: paused; }

.logo-marquee__list {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0 0.75rem;
}

.logo-marquee__list li {
  flex: none;
  margin: 0;
  padding: 0.5rem 1rem;
  background: #fff;
  border-radius: var(--radius-sm);
}

.logo-marquee__list img {
  display: block;
  width: auto;
  height: 90px;
  object-fit: contain;
}

@keyframes logo-marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@media (max-width: 640px) {
  .logo-marquee__list { gap: 1rem; padding: 0 0.5rem; }
  .logo-marquee__list img { height: 64px; }
}

@media (prefers-reduced-motion: reduce) {
  .logo-marquee { -webkit-mask-image: none; mask-image: none; }
  .logo-marquee__track { width: auto; animation: none; justify-content: center; }
  .logo-marquee__list { flex-wrap: wrap; justify-content: center; }
  .logo-marquee__list[aria-hidden="true"] { display: none; }
}

/* --------------------------------------------------------------------------
   10. КОНТАКТИ
   -------------------------------------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(255px, 100%), 1fr));
  gap: var(--gap);
}

.contact-card {
  padding: 2rem 1.75rem;
  background: #fff;
  border: 1px solid transparent;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease),
              transform 0.25s var(--ease);
}
.contact-card:hover { border-color: var(--brand); box-shadow: var(--shadow-lg); transform: translateY(-4px); }

.contact-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px; height: 52px;
  margin-bottom: 1.1rem;
  color: #fff;
  background: var(--brand);
  border-radius: var(--radius-sm);
}
.contact-card__icon svg { width: 24px; height: 24px; }

.contact-card h3 {
  font-size: 1.4rem;
  margin-bottom: 0.7rem;
}

.contact-card p,
.contact-card a { display: block; line-height: 1.7; }
.contact-card a { font-weight: 500; color: var(--dark); }
.contact-card a:hover { color: var(--brand-dark); }

/* Карта с локацията */
.map-frame {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: var(--bg-alt);
}

.map-frame iframe {
  width: 100%;
  height: clamp(320px, 45vh, 470px);
  border: 0;
}

.map-note {
  margin-top: 0.9rem;
  font-size: var(--fs-small);
  color: var(--ink-mute);
  text-align: center;
}

/* --------------------------------------------------------------------------
   11. ЛЕНТА С ПРИЗИВ ЗА ДЕЙСТВИЕ
   -------------------------------------------------------------------------- */
.cta-band {
  background: var(--dark);
  color: #fff;
}

.cta-band__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.75rem;
  padding-block: clamp(2.25rem, 1.5rem + 3vw, 3.5rem);
}

.cta-band__inner > * { min-width: 0; }
.cta-band h2 { color: #fff; margin-bottom: 0.4rem; }
.cta-band p  { color: #8c9da7; margin: 0; max-width: 56ch; }
/* Светлият бутон в лентата става зелен, както основните бутони */
.cta-band .btn--light { background: var(--brand); color: #fff; }
.cta-band .btn--light:hover { background: #fff; color: var(--dark); }

/* Зелена лента с контакти за продажби под банера */
.sales-bar {
  background: var(--brand);
  color: #fff;
}

.sales-bar__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 2rem;
  padding-block: 1rem;
  font-size: clamp(1.05rem, 0.95rem + 0.6vw, 1.3rem);
  font-weight: 600;
  text-align: center;
}

.sales-bar__inner > * { min-width: 0; overflow-wrap: anywhere; }
.sales-bar a {
  color: #fff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.sales-bar svg { width: 1.2em; height: 1.2em; flex: none; }
.sales-bar a:hover,
.sales-bar a:focus-visible { color: #fff; text-decoration: underline; }

/* --------------------------------------------------------------------------
   ОРГАНИЗАЦИОННА СТРУКТУРА  (екип)
   Тясна колона: вертикално дърво с отстъп. Широка колона: хоризонтално дърво.
   -------------------------------------------------------------------------- */
.org-tree,
.org-tree ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.org-tree li { margin: 0; }
.org-tree > li { text-align: center; }

.org-node {
  display: inline-block;
  max-width: 100%;
  padding: 0.6rem 0.9rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.35;
  color: #fff;
  background: var(--dark);
  border: 2px solid var(--brand);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  overflow-wrap: break-word;
}

.org-node--top {
  padding: 0.8rem 2.5rem;
  font-family: var(--font-head);
  font-size: 1.35rem;
  border-width: 3px;
}

/* Вертикално дърво */
.org-tree ul { margin-left: 1rem; text-align: left; }
.org-tree > li > ul { margin-top: 0.5rem; }
.org-tree ul li {
  position: relative;
  padding: 0.5rem 0 0 1.25rem;
}
.org-tree ul li::before,
.org-tree ul li::after {
  content: '';
  position: absolute;
  left: 0;
  border-color: var(--brand);
}
.org-tree ul li::before { top: 0; bottom: 0; border-left: 2px solid var(--brand); }
.org-tree ul li:last-child::before { bottom: auto; height: 1.75rem; }
.org-tree ul li::after { top: 1.75rem; width: 1.25rem; border-top: 2px solid var(--brand); }

/* Хоризонтално дърво — заема цялата ширина на колоната, както старата снимка.
   Всички размери са в em спрямо шрифта на дървото, а той следва ширината
   на колоната (cqi), така че диаграмата се мащабира като едно цяло. */
.org-chart {
  container-type: inline-size;
  margin-top: 2rem;
}

@container (min-width: 600px) {
  .org-tree { font-size: calc(100cqi / 62); }

  .org-tree ul {
    position: relative;
    display: flex;
    justify-content: center;
    margin: 0;
    padding-top: 2.2em;
    text-align: center;
  }
  .org-tree > li > ul { margin-top: 0; }
  .org-tree ul::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    height: 2.2em;
    border-left: 2px solid var(--brand);
  }

  .org-tree ul li {
    flex: 0 0 auto;
    padding: 2.2em 0.225em 0;
  }
  .org-tree ul li::before,
  .org-tree ul li::after {
    top: 0;
    bottom: auto;
    width: 50%;
    height: 2.2em;
    border: 0;
    border-top: 2px solid var(--brand);
  }
  .org-tree ul li::before { left: auto; right: 50%; }
  .org-tree ul li::after  { left: 50%; border-left: 2px solid var(--brand); }

  .org-tree ul li:first-child::before,
  .org-tree ul li:last-child::after { border: 0; }
  .org-tree ul li:last-child::before {
    height: 2.2em;
    border-right: 2px solid var(--brand);
    border-radius: 0 var(--radius-sm) 0 0;
  }
  .org-tree ul li:first-child::after { border-radius: var(--radius-sm) 0 0 0; }

  /* Единствен подчинен — само вертикална линия от родителя */
  .org-tree ul li:only-child { padding-top: 0; }
  .org-tree ul li:only-child::before,
  .org-tree ul li:only-child::after { display: none; }

  .org-tree .org-node {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 7.3em;
    min-height: 5.2em;
    margin-inline: auto;
    padding: 0.8em 0.4em;
    font-size: 1em;
    line-height: 1.3;
    hyphens: manual;
  }
  .org-tree .org-node--top {
    display: inline-flex;
    width: auto;
    min-height: 0;
    padding: 0.6em 2em;
    font-size: 1.9em;
  }
}

/* --------------------------------------------------------------------------
   12. БЕЛЕЖКА / ПРЕДУПРЕЖДЕНИЕ
   -------------------------------------------------------------------------- */
.notice {
  padding: 1.25rem 1.5rem;
  background: var(--brand-tint);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius-sm);
  color: var(--ink-soft);
}
.notice strong { color: var(--ink); }
