/*!
 * Biogas2020: fristående stilmall / standalone site stylesheet
 *
 * For the restored WordPress site (theme "stella" by Raket Webbyrå, with
 * Visual Composer). Pages load /wp-content/themes/stella/assets/css/app.css;
 * upload this file at that address with the MIME type text/css. No page
 * needs to be edited.
 *
 * Look: Scandinavian renewable energy. A fresh green for headings and
 * buttons, deep forest green for the menu bar and footer, Red Hat Display
 * and Red Hat Text (both with å ä ö), photo cards, and a cluster of rising
 * "biogas bubbles" in the corner of the header picture.
 *
 * Works without the theme's scripts: the phone menu and translation menu
 * are not needed, blocks that Visual Composer fades in are always visible,
 * and buttons placed inside card links let the click reach the link.
 * Colours and sizes are in the tokens in section 1.
 */

@import url("https://fonts.googleapis.com/css2?family=Red+Hat+Display:wght@500;700;800&family=Red+Hat+Text:wght@400;500;700&display=swap");


/* ==========================================================================
   1. Tokens
   ========================================================================== */

:root {
  --bg-green: #2e7d4f;             /* headings, buttons */
  --bg-green-bright: #6cbf4a;      /* decorative */
  --bg-forest: #123c2e;            /* menu bar, footer */
  --bg-forest-2: #1b4d3c;
  --bg-mist: #f2f6f3;
  --bg-paper: #ffffff;
  --bg-line: #dde6e0;

  --bg-ink: #1d2a24;
  --bg-ink-soft: #55635c;
  --bg-on-forest: #d6e6dc;

  --bg-font-head: "Red Hat Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --bg-font-text: "Red Hat Text", "Segoe UI", "Helvetica Neue", Arial, sans-serif;

  --bg-container: 1140px;
  --bg-gutter: clamp(1rem, 4vw, 2rem);
  --bg-radius: 10px;
  --bg-shadow: 0 2px 4px rgba(18, 60, 46, 0.05), 0 16px 32px -20px rgba(18, 60, 46, 0.45);
}


/* ==========================================================================
   2. Base
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--bg-font-text);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--bg-ink);
  background: var(--bg-paper);
  -webkit-font-smoothing: antialiased;
}

img,
iframe {
  max-width: 100%;
}

img {
  height: auto;
  border: 0;
  vertical-align: middle;
}

a {
  color: var(--bg-green);
  text-decoration: none;
}

a:hover {
  color: var(--bg-forest);
}

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 0.5em;
  font-family: var(--bg-font-head);
  font-weight: 700;
  line-height: 1.2;
  color: var(--bg-ink);
}

p {
  margin: 0 0 1em;
}

p:empty {
  display: none;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

hr {
  height: 1px;
  margin: 1rem 0;
  border: 0;
  background: rgba(255, 255, 255, 0.18);
}

.container {
  width: 100%;
  max-width: calc(var(--bg-container) + 2 * var(--bg-gutter));
  margin: 0 auto;
  padding: 0 var(--bg-gutter);
}

.container .container {
  max-width: none;
  padding: 0;
}

.theme-color {
  color: var(--bg-green);
}

.preheader {
  margin: 0 0 0.35rem;
  font-family: var(--bg-font-text);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bg-ink-soft);
}

::selection {
  color: #ffffff;
  background: var(--bg-green);
}

:focus-visible {
  outline: 2px solid var(--bg-green);
  outline-offset: 3px;
}


/* ==========================================================================
   3. Parts that need the theme's scripts, or lead nowhere
   ========================================================================== */

#navigation > .top,                /* "Inloggning för parter" and "Översätt" have no working links */
#mobile-toggle,
.search-btn,
.header-line .line-wrap,
.wpb_text_column:not(:has(.wpb_wrapper > *)),
.wpb_heading:empty,
.raket-code > h3:empty,
.social,
figure:empty,
.arrow {
  display: none !important;
}

/* Visual Composer fades these in with a script */
.wpb_animate_when_almost_visible {
  opacity: 1 !important;
}


/* ==========================================================================
   4. Header and menu
   ========================================================================== */

#navigation {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-paper);
  box-shadow: 0 1px 0 var(--bg-line), 0 8px 20px -16px rgba(18, 60, 46, 0.5);
}

