/* =====================================================================
   TOPページ固有のスタイル
   デザイントークン・サイト共通シェル/ヘッダー/フッター・共通部品は
   common.css にあります。
   前半は基本レイアウト、後半の「デザイン適用」節が同じセレクタを
   上書きします。
   ===================================================================== */

.top-hero {
  position: relative;
  overflow: hidden;
  background: var(--color-soft);
}

.top-hero__slide {
  position: relative;
  display: flex;
  min-height: 520px;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  padding: 48px 64px;
}

.top-hero__slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(24, 151, 138, 0.34), rgba(164, 92, 36, 0.16)),
    linear-gradient(to top, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.54), rgba(255, 255, 255, 0));
  z-index: 1;
}

.top-hero__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.top-hero__watermark {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.55);
  font-size: 96px;
  font-weight: 700;
}

.top-hero__meta,
.top-hero h1 {
  position: relative;
  z-index: 2;
  max-width: 680px;
}

.top-hero__meta {
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 500;
}

.top-hero h1 {
  margin: 8px 0 0;
  font-size: 28px;
  line-height: 1.3;
}

.top-hero__dots {
  position: absolute;
  z-index: 2;
  bottom: 20px;
  left: 50%;
  display: flex;
  gap: 8px;
  transform: translateX(-50%);
}

.top-hero__dots span,
.top-hero__dot {
  border: 0;
  cursor: pointer;
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background: rgba(23, 23, 23, 0.3);
  padding: 0;
}

.top-hero__dots .is-active {
  width: 24px;
  background: var(--color-foreground);
}

.top-search-section {
  display: flex;
  justify-content: center;
  padding: 40px;
}

.top-main-search {
  display: flex;
  width: min(720px, 100%);
  gap: 8px;
}

.top-main-search input {
  width: 100%;
  height: 48px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  color: var(--color-foreground);
  font: inherit;
  outline: none;
  padding: 0 16px;
}

.top-section {
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: 0 40px 56px;
}

.top-section__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.top-section__heading h2 {
  margin: 0;
  font-size: 20px;
}

.top-section__heading a {
  color: var(--color-muted);
  font-size: 13px;
  font-weight: 500;
}

.top-card-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.top-article-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 8px;
}

.top-article-card__cover {
  display: flex;
  aspect-ratio: 4 / 3;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 6px;
  background: linear-gradient(135deg, rgba(24, 151, 138, 0.24), rgba(164, 92, 36, 0.16));
  color: var(--color-muted);
  font-size: 18px;
  font-weight: 700;
}

.top-article-card__cover--official {
  background: linear-gradient(135deg, rgba(80, 80, 80, 0.2), rgba(24, 151, 138, 0.12));
}

.top-article-card__cover img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
}

.top-article-card__cover .top-article-card__cover-placeholder {
  width: 24px;
  height: 24px;
  opacity: 0.45;
  object-fit: contain;
}

.top-article-card__author,
.top-article-card time {
  color: var(--color-muted);
  font-size: 12px;
}

.top-article-card strong {
  display: -webkit-box;
  overflow: hidden;
  min-height: 42px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 14px;
  line-height: 1.5;
}

.top-section--announcements {
  padding-bottom: 64px;
}

.top-announcement-list {
  width: min(960px, 100%);
  margin: 0 auto;
  border-top: 1px solid var(--color-border);
  list-style: none;
  padding: 0;
}

.top-announcement-list a {
  display: flex;
  align-items: baseline;
  gap: 24px;
  border-bottom: 1px solid rgba(229, 229, 229, 0.72);
  padding: 16px 0;
}

.top-announcement-list time {
  width: 112px;
  flex-shrink: 0;
  color: var(--color-muted);
  font-size: 12px;
}

.top-announcement-list span {
  font-size: 14px;
}

