/*! HTML5 Boilerplate v8.0.0 | MIT License | https://html5boilerplate.com/ */

/* main.css 2.1.0 | MIT License | https://github.com/h5bp/main.css#readme */
/*
 * What follows is the result of much research on cross-browser styling.
 * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
 * Kroc Camen, and the H5BP dev community and team.
 */

/* ==========================================================================
   Base styles: opinionated defaults
   ========================================================================== */

html {
  color: #222;
  font-size: 1em;
  line-height: 1.4;
  box-sizing: border-box;
}
*, *:before, *:after {
  box-sizing: inherit;
}

/*
 * Remove text-shadow in selection highlight:
 * https://twitter.com/miketaylr/status/12228805301
 *
 * Vendor-prefixed and regular ::selection selectors cannot be combined:
 * https://stackoverflow.com/a/16982510/7133471
 *
 * Customize the background color to match your design.
 */

::-moz-selection {
  background: #b3d4fc;
  text-shadow: none;
}

::selection {
  background: #b3d4fc;
  text-shadow: none;
}

/*
 * A better looking default horizontal rule
 */

hr {
  display: block;
  height: 1px;
  border: 0;
  border-top: 1px solid #ccc;
  margin: 1em 0;
  padding: 0;
}

/*
 * Remove the gap between audio, canvas, iframes,
 * images, videos and the bottom of their containers:
 * https://github.com/h5bp/html5-boilerplate/issues/440
 */

audio,
canvas,
iframe,
img,
svg,
video {
  vertical-align: middle;
}

/*
 * Remove default fieldset styles.
 */

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

/*
 * Allow only vertical resizing of textareas.
 */

textarea {
  resize: vertical;
}

/* ==========================================================================
   Author's custom styles
   ========================================================================== */

:root {
  --blue: #164294;
  --grey: #EAEAEC;
}   

h2 {
  color: var(--blue);
}


.root {
  font-family: fira-sans, Segoe UI,SegoeUI,"Helvetica Neue",Helvetica,Arial,sans-serif;
  padding-bottom: 9rem;
  font-display: swap;

}   

.header {
  background: var(--blue) url(../img/dpolg-stern.svg) no-repeat;
  background-size: 130%;
  background-position: -90% -80%;
  padding: 2rem;
}

.header--short {
  background-size: contain;
  background-position: top right;
}

.carousel {
  width: 100%;
}

.carousel-item {
  width: 100%;
}

.carousel-item__headline h2, .carousel-item__headline h3 {
  margin: 0;
  background: #fff;
  padding: .5rem 1rem;
  color: var(--blue);
  justify-self: start;
  align-self: stretch;
  float: left;
  clear: both;
  margin-bottom: 1rem;
}

.carousel-item__headline h2 {
  font-size: 1.7rem;
  font-weight: 900;
  text-transform: uppercase;
  font-kerning: normal;
  letter-spacing: .05em;
}

.carousel-item__headline h3 {
  font-size: 1.5rem;
  font-weight: 700;
  font-kerning: normal;
  letter-spacing: .05em;
  font-style: italic;
}

.carousel-item__image {
  width: 50vw;
  max-width: 19rem;
  height: auto;
  padding: 0;
  margin: -1.5rem 1rem 1rem 0;
  float: right;
  transform: rotate(7deg);
  -webkit-transform: rotate(7deg);
  -moz-transform: rotate(7deg);
  -ms-transform: rotate(7deg);
  -o-transform: rotate(7deg);
  box-shadow: 0 8px 6px -6px rgba(0,0,0,0.75);
}

.carousel-item__image img {
  width: 100%;
  height: auto;
}

.carousel-item__image p {
  background: #fff;
  margin: 0;
  padding: .5rem 0;
  text-align: center;
  font-weight: bold;
  color: var(--blue);
  margin-top: -1px;
}

.carousel-item__text {
  clear: both;
  font-weight: 700;
  font-style: italic;
  color: #fff;
}

.main {
  padding: 2rem;
}

.intro-text__image {
  float: left;
  margin: 0 1rem 0 0;
  width: 35vw;
  max-width: 13rem;
  font-size: .75rem;
  border: 5px solid #fff;
  transform: rotate(-3deg);
  -webkit-transform: rotate(-3deg);
  -moz-transform: rotate(-3deg);
  -ms-transform: rotate(-3deg);
  -o-transform: rotate(-3deg);
  box-shadow: 0 8px 10px -6px rgba(0,0,0,0.75);
}

.intro-text__image img {
  width: 100%;
  height: auto;
}

