﻿:root {
  --ink:#112239;
  --muted:#607086;
  --blue:#0b4d85;
  --blue2:#1671a9;
  --teal:#0e8a79;
  --bg:#f4f7fa;
  --white:#fff;
  --line:#dce5ed;
  --soft:#eaf2f7;
  --soft2:#eef6f4;
  --shadow:0 16px 46px rgba(14,58,96,.10);
  --radius:22px;
  --max:1180px;
  --body-copy-size:16px; /* 通常の説明文の基本サイズ */
}

* {
  box-sizing:border-box
}

html {
  scroll-behavior:smooth
}

body {
  margin:0;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Hiragino Kaku Gothic ProN","Yu Gothic",Meiryo,sans-serif;
  color:var(--ink);
  background:var(--bg);
  line-height:1.8
}

a {
  color:inherit;
  text-decoration:none
}

img {
  max-width:100%;
  display:block
}

.container {
  width:min(calc(100% - 40px),var(--max));
  margin:auto
}

header {
  position:sticky;
  top:0;
  z-index:1000;
  background:rgba(255,255,255,.94);
  backdrop-filter:blur(14px);
  border-bottom:1px solid rgba(220,229,237,.95)
}

.nav {
  min-height:76px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px
}

.brand {
  display:flex;
  align-items:center;
  gap:12px;
  font-weight:900
}

.mark {
  width:44px;
  height:44px;
  border-radius:13px;
  background:linear-gradient(135deg,var(--blue),var(--teal));
  color:white;
  display:grid;
  place-items:center;
  font-size:12px;
  letter-spacing:.04em;
  box-shadow:var(--shadow)
}

.brand-text {
  line-height:1.25;
  font-size:15px
}

.brand-text small {
  display:block;
  color:var(--muted);
  font-size:9px;
  letter-spacing:.10em;
  margin-top:4px
}

nav ul {
  list-style:none;
  display:flex;
  gap:20px;
  margin:0;
  padding:0;
  font-size:13px;
  font-weight:800;
  color:#415169
}

nav a:hover,nav a.active {
  color:var(--blue2)
}

.menu-btn {
  display:none;
  border:1px solid var(--line);
  background:white;
  border-radius:10px;
  padding:8px 11px;
  font-size:20px;
  color:var(--ink)
}

.hero {
  position:relative;
  overflow:hidden;
  color:white;
  background:radial-gradient(circle at 80% 15%,rgba(16,147,128,.25),transparent 28%),linear-gradient(145deg,#082b4c 0%,#0d4c80 58%,#0b6d63 100%)
}

.hero:before {
  content:"";
  position:absolute;
  inset:0;
  background-image:linear-gradient(rgba(255,255,255,.045) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.045) 1px,transparent 1px);
  background-size:42px 42px;
  mask-image:linear-gradient(to bottom,#000,transparent 92%)
}

.hero-inner {
  position:relative;
  z-index:1;
  min-height:630px;
  display:grid;
  grid-template-columns:1.02fr .98fr;
  gap:52px;
  align-items:center;
  padding:86px 0
}

.eyebrow {
  font-size:12px;
  font-weight:900;
  letter-spacing:.16em;
  text-transform:uppercase;
  opacity:.84;
  display:flex;
  align-items:center;
  gap:10px
}

.eyebrow:before {
  content:"";
  width:30px;
  height:2px;
  background:currentColor
}

.hero h1 {
  font-size:clamp(42px,6vw,76px);
  line-height:1.07;
  letter-spacing:-.045em;
  margin:18px 0
}

.hero p {
  font-size:clamp(16px,1.9vw,20px);
  color:rgba(255,255,255,.86);
  max-width:720px;
  margin:0
}

.hero .sub {
  font-size:var(--body-copy-size);
  color:rgba(255,255,255,.70);
  margin-top:15px
}

.hero-photo {
  border-radius:30px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.20);
  box-shadow:0 24px 70px rgba(0,0,0,.25);
  position:relative
}

