/* BG Stroy-D — responsive fixes for SJ Builder / Helix Ultimate 2.2.9.
   Install as templates/sj_builder/css/custom.css.
   Load AFTER template.css and preset6.css. Keep the existing files intact. */

/* Restore a visible keyboard focus indicator removed by template.css. */
:where(a, button, input, select, textarea):focus-visible {
  outline: 2px solid #7b1c32 !important;
  outline-offset: 3px;
}

/* Top strip: contacts on the left, opening hours over the enquiry button. */
#sp-top-bar #sp-top1 {
  flex: 0 0 100%;
  width: 100%;
  max-width: 100%;
}
#sp-top-bar .sp-contact-info {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  width: 100%;
  margin: 0;
  padding: 0;
}
#sp-top-bar .sp-contact-info::before { display: none; }
#sp-top-bar .sp-contact-info li {
  display: flex;
  align-items: center;
  min-height: 40px;
  line-height: 1.35;
  padding: 7px 12px;
  white-space: nowrap;
}
#sp-top-bar .sp-contact-info li.sp-contact-email {
  padding-right: 36px;
}
#sp-top-bar .sp-contact-info li.sp-contact-email::after {
  right: -20px;
  border-top-width: 40px;
}
#sp-top-bar .sp-contact-info li.sp-contact-time {
  float: none;
  margin-left: auto;
  padding-right: 0;
  justify-content: flex-end;
}
@media (min-width: 770px) {
  /* Keep the Bootstrap 15px gutter on the right; align the yellow edge on the left. */
  #sp-top-bar #sp-top1 { padding-left: 0; }
}

/* Footer layout: three actual Helix positions, including bottom3. */
#sp-bottom .row > #sp-bottom1,
#sp-bottom .row > #sp-bottom2,
#sp-bottom .row > #sp-bottom3 { min-width: 0; }
#sp-bottom #sp-bottom3 .sp-column { padding-top: 0; }
#sp-bottom #sp-bottom3 .sp-module { padding-top: 45px; }
#sp-bottom #sp-bottom3 ul.menu { margin: 0; }
#sp-bottom #sp-bottom3 ul.menu li {
  display: block;
  width: 100%;
  padding: 0;
}
#sp-bottom #sp-bottom3 img { max-width: 100%; height: auto; }
#sp-bottom .sp-module-content a { color: #f3e6e9; }
#sp-bottom .sp-module-content a:hover,
#sp-bottom .sp-module-content a:focus { color: #fff; }
@media (min-width: 992px) {
  #sp-bottom .row > #sp-bottom1,
  #sp-bottom .row > #sp-bottom2,
  #sp-bottom .row > #sp-bottom3 {
    flex: 0 0 33.333333%;
    width: 33.333333%;
    max-width: 33.333333%;
  }
}
@media (min-width: 768px) and (max-width: 991px) {
  #sp-bottom .row > #sp-bottom1,
  #sp-bottom .row > #sp-bottom2 {
    flex: 0 0 50%;
    width: 50%;
    max-width: 50%;
  }
  #sp-bottom .row > #sp-bottom3 {
    flex: 0 0 100%;
    width: 100%;
    max-width: 100%;
  }
}

/* City and service photographs: keep natural aspect ratio. */
#sp-component .article-details .article-full-image,
#sp-component .article-list .article-intro-image {
  max-width: 100%;
}
#sp-component .article-details .article-full-image img,
#sp-component .article-list .article-intro-image img,
#sp-component .uslugi .article-image .article-intro-image img {
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

