/* =====================================================
  下層ページ共通
===================================================== */

.page-hero {}

.page-hero-inner {
  padding: 40px 0;
}

.page-hero h1.page-title {
  margin-left: 2em;
  margin-top: 0;
  padding: 0.5rem 0 0.5rem 1.4em;
  position: relative;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-image: linear-gradient(to right,
      var(--c-mecha),
      var(--c-agri),
      var(--c-create)) 1;
}

.child-page .page-hero h1.page-title {
  border-bottom: 4px solid transparent;
}

.page-hero h1.page-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: -4px;
  bottom: -4px;
  width: 1em;
  background: linear-gradient(to right,
      var(--c-mecha) 0%,
      var(--c-mecha) 33.3%,
      var(--c-agri) 33.3%,
      var(--c-agri) 66.6%,
      var(--c-create) 66.6%,
      var(--c-create) 100%);
}

.page-title-jp {
  font-size: clamp(1.8rem. 4vw, 2.6rem);
  font-weight: 900;
}

.page-title .page-title-jp {
  margin: 0;
  color: var(--c-agri);
  font-weight: 700;
}

.child-page h1.page-title,
.club-archive h1.club-archive-title {
  position: relative;
  margin-bottom: 0.2rem;
  padding: 1rem 0;
  border-bottom: 2px solid var(--c-agri);
}

.child-page h1.page-title::before,
.club-archive h1.club-archive-title::before {
  position: absolute;
  content: '';
  width: 10%;
  left: 0;
  bottom: -2px;
  border-bottom: 4px solid #cdd20d;
}

.page-title-en {
  display: block;
  font-size: .8rem;
  letter-spacing: .3em;
  margin-bottom: 6px;
  color: var(--c-mecha);
  /* text-shadow: 0px 1px 2px #000000ED; */
}


/* ---------- パンくず ---------- */

.breadcrumb {
  color: #6b7280;
  margin-bottom: 12px;
  padding: 1rem 2rem;
}

.breadcrumb_last {
  color: var(--c-main);
}

.custom-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  opacity: 0;
  animation: fadeIn 0.2s ease forwards;
}

.custom-lightbox.is-closing {
  animation: fadeOut 0.2s ease forwards;
}

.custom-lightbox-inner {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
}

.custom-lightbox-inner img {
  max-width: 100%;
  max-height: 90vh;
  display: block;
  border-radius: 4px;
}

.custom-lightbox-close {
  position: fixed;
  top: 20px;
  right: 30px;
  background: none;
  border: none;
  color: #fff;
  font-size: 40px;
  cursor: pointer;
  line-height: 1;
}

.custom-lightbox-close:hover {
  opacity: 0.7;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

table.table_01 {
  border-collapse: collapse;
  border: solid 1px #999999;
  margin-left: 10px;
  padding: 5px;
}

table.table_01 th {
  padding: 5px;
  border: solid 1px #999999;
  font-weight: bold;
  text-align: center;
}

table.table_01 td {
  padding: 5px;
  border: solid 1px #999999;
}

table.table_01 td.column-1,
table.table_01 th.column-1 {
  white-space: nowrap;
  max-width: 30%;
  width: 10%;
}


table.table_02 {
  border-collapse: collapse;
  border: solid 1px #999999;
  margin-left: 10px;
  padding: 5px;
}

table.table_02 th {
  padding: 5px;
  border: solid 1px #999999;
  font-weight: bold;
  text-align: center;
}

table.table_02 td {
  padding: 5px;
  border: solid 1px #999999;
  text-align: center;
  vertical-align: middle;
}

@media screen and (max-width: 785px) {
  .page-hero h1.page-title {
    margin-left: 0;
  }
}

/* =====================================================
  学校案内
===================================================== */
.about.container {
  margin: 30px auto 80px;
}

.about-block-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 64px 48px;
  margin-bottom: 80px;
}

.about-block-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 24px;
  border-bottom: 1px solid #ddd;
  padding-bottom: 12px;
  padding-left: 0rem;
  color: var(--text);
}

/* ---------- 各ブロック内リスト ---------- */

.about-item-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.about-item {
  border-bottom: 1px solid #eee;
}

.about-item-link {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 2rem;
  padding: 14px 4px;
  text-decoration: none;
  color: #111;
  transition: background-color .3s ease;
}

.about-item-link:hover {
  background-color: #f6f9fc;
}

.about-item-link:hover .pdf-icon {
  transform: scale(1.2);
  filter: brightness(0) saturate(100%) invert(32%) sepia(78%) saturate(746%) hue-rotate(190deg);
}

.about-item-text {
  line-height: 1.6;
  transition: color .3s ease;
}

.about-item-link:hover .about-item-text {
  color: var(--c-main);
  font-weight: 700;
}

.pdf-icon {
  width: 18px;
  height: auto;
  margin-left: 6px;
  transition: transform .3s ease;
}

.about-item-arrow {
  margin-left: auto;
  font-weight: 700;
  transition: transform .3s ease, color .3s ease;
  color: #111;
}

.about-item-link:hover .about-item-arrow {
  transform: translateX(6px);
  color: var(--c-main);
}

/* ---------- レスポンシブ ---------- */

@media (max-width: 900px) {
  .about-block-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .about-block-grid {
    grid-template-columns: 1fr;
  }

  .about-block-title {
    font-size: 1.4rem;
  }

  .about-item-link {
    padding: 12px 0;
  }
}

.page-section {
  padding: 1rem 0;
}

.links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

@media (max-width: 768px) {
  .links {
    grid-template-columns: 1fr;
  }
}

