/**
 * Kulturnat branding: logo, main color, footer, and Rubik.
 * Layout and components are unchanged.
 */

:root {
  /* Kulturnat main color. White text on this color is about 14:1. */
  --ek-navy: #1E0195;
  --ek-teal: #1E0195;
  --ek-orange: #d4761c;
  --ek-cream: #fefaf1;
  --ek-white: #fff;
  --ek-footer-bg: #000119;
  --identity-color-h: 251.7568 !important;
  --identity-color-s: 98.6667% !important;
  --identity-color-l: 29.4118% !important;
  --ek-font-body: "Rubik", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ek-font-heading: "Rubik", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ek-search-icon-filter: brightness(0) saturate(100%) invert(29%) sepia(99%) saturate(529%) hue-rotate(215deg) brightness(71%) contrast(176%);
  --ek-chrome-padding-x: clamp(24px, 6vw, 96px);
  --ek-header-item-gap: clamp(48px, 5vw, 96px);
  --ek-header-search-clock-gap: 32px;
  /* Measured header chrome; messages stick flush below this when scrolling. */
  --ek-header-height: 150px;
  --ek-sticky-header-offset: calc(var(--ek-header-height) + 24px);
  --font-body: var(--ek-font-body);
  --font-title: var(--ek-font-heading);
}

@media (min-width: 1440px) {
  :root {
    --ek-header-height: 94px;
    --ek-sticky-header-offset: calc(var(--ek-header-height) + 24px);
  }
}

html {
  scroll-padding-top: var(--ek-sticky-header-offset);
}

/* Status / error messages under the header (system_messages_block). */
.ek-page-messages:has([data-drupal-messages] [role="contentinfo"]) {
  margin-top: 16px;
  padding-top: 16px;
  padding-bottom: 16px;
  background-color: var(--ek-white);
}

.ek-page-messages [data-drupal-messages] {
  box-sizing: border-box;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--ek-chrome-padding-x) 8px;
  scroll-margin-top: var(--ek-sticky-header-offset);
}

.ek-page-messages [data-drupal-messages] li + li {
  margin-top: 8px;
}

/* Global typography — Rubik Regular for body, Rubik Light for headings. */
body {
  font-family: var(--ek-font-body) !important;
  font-synthesis: style;
}

h1,
h2,
h3,
h4,
h5,
h6,
[class*="text-header"] {
  font-family: var(--ek-font-heading) !important;
  font-weight: 300;
}

[class*="text-body"],
[class*="text-button"],
[class*="text-links"],
[class*="text-tags"],
[class*="text-label"],
[class*="text-small-caption"],
.text-subtitle,
.rich-text {
  font-family: var(--ek-font-body) !important;
}

/* Kulturnat logos (header uses novel markup; footer uses ek-footer). */
.ek-logo {
  display: block;
  width: auto;
  height: 52px;
  max-width: 100%;
  object-fit: contain;
  object-position: left center;
}

