/*
Theme Name: Reflektieren – BNE und Demokratie
Description: Responsives Child-Theme für die Reflektieren-Lernplattform der JLU.
Template: nature-one
Version: 1.1.7
Text Domain: reflektieren-bne
*/

body {
  --bne-ink: #182b28;
  --bne-green: #205e48;
  --bne-dark: #153d34;
  --bne-blue: #294c78;
  --bne-paper: #f7f6ee;
  --bne-mint: #e6efe8;
  --bne-line: #cedbd0;
  --bne-gold: #ecd37c;
  --bne-gutter: clamp(16px, 4vw, 56px);
  --bne-shell: min(var(--bne-max-width, 76rem), calc(100% - 2 * var(--bne-gutter)));
  --bne-font: system-ui, -apple-system, "Segoe UI", sans-serif;
  min-width: 0;
  background: var(--bne-paper);
  color: var(--bne-ink);
  font: 400 var(--bne-font-size, clamp(16px, 1.25vw, 18px))/1.7 var(--bne-font);
}

body .header {
  position: relative;
  inset: auto;
  z-index: 15;
  box-sizing: border-box;
  padding: 0;
  border-top: 5px solid var(--bne-green);
  border-bottom: 1px solid var(--bne-line);
  background: var(--bne-header, var(--bne-paper));
}

body .header .header-inner,
body .middle-align {
  box-sizing: border-box;
  width: var(--bne-shell);
  max-width: none;
  margin-inline: auto;
}

body .header .header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-block: 18px;
}

body .header .header-inner > .clear { display: none; }

body .header .header-inner .logo {
  flex: 1 1 25rem;
  min-width: 0;
  max-width: 32rem;
  width: auto;
  float: none;
  margin: 0;
  padding: 0;
  text-align: start;
}

body .header .header-inner .logo > a {
  display: block;
  color: var(--bne-dark);
  font: 500 .875rem/1.45 var(--bne-font);
}

body .header .header-inner .logo > a :is(h1, h2) {
  margin: 0 0 .22em;
  padding: 0;
  color: var(--bne-dark);
  font: 760 clamp(1.05rem, 2.2vw, 1.5rem)/1.2 var(--bne-font);
  letter-spacing: -.025em;
  text-transform: none;
}

body .header .logo img { max-width: 100%; height: auto; }
body .header.bne-menu-ready .toggle { display: none; }
body .bne-menu-button { display: none; }

body .header .header-inner .nav {
  float: none;
  margin: 0;
  padding: 0;
  text-align: start;
}

body .header .header-inner .nav ul {
  float: none;
  width: auto;
  margin: 0;
  padding: 0;
  background: transparent;
  list-style: none;
  font: 650 .95rem/1.4 var(--bne-font);
}

body .header .header-inner .nav ul li {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

body .header .header-inner .nav ul li a {
  display: block;
  box-sizing: border-box;
  min-height: 44px;
  padding: .68rem .8rem;
  border-radius: .5rem;
  color: var(--bne-dark);
  font: inherit;
  text-decoration: none;
  text-transform: none;
}

body .header .header-inner .nav ul li a:is(:hover, :focus-visible),
body .header .header-inner .nav a[aria-current="page"],
body .header .header-inner .nav .current-menu-ancestor > a {
  background: var(--bne-mint);
  color: var(--bne-dark);
}

body .header .header-inner .nav ul.sub-menu li > a {
  color: var(--bne-dark);
}

body .header .header-inner .nav ul.sub-menu li > a:is(:hover, :focus-visible, [aria-current="page"]) {
  background: var(--bne-mint);
  color: var(--bne-dark);
}

body .header .nav .menu-item-has-children > a::after {
  display: inline-block;
  width: .4em;
  height: .4em;
  margin: 0 .15em .18em .55em;
  border-right: 2px solid;
  border-bottom: 2px solid;
  transform: rotate(45deg);
  content: "";
}

@media (min-width: 940px) {
  body .header .header-inner .nav { display: block !important; }
  body .header .header-inner .nav ul.menu { display: flex; flex-wrap: wrap; gap: 3px; }

  body .header .header-inner .nav ul li > ul.sub-menu {
    display: none;
    position: absolute;
    z-index: 20;
    inset: 100% auto auto 0;
    width: min(18rem, 35vw);
    padding: .35rem;
    border: 1px solid var(--bne-line);
    border-radius: .7rem;
    background: #fff;
    box-shadow: 0 10px 28px #153d3424;
  }

  body .header .header-inner .nav ul.menu > li:nth-last-child(-n+2) > ul.sub-menu {
    right: 0;
    left: auto;
  }

  body .header .header-inner .nav ul li ul li > ul.sub-menu {
    inset: 0 100% auto auto;
  }

  body .header .header-inner .nav ul li:is(:hover, :focus-within) > ul.sub-menu {
    display: block;
  }
}

@media (max-width: 939px) {
  body .header .header-inner .logo { flex: 1 1 12rem; }

  body .header.bne-menu-ready .bne-menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: .5rem .85rem;
    border: 1px solid var(--bne-green);
    border-radius: .55rem;
    background: var(--bne-dark);
    color: #fff;
    font: 700 .9rem/1.2 var(--bne-font);
    cursor: pointer;
  }

  body .header .header-inner .nav {
    flex-basis: 100%;
    width: 100%;
    height: auto;
    max-height: none;
    overflow: visible;
  }

  body .header.bne-menu-ready .header-inner .nav { display: none !important; }
  body .header.bne-menu-ready .header-inner .nav.bne-menu-open { display: block !important; }
  body .header .header-inner .nav ul.menu { padding-top: .5rem; border-top: 1px solid var(--bne-line); }

  body .header.bne-menu-ready .header-inner .nav ul.sub-menu {
    display: block;
    position: static;
    margin: 0 0 .45rem .95rem;
    padding-left: .5rem;
    border-left: 2px solid var(--bne-line);
  }

  body .header .nav .sub-menu li a::before { content: none; }
  body .header.bne-menu-ready .nav .menu-item-has-children > a::after { content: none; }
}