#navigation > .container > .row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  min-height: 76px;
  padding-block: 0.6rem;
}

#logo img {
  display: block;
  width: auto;
  max-height: 52px;
}

/* Interreg logo beside the site logo */
#navigation > .container > .row > img {
  width: auto;
  max-height: 44px;
  padding-left: 1.25rem;
  border-left: 1px solid var(--bg-line);
}

.nav-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-left: auto;
}

#menu-primary-navigation {
  display: flex;
  flex-wrap: wrap;
}

#menu-primary-navigation a {
  display: block;
  padding: 0.6rem 0.8rem;
  font-family: var(--bg-font-head);
  font-size: 1rem;
  font-weight: 700;
  color: var(--bg-ink);
  border-radius: 6px;
}

#menu-primary-navigation a:hover {
  color: var(--bg-green);
  background: var(--bg-mist);
}

/* Search box (always open; the theme's button only toggled it) */
#search-form {
  position: relative;
  order: 2;
  margin: 0;
}

#search-form .search-icon {
  display: none;
}

#search-form::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0.75rem;
  width: 0.95rem;
  height: 0.95rem;
  margin-top: -0.475rem;
  background: var(--bg-ink-soft);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='m15.5 15.5 5 5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='m15.5 15.5 5 5'/%3E%3C/svg%3E") center / contain no-repeat;
}

#search-form .search-input {
  width: 13rem;
  height: 2.4rem;
  padding: 0 0.9rem 0 2.2rem;
  font: inherit;
  font-size: 0.95rem;
  color: var(--bg-ink);
  background: var(--bg-mist);
  border: 1px solid var(--bg-line);
  border-radius: 999px;
}

#search-form .search-input:focus {
  outline: none;
  border-color: var(--bg-green);
  background: var(--bg-paper);
}

@media (max-width: 1100px) {
  #search-form .search-input {
    width: 10rem;
  }
}

@media (max-width: 900px) {
  #navigation > .container > .row {
    gap: 0.5rem 1rem;
  }

  .nav-wrap {
    flex-direction: column-reverse;
    align-items: stretch;
    width: calc(100% + 2 * var(--bg-gutter));
    margin: 0 calc(-1 * var(--bg-gutter));
  }

  #search-form {
    padding: 0 var(--bg-gutter);
  }

  #search-form::before {
    left: calc(var(--bg-gutter) + 0.75rem);
  }

  #search-form .search-input {
    width: 100%;
  }

  #menu-primary-navigation {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 0 calc(var(--bg-gutter) - 0.8rem);
  }

  #menu-primary-navigation::-webkit-scrollbar {
    display: none;
  }

  #menu-primary-navigation a {
    white-space: nowrap;
  }
}

@media (max-width: 480px) {
  #navigation > .container > .row > img {
    max-height: 34px;
    padding-left: 0.75rem;
  }

  #logo img {
    max-height: 42px;
  }
}


/* ==========================================================================
   5. Header picture with bubbles
   ========================================================================== */

.intro-slider {
  position: relative;
  overflow: hidden;
}

.intro-slider .item {
  position: relative;
  display: flex;
  align-items: center;
  min-height: clamp(24rem, 52vh, 34rem);
  padding: clamp(3rem, 7vw, 5rem) 0;
  background-color: var(--bg-forest);
  background-position: center;
  background-size: cover;
}

.intro-slider .overlay {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(90deg, rgba(14, 46, 35, 0.92) 0%, rgba(14, 46, 35, 0.75) 45%, rgba(14, 46, 35, 0.15) 100%);
}

/* rising bubbles in the right-hand corner */
.intro-slider .overlay::after {
  content: "";
  position: absolute;
  right: 4%;
  bottom: 0;
  width: min(34%, 360px);
  height: 85%;
  opacity: 0.55;
  background:
    radial-gradient(circle at 70% 88%, transparent 21px, rgba(255, 255, 255, 0.7) 22px, rgba(255, 255, 255, 0.7) 24px, transparent 25px),
    radial-gradient(circle at 40% 72%, transparent 13px, rgba(255, 255, 255, 0.6) 14px, rgba(255, 255, 255, 0.6) 16px, transparent 17px),
    radial-gradient(circle at 78% 56%, transparent 9px, rgba(255, 255, 255, 0.55) 10px, rgba(255, 255, 255, 0.55) 12px, transparent 13px),
    radial-gradient(circle at 55% 40%, transparent 16px, rgba(108, 191, 74, 0.8) 17px, rgba(108, 191, 74, 0.8) 19px, transparent 20px),
    radial-gradient(circle at 30% 24%, transparent 6px, rgba(255, 255, 255, 0.5) 7px, rgba(255, 255, 255, 0.5) 9px, transparent 10px),
    radial-gradient(circle at 68% 12%, transparent 4px, rgba(255, 255, 255, 0.45) 5px, rgba(255, 255, 255, 0.45) 6.5px, transparent 7.5px);
  pointer-events: none;
}