/* Visforms: readable fields and a clean surface over the #f5f5f5 section. */
#sp-component .visforms form.visform {
  width: 100%;
  max-width: 760px;
  margin-right: auto;
  margin-left: auto;
  padding: clamp(20px, 3vw, 40px);
  background: #fff;
  border: 1px solid #e0e2e5;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(13, 30, 80, 0.07);
}
#sp-component .visforms form.visform .form-group,
#sp-component .visforms form.visform .control-group,
#sp-component .visforms form.visform .mb-3 { margin-bottom: 22px; }
#sp-component .visforms form.visform label {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.45;
  color: #263044;
}
#sp-component .visforms form.visform :is(input, select, textarea):not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="reset"]),
#sp-component .visforms form.visform .form-control {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  font-size: 1rem;
  line-height: 1.5;
  color: #263044;
  background-color: #eceff2;
  border: 1px solid #bfc6ce;
  border-radius: 5px;
  box-shadow: none;
}
#sp-component .visforms form.visform textarea { min-height: 130px; resize: vertical; }
#sp-component .visforms form.visform :is(input, select, textarea):focus {
  background-color: #fff;
  border-color: #7b1c32;
  box-shadow: 0 0 0 3px rgba(123, 28, 50, 0.14);
}
#sp-component .visforms form.visform :is(.form-text, .small, .visforms-tip, .description) {
  display: block;
  margin-top: 7px;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #485363;
}
#sp-component .visforms form.visform :is(input[type="checkbox"], input[type="radio"]) {
  width: auto;
  min-height: 0;
  accent-color: #7b1c32;
}
#sp-component .visforms form.visform :is(button[type="submit"], input[type="submit"]) {
  min-height: 46px;
  padding: 10px 24px;
  color: #fff;
  background-color: #7b1c32;
  border: 1px solid #7b1c32;
  border-radius: 5px;
  cursor: pointer;
}
#sp-component .visforms form.visform :is(button[type="submit"], input[type="submit"]):hover {
  background-color: #5e1526;
  border-color: #5e1526;
}

/* Custom module 119, position6; counts animate via stats-counter.js. */
#sp-statistika #mod-custom119 .bgstroid-stat {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 110px;
  color: #fff;
}
#sp-statistika #mod-custom119 .bgstroid-stat-icon {
  flex: 0 0 80px;
  display: grid;
  place-items: center;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #ffa83d;
}
#sp-statistika #mod-custom119 .bgstroid-stat-icon img {
  display: block;
  max-width: 65px;
  max-height: 65px;
  width: auto;
  height: auto;
}
#sp-statistika #mod-custom119 .bgstroid-stat-value {
  display: block;
  font-size: clamp(2.75rem, 4vw, 3.5rem);
  font-weight: 600;
  line-height: 1.05;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
#sp-statistika #mod-custom119 .bgstroid-stat-label {
  display: block;
  margin-top: 6px;
  font-size: 1.05rem;
  line-height: 1.35;
}

/* The default template switches to the hamburger at 991px. */
@media (max-width: 991px) {
  #sp-header #sp-top3 { display: none !important; }
}
@media (max-width: 769px) {
  #sp-top-bar .sp-contact-info { flex-wrap: wrap; }
  #sp-top-bar .sp-contact-info li {
    flex: 1 1 100%;
    min-width: 0;
    padding: 8px 12px;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  #sp-top-bar .sp-contact-info li.sp-contact-email { padding-right: 12px; }
  #sp-top-bar .sp-contact-info li.sp-contact-email::after { display: none; }
  #sp-top-bar .sp-contact-info li.sp-contact-time {
    margin-left: 0;
    padding-right: 12px;
    justify-content: flex-start;
  }
}
@media (max-width: 767px) {
  #sp-statistika #mod-custom119 .bgstroid-stat {
    min-height: 128px;
    gap: 20px;
  }
  #sp-bottom .row > #sp-bottom1,
  #sp-bottom .row > #sp-bottom2,
  #sp-bottom .row > #sp-bottom3 {
    flex: 0 0 100%;
    width: 100%;
    max-width: 100%;
  }
  #sp-bottom #sp-bottom3 .sp-module { padding-top: 24px; }
  #sp-component .article-list .article-intro-image,
  #sp-component .uslugi .article-image .article-intro-image { width: 100%; float: none; }
  #sp-component .block-banner .banner img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
  }
  #sp-component .visforms form.visform { max-width: 100%; }
}
@media (max-width: 767px) {
  #sp-statistika #mod-custom119 .bgstroid-stat {
    padding-left: 15px;
  }
}

