/* SAGCO UI/UX polish — navbar, mega menus, hero, card carousels,
   marquees and footer. Brand: navy #1B2958, accent #9D1631. */

/* No section may push the page wider than the viewport. NOTE: Odoo's theme
   makes #wrapwrap the real scroll container (html/body get overflow:hidden),
   so the horizontal guard must live on #wrapwrap — clipping html/body alone
   does not remove #wrapwrap's own horizontal scrollbar. */
html, body { overflow-x: hidden; }
#wrapwrap { overflow-x: hidden; }
@supports (overflow-x: clip) {
  html, body, #wrapwrap { overflow-x: clip; }
}
.elfsight-app-dab82849-42fb-406e-b94a-98109d59a5c9 { max-width: 100%; }

/* Imported spec/data tables can be wider than the column — give them their
   own horizontal scroller instead of letting them widen the page. */
#wrapwrap main table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
#wrapwrap main table > tbody,
#wrapwrap main table > thead {
  display: table;
  width: 100%;
}

/* ============================ Navbar ============================ */

header#top {
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.07);
  transition: box-shadow 0.3s ease;
}

body.sagco-scrolled header#top {
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
}

@media (min-width: 992px) {
  /* Animated underline on plain nav links (dropdown toggles keep their caret) */
  #top_menu .nav-link:not(.dropdown-toggle) {
    position: relative;
  }

  #top_menu .nav-link:not(.dropdown-toggle)::after {
    content: "";
    position: absolute;
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.3rem;
    height: 2px;
    background: #9d1631;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.28s ease;
  }

  #top_menu .nav-link:not(.dropdown-toggle):hover::after,
  #top_menu .nav-link:not(.dropdown-toggle).active::after {
    transform: scaleX(1);
  }

  /* Dropdown caret rotates while open */
  #top_menu .nav-link.dropdown-toggle::after {
    transition: transform 0.25s ease;
  }

  #top_menu .nav-link.dropdown-toggle.show::after {
    transform: rotate(180deg);
  }
}

/* Language pill in the navbar (EN | AR) */
.sagco-nav-lang-item {
  display: flex;
  align-items: center;
}

@media (min-width: 992px) {
  .sagco-nav-lang-item {
    margin-inline-start: 0.9rem;
    padding-inline-start: 0.9rem;
    border-inline-start: 1px solid #e3e8f0;
  }
}

.sagco-nav-lang {
  display: inline-flex;
  align-items: center;
  font-size: 0; /* hide the | separator text node */
  border: 1px solid #d8dfe9;
  border-radius: 999px;
  overflow: hidden;
  background: #f6f8fb;
}

.sagco-nav-lang strong,
.sagco-nav-lang a {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 0.3rem 0.75rem;
  line-height: 1.4;
  text-decoration: none !important;
}

.sagco-nav-lang strong {
  background: #1b2958;
  color: #fff;
}

.sagco-nav-lang a {
  color: #5a6478;
  border-inline-start: 1px solid #d8dfe9;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.sagco-nav-lang a:hover {
  background: #9d1631;
  color: #fff;
}

/* Inside the mobile sidebar */
@media (max-width: 991.98px) {
  .sagco-nav-lang-item {
    padding: 0.9rem 1.25rem;
    border-top: 1px solid #eef1f6;
  }
}

/* =========================== Mega menus ========================= */

@media (min-width: 992px) {
  .sagco-mega-dropdown .sagco-mega-menu {
    border-radius: 0 0 14px 14px;
    box-shadow: 0 28px 56px -18px rgba(15, 23, 42, 0.28);
    border-top: 3px solid #9d1631;
    overflow: hidden;
    padding-top: 0.9rem;
    padding-bottom: 0.9rem;
    background: linear-gradient(180deg, #fbfcfe 0%, #ffffff 100%);
  }
}

.sagco-mega-card {
  border-radius: 0.6rem !important;
  position: relative;
}

.sagco-mega-card-img-wrap {
  position: relative;
}

.sagco-mega-card-img-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(27, 41, 88, 0) 55%, rgba(27, 41, 88, 0.45) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sagco-mega-card-img-wrap img {
  transition: transform 0.5s ease;
}

.sagco-mega-card:hover .sagco-mega-card-img-wrap::after,
.sagco-mega-card:focus .sagco-mega-card-img-wrap::after {
  opacity: 1;
}

.sagco-mega-card:hover .sagco-mega-card-img-wrap img,
.sagco-mega-card:focus .sagco-mega-card-img-wrap img {
  transform: scale(1.07);
}

.sagco-mega-card .sagco-mega-card-title {
  transition: color 0.25s ease;
}

.sagco-mega-card:hover .sagco-mega-card-title,
.sagco-mega-card:focus .sagco-mega-card-title {
  color: #9d1631;
}

/* ======================= Mobile sidebar polish ================== */

@media (max-width: 991.98px) {
  #top_menu_collapse {
    background: #fff;
    border-inline-start: 4px solid #1b2958;
  }

  #top_menu .nav-item + .nav-item {
    border-top: 1px solid #eef1f6;
  }

  #top_menu .nav-link {
    font-weight: 600;
  }

  #top_menu .nav-link.dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  #top_menu .nav-link.dropdown-toggle::after {
    margin: 0;
    transition: transform 0.25s ease;
  }

  #top_menu .nav-link.dropdown-toggle.show::after {
    transform: rotate(180deg);
  }

  #top_menu .sagco-mega-dropdown .dropdown-menu.show {
    background: #f7f9fc;
  }
}

/* ============================= Hero ============================= */

/* Uniform slide box — all slides share one grid cell inside
   .carousel-inner, so every slide stretches to the TALLEST slide's
   height and the section never jumps between slides; visibility (not
   display) picks the visible one. Works at every screen size, in both
   languages, for managed or imported content. */
.s_carousel_wrapper .carousel-inner {
  display: grid;
}

