* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: sans-serif;
  background: #f9f9f9;
  color: #333;
  padding-top: 112px; /* topheader40 + ヘッダー分おそらく72の余白を確保 */
  overflow-x: hidden;
  word-wrap: break-word;
}
/* 背景画像　*/
body::before {
  content: "";
  position: fixed; /* スクロールしても背景固定 */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("images/background.jpg"); /* 画像パスは適宜変更 */
  background-size: cover;
  background-position: center;
  opacity: 0.25; /* 透過率（0〜1）を調整 */
  z-index: -1; /* 背景として裏に配置 */
}
/* トップヘッダーの共通スタイル */
.top-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 72px;
  background-color: #002244;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 30px;
  z-index: 1000;
  transition: transform 0.3s ease; /* ← スライドアニメーション */
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
/* 非表示時の状態（上へスライド） */
.top-header.hidden {
  transform: translateY(-100%);
}

.lang-switch {
  font-size: 12px;
  white-space: nowrap;
  display: flex;
}

.lang-btn {
  color: #fff;
  text-decoration: none;
  margin: 0 3px;
}

.lang-btn:hover {
  text-decoration: underline;
}

.lang-flag img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid white;
  transition: transform 0.2s, box-shadow 0.2s;
}

.lang-flag img:hover {
  transform: scale(1.1);
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.5);
}

.top-nav {
  display: flex;
  gap: 12px;            /* ナビ同士の余白 */
  list-style: none;     /* ・マークを消す */
  padding: 0;
  margin: 0;
}
.top-nav li a {
  color: white;
  text-decoration: none;
  font-size: 14px;
}
.logo-area {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-utils {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 14px;
}
.header-utils a {
  color: white;
  text-decoration: none;
  margin-left: 15px;
}
.header-utils input[type="search"] {
  padding: 6px 10px;
  width: 150px;         /* 横幅を広げたい場合はここを調整 */
  font-size: 14px;      /* 文字サイズ */
  border-radius: 4px;
  border: none;
}

header {
  position: fixed;
  left: 0;
  top: 72px;
  width: 100%;
  height: 30px;
  z-index: 1000;
  background: #003366;
  color: white;
  padding: 0px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.logo {
  font-size: 22px;
  font-weight: bold;
}
.logo a {
  text-decoration: none;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.3s ease;
}
.logo a:hover {
  background-color: #7F99B2;
  color: white;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}
nav ul {
  list-style: none;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
nav ul li a {
  text-decoration: none;
  color: white;
  font-size: 14px;
}
nav ul li a:hover {
  text-decoration: underline;
}

/* ナビゲーションのドロップダウン */
.main-nav {
  list-style: none;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.nav-item {
  position: relative;
}

.dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  border-radius: 4px;
  padding: 10px 0;
  z-index: 1000;
  min-width: 160px;
}

.dropdown li {
  padding: 0;
}

.dropdown li a {
  display: block;
  padding: 10px 20px;
  color: #003366;
  background: white;
  text-decoration: none;
  font-size: 14px;
  white-space: nowrap;
}

.dropdown li a:hover {
  background: #f0f0f0;
}

.nav-item:hover .dropdown {
  display: block;
}
/* ヒーロースライダー */
.hero-carousel {
  display: flex;
  overflow-x: auto; 
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  margin: 0;                /* ← 余白なし */
  width: 100vw;             /* ← ビューポート幅いっぱい */
  max-width: none;          /* ← 最大幅の制限を解除 */
}
.hero-carousel::-webkit-scrollbar {
  height: 8px; /* 横スクロールバーの高さ */
  background:  rgba(240, 240, 240, 0.8); /* バックグラウンド */
}
.hero-carousel:hover::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.4); /* 薄いグレー */
}
/* 通常時はつまみを非表示 */
.hero-carousel::-webkit-scrollbar-thumb {
  background-color: transparent;
  transition: background-color 0.4s ease;
}
.hero-slide {
  flex: 0 0 100vw;
  height: 40vh; /* ← 全画面の40%の高さ */
  scroll-snap-align: start;
  position: relative;
  overflow: hidden;  /* 推奨：ボタンやキャプションがはみ出ないように */
}
.hero-slide img {
  max-width: 100vw;
  height: 100%;
  object-fit: cover;        /* ← 中央にトリミング＆拡大 */
  object-position: center;
  display: block;
  margin: 0 auto;
}
.slide-caption {
  position: relative;
  bottom: 60px;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.5);/* 透明度 */
  color: white;
  padding: 12px 20px;
  font-size: 14px;
  text-align: center;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.hero-slide:hover .slide-caption {
  opacity: 1;
}
.slide-button {
  position: absolute;
  bottom: 16px;
  left: 16px;
  background: #666666; /* ダークグレー背景 */
  color: white;
  padding: 6px 14px; /* 少し小さめ */
  font-size: 13px;
  border-radius: 4px; /* 角丸やや少なめで四角風 */
  text-decoration: none;
  font-weight: bold;
  transition: background 0.3s, transform 0.3s;
  opacity: 0;/* 最初は非表示 */
  pointer-events: none;
  /* 立体感を演出 */
  font-weight: bold;
  box-shadow: 0 1.5px 0 #222, 0 8px 12px rgba(0, 0, 0, 0.2);
  border-bottom: 2px solid #222;
}
.hero-slide:hover .slide-button {
  opacity: 1;
  pointer-events: auto;
}

.slide-button:hover {
  background-color: #777777; /* 少し明るく */
  transform: translateY(2px); /* 浮き下がる */
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
  border-bottom: 2px solid #222;
}

.section {
  background: rgba(255, 255, 255, 0.1); /* 白 + 10%不透明 */
  margin: 20px auto;
  max-width: 1400px;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.05);
}
.section h2 {
  margin-top: 0;
}
.section p {
  margin-bottom: 12px;
}
.button {
  display: inline-block;
  padding: 10px 20px;
  background: #003366;
  color: white;
  text-decoration: none;
  border-radius: 5px;
}

