:root {
  --kit-blue: #005bac;
  --kit-deep-blue: #003e7e;
  --kit-sky: #eaf4ff;
  --kit-yellow: #ffd966;
  --text: #102033;
  --sub: #587089;
  --line: #d5e2ee;
  --bg: #f7fbff;
  --white: #ffffff;
  --shadow: 0 16px 40px rgba(0, 50, 100, 0.10);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--white);
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  line-height: 1.8;
}

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

a {
  color: inherit;
}

/* =========================
   ヘッダー
========================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 4px solid var(--kit-blue);
}

.site-header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.site-logo {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  background: var(--kit-blue);
  color: var(--white);
  font-weight: 900;
  letter-spacing: 0.04em;
  flex: 0 0 auto;
}

.site-logo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 150px;
  max-width: 34vw;
  text-decoration: none;
  flex: 0 0 auto;
}

.site-logo-img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 54px;
  object-fit: contain;
}

.site-title p {
  margin: 0;
  color: var(--sub);
  font-size: 11px;
  letter-spacing: 0.14em;
  font-weight: 800;
}

.site-title h1 {
  margin: 0;
  font-size: clamp(18px, 2.2vw, 24px);
  line-height: 1.35;
}

.header-nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  font-size: 14px;
  font-weight: 800;
}

.header-nav a {
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--kit-sky);
  color: var(--kit-deep-blue);
}

.header-nav a:hover {
  background: var(--kit-blue);
  color: var(--white);
}

/* =========================
   青帯：背景写真スライダー
========================= */

.hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background: linear-gradient(135deg, var(--kit-deep-blue), var(--kit-blue));
}

.hero-with-bg-slider {
  min-height: 520px;
}

.project-detail-hero.hero-with-bg-slider {
  min-height: 420px;
}

.compact-detail-hero {
  min-height: 320px;
}

.hero-bg-slider {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.5s ease;
}

.hero-bg-slide.is-active {
  opacity: 1;
}

.hero-bg-slide img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.04) brightness(1.12);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(135deg, rgba(0, 40, 95, 0.58), rgba(0, 91, 172, 0.38)),
    radial-gradient(circle at 85% 15%, rgba(255, 217, 102, 0.14), transparent 25%);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(to right, rgba(0, 25, 65, 0.48), rgba(0, 70, 140, 0.08) 62%, rgba(0, 30, 80, 0.28));
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 3;
  max-width: 1180px;
  margin: 0 auto;
  padding: 88px 20px 76px;
  display: grid;
  grid-template-columns: 1.45fr 0.75fr;
  gap: 34px;
  align-items: center;
}

.project-detail-hero .hero-inner {
  padding-top: 74px;
  padding-bottom: 68px;
}

.compact-detail-hero .hero-inner {
  padding-top: 48px;
  padding-bottom: 46px;
}

.hero-label {
  display: inline-flex;
  margin: 0 0 18px;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 999px;
  background: rgba(0, 50, 110, 0.22);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.compact-detail-hero .hero-label {
  margin-bottom: 12px;
}

.hero h2 {
  margin: 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.18;
  font-weight: 900;
  letter-spacing: -0.04em;
  text-shadow: 0 4px 24px rgba(0, 15, 45, 0.62);
}

.compact-detail-hero h2 {
  font-size: clamp(34px, 5vw, 58px);
}

.hero-lead {
  max-width: 760px;
  margin: 20px 0 0;
  font-size: 17px;
  text-shadow: 0 3px 18px rgba(0, 15, 45, 0.58);
}

.compact-detail-hero .hero-lead {
  margin-top: 14px;
  font-size: 16px;
  line-height: 1.7;
}

.hero-panel {
  background: rgba(0, 42, 92, 0.40);
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 20px 45px rgba(0, 20, 60, 0.24);
  backdrop-filter: blur(7px);
}

.hero-panel strong {
  display: block;
  font-size: 52px;
  line-height: 1;
  color: var(--kit-yellow);
}

.hero-panel span {
  font-weight: 900;
  letter-spacing: 0.06em;
}

.hero-panel p {
  margin: 10px 0 0;
  font-size: 14px;
}

.hero-plus {
  display: inline-block;
  margin: 0 0.08em;
  font-size: 0.72em;
  line-height: 1;
  vertical-align: 0.08em;
}

/* =========================
   共通セクション
========================= */

.section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 62px 20px;
}

.section-narrow {
  max-width: 940px;
}

.section-blue {
  max-width: none;
  background: var(--bg);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-blue > .section-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 62px 20px;
}

.section-title {
  margin-bottom: 26px;
}

.section-title p {
  margin: 0 0 6px;
  color: var(--kit-blue);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.10em;
}

.section-title h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.25;
  font-weight: 900;
}

