@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;600;700&display=swap");

:root {
  --navy: #123a63;
  --blue: #1d6aa8;
  --pale: #eef6fb;
  --text: #24313d;
  --line: #d9e2ea;
  --warn: #fff5d6;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Noto Sans JP", "Yu Gothic", "Meiryo", sans-serif;
  color: var(--text);
  line-height: 1.75;
}

header {
  padding: 18px max(20px, calc((100% - 1040px) / 2));
  border-bottom: 1px solid var(--line);
  background-color: #ffffff;
  color: #000000;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  max-width: 1040px;
  margin: 0 auto;
}

.brand-link {
  display: block;
  flex-shrink: 0;
  color: #000000;
  text-decoration: none;
}

.brand-link:visited,
.brand-link:hover,
.brand-link:focus {
  color: #000000;
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: 170px;
  max-width: 36vw;
  height: auto;
}

.header-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  border: 0;
}

.header-nav a {
  display: inline-block;
  padding: 10px 16px;
  border-left: 1px solid var(--line);
  color: var(--navy);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  white-space: nowrap;
}

.header-nav a:first-child {
  border-left: 0;
}

.header-nav a:visited {
  color: var(--navy);
}

.header-nav a:hover,
.header-nav a:focus {
  color: var(--blue);
  text-decoration: none;
}

main,
footer div {
  max-width: 1040px;
  margin: auto;
  padding-right: 20px;
  padding-left: 20px;
}

main {
  padding-top: 34px;
  padding-bottom: 60px;
}

h1,
h2 {
  color: var(--navy);
}

.notice {
  margin-bottom: 28px;
  padding: 18px;
  border-left: 5px solid #d6a400;
  background-color: var(--warn);
}