.bgstroid-cta {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 180px;
  padding: 28px clamp(20px, 4vw, 52px);
  overflow: hidden;
  color: #fff;
}

.bgstroid-cta__image {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bgstroid-cta__content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
}

.bgstroid-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(45, 10, 23, 0.72);
}


.bgstroid-cta__content p {
  margin: 0;
  color: #fff;
  font-size: clamp(20px, 2.2vw, 28px);
  font-weight: 700;
  line-height: 1.25;
}

.bgstroid-cta__content a {
  flex: none;
  display: inline-block;
  padding: 14px 28px;
  border-radius: 30px;
  background: #f2a70d;
  color: #252525;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
}

.bgstroid-cta__content a:hover,
.bgstroid-cta__content a:focus-visible {
  background: #daa028;
  color: #fff;
}

@media (max-width: 767px) {
  .bgstroid-cta {
    min-height: 170px;
    padding: 24px 20px;
  }

  .bgstroid-cta__content {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }
}
/* Add this block to the end of templates/sj_builder/css/custom.css. */
.bgstroid-faq {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding: 28px 15px;
  color: #172243;
}

.bgstroid-faq__heading {
  margin-bottom: 24px;
}

.bgstroid-faq__heading p {
  margin: 0 0 8px;
  color: #7b1c32;
  font-weight: 700;
  text-transform: uppercase;
}

.bgstroid-faq__heading h2 {
  margin: 0;
  color: #172243;
  font-size: clamp(22px, 2.5vw, 32px);
  line-height: 1.2;
}

.bgstroid-faq__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(20px, 3vw, 48px);
}

.bgstroid-faq__questions {
  min-width: 0;
}

.bgstroid-faq details {
  margin: 0 0 8px;
  border: 1px solid #ddd;
  background: #fff;
}

.bgstroid-faq summary {
  position: relative;
  display: block;
  padding: 11px 40px 11px 16px;
  color: #172243;
  font-weight: 700;
  line-height: 1.4;
  cursor: pointer;
  list-style: none;
}

.bgstroid-faq summary::-webkit-details-marker {
  display: none;
}

.bgstroid-faq summary::after {
  content: "+";
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #7b1c32;
  font-size: 22px;
  line-height: 1;
}

.bgstroid-faq details[open] summary::after {
  content: "−";
}

.bgstroid-faq summary:focus-visible {
  outline: 2px solid #7b1c32;
  outline-offset: 2px;
}

.bgstroid-faq__answer {
  padding: 4px 16px 16px;
  color: #333;
  line-height: 1.6;
}

.bgstroid-faq__image {
  display: block;
  width: 100%;
  height: auto;
}

@media (max-width: 767px) {
  .bgstroid-faq {
    padding: 24px 15px;
  }

  .bgstroid-faq__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .bgstroid-faq__image {
    max-width: 440px;
    margin-inline: auto;
  }
}
/* Add this block to the end of templates/sj_builder/css/custom.css. */
.bgstroid-brands-lite {
  container-type: inline-size;
  max-width: 1200px;
  margin-inline: auto;
  overflow: hidden;
}

.bgstroid-brands-lite__track {
  display: flex;
  width: max-content;
  animation: bgstroid-brands-step 18s linear infinite;
}

.bgstroid-brands-lite__group {
  display: flex;
  flex: none;
  gap: 30px;
  padding-right: 30px;
}

.bgstroid-brands-lite__item {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: calc((100cqw - 150px) / 6);
  height: 100px;
  min-width: 0;
}

.bgstroid-brands-lite__item img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 80px;
  object-fit: contain;
}