.s_carousel_wrapper .carousel-item {
  position: relative;
  grid-area: 1 / 1;
  display: block !important;
  visibility: hidden;
  width: 100%;
  margin-right: 0 !important; /* float overlap offset — irrelevant in grid */
  height: auto !important; /* neutralize o_full/o_half_screen_height */
  min-height: clamp(470px, 76vh, 700px);
  padding-top: 6.5rem !important;
  padding-bottom: 6.5rem !important;
  align-content: center;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

.s_carousel_wrapper .carousel-item.active,
.s_carousel_wrapper .carousel-item.carousel-item-next,
.s_carousel_wrapper .carousel-item.carousel-item-prev {
  visibility: visible;
}

@media (max-width: 991.98px) {
  .s_carousel_wrapper .carousel-item {
    min-height: 62vh;
    padding-top: 4.5rem !important;
    padding-bottom: 4.5rem !important;
  }
}

/* Deeper, directional overlay improves text legibility over photos. */
.s_carousel_wrapper .carousel-item .o_we_bg_filter {
  background: linear-gradient(100deg,
      rgba(13, 20, 40, 0.78) 0%,
      rgba(13, 20, 40, 0.55) 45%,
      rgba(13, 20, 40, 0.18) 75%,
      rgba(13, 20, 40, 0.05) 100%) !important;
}

/* Slide content animates in */
.s_carousel_wrapper .carousel-item .carousel-content .card {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 0.7s ease 0.2s, transform 0.7s ease 0.2s;
}

.s_carousel_wrapper .carousel-item.active .carousel-content .card {
  opacity: 1;
  transform: translateY(0);
}

/* Kicker pill */
.sagco-hero-kicker {
  display: inline-block;
  background: #9d1631;
  color: #fff !important;
  font-style: normal;
  font-weight: 700;
  font-size: clamp(0.72rem, 1.4vw, 0.9rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.4em 1.1em;
  border-radius: 999px;
}

.s_carousel_wrapper .carousel-content h4 {
  margin-bottom: 0.9rem;
}

/* Title */
.sagco-hero-title,
.s_carousel_wrapper .carousel-content h2 {
  font-size: clamp(1.7rem, 4.2vw, 3.3rem) !important;
  line-height: 1.15 !important;
  color: #fff !important;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  margin-bottom: 0.75rem;
}

.s_carousel_wrapper .carousel-content h2 span,
.s_carousel_wrapper .carousel-content h2 font {
  font-size: inherit !important;
  color: inherit !important;
}

/* Subline */
.sagco-hero-sub {
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(0.95rem, 1.6vw, 1.2rem);
  line-height: 1.55;
  max-width: 34rem;
  margin-bottom: 0;
}

.s_carousel_wrapper .carousel-content .card {
  padding-top: 1.4rem !important;
}

/* CTA row */
.sagco-hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.sagco-hero-ctas .as-btn,
.sagco-hero-ctas .btn {
  border-radius: 999px;
  padding: 0.7rem 1.7rem;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.sagco-hero-ctas .btn-primary {
  background-color: #9d1631;
  border-color: #9d1631;
}

.sagco-hero-ctas .btn-primary:hover {
  background-color: #7f1228;
  border-color: #7f1228;
  transform: translateY(-1px);
}

.sagco-hero-ghost {
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.85);
  background: transparent;
}

.sagco-hero-ghost:hover,
.sagco-hero-ghost:focus {
  background: #fff;
  color: #1b2958;
  border-color: #fff;
}

/* Carousel indicators: pill style */
.s_carousel_wrapper .carousel-indicators [data-bs-target] {
  width: 26px;
  height: 5px;
  border-radius: 999px;
  border: 0;
  background-color: rgba(255, 255, 255, 0.45);
  transition: background-color 0.3s ease, width 0.3s ease;
}

.s_carousel_wrapper .carousel-indicators .active {
  width: 40px;
  background-color: #fff;
}

/* Hero controls: circular buttons */
.s_carousel_wrapper .carousel-control-prev,
.s_carousel_wrapper .carousel-control-next {
  opacity: 0.85;
}

/* Tighten the very large hero paddings on small screens */
@media (max-width: 991.98px) {
  .s_carousel_wrapper .carousel-item.pt248 { padding-top: 5rem !important; }
  .s_carousel_wrapper .carousel-item.pb216 { padding-bottom: 5rem !important; }
  .s_carousel_wrapper .carousel-item.pt224 { padding-top: 4.5rem !important; }
  .s_carousel_wrapper .carousel-item.pb152 { padding-bottom: 4rem !important; }
  .s_carousel_wrapper .carousel-item.pt104 { padding-top: 3.5rem !important; }
  .s_carousel_wrapper .carousel-item.pb120 { padding-bottom: 3.5rem !important; }
  .sagco-hero-sub { max-width: none; }
}

/* ==================== Card carousels (.sagco-hc) ================= */

.sagco-hc {
  position: relative;
}

.sagco-hc-track {
  display: flex;
  flex-wrap: nowrap !important;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-block: 0.5rem;
}

.sagco-hc-track::-webkit-scrollbar {
  display: none;
}

.sagco-hc-track > * {
  flex: 0 0 100%;
  width: auto;
  max-width: 100%;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Stretch the single card/wrapper so every slide is the same height */
.sagco-hc-track > * > * {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
}

@media (min-width: 576px) {
  .sagco-hc-track > * { flex-basis: 50%; max-width: 50%; }
}

@media (min-width: 992px) {
  .sagco-hc-track > * { flex-basis: 33.3333%; max-width: 33.3333%; }
  .sagco-hc-wide .sagco-hc-track > * { flex-basis: 25%; max-width: 25%; }
}

/* Arrow buttons */
.sagco-hc-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1b2958;
  color: #fff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.25);
  cursor: pointer;
  transition: background-color 0.25s ease, transform 0.25s ease;
}

.sagco-hc-btn:hover {
  background: #9d1631;
}

/* Keep arrows inside the viewport — negative insets cause page overflow */
.sagco-hc-prev { inset-inline-start: 0.5rem; }
.sagco-hc-next { inset-inline-end: 0.5rem; }

@media (max-width: 767.98px) {
  .sagco-hc-btn { width: 40px; height: 40px; }
  .sagco-hc-prev { inset-inline-start: 0; }
  .sagco-hc-next { inset-inline-end: 0; }
}

/* No overflow -> no arrows needed */
.sagco-hc-full .sagco-hc-btn {
  display: none;
}

/* Card hover polish inside the carousels (services/expertise/projects) */
.sagco-hc .sbs-tyop-wrap .overflow-hidden,
.sagco-hc .hover-scale {
  overflow: hidden;
}

.sagco-hc-track .card,
.sagco-hc-track .sbs-tyop-wrap,
.sagco-hc-track .o_carousel_product_card,
.sagco-hc-track a[class*="wrap"] {
  background: #fff;
  border: 1px solid #e9edf4;
  border-radius: 0.8rem;
  overflow: hidden;
}

.sagco-hc .sbs-tyop-wrap img,
.sagco-hc-track img {
  transition: transform 0.5s ease;
}

.sagco-hc .sbs-tyop-wrap:hover img,
.sagco-hc-track > *:hover img {
  transform: scale(1.06);
}

.sagco-hc .card {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.sagco-hc-track > * {
  transition: transform 0.25s ease;
}

.sagco-hc-track > *:hover {
  transform: translateY(-4px);
}

.sagco-hc-track > *:hover .card,
.sagco-hc-track > *:hover .sbs-tyop-wrap,
.sagco-hc-track > *:hover a {
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.14) !important;
}

/* Card text legibility polish */
.sagco-hc-track h2, .sagco-hc-track h3, .sagco-hc-track h4,
.sagco-hc-track .h2, .sagco-hc-track .h3, .sagco-hc-track .h4 {
  color: #1b2958;
}

.sagco-hc-track a { text-decoration: none; }
.sagco-hc-track a:hover h2,
.sagco-hc-track a:hover h3,
.sagco-hc-track a:hover h4 { color: #9d1631; }

/* ==================== Blog post covers (were collapsing) ========= */

.s_blog_posts .dynamic_snippet_template {
  display: block;
}

.s_blog_posts .s_blog_posts_post_cover {
  display: block;
}

.s_blog_posts .o_record_cover_container,
.s_blog_posts .o_record_cover_container > div {
  min-height: 170px;
}

.s_blog_posts .o_record_cover_container > div {
  background-size: cover;
  background-position: center;
}

.s_blog_posts .card {
  border-radius: 0.6rem;
  overflow: hidden;
  height: 100%;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.s_blog_posts .card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.14);
}

/* ====================== Marquee (partners/vendors) ============== */

.sagco-marquee {
  flex-wrap: nowrap !important;
  overflow: visible; /* children must paint past the row box — the section clips */
  direction: ltr; /* transform-driven; JS owns direction per language */
  align-items: center; /* logos share one horizontal line */
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y; /* vertical page scroll still works; horizontal is drag */
}

.sagco-marquee.sagco-mq-drag {
  cursor: grabbing;
}

/* The animated row itself translates -50%..0; its section must clip it or
   the shifted track expands the scrollable area (horizontal scrollbar). */
.sagco-marquee-sec,
section:has(.sagco-marquee) {
  overflow: hidden;
  overflow: clip;
  padding-block: 2.2rem; /* breathing room above/below the logo strip */
}

.sagco-marquee > * {
  flex: 0 0 auto;
  width: auto !important;
  max-width: none !important;
  padding-inline: 2rem;
  display: flex;
  align-items: center;
}

.sagco-marquee img {
  display: block;
  height: 64px;
  width: auto;
  max-width: 170px;
  object-fit: contain;
  -webkit-user-drag: none;
  transition: transform 0.3s ease;
}

.sagco-marquee img:hover {
  transform: scale(1.08);
}

.sagco-marquee-run {
  will-change: transform;
}

/* Motion is driven by JS (requestAnimationFrame) so the strip is draggable
   — direction per language: EN left→right, AR right→left. */

@media (max-width: 575.98px) {
  .sagco-marquee img { height: 48px; }
}

/* ============================= Footer =========================== */

/* Navy footer — links must be white for contrast */
#bottom .footer-top,
#bottom section.footer-top {
  background: #1b2958 !important;
  border-top: 4px solid #9d1631 !important;
  color: rgba(255, 255, 255, 0.78);
}

#bottom .footer-title,
#bottom .footer-top h5,
#bottom .footer-top .h5 {
  font-weight: 700;
  color: #fff !important;
  position: relative;
  padding-bottom: 0.55rem;
  margin-bottom: 0.8rem;
}

#bottom .footer-title::after {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  bottom: 0;
  width: 2.2rem;
  height: 3px;
  border-radius: 999px;
  background: #9d1631;
}

/* All footer links white and legible */
#bottom .footer-top a,
#bottom .footer-link a,
#bottom .footer-address a {
  color: rgba(255, 255, 255, 0.82) !important;
  text-decoration: none !important;
  transition: color 0.2s ease, padding 0.2s ease;
}

#bottom .footer-top a:hover,
#bottom .footer-link a:hover,
#bottom .footer-address a:hover {
  color: #fff !important;
  padding-inline-start: 0.3rem;
}

#bottom .footer-top a:focus-visible {
  color: #fff !important;
  outline: 2px solid rgba(255, 255, 255, 0.6);
  outline-offset: 2px;
  border-radius: 2px;
}

#bottom .footer-address,
#bottom .footer-top p,
#bottom .footer-top li,
#bottom .footer-top small {
  color: rgba(255, 255, 255, 0.75) !important;
}

