/* General content column. Page-specific blocks keep their own layout. */

.nu-main {
  background: transparent;
  color: var(--ink);
}

.nu-main .nu-shell .container {
  max-width: 100%;
  width: 100%;
}

.nu-main .nivo_slider_area {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.nu-main .nivo_slider_area .container-fluid {
  width: 100%;
  max-width: none;
  padding-left: 0;
  padding-right: 0;
}

.nu-main .nivo_slider_area .row {
  margin-left: 0;
  margin-right: 0;
}

.nu-main .nivo_slider_area .em_slider_inner.container {
  max-width: var(--shell);
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--shell-pad);
  padding-right: var(--shell-pad);
  box-sizing: border-box;
}

@media (min-width: 769px) {
  .nu-main .em-nivo-slider-wrapper {
    flex: 1 1 100%;
    width: 100% !important;
    max-width: none;
    height: 440px !important;
  }

  .nu-main .nivoSlider {
    width: 100% !important;
    height: 440px !important;
    overflow: hidden !important;
  }

  /* Cover-crop into the slider frame (do not set width:100% on slice imgs — that duplicates). */
  .nu-main .nivoSlider > img,
  .nu-main .nivoSlider .nivo-main-image {
    height: 440px !important;
    width: 100% !important;
    object-fit: cover !important;
    object-position: center center !important;
  }

  .nu-main .nivo-slice,
  .nu-main .nivo-box {
    height: 440px !important;
    overflow: hidden !important;
  }

  .nu-main .nivo-slice img,
  .nu-main .nivo-box img {
    height: 440px !important;
    max-width: none !important;
    object-fit: cover !important;
    object-position: center center !important;
  }

  .nu-main .em-slider-main-title {
    font-size: 52px;
    line-height: 1.15;
    margin: 0;
  }

  .nu-main .em-slider-main-title-50 {
    font-size: 44px;
    line-height: 1.15;
    margin: 0;
  }

  .nu-main .em-slider-descript {
    font-size: 16px;
    margin-top: 12px;
    margin-bottom: 8px;
  }

  .nu-main .em-button-button-area a {
    padding: 12px 28px;
    font-size: 14px;
    margin-top: 8px;
  }
}

.nu-main h1:not([class*="slider"]),
.nu-main h2:not([class*="slider"]),
.nu-main h3,
.nu-main .section_main_title h1,
.nu-main .section_main_title h2 {
  font-family: var(--serif);
  color: var(--navy);
  font-weight: 600;
}

.nu-main h1:not([class*="slider"]) {
  font-size: 30px;
  line-height: 1.22;
  text-align: left;
}

.nu-main h2:not([class*="slider"]) {
  font-size: 26px;
  line-height: 1.25;
}

.nu-main h3 {
  font-size: 22px;
  line-height: 1.3;
}

.nu-main .widget-title,
.nu-main .blog-left-side .widget h2 {
  color: var(--navy);
  font-family: var(--serif);
  font-weight: 600;
}

.nu-main .blog-left-side .widget a:hover {
  color: var(--cyan);
}

/* ---------- shared page sidebar ---------- */

/* theme-default overflow-x:hidden breaks position:sticky. */
html:has(.pg-side),
body.nu-site:has(.pg-side) {
  overflow-x: clip;
}

.pg-side {
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 22px 22px 8px;
  background: var(--paper);
  position: sticky;
  top: 20px;
  box-sizing: border-box;
  align-self: flex-start;
  height: fit-content;
}

/* Keep sidebar inside the shell (Bootstrap .row uses -15px margins). */
.row:has(> aside.pg-side) {
  align-items: flex-start;
  margin-left: 0;
  margin-right: 0;
  gap: 46px;
}

/* Clear Bootstrap gutters on the content column only — keep .pg-side card padding.
   (.pg-side still carries col-* classes, so it must be excluded.) */
.row:has(> aside.pg-side) > [class*="col-"]:not(.pg-side) {
  padding-left: 0;
  padding-right: 0;
  /* Flex items default to min-width:auto, so a wide table expands the column,
     wraps the row, and the sticky sidebar overlaps the content. */
  min-width: 0;
  max-width: 100%;
}

/* Match pg-layout sidebar width (340px) in Bootstrap rows too. */
@media (min-width: 768px) {
  .row > aside.pg-side {
    flex: 0 0 340px !important;
    width: 340px !important;
    max-width: 340px !important;
  }

  .row > aside.pg-side + [class*="col-"] {
    flex: 1 1 0 !important;
    max-width: none !important;
    width: auto !important;
    min-width: 0 !important;
  }
}

.pg-layout > .pg-side {
  width: 100%;
  max-width: 100%;
  flex: none;
  padding-left: 22px;
  padding-right: 22px;
  float: none;
}

.nu-main .pg-side-title {
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.3;
  font-weight: 600;
  color: var(--navy);
  margin: 0 0 10px;
  text-transform: none;
}

.pg-side-logo {
  display: flex;
  justify-content: center;
  padding: 4px 0 18px;
}

.pg-side-logo img {
  max-width: 100%;
  height: auto;
  display: block;
}

.pg-back {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray);
  padding: 0 2px 14px;
  transition: color 0.15s;
  text-decoration: none;
}

.pg-back:hover {
  color: var(--cyan);
  text-decoration: none;
}

.pg-back svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pg-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.pg-menu li {
  position: relative;
  margin: 0;
  padding: 0;
}

.pg-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 2px;
  font-size: 14px;
  font-weight: 500;
  color: var(--navy);
  border-bottom: 1px solid var(--line);
  transition: 0.15s;
  text-decoration: none;
}

.pg-menu a svg {
  width: 15px;
  height: 15px;
  opacity: 0;
  transform: translateX(-4px);
  transition: 0.18s;
  color: var(--cyan);
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pg-menu li:last-child a {
  border-bottom: 0;
}

.pg-menu a:hover {
  color: var(--cyan);
  padding-left: 8px;
  text-decoration: none;
}

.pg-menu a:hover svg {
  opacity: 1;
  transform: none;
}

.pg-menu a.is-active {
  color: var(--cyan);
  font-weight: 700;
}

.pg-menu li.is-active::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 8px;
  bottom: 9px;
  width: 3px;
  background: var(--cyan);
  border-radius: 2px;
}

@media (max-width: 980px) {
  .pg-side {
    position: static;
    width: auto !important;
    max-width: none !important;
    flex: none !important;
    margin-left: calc(-1 * var(--shell-pad));
    margin-right: calc(-1 * var(--shell-pad));
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    box-sizing: border-box;
  }

  .pg-layout > .pg-content {
    order: 1;
  }

  .pg-layout > .pg-side {
    order: 2;
  }

  .row:has(> aside.pg-side) {
    display: flex;
    flex-direction: column;
  }

  .row:has(> aside.pg-side) > [class*="col-"]:not(.pg-side) {
    order: 1;
    width: 100%;
    max-width: 100%;
  }

  .row:has(> aside.pg-side) > .pg-side {
    order: 2;
  }

  .pg-menu li.is-active::before {
    display: none;
  }
}
