/* Kimplast Layout System
   Single source of truth for content width across header, footer, homepage, product, career, and article templates.
*/

:root {
  --kimplast-layout-max: 1260px;
  --kimplast-layout-gutter-desktop: 20px;
  --kimplast-layout-gutter-tablet: 14px;
  --kimplast-layout-gutter-mobile: 10px;
}

/* Header + footer containers we explicitly marked */
.kimplast-layout-container {
  width: min(var(--kimplast-layout-max), calc(100% - (var(--kimplast-layout-gutter-desktop) * 2))) !important;
  max-width: none !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Main wrappers used in custom templates */
.kim-wrap,
.kim-home__container,
.kim-article__container,
.kim-article__wrap,
.kim-article-page .kim-article__wrap,
.kim-article__main .kim-article__container {
  width: min(var(--kimplast-layout-max), calc(100% - (var(--kimplast-layout-gutter-desktop) * 2))) !important;
  max-width: none !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Default Divi single post container (themes/Divi/single.php) */
.single-post #main-content > .container {
  width: min(var(--kimplast-layout-max), calc(100% - (var(--kimplast-layout-gutter-desktop) * 2))) !important;
  max-width: none !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Keep article layout full-width internally while honoring shared max width */
.kim-article-page #main-content .container {
  width: min(var(--kimplast-layout-max), calc(100% - (var(--kimplast-layout-gutter-desktop) * 2))) !important;
  max-width: none !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

@media (max-width: 980px) {
  .kimplast-layout-container,
  .kim-wrap,
  .kim-home__container,
  .kim-article__container,
  .kim-article__wrap,
  .kim-article-page #main-content .container,
  .single-post #main-content > .container {
    width: calc(100% - (var(--kimplast-layout-gutter-tablet) * 2)) !important;
  }
}

@media (max-width: 767px) {
  .kimplast-layout-container,
  .kim-wrap,
  .kim-home__container,
  .kim-article__container,
  .kim-article__wrap,
  .kim-article-page #main-content .container,
  .single-post #main-content > .container {
    width: calc(100% - (var(--kimplast-layout-gutter-mobile) * 2)) !important;
  }
}

/* Shared breadcrumb consistency across internal pages */
.kim-breadcrumb,
.kimplast-breadcrumb,
nav[aria-label="Breadcrumb"] {
  margin: 0 0 14px;
  padding: 16px 0;
  font-size: 14px;
  line-height: 1.5;
  color: #12203a;
}

.kim-breadcrumb__list {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.kim-breadcrumb__item {
  display: flex;
  align-items: center;
  color: #12203a;
  font-size: 14px;
  font-weight: 500;
}

.kim-breadcrumb__item:not(:last-child)::after {
  content: '›';
  margin-left: 8px;
  color: rgba(18, 32, 58, 0.34);
}

.kim-breadcrumb__item a {
  color: #12203a;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
}

.kim-breadcrumb__item a:hover {
  color: #0d78cf;
}

.kim-breadcrumb__item:last-child,
.kim-breadcrumb__item:last-child span,
.kim-breadcrumb__item:last-child a,
.kim-breadcrumb__item [aria-current="page"] {
  color: #0d78cf;
  font-weight: 600;
}

/* Shared heading weight tune (H1/H2 feel stronger) */
.kim-home-hero__title,
.kim-home-section__title,
.kim-page-title,
.kim-career-hero__title,
.kim-career-single__title,
.kim-pd__title,
.kim-article-single__title,
.single-post .entry-title {
  font-weight: 800 !important;
}

/* Career hero: make it feel wider and more premium on shared layout */
.kim-career.kim-wrap .kim-career-hero {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  min-height: 460px;
  box-shadow: 0 24px 54px rgba(13, 51, 109, 0.16);
  margin-bottom: 28px;
}

.kim-career.kim-wrap .kim-career-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-position: var(--kim-career-hero-position, center center);
  background-size: cover;
  background-repeat: no-repeat;
  transform: translate3d(0, var(--kim-career-hero-shift, 0px), 0) scale(1.04);
  transform-origin: center top;
  transition: transform 0.7s ease;
}

.kim-career.kim-wrap .kim-career-hero__overlay {
  display: none;
}

.kim-career.kim-wrap .kim-career-hero__overlay::before {
  content: none;
}

.kim-career.kim-wrap .kim-career-hero__content {
  position: relative;
  z-index: 2;
  max-width: 980px;
  padding: 56px 24px;
  transform: translate3d(0, var(--kim-career-hero-content-shift, 0px), 0);
  transition: transform 0.7s ease;
}