/* Hide Nature One's decorative stock images, keeping selected and featured images. */
body .slider-wrapper:has(#slider img[src*="/themes/nature-one/images/slides/slider1.jpg"]),
body #slider-page:has(img[src*="/themes/nature-one/images/about-banner.jpg"]),
body .feature-shadow:has(img[src*="/themes/nature-one/images/innerpage_slide_bg.png"]) {
  display: none;
}

body #slider-page {
  width: var(--bne-shell);
  margin: clamp(12px, 2.4vw, 28px) auto 0;
  border: 0;
}

body #slider-page::before,
body #slider-page::after { content: none; }
body #slider-page img { max-width: 100%; height: auto; border-radius: 1rem; }

body #sliderbody { min-width: 0; }

body .slider-wrapper {
  box-sizing: border-box;
  width: var(--bne-shell);
  margin: clamp(12px, 2.4vw, 28px) auto 0;
}

body .slider-wrapper #slider {
  height: auto !important;
  min-height: 0;
  margin: 0;
  overflow: hidden;
  border-radius: clamp(.75rem, 2vw, 1.5rem);
  background-color: var(--bne-dark);
}

body .slider-wrapper #slider .nivo-main-image {
  position: relative;
  display: block;
  width: 100% !important;
  height: auto !important;
  max-height: min(51vw, 34rem);
  object-fit: cover;
  object-position: center;
}

body .slider-wrapper .nivoSlider img { top: 0 !important; }

body .slider-wrapper .nivo-caption {
  z-index: 8;
  inset: auto 0 0;
  height: auto;
  padding: clamp(.85rem, 3vw, 2.5rem);
  background: linear-gradient(0deg, #0c251de6, #0c251d00);
  opacity: 1;
}

body .slider-wrapper .slide_info {
  inset: auto;
  box-sizing: border-box;
  width: min(100%, 41rem);
  max-width: none;
  margin: 0;
  padding: clamp(.8rem, 2.4vw, 1.65rem);
  border-radius: .75rem;
  border-left: 4px solid var(--bne-gold);
  background: #153d34;
  color: #fff;
  text-align: start;
  font: 500 clamp(.85rem, 1.5vw, 1.1rem)/1.45 var(--bne-font);
}

body .slider-wrapper .slide_info h2 {
  margin: 0 0 .35rem;
  padding: 0;
  color: #fff;
  font: 750 clamp(1.12rem, 3.6vw, 2.65rem)/1.12 var(--bne-font);
  letter-spacing: -.025em;
  text-transform: none;
}

body .slider-wrapper .slide_info p { padding: 0; color: inherit; font: inherit; }
body .slider-wrapper .nivo-controlNav { padding-block: .45rem 0; }

@media (max-width: 600px) {
  body .slider-wrapper #slider .nivo-main-image { max-height: none; }
  body .slider-wrapper .nivo-caption { position: relative; padding: 0; background: var(--bne-dark); }
  body .slider-wrapper .slide_info { width: 100%; border: 0; border-radius: 0; }
}

body .main-container,
body .content-area { background: var(--bne-paper); }

body .content-area > .middle-align {
  display: flow-root;
  padding-block: clamp(1.6rem, 4vw, 3.5rem);
}

body .content-area .entry-header { background: transparent; }

body .main-container .entry-title {
  margin: 0 0 clamp(1rem, 3vw, 2.25rem);
  padding: 0 0 .55em;
  border-bottom: 2px solid var(--bne-line);
  background: transparent;
  color: var(--bne-dark);
  text-align: start;
  font: 760 clamp(1.7rem, 4.1vw, 3.4rem)/1.12 var(--bne-font);
  letter-spacing: -.035em;
  overflow-wrap: anywhere;
  text-transform: none;
}

body .middle-align :is(#sitemain, #nosidebar) {
  box-sizing: border-box;
  min-width: 0;
  width: 100%;
  padding: 0;
}

body .middle-align #sidebar {
  box-sizing: border-box;
  width: 100%;
  margin-inline: 0;
}

