/* ==========================================================================
   SECOND PAGE & INDUSTRY PAGE HERO SECTION (CONSOLIDATED & CLEANED)
   ========================================================================== */

.page-section {
  padding: calc(var(--header-h, 70px) + 32px) 0 80px;
  background-color: var(--bg-main);
  color: var(--ink);
  font-family: var(--font);
  transition: background-color var(--transition), color var(--transition);
}

.container {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

/* ==========================================================================
   TOP HERO SECTION (.row-top)
   ========================================================================== */

.row-top {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  width: 100%;
}

/* --- Columns Dimensions --- */
.row-top > .left,
.row-top > .right {
  flex: 1 1 50%;
  max-width: 50%;
  width: 100%;
  box-sizing: border-box;
}

/* ==========================================================================
   DIRECTION-AWARE LAYOUT & TEXT ALIGNMENT
   ========================================================================== */

/* 1. RTL (Persian / Arabic): Text on Physical Right, Image on Physical Left */
[dir="rtl"] .row-top {
  flex-direction: row-reverse !important;
}

[dir="rtl"] .row-top > .right {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-end !important; /* Align children strictly to the right edge */
  text-align: right !important;
  direction: rtl !important;
}

[dir="rtl"] .row-top > .right .right-item {
  width: 100% !important;
  text-align: right !important;
  margin-left: auto !important;
  margin-right: 0 !important;
}

[dir="rtl"] .row-top > .right .main-heading,
[dir="rtl"] .row-top > .right .sub-heading,
[dir="rtl"] .row-top > .right .desc-text {
  text-align: right !important;
  direction: rtl !important;
  width: 100% !important;
}

/* 2. LTR (English / Russian / etc.): Text on Physical Left, Image on Physical Right */
[dir="ltr"] .row-top {
  flex-direction: row-reverse !important;
}

[dir="ltr"] .row-top > .right {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important; /* Align children strictly to the left edge */
  text-align: left !important;
  direction: ltr !important;
}

[dir="ltr"] .row-top > .right .right-item {
  width: 100% !important;
  text-align: left !important;
  margin-left: 0 !important;
  margin-right: auto !important;
}

[dir="ltr"] .row-top > .right .main-heading,
[dir="ltr"] .row-top > .right .sub-heading,
[dir="ltr"] .row-top > .right .desc-text {
  text-align: left !important;
  direction: ltr !important;
  width: 100% !important;
}

/* ==========================================================================
   TEXT TYPOGRAPHY (.right-item)
   ========================================================================== */

.right-item {
  width: 100%;
  max-width: 600px;
}

.right-item + .right-item {
  margin-top: 24px;
}

.right-item .main-heading {
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  font-weight: 800;
  color: var(--ink);
  line-height: 1.3;
  margin-bottom: 14px;
}

.right-item .sub-heading {
  font-size: clamp(1.3rem, 2.2vw, 1.8rem);
  font-weight: 700;
  color: var(--accent);
  line-height: 1.4;
  margin-top: 16px;
  margin-bottom: 10px;
  transition: color var(--transition);
}

.right-item .desc-text {
  font-size: 1.05rem;
  line-height: 1.9;
  color: var(--ink-dim);
  transition: color var(--transition);
}

/* ==========================================================================
   HERO IMAGE WRAPPER (Transparent, Clean, Only Image Visible)
   ========================================================================== */

.row-top > .left {
  display: flex;
  align-items: center;
  justify-content: center;
}

.row-top .image-wrapper {
  position: relative;
  width: 100%;
  min-height: 380px;
  max-height: 520px;
  aspect-ratio: 4 / 3;

  /* No card backgrounds, borders, or shadows */
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0;

  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.row-top .image-wrapper .swap-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain; /* Shows full uncropped image */
  object-position: center;
  background: transparent;
  border: none;
  box-shadow: none;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 600ms ease, transform 600ms ease;
  z-index: 1;
}

.row-top .image-wrapper .swap-img.active {
  opacity: 1;
  transform: scale(1);
  z-index: 2;
}

.image-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: var(--ink-dim);
}

/* ==========================================================================
   DEDICATED SP-RIGHT-TEXT STYLES
   ========================================================================== */

/* 1. Base Dimensions & Flex Settings */
.row-top > .sp-right-text {
  flex: 0 0 calc(50% - 20px) !important;
  width: calc(50% - 20px) !important;
  max-width: calc(50% - 20px) !important;
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
}

/* 2. Default & RTL Behavior: Pinned hard to the RIGHT */
.row-top > .sp-right-text,
[dir="rtl"] .row-top > .sp-right-text {
  align-items: flex-end !important;   /* Pushes flex children to the right edge */
  text-align: right !important;
  direction: rtl !important;
}

.row-top > .sp-right-text .right-item,
[dir="rtl"] .row-top > .sp-right-text .right-item {
  width: 100% !important;
  max-width: 600px !important;
  margin-left: auto !important;       /* Prevents auto-centering */
  margin-right: 0 !important;
  text-align: right !important;
  direction: rtl !important;
}