.intro-slider .content {
  position: relative;
  z-index: 1;
  color: #ffffff;
}

.intro-slider .content > * {
  max-width: 38rem;
}

.intro-slider .preheader {
  color: var(--bg-green-bright);
}

.intro-slider .title {
  margin-bottom: 1rem;
  font-size: clamp(2rem, 1.3rem + 3vw, 3.4rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.015em;
  color: #ffffff;
}

.intro-slider .ingress {
  margin-bottom: 1.75rem;
  font-size: clamp(1.02rem, 0.98rem + 0.25vw, 1.15rem);
  color: rgba(255, 255, 255, 0.9);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.6rem;
  font-family: var(--bg-font-head);
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  background: var(--bg-green);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.btn:hover {
  color: #ffffff;
  background: var(--bg-forest-2);
}

.btn.inverted {
  color: var(--bg-forest);
  background: #ffffff;
}

.btn.inverted:hover {
  color: var(--bg-forest);
  background: var(--bg-green-bright);
}

@media (max-width: 700px) {
  .intro-slider .overlay {
    background: rgba(14, 46, 35, 0.82);
  }

  .intro-slider .overlay::after {
    width: 45%;
    height: 45%;
    opacity: 0.35;
  }
}


/* ==========================================================================
   6. Main content: rows, cards, video
   ========================================================================== */

#main {
  padding-bottom: clamp(2rem, 5vw, 3.5rem);
}

#main > .container > .row > article.wordpress-content {
  display: block;
}

#main > .vc_row,
#main > .container {
  margin-top: clamp(2rem, 4vw, 3rem);
}

/* Visual Composer columns */
.wpb_row {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(1.25rem, 3vw, 2rem);
}

.wpb_row > .vc_col-sm-12 { grid-column: span 12; }
.wpb_row > .vc_col-sm-8  { grid-column: span 8; }
.wpb_row > .vc_col-sm-4  { grid-column: span 4; }

/* equal card heights only in the rows the theme marks for it */
.equal-heights .wpb_column > .wpb_wrapper {
  height: 100%;
}

@media (max-width: 900px) {
  .wpb_row > .vc_col-sm-8,
  .wpb_row > .vc_col-sm-4 {
    grid-column: span 12;
  }

  .equal-heights .wpb_row > .vc_col-sm-4 {
    grid-column: span 6;
  }
}

@media (max-width: 600px) {
  .equal-heights .wpb_row > .vc_col-sm-4 {
    grid-column: span 12;
  }
}

/* Photo cards (each whole card is a link) */
.equal-heights .page-block.block {
  height: 100%;
}

