/*
 * Copyright (c) 2023 Eclipse Foundation, Inc.
 * 
 * This program and the accompanying materials are made available under the
 * terms of the Eclipse Public License v. 2.0 which is available at
 * http://www.eclipse.org/legal/epl-2.0.
 * 
 * Contributors:
 *   Christopher Guindon <chris.guindon@eclipse-foundation.org>
 *   Eric Poirier <eric.poirier@eclipse-foundation.org>
 *   Olivier Goulet <olivier.goulet@eclipse-foundation.org>
 * 
 * SPDX-License-Identifier: EPL-2.0
*/

//== Default template

.news-list {
  h2 {
    color: @featured-block-list-h2-color;
    margin-bottom: 20px;
    margin-top: 0px;
  }

  .news-list-icon {
    margin-bottom: 0;
    .feather {
      height: 50px;
      stroke: @featured-block-list-icon-color;
      width: 50px;
    }
  }

  .media-link {
    background-color: @featured-block-list-media-link-bg-color;
    color: @featured-block-list-media-link-color;
    display: block;
    margin-bottom: 10px;
    padding: 30px;
    &:hover {
      background-color: @featured-block-list-media-link-bg-color-hover;
      color: @featured-block-list-media-link-color;
      text-decoration: none;
    }

    &:visited , &:focus {
      color: @featured-block-list-media-link-color;
    }
  }

  .news-list-col {
    @media (min-width: @screen-md-min) {
      padding-bottom: 70px;
      padding-left: 5px;
      padding-right: 5px;
    }
  }

  .media-heading {
    color: @featured-block-list-media-heading-color;
    font-size: @featured-block-list-media-heading-size;
    font-weight: @featured-block-list-media-heading-weight;
  }

  .media-text {
    color: @featured-block-list-media-text-color;
  }

  .news-list-links {
    text-align: center;
    a {
      color: @featured-block-list-media-link-color;
    }

    .news-list-links-rss {
      border-left: 1px solid @featured-block-list-media-link-color;
      padding-left: 10px;
    }

    .fa-rss {
      color: @brand-warning;
      font-size: 18px;
      margin-left: 10px;
      position: relative;
      top: 2px;
    }
  }
}

//== Card template

.news-items .tpl-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;

  .news-item-card {
    width: 100%;
    padding: 4rem 2rem 2rem 2rem;
    background-color: @white;
    box-shadow: 0px 0px 12px #eaeaea;

    &:hover {
      background-color: darken(@white, 1%);
    }

    .news-item-card-title {
      font-weight: bold;
    }

    .news-item-card-date {
      margin: 1rem 0;
      color: @brand-primary;
      font-weight: bold;
    }
  }
}

@media (min-width: @screen-lg-min) {
  .news-items .tpl-cards {
    .news-item-card {
      width: 30%;
    }
  }
}
