/* =============================================================================
   Tables
   ========================================================================== */

/* table styling lives in firstload.css */

.ios-scrollbar {
  padding-bottom: 20px;
  position: relative;
}

.ios-scrollbar::after {
  content: '\f178';
  font-family: 'FaLight', sans-serif;
  font-size: 15px;
  line-height: 100%;
  position: absolute;
  right: 0;
  bottom: 0;
}


/* =============================================================================
   Standard contentelements
   ========================================================================== */

/* Uploads */
.uploads__item {
  background-color: rgb(var(--c-neutral-lighter));
}

.content .frame-bg-grey .uploads__item,
.content > .frame:nth-child(2n) .uploads__item {
  background-color: rgb(var(--c-neutral-lightest));
}

.uploads__link {
  color: rgb(var(--c-neutral-dark));
}

.uploads__title {
  color: rgb(var(--c-primary));
  font-size: var(--f-size-l-1);
}

.uploads__arrowpath {
  stroke: rgb(var(--c-primary));
}

@media (hover: hover) {
  .content .frame-bg-grey .uploads__item:hover,
  .content > .frame:nth-child(2n) .uploads__item:hover,
  .uploads__item:hover {
    background-color: rgb(var(--c-primary));
  }

  .uploads__item:hover,
  .uploads__item:hover .uploads__description,
  .uploads__item:hover .uploads__title {
    color: rgb(var(--c-neutral-lightest));
  }

  .uploads__item:hover .uploads__arrowpath {
    stroke: rgb(var(--c-neutral-lightest));
  }
}

/* Menus */
.frame-type-menu_pages li a,
.frame-type-menu_sitemap li a {
  color: rgb(var(--c-neutral-dark));
}

/* Paginator */
ul.f3-widget-paginator {
  padding: 0;
  display: flex;
  flex-wrap: wrap;
}

ul.f3-widget-paginator li {
  list-style-type: none;
  width: 40px;
  height: 40px;
  margin: 0 5px 5px 0;
  background: rgb(var(--c-neutral-lighter));
  display: flex;
  justify-content: center;
  align-items: center;
}

ul.f3-widget-paginator a {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  width: 100%;
}

ul.f3-widget-paginator li.current {
  background: rgb(var(--c-primary));
  color: rgb(var(--c-neutral-lightest));
}

ul.f3-widget-paginator li.current a {
  color: rgb(var(--c-neutral-lightest));
}

@media (hover: hover) {
  ul.f3-widget-paginator li:hover {
    background: rgb(var(--c-primary));
    color: rgb(var(--c-neutral-lightest));
  }

  ul.f3-widget-paginator li:hover a {
    color: rgb(var(--c-neutral-lightest));
  }
}

ul.f3-widget-paginator li.previous a::after {
  content: '\f053';
  font-family: 'FaLight', sans-serif;
  font-weight: normal;
  font-style: normal;
  text-decoration: inherit;
  -webkit-font-smoothing: antialiased;
  height: auto;
  line-height: normal;
  vertical-align: baseline;
  font-size: var(--f-size);
}

ul.f3-widget-paginator li.next a::after {
  content: '\f054';
  font-family: 'FaLight', sans-serif;
  font-weight: normal;
  font-style: normal;
  text-decoration: inherit;
  -webkit-font-smoothing: antialiased;
  height: auto;
  line-height: normal;
  vertical-align: baseline;
  font-size: var(--f-size);
}

/* elfsight */
.flipbook-placeholder {
  display: flex;
  flex-direction: column;
  align-content: center;
  align-items: center;
  gap: 2rem;
}

.flipbook-placeholder img {
  width: 400px;
}

.flipbook-placeholder button {
  margin-top: 1rem;
}


/* =============================================================================
   Menus
   ========================================================================== */

/* Metanav */
.metanav {
  background: rgb(var(--c-neutral-darkest));
  text-align: center;
}

.metanav__link {
  color: rgb(var(--c-neutral-lightest));
  text-transform: uppercase;
  font-size: 20px;
  font-weight: var(--f-weight-sb);
  margin: 0 20px;
}

@media (hover: hover) {
  .metanav__link:hover {
    color: rgb(var(--c-neutral-lightest));
  }
}

.metanav__nav {
  padding: 0.3rem 2rem;
}

/* =============================================================================
   Video embeds
   ========================================================================== */