.hero-photo img {
  width:100%;
  height:430px;
  object-fit:cover
}

.hero-photo video {
  width:100%;
  height:370px;
  object-fit:cover;
  display: block;
}

.hero-photo:after {
  content:"LINEAR MOTOR DRIVE";
  position:absolute;
  left:18px;
  bottom:18px;
  background:rgba(6,31,54,.75);
  padding:9px 13px;
  border-radius:999px;
  font-size:11px;
  font-weight:900;
  letter-spacing:.12em
}

.hero-actions {
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin-top:28px
}

.btn {
  min-height:48px;
  padding:0 20px;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-weight:900;
  font-size:14px;
  transition:.2s
}

.btn:hover {
  transform:translateY(-2px)
}

.btn-light {
  background:white;
  color:var(--blue)
}

.btn-outline {
  border:1px solid rgba(255,255,255,.45);
  color:white;
  background:rgba(255,255,255,.06)
}

section {
  padding:88px 0
}

.section-head {
  display:grid;
  grid-template-columns:250px 1fr;
  gap:42px;
  align-items:end;
  margin-bottom:36px
}

.kicker {
  font-size:12px;
  font-weight:900;
  letter-spacing:.16em;
  text-transform:uppercase;
  color:var(--blue2)
}

.section-head h2,.page-head h1 {
  font-size:clamp(30px,4vw,48px);
  line-height:1.17;
  letter-spacing:-.025em;
  margin:6px 0 0
}

.section-head p {
  margin:0;
  color:var(--muted);
  max-width:780px
}

.intro-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:22px
}

.panel {
  background:white;
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:28px;
  box-shadow:var(--shadow)
}

.panel h3 {
  font-size:23px;
  margin:0 0 10px
}

.panel p {
  color:var(--muted);
  margin:0
}

.quote-line {
  margin-top:18px;
  border-left:4px solid var(--teal);
  background:var(--soft2);
  padding:14px 17px;
  border-radius:0 14px 14px 0;
  font-weight:800;
  color:#214e48
}

.band {
  background:#eaf1f6;
  border-block:1px solid var(--line)
}

.core-grid {
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:16px
}

.core {
  background:white;
  border:1px solid var(--line);
  border-radius:18px;
  padding:22px;
  min-height:165px
}

.core b {
  display:block;
  font-size:17px;
  margin-bottom:6px
}

.core span {
  font-size:var(--body-copy-size);
  color:var(--muted)
}

.core .n {
  width:36px;
  height:36px;
  border-radius:11px;
  background:var(--soft);
  color:var(--blue);
  display:grid;
  place-items:center;
  font-weight:900;
  margin-bottom:15px
}

.research-cards {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:22px
}

.card {
  background:white;
  border:1px solid var(--line);
  border-radius:var(--radius);
  overflow:hidden;
  box-shadow:var(--shadow)
}

.card img {
  width:100%;
  height:210px;
  object-fit:cover
}

.card-body {
  padding:24px
}

.label {
  font-size:10px;
  font-weight:900;
  color:var(--blue2);
  letter-spacing:.10em;
  text-transform:uppercase
}

.card h3 {
  font-size:21px;
  line-height:1.45;
  margin:7px 0 9px
}

.card p {
  font-size:var(--body-copy-size);
  color:var(--muted);
  margin:0
}

.more {
  display:inline-flex;
  margin-top:16px;
  color:var(--blue);
  font-weight:900;
  font-size:13px
}

.more:after {
  content:" →"
}

.bridge {
  display:grid;
  grid-template-columns:.92fr 1.08fr;
  gap:38px;
  align-items:center
}

.bridge h2 {
  font-size:clamp(30px,4vw,46px);
  line-height:1.2;
  margin:6px 0 15px
}

.bridge p {
  color:var(--muted)
}

.flow {
  background:white;
  border:1px solid var(--line);
  border-radius:26px;
  padding:26px;
  box-shadow:var(--shadow)
}