/* ============================================
   三列レイアウト（ニュース／メイン／リンク）
   ============================================ */
.three-column-layout {
  background-color: transparent;/* 背景透明 */
  display: flex;
  gap: 14px;
  max-width: 2000px;
  margin-top: 0;
  margin-bottom: 0;
  padding: 0 5px;
}

.left-column, .right-column {
  width: 15%;
  background-color: rgba(255, 255, 255, 0); /* ← 透明 */
  padding: 10px;
  border-radius: 8px;
}

.center-column {
  flex: 1;
  min-width: 0; /* ← これがないと、子要素が広がってはみ出す */
  background-color: rgba(255, 255, 255, 0); /* 白＋0%透明。完全透明なら transparent */
  padding: 10px;
  border-radius: 8px;
  box-shadow: 0 0 5px rgba(0,0,0,0);
}

aside h3, main h2 {
  margin-top: 0;
}

aside ul {
  list-style: none;
  padding-left: 0;
}

aside ul li {
  margin-bottom: 10px;
}

aside ul li a {
  text-decoration: none;
  color: #003366;
}

aside ul li a:hover {
  text-decoration: underline;
}

/* NEWS,教室紹介などのボタンのホバー設定*/
a.menu-link {
  display: inline-block; /* ← これが重要！ */
  font-size: clamp(12px, 2.5vw, 20px);
  text-decoration: none;
  white-space: nowrap; /* ← 強制的に折り返さない */
  color: white;
  background-color: #2e7d32;/* rgba(0, 51, 102, 0.85);*/
  padding: clamp(6px, 1vw, 10px);
  border-radius: 6px;
  transition: background-color 0.3s, box-shadow 0.3s;
}

a.menu-link:hover {
  background-color: #66bb6a;  /* ← #003366を少し明るく */
  color: white; /* ← これがないと文字が読みにくい */
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15); /* うっすら影で立体感 */
  transform: translateY(-2px); /* 少し浮き上がる */
}
.menu-link-small {
  display: inline-block;
  font-size: clamp(12px, 1.6vw, 18px); /* 小さめに設定 */
  background-color: #f57c00;
  color: white;
  padding: clamp(4px, 0.8vw, 8px);
  border-radius: clamp(4px, 0.8vw, 8px);
  font-weight: bold;
  text-decoration: none;
  white-space: nowrap;
}
a.menu-link-small:hover {
  background-color: #fb8c00;  /* ← #f57c00を少し明るく */
  color: white; /* ← これがないと文字が読みにくい */
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15); /* うっすら影で立体感 */
  transform: translateY(-2px); /* 少し浮き上がる */
}
/* NEWSの省略ボタン*/
.news-list {
  list-style: none;
  padding-left: 0;
  margin-top: clamp(10px, 1.5vw, 16px);
}
.news-list li {
  display: none;
  margin-bottom: clamp(6px, 1vw, 12px);
  line-height: 1.5;
  font-size: clamp(8px, 1.2vw, 14px);
}
.news-list li.visible {
  display: list-item;
}