.button {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 6px;
  background-color: var(--blue);
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.button:visited {
  color: #ffffff;
}

.button:hover,
.button:focus {
  background-color: var(--navy);
  color: #ffffff;
  text-decoration: none;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.card {
  display: block;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background-color: #ffffff;
  color: var(--navy);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease,
    color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.card:visited {
  color: var(--navy);
}

.card:hover,
.card:focus {
  border-color: var(--blue);
  background-color: var(--pale);
  color: var(--blue);
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(18, 58, 99, 0.12);
}

.hero-slider {
  position: relative;
  width: 100%;
  max-width: 1000px;
  aspect-ratio: 1000 / 350;
  margin: 24px auto 32px;
  overflow: hidden;
  background-color: #f4f4f4;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1.2s ease-in-out, visibility 1.2s ease-in-out;
}

.hero-slide.is-active {
  z-index: 1;
  opacity: 1;
  visibility: visible;
}

.hero-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-dots {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: 12px;
  left: 0;
  display: flex;
  justify-content: center;
  gap: 9px;
}

.hero-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 1px solid rgba(80, 80, 80, 0.7);
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.hero-dot:hover,
.hero-dot:focus {
  transform: scale(1.15);
}

.hero-dot.is-active {
  background-color: #666666;
}

footer {
  padding: 25px 0;
  background-color: #eef2f5;
}

@media (max-width: 600px) {
  header {
    padding-top: 14px;
    padding-bottom: 0;
  }

  .header-inner {
    flex-direction: column;
    gap: 10px;
  }

  .brand-logo {
    width: 153px;
    max-width: 70vw;
  }

  .header-nav {
    width: 100%;
    justify-content: center;
    border-top: 1px solid var(--line);
  }

  .header-nav a {
    flex: 1 1 50%;
    padding: 10px 6px;
    border-bottom: 1px solid var(--line);
    border-left: 1px solid var(--line);
    font-size: 0.85rem;
    text-align: center;
  }

  .header-nav a:nth-child(odd) {
    border-left: 0;
  }

  main {
    padding-top: 24px;
    padding-bottom: 40px;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .hero-slider {
    margin-top: 18px;
    margin-bottom: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-slide,
  .hero-dot,
  .card {
    transition: none;
  }
}


/* ==============================
   サービスカードの分類色
============================== */

/* 質量分析関連：淡い水色 */
.card-mass {
  border-color: #a9d7ea;
  border-left: 6px solid #54a8cc;
  background-color: #eaf7fc;
  color: #245f78;
}

.card-mass:visited {
  color: #245f78;
}

.card-mass:hover,
.card-mass:focus {
  border-color: #388fb5;
  background-color: #d9f0f9;
  color: #174f68;
}

/* マルチプレックス・イムノアッセイ関連：淡い緑 */
.card-immuno {
  border-color: #acd9bd;
  border-left: 6px solid #5eaa79;
  background-color: #edf8f1;
  color: #356b48;
}

.card-immuno:visited {
  color: #356b48;
}

.card-immuno:hover,
.card-immuno:focus {
  border-color: #438d5d;
  background-color: #dcf1e4;
  color: #285b3a;
}

/* 遺伝子関連：淡いあずき色 */
.card-gene {
  border-color: #d8b1bb;
  border-left: 6px solid #9c5568;
  background-color: #f8eef1;
  color: #743f4d;
}

.card-gene:visited {
  color: #743f4d;
}

.card-gene:hover,
.card-gene:focus {
  border-color: #874457;
  background-color: #f0dfe4;
  color: #633442;
}

/* 項目一覧：淡いグレー */
.card-list {
  border-color: #cbd2d8;
  border-left: 6px solid #7f8b94;
  background-color: #f2f4f5;
  color: #4e5961;
}

.card-list:visited {
  color: #4e5961;
}

.card-list:hover,
.card-list:focus {
  border-color: #6f7b84;
  background-color: #e5e9ec;
  color: #3d474e;
}

.news-section {
  margin: 42px 0;
  padding: 24px 26px 26px;
  border: 1px solid #d8edf5;
  border-radius: 8px;
  background-color: #f5fbfd;
}

.news-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
  padding-bottom: 7px;
  border-bottom: 1px solid #20b8e6;
}

.news-heading-row h1,
.news-heading-row h2 {
  margin: 0;
  color: #14b6e6;
}

.news-heading-row h2 {
  font-size: 1.55rem;
}

.news-all-link {
  margin-left: auto;
  color: #14b6e6;
  font-size: 0.95rem;
  text-decoration: none;
  white-space: nowrap;
}

.news-all-link:visited {
  color: #14b6e6;
}

.news-all-link:hover,
.news-all-link:focus {
  color: #087da1;
  text-decoration: underline;
}

.news-list {
  margin: 0;
  padding: 14px 0 0;
  list-style: none;
}

.news-item {
  display: grid;
  grid-template-columns: 80px 80px minmax(0, 1fr);
  align-items: start;
  gap: 13px;
  padding: 8px 0;
}

.news-item time {
  padding-top: 3px;
  color: #333333;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.news-category {
  display: inline-block;
  width: 80px;
  padding: 3px 5px;
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  white-space: nowrap;
}

.category-notice { background-color: #21b6df; }
.category-research { background-color: #9b0750; }
.category-achievement { background-color: #39834a; }

.news-item a,
.news-title {
  color: #222222;
  line-height: 1.35;
  text-decoration: none;
}

.news-item a:visited { color: #222222; }

.news-item a:hover,
.news-item a:focus {
  color: #087da1;
  text-decoration: underline;
}

.news-detail {
  grid-column: 3;
  margin: 3px 0 8px;
  color: #52606a;
  font-size: 0.9rem;
  line-height: 1.6;
}

.news-list-all { margin-bottom: 20px; }

@media (max-width: 700px) {
  .news-section {
    margin: 30px 0;
    padding: 18px 16px 20px;
  }

  .news-heading-row { gap: 12px; }
  .news-heading-row h2 { font-size: 1.3rem; }
  .news-all-link { font-size: 0.8rem; }

  .news-item {
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 6px 10px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
  }

  .news-item time {
    grid-column: 1;
    grid-row: 1;
  }

  .news-category {
    grid-column: 2;
    grid-row: 1;
    justify-self: start;
  }

  .news-item a,
  .news-title {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .news-detail { grid-column: 1 / -1; }
}

/* h1横の小さな注意書き */
.heading-note {
  margin-left: 12px;
  color: #666666;
  font-size: 0.8rem;
  font-weight: 400;
  vertical-align: middle;
}

/* スマートフォンでは注意書きを次の行に表示 */
@media (max-width: 600px) {
  .heading-note {
    display: block;
    margin-top: 5px;
    margin-left: 0;
    font-size: 0.75rem;
  }
}

/*
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: #fff;
}

body {
  padding-top: 80px;
}
*/
