/* base.css */

/* リセット */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ボディ全体 */
body {
	font-family: "UDDigiKyokasho R JIS2004";
  background-color: #ffffff;
  color: #333333;
  line-height: 1.6;
  padding: 10px;
}

.br { display: block; }
.br0 {display: inline;}

#top_imgs1 {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100px;
  border: none;
  display: block;
  margin-top:120px;
}

#top_imgs2 {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 10px;
  border: none;
  display: block;
  margin-bottom:30px;
}
 
/* ヘッダー */
#header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: #fff;
  height: 120px;
  border-bottom: 2px solid #1a6;
  
}

/* こちらを追加または修正してください */
#header::after {
  content: "";
  position: absolute;
  top: calc(100% + 2px);  /* ヘッダー高さ 130px + ボーダー厚 2px = 132px の位置 */
  left: 0;
  width: 100%;
  height: 5px;             /* 下にほしい白帯の高さ */
  background-color: #fff;
  z-index: 1001;           /* ヘッダー（z-index:1000）より前面に表示 */
  
}

/* 固定ヘッダー分だけ下にずらす */
#content {
	margin-top: 80px;
}

h1 img {
  width: 80%;
  height: auto;
  display: block;
  margin-top: 10px;
  margin-left:10px;
  margin-bottom: 0px;
  padding: 0px;
}

#header h1 {
  font-size: 18px;
}

#head_phone {
  display: none;
}

#head_phone_smp {
  width: 50%;
  float: left;
  margin-top: 20px;
  margin-left: 20px;
}

#head_today_link_smp {
  width: 38%;
  float: right;
  margin-top: 20px;
  margin-bottom: 5px;
}

#head_today_link {
  display: none;
}

#head_today_link_smp {
  width: 40%;
  float: right;
  margin-top: 20px;
  margin-bottom: 5px;
  margin-right:20px;
}

#box3 {
  padding: 20px;
  overflow: hidden;
}

#box3 a img {width:150px;}

.row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 10px;
}

.row img {
  width: calc(40% - 5px);
  display: block;
}

/* 3枚目だけ1行分使い中央寄せ */
.bb3 {
  width: 100%;
  display: flex;
  justify-content: center;
}

/* 中の画像は自動サイズ（大きすぎる場合は調整） */
.bb3::before {
  content: "";
  display: inline-block;
  width: 0;
  height: 0;
}

.bb3 img {
  width: auto;
  max-width: 100%;
}

#box4 {
  /* //border:1px solid #e00; */
  clear: both;
}

.icon_center {
  display: block;
  margin: 20px auto;
}

.drs {
  display: block;
  margin: 80px auto;
  width:65%;
}

footer {
  text-align: center;
  letter-spacing: 1px;
  color: #fff;
  background-color: #63bdf7;
  padding: 5px 0px;
}

/* ── ハンバーガーメニュー本体 ── */
.menu-toggle {
  display: block !important;
  position: absolute !important;
  top: 18px !important;        /* ヘッダー内での位置（必要に応じて調整） */
  right: 20px !important;      /* ヘッダー内での位置（必要に応じて調整） */
  width: 30px !important;
  height: 25px !important;
  cursor: pointer !important;
  z-index: 1001 !important;    /* ヘッダー（z-index:1000）より前面 */
}

/* ３本線それぞれのバー */
.menu-toggle span {
  display: block;
  position: relative;    /* クリック時の絶対配置をこの要素を基準にする */
  height: 3px;
  background: #333;      /* 常に黒で統一 */
  margin: 5px 0;
  transition: 0.3s;
}

/* メニューオープン時のアニメーション */
.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* ── ナビゲーションメニュー (#main_menu, nav) ── */
#main_menu,
nav {
  position: absolute !important;
  /* ヘッダー下から10px下の位置に表示 */
  top: calc(100% + 7px) !important;
  left: 0 !important;
  width: 100% !important;
  background: #fff;
  display: none;
  flex-direction: column;
  z-index: 999 !important;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

#main_menu ul,
nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

#main_menu ul li,
nav ul li {
  border-top: 1px solid #ccc;
}

#main_menu ul li a,
nav ul li a {
  display: block;
  padding: 25px 0px;
  text-decoration: none;
  color: #333;
  text-align:center;
  
}

#main_menu ul li a:hover,
nav ul li a:hover {
  background: #eee;
}

/* メニュー表示状態 */
#main_menu.show,
nav.show {
  display: flex !important;
}

/* ── コンテンツ ── */
main {
  padding: 15px 10px;
}

/* ── メディアクエリ：タブレット以上ではハンバーガーを常に表示し、横並びメニューにする ── */
@media screen and (min-width: 768px) {
  .menu-toggle {
    display: block !important; /* PCでも非表示にしない */
  }
  #main_menu,
  nav {
    display: flex !important;
    position: static !important;
    background: none !important;
    box-shadow: none !important;
    flex-direction: row;
  }
  #main_menu ul,
  nav ul {
    display: flex;
    justify-content: flex-end;
  }
  #main_menu ul li,
  nav ul li {
    border: none;
  }
  #main_menu ul li a,
  nav ul li a {
    color: #fff; /* ヘッダーの文字色に合わせる */
    margin-left: 15px;
    padding: 10px 15px;
    border: none;
  }
}

/* ── ここからオーバーライド用スタイル（必要に応じて調整） ── */

/* nav や .menu の位置をずらさずに、ハンバーガーに合わせたまま動作させる */
nav {
  position: absolute !important;
  /* ヘッダー下から10px下の位置に表示 */
  top: calc(100% + 10px) !important;
  left: 0 !important;
  width: 100% !important;
  z-index: 1000 !important;
}

.menu {
  display: none;
  background: #fff;
  position: absolute !important;
  /* ヘッダー下から10px下の位置に表示 */
  top: calc(100% + 10px) !important;
  left: 0 !important;
  width: 100% !important;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  z-index: 999 !important;
}

/* メニュー表示状態 */
.menu.show {
  display: block !important;
}

/* メニューリスト */
.menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.menu ul li {
  border-top: 1px solid #ccc;
}

.menu ul li a {
  display: block;
  padding: 12px 16px;
  text-decoration: none;
  color: #333;
}

.menu ul li a:hover {
  background: #eee;
}

/* PC用（画面幅768px以上） */
@media screen and (min-width: 768px) {
  .menu-toggle {
    display: block !important; /* PCでも常に表示 */
  }
  .menu {
    display: block !important;
    position: static;
    box-shadow: none;
  }
  .menu ul {
    display: flex;
    justify-content: flex-end;
  }
  .menu ul li {
    border: none;
  }
  .menu ul li a {
    padding: 10px 15px;
  }
}

