/* =============================================
   About Page (אודות) – Split Screen Layout
   ============================================= */

/* ---------- page-level layout ---------- */
html:has(body.page-template-page-about) {
  overflow-x: hidden !important;
  max-width: 100vw;
}

body.page-template-page-about {
  overflow-x: hidden;
  overflow-y: auto;
  height: auto;
  max-width: 100vw;
  width: 100%;
}

/* ---------- wrapper ---------- */
.about-page-wrapper {
  display: flex;
  flex-direction: row-reverse;           /* RTL: image on left, text on right */
  width: 100%;
  max-width: 100vw;
  height: calc(100vh - 100px);           /* fill viewport minus header */
  min-height: 500px;
  overflow: hidden;
  position: relative;
  box-sizing: border-box;
}

/* ---------- image side (left 50 %) ---------- */
.about-image-side {
  width: 50%;
  height: 100%;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  background-color: #f5f5f5;
}

/* Override Jetpack/LiteSpeed lazy-load that strips bg images */
.about-page-wrapper .about-image-side[style] {
  background-image: var(--bg) !important;
}

/* ---------- hide share buttons ---------- */
.about-page-wrapper .sharedaddy,
.about-page-wrapper .jetpack-sharing-buttons,
.about-page-wrapper .sd-sharing,
body.page-template-page-about .sharedaddy,
body.page-template-page-about .sd-sharing {
  display: none !important;
}

.about-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #e8e8e8 0%, #f0f0f0 50%, #e0e0e0 100%);
  color: rgba(0,0,0,.25);
  font-size: 1.1rem;
  font-family: 'Heebo', 'Assistant', sans-serif;
}

/* ---------- content side (right 50 %) ---------- */
.about-content-side {
  width: 50%;
  max-width: 50%;
  display: flex;
  flex-direction: column;
  padding: 48px 60px 40px 40px;
  background: #ffffff;
  color: #222;
  overflow: hidden;
  position: relative;
  font-family: 'Heebo', 'Assistant', sans-serif;
  box-sizing: border-box;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

/* ---------- breadcrumbs ---------- */
.about-breadcrumbs {
  font-size: 0.85rem;
  margin-bottom: 24px;
  color: rgba(0,0,0,.45);
  flex-shrink: 0;
  padding-right: 0;
}

/* Only add right padding on desktop */
@media (min-width: 992px) {
  .about-breadcrumbs {
    padding-right: 100px;
  }
}

.about-breadcrumbs a {
  color: #4caf50;
  text-decoration: none;
  transition: color .25s ease;
}

.about-breadcrumbs a:hover {
  color: #2e7d32;
  text-decoration: underline;
}

.breadcrumb-separator {
  margin: 0 8px;
  color: rgba(0,0,0,.25);
}

.breadcrumb-current {
  color: rgba(0,0,0,.6);
}

/* ---------- scrollable content ---------- */
.about-content-scroll {
  flex: 1 1 0%;
  overflow-y: auto;
  overflow-x: hidden;
  padding-left: 12px;
  min-height: 0;
  max-width: 100%;
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
  /* custom scrollbar */
  scrollbar-width: thin;
  scrollbar-color: rgba(76,175,80,.5) rgba(0,0,0,.05);
}

.about-content-scroll::-webkit-scrollbar {
  width: 5px;
}

.about-content-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.about-content-scroll::-webkit-scrollbar-thumb {
  background: rgba(76,175,80,.45);
  border-radius: 10px;
}

.about-content-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(76,175,80,.7);
}

/* ---------- typography inside content ---------- */
.about-content-scroll h1 {
  font-size: 2.4rem;
  font-weight: 800;
  color: #111;
  margin: 0 0 12px 0;
  line-height: 1.25;
}

.about-content-scroll h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #2e7d32;
  margin: 32px 0 14px 0;
  line-height: 1.35;
}

.about-content-scroll h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #388e3c;
  margin: 24px 0 10px 0;
}

.about-content-scroll p {
  font-size: 1.05rem;
  line-height: 1.85;
  color: #444;
  margin: 0 0 18px 0;
}

.about-content-scroll ul,
.about-content-scroll ol {
  padding-right: 24px;
  margin: 0 0 18px 0;
}