.lead-box {
  border: 2px solid var(--line);
  border-left: 12px solid var(--kit-blue);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 28px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.lead-box p {
  margin: 0;
  font-size: 17px;
}

/* =========================
   ABOUT：課外教育活動・夢考房
========================= */

.about-projects {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.about-card {
  height: 100%;
}

.about-card h3 {
  margin: 0 0 12px;
  color: var(--kit-deep-blue);
  font-size: 24px;
  line-height: 1.4;
  font-weight: 900;
}

.about-card p {
  margin: 0 0 14px;
}

.about-card p:last-child {
  margin-bottom: 0;
}

.about-note {
  color: var(--kit-blue);
  font-weight: 900;
}

.about-button {
  width: fit-content;
  margin-top: 10px;
}

/* =========================
   検索・絞り込み
========================= */

.finder {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.search-box {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 16px;
  background: var(--white);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.search-box label {
  font-weight: 900;
  color: var(--kit-deep-blue);
  white-space: nowrap;
}

.search-box input {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font: inherit;
  line-height: 1.4;
}

.category-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-button {
  border: 2px solid var(--kit-blue);
  background: var(--white);
  color: var(--kit-deep-blue);
  border-radius: 999px;
  padding: 10px 15px;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.filter-button.is-active,
.filter-button:hover {
  background: var(--kit-blue);
  color: var(--white);
}

/* =========================
   プロジェクトカード
========================= */

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 28px;
}

.project-card {
  display: flex;
  flex-direction: column;
  min-height: 250px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.project-card[hidden] {
  display: none;
}

.project-card-head {
  display: flex;
  justify-content: flex-start;
  gap: 10px;
  align-items: center;
  padding: 14px 16px;
  background: linear-gradient(90deg, var(--kit-deep-blue), var(--kit-blue));
  color: var(--white);
}

.project-category {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.project-card-photo {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--kit-sky);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.project-card-photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.project-card:hover .project-card-photo img {
  transform: scale(1.04);
}

.project-card-body {
  padding: 18px;
  display: flex;
  flex: 1;
  flex-direction: column;
}

.project-card h3 {
  margin: 0 0 10px;
  font-size: 19px;
  line-height: 1.45;
}

.project-card p {
  margin: 0 0 16px;
  color: var(--sub);
  font-size: 14px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 8px;
}

.project-tags span {
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--kit-sky);
  color: var(--kit-deep-blue);
  font-size: 12px;
  font-weight: 800;
}

.project-link {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  margin-top: 16px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--kit-blue);
  color: var(--white);
  text-decoration: none;
  font-weight: 900;
}

.project-link:hover {
  background: var(--kit-deep-blue);
}

/* =========================
   プロジェクトカード内：複数テーマ表示
========================= */

.project-theme-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 12px;
  padding-top: 2px;
}

.project-theme-label {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eef6ff;
  color: var(--kit-deep-blue);
  border: 1px solid var(--line);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.4;
}

.project-theme-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(0, 91, 172, 0.08);
  color: var(--kit-blue);
  border: 1px solid rgba(0, 91, 172, 0.18);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.4;
}

.project-theme-tags + .project-tags {
  margin-top: 0;
}

/* =========================
   詳細ページ用
========================= */

.project-detail-layout {
  grid-template-columns: 1.25fr 0.75fr;
  align-items: center;
}

.project-detail-layout-compact {
  grid-template-columns: 1.25fr 0.55fr;
  align-items: center;
}

.project-detail-copy {
  min-width: 0;
}

.project-theme-card {
  align-self: center;
  padding: 18px 20px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: var(--radius);
  background: rgba(0, 42, 92, 0.40);
  color: var(--white);
  box-shadow: 0 16px 36px rgba(0, 20, 60, 0.22);
  backdrop-filter: blur(7px);
}

.project-theme-card span {
  display: block;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  opacity: 0.9;
}

.project-theme-card strong {
  display: block;
  margin-top: 4px;
  color: var(--kit-yellow);
  font-size: 22px;
  line-height: 1.35;
}

.project-theme-card p {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.6;
}

.project-compact-section {
  padding-top: 38px;
  padding-bottom: 38px;
}

.project-compact-section .section-title {
  margin-bottom: 16px;
}

.project-compact-section .section-title p {
  margin-bottom: 3px;
  font-size: 12px;
}

.project-compact-section .section-title h2 {
  font-size: clamp(24px, 3vw, 34px);
}

.project-compact-section .lead-box {
  padding: 20px 24px;
  border-left-width: 8px;
}

.project-compact-section .lead-box p {
  font-size: 15.5px;
  line-height: 1.75;
}

.project-point-list {
  margin: 18px 0 0;
  padding-left: 1.4em;
}

.project-point-list li {
  margin: 4px 0;
}

/* =========================
   問い合わせ欄
========================= */

.contact-compact {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}

.contact-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.contact-item {
  padding: 16px;
  background: var(--bg);
  border-left: 5px solid var(--kit-blue);
  border-radius: 12px;
}

.contact-label {
  display: inline-block;
  margin-bottom: 6px;
  color: var(--kit-deep-blue);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.contact-item p {
  margin: 0;
  line-height: 1.7;
}

.contact-item a {
  color: var(--kit-blue);
  font-weight: 800;
  word-break: break-all;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.contact-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 110px;
  padding: 9px 14px;
  border-radius: 999px;
  background: var(--kit-blue);
  color: var(--white);
  text-decoration: none;
  font-size: 14px;
  font-weight: 900;
}

.contact-links a:hover {
  background: var(--kit-deep-blue);
}

.project-compact-section .contact-compact {
  padding: 18px;
}

.project-compact-section .contact-item {
  padding: 13px 15px;
}

.project-compact-section .contact-item p {
  font-size: 14px;
  line-height: 1.65;
}

/* =========================
   フッター
========================= */

.page-footer {
  background: #072b54;
  color: var(--white);
}

.page-footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 34px 20px 22px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.page-footer a {
  color: var(--white);
  font-weight: 900;
}

.footer-main,
.footer-contact,
.footer-link {
  min-width: 220px;
}

.footer-main {
  flex: 1.2;
}

.footer-contact {
  flex: 1.2;
  line-height: 1.8;
  font-size: 14px;
}

.footer-contact strong {
  font-size: 15px;
}

.footer-contact a {
  color: var(--white);
  text-decoration: underline;
  text-underline-offset: 3px;
  word-break: break-all;
}

.footer-link {
  flex: 0.6;
  text-align: right;
}

.footer-copy {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px 22px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 12px;
}

.footer-copy small {
  font-size: inherit;
}

/* =========================
   ページ上部へ戻るボタン
========================= */

.page-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  display: none;
  padding: 12px 14px;
  border-radius: 999px;
  background: var(--kit-blue);
  color: var(--white);
  text-decoration: none;
  font-weight: 900;
  box-shadow: var(--shadow);
}

.page-top.is-visible {
  display: inline-flex;
}

.page-top:hover {
  background: var(--kit-deep-blue);
}

/* =========================
   動きを減らす設定への配慮
========================= */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-bg-slide,
  .project-card-photo img {
    transition: none;
  }
}

/* =========================
   タブレット対応
========================= */

@media (max-width: 960px) {
  .hero-with-bg-slider,
  .project-detail-hero.hero-with-bg-slider,
  .compact-detail-hero {
    min-height: auto;
  }

  .hero-inner {
    grid-template-columns: 1fr;
  }

  .project-detail-layout,
  .project-detail-layout-compact {
    grid-template-columns: 1fr;
  }

  .project-theme-card {
    max-width: 420px;
  }

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

  .header-nav {
    display: none;
  }

  .footer-link {
    text-align: left;
  }
}

/* =========================
   スマートフォン対応
========================= */

@media (max-width: 760px) {
  .about-projects {
    grid-template-columns: 1fr;
  }

  .about-card h3 {
    font-size: 21px;
  }
}

@media (max-width: 640px) {
  html {
    scroll-padding-top: 72px;
  }

  .site-header-inner {
    align-items: flex-start;
  }

  .brand {
    gap: 10px;
  }

  .site-logo {
    width: 46px;
    height: 46px;
  }

  .site-logo-link {
    width: 120px;
    max-width: 42vw;
  }

  .site-logo-img {
    max-height: 46px;
  }

  .site-title p {
    font-size: 10px;
    letter-spacing: 0.08em;
  }

  .site-title h1 {
    font-size: 17px;
  }

  .hero-inner {
    padding: 62px 20px 54px;
  }

  .project-detail-hero .hero-inner {
    padding-top: 58px;
    padding-bottom: 52px;
  }

  .compact-detail-hero .hero-inner {
    padding-top: 42px;
    padding-bottom: 40px;
  }

  .hero h2 {
    font-size: clamp(32px, 10vw, 44px);
  }

  .compact-detail-hero h2 {
    font-size: clamp(32px, 10vw, 44px);
  }

  .hero-lead {
    font-size: 16px;
  }

  .hero-panel {
    padding: 20px;
  }

  .hero-panel strong {
    font-size: 44px;
  }

  .project-theme-card {
    padding: 16px 18px;
  }

  .section,
  .section-blue > .section-inner {
    padding: 46px 18px;
  }

  .project-compact-section {
    padding-top: 32px;
    padding-bottom: 32px;
  }

  .lead-box {
    padding: 22px;
    border-left-width: 8px;
  }

  .project-compact-section .lead-box {
    padding: 18px 20px;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }

  .search-box {
    flex-direction: column;
    align-items: stretch;
  }

  .category-filter {
    gap: 8px;
  }

  .filter-button {
    padding: 9px 12px;
    font-size: 14px;
  }

  .contact-main {
    grid-template-columns: 1fr;
  }

  .contact-compact {
    padding: 18px;
  }

  .contact-links a {
    flex: 1;
    min-width: 0;
  }

  .page-footer-inner {
    display: block;
    padding: 30px 20px 18px;
  }

  .footer-main,
  .footer-contact,
  .footer-link {
    width: 100%;
    min-width: 0;
    margin-bottom: 20px;
    text-align: left;
  }

  .footer-link {
    margin-bottom: 0;
  }

  .footer-copy {
    padding: 0 20px 22px;
  }

  .project-theme-tags {
    gap: 5px;
  }

  .project-theme-label,
  .project-theme-tag {
    font-size: 10.5px;
    padding: 3px 7px;
  }
}