/**
 * BE Group — theme overrides and Brickz markup helpers
 */

/* Match BEI / Voldor brand primary */
:root {
  --rs-theme-primary: #f60516;
}

/*
 * Arabic (RTL): use Cairo for all theme text fonts.
 * Headings/buttons often set font-family: var(--rs-ff-title), so body alone is not enough.
 */
body.rtl {
  --rs-ff-body: "Cairo", sans-serif;
  --rs-ff-title: "Cairo", sans-serif;
  --rs-ff-p: "Cairo", sans-serif;
  font-family: "Cairo", sans-serif;
}

/* Theme hardcodes "Golos Text" in a few places (accordion, placeholders) */
body.rtl .rs-accordion-one .accordion-button,
body.rtl .rs-footer-one .rs-cta-input input::placeholder,
body.rtl .rs-footer-two .rs-cta-input input::placeholder,
body.rtl .rs-cta-two .rs-cta-input input::placeholder,
body.rtl .rs-contact-one .rs-contact-input input::placeholder,
body.rtl .rs-contact-one .rs-contact-input textarea::placeholder,
body.rtl .rs-contact-two .rs-contact-input input::placeholder,
body.rtl .rs-contact-two .rs-contact-input textarea::placeholder {
  font-family: "Cairo", sans-serif;
}

/* Keep foregrounds legible on the red brand background */
.rs-header-one .header-btn .rs-btn {
  color: var(--rs-white);
}

.rs-header-one .header-btn .rs-btn .icon-box svg path,
.rs-header-top.rs-header-top-one .header-top-icon svg path {
  fill: var(--rs-white);
}

/* Contact Us: white hover needs dark text/icon (override the white-on-red rule above) */
.rs-header-one .header-btn .rs-btn.hover-white:hover {
  color: var(--rs-black);
  background: var(--rs-white);
}

.rs-header-one .header-btn .rs-btn.hover-white:hover .icon-box svg path {
  fill: var(--rs-black);
}

.rs-header-top.rs-header-top-one .header-top-content p,
.rs-header-top.rs-header-top-one .header-top-content p a,
.rs-header-top.rs-header-top-one .header-top-meta-content span,
.rs-header-top.rs-header-top-one .header-top-meta-content a,
.rs-header-top.rs-header-top-one .header-top-meta-icon,
.rs-header-top.rs-header-top-one .begroup-lang-switch,
.rs-header-top.rs-header-top-one .begroup-lang-switch a {
  color: var(--rs-white);
}

.rs-header-top.rs-header-top-one .header-top-content p a:hover,
.rs-header-top.rs-header-top-one .header-top-meta-content a:hover,
.rs-header-top.rs-header-top-one .begroup-lang-switch a:hover {
  color: rgb(255 255 255 / 80%);
}

.backtotop-wrap {
  color: var(--rs-white);
}

/* Remix Icon inside Brickz service icon boxes (theme expects SVG) */
.rs-services-one .rs-services-icon i {
  font-size: 50px;
  color: var(--rs-theme-primary);
  line-height: 1;
  transition: color 0.5s ease-in-out;
}

.rs-services-one .rs-services-item:hover .rs-services-icon i {
  color: var(--rs-black);
}

.rs-services-one .rs-services-icon i::before {
  display: block;
}

.begroup-info-card {
  background: var(--rs-bg-secondary);
  border: 1px solid var(--rs-border-primary);
  border-radius: 6px;
  padding: 1.5rem;
  height: 100%;
}

.begroup-objectives-list__item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  color: var(--rs-title-primary);
  margin-bottom: 1rem;
}

.begroup-objectives-list__item:last-child {
  margin-bottom: 0;
}

.begroup-objectives-list__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  min-width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--rs-theme-primary);
  color: var(--rs-white);
  margin-top: 0.125rem;
}

.begroup-objectives-list__icon i {
  font-size: 14px;
  line-height: 1;
}

/* Full-width CTA used across public pages */
.begroup-cta {
  margin-top: 0;
  overflow: hidden;
}

/* Service detail — breathing room under cover and above CTA/footer */
.service-details.section-space {
  padding-top: 100px;
  padding-bottom: 100px;
}

