/* ========================================
 * 研究室サイト用 カスタム CSS
 * ====================================== */

:root {
  --nav-width: 1120px;
  --main-width: 1120px;
  --brand: #1A4E8A;
  --brand-soft: #eef4fa;
  --text-main: #222;
  --text-sub: #555;
  --line-soft: #dbe4ee;
}

/* ----------------------------------------
   1. 全体
   -------------------------------------- */

body {
  background-color: #f3f7fb !important;
  color: var(--text-main);
}

.main {
  background-color: #ffffff !important;
  border-radius: 0;
}

.post-content {
  font-size: 1.08rem;
  line-height: 1.95;
}

.post-content p {
  margin-bottom: 1.15rem;
}

.post-content h3 {
  margin-top: 2.4rem;
  margin-bottom: 0.9rem;
  font-size: 1.7rem;
  border-left: 6px solid var(--brand);
  padding-left: 0.7rem;
}

/* ----------------------------------------
   2. ヘッダー・ナビ
   -------------------------------------- */

.header,
.nav {
  background-color: var(--brand) !important;
  color: #ffffff !important;
}

.nav a,
.nav a:visited {
  color: #ffffff !important;
  font-weight: 600;
}

.nav a:hover {
  color: #dcecff !important;
}

.header .logo {
  margin-left: 0;
  font-weight: 700;
}

/* ----------------------------------------
   3. ロゴ画像
   -------------------------------------- */

.lab-hero-logo {
  text-align: center;
  margin: 0.2rem 0 1.4rem;
}

.lab-hero-logo img {
  width: min(100%, 760px);
  height: auto;
  max-height: 320px;
  object-fit: contain;
}

/* ----------------------------------------
   4. 画像
   -------------------------------------- */

.post-content img {
  border-radius: 14px;
}

.post-content > p img,
.post-content img[src*="combio_lab"] {
  display: block;
  margin: 0.4rem 0 0.8rem;
  max-width: 100%;
  height: auto;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

/* ----------------------------------------
   5. 箇条書き
   -------------------------------------- */

.post-content ul {
  margin-top: 0.5rem;
  margin-bottom: 1.2rem;
}

.post-content li {
  margin-bottom: 0.35rem;
}

/* ----------------------------------------
   6. 最新ニュース
   -------------------------------------- */

.latest-event {
  margin: 2.2rem 0 0 0;
  padding: 0;
  border: none;
  background: transparent;
}

.latest-event h3,
.latest-event h2 {
  margin-bottom: 0.9rem;
}

.latest-event ul {
  padding-left: 0;
  list-style: none;
  margin: 0;
}

.latest-event ul li {
  padding: 0.75rem 1rem;
  margin-bottom: 0.45rem;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: #fbfdff;
}

.latest-event .event-date {
  display: inline-block;
  min-width: 8.5em;
  font-weight: 700 !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--brand);
  margin-right: 0.4rem;
}

/* ----------------------------------------
   7. eventページ
   -------------------------------------- */

.events-list ul {
  list-style: none;
  padding-left: 0;
}

.events-list .event-item {
  margin-bottom: 1.4rem;
}

.events-list .event-date {
  font-weight: bold !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--brand);
}

.events-list .event-meta {
  display: block;
}

.events-list .event-text {
  margin-top: 0.5rem;
  line-height: 1.8;
}

.events-list .event-image-wrapper {
  margin-top: 0.6rem;
}

.events-list .event-images {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.events-list .event-thumb {
  width: 260px;
  height: 180px;
  object-fit: cover;
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

/* ----------------------------------------
   8. publications
   -------------------------------------- */

.pub-year {
  margin-top: 2rem;
  margin-bottom: 0.7rem;
  border-left: 5px solid var(--brand);
  padding-left: 0.6rem;
  font-size: 1.4rem;
  font-weight: 700;
}

.pub-date {
  margin-left: 0.3rem;
  font-size: 0.95em;
  color: var(--text-sub);
}

.pub-list {
  list-style: none;
  padding-left: 0;
}

.pub-item {
  margin-bottom: 0.55rem;
}

.pub-authors {
  font-weight: 600;
}

.pub-title {
  font-style: normal;
}

.pub-doi,
.pub-url {
  margin-left: 0.3rem;
  font-size: 0.95em;
}

/* ----------------------------------------
   9. モバイル
   -------------------------------------- */

@media (max-width: 768px) {
  :root {
    --nav-width: 100%;
    --main-width: 100%;
  }

  .post-content {
    font-size: 1rem;
    line-height: 1.85;
  }

  .post-content h3 {
    font-size: 1.35rem;
  }

  .lab-hero-logo img {
    max-height: 220px;
  }

  .latest-event ul li {
    padding: 0.7rem 0.8rem;
  }

  .latest-event .event-date {
    display: block;
    min-width: auto;
    margin-bottom: 0.2rem;
  }

  .events-list .event-thumb {
    width: 100%;
    height: auto;
    max-height: 240px;
    object-fit: cover;
  }
}

.home-photo-links {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(260px, 1fr);
  gap: 1.5rem;
  align-items: center;   /* これが重要 */
}

.home-photo {
  height: 100%;
}

.home-photo img {
  display: block;
  width: 100%;
  height: 100%;           /* auto ではなく 100% にする */
  object-fit: cover;      /* 枠いっぱいに収める */
  border-radius: 14px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.home-links-box {
  background: #fbfdff;
  border: 1px solid #dbe4ee;
  border-radius: 14px;
  padding: 1rem 1rem;
}

.home-links-box h4 {
  margin-top: 0;
  margin-bottom: 0.65rem;
  font-size: 1.45rem;
  line-height: 1.3;
}

.home-links-box ul {
  margin: 0;
  padding-left: 1.2rem;
}

.home-links-box li {
  margin-bottom: 0.4rem;
  line-height: 1.55;
}
