@use "sass:map";
@use "global/acms-common" as acms;
@use "global/common" as global;

/* ------------------------------
　　ヘッドライン
------------------------------ */
.headline {
  padding: 0;
  margin: 0;
  list-style: none;
}

.headline-item {
  display: flex;
  flex-direction: column;
  margin: 0;
  line-height: global.$line-height-base;

  &:first-child {
    .headline-link {
      border-radius: global.$border-radius-lg global.$border-radius-lg 0 0;
    }
  }

  &:last-child {
    border: 0;

    .headline-link {
      border-radius: 0 0  global.$border-radius-lg global.$border-radius-lg;
    }
  }
}

.headline-link {
  display: flex;
  flex-direction: column;
  padding: 1rem;
  color: global.$color-text;
  text-decoration: none;
  background: global.$color-white;
  border-bottom: global.$border-width-sm solid global.$color-gray30;
  box-shadow: global.$elevation02;

  .headline-item:last-child & {
    border: 0;
  }

  &:hover,
  &:visited,
  &:active,
  &:focus {
    color: global.$color-text;
  }

  &:hover {
    background: global.$color-gray20;
    box-shadow: global.$elevation10;
  }
}

.headline-info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin: 0 0 0.75rem;
  font-size: map.get(global.$font-scales, body-s);
  line-height: global.$line-height-sm;
  color: global.$color-text-side;
}

.headline-date {
  margin-right: 0.5rem;
  color: global.$color-text-side;
}

.headline-date + .headline-category {
  padding-left: 0.75rem;
  margin-right: 0.75rem;
  border-left: global.$border-width-sm solid global.$color-gray70;
}

.headline-text {
  position: relative;
  font-size: map.get(global.$font-scales, body-m);
  font-weight: bold;
}

.headline-badge-news {
  display: inline-block;
  margin: 0.25rem 0.5rem 0 0;
  font-size: map.get(global.$font-scales, body-s);
  font-weight: bold;
  line-height: global.$line-height-ss;
  vertical-align: text-top;
}

@include acms.media-breakpoint-up(md) {
  .headline-link {
    padding: 2rem;
  }

  .headline-text {
    font-size: map.get(global.$font-scales, body-m);
  }
}

@include acms.media-breakpoint-up(lg) {
  .headline-text {
    font-size: map.get(global.$font-scales, heading-ss);
  }
}