.row-top > .sp-right-text .main-heading,
.row-top > .sp-right-text .sub-heading,
.row-top > .sp-right-text .desc-text,
[dir="rtl"] .row-top > .sp-right-text .main-heading,
[dir="rtl"] .row-top > .sp-right-text .sub-heading,
[dir="rtl"] .row-top > .sp-right-text .desc-text {
  width: 100% !important;
  text-align: right !important;
  direction: rtl !important;
  margin-left: auto !important;
  margin-right: 0 !important;
  display: block !important;
}

/* 3. LTR Behavior: Pinned to the LEFT for English, Russian, etc. */
[dir="ltr"] .row-top > .sp-right-text {
  align-items: flex-start !important;
  text-align: left !important;
  direction: ltr !important;
}

[dir="ltr"] .row-top > .sp-right-text .right-item {
  margin-left: 0 !important;
  margin-right: auto !important;
  text-align: left !important;
  direction: ltr !important;
}

[dir="ltr"] .row-top > .sp-right-text .main-heading,
[dir="ltr"] .row-top > .sp-right-text .sub-heading,
[dir="ltr"] .row-top > .sp-right-text .desc-text {
  width: 100% !important;
  text-align: left !important;
  direction: ltr !important;
  margin-left: 0 !important;
  margin-right: auto !important;
}

/* ==========================================================================
   NEW ALTERNATING LOOP SECTIONS (.section-row)
   ========================================================================== */

.section-row {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  width: 100%;
  box-sizing: border-box;
  margin-top: 72px;
}

/* Column Dimensions (Identical 50/50 split to row-top) */
.section-row > .section-col {
  flex: 0 0 calc(50% - 20px) !important;
  width: calc(50% - 20px) !important;
  max-width: calc(50% - 20px) !important;
  box-sizing: border-box !important;
}

/* --- RTL (Default & dir="rtl") Alternation --- */
/* Loop 1: Inverted (Image on Right, Text on Left) */
.section-row.section-row--reverse,
[dir="rtl"] .section-row.section-row--reverse {
  flex-direction: row !important;
}

/* Loop 2: Normal (Text on Right, Image on Left - matches hero) */
.section-row.section-row--normal,
[dir="rtl"] .section-row.section-row--normal {
  flex-direction: row-reverse !important;
}

/* --- LTR Alternation --- */
[dir="ltr"] .section-row.section-row--reverse {
  flex-direction: row !important;
}

[dir="ltr"] .section-row.section-row--normal {
  flex-direction: row-reverse !important;
}

/* --- Section Typography & Alignment --- */
.section-col-text {
  display: flex !important;
  flex-direction: column !important;
}

.section-col-text,
[dir="rtl"] .section-col-text {
  align-items: flex-end !important;
  text-align: right !important;
  direction: rtl !important;
}

.section-col-text .section-text-inner,
[dir="rtl"] .section-col-text .section-text-inner {
  width: 100% !important;
  max-width: 600px !important;
  margin-left: auto !important;
  margin-right: 0 !important;
  text-align: right !important;
  direction: rtl !important;
}

.section-col-text .main-heading,
.section-col-text .desc-text,
[dir="rtl"] .section-col-text .main-heading,
[dir="rtl"] .section-col-text .desc-text {
  width: 100% !important;
  text-align: right !important;
  direction: rtl !important;
  margin-left: auto !important;
  margin-right: 0 !important;
  display: block !important;
}

[dir="ltr"] .section-col-text {
  align-items: flex-start !important;
  text-align: left !important;
  direction: ltr !important;
}

[dir="ltr"] .section-col-text .section-text-inner {
  margin-left: 0 !important;
  margin-right: auto !important;
  text-align: left !important;
  direction: ltr !important;
}

[dir="ltr"] .section-col-text .main-heading,
[dir="ltr"] .section-col-text .desc-text {
  text-align: left !important;
  direction: ltr !important;
  margin-left: 0 !important;
  margin-right: auto !important;
}

/* --- Section Image / Slider Wrapper (Transparent, Uncropped) --- */
.section-col-media {
  display: flex;
  align-items: center;
  justify-content: center;
}

.section-image-wrapper {
  position: relative;
  width: 100%;
  min-height: 380px;
  max-height: 520px;
  aspect-ratio: 4 / 3;

  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0;

  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.section-image-wrapper .below-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain; /* Full uncropped image visible */
  object-position: center;
  background: transparent;
  border: none;
  box-shadow: none;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 600ms ease, transform 600ms ease;
  z-index: 1;
  pointer-events: none;
}

.section-image-wrapper .below-slide.active {
  opacity: 1;
  transform: scale(1);
  z-index: 2;
  pointer-events: auto;
}