/* The ratio has to live on the wrapper, not the iframe: the cookie consent script (CCM19)
   writes the iframe height back as an inline style — measured too early, so it freezes a
   height that belongs to a narrower layout. An inline height beats aspect-ratio, hence the
   !important on the iframe; the wrapper is what defines the ratio. */
.gallery__item.-video,
.media__video,
.video-embed {
  position: relative;
  aspect-ratio: 16 / 9;
}

.gallery__item.-video iframe,
.media__video iframe,
.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100% !important;
  max-height: 100%;
}

/* =============================================================================
   Footer
   ========================================================================== */

.footer {
  overflow: hidden;
  padding-bottom: var(--p);
  background: rgb(var(--c-primary));
}

.footer h1,
.footer h2,
.footer h3,
.footer h4,
.footer p,
.footer a,
.footer .frame-type-menu_pages li a {
  color: rgb(var(--c-neutral-lightest));
  text-transform: none;
}

.footer h1,
.footer h2,
.footer h3,
.footer h4 {
  font-size: 22px;
  font-weight: var(--f-weight-sb);
}

.footer p {
  font-size: 15px;
}

@media (hover: hover) {
  .footer a:hover {
    color: rgb(var(--c-neutral-lightest));
  }
}

.footer .font__button,
.footer .textbutton,
.footer input[type="submit"] {
  text-transform: none;
  color: rgb(var(--c-neutral-lightest));
  line-height: 1.4;
  padding: 0.3rem 1rem;
  border: none;
}

.footer .newsletterregistration .font__button,
.footer .newsletterregistration .newsletterregistration__submit,
.footer .newsletterregistration input[type="submit"] {
  min-width: 0;
  background: rgb(var(--c-neutral-darkest));
  padding: 0.5rem 1rem;
}

.footer .newsletterregistration__mail {
  outline: none;
  border: none;
  margin: 0;
  padding: 0 1rem;
  width: auto;
  line-height: 2.4;
}

.footer .ce-column img,
.footer .gallery__item img {
  width: 100%;
  max-width: 220px;
}

.footer #c9916 .gallery__item:last-child img {
  width: 100px;
  height: 100px;
}

/* =============================================================================
   Forms
   ========================================================================== */

input,
select,
textarea {
  border: 1px solid rgb(var(--c-neutral-light));
  padding: calc(0.6rem - 1px) 0.6rem;
  margin: 0 0 0.5rem 0;
  line-height: 1.4;
}

/* =============================================================================
   Media Queries
   ========================================================================== */

/* Frame variants
   ========================================================================== */

.frame-roundimage img {
  overflow: hidden;
  border: 1px solid rgb(var(--c-neutral-lighter));
  border-radius: 50%;
}

/* Text indent */

.frame-textindent {
  max-width: 920px;
  margin-left: auto;
  margin-right: auto;
}

/* Image gallery */

.frame-imagegallery {
  & .gallery {
    display: grid;
    grid-template-columns: 1fr;
    grid-gap: 14px;
    grid-auto-flow: dense;
  }

  & .gallery__item {
    position: relative;
    width: 100%;
    height: 100%;
    max-height: 360px;
    overflow: hidden;
  }

  & .gallery__item picture,
  & .gallery__item a {
    width: 100%;
    height: 100%;
  }

  & .gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s ease 0s;
  }

  & .gallery__item::before {
    content: '';
    position: absolute;
    bottom: -140px;
    left: -50px;
    right: -50px;
    width: calc(100% + 100px);
    height: 180px;
    background: linear-gradient(to bottom, rgba(var(--c-neutral-darkest), 1) 0%, rgba(var(--c-neutral-darkest), 0) 100%);
    filter: blur(50px);
  }

  & .gallery__caption {
    position: absolute;
    bottom: 5%;
    z-index: 1;
    text-align: center;
    transform: translateY(10%);
  }

  & .imagebutton__title {
    position: relative;
    padding: 16px 12px;
    border: none;
    line-height: 1.4;
    font-size: 18px;
    font-style: normal;
    color: rgb(var(--c-neutral-lightest));
  }
}

@media (hover: hover) {
  .frame-imagegallery .gallery__item a:hover img {
    transform: scale(1.2);
  }
}

/* Teams */