/* Compact header — below 1440px (phones + tablets). */
@media (max-width: 1439px) {
  .header.ek-header .header__logo-desktop {
    display: none !important;
  }

  .header.ek-header {
    display: block;
    position: sticky;
    top: 0 !important;
    z-index: 5;
    background-color: var(--ek-white);
    /* Anchor for the language switcher overlay on the top row. */
    isolation: isolate;
    padding: 0;
    min-height: 0;
    height: auto !important;
    border-top: none;
    border-left: none;
    border-right: none;
    border-bottom: 1px solid #dbdbdb;
  }

  .header.ek-header .header__menu.ek-header-menu {
    display: grid;
    grid-template-rows: auto auto !important;
    width: 100%;
    height: auto;
    min-height: 0;
  }

  .header.ek-header .header__menu-first {
    padding-right: 72px;
  }

  .header.ek-header .ek-header__toolbar {
    display: block;
    width: 100%;
    grid-row: 2;
  }

  .header.ek-header .ek-header-translation {
    position: absolute;
    top: 0;
    right: 0;
    height: 56px;
    pointer-events: auto;
    z-index: 10;
  }

  .header.ek-header .header__menu-first {
    display: grid;
    grid-template-columns: 1fr 56px;
    align-items: stretch;
    height: 56px;
    min-height: 56px;
    max-height: 56px;
    border-bottom: 1px solid #dbdbdb;
  }

  .header.ek-header .header__menu-first > div:first-child {
    display: flex;
    align-items: center;
    min-width: 0;
    height: 100%;
  }

  .header.ek-header .header__menu-navigation-mobile {
    display: grid;
    grid-template-columns: 56px 1fr;
    align-items: center;
    width: 100%;
    height: 56px;
    min-height: 56px;
  }

  .header.ek-header .header__button-responsive-switch {
    display: flex;
    align-items: center;
    justify-content: center;
    justify-self: end;
    grid-column: 2;
    height: 100%;
  }

  .header.ek-header .header__button {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
  }

  .header.ek-header .header__menu-navigation-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 0;
  }

  .header.ek-header .header__menu-navigation-logo .ek-logo {
    height: 34px;
    width: auto;
  }

  .header.ek-header .header__button-responsive-switch .header__button-icon {
    width: 28px;
    height: 28px;
  }

  .header.ek-header .header__button-text {
    display: none;
  }

  /* display:none — off-screen visibility:hidden still laid out ~1200px+ (kl menu labels)
     and caused horizontal scroll when the page wrapper allows overflow (title band). */
  .header.ek-header .header__menu-first > .header__menu-navigation,
  .header.ek-header .header__menu-first > div:first-child > .header__menu-navigation {
    display: none !important;
    visibility: hidden;
  }

  .header.ek-header .header__menu-second {
    width: 100%;
    height: 72px;
    min-height: 72px;
    padding: 0;
    margin: 0;
  }

  .header.ek-header .header__menu-search,
  .header.ek-header .header__menu-search-form {
    width: 100%;
    height: 100%;
    min-height: 72px;
    display: flex;
    align-items: center;
  }

  .header.ek-header .header__menu-search {
    background-color: var(--ek-cream);
    border: none;
    border-top: 1px solid #dbdbdb;
    box-sizing: border-box;
  }

  .header.ek-header .header__menu-search-input {
    height: 72px;
    min-height: 72px;
    padding: 0 52px 0 16px;
    font-size: 16px;
    line-height: 1.4;
    color: var(--ek-teal);
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
  }

  .header.ek-header .header__menu-search-input::placeholder {
    color: var(--ek-teal);
    opacity: 0.85;
  }

  .header.ek-header .header__menu-search-icon {
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    filter: var(--ek-search-icon-filter);
  }

  /* Tablet: slightly taller top row to match Novel touch targets. */
  @media (min-width: 768px) {
    .header.ek-header .header__menu-first {
      grid-template-columns: 1fr 70px;
      height: 70px;
      min-height: 70px;
      max-height: 70px;
    }

    .header.ek-header .header__menu-navigation-mobile {
      grid-template-columns: 70px 1fr;
      height: 70px;
      min-height: 70px;
    }

    .header.ek-header .header__button {
      width: 70px;
      height: 70px;
    }

    .header.ek-header .header__menu-navigation-logo .ek-logo {
      height: 48px;
    }
  }
}