.card {
  background: var(--grey);
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 8px 10px -6px rgba(0,0,0,0.75);
  position: relative;
  margin-top: 2rem;
}

.card:before {
  text-align: center;
  content: "";
  display: inline-block;
  width: 3rem;
  height: 3rem;
  background: var(--blue);
  position: absolute;
  top: 0;
  left: calc(50% - 1.5rem);
  margin-top: -1.5rem;
  border-radius: 100%;
  -webkit-border-radius: 100%;
  -moz-border-radius: 100%;
  -ms-border-radius: 100%;
  -o-border-radius: 100%;
}

article h2 {
  margin-top: 2rem;
}

article  h2:first-child {
  margin-top: 0;
}

.footer {
  background: var(--grey);
  padding: 2rem;
  text-align: center;
}

.footer-links {
  text-align: center;
  margin-bottom: 1rem;
}

.footer-links__link {
  font-weight: bold;
  text-decoration: none;
  color: var(--blue);
  padding: 0 .5em;
}

.social-links {
  margin-bottom: 1rem;
}

.social-links a {
  display: inline-block;
  width: 2.5rem;
  height: 2.5rem;
  margin: .5rem;
}

.social-links a img{
  width: 100%;
  height: auto;
}



.box {
  background: var(--grey);
  box-shadow: 0 8px 10px -6px rgba(0,0,0,0.75);
  position: fixed;
  padding: 0.5rem;
  display: flex;
  flex-direction: row;
  align-items: center;
  text-align: center;
  font-size: .75rem;
}

.box--facebook-frame {
  display: grid;
  grid-template-columns: 35% 1fr;
  left: 0;
  bottom: 0;
  width: 100%;
  box-shadow: 0 -8px 10px -6px rgba(0,0,0,0.75);
}

.box__image {
  grid-row-start: 1;
  grid-row-end: 3;
  grid-column-start: 1;
  grid-column-end: 1;
  justify-self: stretch;
}

.box__button {
  grid-row-start: 2;
  grid-column-start: 2;
  place-self: center;
}

.box--facebook-frame img {
  width: auto;
  max-width: 7.5rem;
}

/* BUTTONS */
.button {
  padding: .5em 1em;
  background: #fff;
  border-radius: 20px;
  -webkit-border-radius: 20px;
  -moz-border-radius: 20px;
  -ms-border-radius: 20px;
  -o-border-radius: 20px;
  text-decoration: none;
  font-weight: bold;
}

.button--blue {
  background: var(--blue);
  color: #fff;
}

/* Externe Inhalte */

.CookieDeclaration {
  width: 100%;
  max-width: 60rem;
  margin: 1rem auto auto auto;
  padding: 1.5rem;
  background: var(--grey);
}


.flickity-page-dots .dot {
  width: 12px;
  height: 12px;
  opacity: 1;
  background: transparent;
  border: 2px solid white;
}

.flickity-page-dots .dot.is-selected {
  background: white;
}


/* ==========================================================================
   Helper classes
   ========================================================================== */

/*
 * Hide visually and from screen readers
 */

.hidden,
[hidden] {
  display: none !important;
}

/*
 * Hide only visually, but have it available for screen readers:
 * https://snook.ca/archives/html_and_css/hiding-content-for-accessibility
 *
 * 1. For long content, line feeds are not interpreted as spaces and small width
 *    causes content to wrap 1 word per line:
 *    https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe
 */