/* メイン部分のスライダー*/
.about-slider {
  margin-bottom: 40px;
  max-width: 100%;        /* ← 親の .center-column 内に収める */
  overflow: hidden; /* ここで完全にはみ出しを防止 */
}
.about-slider h2 {
  font-size: 20px;
  margin-bottom: 10px;
}
/* ヘッダーのマージンは100px */
section[id] {
  scroll-margin-top: 120px;
}
#about {
  scroll-margin-top: 100px;
}

.slider-container {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 20px;
  padding-bottom: 10px;
  max-width: 100%;       /* ← これが重要 */
  box-sizing: border-box;
}
.slider-container::-webkit-scrollbar {
  height: 6px;
}
.slider-container::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}
.about-card {
  flex: 0 0 140px; /* ←auto固定ではなく相対的に小さく調整 */
  background: url("images/paper-texture.png");
  background-size: cover;
  background-repeat: repeat;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
  padding: 12px;
  scroll-snap-align: start;
}
.about-card:hover {
  transform: translateY(-3px); /* 少し浮く */
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2); /* 影が濃くなる */
}
.about-card img {
  width: 100%;
  height: 100px;/* ←140くらいだった */
  object-fit: cover;
  border-radius: 4px;
  object-position: center;    /* 中央寄せ */
  
}
.about-card h3 {
  font-size: 14px;
  margin: 10px 0 6px;
}
.about-card .meta {
  font-size: 12px;
  color: #777;
}
.about-card h3 a {
  color: black;              /* 通常の状態 */
  text-decoration: none;
}
.about-card h3 a:hover {
  text-decoration: underline; /* ホバー時に下線 */
}
.about-card h3 a:visited {
  color: red;                /* 訪問済みリンクは赤く */
}
/* 右列のリンク画面 */
/* 関連リンクの見出し：NEWSや教室紹介と統一 */
.right-column .menu-link-small {
  font-size: clamp(12px, 1.6vw, 18px); /* 小さめに設定 */
  background-color: #f57c00;
  color: white;
  padding: clamp(4px, 0.8vw, 8px);
  border-radius: clamp(6px, 1vw, 10px);
  display: inline-block;
  font-weight: bold;
  text-decoration: none;
  white-space: nowrap; /* 折り返し防止 */
}

.right-column .link-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.right-column .link-list li {
  margin-bottom: clamp(6px, 1vw, 10px);
}

.right-column .link-list a {
  font-size: clamp(12px, 1.2vw, 15px);
  text-decoration: none;
  color: #003366;
  transition: color 0.3s;
}

.right-column .link-list a:hover {
  text-decoration: underline;
  color: #0055aa;
}

.section p {
  background: rgba(245, 245, 245, 0.8); /* やや不透明な白背景 */
  padding: 10px 14px;
  border-radius: 6px;
  margin-bottom: 12px;
  color: #222; /* 少し濃い文字色で読みやすく */
}
.left-column .section,
.right-column .section {
  background: rgba(245, 245, 245, 0.7); /* やや不透明な白背景 */
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 12px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

footer {
  text-align: center;
  padding: 20px;
  background: #eee;
  font-size: 14px;
  margin-top: 40px;
}

.dropdown {
  display: none;
}
.dropdown.show {
  display: block;
}

/* テキスト折り返しを許可 */
.top-header .title h1,
.top-header .title p {
  white-space: normal;
  overflow-wrap: break-word;
  word-break: break-word;
}
/* スクロール補正 スマホでリンクに飛ぶ時のヘッダー分押し下げ幅？*/
section[id], .section[id], #about, img[id], div[id] {
  scroll-margin-top: 120px;
}