@media (min-width: 1440px) {
  .header.ek-header {
    display: grid !important;
    grid-template-columns: minmax(160px, 220px) minmax(0, 1fr) auto auto;
    grid-template-rows: auto;
    column-gap: clamp(16px, 2vw, 32px);
    align-items: center;
    min-height: 0;
    width: 100%;
    box-sizing: border-box;
    padding: 10px var(--ek-chrome-padding-x);
    border-top: none;
    border-left: none;
    border-right: none;
    border-bottom: 1px solid #dbdbdb;
    position: sticky;
    top: 0;
    z-index: 5;
    background-color: var(--ek-white);
  }

  .header.ek-header .header__logo-desktop {
    grid-column: 1;
    grid-row: 1;
    display: flex !important;
    align-items: center;
    align-self: center;
    min-height: 72px;
    padding: 0;
    margin: 0;
    border-right: none;
    min-width: 0;
    max-width: 220px;
  }

  /* Flatten menu + toolbar so logo, nav, search, and language share one row. */
  .header.ek-header .header__menu.ek-header-menu,
  .header.ek-header .ek-header__toolbar {
    display: contents !important;
  }

  .header.ek-header .ek-header__toolbar {
    gap: 0;
  }

  .header.ek-header .header__menu-navigation-mobile,
  .header.ek-header .header__menu-navigation-logo {
    display: none !important;
  }

  .header.ek-header .ek-logo {
    height: 72px;
    max-width: 100%;
    object-fit: contain;
    object-position: left center;
  }

  /* The Kulturnat wordmark is wide. Keep it inside the logo column on
     desktops where the menu still fills the header. */
  @media (max-width: 1759px) {
    .header.ek-header .header__logo-desktop .ek-logo {
      width: 150px;
      max-width: 150px;
      height: 72px;
    }
  }

  .header.ek-header .header__menu-first {
    grid-column: 2;
    grid-row: 1;
    display: flex !important;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 72px;
    height: auto !important;
    overflow: visible;
    border-bottom: none;
    box-sizing: border-box;
    padding: 0;
    align-self: center;
  }

  .header.ek-header .header__menu-first > div:first-child {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 0;
    overflow: visible;
  }

  .header.ek-header .header__menu-first .header__button-responsive-switch {
    display: none !important;
  }

  .header.ek-header .header__menu-navigation {
    position: static;
    transform: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    align-content: center;
    gap: 6px clamp(10px, 1vw, 24px);
    padding: 0;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    visibility: visible;
    height: auto !important;
  }

  .header.ek-header .header__menu-navigation,
  .header.ek-header .header__menu-navigation-link {
    height: auto !important;
  }

  .header.ek-header .header__menu-navigation-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: var(--ek-navy);
    font-size: clamp(0.8125rem, 0.75rem + 0.25vw, 0.9375rem);
    line-height: 1.25;
    font-weight: 400;
    text-align: center;
    white-space: nowrap;
  }

  .header.ek-header .header__menu-navigation-item {
    flex: 0 1 auto;
    min-width: 0;
    max-width: none;
    border-top: 1px solid transparent;
    border-bottom: 1px solid transparent;
  }

  .header.ek-header .header__menu-navigation-item:hover {
    border-top: 1px solid transparent;
    border-bottom: 1px solid var(--ek-navy);
  }

  .header.ek-header .header__menu-second {
    grid-column: 3;
    grid-row: 1;
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    min-width: 0;
    width: min(240px, 18vw);
    max-width: 280px;
    height: auto !important;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0;
    margin: 0;
    align-self: center;
    min-height: 72px;
  }

  .header.ek-header .header__menu-search {
    width: 100%;
    max-width: 100%;
    height: 40px !important;
    background-color: var(--ek-cream);
    border: 1px solid var(--ek-teal);
    box-sizing: border-box;
  }

  .header.ek-header .header__menu-search-form {
    width: 100%;
    height: 100% !important;
  }

  .header.ek-header .header__menu-search-input {
    height: 38px !important;
    min-height: 0;
    padding: 0 40px 0 16px;
    color: var(--ek-teal);
    background-color: transparent;
  }

  .header.ek-header .header__menu-search-input::placeholder {
    color: var(--ek-teal);
    opacity: 0.85;
  }

  .header.ek-header .header__menu-search-input:focus {
    background-color: var(--ek-white);
  }

  .header.ek-header .header__menu-search-icon {
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    filter: var(--ek-search-icon-filter);
  }

  .header.ek-header .header__button--left-border,
  .header.ek-header .header__button--right-border {
    border-left: none;
    border-right: none;
  }

  .header.ek-header .header__button {
    height: auto;
    width: 104px;
  }
}

body.eonext-editorial-autosuggest-only .eonext-editorial-overlay--standalone {
  outline: none;
  border: 1px solid var(--ek-teal);
  border-top: none;
}

/* Remove novel pagefold triangles — not part of kultur design. */
.header.ek-header .pagefold-triangle--small,
.header.ek-header .pagefold-triangle--medium {
  display: none;
}

.header.ek-header .header__menu-navigation-pagefold.pagefold-parent--small {
  display: flex !important;
  align-items: center;
  justify-content: center;
  min-width: 0 !important;
  min-height: 0 !important;
  clip-path: none !important;
}

.header.ek-header .header__menu-navigation-pagefold img {
  display: block;
  width: 20px;
  height: auto;
}

.header__logo-desktop .logo__description,
.header__menu-navigation-logo .logo__description,
.header .logo__description {
  display: none !important;
}