.links-item {
  position: relative;
  display: block;
  border: 1px solid #ddd;
  text-decoration: none;
  background: #fff;
  overflow: hidden;
  transition: box-shadow .3s;
}

.links-item:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
}

.links-item:hover .links-title {
  color: var(--c-main);
}

.links-arrow {
  position: absolute;
  right: 20px;
  bottom: 16px;
  font-weight: 700;
}

.links-arrow::before {
  content: "→";
  position: absolute;
  left: -28px;
  color: var(--c-main);
  opacity: 0;
}

.links-item:hover .links-arrow {
  animation: arrow-out .3s ease;
  color: var(--c-main);
}

.links-item:hover .links-arrow::before {
  animation: arrow-in .3s ease;
  color: var(--c-main);
}

@keyframes arrow-out {
  from {
    transform: translateX(0);
    opacity: 1;
  }

  to {
    transform: translateX(18px);
    opacity: 0;
  }
}

@keyframes arrow-in {
  from {
    transform: translateX(0);
    opacity: 0;
  }

  to {
    transform: translateX(28px);
    opacity: 1;
  }
}

.links-image img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform .5s ease;
}

.links-item:hover .links-image img {
  transform: scale(1.08);
}

.links-body {
  padding: 16px 20px 40px;
}

.links-date {
  font-size: 13px;
  color: #666;
}

.links-title {
  font-size: 1.1rem;
  line-height: 1.6;
  font-weight: 700;
}

.topics-tag {
  display: inline-block;
  padding: 3px 12px;
  font-size: .8rem;
  border-radius: 999px;
  margin-bottom: 6px;
}

/* =========================
   行事・活動 セクション調整
========================= */
.record-section {
  margin-top: 60px;
}

.record-main-title {
  padding-left: 16px;
  color: var(--c-main);
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0 0 20px;
  border-left: 4px solid var(--c-main);
}

.record-lead {
  font-size: 1.2rem;
  /* font-weight: 700; */
  font-weight: 500;
  margin-bottom: 12px;
  position: relative;
  color: var(--c-main);
}

.record-lead::after {
  content: "";
  display: block;
  width: 60px;
  /* height: 4px; */
  height: 2px;
  background: #cdd20d;
  margin-top: 2px;
}

.record-text {
  margin-bottom: 40px;
  line-height: 1.8;
}

.about-item-list {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

.about-item {
  /* border: none; */
  width: calc(50% - 1rem);
}

/* 3列にしたい場合はこっち
.about-item {
  width: calc(33.333% - 1.34rem);
}
*/

.about-item-link {
  padding: 0.5rem 0;
}

@media (max-width: 768px) {

  .about-item-list {
    flex-direction: column;
    gap: 0;
  }

  .about-item {
    width: 100%;
    border-bottom: 1px solid #eee;
  }

}


main.main-content.container {
  margin-bottom: 40px;
}

.main-content.container h2 {
  color: var(--c-main);
  padding-left: 1rem;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0 0 20px;
  padding-left: 1rem;
  position: relative;
}


.main-content.container h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2em;
  width: 3px;
  height: 1.5em;
  background-color: var(--c-main);
  border-radius: 999px;
}

.sitemap-container {
  padding: 60px 20px;
}

.sitemap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 40px 20px;
  align-items: start;
}

.sitemap-parent-title {
  font-size: 1.25rem;
  color: #3b49ad;
  border-left: 4px solid #3b49ad;
  padding-left: 15px;
  margin-bottom: 15px;
  font-weight: bold;
}

.sitemap-parent-title a {
  text-decoration: none;
  color: inherit;
}

.sitemap-child-list,
.sitemap-grandchild-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sitemap-child-item {
  margin-bottom: 5px;
  border-bottom: 1px solid #eee;
}

.sitemap-child-item>a {
  display: block;
  padding: 8px 0;
  text-decoration: none;
  color: #333;
  font-weight: bold;
}

.sitemap-grandchild-list {
  padding-left: 15px;
  padding-bottom: 10px;
}

.sitemap-grandchild-item a {
  display: block;
  padding: 4px 0;
  text-decoration: none;
  color: #666;
  font-size: 0.9rem;
}

.sitemap-grandchild-item a::before {
  content: "ー ";
  color: #999;
}

.sitemap-grid a:hover {
  text-decoration: underline;
  opacity: 0.7;
}

@media (max-width: 768px) {
  .sitemap-grid {
    grid-template-columns: 1fr;
  }
}


/* =========================
404ページ
========================= */
.error-404-canvas {
  width: 100%;
  height: 100vh;
  background: url('../img/404-bg.jpg') no-repeat center center;
  background-size: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
}

.error-content {
  margin-top: 220px;
  z-index: 10;
  padding: 0 20px;
}

.text-group {
  background: rgba(0, 0, 0, 0.4);
  padding: 1.2rem 1rem;
  margin-bottom: 20px;
}

.text-group p {
  color: #fff;
  font-size: 1.1rem;
  line-height: 1.8;
  font-weight: 600;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  margin: 0;
}

.back-home {
  display: inline-block;
  background: #fff;
  color: #333 !important;
  padding: 12px 35px;
  text-decoration: none;
  font-weight: bold;
  border-radius: 50px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  text-shadow: none !important;
  transition: all 0.3s ease;
}

.back-home:hover {
  background: #f0f0f0;
  transform: translateY(-3px);
  box-shadow: 0 15px 25px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
  .error-content {
    margin-top: 150px;
  }

  .text-group p {
    font-size: 0.95rem;
  }
}

.error404 #colophon,
.error404 footer {
  display: none !important;
}