/* ==========================================================================
   RESPONSIVE DESIGN (MOBILE & TABLET)
   ========================================================================== */


/* ==========================================================================
   FLOATING QUICK CONTACT BAR (.sp-floating-contact-bar)
   ========================================================================== */
/* ==========================================================================
   DYNAMIC SCROLL-AWARE CONTACT BAR (.sp-floating-contact-bar)
   ========================================================================== */

.sp-floating-contact-bar {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 10px 8px;
  background: var(--bg-card, rgba(255, 255, 255, 0.88));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border, rgba(0, 0, 0, 0.08));
  border-radius: 30px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);

  /* Smooth gliding movement across screen with subtle scale/fade */
  transition: left 450ms cubic-bezier(0.25, 1, 0.5, 1), 
              right 450ms cubic-bezier(0.25, 1, 0.5, 1), 
              transform 450ms cubic-bezier(0.25, 1, 0.5, 1), 
              opacity 300ms ease;
}

/* Default fallback before JS initializes */
.sp-floating-contact-bar {
  left: 20px;
  right: auto;
}
[dir="ltr"] .sp-floating-contact-bar {
  right: 20px;
  left: auto;
}
/* Dynamic Classes with a tiny sliding & scaling shift during transition */
.sp-floating-contact-bar.is-left {
  left: 20px !important;
  right: auto !important;
  transform: translateY(-50%) translateX(0) scale(1);
}


.sp-floating-contact-bar.is-right {
  right: 20px !important;
  left: auto !important;
  transform: translateY(-50%) translateX(0) scale(1);
}

/* Optional: Add a subtle momentum shift right as it starts moving */
.sp-floating-contact-bar.is-switching {
  opacity: 0.85;
  transform: translateY(-50%) scale(0.96);
}

/* --- Contact Buttons --- */
.quick-contact-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: #ffffff !important;
  text-decoration: none;
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.quick-contact-btn svg {
  display: block;
  fill: currentColor;
}

.quick-contact-btn:hover {
  transform: scale(1.12);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.quick-contact-btn:active {
  transform: scale(0.95);
}

.phone-btn {
  background: linear-gradient(135deg, #007aff, #0056b3);
}

.whatsapp-btn {
  background: linear-gradient(135deg, #25d366, #128c7e);
}

.email-btn {
  background: linear-gradient(135deg, #ea4335, #c5221f);
}


/* ===== SLIDER NAVIGATION ARROWS & WRAPPER ===== */
[data-image-slider],
.section-slider,
[data-below-slider] {
  position: relative;
  touch-action: pan-y; /* Allows normal page scrolling vertically, but captures horizontal swipe gestures */
}

/* Base button styling */
.sp-slider-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
  user-select: none;
  opacity: 0.85;
}

.sp-slider-nav-btn:hover {
  background: rgba(0, 0, 0, 0.75);
  transform: translateY(-50%) scale(1.08);
  opacity: 1;
}

.sp-slider-nav-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  display: block;
}

/* Side positioning using logical properties (works seamlessly in RTL & LTR) */
.sp-slider-prev {
  inset-inline-start: 12px;
}

.sp-slider-next {
  inset-inline-end: 12px;
}

/* Arrow flip for correct visual direction in RTL */
[dir="rtl"] .sp-slider-prev svg { transform: rotate(180deg); }
[dir="rtl"] .sp-slider-next svg { transform: rotate(180deg); }




@media (max-width: 860px) {
  /* Hero section mobile */
  .row-top {
    flex-direction: column-reverse !important; /* Text on top, image below */
    gap: 32px;
  }

  .row-top > .left,
  .row-top > .right,
  .row-top > .sp-right-text {
    flex: 1 1 100% !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .row-top .image-wrapper {
    min-height: 250px;
    max-height: 360px;
  }

  /* Loop sections mobile (consistent: text always on top, image below) */
  .section-row,
  .section-row.section-row--normal,
  .section-row.section-row--reverse,
  [dir="rtl"] .section-row.section-row--normal,
  [dir="rtl"] .section-row.section-row--reverse,
  [dir="ltr"] .section-row.section-row--normal,
  [dir="ltr"] .section-row.section-row--reverse {
    flex-direction: column-reverse !important;
    gap: 28px;
    margin-top: 48px;
  }

  .section-row > .section-col {
    flex: 1 1 100% !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .section-image-wrapper {
    min-height: 250px;
    max-height: 360px;
  }
}



/* --- Mobile (Screen width <= 768px) --- */
@media (max-width: 768px) {
  .sp-floating-contact-bar {
    top: auto;
    bottom: 20px;
    transform: none;
    flex-direction: row; /* Stays horizontal at the bottom so it never blocks reading */
    padding: 6px 10px;
    gap: 10px;
  }

  .quick-contact-btn {
    width: 38px;
    height: 38px;
  }

  .quick-contact-btn svg {
    width: 18px;
    height: 18px;
  }
}