#bottom .footer-top .text-muted {
  color: rgba(255, 255, 255, 0.65) !important;
}

#bottom .f-icon,
#bottom .footer-top i.fa {
  color: #fff;
  opacity: 0.9;
}

/* Copyright bar — polished dark bar with segmented language pill */
.o_footer_copyright,
#bottom .o_footer_copyright {
  background: #0d142b !important;
  color: rgba(255, 255, 255, 0.7);
  padding: 0;
}

#bottom .o_footer_copyright .container > .row {
  align-items: center;
  row-gap: 0.5rem;
  padding-block: 0.55rem;
}

#bottom .o_footer_copyright .col-sm {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

@media (min-width: 576px) {
  #bottom .o_footer_copyright .col-sm.text-sm-start { justify-content: flex-start; }
  #bottom .o_footer_copyright .col-sm.text-sm-end { justify-content: flex-end; }
}

.o_footer_copyright .text-muted,
.o_footer_copyright .text-muted strong {
  color: rgba(255, 255, 255, 0.62) !important;
  font-size: 0.85rem;
}

.o_footer_copyright a {
  color: #fff;
}

/* EN | AR segmented pill — hides the literal "|" via font-size:0 */
.sagco-footer-lang-toggle {
  display: inline-flex;
  align-items: center;
  font-size: 0;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  overflow: hidden;
  vertical-align: middle;
  background: rgba(255, 255, 255, 0.06);
}

.sagco-footer-lang-toggle strong,
.sagco-footer-lang-toggle a {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 0.14rem 0.7rem;
  line-height: 1.5;
}

.sagco-footer-lang-toggle strong {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
}

.sagco-footer-lang-toggle a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none !important;
  border-inline-start: 1px solid rgba(255, 255, 255, 0.3);
  transition: color 0.2s ease, background-color 0.2s ease;
}

.sagco-footer-lang-toggle a:hover {
  color: #fff;
  background: #9d1631;
}

/* ==================== Section titles (injected) ================== */

.sagco-exp-head {
  padding-top: 3rem;
}

.sagco-sec-title {
  text-align: center;
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  font-weight: 700;
  color: #1b2958;
  margin: 0;
  padding-bottom: 0.9rem;
}

.sagco-sec-title::after {
  content: "";
  display: block;
  width: 64px;
  height: 3px;
  background: #9d1631;
  margin: 0.7rem auto 0;
  border-radius: 2px;
}

/* In a scroll strip a Bootstrap offset just leaves dead space at the edge. */
.sagco-hc-track > [class*="offset-"] {
  margin-inline-start: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* ==================== Marquee: always full, one row ============= */

.sagco-marquee {
  justify-content: flex-start !important;
  width: 100%;
}

/* ============================ Blog page ========================= */

.sagco-blog-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(620px 320px at 88% -20%, rgba(157, 22, 49, 0.42), transparent 62%),
    radial-gradient(520px 280px at 8% 115%, rgba(255, 255, 255, 0.08), transparent 60%),
    linear-gradient(135deg, #1b2958 0%, #14204a 62%, #3a1d3d 115%);
  /* extra bottom padding: the search bar overlaps this edge */
  padding: 4.25rem 0 5.25rem;
}

.sagco-blog-kicker {
  display: inline-block;
  color: #fff;
  background: #9d1631;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.35rem 0.95rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.sagco-blog-hero h1 {
  color: #fff;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  margin: 0 0 0.5rem;
}

.sagco-blog-hero p {
  color: rgba(255, 255, 255, 0.75);
  margin: 0;
  max-width: 640px;
}

/* Category pills + search row — the search pill floats half over the
   hero's bottom edge, which also leaves clear space below it. */
.website_blog > nav.navbar {
  padding: 0;
  margin-top: -2rem;
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 6;
}

.website_blog .o_website_blog_nav_container {
  align-items: center;
}

/* The filter row sits on the navy page band — pills must be light. */
.website_blog .navbar-nav .nav-link {
  border-radius: 999px;
  padding: 0.35rem 0.95rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.website_blog .navbar-nav .nav-link.active {
  background: #fff;
  color: #1b2958;
}

.website_blog .navbar-nav .nav-link:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.website_blog .navbar-nav .nav-link.disabled {
  background: none;
  color: rgba(255, 255, 255, 0.55);
}

.o_searchbar_form .input-group {
  border: 1px solid #e9edf4;
  border-radius: 999px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
  background: #fff;
}

.o_searchbar_form .form-control {
  border: 0;
  box-shadow: none;
}

.o_searchbar_form .oe_search_button {
  background: #1b2958;
  border: 0;
  border-radius: 0;
  padding-inline: 1rem;
}

.o_searchbar_form .oe_search_button:hover {
  background: #9d1631;
}

/* Index layout: posts column + fixed sidebar (the scraped Bootstrap
   build lacks working .col / col-md-3 / d-lg-flex for these nodes). */
@media (min-width: 992px) {
  #o_wblog_index_content .row.justify-content-between > #o_wblog_posts_loop_container {
    flex: 0 0 auto;
    width: calc(100% - 332px);
    max-width: calc(100% - 332px);
    min-width: 0;
  }

  #o_wblog_index_content .row.justify-content-between > .col-12.col-md-3 {
    flex: 0 0 300px;
    width: 300px;
    margin-inline-start: 2rem;
  }

  .o_website_blog_nav_container > .navbar-nav {
    display: flex !important;
    align-items: center;
    gap: 0.25rem;
  }
}

@media (max-width: 991.98px) {
  #o_wblog_index_content .row.justify-content-between > .col-12.col-md-3 {
    margin-inline-start: 0;
  }
}

/* Cards — soft gray backdrop makes the white cards pop */
#o_wblog_index_content {
  padding: 2.5rem 0 3.5rem;
  background: #f6f8fb;
}

.sagco-blog-col {
  margin-bottom: 1.75rem;
}

.sagco-blog-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  border: 1px solid #e9edf4;
  border-radius: 0.9rem;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.sagco-blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.13);
}

.sagco-blog-cover {
  display: block;
  aspect-ratio: 16 / 10;
  background-size: cover;
  background-position: center;
  background-color: #1b2958;
}

.sagco-blog-cover-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1b2958, #2c3f77);
  text-decoration: none;
}

.sagco-blog-cover-empty span {
  color: rgba(255, 255, 255, 0.28);
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: 0.3em;
}

.sagco-blog-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  padding: 1.1rem 1.25rem 1.25rem;
}

.sagco-blog-meta {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: #8a93a6;
  margin-bottom: 0.55rem;
}

.sagco-blog-cat {
  background: #f2f4f9;
  color: #1b2958;
  border-radius: 999px;
  padding: 0.15rem 0.65rem;
  font-weight: 600;
}

.sagco-blog-title {
  font-size: 1.05rem;
  line-height: 1.45;
  margin: 0 0 0.5rem;
  font-weight: 700;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sagco-blog-title a {
  color: #1b2958;
  text-decoration: none;
}

.sagco-blog-title a:hover {
  color: #9d1631;
}

.sagco-blog-exc {
  color: #5b6474;
  font-size: 0.9rem;
  line-height: 1.65;
  margin: 0 0 0.9rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sagco-blog-more {
  margin-top: auto;
  font-weight: 700;
  font-size: 0.85rem;
  color: #9d1631;
  text-decoration: none;
}

.sagco-blog-more::after {
  content: " \2192";
}

[dir="rtl"] .sagco-blog-more::after {
  content: " \2190";
}

.sagco-blog-more:hover {
  color: #1b2958;
}

/* Sidebar */
#o_wblog_sidebar .o_wblog_sidebar_block {
  background: #fff;
  border: 1px solid #e9edf4;
  border-radius: 0.9rem;
  padding: 1.4rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.05);
}

#o_wblog_sidebar h6 {
  position: relative;
  color: #1b2958;
  font-weight: 700;
  padding-bottom: 0.65rem;
  margin-bottom: 0.95rem;
  border-bottom: 2px solid #eef1f7;
}

#o_wblog_sidebar h6::after {
  content: "";
  position: absolute;
  bottom: -2px;
  inset-inline-start: 0;
  width: 44px;
  height: 2px;
  background: #9d1631;
  border-radius: 2px;
}

#o_wblog_sidebar .o_wblog_sidebar_block p {
  font-size: 0.9rem;
  color: #5b6474;
  margin: 0;
  line-height: 1.7;
}

#o_wblog_sidebar .form-select {
  max-width: 100%;
}

#o_wblog_sidebar .o_wblog_social_links a {
  width: 38px;
  height: 38px;
  transition: background-color 0.2s ease;
}

#o_wblog_sidebar .o_wblog_social_links a:hover {
  background: #1b2958;
}