.bgstroid-brands-lite:hover .bgstroid-brands-lite__track {
  animation-play-state: paused;
}

/* Six positions, each held for about 2.5s and moved over about 0.5s. */
@keyframes bgstroid-brands-step {
  0%, 13.889% { transform: translateX(0); }
  16.667%, 30.556% { transform: translateX(-8.333333%); }
  33.333%, 47.222% { transform: translateX(-16.666667%); }
  50%, 63.889% { transform: translateX(-25%); }
  66.667%, 80.556% { transform: translateX(-33.333333%); }
  83.333%, 97.222% { transform: translateX(-41.666667%); }
  100% { transform: translateX(-50%); }
}

@media (max-width: 1199px) {
  .bgstroid-brands-lite__item { width: calc((100cqw - 120px) / 5); }
}

@media (max-width: 979px) {
  .bgstroid-brands-lite__item { width: calc((100cqw - 60px) / 3); }
}

@media (max-width: 767px) {
  .bgstroid-brands-lite__item { width: 100cqw; }
}

@media (prefers-reduced-motion: reduce) {
  .bgstroid-brands-lite { overflow-x: auto; }
  .bgstroid-brands-lite__track { animation: none; }
}
/* Осигурява старото име FontAwesome, използвано в template.css,
   чрез наличния шрифт на Joomla. */