.page-block.block {
  overflow: hidden;
  background: var(--bg-paper);
  border: 1px solid var(--bg-line);
  border-radius: var(--bg-radius);
  box-shadow: var(--bg-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.page-block.block:has(> a):hover {
  transform: translateY(-3px);
  box-shadow: 0 2px 4px rgba(18, 60, 46, 0.05), 0 22px 40px -20px rgba(18, 60, 46, 0.5);
}

.page-block.block > a {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
}

.page-block .image {
  margin: 0;
  overflow: hidden;
}

.page-block .image img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.page-block .content {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.25rem 1.4rem 1.5rem;
}

.page-block .header {
  font-size: 1.3rem;
  line-height: 1.25;
}

.page-block .text,
.page-block .content > p {
  font-size: 0.98rem;
  color: var(--bg-ink-soft);
}

/* a <button> sits inside the card link; let the click reach the link */
.page-block .btn.text {
  align-self: flex-start;
  margin-top: auto;
  padding: 0;
  font-size: 0.98rem;
  color: var(--bg-green);
  background: none;
  border-radius: 0;
  pointer-events: none;
}

.page-block .btn.text i {
  display: none;
}

.page-block .btn.text::after {
  content: " →";
}

.page-block:hover .btn.text {
  color: var(--bg-forest);
  text-decoration: underline;
}

/* The project-ended notice: picture beside the text */
.wordpress-content .page-block.block:not(:has(> a)) {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  align-items: center;
  margin-bottom: 1.5rem;
  border-left: 5px solid var(--bg-green);
}

.wordpress-content .page-block.block:not(:has(> a)) .image img {
  height: 100%;
  min-height: 12rem;
}

.wordpress-content .page-block.block:not(:has(> a)) .content {
  padding: 1.5rem 1.75rem;
}

.wordpress-content .page-block.block:not(:has(> a)) .text {
  font-size: 1.05rem;
  color: var(--bg-ink);
}

@media (max-width: 700px) {
  .wordpress-content .page-block.block:not(:has(> a)) {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Wide feature blocks: text beside a picture */
.page-block.large {
  overflow: hidden;
  background: var(--bg-mist);
  border-radius: var(--bg-radius);
}

.page-block.large > a {
  display: block;
  color: inherit;
}

.page-block.large .table-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;
  font-family: var(--bg-font-head);
  font-weight: 700;
  color: var(--bg-green);
}

/* the reports block holds its link text loose after the content */
.page-block.large > a .table-row {
  grid-template-columns: minmax(0, 1fr);
  padding-bottom: 1.5rem;
  padding-left: clamp(1.5rem, 4vw, 2.5rem);
}

.page-block.large > a .table-row .content {
  padding-left: 0;
}

.page-block.large > a:hover .table-row {
  color: var(--bg-forest);
}

.page-block.large .content {
  padding: clamp(1.75rem, 4vw, 2.5rem);
  font-family: var(--bg-font-text);
  font-weight: 400;
  color: var(--bg-ink);
}

.page-block.large .header {
  font-size: clamp(1.4rem, 1.15rem + 1vw, 1.9rem);
}

.page-block.large .content a {
  font-weight: 700;
}

.page-block.large .image,
.wpb_column > .image.col-6 {
  min-height: 16rem;
  background-color: var(--bg-line);
  background-position: center;
  background-size: cover;
}

/* the restore left one picture outside its block */
.wpb_column > .image.col-6 {
  margin-top: 1rem;
  border-radius: var(--bg-radius);
}

@media (max-width: 700px) {
  .page-block.large .table-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Section titles with lines */
.header-line {
  margin-bottom: 1rem;
}

.header-line .title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.header-line .title::after {
  content: "";
  flex: 1;
  height: 2px;
  background: var(--bg-line);
}

/* Video and brochure */
.wpb_video_wrapper iframe {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: var(--bg-radius);
  background: var(--bg-forest);
}

.raket-code .code iframe {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  border-radius: var(--bg-radius);
  background: var(--bg-mist);
}

.raket-code .code div[style*="margin"]:empty {
  display: none;
}


/* ==========================================================================
   7. Footer
   ========================================================================== */

.site-footer {
  color: var(--bg-on-forest);
  background: var(--bg-forest);
}

.footer-bottom {
  padding-block: clamp(2.5rem, 5vw, 3.5rem);
}

.footer-bottom .row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 2rem 3rem;
}

.footer-bottom .col-4:not(:has(h5:not(:empty))) {
  display: none;
}

.footer-bottom .col-2:has(.social) {
  display: none;
}

#logo-footer img {
  width: auto;
  max-height: 48px;
}

.footer-bottom p {
  max-width: 36rem;
  font-size: 0.95rem;
}

.site-footer .preheader {
  color: #ffffff;
}

.site-footer .nav a {
  display: block;
  padding: 0.25rem 0;
  color: var(--bg-on-forest);
}

.site-footer .nav a:hover {
  color: #ffffff;
}

.footer-end {
  padding-block: 1rem;
  font-size: 0.85rem;
  color: #a7c1b2;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-end strong {
  margin-right: 0.5rem;
  font-weight: 500;
  color: var(--bg-on-forest);
}

@media (max-width: 700px) {
  .footer-bottom .row {
    grid-template-columns: minmax(0, 1fr);
  }
}


@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }

  .page-block.block:has(> a):hover {
    transform: none;
  }
}