#o_wblog_sidebar .o_wblog_social_links a:hover .fa {
  color: #fff;
}

@media (max-width: 767.98px) {
  .sagco-blog-hero {
    padding: 2.75rem 0 4.5rem;
  }

  .website_blog > nav.navbar {
    margin-top: -1.75rem;
  }
}

/* Whole card is clickable (stretched-link on the title anchor). */
.sagco-blog-card {
  position: relative;
  cursor: pointer;
}

.sagco-blog-meta time,
.sagco-blog-views {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.sagco-blog-meta .fa,
.sagco-blog-meta .sagco-ic {
  color: #9d1631;
  font-size: 0.82rem;
}

/* Inline SVG icons — used where the bundled FA subset has no glyph */
.sagco-ic {
  width: 0.95em;
  height: 0.95em;
  flex-shrink: 0;
  vertical-align: -0.14em;
}

.sagco-blog-meta .sagco-ic {
  width: 0.85rem;
  height: 0.85rem;
}

.sagco-post-meta .sagco-ic {
  width: 0.9rem;
  height: 0.9rem;
  vertical-align: -0.16em;
}

.sagco-post-back .sagco-ic,
.sagco-job-card-cta .sagco-ic,
.sagco-job-apply-form .sagco-ic {
  width: 1rem;
  height: 1rem;
  vertical-align: -0.15em;
}

/* Home-page carousel slides share the same card. */
.sagco-blog-slide {
  padding: 0.35rem 0.5rem;
  display: flex;
}

.sagco-blog-slide > .sagco-blog-card {
  width: 100%;
}

/* ================= Single blog post ================= */

.sagco-post-hero {
  position: relative;
  padding: 6.5rem 0 3.5rem;
  background-color: #1b2958;
  background-size: cover;
  background-position: center;
  color: #fff;
}

.sagco-post-hero-ov {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(16, 25, 55, 0.72), rgba(16, 25, 55, 0.88));
}

.sagco-post-hero-in {
  position: relative;
  max-width: 860px;
}

.sagco-post-crumbs {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.85rem;
  margin-bottom: 1rem;
  color: rgba(255, 255, 255, 0.72);
  flex-wrap: wrap;
}

.sagco-post-crumbs a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
}

.sagco-post-crumbs a:hover {
  color: #fff;
  text-decoration: none;
}

/* Never underline links inside SAGCO-generated components —
   the theme's global `a:hover { underline }` would otherwise
   show through on cards, crumbs, CTAs and detail pages. */
.sagco-job-card,
.sagco-job-card:hover,
.sagco-job-card *:hover,
.sagco-job-cta:hover,
.sagco-job-back:hover,
.sagco-jobs-grid a:hover,
a.sagco-proj-mob-card,
.sagco-proj-mob-card:hover,
.sagco-proj-mob-card *:hover,
.sagco-proj-link:hover,
.sagco-proj-back:hover,
.sagco-db-col a,
.sagco-db-col a:hover,
.sagco-blog-card a:hover,
.sagco-blog-more:hover,
.sagco-hc-track a:hover {
  text-decoration: none !important;
}

.sagco-post-crumbs .fa {
  font-size: 0.7rem;
  opacity: 0.6;
}

.sagco-post-hero h1 {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.35;
  margin: 0 0 1.1rem;
}

.sagco-post-meta {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  flex-wrap: wrap;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.82);
}

.sagco-post-meta .fa {
  margin-inline-end: 0.35rem;
  color: #d8a0ab;
}

.sagco-post-meta .sagco-blog-cat {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.sagco-post-body {
  max-width: 860px;
  padding-top: 3rem;
  padding-bottom: 3.5rem;
}

.sagco-post-content {
  font-size: 1.02rem;
  line-height: 1.85;
  color: #3d4657;
}

.sagco-post-content p {
  margin-bottom: 0.4rem;
}

.sagco-post-content strong {
  color: #1b2958;
}

.sagco-post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 0.6rem;
}

.sagco-post-back {
  margin-top: 2.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid #e9edf4;
}

/* Back link — the theme's .btn-outline-primary has no rules, so style the
   shared detail-page back control directly: navy outline pill that fills
   on hover, matching the site's pill CTAs. */
.sagco-post-back a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #1b2958 !important;
  background: transparent !important;
  border: 1.5px solid #1b2958 !important;
  border-radius: 999px;
  padding: 0.55rem 1.5rem;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.sagco-post-back a:hover {
  background: #1b2958 !important;
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 10px 22px -10px rgba(27, 41, 88, 0.5);
}

@media (max-width: 767.98px) {
  .sagco-post-hero {
    padding: 4.5rem 0 2.5rem;
  }
  .sagco-post-hero h1 {
    font-size: 1.5rem;
  }
}

/* ================= Why-choose: compact + animated stats ================= */

.sagco-why {
  padding-top: 1.5rem !important;
  padding-bottom: 1.5rem !important;
}

.sagco-why .sagco-why-lead {
  max-width: 720px;
  margin: 0 auto;
  font-size: 1.05rem;
  line-height: 1.7;
  color: #4a5568;
  text-align: center;
}

/* Feature cards: interactive lift + icon pop */
.sagco-why .card {
  height: 100%;
  border: 1px solid #e8ecf1;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.sagco-why .card:hover {
  transform: translateY(-5px);
  border-color: #c9d4e4;
  box-shadow: 0 0.65rem 1.5rem rgba(27, 41, 88, 0.12);
}

.sagco-why .card .fa {
  transition: transform 0.3s ease;
}

.sagco-why .card:hover .fa {
  transform: scale(1.15);
}

/* Existing counters row — compact, centered, animated numbers */
.sagco-counters {
  padding-top: 1rem !important;
  padding-bottom: 1.5rem !important;
}

.sagco-counters .col-lg-3 .d-flex {
  justify-content: center;
  align-items: center;
  gap: 0.9rem;
  padding: 0.5rem;
  border-radius: 0.6rem;
  transition: transform 0.25s ease, background 0.25s ease;
}

.sagco-counters .col-lg-3 .d-flex:hover {
  transform: translateY(-4px);
  background: rgba(27, 41, 88, 0.05);
}

.sagco-counters .fa-4x {
  font-size: 2.6rem;
  color: #9d1631;
}

.sagco-counters .sagco-counter {
  color: #1b2958;
  font-weight: 800 !important;
  font-variant-numeric: tabular-nums;
}

.sagco-counters .ms-3 p {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: #6c757d;
  text-transform: uppercase;
}

/* ================= Home contact band: compact ================= */

.sagco-home-cta .o_half_screen_height {
  min-height: 300px !important;
}

/* shrink the huge padded content column */
.sagco-home-cta .px-lg-8 {
  padding: 1.75rem 1.5rem !important;
}

@media (min-width: 992px) {
  .sagco-home-cta .px-lg-8 {
    padding: 2rem 2.75rem !important;
  }
}

.sagco-home-cta .h1 {
  margin-bottom: 0.35rem !important;
}

.sagco-home-cta .h1 span {
  font-size: 26px !important;
}

.sagco-home-cta .lead {
  font-size: 0.95rem !important;
}

.sagco-home-cta .mb-lg-5 {
  margin-bottom: 1.25rem !important;
}

.sagco-home-cta .s_comparisons .my-3 {
  margin-top: 0.45rem !important;
  margin-bottom: 0.45rem !important;
}

/* cards -> icon left, label + value stacked, tight padding */
.sagco-home-cta .card {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 0.8rem;
  align-items: center;
  padding: 0.75rem 1rem !important;
  text-align: start;
  border: none !important;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08) !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sagco-home-cta .card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12) !important;
}

.sagco-home-cta .card > .fa {
  grid-row: 1 / span 2;
  font-size: 1.45rem !important;
  margin: 0 !important;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 0.55rem;
  background: rgba(27, 41, 88, 0.07);
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
}

.sagco-home-cta .card .h5 {
  margin: 0 !important;
  line-height: 1.3;
}

.sagco-home-cta .card .h5 span {
  font-size: 14px !important;
}

.sagco-home-cta .card p,
.sagco-home-cta .card > font {
  margin: 0 !important;
  font-size: 0.86rem;
  line-height: 1.45;
  grid-column: 2;
}

.sagco-home-cta .card p:empty,
.sagco-home-cta .card p:has(> br:only-child) {
  display: none !important;
}

.sagco-home-cta .card br {
  display: none;
}

.sagco-home-cta .card a {
  color: #1b2958;
  word-break: break-all;
}

@media (max-width: 575.98px) {
  .sagco-home-cta .o_half_screen_height {
    min-height: 200px !important;
  }
}

/* ================= Jobs: list + detail ================= */