@font-face {
  font-family: "FontAwesome";
  src: url("/media/vendor/fontawesome-free/webfonts/fa-solid-900.woff2")
       format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

/* BG Stroy-D — Prices, variant 1. Append to custom.css; do not replace it.
   Menu item Page Class: bg-prices-page
   Requires the supplied bg-prices-article.html article content. */
.bg-prices-page .bg-prices {
  --bgp-burgundy: #7b1c32;
  --bgp-navy: #172844;
  --bgp-text: #444d5b;
  --bgp-accent: #eca400;
  --bgp-border: #e5e1e2;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  color: var(--bgp-text);
  font-size: 16px;
  line-height: 1.65;
}
.bg-prices-page .bg-prices,
.bg-prices-page .bg-prices * { box-sizing: border-box; }
.bg-prices-page .article-header {
  max-width: 1100px;
  margin: 0 auto 24px;
}
.bg-prices-page .article-header h1 {
  margin: 0;
  color: #172844;
  font-size: clamp(27px, 3vw, 40px);
  line-height: 1.2;
  font-weight: 750;
  text-transform: none;
  text-align: left;
}
.bg-prices-page .bg-prices .bgp-intro { margin-bottom: 32px; }
.bg-prices-page .bg-prices .bgp-intro h2 {
  margin: 0 0 14px;
  color: var(--bgp-burgundy);
  font-size: clamp(21px, 2.2vw, 28px);
  line-height: 1.3;
  font-weight: 650;
  text-transform: none;
}
.bg-prices-page .bg-prices p { margin: 0 0 12px; }
.bg-prices-page .bg-prices .bgp-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 31%);
  margin: 0 0 26px;
  padding: 0;
  border: 1px solid var(--bgp-border);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 5px 20px rgb(23 40 68 / 5%);
  overflow: hidden;
  scroll-margin-top: 130px;
}
.bg-prices-page .bg-prices .bgp-content { min-width: 0; padding: 28px; }
.bg-prices-page .bg-prices .bgp-card h3 {
  margin: 0 0 12px;
  color: var(--bgp-burgundy);
  font-size: clamp(21px, 2vw, 27px);
  line-height: 1.3;
  font-weight: 700;
  text-transform: none;
  overflow-wrap: break-word;
}
.bg-prices-page .bg-prices .bgp-description { margin-bottom: 16px; }
.bg-prices-page .bg-prices .bgp-list-title {
  margin: 20px 0 12px;
  padding-top: 16px;
  border-top: 1px solid var(--bgp-border);
  color: var(--bgp-navy);
  font-weight: 700;
}
.bg-prices-page .bg-prices .bgp-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.bg-prices-page .bg-prices .bgp-list li {
  position: relative;
  margin: 0;
  padding: 0 0 0 32px;
  list-style: none;
}
.bg-prices-page .bg-prices .bgp-list li::before {
  content: "✓";
  position: absolute;
  inset: 3px auto auto 0;
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: var(--bgp-accent);
  color: #172844;
  font: 700 14px/1 Arial, sans-serif;
}
.bg-prices-page .bg-prices .bgp-price-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 28px 24px;
  border-left: 1px solid #eee5e7;
  background: #f8f2f3;
}
.bg-prices-page .bg-prices .bgp-price {
  display: block;
  margin: 0 0 5px;
  color: var(--bgp-burgundy);
  font-size: clamp(34px, 3.5vw, 44px);
  font-weight: 750;
  line-height: 1.15;
  letter-spacing: -1px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.bg-prices-page .bg-prices .bgp-basis {
  display: block;
  color: var(--bgp-navy);
  font-size: 15px;
  font-weight: 650;
  line-height: 1.5;
}
.bg-prices-page .bg-prices .bgp-exclusion { margin: 14px 0 0; font-size: 14px; }
.bg-prices-page .bg-prices .bgp-meta {
  display: grid;
  gap: 14px;
  margin: 23px 0 0;
  padding-top: 20px;
  border-top: 1px solid #e2d5d9;
  color: var(--bgp-navy);
}
.bg-prices-page .bg-prices .bgp-meta dt { margin: 0; font-size: 14px; font-weight: 400; }
.bg-prices-page .bg-prices .bgp-meta dd { margin: 2px 0 0; font-size: 16px; font-weight: 700; }
.bg-prices-page .bg-prices .bgp-conditions {
  margin: 32px 0 0;
  padding: 24px 28px;
  border-left: 4px solid var(--bgp-accent);
  border-radius: 0 10px 10px 0;
  background: #fdf8ed;
}
.bg-prices-page .bg-prices .bgp-conditions h2 {
  margin: 0 0 12px;
  color: var(--bgp-burgundy);
  font-size: 23px;
  line-height: 1.3;
  text-transform: none;
}
.bg-prices-page .bg-prices .bgp-conditions p:last-child { margin-bottom: 0; }
@media (max-width: 767px) {
  .bg-prices-page .bg-prices .bgp-card { grid-template-columns: minmax(0, 1fr); margin-bottom: 22px; }
  .bg-prices-page .bg-prices .bgp-content { padding: 22px 20px; }
  .bg-prices-page .bg-prices .bgp-price-panel { padding: 22px 20px; border-left: 0; border-top: 1px solid #eee5e7; }
  .bg-prices-page .bg-prices .bgp-price { font-size: 36px; }
  .bg-prices-page .bg-prices .bgp-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 18px; padding-top: 16px; }
  .bg-prices-page .bg-prices .bgp-conditions { padding: 20px; }
}
@media (max-width: 359px) {
  .bg-prices-page .bg-prices .bgp-content,
  .bg-prices-page .bg-prices .bgp-price-panel { padding: 20px 16px; }
  .bg-prices-page .bg-prices .bgp-meta { grid-template-columns: 1fr; }
}
@media print {
  .bg-prices-page .bg-prices .bgp-card { break-inside: avoid; box-shadow: none; }
}
/* Цени: премахване на наследения отстъп */
.bg-prices-page .bg-prices .bgp-list,
.bg-prices-page .bg-prices .bgp-list > li,
.bg-prices-page .bg-prices .bgp-list > li::before {
  text-indent: 0 !important;
}

/* Бяла отметка в центъра на жълтия кръг */
.bg-prices-page .bg-prices .bgp-list > li::before {
  display: grid;
  place-items: center;
  color: #fff;
}
