/* =============================================================================
   News background frame
   ========================================================================== */

.content > .frame-bgnews,
.frame-bgnews {
  background: url(../../Images/bg_news.jpg) no-repeat center center;
  background: image-set(url(../../Images/bg_news.webp) type("image/webp"), url(../../Images/bg_news.jpg) type("image/jpeg")) no-repeat center center;
  background-size: cover;

  & > .headline :is(h1, h2) {
    color: rgb(var(--c-neutral-lightest));
  }
}

/* =============================================================================
   Latest
   ========================================================================== */

.news.-latest {
  position: relative;
  max-width: 1140px;
  margin: 0 auto;

  --swiper-navigation-size: 45px;
  --swiper-navigation-sides-offset: 0;
  --swiper-navigation-color: rgb(var(--c-primary));

  & .news__slider {
    max-width: 900px;
    margin: 0 35px;
  }

  & .swiper-wrapper {
    align-items: flex-start;
  }

  & .swiper-slide {
    height: auto;
  }

  & .article {
    display: flow-root;
    position: relative;
  }

  & .article__text {
    box-sizing: border-box;
    padding: 3em 6%;
    text-align: center;
    background: rgb(var(--c-neutral-lightest));
    border: 1px solid rgb(var(--c-neutral-lighter));
  }

  & .article__image {
    display: none;
  }

  & .article__teaser {
    margin-bottom: 1em;
  }

  & .article__more {
    display: inline;
    margin: 0;
    text-transform: uppercase;
    color: rgb(var(--c-neutral-dark));
  }

  & .swiper-button-disabled {
    display: none;
  }
}

:is(.golf, .schule, .gastro, .frame-golf, .frame-schule, .frame-gastro) .news.-latest .article__more {
  color: rgb(var(--c-primary));
}

.frame-bgnews .news.-latest {
  --swiper-navigation-color: rgb(var(--c-neutral-lightest));
}

@media (hover: hover) {
  .news.-latest .swiper-button-prev:hover,
  .news.-latest .swiper-button-next:hover {
    color: rgb(var(--c-neutral-light));
  }

  .news.-latest .article__more:hover {
    color: rgb(var(--c-primary-dark));
  }
}

/* =============================================================================
   List
   ========================================================================== */

.news.-list .article {
  margin-bottom: 3em;
}

.news.-list .article__body {
  display: flex;
  align-items: flex-start;
  gap: 1.5em;
}

.news.-list .article__image {
  /* Live: 30 % of the viewport, v12 grid__main is 94 % wide */
  flex: 0 0 32%;
  margin-bottom: 1em;
}

.news.-list .article__image img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.news.-list .article__text {
  flex: 1 1 auto;
  min-width: 0;
}

.news.-list .headline {
  margin-bottom: 0;
  text-align: left;
}

.news.-list .article__more {
  display: inline;
  margin: 0;
}

/* =============================================================================
   Footer (date and category)
   ========================================================================== */

.article__footer {
  margin-top: 15px;
  padding-top: 10px;
  line-height: 1;
  border-top: 1px solid rgb(var(--c-neutral-light));
}

.article__date,
.article__category {
  display: inline-block;
  margin-right: 8px;
  padding-right: 8px;
}

.article__date:not(:last-child) {
  border-right: 1px solid rgb(var(--c-neutral-light));
}

/* =============================================================================
   Detail
   ========================================================================== */

.news.-single .article {
  row-gap: 0;
}

.news.-single .article__headline {
  margin-bottom: 5px;
  text-align: left;

  & h1 {
    font-size: var(--f-size-l-2);
  }
}

.news.-single .article__footer {
  margin: 0 0 20px;
}

.news.-single .article__teaser {
  margin-bottom: 10px;
  font-weight: var(--f-weight-b);
}

.media__item {
  margin-bottom: var(--g-gap);
}

.media__item:last-child {
  margin-bottom: 0;
}

.media__image {
  position: relative;
  overflow: hidden;
}

.article__backlink {
  padding-top: 1em;
}

.article__backlink .font__button {
  text-transform: uppercase;
}

.article__backlink .font__button::before {
  content: '\f104';
  font-family: "FaRegular", sans-serif;
  margin-right: 0.4rem;
}

/* =============================================================================
   Pagination
   ========================================================================== */

.news__pager {
  grid-column: 1 / -1;
}

.f3-widget-paginator {
  display: flex;
  flex-wrap: wrap;
  padding: 0;
  list-style: none;

  & li {
    margin: 0 0 1em 5px;
    background: rgb(var(--c-neutral-lighter));
  }

  & li > a,
  & li > span {
    display: block;
    padding: 0.4em 0.9em;
    color: rgb(var(--c-neutral-dark));
  }

  & li.current {
    background: rgb(var(--c-primary));
  }

  & li.current > span {
    color: rgb(var(--c-neutral-lightest));
  }

  & li.gap {
    padding: 0.4em 0.5em;
    background: none;
  }

  & li.previous a::after,
  & li.next a::after {
    font-family: "FaLight", sans-serif;
    font-size: 16px;
  }

  & li.previous a::after {
    content: '\f053';
  }

  & li.next a::after {
    content: '\f054';
  }
}

@media (hover: hover) {
  .f3-widget-paginator li:not(.gap):hover {
    background: rgb(var(--c-primary-dark));
  }

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

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

@media (min-width: 400px) {
  .news.-single .article__media {
    grid-column: span 4;
  }

  .news.-single .article__extra,
  .news.-single .article__text {
    grid-column: span 8;
  }
}

@media (min-width: 801px) {
  .news.-latest {
    & .article {
      padding-bottom: 20px;
    }

    & .article__text {
      min-height: 300px;
      margin: 25px 50px 0 0;
      padding: 3.5em 43% 3.5em 8%;
      box-shadow: 5px 5px 20px 0 rgba(0, 0, 0, 0.2);
    }

    & .article__image {
      display: block;
      position: absolute;
      top: 0;
      right: 0;
      z-index: 1;
      width: 40%;
      overflow: hidden;
      box-shadow: 5px 5px 20px 0 rgba(0, 0, 0, 0.2);
    }

    & .gallery__image {
      display: block;
      width: 100%;
      transition: transform 0.3s ease;
    }
  }
}

@media (min-width: 801px) and (hover: hover) {
  .news.-latest .article:hover .gallery__image {
    transform: scale(1.2);
  }
}

@media (min-width: 1061px) {
  .news.-latest .news__slider {
    margin: 0 auto;
  }
}