/* Novel shows library name text in burger mode when a logo image exists — kultur uses image only. */
.has-burger-menu .header.ek-header .header__menu-navigation-mobile .logo img.ek-logo {
  display: block !important;
}

.has-burger-menu .header.ek-header .header__menu-navigation-mobile .logo .logo__description,
.has-burger-menu .header.ek-header .header__menu-navigation-mobile .logo .logo__description--has-image {
  display: none !important;
}

/* Header navigation uses DPL menu classes without text-body-* utilities. */
.header__menu-navigation-link,
.header-sidebar-nav .header__menu-navigation-link,
.header__button-text {
  font-family: var(--ek-font-heading) !important;
  text-transform: uppercase;
}

/* Hide library patron utilities — kulturnat is not a lending library site. */
.header__button-responsive-switch > *:last-child,
.header__advanced-desktop {
  display: none !important;
}

.ek-footer__logo {
  display: block;
  width: 190px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

/* Component titles compiled with the default DPL title stack (Lora). */
.article-header__title,
.banner__title,
.campaign__title,
.event-description__title,
.content-list-item__title,
.material-description__heading,
.material-content__heading,
.list-reservation__header,
.list-materials__content__header,
.infomedia-headline,
.infomedia-hedline,
.card-list-item__title,
.nav-spot__title,
.eonext-editorial-overlay__heading {
  font-family: var(--ek-font-heading) !important;
}

/* DPL body stack on components without text-body-* utilities (Noto Sans). */
.article-header__subtitle,
.article-header__info,
.article-header__author,
.article-header__back-link,
.article-header__date,
.banner__description,
.link-tag,
.logo__description,
.breadcrumb,
.breadcrumb > *,
.media-container__placeholder-text,
.material-card__description,
.tag,
.tag--large,
.dropdown__select,
.dropdown__option,
.dropdown__footnote,
.status-label,
.eonext-editorial-overlay,
.eonext-opening-hours,
.eonext-opening-hours .branches-link,
.eonext-library-staff {
  font-family: var(--ek-font-body) !important;
}

/* Content pages (articles + basic pages) — brand navy and body typography. */
article .rich-text,
article .rich-text :where(p, li, td, th, blockquote, h2, h3, h4) {
  color: var(--ek-navy);
}

.article-header__title,
.article-header__subtitle,
.article-header__info,
.article-header__author,
.article-header__date,
article .link-tag,
.article_header--tags .text-label-bold {
  color: var(--ek-navy);
}

article .rich-text a,
article .rich-text a:hover {
  color: var(--ek-navy);
  text-decoration-color: var(--ek-navy);
}

article .link-tag,
.article-header__author {
  color: var(--ek-navy) !important;
}

article .rich-text {
  font-size: 16px;
  line-height: 1.2;
}

article .rich-text :where(p, li) {
  font-size: 16px;
  line-height: 1.2;
}

article .rich-text h2,
article .rich-text h3 {
  font-family: var(--ek-font-heading) !important;
  font-size: 24px !important;
  font-weight: 400;
  line-height: 1.2;
}

article .rich-text ul,
article .rich-text ol {
  margin: 0 0 0.75rem;
  padding-left: 1.25rem;
}

article .rich-text ul {
  list-style-type: disc;
}

article .rich-text ol {
  list-style-type: decimal;
}

article .rich-text ul > li,
article .rich-text ol > li {
  position: static;
  margin: 0 0 0.25rem;
  padding-left: 0;
  padding-bottom: 0;
  list-style: inherit;
}

article .rich-text ul > li::before,
article .rich-text ol > li::before {
  content: none;
  display: none;
}

/* Full-width page title band (basic pages + shared with event submission form). */
.overflow-x-clip:has(.ek-page-title-band) {
  overflow-x: clip;
}

html:has(.ek-page-title-band) {
  overflow-x: clip;
}

main:has(.ek-page-title-band) {
  padding-top: 0;
  background-color: var(--ek-cream, #fefaf1);
}

.eonext-kultur-events.content-list-page:has(.ek-page-title-band) {
  margin-top: 0;
}

.page-frontpage .ek-page-title-band {
  display: none;
}

.ek-page-title-band {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100vw;
  min-height: 14rem;
  margin-inline: calc(50% - 50vw);
  margin-bottom: 2.5rem;
  padding: 2rem 1.5rem;
  color: var(--ek-white, #fff);
  text-align: center;
  background-color: var(--ek-navy, #1e0195);
}

.ek-page-title-band__inner {
  max-width: 42rem;
}

.ek-page-title-band__title {
  margin: 0 0 0.75rem;
  font-family: var(--ek-font-heading, inherit);
  font-size: clamp(1.5rem, 3.2vw, 2.75rem);
  font-weight: 600;
  line-height: 1.15;
  color: var(--ek-white, #fff);
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.ek-page-title-band__intro,
.ek-page-title-band__intro p {
  margin: 0 auto;
  max-width: 36rem;
  font-family: var(--ek-font-body, inherit);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.92);
  text-transform: none;
}

.ek-content-page:has(.ek-page-title-band) section.paragraphs .rich-text {
  box-sizing: border-box;
  max-width: 42rem;
  margin-inline: auto;
  padding: 0 1rem 3rem;
  color: var(--ek-navy);
}

.ek-footer__social {
  padding: 3rem var(--ek-chrome-padding-x);
  text-align: center;
  background-color: var(--ek-cream);
  border-top: 3px solid var(--ek-orange);
}

.ek-footer__social-title {
  margin: 0 0 1rem;
  font-family: var(--ek-font-heading);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--ek-navy);
  text-transform: uppercase;
}

.ek-footer__social-text {
  max-width: 40rem;
  margin: 0 auto 0.75rem;
  color: var(--ek-navy);
  line-height: 1.6;
}

.ek-footer__social-cta {
  margin: 0 0 0.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ek-navy);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.ek-footer__hashtag {
  margin: 0 0 1.25rem;
  font-weight: 600;
  color: var(--ek-navy);
}

.ek-footer__social-icons {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.ek-footer__social-band-icon {
  display: inline-flex;
  color: var(--ek-teal);
  text-decoration: none;
}

.ek-footer__social-band-icon:hover,
.ek-footer__social-band-icon:focus {
  opacity: 0.8;
}

.ek-footer {
  width: 100vw;
  max-width: 100vw;
  margin-top: 3rem;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.ek-footer__main {
  padding: 2.5rem var(--ek-chrome-padding-x);
  color: var(--ek-white);
  background-color: var(--ek-footer-bg);
}

.ek-footer__inner {
  display: grid;
  grid-template-columns: 190px repeat(4, minmax(0, 1fr));
  column-gap: 4rem;
  row-gap: 1.5rem;
  align-items: start;
  width: 100%;
  max-width: none;
  margin-inline: 0;
}

/* Span logo + one flexible track so logo→col1 spacing matches col→col. */
.ek-footer__brand {
  grid-column: 1 / 3;
  justify-self: start;
  width: 190px;
  max-width: 190px;
  overflow: hidden;
}

.ek-footer__col {
  min-width: 0;
  max-width: none;
}

.ek-footer__col:nth-child(2) {
  grid-column: 3;
}

.ek-footer__col:nth-child(3) {
  grid-column: 4;
}

.ek-footer__col:nth-child(4) {
  grid-column: 5;
}

@media (max-width: 767px) {
  .ek-footer__inner {
    grid-template-columns: 1fr;
    column-gap: 0;
    row-gap: 1.5rem;
  }

  .ek-footer__brand,
  .ek-footer__col:nth-child(2),
  .ek-footer__col:nth-child(3),
  .ek-footer__col:nth-child(4) {
    grid-column: 1;
  }

  .ek-footer__brand {
    width: auto;
    max-width: 190px;
  }
}

.ek-footer__col-title {
  margin: 0 0 1rem;
  font-family: var(--ek-font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ek-white);
  text-transform: uppercase;
}

.ek-footer__content,
.ek-footer__content a {
  color: var(--ek-white);
  line-height: 1.7;
}

.ek-footer__content {
  text-align: left;
}

.ek-footer__content a {
  display: inline;
  margin: 0;
  padding: 0;
  text-decoration: underline;
  word-break: break-word;
}

/* Rich text from the footer admin often mixes align classes / lists — one left edge. */
.ek-footer__content :is(p, ul, ol, li, h2, h3, h4, blockquote, address, div) {
  margin: 0 0 0.35rem;
  padding: 0;
  text-align: left !important;
  text-indent: 0;
}

.ek-footer__content > :first-child {
  margin-top: 0;
}

.ek-footer__content > :last-child {
  margin-bottom: 0;
}

.ek-footer__content ul,
.ek-footer__content ol {
  list-style: none;
}

.ek-footer__content li + li {
  margin-top: 0.35rem;
}

.ek-footer__content .visually-hidden,
.ek-footer__content .sr-only {
  position: absolute !important;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  width: 1px;
  height: 1px;
  word-wrap: normal;
}

.ek-footer__col-social {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.ek-footer__social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  color: var(--ek-teal);
  background-color: var(--ek-white);
  border-radius: 50%;
  text-decoration: none;
}

.ek-footer__social-icon:hover,
.ek-footer__social-icon:focus {
  opacity: 0.85;
}

.ek-footer__secondary {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  width: 100%;
  max-width: none;
  padding: 0;
  margin: 2rem 0 0;
  list-style: none;
}

.ek-footer__secondary a {
  color: var(--ek-white);
  text-decoration: underline;
}

/* Full-width content slider with design-system peek carousel. */
.page-frontpage section.paragraphs {
  margin-top: 0;
}

.page-frontpage section.paragraphs > .paragraphs__item--content_slider:first-child {
  margin-top: 0;
}

.paragraphs__item--content_slider:has(.slider.swiper) {
  margin-right: calc(50% - 50vw);
  margin-left: calc(50% - 50vw);
  max-width: 100vw;
}

.paragraphs__item--content_slider:has(.slider.swiper) .paragraphs {
  padding: 0;
  margin-top: 0;
}

/* Optional logo column beside the content slider. */
.ek-slider-layout {
  display: contents;
}

.ek-slider-layout--has-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.ek-slider-layout--has-logo .slider.swiper {
  min-width: 0;
  width: 100%;
}

.ek-slider-layout__logo img {
  display: block;
  max-width: 180px;
  height: auto;
}

@media (min-width: 768px) {
  .ek-slider-layout--has-logo {
    flex-direction: row;
    align-items: center;
    gap: 48px;
    padding-left: 48px;
  }

  .ek-slider-layout--has-logo .slider.swiper {
    flex: 1;
  }

  .ek-slider-layout__logo {
    flex: 0 0 auto;
  }
}

.paragraphs__item--content_slider:has(.ek-hero-slider) {
  margin-right: calc(50% - 50vw);
  margin-left: calc(50% - 50vw);
  max-width: 100vw;
}

.paragraphs__item--content_slider:has(.ek-hero-slider) .paragraphs {
  padding: 0;
  margin-top: 0;
}

.ek-hero-slider {
  position: relative;
  width: 100%;
  color: var(--ek-white);
}

.ek-hero-slider__stage {
  position: relative;
}

.ek-hero-slider__viewport {
  overflow: hidden;
}

.ek-hero-slider__wrapper {
  display: flex;
  align-items: stretch;
  padding: 0;
  margin: 0;
  list-style: none;
}

.ek-hero-slider__slide {
  flex-shrink: 0;
  display: flex;
  height: auto;
}

.ek-hero-slider__nav {
  position: absolute;
  z-index: 4;
  top: calc(50% - 5.5rem);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 47px;
  height: 105px;
  padding: 0;
  color: var(--ek-white);
  cursor: pointer;
  background: transparent;
  border: 0;
  transform: translateY(-50%);
  transition: opacity 0.2s ease;
}

.ek-hero-slider__nav-icon {
  display: block;
  width: 24px;
  height: 40px;
}

.ek-hero-slider__nav--prev {
  left: 0;
  border-radius: 0 4px 4px 0;
}

.ek-hero-slider__nav--next {
  right: 0;
  border-radius: 4px 0 0 4px;
}

.ek-hero-slider__nav:hover,
.ek-hero-slider__nav:focus-visible {
  background: transparent;
  opacity: 0.85;
}

.ek-hero-slider__nav.swiper-button-disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

.ek-hero-slide {
  display: flex;
  flex: 1;
  width: 100%;
}

.ek-hero-slide__image {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  width: 100%;
  min-height: 500px;
  overflow: hidden;
  background: var(--ek-navy);
}

.ek-hero-slide__media,
.ek-hero-slide__media .media-container,
.ek-hero-slide__media .image-credited,
.ek-hero-slide__media .image-credited__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
}

.ek-hero-slide__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ek-hero-slide__overlay {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  display: flex;
  gap: 2rem;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
  height: 11rem;
  min-height: 11rem;
  max-height: 11rem;
  padding: 1.5rem clamp(1.5rem, 5vw, 4rem);
  background: rgb(30 1 149 / 30%);
  backdrop-filter: blur(8px);
}

.ek-hero-slide__category {
  margin: 0 0 0.35rem;
  font-family: var(--ek-font-heading);
  font-size: clamp(0.75rem, 1.2vw, 0.875rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ek-white);
}

.ek-hero-slide__content {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}

.ek-hero-slide__title {
  margin: 0 0 0.4rem;
  font-family: var(--ek-font-heading) !important;
  font-size: clamp(1.5rem, 2.8vw, 2.5rem) !important;
  font-weight: 700;
  line-height: 1.1;
  color: var(--ek-white) !important;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.ek-hero-slide__tagline {
  margin: 0 0 0.35rem;
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  line-height: 1.35;
  color: var(--ek-white);
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.ek-hero-slide__meta {
  margin: 0;
  font-size: clamp(0.95rem, 1.5vw, 1.125rem);
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--ek-white);
}

.ek-hero-slide__meta time {
  color: inherit;
}

.ek-hero-slide__cta.btn-primary.btn-filled {
  flex: 0 0 auto;
  min-width: 11rem;
  height: 3rem;
  padding: 0 2rem;
  font-weight: 700;
  color: var(--ek-navy) !important;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background-color: var(--ek-white) !important;
  border-color: var(--ek-white) !important;
}

.ek-hero-slide__cta.btn-primary.btn-filled:hover,
.ek-hero-slide__cta.btn-primary.btn-filled:focus-visible {
  color: var(--ek-navy) !important;
  background-color: var(--ek-cream) !important;
  border-color: var(--ek-cream) !important;
}

@media (min-width: 768px) {
  .ek-hero-slide__image {
    min-height: 810px;
    height: 810px;
  }

  .ek-hero-slider[data-items-per-view]:not([data-items-per-view="1"]) .ek-hero-slide__image {
    min-height: 560px;
    height: 560px;
  }

  .ek-hero-slider[data-items-per-view]:not([data-items-per-view="1"]) .ek-hero-slide__title {
    font-size: clamp(1.25rem, 2vw, 1.75rem) !important;
    -webkit-line-clamp: 1;
  }

  .ek-hero-slider[data-items-per-view]:not([data-items-per-view="1"]) .ek-hero-slide__overlay {
    height: 10.5rem;
    min-height: 10.5rem;
    max-height: 10.5rem;
    padding: 1.25rem 1.5rem;
  }

  .ek-hero-slider[data-items-per-view="1"] .ek-hero-slide__overlay {
    height: 12rem;
    min-height: 12rem;
    max-height: 12rem;
  }

  .ek-hero-slider[data-items-per-view="1"] .ek-hero-slide__tagline {
    -webkit-line-clamp: 3;
  }

  .ek-hero-slider[data-items-per-view]:not([data-items-per-view="1"]) .ek-hero-slide__cta.btn-primary.btn-filled {
    min-width: 9rem;
    padding: 0 1.25rem;
  }

  .ek-hero-slider[data-items-per-view]:not([data-items-per-view="1"]) .ek-hero-slider__nav {
    top: calc(50% - 5.25rem);
  }
}

@media (max-width: 767px) {
  .ek-hero-slide__image {
    height: auto;
  }

  .ek-hero-slider__nav {
    top: calc(50% - 2.5rem);
    width: 40px;
    height: 88px;
  }

  .ek-hero-slider__nav-icon {
    width: 20px;
    height: 32px;
  }

  .ek-hero-slide__title {
    -webkit-line-clamp: 2;
  }

  .ek-hero-slide__overlay {
    flex-direction: column;
    align-items: flex-start;
    height: auto;
    min-height: auto;
    max-height: none;
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
  }

  .ek-hero-slide__cta.btn-primary.btn-filled {
    width: 100%;
  }
}

/* Image-less banner text/arrow contrast (EONEXT-320). */
.banner:not(.banner--has-image) .banner__description,
.banner:not(.banner--has-image) .banner__title {
  color: var(--ek-cream, #fefaf1);
}

.banner:not(.banner--has-image) .banner__description + svg .arrow__body {
  stroke: var(--ek-cream, #fefaf1);
}

.banner:not(.banner--has-image) .banner__description + svg .arrow__head {
  fill: var(--ek-cream, #fefaf1);
}

.banner--light-background:not(.banner--has-image) .banner__description,
.banner--light-background:not(.banner--has-image) .banner__title,
.banner--light-background .banner__description,
.banner--light-background .banner__title {
  color: var(--ek-navy, #1E0195);
}

.banner--light-background:not(.banner--has-image) .banner__description + svg .arrow__body,
.banner--light-background:not(.banner--has-image) .banner__title + svg .arrow__body,
.banner--light-background .banner__description + svg .arrow__body,
.banner--light-background .banner__title + svg .arrow__body {
  stroke: var(--ek-navy, #1E0195);
}

.banner--light-background:not(.banner--has-image) .banner__description + svg .arrow__head,
.banner--light-background:not(.banner--has-image) .banner__title + svg .arrow__head,
.banner--light-background .banner__description + svg .arrow__head,
.banner--light-background .banner__title + svg .arrow__head {
  fill: var(--ek-navy, #1E0195);
}

/* Long Greenlandic banner titles wrap inside the white card (EONEXT-437). */
.banner--has-image .banner__content--has-image {
  max-width: min(40rem, 88%);
}

.banner--has-image .banner__title {
  font-size: clamp(1.35rem, 2.6vw, 2.15rem);
  line-height: 1.25;
  overflow-wrap: break-word;
  hyphens: manual;
  text-wrap: balance;
}

/* ---- Language translation selector in ek-header ---- */

/* Hide the patron login/profile button — not needed on the kultur site */
.header.ek-header .header__profile-traslation-container > button {
  display: none !important;
}

/*
 * Mobile/tablet: position the translation container absolutely in the top-right of the header.
 *
 * The language UI is rendered by the patron menu React app (data-dpl-app="menu"), which
 * mounts only after menu.js loads and /dpl-react/user-tokens returns. Reserve space on
 * the empty mount node so the header does not jump when React paints.
 */
.header.ek-header .ek-header-translation {
  min-width: 70px;
  display: flex;
  align-items: center;
}

.header.ek-header .ek-header-translation [data-dpl-app="menu"] {
  display: block;
  min-width: 70px;
  min-height: 56px;
}

@media (min-width: 768px) {
  .header.ek-header .ek-header-translation {
    height: 70px;
  }

  .header.ek-header .ek-header-translation [data-dpl-app="menu"] {
    min-height: 70px;
  }
}

/* Desktop: translation sits in the toolbar next to search. */
@media (min-width: 1440px) {
  .header.ek-header .ek-header-translation {
    grid-column: 4;
    grid-row: 1;
    position: static !important;
    top: auto !important;
    right: auto !important;
    flex: 0 0 auto;
    height: auto !important;
    min-width: 70px;
    min-height: 72px;
    align-items: center;
    align-self: center;
  }
}

/* Novel burger grid rules must not collapse the kultur desktop header. */
@media (min-width: 1440px) {
  .has-burger-menu .header.ek-header,
  .has-desktop-menu .header.ek-header {
    grid-template-columns: minmax(160px, 220px) minmax(0, 1fr) auto auto !important;
  }

  .has-burger-menu .header.ek-header .header__logo-desktop {
    display: flex !important;
  }

  .has-burger-menu .header.ek-header .header__menu-navigation {
    position: static;
    visibility: visible;
    top: auto;
  }

  .has-burger-menu .header.ek-header .header__menu-navigation-mobile {
    display: none !important;
  }
}

/* Translation widget — fix vertical centering */
.header.ek-header .header__profile-traslation-container {
  display: flex;
  align-items: center;
  pointer-events: auto;
}

.header.ek-header .header__translations {
  display: flex;
  align-items: center;
  height: 100%;
}

.header.ek-header .header__translations-wrapper {
  width: 70px !important;
  height: 70px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Override the base library styles that push content to the bottom */
.header.ek-header .header__translations-button {
  justify-content: center !important;
  align-self: center !important;
  padding-bottom: 0 !important;
}
