/* ---- Barabin clone overrides (loaded LAST, after all theme CSS) ---- */

/* Hide leftover RevSlider markup (replaced by the native <Hero/>). */
.rev_slider_wrapper,
.forcefullwidth_wrapper_tp_banner,
rs-module-wrap {
  display: none !important;
}

/* The theme shows a loading overlay until its JS removes it; we have no JS for it. */
.sp-loading-overlay,
.loading-overlay,
#sp-loading {
  display: none !important;
}

/* SuperOwly reveals a position:fixed footer via JS. Without JS it sticks to the
   top and overlaps everything — pin it back into normal flow at the bottom. */
#footer.sp-footer {
  position: static !important;
}
#footer-scroll {
  display: none !important;
}

/* Owl carousels are hidden (display:none) until owl.js adds .owl-loaded.
   Our JS (SiteEnhancers) rebuilds them as a 2-up slider with dots. */
.owl-carousel {
  display: block !important;
  opacity: 1 !important;
}
.owl-carousel.bh-owl-ready {
  overflow: hidden;
  position: relative;
}
.bh-owl-stage {
  display: flex;
  transition: transform 0.5s ease;
  will-change: transform;
}
.bh-owl-dots {
  display: flex;
  gap: 9px;
  justify-content: center;
  margin-top: 26px;
}
.bh-owl-dots button {
  width: 12px;
  height: 12px;
  padding: 0;
  border-radius: 50%;
  border: 2px solid #a6ce39;
  background: transparent;
  cursor: pointer;
  transition: background 0.2s;
}
.bh-owl-dots button.on {
  background: #a6ce39;
}
/* Pre-JS fallback: show first items in a row rather than a broken stack. */
.owl-carousel:not(.bh-owl-ready) {
  display: flex !important;
  gap: 30px;
  overflow: hidden;
}

/* Desktop dropdown menus (theme relies on JS/superfish to position .sub-menu). */
@media (min-width: 992px) {
  #header .sp-navigation > li.menu-item-has-children {
    position: relative;
  }
  #header .sp-navigation .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 230px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    padding: 8px 0;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    z-index: 9999;
    list-style: none;
  }
  #header .sp-navigation li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  #header .sp-navigation .sub-menu li {
    display: block;
    float: none;
  }
  #header .sp-navigation .sub-menu a {
    display: block;
    padding: 8px 20px;
    white-space: nowrap;
    line-height: 1.3;
  }
}

/* VC "stretch row" full-width sections (needs JS on the original): make the row
   span the viewport (background bleeds to the edges) while re-centering its content
   to the Bootstrap container width. */
#content [data-vc-full-width="true"] {
  position: relative;
  width: 100vw !important;
  max-width: 100vw !important;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
  box-sizing: border-box;
}
/* Re-center content to the container ONLY for "stretch row" (not "stretch row and
   content"). Stretch-content rows (e.g. testimonials image) bleed edge-to-edge. */
#content [data-vc-full-width="true"]:not([data-vc-stretch-content="true"]) {
  padding-left: max(15px, calc(50vw - 585px)) !important;
  padding-right: max(15px, calc(50vw - 585px)) !important;
}
@media (max-width: 1199px) {
  #content [data-vc-full-width="true"]:not([data-vc-stretch-content="true"]) {
    padding-left: max(15px, calc(50vw - 485px)) !important;
    padding-right: max(15px, calc(50vw - 485px)) !important;
  }
}
@media (max-width: 991px) {
  #content [data-vc-full-width="true"]:not([data-vc-stretch-content="true"]) {
    padding-left: max(15px, calc(50vw - 375px)) !important;
    padding-right: max(15px, calc(50vw - 375px)) !important;
  }
}

/* Sticky header: the theme CSS already styles `.sticky .top-header` as fixed.
   SiteEnhancers toggles the `.sticky` class and reserves a spacer on scroll. */

/* ---- Native hero (mirrors the 730px RevSlider) ---- */
.barabin-hero {
  position: relative;
  width: 100%;
  height: 730px;
  max-height: 82vh;
  overflow: hidden;
}
.bh-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  opacity: 0;
  transition: opacity 1s ease;
  pointer-events: none;
}
.bh-slide.active {
  opacity: 1;
  pointer-events: auto;
}
.bh-inner {
  color: #fff;
  max-width: 820px;
  padding: 0 20px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}