@media only screen and (max-width: 991px) {
  .service-details.section-space {
    padding-top: 70px;
    padding-bottom: 70px;
  }
}

@media only screen and (max-width: 767px) {
  .service-details.section-space {
    padding-top: 50px;
    padding-bottom: 50px;
  }
}

.begroup-cta .rs-cta-bg-thumb {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.begroup-cta::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgb(0 0 0 / 62%);
  content: "";
}

.begroup-cta .container {
  position: relative;
  z-index: 2;
}

/* Always-visible header (disable hide-until-scroll sticky behavior) */
.rs-header-one .header-wrapper {
  opacity: 1;
  visibility: visible;
  transform: none;
}

/* Home: keep bar pinned and visible over the hero */
.rs-header-one.header-transparent {
  position: fixed;
  top: 0;
  inset-inline-start: 0;
  width: 100%;
  z-index: 999;
}

.rs-header-one.header-transparent .header-wrapper {
  background: rgb(15 23 32 / 72%);
  backdrop-filter: blur(10px);
}

/* Inner pages: stick to top while scrolling */
.rs-header-one.has-bg-white .header-wrapper {
  position: sticky;
  top: 0;
  z-index: 999;
}

.rs-header-one .header-wrapper.is-sticky {
  box-shadow: 0 8px 24px rgb(0 0 0 / 12%);
}

.rs-header-one.header-transparent .header-wrapper.is-sticky {
  background: rgb(15 23 32 / 92%);
}

/* —— Mobile offcanvas menu —— */
.offcanvas-close {
  cursor: pointer;
  color: var(--rs-white);
  font-size: 20px;
  flex-shrink: 0;
}

.offcanvas-close:hover {
  opacity: 0.85;
}

.offcanvas-contact-icon i {
  font-size: 20px;
  color: var(--rs-theme-primary);
  line-height: 1;
}

.offcanvas-contact-text span,
.offcanvas-contact-text a {
  color: var(--rs-text-body, #585b6f);
  line-height: 1.5;
}

.mobile-menu.mean-container .mean-bar {
  min-height: 0;
  margin-bottom: 0;
  padding: 0;
}

.mobile-menu.mean-container .mean-nav {
  float: none;
  width: 100%;
}

.mobile-menu.mean-container .mean-nav>ul {
  display: block !important;
}

.mobile-menu.mean-container .mean-nav ul li a {
  font-size: 16px;
  font-weight: 600;
  padding: 14px 0;
  color: var(--rs-title-primary);
}

.mobile-menu.mean-container .mean-nav ul li a:hover {
  color: var(--rs-theme-primary);
  background: transparent;
}

.begroup-offcanvas-lang__links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.begroup-offcanvas-lang__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 8px 16px;
  border: 1px solid var(--rs-border-primary);
  border-radius: 4px;
  color: var(--rs-title-primary);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: color 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
}

.begroup-offcanvas-lang__link:hover,
.begroup-offcanvas-lang__link.is-active {
  color: var(--rs-white);
  background: var(--rs-theme-primary);
  border-color: var(--rs-theme-primary);
}

.begroup-offcanvas-cta .rs-btn {
  color: var(--rs-white);
}

.begroup-offcanvas-cta .rs-btn .icon-box svg path {
  fill: var(--rs-white);
}

/* Compact header lang switch on mobile (home has no top bar) */
.begroup-header-lang {
  display: none;
  align-items: center;
  gap: 6px;
  margin-inline-end: 10px;
  font-size: 13px;
  font-weight: 600;
}

.begroup-header-lang a {
  color: inherit;
  text-decoration: none;
}