.sr-only {
  border: 0;
  clip: rect(0, 0, 0, 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
  /* 1 */
}

/*
 * Extends the .sr-only class to allow the element
 * to be focusable when navigated to via the keyboard:
 * https://www.drupal.org/node/897638
 */

.sr-only.focusable:active,
.sr-only.focusable:focus {
  clip: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  position: static;
  white-space: inherit;
  width: auto;
}

/*
 * Hide visually and from screen readers, but maintain layout
 */

.invisible {
  visibility: hidden;
}

/*
 * Clearfix: contain floats
 *
 * For modern browsers
 * 1. The space content is one way to avoid an Opera bug when the
 *    `contenteditable` attribute is included anywhere else in the document.
 *    Otherwise it causes space to appear at the top and bottom of elements
 *    that receive the `clearfix` class.
 * 2. The use of `table` rather than `block` is only necessary if using
 *    `:before` to contain the top-margins of child elements.
 */

.clearfix::before,
.clearfix::after {
  content: " ";
  display: table;
}

.clearfix::after {
  clear: both;
}

/* ==========================================================================
   EXAMPLE Media Queries for Responsive Design.
   These examples override the primary ('mobile first') styles.
   Modify as content requires.
   ========================================================================== */

@media only screen and (min-width: 35em) {

  .header {
    background: var(--blue) url(../img/dpolg-stern.svg) no-repeat;
    background-size: 50%;
    background-position: 120% 100%;
  } 

  .carousel, .main {
    width: 100%;
    max-width: 60rem;
    margin: 0 auto;
  }

  .carousel-item {
    display: grid;
    grid-template-columns: 60% 1fr;
    grid-template-rows: 65% 1fr;
    grid-gap: 2rem;
  }

  .carousel-item__headline {
    grid-row-start: 1;
    grid-row-end: 2;
    grid-column-start: 1;
    grid-column-end: 2;

  }

  .carousel-item__image {
    grid-row-start: 1;
    grid-row-end: 3;
    grid-column-start: 2;
    grid-column-end: 3;
    float: none;
    margin: 0;
    align-self: center;
  }

  .carousel-item__text {
    grid-row-start: 2;
    grid-row-end: 3;
    grid-column-start: 1;
    grid-column-end: 2;
  }

  .carousel-item__headline h2 {
    font-size: 3.75rem;
    font-weight: 900;
    text-transform: uppercase;
    font-kerning: normal;
    letter-spacing: .05em;
  }
  
  .carousel-item__headline h3 {
    font-size: 3.5rem;
    font-weight: 700;
    font-kerning: normal;
    letter-spacing: .05em;
    font-style: italic;
    display: inline-block;
  }

  .main {
    padding: 2rem 0 2rem 0;
  }

  .cards {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-gap: 1rem;
  }

  .box {
    background: var(--grey);
    box-shadow: 0 8px 10px -6px rgba(0,0,0,0.75);
    position: fixed;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    font-size: .75rem;
  }

  .box--facebook-frame {
    width: 14rem;
    left: 0;
    top: 50%;
    bottom: auto;
  }

  .box--facebook-frame img {
    width: 100%;
    max-width: 7.5rem;
  }

}

@media only screen and (max-width: 35em) {
  .box--facebook-frame {
    transform: translate3d(-100%, 0, 0);
    -webkit-transform: translate3d(-100%, 0, 0);
    -moz-transform: translate3d(-100%, 0, 0);
    -ms-transform: translate3d(-100%, 0, 0);
    -o-transform: translate3d(-100%, 0, 0);
    transition: transform 0.5s ease-out;
    -webkit-transition: transform 0.5s ease-out;
    -moz-transition: transform 0.5s ease-out;
    -ms-transition: transform 0.5s ease-out;
    -o-transition: transform 0.5s ease-out;
}

  .box--facebook-frame.box--in {
    transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0)  ;
    -moz-transform: translate3d(0, 0, 0)  ;
    -ms-transform: translate3d(0, 0, 0)  ;
    -o-transform: translate3d(0, 0, 0)  ;
}

}

@media print,
  (-webkit-min-device-pixel-ratio: 1.25),
  (min-resolution: 1.25dppx),
  (min-resolution: 120dpi) {
  /* Style adjustments for high resolution devices */
}

/* ==========================================================================
   Print styles.
   Inlined to avoid the additional HTTP request:
   https://www.phpied.com/delay-loading-your-print-css/
   ========================================================================== */

@media print {
  *,
  *::before,
  *::after {
    background: #fff !important;
    color: #000 !important;
    /* Black prints faster */
    box-shadow: none !important;
    text-shadow: none !important;
  }

  a,
  a:visited {
    text-decoration: underline;
  }

  a[href]::after {
    content: " (" attr(href) ")";
  }

  abbr[title]::after {
    content: " (" attr(title) ")";
  }

  /*
   * Don't show links that are fragment identifiers,
   * or use the `javascript:` pseudo protocol
   */
  a[href^="#"]::after,
  a[href^="javascript:"]::after {
    content: "";
  }

  pre {
    white-space: pre-wrap !important;
  }

  pre,
  blockquote {
    border: 1px solid #999;
    page-break-inside: avoid;
  }

  /*
   * Printing Tables:
   * https://web.archive.org/web/20180815150934/http://css-discuss.incutio.com/wiki/Printing_Tables
   */
  thead {
    display: table-header-group;
  }

  tr,
  img {
    page-break-inside: avoid;
  }

  p,
  h2,
  h3 {
    orphans: 3;
    widows: 3;
  }

  h2,
  h3 {
    page-break-after: avoid;
  }
}

