/* =========================================================
   ELK STANDARD PAGES
   Readable default single-page template
========================================================= */

body.page.elk-default-content-page:not(.home) {
  --elk-reading-width: 1120px;
  --elk-reading-surface: rgba(248, 246, 241, 0.9);
  --elk-reading-border: rgba(0, 0, 0, 0.18);
}

body.page.elk-default-content-page:not(.home) .elementor-location-single,
body.page.elk-default-content-page:not(.home) main.site-main,
body.page.elk-default-content-page:not(.home) main#primary {
  display: block;
  padding-block: clamp(30px, 4vw, 56px) clamp(80px, 9vw, 128px);
  background-color: transparent;
}

/* One continuous paper surface for Elementor's single-page template. */
body.page.elk-default-content-page:not(.home) .elementor-location-single > .elk-single-hero,
body.page.elk-default-content-page:not(.home) .elementor-location-single > .e-con:nth-child(2) {
  width: min(var(--elk-reading-width), calc(100% - 48px)) !important;
  max-width: none !important;
  margin-inline: auto !important;
  background-color: var(--elk-reading-surface) !important;
  border-inline: 1px solid var(--elk-reading-border);
}

body.page.elk-default-content-page:not(.home) .elementor-location-single > .elk-single-hero {
  margin-bottom: 0 !important;
  padding: clamp(42px, 6vw, 68px) clamp(28px, 6vw, 76px) 26px !important;
  border-top: 1px solid var(--elk-reading-border);
  border-bottom: 0 !important;
}

body.page.elk-default-content-page:not(.home) .elementor-location-single > .e-con:nth-child(2) {
  min-height: 0 !important;
  padding: 0 clamp(28px, 6vw, 76px) clamp(58px, 7vw, 88px) !important;
  border-bottom: 1px solid var(--elk-reading-border);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.055);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

body.page.elk-default-content-page:not(.home) .elementor-location-single > .elk-single-hero > .e-con-inner,
body.page.elk-default-content-page:not(.home) .elementor-location-single > .e-con:nth-child(2) > .e-con-inner {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Elementor optimized markup has no .elementor-widget-container here. */
body.page.elk-default-content-page:not(.home) .elementor-widget-theme-post-content,
body.page.elk-default-content-page:not(.home) .elementor-widget-theme-post-content > .elementor,
body.page.elk-default-content-page:not(.home) .elementor-widget-theme-post-content .elk-idea-page {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  background-color: transparent !important;
}

body.page.elk-default-content-page:not(.home) .elementor-widget-theme-post-content .elk-idea-page > .e-con-inner {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Normal theme fallback when no Elementor single template is used. */
body.page.elk-default-content-page:not(.home) main.site-main article,
body.page.elk-default-content-page:not(.home) main#primary article {
  width: min(var(--elk-reading-width), calc(100% - 48px)) !important;
  max-width: none !important;
  margin-inline: auto !important;
  padding: clamp(42px, 6vw, 76px) clamp(28px, 6vw, 76px) clamp(58px, 7vw, 88px) !important;
  background-color: var(--elk-reading-surface) !important;
  border: 1px solid var(--elk-reading-border);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.055);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

body.page.elk-default-content-page:not(.home) main.site-main article > .entry-content,
body.page.elk-default-content-page:not(.home) main#primary article > .entry-content {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  background-color: transparent !important;
}

/* Reading typography, including Elementor text widgets nested in the page. */
body.page.elk-default-content-page:not(.home) :is(.elementor-widget-theme-post-content, .entry-content) {
  font-size: clamp(16px, 0.25vw + 15px, 18px);
  line-height: 1.7;
}

body.page.elk-default-content-page:not(.home) :is(.elementor-widget-theme-post-content, .entry-content) .elementor-widget-text-editor,
body.page.elk-default-content-page:not(.home) :is(.elementor-widget-theme-post-content, .entry-content) .elementor-widget-text-editor .elementor-widget-container {
  font-size: inherit !important;
  line-height: inherit !important;
}