@media (max-width: 900px) {
  .top-hero__slide {
    min-height: 320px;
    padding: 32px 20px;
  }

  .top-hero__watermark {
    font-size: 44px;
  }

  .top-hero h1 {
    font-size: 22px;
  }

  .top-search-section,
  .top-section {
    padding-right: 16px;
    padding-left: 16px;
  }

  .top-card-row {
    display: flex;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .top-article-card {
    min-width: 210px;
  }

  .top-announcement-list a {
    flex-direction: column;
    gap: 4px;
  }
}

/* デザイン適用。共通ヘッダー・フッターの基本デザインを踏襲します。 */
.top-hero {
  background: #414141;
}

.top-hero__slide {
  min-height: 500px;
  padding: 0 max(24px, calc((100vw - 1200px) / 2)) 28px;
}

.top-hero__slide::before {
  background: rgba(0, 0, 0, 0.5);
}

.top-hero__watermark {
  color: rgba(255, 255, 255, 0.6);
  font-size: 48px;
}

.top-hero__meta {
  color: #ffffff;
  font-size: 16px;
}

.top-hero h1 {
  margin-top: 6px;
  color: #ffffff;
  font-family: "Noto Sans JP", "Noto Sans", sans-serif;
  font-size: 22px;
  font-weight: 700;
}

.top-hero__dots {
  bottom: 17px;
  gap: 8px;
}

.top-hero__dots span,
.top-hero__dot {
  width: 8px;
  height: 8px;
  background: #ffffff;
}

.top-hero__dots .is-active {
  width: 8px;
  background: #ffffff;
  outline: 1px solid #ffffff;
  outline-offset: 3px;
}

.top-search-section {
  min-height: 100px;
  background: #e4e4e4;
  padding: 27px 24px 28px;
}

.top-main-search {
  width: 500px;
  gap: 0;
}

.top-main-search input {
  height: 45px;
  border: 0;
  border-radius: 4px 0 0 4px;
  color: #414141;
  font-size: 14px;
  padding: 0 20px;
}

.top-main-search__button {
  position: relative;
  width: 45px;
  flex: 0 0 45px;
  border: 0;
  border-radius: 0 4px 4px 0;
  background: var(--color-brand);
  cursor: pointer;
}

.top-main-search__button span::before {
  content: "";
  position: absolute;
  top: 15px;
  left: 15px;
  width: 10px;
  height: 10px;
  border: 2px solid #ffffff;
  border-radius: 50%;
}

.top-main-search__button span::after {
  content: "";
  position: absolute;
  top: 26px;
  left: 26px;
  width: 7px;
  height: 2px;
  border-radius: 3px;
  background: #ffffff;
  transform: rotate(45deg);
  transform-origin: left center;
}

.top-section-band--official {
  background: var(--public-warm-background);
}

.top-section {
  width: min(1200px, calc(100% - 48px));
  padding: 27px 0 50px;
}

.top-section__heading {
  margin-bottom: 28px;
}

.top-section__heading h2 {
  position: relative;
  color: #414141;
  font-family: "Noto Sans JP", "Noto Sans", sans-serif;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.5;
  padding-bottom: 10px;
}

.top-section__heading h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 87px;
  height: 3px;
  background: var(--color-brand);
}

.top-card-row {
  gap: 18px;
}

.top-article-card {
  min-height: 288px;
  gap: 0;
  border: 1px solid #e1e1e1;
  background: #ffffff;
  padding-bottom: 10px;
}

.top-article-card__cover,
.top-article-card__cover--official {
  height: 130px;
  aspect-ratio: auto;
  border-radius: 0;
  background: #f2f2f2;
}

.top-article-card .category-pill {
  margin-top: 10px;
  margin-left: 12px;
  font-family: "Noto Sans JP", "Noto Sans", sans-serif;
}

.top-article-card strong {
  min-height: 42px;
  margin: 8px 10px 0;
  color: #414141;
  font-family: "Noto Sans JP", "Noto Sans", sans-serif;
  font-size: 14px;
  font-weight: 700;
}

.top-article-card__author,
.top-article-card time {
  margin: 0 10px;
  color: #939393;
  font-family: "Noto Sans JP", "Noto Sans", sans-serif;
  font-size: 12px;
  line-height: 16px;
}

.top-article-card__meta {
  display: flex;
  flex-direction: column;
  margin-top: auto;
}

.top-article-card__author {
  margin-top: 0;
}

.top-section--announcements {
  padding-top: 35px;
  padding-bottom: 50px;
}

.top-announcement-list {
  width: min(1000px, 100%);
  border-top: 0;
}

.top-announcement-list a {
  gap: 24px;
  border-bottom-color: #bdbdbd;
  padding: 20px 0;
}

.top-announcement-list time {
  color: #939393;
  font-size: 12px;
}