/* Nature One leaves whitespace in empty sidebar wrappers. */
body .middle-align #sidebar:not(:has(> *)) { display: none; }

@media (min-width: 940px) {
  body .middle-align:has(> #sidebar > *) #sitemain { width: 69%; }
  body .middle-align #sidebar:has(> *) { width: 27%; }
}

body .entry-content {
  box-sizing: border-box;
  min-width: 0;
  margin: 0;
  padding: clamp(1rem, 3.5vw, 2.8rem);
  border: 1px solid var(--bne-line);
  border-radius: clamp(.75rem, 2vw, 1.4rem);
  background: var(--bne-surface, #fff);
  color: var(--bne-ink);
  overflow-wrap: anywhere;
  display: flow-root;
}

body .entry-content > :is(p, ul, ol) { max-inline-size: 76ch; }
body .entry-content p { font-size: inherit; line-height: inherit; }
body .entry-content > :first-child { margin-top: 0; }
body .entry-content > :last-child { margin-bottom: 0; }

body .entry-content :is(h2, h3, h4):not([class*="h5p"]) {
  color: var(--bne-dark);
  font-family: var(--bne-font);
  line-height: 1.2;
  text-transform: none;
}

body .entry-content h2 { font-size: clamp(1.35rem, 2.5vw, 2.15rem); }
body .entry-content h3 { font-size: clamp(1.12rem, 2vw, 1.55rem); }

body .entry-content a:not([class*="button"]):not([class*="h5p"]) {
  color: var(--bne-blue);
  text-decoration: underline;
  text-underline-offset: .18em;
}

body .entry-content a:not([class*="button"]):hover { color: var(--bne-green); }
body :is(.header, .entry-content, #footer, .slider-wrapper) :focus-visible {
  outline: 3px solid var(--bne-blue);
  outline-offset: 3px;
}
body :is(#footer, .slider-wrapper, .bne-menu-button):focus-visible,
body :is(#footer, .slider-wrapper) :focus-visible { outline-color: var(--bne-gold); }

body .entry-content :is(img, video) { max-width: 100%; height: auto; }
body .entry-content :is(iframe, object, embed, .wp-caption, .wp-block-embed) { box-sizing: border-box; max-width: 100%; }
body .entry-content :is(pre, .wp-block-table) { max-width: 100%; overflow-x: auto; }
body .entry-content > table { display: block; max-width: 100%; overflow-x: auto; }

@media (max-width: 600px) {
  body .entry-content :is(.alignleft, .alignright) {
    float: none;
    margin-inline: 0;
    max-width: 100%;
  }
}

body #footer.bne-footer {
  background: var(--bne-footer, var(--bne-dark));
  color: var(--bne-foot-ink, #fff);
}

body #footer .bne-footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: 1.5rem 2.5rem;
  padding-block: clamp(1.5rem, 4vw, 3rem);
}

body #footer .bne-footer-column {
  min-width: 0;
  overflow-wrap: anywhere;
}

body #footer .bne-footer-column h3 {
  margin: 0 0 .6em;
  padding: 0;
  color: inherit;
  font: 730 1.1rem/1.25 var(--bne-font);
  text-transform: none;
}

body #footer .bne-footer-column .widget { margin-block: 1.2rem 0; }
body #footer .bne-footer-column img { max-width: 100%; height: auto; }
body #footer p { margin: 0; color: inherit; }
body #footer a { color: var(--bne-foot-link, var(--bne-gold)); text-underline-offset: .17em; }

body #footer .bne-footer-bottom { border-top: 1px solid #ffffff38; }

body #footer .bne-footer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .8rem 1.5rem;
  padding-block: 1rem;
  font-size: .9em;
}

body #footer .bne-footer-meta .menu {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

body #footer .bne-footer-meta .menu a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

@media (max-width: 600px) {
  body #footer .bne-footer-meta { flex-direction: column; align-items: flex-start; }
}

body .entry-content .bne-embed-scroll {
  box-sizing: border-box;
  max-width: 100%;
  overflow-x: auto;
}

body .entry-content .bne-embed-scroll > iframe {
  display: block;
  max-width: none;
}
