.admission-lead {
  margin: 1.5rem 0 2rem;
}

.admission-gallery {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 0.75rem;
  margin: 1.25rem 0 1.5rem;
}

.admission-gallery-main,
.admission-gallery-sub {
  min-width: 0;
}

.admission-gallery-main img,
.admission-gallery-sub img {
  display: block;
  width: 100%;
  object-fit: cover;
}

.admission-gallery-main img {
  height: 320px;
}

.admission-gallery-sub {
  display: grid;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.admission-gallery-sub img {
  height: 154px;
}
.learning-grid,
.activity-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 1rem 0 1.75rem;
}
.learning-card,
.activity-card {
  box-sizing: border-box;
  padding: 1rem 1.15rem;
  border: 1px solid #c9d8e6;
  border-top: 4px solid #1674b7;
  background: #f7fbfe;
}
.learning-card h3,
.activity-card h3 {
  margin-top: 0;
}
.link-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1rem 0 1.5rem;
}
.link-actions a {
  display: inline-block;
  padding: 0.65rem 1rem;
  border-radius: 4px;
  background: #176fa8;
  color: #fff;
  font-weight: bold;
  text-decoration: none;
}
.link-actions a:hover,
.link-actions a:focus {
  background: #0f4f79;
  text-decoration: underline;
}
.contact-summary {
  margin-top: 1rem;
  padding: 1rem 1.2rem;
  border: 1px solid #c9d8e6;
  background: #f7fbfe;
}

/* 学生の活動 */

.activity-grid {
  align-items: stretch;
}

.activity-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* カード本文 */
.activity-card > p:not(.activity-action) {
  margin-bottom: 1rem;
}

/* 左右共通の画像領域 */
.activity-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  height: 190px;
  margin-top: auto;
  padding: 0.75rem;
  overflow: hidden;
  border: 1px solid #c9d8e6;
  border-radius: 4px;
  background: #fff;
}

/* 画像リンク */
.activity-image-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border-radius: 3px;
  text-decoration: none;
  transition:
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

/* 両画像の共通指定 */
.activity-image {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 160px;
}

/* CDPロゴ */
.activity-image-logo {
  max-width: 145px;
  object-fit: contain;
}

/* 受賞写真 */
.activity-image-photo {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

/* 画像がリンクであることを示す */
.activity-image-link:hover,
.activity-image-link:focus {
  box-shadow: 0 3px 10px rgba(15, 79, 121, 0.18);
  transform: translateY(-2px);
}

.activity-image-link:focus-visible {
  outline: 3px solid #f3aa20;
  outline-offset: 3px;
}

/* 画像下のリンク */
.activity-action {
  margin: 0.9rem 0 0;
  text-align: center;
}

.activity-action a {
  display: inline-block;
  padding: 0.6rem 0.85rem;
  border-radius: 4px;
  background: #176fa8;
  color: #fff;
  font-weight: bold;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
}

.activity-action a:hover,
.activity-action a:focus {
  background: #0f4f79;
  text-decoration: underline;
}

.activity-action a:focus-visible {
  outline: 3px solid #f3aa20;
  outline-offset: 3px;
}

/* オープンキャンパス */
.opencampus-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 1rem 0 1.75rem;
}

.opencampus-item {
  min-width: 0;
  margin: 0;
}

.opencampus-item img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.opencampus-item figcaption {
  margin-top: 0.5rem;
  color: #334e62;
  font-size: 0.95em;
  line-height: 1.5;
  text-align: center;
}

@media screen and (max-width: 800px) {
.admission-gallery {
  grid-template-columns: 1fr;
}

.admission-gallery-main img {
  height: auto;
  aspect-ratio: 16 / 9;
}

.admission-gallery-sub {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: auto;
}

.admission-gallery-sub img {
  height: auto;
  min-height: 0;
  aspect-ratio: 16 / 9;
}
  .learning-grid,
  .activity-grid {
    grid-template-columns: 1fr;
  }
  .activity-visual {
    height: 180px;
  }

  .activity-image {
    max-height: 150px;
  }

  .activity-image-logo {
    max-width: 135px;
  }

  .activity-image-photo {
    height: 150px;
  }
/* オープンキャンパス */
.opencampus-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 1rem 0 1.75rem;
}

.opencampus-item {
  min-width: 0;
  margin: 0;
}

.opencampus-item img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

 .opencampus-item figcaption {
   margin-top: 0.5rem;
   color: #334e62;
   font-size: 0.95em;
   line-height: 1.5;
   text-align: center;
 }
}


@media screen and (max-width: 520px) {
  .admission-gallery-sub {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .admission-gallery-main img,
  .admission-gallery-sub img {
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: 16 / 9;
    object-fit: cover;
  }

  .link-actions {
    display: block;
  }

  .link-actions a {
    display: block;
    margin-bottom: 0.75rem;
    text-align: center;
  }
}

@media print {
  .admission-gallery-main img,
  .admission-gallery-sub img {
    height: auto;
  }

  .admission-gallery {
    display: block;
  }

  .admission-gallery-sub {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    margin-top: 0.75rem;
  }

  .learning-card,
  .activity-card {
    break-inside: avoid;
  }
}