.frame-mannschaft {
  & .gallery {
    display: grid;
    grid-template-columns: 1fr;
    grid-gap: 10px;
    overflow: hidden;
  }

  & .gallery__item {
    position: relative;
    overflow: hidden;
    margin-bottom: 0;
    box-sizing: border-box;
    border: 1px solid rgb(var(--c-neutral-light));
    object-fit: cover;
  }

  & .gallery__caption {
    padding: 0.75rem;
    background: rgb(var(--c-neutral-lighter));
  }

  & .imagebutton__mann__title {
    position: relative;
    border: none;
    line-height: 1.4;
    font-size: var(--f-size);
    font-style: normal;
    text-transform: uppercase;
    color: rgb(var(--c-neutral-dark));
  }

  & .imagebutton__mann__text {
    position: relative;
    border: none;
    line-height: 1.4;
    font-size: var(--f-size-s-1);
    font-style: normal;
    color: rgb(var(--c-neutral-dark));
  }

  & .imagebutton__mann__text::after {
    content: '\f054';
    margin-left: 0.5rem;
    font-family: 'FaRegular';
    font-size: 16px;
  }
}

/* Trainer flip card */

.frame-trainer {
  & .grid__12 {
    display: block;
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.8s;
  }

  & .grid__col.-w50 {
    grid-column: 1 / -1;
    width: 100%;
    backface-visibility: hidden;
  }

  & .grid__col.-w50:first-child {
    z-index: 2;
    height: 100%;
  }

  & .grid__col.-w50:nth-child(2) {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    /* live tone, one step lighter than the grey container it sits on */
    background-color: rgb(241, 241, 241);
    transform: rotateY(180deg);
    opacity: 0;
    transition: opacity ease 0.8s;
  }

  & .gallery,
  & .gallery__item,
  & .image {
    overflow: visible;
  }

  & picture::after {
    content: '+';
  }

  & .grid__col.-w50:nth-child(2) > .frame::after {
    content: '-';
  }

  & picture::after,
  & .grid__col.-w50:nth-child(2) > .frame::after {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translate(-50%, 50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgb(var(--c-primary-light));
    color: rgb(var(--c-neutral-lightest));
    font-size: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
  }
}

@media (hover: hover) {
  .frame-trainer:hover .grid__12 {
    transform: rotateY(180deg);
  }

  .frame-trainer:hover .grid__col.-w50:nth-child(2) {
    opacity: 1;
  }
}

/* Trainer row: the fourth column stays empty, the offset centers the cards optically */

.frame-trainerWrap > .grid__12 {
  width: 100%;
}

@media (min-width: 801px) {
  .frame-trainerWrap > .grid__12 {
    margin-left: 96px;
  }

  .frame-trainerWrap .grid__col.-w25 {
    grid-column: span 3;
  }
}

@media (min-width: 901px) {
  .frame-trainerWrap > .grid__12 {
    margin-left: 144px;
  }
}

@media (min-width: 1321px) {
  .frame-trainerWrap > .grid__12 {
    margin-left: 192px;
  }
}

/* Media Queries */

@media (min-width: 640px) {
  /* Footer */
  .footer p {
    font-size: 18px;
  }

  .frame-imagegallery .gallery {
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 1fr);
  }

  .frame-imagegallery .gallery__item:first-child { grid-column: 1 / 3; grid-row: 1; }
  .frame-imagegallery .gallery__item:nth-child(2) { grid-column: 3 / 4; grid-row: 1; }
  .frame-imagegallery .gallery__item:nth-child(3) { grid-column: 4 / 5; grid-row: 1; }
  .frame-imagegallery .gallery__item:nth-child(4) { grid-column: 1 / 3; grid-row: 2; }
  .frame-imagegallery .gallery__item:nth-child(5) { grid-column: 3 / 5; grid-row: 2; }

  .frame-mannschaft .gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 800px) {
  .frame-mannschaft .imagebutton__mann__title {
    font-size: var(--f-size-l-2);
  }

  .frame-mannschaft .imagebutton__mann__text {
    font-size: var(--f-size-l-1);
  }

  .frame-mannschaft .gallery {
    grid-template-columns: repeat(3, 1fr);
  }

  /* elfsight */
  .flipbook-placeholder {
    display: flex;
    flex-direction: row;
    max-width: 500px;
    margin: 0 auto;
  }

  .flipbook-placeholder img {
    width: 200px;
  }

}

@media (min-width: 1024px) {
  .frame-imagegallery .imagebutton__title {
    font-size: 24px;
  }

  .frame-mannschaft .gallery {
    grid-template-columns: repeat(4, 1fr);
  }

  .frame-mannschaft .gallery__item:nth-child(13) {
    grid-column: 2;
  }
}

@media (min-width: 1530px) {
  .frame-imagegallery .imagebutton__title {
    font-size: 32px;
  }
}