.begroup-header-lang a.is-active {
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media only screen and (max-width: 1199px) {
  .begroup-header-lang {
    display: inline-flex;
  }

  .rs-header-one.header-transparent .begroup-header-lang,
  .rs-header-one.header-transparent .begroup-header-lang a {
    color: var(--rs-white);
  }

  .rs-header-one.has-bg-white .begroup-header-lang,
  .rs-header-one.has-bg-white .begroup-header-lang a,
  .rs-sticky-header .begroup-header-lang,
  .rs-sticky-header .begroup-header-lang a {
    color: var(--rs-title-primary);
  }
}

/* Subsidiary detail — breathing room between content blocks */
.begroup-subsidiary-detail__block {
  margin-bottom: 2.5rem;
}

.begroup-subsidiary-detail__block--last,
.begroup-subsidiary-detail__block:last-child {
  margin-bottom: 0;
}

@media only screen and (max-width: 767px) {
  .begroup-subsidiary-detail__block {
    margin-bottom: 2rem;
  }
}

/* Subsidiaries index — uniform card image size */
.begroup-subsidiaries-index .rs-blog-thumb {
  height: 240px;
  border: 1px solid var(--rs-border-primary);
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
  background: var(--rs-white);
}

.begroup-subsidiaries-index .rs-blog-thumb a {
  display: block;
  height: 100%;
}

.begroup-subsidiaries-index .rs-blog-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.begroup-subsidiaries-index .rs-blog-thumb.is-logo {
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.begroup-subsidiaries-index .rs-blog-thumb.is-logo a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 0.75rem;
}

.begroup-subsidiaries-index .rs-blog-thumb.is-logo img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  transform: none;
}

.begroup-subsidiaries-index .rs-blog-item:hover .rs-blog-thumb.is-logo img {
  transform: none;
}

@media only screen and (max-width: 767px) {
  .begroup-subsidiaries-index .rs-blog-thumb {
    height: 220px;
  }
}

/* Home intro highlight icons */
.begroup-intro-highlight__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 6px;
  background: rgb(246 5 22 / 8%);
  color: var(--rs-theme-primary);
}

.begroup-intro-highlight__icon i {
  font-size: 26px;
  line-height: 1;
  color: inherit;
}

.begroup-intro-highlight__icon i::before {
  display: block;
}

/* Home stats cards — compact height + clear section spacing */
.begroup-stats {
  padding-top: 70px;
  padding-bottom: 70px;
  overflow: visible;
  position: relative;
  z-index: 1;
}

.begroup-stats .rs-counter-item {
  padding: 24px 20px !important;
  min-height: 0 !important;
  height: auto !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.begroup-stats .rs-counter-number {
  margin-bottom: 10px;
  line-height: 1.1;
}

/* Keep counter digits LTR in Arabic so 500/30 don't render as 005/03 */
body.rtl .odometer,
[dir="rtl"] .odometer {
  direction: ltr;
  unicode-bidi: isolate;
}

.begroup-stats .rs-counter-item p {
  margin-bottom: 0;
  color: var(--rs-text-primary);
  font-size: 15px;
  line-height: 1.4;
}

.begroup-certifications {
  margin-top: 0 !important;
  padding-top: 70px;
  padding-bottom: 70px;
  position: relative;
  z-index: 0;
}

.begroup-cert-code {
  display: inline-block;
  color: var(--rs-theme-primary);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.3;
}

.begroup-contact-card {
  background: var(--rs-bg-secondary);
  border: 1px solid var(--rs-border-primary);
  border-radius: 6px;
  padding: 2rem 1.5rem;
}

.begroup-contact-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin-bottom: 1rem;
  border-radius: 50%;
  background: var(--rs-theme-primary);
  color: var(--rs-white);
}

.begroup-contact-card__icon i {
  font-size: 1.5rem;
  line-height: 1;
}

.begroup-contact-card__title {
  margin-bottom: 0.5rem;
  color: var(--rs-title-primary);
  font-size: 1.25rem;
  font-weight: 700;
}

.begroup-contact-card__link,
.begroup-contact-card__text {
  color: var(--rs-text-primary);
  word-break: break-word;
}

.begroup-contact-card__link:hover {
  color: var(--rs-theme-primary);
}

@media only screen and (max-width: 991px) {

  .begroup-stats,
  .begroup-certifications {
    padding-top: 55px;
    padding-bottom: 55px;
  }
}

@media only screen and (max-width: 767px) {

  .begroup-stats,
  .begroup-certifications {
    padding-top: 45px;
    padding-bottom: 45px;
  }

  .begroup-stats .rs-counter-item {
    padding: 20px 14px !important;
  }
}

