*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: #1f2933;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.7;
  background-image: url("../image/background.png");
  background-repeat: repeat;
  background-position: top left;
}

a {
  color: #005bac;
  text-underline-offset: 0.18em;
}

a:hover,
a:focus-visible {
  text-decoration-thickness: 0.14em;
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.page {
  width: 80%;
  max-width: 1180px;
  min-height: calc(100vh - 48px);
  margin: 24px auto;
  padding: 40px;
  background-color: rgba(243, 240, 240, 0.91);
  box-shadow: 0 0 32px rgba(0, 0, 0, 0.14);
  overflow-wrap: anywhere;
}

#page-top,
.section-title {
  scroll-margin-top: 24px;
}

/*** ヘッダー部(見出し)に関するレイアウト ***/
.site-header {
  margin-bottom: 48px;
  padding-top: 32px;
}

.page-title {
  max-width: 1080px;
  margin: 0 auto;
  text-align: center;
}

.page-title img {
  display: block;
  width: 100%;
  margin-inline: auto;
}

/*** メニュー関するレイアウト ***/ 
.site-nav {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 1000;
}

.site-menu {
  position: relative;
}

.menu-button {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border: 1px solid rgba(31, 41, 51, 0.35);
  border-radius: 999px;
  background-color: rgba(255, 255, 255, 0.88);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.14);
  cursor: pointer;
  list-style: none;
}

.menu-button::-webkit-details-marker {
  display: none;
}

.menu-button:hover,
.menu-button:focus-visible {
  background-color: rgba(255, 255, 255, 0.98);
}

.menu-icon,
.menu-icon::before,
.menu-icon::after {
  display: block;
  width: 1.35rem;
  height: 2px;
  border-radius: 999px;
  background-color: currentColor;
}

.menu-icon {
  position: relative;
}

.menu-icon::before,
.menu-icon::after {
  position: absolute;
  left: 0;
  content: "";
}

.menu-icon::before {
  top: -7px;
}

.menu-icon::after {
  top: 7px;
}

.menu-list {
  position: absolute;
  top: calc(100% + 0.55rem);
  right: 0;
  width: max-content;
  min-width: 12rem;
  margin: 0;
  padding: 0.5rem;
  border: 1px solid rgba(31, 41, 51, 0.35);
  border-radius: 12px;
  background-color: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  list-style: none;
}

.menu-list a {
  display: block;
  padding: 0.55rem 0.8rem;
  border-radius: 8px;
  color: #1f2933;
  text-decoration: none;
  white-space: nowrap;
}

.menu-list a:hover,
.menu-list a:focus-visible {
  background-color: rgba(0, 91, 172, 0.1);
}

/*** メインコンテンツに関するレイアウト ***/
.site-main {
  display: grid;
  gap: 48px;
  max-width: 1080px;
  margin: 0 auto;
}

.full-entry{
    display:inline-block;
    background:#fffcf6;
    border:2px solid #ffd59e;
    color:#d86507;
    padding:10px 18px;
    border-radius:999px;
    font-size:15px;
    font-weight:bold;
}

/* 幅がおかしかったので追加修正 */
.site-main > section {
  max-width: 100%;
  overflow: hidden;
}

.section-title {
  margin: 0 0 0.8em;
  text-align: center;
  font-size: 1.8rem;
  line-height: 1.35;
}

/*** 概要に関するレイアウト ***/
.lead-text {
  margin: 0 0 0.8em;
  font-size: 1.2rem;
  text-align: center;
}

.lead-text strong {
  display: block;
  margin-bottom: 0.5em;
  font-size: 1.45rem;
}

/* 写真部分 */
.facility-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.facility-gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.16);
}

/* キャプションのレイアウト追加 */
.facility-gallery li {
  position: relative;
}

.facility-gallery li span {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 4px 8px;
  font-size: 0.85rem;
  background-color: rgba(255, 255, 255, 0.8); /* 半透明白 */
  border-radius: 4px;
}

/*** 講座一覧に関するレイアウト ***/
/* tableをPC用とスマホ用の2つ用意していることに注意 */
.program-table {
  width: 100%;
  border-collapse: collapse;
  background-color: rgba(255, 255, 255, 0.52);
  table-layout: fixed;
}

.program-table th,
.program-table td {
  border: 1px solid rgba(31, 41, 51, 0.35);
  padding: 12px;
  vertical-align: middle;
}

.program-table thead th,
.course-title th {
  background-color: rgba(255, 255, 255, 0.72);
  text-align: center;
}

.pc-table th:nth-child(1),
.pc-table td:nth-child(1) {
  width: 15%;
  text-align: center;
  white-space: nowrap;
}

.pc-table th:nth-child(2),
.pc-table td:nth-child(2) {
  width: 30%;
}

.pc-table th:nth-child(3),
.pc-table td:nth-child(3) {
  width: 25%;
}

.pc-table th:nth-child(4),
.pc-table td:nth-child(4),
.pc-table th:nth-child(5),
.pc-table td:nth-child(5) {
  width: 15%;
  text-align: center;
}

.sp-table {
  display: none;
  text-align: center;
}

.sp-table th[scope="row"] {
  width: 5.5em;
  background-color: rgba(255, 255, 255, 0.45);
  text-align: center;
  white-space: nowrap;
}

.course-title:not(:first-child) th {
  border-top-width: 10px;
}

.program-table a {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  justify-content: center;
  min-height: 2.2em;
  padding: 0.2em 0.75em;
  border: 1px solid currentColor;
  border-radius: 999px;
  background-color: rgba(255, 255, 255, 0.5);
  line-height: 1.3;
  font-weight: 700;
  text-decoration: none;
}

.program-table a:hover,
.program-table a:focus-visible {
  text-decoration: underline;
}

/* 注意事項追記 */
.table-note {
  max-width: 100%;
  margin: 8px 12px;
  line-height: 1.6;
}

/*** 注意事項、アクセスに関するレイアウト ***/
.notice-list,
.access-list {
  margin: 0;
  padding-left: 1.4em;
  max-width: 840px;
  margin-inline: auto;
}

.notice-list li + li,
.access-list li + li {
  margin-top: 0.6em;
}

.access-figure {
  margin: 1.4em 0 0;
  text-align: center;
  max-width: 840px;
  margin-inline: auto;
}

.access-figure img {
  width: min(100%, 640px);
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.16);
}

.access-figure figcaption {
  margin-top: 0.8em;
}

/*** フッター部に関するレイアウト ***/
.site-footer {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid rgba(31, 41, 51, 0.35);
  text-align: center;
}

/*** 画面のサイズに合わせて調整するレイアウト ***/
@media (max-width: 960px) {
  .page {
    width: 95%;
    min-height: calc(100vh - 24px);
    margin-block: 12px;
    padding: 20px;
  }

  .site-header {
    padding-top: 42px;
  }

  .facility-gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .pc-table {
    display: none;
  }

  .sp-table {
    display: table;
  }
}

@media (max-width: 480px) {
  .page {
    padding: 16px;
  }

  .menu-button {
    width: 2.75rem;
    height: 2.75rem;
  }

  .menu-list {
    min-width: 10.5rem;
  }

.lead-text {
  font-size: 1.1rem;
}

.lead-text strong {
  font-size: 1.2rem;
}
  .program-table th,
  .program-table td {
    padding: 10px;
  }
}
