/* Classic Template — Enterprise v1
 * Derived from legacy Omadot-legacy/template/src/styles/site.css + global.css
 * Provides: sidebar layout, orange brand theme, RTL support.
 */

/* ── Brand color ─────────────────────────────────────────────────────────── */
:root {
  --main-color: #e17043;
}

/* ── Global resets ───────────────────────────────────────────────────────── */
body { overflow-x: hidden; }

/* Scoped to page content — avoids overriding inline-styled CTA/hero links */
#page-content-wrapper a:not([style*="color"]) { text-decoration: none !important; color: var(--main-color) !important; }
#page-content-wrapper a:not([style*="color"]):hover { cursor: pointer; color: black !important; }
/* Sidebar and nav links still get the brand colour unconditionally */
#sidebar-wrapper a,
.navbar a { text-decoration: none !important; color: var(--main-color) !important; }

p { margin-top: 0; margin-bottom: 0.5rem !important; }

/* ── Bootstrap overrides ─────────────────────────────────────────────────── */
.btn-primary {
  background-color: var(--main-color) !important;
  border-color: var(--main-color) !important;
}
.bg-primary {
  --bs-bg-opacity: 1;
  background-color: var(--main-color) !important;
}
.nav-link { color: var(--main-color) !important; }

/* ── Sidebar shell ───────────────────────────────────────────────────────── */
#wrapper {
  overflow-x: hidden;
  padding-left: 0;
  transition: all 0.5s ease;
}
#wrapper.toggled { padding-left: 250px; }

#sidebar-wrapper {
  z-index: 1000;
  padding-top: 60px;
  position: fixed;
  left: 250px;
  background: white;
  width: 0;
  height: 100%;
  margin-left: -250px;
  overflow-y: auto;
  transition: all 0.5s ease;
}
#wrapper.toggled #sidebar-wrapper { width: 250px; }

#sidebar-wrapper .sidebar-heading {
  padding: 0.875rem 1.25rem;
  font-size: 1.2rem;
}

@media (min-width: 768px) {
  #wrapper { padding-left: 250px; }
  #wrapper.toggled { padding-left: 0; }
  #sidebar-wrapper { width: 250px; }
  #wrapper.toggled #sidebar-wrapper { width: 0; }
  #page-content-wrapper { position: relative; }
  #wrapper.toggled #page-content-wrapper { position: relative; margin-right: 0; }
}

/* ── Classic-specific ────────────────────────────────────────────────────── */
.img-logo-navbar { height: 39px; }
header.bg-primary { padding-top: 3rem; padding-bottom: 3rem; }

/* ── Hero homepage ───────────────────────────────────────────────────────── */
.hero-homepage {
  min-height: clamp(220px, 40vh, 480px);
  padding: 3rem 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-content-wrapper {
  position: relative;
  z-index: 1;
  width: 100%;
}
.hero-homepage h1 {
  font-size: clamp(1.5rem, 5vw, 3rem);
}
.hero-homepage form {
  flex-wrap: wrap;
  gap: 0.5rem;
}
.hero-homepage form .form-control {
  width: 100% !important;
  min-width: 0;
}
.hero-homepage form .btn {
  flex-shrink: 0;
}
@media (min-width: 576px) {
  .hero-homepage form .form-control {
    width: 50% !important;
  }
}

/* ── Image helpers ───────────────────────────────────────────────────────── */
.img-resp { max-width: 100%; height: auto; border: 0 !important; background-color: inherit; border-radius: 0.25rem !important; }
.img-logo { height: 150px; }

/* ── Rich-text images ────────────────────────────────────────────────────── */
/* !important overrides inline width/height attributes set by the editor.
   width:100% fills the container; max-width:100% caps it there.
   Together they make any image fill but never overflow its parent. */
.rte-img,
.rich-text img {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  display: block;
}

/* ── Responsive iframe wrapper (maps, video embeds) ─────────────────────── */
.footer-block--location iframe,
.embed-responsive-iframe {
  width: 100% !important;
  max-width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  display: block;
}

/* ── Bootstrap carousel slide images ────────────────────────────────────── */
/* Publisher emits height:400px inline; clamp it on small screens */
#homeCarousel .carousel-item img {
  height: clamp(180px, 40vw, 400px) !important;
  object-fit: cover;
}

/* ── Lazy-load blur-up (from global.css) ─────────────────────────────────── */
.blur-up { filter: blur(12px); transition: filter 0.4s; }
.blur-up.lazyloaded { filter: blur(0); }

/* ── Carousel background (from global.css) ──────────────────────────────── */
.carousel-bg-img {
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  width: 100%;
  height: 400px;
}

/* ── RTL support ─────────────────────────────────────────────────────────── */
/* dir="rtl" is set in base.html via {{DIR}} token (resolved at publish-time) */
[dir="rtl"] #wrapper { padding-left: 0; padding-right: 0; }
[dir="rtl"] #wrapper.toggled { padding-right: 250px; padding-left: 0; }
[dir="rtl"] #sidebar-wrapper { left: unset; right: 250px; margin-left: 0; margin-right: -250px; }
[dir="rtl"] #wrapper.toggled #sidebar-wrapper { width: 250px; }
@media (min-width: 768px) {
  [dir="rtl"] #wrapper { padding-right: 250px; padding-left: 0; }
  [dir="rtl"] #wrapper.toggled { padding-right: 0; }
}

/* RTL per-language class (legacy compat) */
.he-IL { direction: rtl; }

/* ── Section block responsive overrides ─────────────────────────────────── */
/* These target the inline-styled blocks generated by the site-builder         */

/* CTA banner */
.cta-banner {
  padding: 2rem 1rem !important;
  overflow: hidden;
}
.cta-banner h2 {
  font-size: clamp(1.25rem, 4vw, 2rem) !important;
}

/* Full-width hero section */
.hero-section {
  padding: 2rem 1rem !important;
  min-height: 50vh !important;
  overflow: hidden;
}
.hero-section h1 {
  word-break: break-word;
}
/* Constrain inner content div so rte images can't blow past the section */
.hero-section > div {
  max-width: 100% !important;
  width: 100% !important;
  box-sizing: border-box;
  overflow: hidden;
}

/* Text section */
.text-section {
  padding: 2rem 1rem !important;
  overflow: hidden;
}
.text-section > div {
  max-width: 100% !important;
  box-sizing: border-box;
}

/* 3D carousel wrapper height — less aggressive on narrow screens */
.carousel-3d-wrapper {
  height: 40vh !important;
}
@media (max-width: 575.98px) {
  .carousel-3d-wrapper {
    height: 260px !important;
  }
}

/* Card grid — ensure single column on xs */
.homepage .row.g-4 > [class*="col-"] {
  width: 100%;
}
@media (min-width: 576px) {
  .homepage .row.g-4 > [class*="col-md-4"] {
    width: 50%;
  }
}
@media (min-width: 768px) {
  .homepage .row.g-4 > [class*="col-md-4"] {
    width: 33.3333%;
  }
}

/* ── Footer ──────────────────────────────────────────────────────────────── */
footer.template-classic {
  padding: 2rem 0 1rem;
  background: #f8f9fa;
  margin-top: 2rem;
}