.flow-row {
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:10px
}

.flow-box {
  text-align:center;
  background:#f6f9fb;
  border:1px solid var(--line);
  border-radius:14px;
  padding:16px 10px;
  font-weight:900;
  font-size:13px
}

.flow-arrow {
  text-align:center;
  font-size:22px;
  color:#8a9bad;
  margin:10px
}

.application-tags {
  display:flex;
  flex-wrap:wrap;
  gap:9px;
  justify-content:center
}

.application-tags span {
  padding:8px 11px;
  border-radius:999px;
  background:var(--soft2);
  border:1px solid #d7e9e4;
  color:#315e57;
  font-weight:800;
  font-size:12px
}

.strip-grid {
  display:grid;
  grid-template-columns:1fr 1fr 1fr;
  gap:18px
}

.strip-card {
  background:white;
  border:1px solid var(--line);
  border-radius:18px;
  padding:22px
}

.strip-card h3 {
  margin:0 0 8px;
  font-size:19px
}

.strip-card p {
  margin:0;
  color:var(--muted);
  font-size:var(--body-copy-size)
}

.list {
  border-top:1px solid var(--line)
}

.list-row {
  display:grid;
  grid-template-columns:110px 115px 1fr;
  gap:14px;
  padding:17px 0;
  border-bottom:1px solid var(--line);
  align-items:center
}

.date {
  font-size:13px;
  color:var(--muted);
  font-variant-numeric:tabular-nums
}

.pill {
  font-size:10px;
  font-weight:900;
  color:var(--blue2);
  border:1px solid var(--line);
  border-radius:999px;
  padding:5px 8px;
  width:fit-content;
  background:white
}

.list-title {
  font-weight:750
}

.page-hero {
  padding:70px 0 54px;
  background:linear-gradient(145deg,#eaf2f7,#f7fafc);
  border-bottom:1px solid var(--line)
}

.page-head p {
  font-size:var(--body-copy-size);
  color:var(--muted);
  max-width:760px;
  margin:14px 0 0
}

.breadcrumb {
  font-size:12px;
  color:var(--muted);
  margin-bottom:10px
}

.breadcrumb a {
  color:var(--blue2)
}

.detail-section {
  padding:70px 0
}

.detail-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:28px;
  align-items:start
}

.detail-grid img {
  border-radius:22px;
  border:1px solid var(--line);
  box-shadow:var(--shadow)
}

.detail-grid h2 {
  font-size:30px;
  margin:0 0 12px
}

.detail-grid p {
  color:var(--muted)
}

.bullets {
  padding-left:1.2em
}

.bullets li {
  margin:7px 0
}

.people-section {
  margin-bottom:38px
}

.people-section h2 {
  font-size:28px;
  margin:0 0 16px
}

.people-grid {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:18px
}

.person {
  background:white;
  border:1px solid var(--line);
  border-radius:18px;
  padding:20px
}

.person .avatar {
  aspect-ratio:4/3;
  border-radius:14px;
  background:#e8eef3;
  display:grid;
  place-items:center;
  color:#8390a1;
  font-size:12px;
  font-weight:900;
  margin-bottom:14px;
  overflow:hidden
}

.person .avatar img {
  width:100%;
  height:100%;
  object-fit:cover
}

.person h3 {
  margin:0 0 3px;
  font-size:18px
}

.person .role {
  font-size:11px;
  color:var(--blue2);
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase
}

.person p {
  font-size:var(--body-copy-size);
  color:var(--muted);
  margin:8px 0 0
}

.placeholder {
  border-style:dashed;
  color:#6f7e90
}

.placeholder .avatar {
  background:#f6f8fa
}

.pub-year {
  font-size:32px;
  margin:34px 0 14px
}

.pub-list {
  display:grid;
  gap:14px
}

.pub-item {
  background:white;
  border:1px solid var(--line);
  border-radius:17px;
  padding:20px 22px
}