.kim-career.kim-wrap .kim-career-hero__title {
  font-size: clamp(40px, 4.2vw, 62px);
  line-height: 1.06;
}

.kim-career.kim-wrap .kim-career-hero__desc {
  margin: 16px auto 0;
  max-width: 820px;
  font-size: clamp(17px, 1.4vw, 22px);
  line-height: 1.6;
  font-weight: 520;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.22);
}

.kim-career-hero.is-motion-ready [data-kim-career-hero-title],
.kim-career-hero.is-motion-ready [data-kim-career-hero-desc] {
  opacity: 0;
  transform: translate3d(0, 24px, 0);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.kim-career-hero.is-motion-ready [data-kim-career-hero-desc] {
  transition-delay: 0.12s;
}

.kim-career-hero.is-motion-ready.is-visible [data-kim-career-hero-title],
.kim-career-hero.is-motion-ready.is-visible [data-kim-career-hero-desc] {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.kim-career-hero-copy {
  padding: 40px 0 52px;
}

.kim-career-hero-copy__inner {
  max-width: 860px;
  margin: 0 auto;
  text-align: center;
}

.kim-career-hero-copy__title {
  margin: 0;
  color: #12203a;
  font-size: clamp(34px, 3.6vw, 54px);
  line-height: 1.08;
  font-weight: 800;
}

.kim-career-hero-copy__desc {
  margin: 14px auto 0;
  max-width: 760px;
  color: rgba(18, 32, 58, 0.74);
  font-size: clamp(16px, 1.2vw, 20px);
  line-height: 1.68;
}

@media (max-width: 980px) {
  .kim-career.kim-wrap .kim-career-hero {
    min-height: 420px;
  }
}

@media (max-width: 767px) {
  .kim-career.kim-wrap .kim-career-hero {
    min-height: 320px;
    border-radius: 18px;
  }

  .kim-career.kim-wrap .kim-career-hero__content {
    padding: 34px 16px;
  }

  .kim-career.kim-wrap .kim-career-hero__title {
    font-size: clamp(28px, 7vw, 40px);
    line-height: 1.1;
  }

  .kim-career.kim-wrap .kim-career-hero__desc {
    font-size: 15px;
    line-height: 1.55;
    font-weight: 520;
  }

  .kim-career-hero-copy {
    padding: 28px 0 36px;
  }

  .kim-career-hero-copy__title {
    font-size: clamp(28px, 7vw, 40px);
    line-height: 1.1;
  }

  .kim-career-hero-copy__desc {
    font-size: 15px;
    line-height: 1.58;
  }
}

@media (prefers-reduced-motion: reduce) {
  .kim-career.kim-wrap .kim-career-hero__bg,
  .kim-career.kim-wrap .kim-career-hero__content,
  .kim-career-hero.is-motion-ready [data-kim-career-hero-title],
  .kim-career-hero.is-motion-ready [data-kim-career-hero-desc] {
    transition: none;
    transform: none;
  }

  .kim-career-hero.is-motion-ready [data-kim-career-hero-title],
  .kim-career-hero.is-motion-ready [data-kim-career-hero-desc] {
    opacity: 1;
  }
}

/* Global Back-to-Top (override Divi default) */
.et_pb_scroll_top {
  right: clamp(12px, 2vw, 28px) !important;
  bottom: clamp(14px, 2.2vw, 28px) !important;
  width: 50px !important;
  height: 50px !important;
  padding: 0 !important;
  border-radius: 14px !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  background: linear-gradient(160deg, #27b0ee 0%, #0d78cf 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 12px 28px rgba(13, 120, 207, 0.28) !important;
  backdrop-filter: blur(4px);
  text-align: center !important;
  line-height: 50px !important;
  font-size: 26px !important;
  z-index: 9999 !important;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background-color 0.22s ease, opacity 0.22s ease !important;
}

.et_pb_scroll_top::before {
  display: block;
  line-height: 50px;
}

.et_pb_scroll_top.et-visible:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 34px rgba(13, 120, 207, 0.34) !important;
  background: linear-gradient(160deg, #1ca8e9 0%, #0b6fc1 100%) !important;
}

.et_pb_scroll_top.et-visible:active {
  transform: translateY(-1px);
}

.et_pb_scroll_top:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.75), 0 0 0 6px rgba(13, 120, 207, 0.45) !important;
}

@media (max-width: 767px) {
  .et_pb_scroll_top {
    width: 44px !important;
    height: 44px !important;
    border-radius: 12px !important;
    line-height: 44px !important;
    font-size: 22px !important;
  }

  .et_pb_scroll_top::before {
    line-height: 44px;
  }
}