.sagco-jobs-hero,
.sagco-job-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(620px 320px at 88% -20%, rgba(157, 22, 49, 0.42), transparent 62%),
    radial-gradient(520px 280px at 8% 115%, rgba(255, 255, 255, 0.08), transparent 60%),
    linear-gradient(135deg, #1b2958 0%, #14204a 62%, #3a1d3d 115%);
  color: #fff;
  padding: 5rem 0 3.5rem;
}

.sagco-jobs-hero h1,
.sagco-job-hero h1 {
  font-size: 2.2rem;
  font-weight: 800;
  margin: 0.35rem 0 0.6rem;
}

.sagco-jobs-hero p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.02rem;
}

.sagco-job-hero .sagco-blog-kicker {
  color: rgba(255, 255, 255, 0.7);
}

.sagco-job-hero .sagco-post-crumbs {
  margin-bottom: 1.25rem;
}

.sagco-job-hero .sagco-post-meta {
  margin-top: 0.5rem;
}

/* ---- jobs list ---- */
.sagco-jobs-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.sagco-job-card {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  background: #fff;
  border: 1px solid #e9edf4;
  border-radius: 0.9rem;
  padding: 1.3rem 1.5rem;
  text-decoration: none;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.sagco-job-card:hover {
  transform: translateY(-3px);
  border-color: #c9d4e4;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
}

.sagco-job-card-icon {
  flex: 0 0 auto;
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 0.8rem;
  background: rgba(27, 41, 88, 0.07);
  color: #1b2958;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  transition: background 0.22s ease, color 0.22s ease;
}

.sagco-job-card:hover .sagco-job-card-icon {
  background: #9d1631;
  color: #fff;
}

.sagco-job-card-body {
  flex: 1 1 auto;
  min-width: 0;
}

.sagco-job-card-body h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1b2958;
  margin: 0 0 0.3rem;
}

.sagco-job-card:hover .sagco-job-card-body h3 {
  color: #9d1631;
}

.sagco-job-card-meta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: #8a93a6;
  margin-bottom: 0.45rem;
}

.sagco-job-card-meta .fa {
  margin-inline-end: 0.3rem;
  color: #9d1631;
}

.sagco-job-card-body p {
  margin: 0;
  font-size: 0.88rem;
  color: #5b6474;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sagco-job-card-cta {
  flex: 0 0 auto;
  font-size: 0.82rem;
  font-weight: 700;
  color: #9d1631;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

/* ---- job detail ---- */
.sagco-job-body {
  padding-top: 2.75rem;
  padding-bottom: 3rem;
  max-width: 1140px;
}

.sagco-job-sub {
  position: relative;
  font-size: 1.3rem;
  font-weight: 800;
  color: #1b2958;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #e9edf4;
}

.sagco-job-sub::after {
  content: "";
  position: absolute;
  bottom: -2px;
  inset-inline-start: 0;
  width: 56px;
  height: 2px;
  background: #9d1631;
  border-radius: 2px;
}

.sagco-job-desc {
  font-size: 0.98rem;
  line-height: 1.9;
  color: #3d4657;
}

.sagco-job-desc br {
  line-height: 1.6;
}

.sagco-job-desc p {
  margin: 0 0 0.9rem;
}

/* Structured job description (built by formatJobDescription) */
.sagco-job-desc-h {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: #1b2958;
  font-size: 1.02rem;
  font-weight: 800;
  margin: 1.6rem 0 0.7rem;
}

.sagco-job-desc-h:first-child {
  margin-top: 0;
}

.sagco-job-desc-h::before {
  content: "";
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  background: #9d1631;
  border-radius: 2px;
  transform: rotate(45deg);
}

.sagco-job-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.35rem;
  display: grid;
  gap: 0.55rem;
}

.sagco-job-list li {
  position: relative;
  padding-inline-start: 1.6rem;
}

.sagco-job-list li::before {
  content: "\2713";
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  color: #9d1631;
  font-weight: 800;
}

.sagco-job-kv {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  margin: 0 0 0.4rem;
}

.sagco-job-kv span {
  color: #8a93a6;
  font-weight: 700;
  font-size: 0.85rem;
  min-width: 9ch;
}

/* Project detail page */
.sagco-proj-hero-img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 1rem;
  margin-bottom: 1.75rem;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
}

/* Project Facts card — icon rows + padded body + CTA */
.sagco-facts-card h3 {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.sagco-facts-card h3 svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.9;
}

.sagco-proj-facts {
  display: flex;
  flex-direction: column;
  padding: 0.5rem 1.4rem;
}

.sagco-proj-fact {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid #eef1f6;
}

.sagco-proj-fact:last-child {
  border-bottom: 0;
}

.sagco-pf-ico {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.7rem;
  background: #eef2f9;
  color: #1b2958;
}
.sagco-pf-ico svg {
  width: 17px;
  height: 17px;
}

.sagco-pf-txt {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.sagco-pf-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8a93a6;
}

.sagco-proj-fact strong {
  font-size: 0.98rem;
  color: #1b2958;
  line-height: 1.35;
}

.sagco-pf-foot {
  padding: 0.35rem 1.4rem 1.4rem;
}

.sagco-pf-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.7rem 1.2rem;
  background: #1e3a5f;
  border-radius: 0.55rem;
  color: #fff !important;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none !important;
  box-shadow: 0 8px 20px -8px rgba(30, 58, 95, 0.55);
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.sagco-pf-cta svg {
  width: 17px;
  height: 17px;
  transition: transform 0.2s ease;
}
html[dir="rtl"] .sagco-pf-cta svg { transform: scaleX(-1); }
.sagco-pf-cta:hover {
  background: #152a45;
  transform: translateY(-1px);
  box-shadow: 0 12px 24px -8px rgba(30, 58, 95, 0.55);
}
.sagco-pf-cta:hover svg { transform: translateX(4px); }
html[dir="rtl"] .sagco-pf-cta:hover svg { transform: scaleX(-1) translateX(4px); }

/* Linked names in the imported projects table */
.sagco-proj-link {
  color: #1b2958;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.sagco-proj-link:hover {
  color: #9d1631;
  border-bottom-color: #9d1631;
}

/* Mobile project cards (the imported table is desktop-only) */
.sagco-proj-mob {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.sagco-proj-mob-card {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.9rem 1.1rem;
  background: #fff;
  border: 1px solid #e9edf4;
  border-radius: 0.75rem;
  text-decoration: none;
}

.sagco-proj-mob-card strong {
  color: #1b2958;
  font-size: 0.95rem;
}

.sagco-proj-mob-meta {
  font-size: 0.78rem;
  color: #9d1631;
  font-weight: 600;
}

.sagco-proj-mob-sub {
  font-size: 0.8rem;
  color: #8a93a6;
}

.sagco-job-apply-card {
  position: sticky;
  top: 6rem;
  background: #fff;
  border: 1px solid #e9edf4;
  border-radius: 1rem;
  overflow: hidden;
  padding: 0;
  box-shadow: 0 16px 38px -20px rgba(15, 23, 42, 0.25);
}

.sagco-job-apply-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
  padding: 1.05rem 1.5rem;
  background: linear-gradient(135deg, #1b2958, #26376e);
}

.sagco-job-apply-card .sagco-job-apply-form {
  padding: 1.5rem;
}

/* Apply form — same visual language as the Contact / RFQ forms */
.sagco-job-apply-form .form-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: #2b2b2b;
  margin-bottom: 0.35rem;
}