.pub-type {
  font-size:10px;
  font-weight:900;
  color:var(--teal);
  letter-spacing:.10em
}

.pub-item h3 {
  font-size:18px;
  line-height:1.55;
  margin:6px 0 5px
}

.pub-item p {
  font-size:var(--body-copy-size);
  color:var(--muted);
  margin:0
}

.external-box {
  background:#f0f5f8;
  border:1px solid var(--line);
  border-radius:18px;
  padding:20px;
  margin-top:28px
}

.external-box a {
  color:var(--blue);
  font-weight:900
}

.student-story {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:18px
}

.story-card {
  background:white;
  border:1px solid var(--line);
  border-radius:18px;
  overflow:hidden
}

.story-card img {
  height:220px;
  width:100%;
  object-fit:cover
}

.story-card div {
  padding:20px
}

.story-card h3 {
  margin:0 0 6px;
  font-size:19px
}

.story-card p {
  margin:0;
  color:var(--muted);
  font-size:var(--body-copy-size)
}

.career-grid {
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:14px
}

.career {
  background:white;
  border:1px solid var(--line);
  border-radius:16px;
  padding:18px
}

.career b {
  display:block;
  color:var(--blue);
  margin-bottom:7px
}

.career span {
  font-size:var(--body-copy-size);
  color:var(--muted)
}

.cta {
  padding:20px 0 82px
}