/* Home hero — cover crop, equal slide height, no fade bleed-through */
.begroup-hero {
  overflow: hidden;
  background-color: #1a1a1a;
}

.begroup-hero .swiper,
.begroup-hero .swiper-wrapper,
.begroup-hero .swiper-slide {
  height: 100%;
}

.begroup-hero .swiper {
  position: relative;
}

.begroup-hero .swiper-slide {
  background-color: #1a1a1a;
  overflow: hidden;
}

.begroup-hero .rs-banner-bg-thumb,
.begroup-hero .begroup-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  background-color: #1a1a1a;
}

.begroup-hero__bg--mobile {
  display: none;
}

.begroup-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(0, 0, 0, 0.6);
  pointer-events: none;
}

.begroup-hero .rs-banner-wrapper>.container-fluid {
  position: relative;
  z-index: 2;
  width: 100%;
}

.begroup-hero .rs-banner-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  box-sizing: border-box;
  min-height: 0;
  overflow: hidden;
}

/* Hero pagination dots — always visible on desktop + mobile */
.begroup-hero .rs-banner-pagination {
  display: block !important;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 28px;
  z-index: 5;
  pointer-events: none;
}

.begroup-hero .rs-banner-pagination .rs-pagination.swiper-pagination {
  position: relative;
  bottom: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  pointer-events: auto;
}

.begroup-hero .rs-pagination.swiper-pagination .swiper-pagination-bullet {
  width: 10px;
  height: 10px;
  margin: 0 6px;
  background: rgba(255, 255, 255, 0.45);
  opacity: 1;
  border-radius: 50%;
  transition: background-color 0.25s ease, transform 0.25s ease;
}

.begroup-hero .rs-pagination.swiper-pagination .swiper-pagination-bullet::before {
  display: none;
}

