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

/* ------------------------------
　　ヘッドライン
------------------------------ */
.headline {
  margin: 0;
  padding: 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;
  color: global.$color-text-side;
  font-size: map.get(global.$font-scales, body-s);
  line-height: global.$line-height-sm;
}

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

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

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

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

@media screen and (min-width: acms.$breakpoint-md-min) {
  .headline-link {
    padding: 2rem;
  }

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

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