.cta-box {
  background:linear-gradient(135deg,#0a355b,#175f90 60%,#0b766b);
  color:white;
  border-radius:28px;
  padding:38px;
  display:grid;
  grid-template-columns:1fr auto;
  gap:24px;
  align-items:center;
  box-shadow:0 20px 60px rgba(14,58,96,.18)
}

.cta-box h2 {
  margin:0 0 7px;
  font-size:30px
}

.cta-box p {
  margin:0;
  color:rgba(255,255,255,.82)
}

footer {
  padding:44px 0 58px;
  color:var(--muted);
  font-size:12px
}

.foot {
  border-top:1px solid var(--line);
  padding-top:28px;
  display:grid;
  grid-template-columns:1fr auto;
  gap:20px
}

.foot strong {
  display:block;
  color:var(--ink);
  font-size:14px;
  margin-bottom:4px
}

.foot-links {
  display:flex;
  gap:14px;
  flex-wrap:wrap
}

.foot-links a:hover {
  color:var(--blue)
}

@media(max-width:940px) {
  nav ul {
    display:none;
    position:absolute;
    left:20px;
    right:20px;
    top:68px;
    background:white;
    border:1px solid var(--line);
    border-radius:16px;
    padding:16px;
    box-shadow:var(--shadow);
    flex-direction:column;
    gap:8px
  }

  nav ul.open {
    display:flex
  }

  .menu-btn {
    display:block
  }

  .hero-inner,.section-head,.intro-grid,.bridge,.detail-grid,.cta-box {
    grid-template-columns:1fr
  }

  .hero-photo {
    max-width:680px
  }

  .core-grid {
    grid-template-columns:1fr 1fr
  }

  .research-cards,.people-grid,.student-story {
    grid-template-columns:1fr 1fr
  }

  .career-grid {
    grid-template-columns:1fr 1fr
  }

  .section-head {
    gap:12px
  }

  .list-row {
    grid-template-columns:95px 1fr
  }

  .list-title {
    grid-column:1/-1
  }

  .flow-row {
    grid-template-columns:1fr 1fr
  }

  .strip-grid {
    grid-template-columns:1fr
  }
.foot {
    grid-template-columns:1fr
  }

}

@media(max-width:560px) {
  .container {
    width:min(calc(100% - 28px),var(--max))
  }

  .brand-text small {
    display:none
  }

  .hero-inner {
    padding:62px 0
  }

  .hero h1 {
    font-size:42px
  }

  .hero-photo img {
    height:300px
  }

  section {
    padding:68px 0
  }

  .core-grid,.research-cards,.people-grid,.student-story,.career-grid,.flow-row {
    grid-template-columns:1fr
  }

  .list-row {
    grid-template-columns:1fr;
    gap:6px
  }

  .cta-box {
    padding:28px 22px
  }

}

/* =========================================================
   Site-wide refinements
   ========================================================= */

/* Home: compact first view */
.home-page .hero-inner {
  min-height: 520px;
  padding: 58px 0;
}

.home-page .hero-photo img {
  height: 370px;
}

/* Home: section headings stay on one line on wide screens */
@media (min-width: 1000px) {
  .home-page .section-head {
    grid-template-columns: max-content minmax(0, 1fr);
  }

  .home-page .section-head h2 {
    white-space: nowrap;
  }
}

/* Home: latest news only */
.home-news-card {
  max-width: 900px;
}

.home-news-more {
  display: inline-flex;
  margin-top: 16px;
}

.news-list-row {
  color: inherit;
  text-decoration: none;
}

.news-list-row:hover .list-title {
  color: var(--blue2);
}

/* Member photos */
.avatar {
  overflow: hidden;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Access */
.access-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.access-card {
  padding: 28px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.access-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.access-card h3 {
  margin: 24px 0 8px;
  font-size: 17px;
}

.access-card p {
  margin: 0 0 12px;
  color: var(--muted);
}

.address-box {
  margin-top: 18px;
  padding: 18px 20px;
  background: var(--soft);
  border-left: 4px solid var(--blue2);
  border-radius: 0 14px 14px 0;
}

.address-box strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
}

.route-list {
  margin: 14px 0 0;
  padding-left: 1.3em;
  color: var(--muted);
}

.route-list li {
  margin-bottom: 10px;
}

.contact-name {
  margin-bottom: 6px;
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
}

.email {
  display: inline-block;
  padding: 9px 12px;
  background: var(--soft);
  border-radius: 10px;
  font-family: Consolas, "Courier New", monospace;
  color: var(--blue);
}

.note {
  margin-top: 10px !important;
  font-size: 13px;
  color: var(--muted) !important;
}

.access-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 22px;
}

.btn-primary {
  background: var(--blue);
  color: var(--white);
}

.visit-box {
  margin-top: 26px;
  padding: 28px;
  background: linear-gradient(135deg, #0d3b66, #176aa0 58%, #0f7f72);
  border-radius: 22px;
  color: var(--white);
}

.visit-box h2 {
  margin: 0 0 10px;
  color: var(--white);
}

.visit-box p {
  margin: 0;
  color: rgba(255, 255, 255, .84);
}

/* Students: only a compact route to the Access page */
.student-access-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 30px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.student-access-panel h2 {
  margin: 6px 0 8px;
}

.student-access-panel p {
  margin: 0;
  color: var(--muted);
}

/* Responsive refinements */
@media (max-width: 820px) {
  .home-page .hero-inner {
    min-height: auto;
    padding: 48px 0;
  }

  .home-page .hero-photo img {
    height: 300px;
  }

  .access-grid {
    grid-template-columns: 1fr;
  }

  .student-access-panel {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* =========================================================
   Home: Research themes (4 cards)
   ========================================================= */

/* 4つの研究テーマをPCでは2×2で表示 */
.home-page .research-cards.four-cards {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* HomeのHero動画を静止画と同じサイズ感に統一 */
.home-page .hero-photo video {
  width: 100%;
  height: 370px;
  object-fit: cover;
  display: block;
}

/* Accessページ：「お問い合わせ」をPCで不自然に改行しない */
@media (min-width: 821px) {
  .access-page .section-head {
    grid-template-columns: max-content minmax(0, 1fr);
  }

  .access-page .section-head h2 {
    white-space: nowrap;
  }
}

@media (max-width: 820px) {
  .home-page .hero-photo video {
    height: 300px;
  }
}

@media (max-width: 560px) {
  .home-page .research-cards.four-cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) and (min-width: 561px) {
  .home-page .research-cards.four-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}




/* News: one item per row */
.news-grid {
  display:flex;
  flex-direction:column;
  gap:0;
  background:var(--white);
  border:1px solid var(--line);
  border-radius:18px;
  overflow:hidden;
}

.news-row {
  display:grid;
  grid-template-columns:150px minmax(0,1fr);
  gap:24px;
  align-items:center;
  padding:22px 24px;
  background:var(--white);
}

.news-row + .news-row {
  border-top:1px solid var(--line);
}

.news-row.has-image {
  grid-template-columns:150px minmax(0,1fr) 150px;
}
/* Multiple photos: keep title and description on the left, photos on the right. */
.news-row.has-gallery {
  grid-template-columns:150px minmax(0,1fr) 312px;
  align-items:start;
}
.news-row-photos {
  grid-column:3;
  width:312px; /* two photographs, 150px each, with a 12px gap */
  align-self:start;
}

.news-row-meta {
  align-self:start;
}

.news-row .news-date {
  color:var(--muted);
  font-size:12px;
  font-weight:800;
  line-height:1.4;
  margin-bottom:7px;
}

.news-row .tag {
  display:inline-flex;
  padding:4px 8px;
  border-radius:999px;
  background:var(--soft2);
  color:var(--blue2);
  font-size:10px;
  font-weight:900;
  line-height:1.3;
  letter-spacing:.04em;
}

.news-row-content h2 {
  margin:0 0 5px;
  font-size:18px;
  line-height:1.45;
}

.news-row-content p {
  margin:0;
  color:var(--muted);
  font-size:var(--body-copy-size);
  line-height:1.75;
}

.news-row-image {
  width:150px;
  overflow:hidden;
  border-radius:12px;
  background:var(--soft);
  border:1px solid var(--line);
  align-self:center;
}

.news-row-image img {
  width:100%;
  height:auto;
  object-fit:contain;
  display:block;
}

@media(max-width:820px) {
  .news-row,
  .news-row.has-image,
  .news-row.has-gallery {
    grid-template-columns:110px minmax(0,1fr);
    gap:16px;
  }

  .news-row-photos {
    grid-column:2;
    width:min(312px,100%);
    margin-top:4px;
  }

  .news-row-image {
    grid-column:2;
    width:min(180px,100%);
    margin-top:4px;
  }
}

@media(max-width:560px) {
  .news-row,
  .news-row.has-image,
  .news-row.has-gallery {
    grid-template-columns:1fr;
    gap:10px;
    padding:18px;
  }

  .news-row-photos {
    grid-column:1;
  }

  .news-row-meta {
    display:flex;
    align-items:center;
    gap:10px;
  }

  .news-row .news-date {
    margin:0;
  }

  .news-row-image {
    grid-column:auto;
    width:100%;
    max-width:240px;
  }
}

/* =============================================
   Activities page - one event per row, no tags
   Photographs are never cropped.
   ============================================= */
.activities-list {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
}
.activities-empty {
  padding: 28px 26px;
  margin: 0;
  color: var(--muted);
}
.activity-row {
  display: grid;
  grid-template-columns: 135px minmax(0, 1fr);
  gap: 26px;
  align-items: start;
  padding: 26px 28px;
}
.activity-row.has-image {
  grid-template-columns: 135px minmax(0, 1fr) 200px;
}
.activity-row.has-gallery {
  grid-template-columns: 135px minmax(0, 1fr) 412px;
}
.activity-photos {
  grid-column:3;
  width:412px; /* two photographs, 200px each, with a 12px gap */
  align-self:start;
}
.activity-row + .activity-row { border-top: 1px solid var(--line); }
.activity-date {
  display: block;
  padding-top: 3px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  font-weight: 800;
  white-space: nowrap;
}
.activity-content { min-width: 0; }
.activity-content h2 {
  margin: 0 0 7px;
  font-size: 19px;
  line-height: 1.5;
}
.activity-content p {
  margin: 0;
  color: var(--muted);
  font-size: var(--body-copy-size);
  line-height: 1.85;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.activity-photo {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--soft);
  align-self: start;
}
.activity-photo img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}
@media (max-width: 820px) {
  .activity-row, .activity-row.has-image, .activity-row.has-gallery {
    grid-template-columns: 116px minmax(0, 1fr);
    gap: 14px;
  }
  .activity-photo { grid-column: 2; width: min(220px, 100%); }
  .activity-photos { grid-column: 2; width:min(412px,100%); }
}
@media (max-width: 560px) {
  .activity-row, .activity-row.has-image, .activity-row.has-gallery {
    grid-template-columns: 1fr;
    gap: 11px;
    padding: 20px;
  }
  .activity-content h2 { font-size: 18px; }
  .activity-photo { grid-column: 1; width: min(280px, 100%); }
  .activity-photos { grid-column:1; }
}

/* 8-item navigation: fold to mobile menu before links become crowded. */
@media (min-width: 941px) and (max-width: 1260px) {
  .nav nav ul {
    display: none;
    position: absolute;
    left: 20px;
    right: 20px;
    top: 68px;
    background: white;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 16px;
    box-shadow: var(--shadow);
    flex-direction: column;
    gap: 8px;
  }
  .nav nav ul.open { display: flex; }
  .nav .menu-btn { display: block; }
}


/* =============================================
   Right-hand photo galleries for News and Activities
   Keep the original single-photo sizes (News: 150px; Activities: 200px).
   Two images per row. 3rd/5th images wrap to the next row.
   Preserve each photograph's natural aspect ratio: no cropping.
   ============================================= */
.entry-photo-gallery {
  display:grid;
  grid-template-columns:repeat(2, minmax(0,1fr));
  gap:12px;
  margin:0;
  align-content:start;
  align-items:start;
}
.entry-photo-gallery .entry-photo-link {
  display:block;
  min-width:0;
  border:1px solid var(--line);
  border-radius:12px;
  overflow:hidden;
  background:var(--soft);
}
.entry-photo-gallery .entry-photo-link img {
  display:block;
  width:100%;
  height:auto;
  object-fit:contain;
}
.entry-photo-gallery .entry-photo-link:hover,
.entry-photo-gallery .entry-photo-link:focus-visible {
  border-color:var(--blue2);
}

/* At tablet/compact desktop widths keep the gallery to the right of text.
   The date moves above so the text column does not become too narrow. */
@media (min-width:701px) and (max-width:980px) {
  .news-row.has-gallery {
    grid-template-columns:minmax(0,1fr) 312px;
    gap:12px 22px;
  }
  .news-row.has-gallery .news-row-meta {
    grid-column:1 / -1;
    display:flex;
    align-items:center;
    gap:12px;
  }
  .news-row.has-gallery .news-date { margin:0; }
  .news-row.has-gallery .news-row-content {
    grid-column:1;
    grid-row:2;
  }
  .news-row.has-gallery .news-row-photos {
    grid-column:2;
    grid-row:2;
    width:312px;
    margin:0;
  }
}
@media (min-width:821px) and (max-width:1100px) {
  .activity-row.has-gallery {
    grid-template-columns:minmax(0,1fr) 412px;
    gap:12px 22px;
  }
  .activity-row.has-gallery .activity-date {
    grid-column:1 / -1;
  }
  .activity-row.has-gallery .activity-content {
    grid-column:1;
    grid-row:2;
  }
  .activity-row.has-gallery .activity-photos {
    grid-column:2;
    grid-row:2;
    width:412px;
  }
}
@media (max-width:700px) {
  .news-row.has-gallery .news-row-photos {
    grid-column:2;
    grid-row:auto;
    width:min(312px,100%);
  }
}
@media (max-width:560px) {
  .news-row.has-gallery .news-row-photos { grid-column:1; }
}
@media (max-width:820px) {
  .activity-row.has-gallery .activity-photos {
    width:min(412px,100%);
  }
}