body.page.elk-default-content-page:not(.home) :is(.elementor-widget-theme-post-content, .entry-content) :is(h1, h2, h3, h4, h5, h6) {
  max-width: 24ch;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

body.page.elk-default-content-page:not(.home) .elk-single-hero h1,
body.page.elk-default-content-page:not(.home) .elk-single-hero .elementor-heading-title,
body.page.elk-default-content-page:not(.home) :is(.elementor-widget-theme-post-content, .entry-content) h1 {
  max-width: 15ch;
  margin: 0 !important;
  font-size: clamp(46px, 5.5vw, 72px) !important;
  font-weight: 800 !important;
  line-height: 0.94 !important;
  letter-spacing: -0.06em !important;
}

body.page.elk-default-content-page:not(.home) :is(.elementor-widget-theme-post-content, .entry-content) h2 {
  margin: clamp(48px, 6vw, 72px) 0 18px !important;
  padding-top: 18px;
  font-size: clamp(30px, 3vw, 44px) !important;
  line-height: 1 !important;
  letter-spacing: -0.045em !important;
  border-top: 1px solid rgba(0, 0, 0, 0.28);
}

body.page.elk-default-content-page:not(.home) :is(.elementor-widget-theme-post-content, .entry-content) h3 {
  margin: 38px 0 14px !important;
  font-size: clamp(23px, 2vw, 31px) !important;
  line-height: 1.08 !important;
  letter-spacing: -0.035em !important;
}

body.page.elk-default-content-page:not(.home) :is(.elementor-widget-theme-post-content, .entry-content) h4 {
  margin: 30px 0 10px !important;
  font-size: 18px !important;
  line-height: 1.2 !important;
}

/* The Idea page uses H2 elements as compact organisation labels. */
body.page.elk-default-content-page:not(.home) .elk-idea-bottom-title .elementor-heading-title {
  max-width: none;
  margin: 0 !important;
  padding: 0 !important;
  font-size: clamp(24px, 2.2vw, 32px) !important;
  line-height: 1.05 !important;
  letter-spacing: -0.04em !important;
  border: 0;
}

body.page.elk-default-content-page:not(.home) :is(.elementor-widget-theme-post-content, .entry-content) :is(p, li) {
  max-width: 72ch;
  font-size: inherit !important;
  line-height: inherit !important;
}

body.page.elk-default-content-page:not(.home) :is(.elementor-widget-theme-post-content, .entry-content) p {
  margin: 0 0 1.35em;
}

body.page.elk-default-content-page:not(.home) :is(.elementor-widget-theme-post-content, .entry-content) :is(ul, ol) {
  max-width: 72ch;
  margin: 0 0 1.7em;
  padding-left: 1.4em;
}

body.page.elk-default-content-page:not(.home) :is(.elementor-widget-theme-post-content, .entry-content) li + li {
  margin-top: 0.35em;
}

body.page.elk-default-content-page:not(.home) :is(.elementor-widget-theme-post-content, .entry-content) blockquote {
  max-width: 68ch;
  margin: 32px 0;
  padding: 4px 0 4px 22px;
  border-left: 3px solid currentColor;
}

body.page.elk-default-content-page:not(.home) :is(.elementor-widget-theme-post-content, .entry-content) a {
  font-weight: 650;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

body.page.elk-default-content-page:not(.home) :is(.elementor-widget-theme-post-content, .entry-content) :is(img, figure) {
  max-width: 100%;
}

body.page.elk-default-content-page:not(.home) :is(.elementor-widget-theme-post-content, .entry-content) > :first-child {
  margin-top: 0 !important;
}

/* ---------------------------------------------------------
   IMAGES, GALLERIES AND MEDIA
--------------------------------------------------------- */

body.page.elk-default-content-page:not(.home) .entry-content :is(figure, .wp-block-image, .wp-block-gallery) {
  margin-block: clamp(30px, 5vw, 58px);
}

body.page.elk-default-content-page:not(.home) .elk-idea-page :is(
  .elk-idea-hero-image,
  .elk-idea-image-wide,
  .elk-idea-image-split,
  .elk-idea-timeline-image
) {
  margin-block: clamp(32px, 5vw, 64px) !important;
  padding: clamp(7px, 1vw, 12px) !important;
  gap: clamp(7px, 1vw, 12px) !important;
  background-color: rgba(255, 255, 255, 0.46);
  border: 1px solid rgba(0, 0, 0, 0.18);
}

body.page.elk-default-content-page:not(.home) .elk-idea-page :is(
  .elk-idea-hero-image,
  .elk-idea-image-wide,
  .elk-idea-image-split,
  .elk-idea-timeline-image
) > .e-con-inner {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  gap: clamp(7px, 1vw, 12px) !important;
}

body.page.elk-default-content-page:not(.home) .elk-idea-page :is(
  .elk-idea-hero-image,
  .elk-idea-image-wide,
  .elk-idea-image-split,
  .elk-idea-timeline-image
) :is(.elementor-widget-image, figure) {
  margin: 0 !important;
}

body.page.elk-default-content-page:not(.home) :is(.elementor-widget-theme-post-content, .entry-content) :is(figure, .wp-block-image, .elementor-widget-image) img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgba(0, 0, 0, 0.16);
}

body.page.elk-default-content-page:not(.home) :is(.elementor-widget-theme-post-content, .entry-content) figcaption {
  margin: 0;
  padding: 10px 2px 1px;
  color: rgba(0, 0, 0, 0.66);
  font-size: 12px;
  line-height: 1.45;
}

body.page.elk-default-content-page:not(.home) .elk-idea-page .elk-idea-text-block {
  margin-block: clamp(8px, 2vw, 20px) clamp(38px, 6vw, 68px) !important;
}

body.page.elk-default-content-page:not(.home) .elk-idea-page .elk-idea-partner-card {
  height: 100%;
  padding: clamp(16px, 2vw, 22px) !important;
  background-color: rgba(255, 255, 255, 0.38);
  border: 0;
}

/* Compact partner loop: equal editorial tiles rather than long biographies. */
body.page.elk-default-content-page:not(.home) .elk-idea-partners-grid .elementor-loop-container {
  display: flex !important;
  flex-flow: row wrap;
  gap: 1px !important;
  padding: 1px;
  background-color: rgba(0, 0, 0, 0.18);
}

body.page.elk-default-content-page:not(.home) .elk-idea-partners-grid .e-loop-item {
  flex: 1 1 calc(33.333% - 1px) !important;
  width: auto !important;
  min-width: 240px;
  margin: 0 !important;
  background-color: var(--elk-reading-surface, #f8f6f1);
}

body.page.elk-default-content-page:not(.home) .elk-idea-partner-card > .e-con-inner {
  display: flex !important;
  min-height: 100%;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  gap: 10px !important;
}

body.page.elk-default-content-page:not(.home) .elk-idea-partner-card .elementor-widget-image {
  width: 100% !important;
  max-width: 120px;
  height: 92px;
  margin: 0 0 12px !important;
  padding: 8px;
  background-color: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(0, 0, 0, 0.12);
}

body.page.elk-default-content-page:not(.home) .elk-idea-partner-card .elementor-widget-image :is(.elementor-widget-container, a) {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
}

body.page.elk-default-content-page:not(.home) .elk-idea-partner-card .elementor-widget-image img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain;
  border: 0 !important;
  filter: grayscale(100%);
}

body.page.elk-default-content-page:not(.home) .elk-idea-partner-card :is(
  .elementor-widget-heading,
  .elementor-widget-theme-post-title
) {
  width: 100%;
  margin: 0 !important;
}

body.page.elk-default-content-page:not(.home) .elk-idea-partner-card :is(
  .elementor-heading-title,
  .elementor-heading-title a,
  .elementor-widget-theme-post-title a
) {
  max-width: none;
  margin: 0 !important;
  padding: 0 !important;
  font-size: clamp(18px, 1.5vw, 22px) !important;
  font-weight: 800 !important;
  line-height: 1.05 !important;
  letter-spacing: -0.035em !important;
  text-decoration: none !important;
  border: 0;
}

body.page.elk-default-content-page:not(.home) .elk-idea-partner-card :is(
  .elementor-heading-title a,
  .elementor-widget-theme-post-title a
):hover {
  text-decoration: underline !important;
  text-decoration-thickness: 1px !important;
  text-underline-offset: 3px;
}

body.page.elk-default-content-page:not(.home) .elk-idea-partner-card .elementor-widget-text-editor {
  display: -webkit-box;
  width: 100%;
  max-height: 5.8em;
  margin: 0 !important;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  color: rgba(0, 0, 0, 0.72);
  font-size: 14px !important;
  line-height: 1.45 !important;
}

body.page.elk-default-content-page:not(.home) .elk-idea-partner-card .elementor-widget-text-editor .elementor-widget-container {
  display: -webkit-box;
  max-height: 5.8em;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  font-size: inherit !important;
  line-height: inherit !important;
}

body.page.elk-default-content-page:not(.home) .elk-idea-partner-card .elementor-widget-text-editor p {
  margin: 0;
  font-size: inherit !important;
  line-height: inherit !important;
}

body.page.elk-default-content-page:not(.home) .elk-idea-partner-card .elementor-widget-button {
  margin: auto 0 0 !important;
  padding-top: 8px;
}

body.page.elk-default-content-page:not(.home) .elk-idea-partner-card .elementor-button {
  min-width: 0;
  min-height: 0;
  padding: 0 0 4px !important;
  color: var(--elk-black, #050505) !important;
  background-color: transparent !important;
  border: 0 !important;
  border-bottom: 1px solid currentColor !important;
  font-size: 10px !important;
}

body.page.elk-default-content-page:not(.home) .elk-idea-partner-card .elementor-button:hover {
  transform: none;
  opacity: 0.55;
}

/* ---------------------------------------------------------
   BUTTONS AND ACTION LINKS
--------------------------------------------------------- */

body.page.elk-default-content-page:not(.home) :is(.elementor-widget-theme-post-content, .entry-content) :is(
  .elementor-button,
  .wp-element-button,
  .wp-block-button__link,
  a.elk-button
) {
  display: inline-flex !important;
  width: auto;
  min-width: 112px;
  min-height: 44px;
  padding: 0 18px !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--elk-white, #fff) !important;
  background-color: var(--elk-black, #050505) !important;
  border: 1px solid var(--elk-black, #050505) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  letter-spacing: 0.075em;
  text-align: center;
  text-decoration: none !important;
  text-transform: uppercase;
  opacity: 1;
  cursor: pointer;
  transition:
    color 150ms ease,
    background-color 150ms ease,
    transform 150ms ease;
}

body.page.elk-default-content-page:not(.home) :is(.elementor-widget-theme-post-content, .entry-content) :is(
  .elementor-button,
  .wp-element-button,
  .wp-block-button__link,
  a.elk-button
):hover {
  color: var(--elk-black, #050505) !important;
  background-color: transparent !important;
  opacity: 1;
  transform: translateY(-2px);
}

body.page.elk-default-content-page:not(.home) :is(.elementor-widget-theme-post-content, .entry-content) :is(
  .elementor-button,
  .wp-element-button,
  .wp-block-button__link,
  a.elk-button
):focus-visible {
  outline: 2px solid var(--elk-black, #050505);
  outline-offset: 3px;
}

body.page.elk-default-content-page:not(.home) .elk-idea-bottom-list .elk-idea-bottom-title {
  margin-top: clamp(26px, 4vw, 42px) !important;
  padding-top: clamp(20px, 3vw, 30px) !important;
  border-top: 1px solid rgba(0, 0, 0, 0.24);
}

body.page.elk-default-content-page:not(.home) .elk-idea-bottom-list .elk-idea-bottom-title:first-child {
  margin-top: 0 !important;
  padding-top: 0 !important;
  border-top: 0;
}

body.page.elk-default-content-page:not(.home) .elk-idea-bottom-list .elementor-widget-button {
  margin-top: 10px;
}

@media (max-width: 900px) {
  body.page.elk-default-content-page:not(.home) {
    --elk-reading-width: 100%;
  }

  body.page.elk-default-content-page:not(.home) .elementor-location-single > .elk-single-hero,
  body.page.elk-default-content-page:not(.home) .elementor-location-single > .e-con:nth-child(2),
  body.page.elk-default-content-page:not(.home) main.site-main article,
  body.page.elk-default-content-page:not(.home) main#primary article {
    width: calc(100% - 32px) !important;
  }

  body.page.elk-default-content-page:not(.home) .elk-idea-partners-grid .e-loop-item {
    flex-basis: calc(50% - 1px) !important;
    min-width: 220px;
  }
}

@media (max-width: 767px) {
  body.page.elk-default-content-page:not(.home) .elementor-location-single,
  body.page.elk-default-content-page:not(.home) main.site-main,
  body.page.elk-default-content-page:not(.home) main#primary {
    padding-block: 14px 64px;
  }

  body.page.elk-default-content-page:not(.home) .elementor-location-single > .elk-single-hero,
  body.page.elk-default-content-page:not(.home) .elementor-location-single > .e-con:nth-child(2),
  body.page.elk-default-content-page:not(.home) main.site-main article,
  body.page.elk-default-content-page:not(.home) main#primary article {
    width: calc(100% - 20px) !important;
  }

  body.page.elk-default-content-page:not(.home) .elementor-location-single > .elk-single-hero {
    padding: 34px 20px 22px !important;
  }

  body.page.elk-default-content-page:not(.home) .elementor-location-single > .e-con:nth-child(2) {
    padding: 0 20px 48px !important;
  }

  body.page.elk-default-content-page:not(.home) main.site-main article,
  body.page.elk-default-content-page:not(.home) main#primary article {
    padding: 34px 20px 48px !important;
  }

  body.page.elk-default-content-page:not(.home) .elk-single-hero h1,
  body.page.elk-default-content-page:not(.home) .elk-single-hero .elementor-heading-title,
  body.page.elk-default-content-page:not(.home) :is(.elementor-widget-theme-post-content, .entry-content) h1 {
    font-size: clamp(38px, 12vw, 52px) !important;
  }

  body.page.elk-default-content-page:not(.home) :is(.elementor-widget-theme-post-content, .entry-content) h2 {
    margin-top: 44px !important;
    font-size: clamp(27px, 8.5vw, 36px) !important;
  }

  body.page.elk-default-content-page:not(.home) .elk-idea-page :is(
    .elk-idea-hero-image,
    .elk-idea-image-wide,
    .elk-idea-image-split,
    .elk-idea-timeline-image
  ) {
    margin-block: 28px !important;
    padding: 6px !important;
    gap: 6px !important;
  }

  body.page.elk-default-content-page:not(.home) .elk-idea-page :is(
    .elk-idea-hero-image,
    .elk-idea-image-wide,
    .elk-idea-image-split,
    .elk-idea-timeline-image
  ) > .e-con-inner {
    gap: 6px !important;
  }

  body.page.elk-default-content-page:not(.home) .elk-idea-bottom-list :is(
    .elementor-widget-button,
    .elementor-button-wrapper,
    .elementor-button
  ) {
    width: 100%;
  }

  body.page.elk-default-content-page:not(.home) .elk-idea-partners-grid .e-loop-item {
    flex-basis: 100% !important;
    min-width: 0;
  }

  body.page.elk-default-content-page:not(.home) .elk-idea-partner-card .elementor-widget-image {
    max-width: 104px;
    height: 80px;
  }
}