.about-content-scroll li {
  font-size: 1.05rem;
  line-height: 1.7;
  color: #444;
  margin-bottom: 6px;
}

.about-content-scroll a {
  color: #2e7d32;
  text-decoration: underline;
  transition: color .25s ease;
}

.about-content-scroll a:hover {
  color: #1b5e20;
}

.about-content-scroll blockquote {
  border-right: 4px solid #4caf50;
  padding: 16px 20px;
  margin: 24px 0;
  background: rgba(76,175,80,.06);
  border-radius: 4px;
  font-style: italic;
  color: #666;
}

.about-content-scroll img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 16px 0;
}

/* ---------- responsive ---------- */
@media (max-width: 991px) {
  /* Lock viewport width at every level */
  html:has(body.page-template-page-about),
  html:has(body.page-template-page-about) body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    width: 100vw !important;
  }

  body.page-template-page-about {
    overflow-x: hidden !important;
    overflow-y: auto !important;
    height: auto;
    max-width: 100vw;
    width: 100vw !important;
  }

  /* Force ALL Elementor wrappers + header/nav to stay within viewport */
  body.page-template-page-about > *,
  body.page-template-page-about .elementor,
  body.page-template-page-about .elementor-section,
  body.page-template-page-about .elementor-container,
  body.page-template-page-about .elementor-row,
  body.page-template-page-about .elementor-column,
  body.page-template-page-about .elementor-column-wrap,
  body.page-template-page-about .elementor-widget-wrap,
  body.page-template-page-about .elementor-location-footer,
  body.page-template-page-about header,
  body.page-template-page-about footer,
  body.page-template-page-about nav {
    max-width: 100vw !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }

  /* Fix the sticky bottom CTA buttons that force 500px width */
  body.page-template-page-about .elementor-location-footer .elementor-container,
  body.page-template-page-about .elementor-location-footer .elementor-row {
    max-width: 100vw !important;
    flex-wrap: wrap !important;
  }

  body.page-template-page-about .elementor-location-footer .elementor-column {
    width: 100% !important;
    max-width: 100% !important;
  }

  .about-page-wrapper {
    flex-direction: column;
    height: auto;
    overflow: visible;
    overflow-x: hidden !important;
    max-width: 100vw !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .about-image-side {
    width: 100% !important;
    max-width: 100vw !important;
    height: 45vh;
    min-height: 300px;
  }

  .about-content-side {
    width: 100% !important;
    max-width: 100vw !important;
    padding: 32px 20px 40px !important;
    overflow: visible;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
    contain: inline-size;
  }

  .about-content-scroll {
    overflow: visible;
    overflow-x: hidden !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Force ALL children inside content to stay within bounds */
  .about-content-scroll *,
  .about-content-side *,
  .about-content-scroll .elementor-widget-container,
  .about-content-scroll .elementor-element {
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  /* Reset list padding — this is the #1 cause of overflow in RTL */
  .about-content-scroll ul,
  .about-content-scroll ol {
    padding-right: 16px !important;
    padding-left: 0 !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
    list-style-position: inside !important;
  }

  .about-content-scroll h1,
  .about-content-scroll h2,
  .about-content-scroll h3,
  .about-content-scroll p,
  .about-content-scroll li,
  .about-content-scroll blockquote {
    max-width: 100% !important;
    width: auto !important;
    overflow-wrap: break-word !important;
    word-wrap: break-word !important;
    word-break: break-word !important;
    box-sizing: border-box !important;
    padding-left: 0 !important;
    margin-left: 0 !important;
  }

  /* Breadcrumbs: no right padding on mobile */
  .about-breadcrumbs {
    padding-right: 0 !important;
    text-align: right;
  }
}

@media (max-width: 767px) {
  .about-image-side {
    height: 35vh;
    min-height: 220px;
  }

  .about-content-side {
    padding: 24px 14px 32px !important;
    max-width: 100vw !important;
    width: 100% !important;
  }

  .about-content-scroll h1 {
    font-size: 1.75rem;
  }

  .about-content-scroll h2 {
    font-size: 1.25rem;
  }

  .about-content-scroll p,
  .about-content-scroll li {
    font-size: 0.95rem;
    line-height: 1.7;
  }
}