.begroup-hero .rs-pagination.swiper-pagination .swiper-pagination-bullet-active {
  background: var(--rs-theme-primary, #f60516);
  transform: scale(1.15);
}

/*
 * Mobile / tablet: portrait frame matching admin hint (768 × 1200).
 * Aspect-ratio is on the section itself because Swiper fade positions
 * slides absolutely and would otherwise collapse / ignore inner heights.
 */
@media only screen and (max-width: 991px) {
  .begroup-hero__bg--desktop {
    display: none !important;
  }

  .begroup-hero__bg--mobile {
    display: block !important;
  }

  .begroup-hero {
    width: 100%;
    height: auto !important;
    aspect-ratio: 768 / 1200;
    max-height: 85vh;
  }

  .begroup-hero .rs-banner-slider-wrapper,
  .begroup-hero .swiper,
  .begroup-hero .swiper-wrapper,
  .begroup-hero .swiper-slide,
  .begroup-hero .rs-banner-wrapper {
    height: 100% !important;
    max-height: none !important;
    min-height: 0 !important;
  }

  .begroup-hero .rs-banner-wrapper {
    width: 100%;
    padding-top: 120px !important;
    padding-bottom: 40px !important;
    padding-inline-start: 0 !important;
    padding-inline-end: 16px !important;
  }

  .begroup-hero .rs-banner-title {
    font-size: clamp(28px, 7vw, 42px);
    line-height: 1.2;
  }

  .begroup-hero .rs-banner-desc {
    margin-bottom: 22px;
    font-size: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .begroup-hero .rs-banner-line {
    margin-top: 18px;
    margin-bottom: 16px;
  }

  .begroup-hero .rs-banner-btn {
    margin-bottom: 0;
  }
}

@media only screen and (max-width: 575px) {
  .begroup-hero .rs-banner-wrapper {
    padding-top: 108px !important;
    padding-bottom: 32px !important;
  }

  .begroup-hero .rs-banner-subtitle {
    margin-bottom: 10px;
    font-size: 12px;
  }

  .begroup-hero .rs-banner-desc {
    -webkit-line-clamp: 2;
    line-clamp: 2;
    margin-bottom: 18px;
  }

  .begroup-hero__overlay {
    background: rgba(0, 0, 0, 0.6);
  }
}

/* Home hero — fixed desktop height (matches 1920 × 800 admin hint) */
@media only screen and (min-width: 992px) {
  .begroup-hero {
    height: 800px !important;
  }

  .begroup-hero .rs-banner-slider-wrapper,
  .begroup-hero .swiper,
  .begroup-hero .swiper-wrapper,
  .begroup-hero .swiper-slide,
  .begroup-hero .rs-banner-wrapper {
    height: 100% !important;
    max-height: none !important;
  }

  .begroup-hero .rs-banner-wrapper {
    padding-top: 150px !important;
    padding-bottom: 90px !important;
  }

  .begroup-hero .rs-banner-title {
    font-size: clamp(42px, 4.2vw, 64px);
    line-height: 1.15;
  }

  .begroup-hero .rs-banner-desc {
    margin-bottom: 28px;
  }

  .begroup-hero .rs-banner-btn {
    margin-bottom: 0;
  }
}

@media only screen and (min-width: 1400px) {
  .begroup-hero {
    height: 800px !important;
  }

  .begroup-hero .rs-banner-wrapper {
    padding-top: 150px !important;
    padding-bottom: 100px !important;
  }
}

/* Footer — logo aligned with other columns */
.begroup-footer .begroup-footer__grid {
  display: grid;
  grid-template-columns: minmax(160px, 0.9fr) minmax(240px, 1.4fr) 1fr 1fr;
  gap: 40px 48px;
  align-items: start;
  padding-top: 80px;
  padding-bottom: 70px;
}

.begroup-footer .begroup-footer__brand {
  padding-top: 4px;
}

.begroup-footer .rs-footer-logo {
  width: 160px;
  margin-bottom: 18px;
}

.begroup-footer .rs-footer-logo img {
  width: 100%;
  height: auto;
  display: block;
}

.begroup-footer .begroup-footer__tagline {
  color: rgb(255 255 255 / 72%);
  font-size: 15px;
  line-height: 1.5;
  margin: 0;
  max-width: 220px;
}

.begroup-footer .rs-footer-widget-title {
  margin-top: 0;
}

.begroup-footer .rs-footer-widget+.rs-footer-widget,
.begroup-footer .begroup-footer__brand+.rs-footer-widget {
  border-inline-start: 1px solid rgb(255 255 255 / 8%);
  padding-inline-start: 40px;
}

@media only screen and (max-width: 1199px) {
  .begroup-footer .begroup-footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 36px 32px;
    padding-top: 60px;
    padding-bottom: 50px;
  }

  .begroup-footer .rs-footer-widget+.rs-footer-widget,
  .begroup-footer .begroup-footer__brand+.rs-footer-widget {
    border-inline-start: 0;
    padding-inline-start: 0;
  }
}

@media only screen and (max-width: 767px) {
  .begroup-footer .begroup-footer__grid {
    grid-template-columns: 1fr;
    gap: 32px;
    padding-top: 50px;
    padding-bottom: 40px;
  }
}

/* Chairman's message */
.begroup-chairman__portrait {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  background: var(--rs-white);
}

.begroup-chairman__portrait img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.begroup-chairman__portrait--logo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 36px;
  aspect-ratio: 4 / 5;
}

.begroup-chairman__portrait--logo img {
  width: 100%;
  max-width: 260px;
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
}

.begroup-chairman__portrait::after {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  bottom: 0;
  width: 64px;
  height: 4px;
  background: var(--rs-theme-primary);
}

.begroup-chairman__body p {
  color: var(--rs-text-primary);
  font-size: 16px;
  line-height: 1.75;
  margin-bottom: 1.1rem;
}

.begroup-chairman__body p:last-child {
  margin-bottom: 0;
}

.begroup-chairman__signature {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rs-border-primary);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.begroup-chairman__name {
  color: var(--rs-title-primary);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
}

.begroup-chairman__role {
  color: var(--rs-theme-primary);
  font-size: 15px;
  font-weight: 500;
}

@media only screen and (max-width: 991px) {
  .begroup-chairman__portrait {
    max-width: 320px;
    margin-inline: auto;
  }
}