.top-announcement-list span {
  color: #414141;
  font-family: "Noto Sans JP", "Noto Sans", sans-serif;
  font-size: 16px;
  font-weight: 500;
}

@media (max-width: 900px) {
  .top-section {
    width: 100%;
    padding-right: 16px;
    padding-left: 16px;
  }

  .top-hero__slide {
    min-height: 320px;
    padding: 0 20px 24px;
  }

  .top-main-search {
    width: min(500px, 100%);
  }

  .top-article-card {
    min-height: 288px;
  }
}

/* FigmaのTOP_SP（390px幅）に合わせたモバイル用レイアウトです。 */
@media (max-width: 600px) {
  .top-hero__slide {
    min-height: 200px;
    padding: 0 15px 50px;
  }

  .top-hero__slide::before {
    background: rgba(0, 0, 0, 0.52);
  }

  .top-hero__watermark {
    font-size: 28px;
  }

  .top-hero h1 {
    margin-top: 0;
    font-size: 16px;
    line-height: 1.6;
  }

  .top-hero__meta {
    font-size: 10px;
    line-height: 1.6;
  }

  .top-hero__dots {
    bottom: 13px;
    gap: 10px;
  }

  .top-hero__dots span,
  .top-hero__dot,
  .top-hero__dots .is-active {
    width: 7px;
    height: 7px;
  }

  .top-search-section {
    display: none;
  }

  .top-section,
  .top-section--announcements {
    position: relative;
    width: 100%;
    padding: 14px 15px 48px;
  }

  .top-section__heading {
    min-height: 45px;
    margin-bottom: 0;
  }

  .top-section__heading h2 {
    font-size: 14px;
    line-height: 1.5;
    padding-bottom: 8px;
  }

  .top-section__heading h2::after {
    width: 61px;
    height: 2px;
  }

  .top-card-row {
    display: block;
    overflow: visible;
    padding: 0;
  }

  .top-article-card {
    display: grid;
    min-height: 100px;
    grid-template-columns: minmax(0, 1fr) 120px;
    grid-template-rows: 17px auto 17px;
    gap: 0;
    border: 0;
    border-top: 1px solid #bdbdbd;
    background: transparent;
    padding: 10px 0;
  }

  .top-article-card:last-child {
    border-bottom: 1px solid #bdbdbd;
  }

  .top-article-card__cover,
  .top-article-card__cover--official {
    width: 120px;
    height: 80px;
    grid-column: 2;
    grid-row: 1 / 4;
    align-self: start;
    margin: 0;
  }

  .top-article-card .category-pill {
    grid-column: 1;
    grid-row: 1;
    align-self: start;
    justify-self: start;
    margin: 0;
  }

  .top-article-card strong {
    display: -webkit-box;
    min-height: 0;
    overflow: hidden;
    grid-column: 1;
    grid-row: 2;
    align-self: start;
    margin: 4px 10px 0 0;
    color: #414141;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.5;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .top-article-card__meta {
    display: flex;
    min-width: 0;
    flex-direction: row;
    grid-column: 1;
    grid-row: 3;
    align-self: end;
    align-items: baseline;
    gap: 5px;
    margin: 0;
  }

  .top-article-card__author,
  .top-article-card time {
    min-width: 0;
    margin: 0;
    color: #939393;
    font-size: 10px;
    line-height: 13px;
    white-space: nowrap;
  }

  .top-article-card__author {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .top-article-card time {
    flex: 0 0 auto;
  }

  .top-section--announcements {
    padding-top: 12px;
    padding-bottom: 44px;
  }

  .top-section--announcements .top-section__heading {
    min-height: 39px;
  }

  .top-section--announcements .top-section__heading h2 {
    padding-bottom: 0;
  }

  .top-section--announcements .top-section__heading h2::after {
    display: none;
  }

  .top-announcement-list {
    width: 100%;
  }

  .top-announcement-list a {
    flex-direction: row;
    align-items: center;
    gap: 18px;
    border-bottom-color: #bdbdbd;
    padding: 16px 0;
  }

  .top-announcement-list time {
    width: auto;
    font-size: 10px;
    white-space: nowrap;
  }

  .top-announcement-list span {
    display: block;
    overflow: hidden;
    color: #414141;
    font-size: 12px;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}