/* ========== スマホ対応レイアウト ========== */
/* ハンバーガーとモバイルナビ用のスタイル */
.hamburger {
  font-size: 26px;
  color: white;
  cursor: pointer;
  display: none;
  position: absolute;    /* 右上に固定 */
  top: 20px;              /* 必要に応じて微調整 */
  right: 20px;
  z-index: 1100;          /* ヘッダーより上にくるように */
}

.mobile-nav {
  position: fixed;            /* ← 固定表示 */
  top: 72px;                  /* ← .top-header の下に配置 */
  left: 0;
  width: 100%;
  background: #003366;
  padding: 6px 12px;
  display: none;
  z-index: 999;               /* ヘッダーより1段下（または上でもOK） */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.mobile-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-nav li a {
  color: white;
  text-decoration: none;
  display: block;
  padding: 6px 8px;   /* ← 各項目の上下余白を調整 */
  font-size: 14px;     /* ← 文字サイズ小さめに調整 */
  border-bottom: 1px solid #445566;
}

/* モバイル表示時のレイアウト */
@media screen and (max-width: 768px) {
  .hamburger {
    display: block;
  }

  body {
    padding-top: 72px;
  }

  .top-header {
    flex-direction: row; /* または column だとしても文脈に合わせて */
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    height: auto;
    position: fixed; /* hamburgerのabsolute配置に必要 */
  }
  .top-header .title p {
  white-space: nowrap;         /* nowrapだと折り返し禁止 */
  overflow: hidden;            /* はみ出し部分を隠す（省略可能） */
  text-overflow: ellipsis;     /* はみ出したら "…" で省略（任意） */
    font-size: 12px;  /* スマホ用にやや小さめに調整 */
    max-width: 100%;
  }

  .top-header .title {
    flex-shrink: 1;
    min-width: 0;
  }

  /* ナビゲーション用の header（PC用）を非表示に */
  header:not(.top-header) {
    display: none;
  }

  .logo-area {
    flex-direction: row;   /* ← 横並び */
    /*flex-wrap: wrap;        ← 必要なら折り返し */
    align-items: center;
    gap: 10px;
  }

 /* ヘッダーのユーティリティ（お問い合わせ・検索）を非表示 */
  .header-utils {
    display: none;
  }

 nav ul {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    font-size: 14px;
    gap: 5px;
  }

  .nav-item {
    width: 100%;
  }

  .dropdown {
    position: relative;
    box-shadow: none;
    background: #f9f9f9;
  }

  .dropdown li a {
    padding-left: 30px;
  }

  .dropdown li a {
    background: none;
    padding: 8px 12px;
  }
  .slide-button {
    padding: 4px 10px;
    font-size: 12px;
  }
  .three-column-layout {
    flex-direction: column;
    gap: 20px;
    padding: 0 10px;
  }

  .left-column,
  .center-column,
  .right-column {/* ←必要？ */
    width: 100%;
    margin-top: 0px;
    margin-bottom: 0px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    box-shadow: 0 0 5px rgba(0,0,0,0.1);
  }

  .about-card {
    flex: 0 0 90%;
    max-width: 40%;
  }

  .slider-container {
    gap: 16px;
  }

  .section {
    margin: 0; 
    padding: 6px;
    background: rgba(255, 255, 255, 0.1); /* ← 明示的に透明にする */
    border-radius: 8px;
    box-shadow: 0 0 5px rgba(0,0,0,0.05); /* 必要に応じて */
  }
  .news-list li {
   /* display: list-item;*/
  font-size: 14px;         /* ← 小さくする（14px → 13px or 12px） */
  line-height: 1.4;
  padding: 4px 0;          /* ← 上下の間隔を詰める */
  margin-bottom: 2px;      /* 項目間のスペースを縮小 */
  display: flex;           /* 日付と本文を横並びにしたい場合 */
  align-items: center;
  gap: 6px;
  }

  .news-list:not(.show-all) ul li:nth-of-type(n+4) {
    display: none;
  }

  .view-more-btn {
    background: none;
    border: none;
    color: #003366;
    font-size: 14px;
    cursor: pointer;
    margin-top: 10px;
    text-decoration: underline;
  }
}/*from @media screen and (max-width: 768px)*/