.sagco-job-apply-form .form-control {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
  color: #212529;
  background-color: #fff;
  border: 1px solid #ced4da;
  border-radius: 0.25rem;
  box-shadow: none;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.sagco-job-apply-form textarea.form-control {
  min-height: 110px;
  resize: vertical;
}

.sagco-job-apply-form .form-control:focus {
  border-color: #1e3a5f;
  outline: 0;
  box-shadow: 0 0 0 0.15rem rgba(30, 58, 95, 0.15);
}

/* CV upload — polish the native file picker button */
.sagco-job-apply-form .form-control[type="file"] {
  padding: 0.4rem 0.75rem;
}

.sagco-job-apply-form .form-control[type="file"]::file-selector-button {
  background: #eef1f6;
  border: 1px solid #ced4da;
  border-radius: 0.25rem;
  color: #1e3a5f;
  font-weight: 600;
  font-size: 0.85rem;
  font-family: inherit;
  padding: 0.35rem 0.85rem;
  margin-inline-end: 0.65rem;
  cursor: pointer;
  transition: background 0.15s ease;
}

.sagco-job-apply-form .form-control[type="file"]::file-selector-button:hover {
  background: #e2e7f0;
}

/* Submit — same navy button as Contact / RFQ, full width in the card */
.sagco-job-apply-form button[type="submit"] {
  width: 100%;
  background-color: #1e3a5f !important;
  border-color: #1e3a5f !important;
  color: #fff !important;
  font-size: 1.05rem;
  font-weight: 600;
  padding: 0.65rem 1.75rem;
  border-radius: 0.35rem;
  line-height: 1.5;
  box-shadow: 0 8px 20px -8px rgba(30, 58, 95, 0.55);
  transition: background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.sagco-job-apply-form button[type="submit"]:hover {
  background-color: #152a45 !important;
  border-color: #152a45 !important;
  transform: translateY(-1px);
  box-shadow: 0 12px 24px -8px rgba(30, 58, 95, 0.55);
}

@media (max-width: 991.98px) {
  .sagco-job-apply-card {
    position: static;
    margin-top: 2rem;
  }
  .sagco-job-card {
    flex-wrap: wrap;
  }
}

/* ------------------------------------------------------------------
   Blog listing: centered polished search + live-filter states
   ------------------------------------------------------------------ */
.js_blog .o_website_blog_nav_container {
  justify-content: center;
}

.sagco-blog-search {
  width: min(560px, 100%);
  margin: 0 auto;
  flex: 0 1 auto !important;
}

.sagco-blog-search .input-group {
  background: #fff;
  border: 1px solid #e6ebf4;
  border-radius: 999px;
  overflow: hidden;
  padding: 0.3rem;
  align-items: center;
  box-shadow: 0 16px 38px -14px rgba(15, 23, 42, 0.3);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.sagco-blog-search .input-group:focus-within {
  border-color: #1b2958;
  box-shadow: 0 16px 38px -14px rgba(15, 23, 42, 0.3), 0 0 0 4px rgba(27, 41, 88, 0.12);
}

.sagco-blog-search .oe_search_box {
  border: 0;
  box-shadow: none;
  background: transparent;
  padding: 0.75rem 1.35rem;
  font-size: 1rem;
}

.sagco-blog-search .oe_search_box:focus {
  box-shadow: none;
  background: transparent;
}

/* Red pill segment tucked inside the search pill's trailing edge. */
.sagco-blog-search .oe_search_button {
  border: 0;
  background: #9d1631;
  color: #fff;
  height: 46px;
  border-radius: 999px;
  padding-inline: 1.4rem;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex: 0 0 auto;
  font-size: 0.92rem;
  font-weight: 700;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.sagco-blog-search .oe_search_button:hover {
  background: #1b2958;
  color: #fff;
  transform: scale(1.03);
}

.sagco-blog-search .oe_search_button svg {
  flex-shrink: 0;
}

@media (max-width: 480px) {
  .sagco-blog-search .oe_search_button { padding-inline: 1rem; }
}

.sagco-blog-hidden {
  display: none !important;
}

.sagco-blog-empty {
  text-align: center;
  color: #7a8499;
  font-size: 0.95rem;
  padding: 2.5rem 1rem;
}

/* ===== Projects page — grid / list views ===== */
.sagco-views { padding-top: .4rem; padding-bottom: 3.2rem; }
.sagco-views-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.sagco-views-count { font-size: .82rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #8a93a6; }
.sagco-views-toggles { display: inline-flex; background: #eef1f6; border: 1px solid #e2e7f0; border-radius: 999px; padding: 4px; gap: 4px; }
.sagco-vt { display: inline-flex; align-items: center; gap: .45rem; border: 0; background: transparent; padding: .45rem 1.05rem; border-radius: 999px; font-size: .82rem; font-weight: 600; font-family: inherit; color: #5b6478; cursor: pointer; transition: background .18s ease, color .18s ease, box-shadow .18s ease; }
.sagco-vt svg { width: 15px; height: 15px; }
.sagco-vt:hover { color: #1b2958; }
.sagco-vt.is-on { background: #1b2958; color: #fff; box-shadow: 0 4px 12px rgba(27,41,88,.28); }

.sagco-proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 1.5rem; }
.sagco-views .sagco-listwrap { display: none; }
.sagco-views.sagco-view-list .sagco-listwrap { display: block; }
.sagco-views.sagco-view-list .sagco-proj-grid { display: none; }

.sagco-pg-card { display: flex; flex-direction: column; border-radius: 14px; overflow: hidden; background: #fff; box-shadow: 0 2px 10px rgba(15,23,42,.07); border: 1px solid #eef1f6; transition: transform .25s ease, box-shadow .25s ease; }
.sagco-pg-card:hover, .sagco-pg-card:focus-visible { transform: translateY(-5px); box-shadow: 0 16px 34px rgba(15,23,42,.14); }
.sagco-pg-media { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: linear-gradient(135deg, #1b2958, #2c3f77); }
.sagco-pg-media > img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.sagco-pg-card:hover .sagco-pg-media > img { transform: scale(1.07); }
.sagco-pg-nophoto { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.45); }
.sagco-pg-nophoto svg { width: 58px; height: 58px; }
.sagco-pg-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: .18rem; padding: 1rem 1.1rem; background: linear-gradient(to top, rgba(13,20,44,.94) 0%, rgba(13,20,44,.6) 55%, rgba(13,20,44,.12) 100%); color: #fff; opacity: 0; transform: translateY(14px); transition: opacity .28s ease, transform .28s ease; }
.sagco-pg-card:hover .sagco-pg-overlay, .sagco-pg-card:focus-within .sagco-pg-overlay { opacity: 1; transform: none; }
.sagco-pg-overlay > strong { font-size: .98rem; line-height: 1.35; }
.sagco-pg-meta { font-size: .76rem; font-weight: 700; color: #ffd0da; letter-spacing: .03em; }
.sagco-pg-sub { font-size: .8rem; color: #dfe4ef; }
.sagco-pg-scope { font-size: .74rem; color: #b9c3d8; }
.sagco-pg-cta { margin-top: .55rem; font-size: .72rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: #fff; }
.sagco-pg-cta::after { content: "→"; margin-inline-start: .3rem; }
html[dir="rtl"] .sagco-pg-cta::after { content: "←"; }
.sagco-pg-title { padding: .85rem 1.05rem; font-weight: 600; font-size: .9rem; color: #1b2958; line-height: 1.4; }
.sagco-pg-card:hover .sagco-pg-title { color: #9d1631; }

.sagco-listwrap { overflow-x: auto; border-radius: 14px; background: #fff; border: 1px solid #eef1f6; box-shadow: 0 2px 10px rgba(15,23,42,.07); }
.sagco-list-table { width: 100%; border-collapse: collapse; min-width: 780px; font-size: .88rem; }
.sagco-list-table thead th { background: linear-gradient(135deg, #1b2958, #25396b); color: #fff; font-weight: 600; font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; padding: .85rem .95rem; text-align: start; white-space: nowrap; }
.sagco-list-table tbody td { padding: .6rem .95rem; border-bottom: 1px solid #eef1f6; vertical-align: middle; color: #3c4356; }
.sagco-list-table tbody tr { transition: background .15s ease; }
.sagco-list-table tbody tr:hover { background: #f7f9fd; }
.sagco-list-table tbody tr:last-child td { border-bottom: 0; }
.sagco-lt-sn { color: #9aa2b5; font-weight: 600; width: 42px; }
.sagco-lt-photo { width: 118px; padding-inline-end: .3rem !important; }
.sagco-lt-thumb { width: 96px; height: 62px; object-fit: cover; border-radius: 8px; display: block; border: 1px solid #e8ecf3; transition: transform .2s ease; }
.sagco-lt-photo a:hover .sagco-lt-thumb { transform: scale(1.05); }
.sagco-lt-nophoto { width: 96px; height: 62px; border-radius: 8px; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #eef1f8, #e2e7f2); color: #a4adc2; }
.sagco-lt-nophoto svg { width: 26px; height: 26px; }
.sagco-lt-name a { color: #1b2958; font-weight: 700; }
.sagco-lt-name a:hover { color: #9d1631; }
.sagco-lt-year { white-space: nowrap; font-weight: 600; color: #4a5470; }

@media (max-width: 640px) {
  .sagco-proj-grid { grid-template-columns: 1fr 1fr; gap: .85rem; }
  .sagco-pg-title { font-size: .8rem; padding: .65rem .8rem; }
  .sagco-vt span { display: none; }
  .sagco-vt { padding: .45rem .8rem; }
}
@media (max-width: 430px) {
  .sagco-proj-grid { grid-template-columns: 1fr; }
}

/* ===== Documents page — grid / list views + PDF viewer modal ===== */
.sagco-doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.sagco-views.sagco-view-list .sagco-doc-grid { display: none; }
.sagco-dc-card { background: #fff; border: 1px solid #eef1f6; border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 2px 10px rgba(15,23,42,.07); transition: transform .25s ease, box-shadow .25s ease; }
.sagco-dc-card:hover { transform: translateY(-5px); box-shadow: 0 16px 34px rgba(15,23,42,.14); }
.sagco-dc-media { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 7; background: linear-gradient(135deg, #1b2958, #2c3f77); color: rgba(255,255,255,.85); }
.sagco-dc-media > svg { width: 52px; height: 52px; }
.sagco-dc-media em { position: absolute; bottom: .6rem; inset-inline-end: .8rem; font-style: normal; font-size: .66rem; font-weight: 800; letter-spacing: .1em; background: #9d1631; color: #fff; border-radius: 4px; padding: .15rem .45rem; }
.sagco-dc-body { padding: 1rem 1.15rem 1.15rem; display: flex; flex-direction: column; gap: .45rem; flex: 1; }
.sagco-dc-title { font-size: .95rem; color: #1b2958; font-weight: 700; line-height: 1.4; }
.sagco-dc-meta { display: flex; align-items: center; gap: .6rem; font-size: .78rem; color: #8a93a6; }
.sagco-dc-cat { background: #eef1f6; color: #4a5470; border-radius: 999px; padding: .12rem .65rem; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.sagco-dc-actions { display: flex; gap: .5rem; margin-top: .7rem; }
.sagco-doc-btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; flex: 1; border: 1px solid #e2e7f0; background: #fff; color: #1b2958; border-radius: 8px; padding: .45rem .9rem; font-size: .8rem; font-weight: 600; font-family: inherit; cursor: pointer; text-decoration: none; transition: background .15s ease, color .15s ease, border-color .15s ease; }
.sagco-doc-btn svg { width: 15px; height: 15px; }
.sagco-doc-btn:hover { border-color: #1b2958; }
.sagco-doc-view { background: #1b2958; border-color: #1b2958; color: #fff; }
.sagco-doc-view:hover { background: #152a45; border-color: #152a45; color: #fff; }
.sagco-doc-dl:hover { background: #9d1631; border-color: #9d1631; color: #fff; }
.sagco-doc-fileico { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 8px; background: #fdeef1; color: #9d1631; margin-inline-end: .65rem; vertical-align: middle; }
.sagco-doc-fileico svg { width: 19px; height: 19px; }
.sagco-doc-acts { white-space: nowrap; }
.sagco-doc-acts .sagco-dc-actions { margin-top: 0; }
.sagco-list-table .sagco-doc-btn { flex: 0 0 auto; padding: .4rem .8rem; font-size: .76rem; }

.sagco-doc-modal { position: fixed; inset: 0; z-index: 3000; background: rgba(10,15,30,.78); display: flex; align-items: center; justify-content: center; padding: 1.5rem; }
.sagco-doc-modal[hidden] { display: none; }
.sagco-doc-modal-card { background: #fff; border-radius: 14px; overflow: hidden; width: min(960px, 95vw); height: min(86vh, 920px); display: flex; flex-direction: column; box-shadow: 0 30px 80px rgba(0,0,0,.4); }
.sagco-doc-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem 1.15rem; border-bottom: 1px solid #eef1f6; }
.sagco-doc-modal-head strong { font-size: .95rem; color: #1b2958; }
.sagco-doc-modal-x { border: 0; background: #eef1f6; color: #1b2958; width: 32px; height: 32px; border-radius: 50%; font-size: 1.15rem; line-height: 1; cursor: pointer; flex-shrink: 0; transition: background .15s ease, color .15s ease; }
.sagco-doc-modal-x:hover { background: #9d1631; color: #fff; }
.sagco-doc-modal iframe { flex: 1; width: 100%; border: 0; background: #f4f6fb; }

@media (max-width: 560px) {
  .sagco-doc-grid { grid-template-columns: 1fr; }
  .sagco-doc-modal { padding: .6rem; }
  .sagco-doc-modal-card { height: 92vh; }
}

/* ===== Subscribe modal + toast ===== */
.sagco-sub-modal {
  position: fixed; inset: 0; z-index: 10800;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.sagco-sub-modal[hidden] { display: none; }
.sagco-sub-backdrop {
  position: absolute; inset: 0;
  background: rgba(8, 20, 45, .6);
  backdrop-filter: blur(2px);
}
.sagco-sub-card {
  position: relative; background: #fff; border-radius: 14px;
  padding: 28px 26px 24px; width: min(420px, 100%);
  box-shadow: 0 24px 60px rgba(8, 20, 45, .35);
  animation: sagcoSubIn .25s ease;
}
@keyframes sagcoSubIn {
  from { opacity: 0; transform: translateY(14px) scale(.98); }
  to { opacity: 1; transform: none; }
}
.sagco-sub-x {
  position: absolute; top: 10px; inset-inline-end: 12px;
  width: 34px; height: 34px; border: 0; border-radius: 50%;
  background: transparent; color: #6b7a90; font-size: 24px; line-height: 1;
  cursor: pointer;
}
.sagco-sub-x:hover { background: #f0f2f5; color: #1e3a5f; }
.sagco-sub-title { margin: 0 0 4px; font-size: 22px; color: #1e3a5f; }
.sagco-sub-sub { margin: 0 0 18px; color: #6b7a90; font-size: 14px; }
.sagco-sub-field { display: block; margin-bottom: 14px; }
.sagco-sub-field > span {
  display: block; font-weight: 600; font-size: 14px;
  color: #2b2b2b; margin-bottom: 6px;
}
.sagco-sub-field input {
  width: 100%; padding: 11px 14px; font-size: 15px;
  border: 1px solid #ced4da; border-radius: 8px;
  transition: border-color .15s, box-shadow .15s;
}
.sagco-sub-field input:focus {
  outline: 0; border-color: #1e3a5f;
  box-shadow: 0 0 0 3px rgba(30, 58, 95, .15);
}
.sagco-sub-robot {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid #ced4da; border-radius: 8px;
  padding: 11px 14px; margin: 0 0 16px; cursor: pointer;
  font-size: 14px; color: #2b2b2b; user-select: none;
}
.sagco-sub-robot input { position: absolute; opacity: 0; pointer-events: none; }
.sagco-sub-robot-box {
  width: 22px; height: 22px; flex: 0 0 auto;
  border: 2px solid #9aa7b5; border-radius: 4px; background: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  transition: border-color .15s, background .15s;
}
.sagco-sub-robot-box::after {
  content: ''; width: 11px; height: 6px;
  border-inline-start: 2.5px solid #fff; border-bottom: 2.5px solid #fff;
  transform: rotate(-45deg) translateY(-1px); opacity: 0;
}
.sagco-sub-robot input:checked + .sagco-sub-robot-box {
  background: #1e3a5f; border-color: #1e3a5f;
}
.sagco-sub-robot input:checked + .sagco-sub-robot-box::after { opacity: 1; }
.sagco-sub-robot input:focus-visible + .sagco-sub-robot-box {
  box-shadow: 0 0 0 3px rgba(30, 58, 95, .25);
}
.sagco-sub-msg {
  padding: 9px 13px; border-radius: 7px; font-size: 14px; margin-bottom: 14px;
}
.sagco-sub-msg.is-ok { background: #e8f5ec; color: #1c7a3d; }
.sagco-sub-msg.is-err { background: #fdecec; color: #c0392b; }
.sagco-sub-send {
  width: 100%; padding: 13px 16px; border: 0; border-radius: 8px;
  background: #1e3a5f; color: #fff; font-size: 16px; font-weight: 700;
  cursor: pointer; transition: background .15s;
}
.sagco-sub-send:hover { background: #16304f; }
.sagco-sub-send:disabled { opacity: .6; cursor: default; }
.sagco-sub-hp {
  position: absolute !important; left: -9999px; top: -9999px;
  width: 1px; height: 1px; opacity: 0;
}
.sagco-sub-toast {
  position: fixed; bottom: 26px; left: 50%; z-index: 10900;
  transform: translateX(-50%) translateY(20px);
  background: #1c7a3d; color: #fff;
  padding: 13px 24px; border-radius: 30px;
  font-size: 15px; font-weight: 600;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .25);
  opacity: 0; transition: opacity .3s, transform .3s;
  max-width: calc(100vw - 32px); text-align: center;
}
.sagco-sub-toast.is-show { opacity: 1; transform: translateX(-50%) translateY(0); }
[dir="rtl"] .sagco-sub-toast { transform: translateX(-50%) translateY(20px); }

/* ===== DB cards: consistent image ratio + even heights ===== */
.sagco-db-card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}
.sagco-db-card {
  border: 1px solid #e9edf4;
  border-radius: 0.8rem;
}
.sagco-db-card .card-body { display: flex; flex-direction: column; }
.sagco-db-card .card-text {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
@media (max-width: 575.98px) {
  .sagco-db-card-img { height: 170px; }
}

/* ===== Card hover enhancement (services / expertise / projects / blog) ===== */
.sagco-db-card {
  position: relative;
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.sagco-db-card::after {
  content: '';
  position: absolute; inset-inline-start: 0; bottom: 0;
  height: 3px; width: 0;
  background: linear-gradient(90deg, #9d1631, #c9385a);
  transition: width .35s ease;
}
.sagco-db-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(15, 23, 42, .16);
  border-color: rgba(157, 22, 49, .3);
}
.sagco-db-card:hover::after { width: 100%; }
.sagco-db-card .sagco-db-card-img { transition: transform .55s ease; }
.sagco-db-card:hover .sagco-db-card-img { transform: scale(1.07); }
.sagco-db-card .card-title { transition: color .25s ease; }
.sagco-db-card:hover .card-title { color: #9d1631; }

.sagco-blog-card { position: relative; }
.sagco-blog-card::after {
  content: '';
  position: absolute; inset-inline-start: 0; bottom: 0;
  height: 3px; width: 0;
  background: linear-gradient(90deg, #9d1631, #c9385a);
  transition: width .35s ease;
}
.sagco-blog-card:hover::after { width: 100%; }
.sagco-blog-cover { position: relative; }
.sagco-blog-cover::after {
  content: '';
  position: absolute; inset: 0;
  background: rgba(27, 41, 88, 0);
  transition: background .3s ease;
}
.sagco-blog-card:hover .sagco-blog-cover::after { background: rgba(27, 41, 88, .22); }
.sagco-blog-card:hover .sagco-blog-title a { color: #9d1631; }
.sagco-blog-more::after { display: inline-block; transition: transform .25s ease; }
.sagco-blog-card:hover .sagco-blog-more::after { transform: translateX(4px); }
[dir="rtl"] .sagco-blog-card:hover .sagco-blog-more::after { transform: translateX(-4px); }

/* ===================== Breadcrumb bar =====================
   Slim strip injected at the top of <main> on every inner page.
   Detail pages keep their in-hero .sagco-post-crumbs instead. */

.sagco-breadcrumb {
  background: linear-gradient(180deg, #f8fafd 0%, #f2f5fa 100%);
  border-bottom: 1px solid rgba(27, 41, 88, .09);
  position: relative;
  z-index: 1;
}

.sagco-breadcrumb-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .15rem;
  margin: 0;
  padding: .65rem 0;
  list-style: none;
  font-size: .82rem;
  line-height: 1.4;
}

.sagco-breadcrumb-list li {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  margin: 0;
}

.sagco-breadcrumb-list li + li::before {
  content: '';
  width: .4em;
  height: .4em;
  border-top: 1.6px solid #a3adc4;
  border-right: 1.6px solid #a3adc4;
  transform: rotate(45deg);
  margin-inline: .55rem;
  flex-shrink: 0;
}
html[dir="rtl"] .sagco-breadcrumb-list li + li::before { transform: rotate(-135deg); }

.sagco-breadcrumb-list a {
  color: #5d6b8c;
  text-decoration: none !important;
  transition: color .2s ease;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}
.sagco-breadcrumb-list a:hover { color: #9d1631; }

/* Home gets a small house icon before the label. */
.sagco-breadcrumb-list li:first-child a::before {
  content: '';
  width: .95em;
  height: .95em;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 9.5 12 3l9 6.5'/%3E%3Cpath d='M5 10v10h5v-6h4v6h5V10'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 9.5 12 3l9 6.5'/%3E%3Cpath d='M5 10v10h5v-6h4v6h5V10'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Group crumbs without a landing page — plain muted text. */
.sagco-breadcrumb-list li:not(.active) > span[itemprop="name"] { color: #8b96ae; }

.sagco-breadcrumb-list li.active {
  color: #1b2958;
  font-weight: 700;
}
.sagco-breadcrumb-list li.active > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: min(52vw, 34rem);
}

@media (max-width: 576px) {
  .sagco-breadcrumb-list { font-size: .76rem; padding: .55rem 0; }
  .sagco-breadcrumb-list li + li::before { margin-inline: .4rem; }
  .sagco-breadcrumb-list li.active > span { max-width: 60vw; }
}

/* Honeypot trap — must stay invisible to humans but visible to bots. */
.sagco-hp {
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
}

/* ------- Scroll-reveal animations (driven by site.js IntersectionObserver) ------- */
.sagco-rv {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.65s cubic-bezier(0.22, 0.61, 0.36, 1),
              transform 0.65s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: opacity, transform;
}

.sagco-rv.in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .sagco-rv {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ================= Footer legal links (copyright bar) ================= */

.sagco-footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.3rem 0;
  font-size: 0.8rem;
  line-height: 1.4;
}

.sagco-footer-legal a {
  color: rgba(255, 255, 255, 0.62);
  text-decoration: none;
  padding: 0.1rem 0.7rem;
  position: relative;
  transition: color 0.18s ease;
  white-space: nowrap;
}

.sagco-footer-legal a + a::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 0.85em;
  background: rgba(255, 255, 255, 0.25);
}

.sagco-footer-legal a:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* On phones the columns stack — keep everything centered with a gap */
@media (max-width: 575.98px) {
  #bottom .o_footer_copyright .container > .row {
    row-gap: 0.35rem;
    padding-block: 0.8rem;
  }

  #bottom .o_footer_copyright .col-sm,
  #bottom .o_footer_copyright .col-sm.sagco-footer-legal-col {
    justify-content: center;
    flex-basis: 100%;
  }

  .sagco-footer-legal a {
    padding: 0.15rem 0.55rem;
    font-size: 0.76rem;
    white-space: normal;
  }
}

/* ==================== Legal pages (privacy/terms/cookies) ==================== */

.sagco-legal-wrap {
  padding: 3rem 0 3.5rem;
  background: #f6f8fb;
}

.sagco-legal-card {
  background: #fff;
  border: 1px solid #e8ecf3;
  border-radius: 1.1rem;
  box-shadow: 0 14px 38px -18px rgba(15, 26, 62, 0.22);
  padding: 2.25rem 2.5rem 2.75rem;
  max-width: 900px;
  margin-inline: auto;
}

.sagco-legal-updated {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #9d1631;
  background: rgba(157, 22, 49, 0.07);
  border: 1px solid rgba(157, 22, 49, 0.18);
  border-radius: 999px;
  padding: 0.22rem 0.85rem;
  margin-bottom: 1.25rem;
}

.sagco-legal-card h2 {
  color: var(--sagco-navy, #1b2958);
  font-size: 1.22rem;
  font-weight: 700;
  margin: 1.6rem 0 0.55rem;
}

.sagco-legal-card h2:first-of-type {
  margin-top: 0;
}

.sagco-legal-card p,
.sagco-legal-card li {
  color: #4a5470;
  font-size: 0.94rem;
  line-height: 1.8;
  font-weight: 400;
}

.sagco-legal-card ul {
  padding-inline-start: 1.2rem;
  margin: 0.4rem 0 0.9rem;
}

.sagco-legal-card li {
  margin-bottom: 0.3rem;
}

.sagco-legal-card a {
  color: #9d1631;
  text-decoration: none;
}

.sagco-legal-card a:hover {
  text-decoration: underline;
}

@media (max-width: 767.98px) {
  .sagco-legal-card {
    padding: 1.4rem 1.15rem 1.8rem;
    border-radius: 0.9rem;
  }
}

/* ==================== Site map ==================== */

.sagco-sitemap {
  padding: 3rem 0 3.5rem;
  background: #f6f8fb;
}

.sagco-sm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.2rem;
}

.sagco-sm-col {
  background: #fff;
  border: 1px solid #e8ecf3;
  border-radius: 1rem;
  padding: 1.4rem 1.5rem;
  box-shadow: 0 10px 28px -16px rgba(15, 26, 62, 0.18);
}

.sagco-sm-title {
  color: var(--sagco-navy, #1b2958);
  font-size: 1rem;
  font-weight: 700;
  padding-bottom: 0.55rem;
  margin-bottom: 0.8rem;
  position: relative;
}

.sagco-sm-title::after {
  content: "";
  display: block;
  width: 34px;
  height: 3px;
  border-radius: 2px;
  background: #9d1631;
  margin-top: 0.45rem;
}

.sagco-sm-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sagco-sm-list li {
  margin: 0;
}

.sagco-sm-list a {
  display: inline-block;
  color: #4a5470;
  font-size: 0.9rem;
  text-decoration: none;
  padding: 0.28rem 0;
  transition: color 0.15s ease, transform 0.15s ease;
}

.sagco-sm-list a:hover {
  color: #9d1631;
}

[dir="ltr"] .sagco-sm-list a:hover { transform: translateX(3px); }
[dir="rtl"] .sagco-sm-list a:hover { transform: translateX(-3px); }