.bh-eyebrow {
  font-family: "Rubik", sans-serif;
  text-transform: uppercase;
  letter-spacing: 3px;
  font-weight: 500;
  font-size: 16px;
  margin: 0 0 14px;
}
.bh-title {
  font-family: "Poppins", sans-serif;
  text-transform: uppercase;
  font-weight: 800;
  font-size: 64px;
  line-height: 1.02;
  margin: 0;
}
.bh-sub {
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  font-size: 34px;
  margin: 8px 0 30px;
}
.bh-btn {
  display: inline-block;
  background: #e94b1d;
  color: #fff !important;
  font-family: "Rubik", sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 15px;
  padding: 15px 40px;
  border-radius: 30px;
  transition: background 0.2s;
}
.bh-btn:hover {
  background: #d13d13;
}
.bh-dots {
  position: absolute;
  bottom: 26px;
  left: 0;
  right: 0;
  display: flex;
  gap: 10px;
  justify-content: center;
}
.bh-dots button {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: transparent;
  cursor: pointer;
  padding: 0;
}
.bh-dots button.on {
  background: #fff;
}
@media (max-width: 768px) {
  .barabin-hero {
    height: 420px;
  }
  .bh-title {
    font-size: 34px;
  }
  .bh-sub {
    font-size: 22px;
  }
}

/* ---- Blog (CMS-authored posts) ---- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}
@media (max-width: 900px) {
  .blog-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .blog-grid { grid-template-columns: 1fr; }
}
.blog-card {
  display: block;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.07);
  transition: transform 0.2s, box-shadow 0.2s;
  color: inherit;
}
.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.12);
}
.blog-card-img {
  height: 190px;
  background-size: cover;
  background-position: center;
  background-color: #eef0f2;
}
.blog-card-img--empty {
  background: linear-gradient(135deg, #a6ce39, #8fb52f);
}
.blog-card-body {
  padding: 22px 22px 26px;
}
.blog-card-body h3 {
  font-family: "Poppins", sans-serif;
  font-size: 20px;
  margin: 0 0 10px;
  color: #2b2b2b;
}
.blog-card-body p {
  color: #6b7280;
  font-size: 15px;
  margin: 0 0 14px;
}
.blog-card-more {
  color: #e94b1d;
  font-weight: 700;
  font-size: 14px;
}
.blog-article h1 {
  font-family: "Poppins", sans-serif;
}
.blog-article-cover {
  width: 100%;
  border-radius: 14px;
  margin: 20px 0 26px;
}
.blog-article-body {
  white-space: pre-wrap;
  line-height: 1.8;
  font-size: 17px;
  color: #3a3a3a;
}

/* ---- Markdown-rendered post content ---- */
.markdown-body {
  line-height: 1.8;
  font-size: 17px;
  color: #3a3a3a;
}
.markdown-body p { margin: 0 0 18px; }
.markdown-body h2 {
  font-family: "Poppins", sans-serif;
  font-size: 26px;
  margin: 32px 0 12px;
  color: #2b2b2b;
}
.markdown-body h3 {
  font-family: "Poppins", sans-serif;
  font-size: 21px;
  margin: 26px 0 10px;
  color: #2b2b2b;
}
.markdown-body ul { margin: 0 0 18px; padding-left: 22px; }
.markdown-body li { margin-bottom: 6px; }
.markdown-body img { max-width: 100%; height: auto; border-radius: 12px; margin: 18px 0; }
.markdown-body a { color: #e94b1d; text-decoration: underline; }
.markdown-body strong { font-weight: 700; }

/* ---- Accessibility: colour contrast (WCAG AA) ---- */
[style*="a6c437"] { color: #46680c !important; }
/* category / meta links: ≥24px touch target */
a[rel="category tag"],
.sp-entry-meta a,
.post-category a {
  display: inline-block;
  min-height: 24px;
  line-height: 24px;
  padding: 0 4px;
}
/* news date badge is lime green (mid-tone); darken it so white text passes AA */
time.entry-date { background-color: #4a6e0d !important; }
time.entry-date, time.entry-date * { color: #fff !important; }
.sp-post-date, .post-date { color: #595959 !important; }
.bh-btn, a.sp-cta-button, .sp-cta-button.btn { background: #cf3f14 !important; }
.btn.btn-style-2 { color: #223405 !important; }
#content .wpb_text_column p,
.sp-entry p,
.entry-content p,
.blog-card-body p { color: #464646 !important; }

/* ---- Accessibility: touch-target size for pager dots (≥24px hit area) ---- */
.bh-dots button,
.bh-owl-dots button {
  min-width: 24px;
  min-height: 24px;
  background-clip: content-box;
  padding: 6px;
}
