
@charset "UTF-8";

/* ==============================
   全体設定・壁紙
============================== */
html, body {
  margin: 0;
  padding: 0;
  font-family: sans-serif;
  background: url('../images/yatoh-pic/back.gif') repeat;
  color: #000;
}

a {
  text-decoration: none;
}

/* ==============================
   ナビゲーション
============================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 64px;
  background: #0080ff;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  box-sizing: border-box;
}

.navbar .logo {
  position: relative;
  z-index: 1200;
}

.navbar .logo img {
  height: 50px;
  width: auto;
}

.right-menu {
  display: flex;
  align-items: center;
  gap: 16px;
}

.menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 10px;
}

.menu > li > a,
.menu-title {
  appearance: none;
  -webkit-appearance: none;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.2;
  font-weight: bold;
  display: block;
  padding: 10px 14px;
  color: #fff;
  background: none;
  border: none;
  border-radius: 0px;
  cursor: pointer;
  text-align: center;
}

.menu > li > a:hover,
.menu-title:hover,
.has-sub:hover > .menu-title {
  background: rgba(255,255,255,0.2);
  border-radius: 8px; /* ←ここで丸みを指定 */
}

/* ==============================
   サブメニュー（PCはhoverで開く）
============================== */
.has-sub {
  position: relative;
}

.has-sub > .menu-title::after {
  content: "▼";
  font-size: 12px;
  margin-left: 6px;
  transition: none;
  transform: none;
}

.sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  max-width: 400px;
  background-color: #f9f9f9;
  list-style: none;
  margin: 0;
  padding: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 999;

  border-radius: 10px;   /* サブメニュー全体の角丸 */
  overflow: hidden;      /* 子要素がはみ出ないようにする */
  box-shadow: 0 8px 16px rgba(0,0,0,0.15); /* 元々の影も残す */
}

.sub-menu li a {
  display: block;
  padding: 12px 20px;
  color: #333333;
  font-weight: 500;
  font-size: 14px;
  border-radius: 0;
  white-space: nowrap;
  position: relative;
  z-index: 1;
}

.sub-menu li a::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  z-index: -1;
  transition: background 0.2s ease;
}

.sub-menu li a:hover::before {
  background: rgba(0,128,255,0.1);
}

.sub-menu li a:last-child {
  border-bottom: none;
}

.sub-menu li a:hover {
  background-color: rgba(0,128,255,0.1);
}

/* 外部リンクアイコン */
.sub-menu li a.external {
  padding-right: 24px;
}

.sub-menu li a.external::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  background: url('../images/yatoh-pic/icon-06.png') no-repeat center center;
  background-size: contain;
}

/* PC：hoverでサブメニュー表示 */
@media (min-width: 768px) {
  .has-sub:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
}

/* ==============================
   ハンバーガー
============================== */
#menu-toggle {
  display: none;
}

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 22px;
  cursor: pointer;
  z-index: 1100;
}

.hamburger span {
  height: 3px;
  background: #fff;
  border-radius: 10px;
  transition: 0.3s ease;
  transform-origin: center;
}

#menu-toggle:checked + .hamburger span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

#menu-toggle:checked + .hamburger span:nth-child(2) {
  opacity: 0;
}

#menu-toggle:checked + .hamburger span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* ==============================
   スマホ用ナビ
============================== */
@media (max-width: 768px) {
  .navbar .logo img {
    height: 38px;
  }

  .hamburger {
    display: flex;
  }

  .menu {
    position: fixed;
    top: 64px;
    right: 0;
    width: 260px;
    height: calc(100vh - 64px);
    background: #0080ff;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    z-index: 1000;
  }

  #menu-toggle:checked ~ .menu {
    transform: translateX(0);
  }

  .menu > li {
    border-bottom: 1px solid rgba(255,255,255,0.2);
  }

  .menu > li > a,
  .menu-title {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 0 16px;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    color: #fff;
    background-color: transparent !important;
    position: relative;
  }

  .has-sub > .menu-title::after {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    transition: transform 0.3s ease;
  }

  /* スマホ用サブメニュー */
  .sub-menu {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    background: #fff;
    transition: max-height 0.3s ease;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border-radius: 0;

  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
  }

  /* 開いた状態 */
  .has-sub.is-open > .sub-menu {
    max-height: 1000px;
  }

  .sub-menu li a {
    padding: 12px 16px;
    color: #333;
    font-size: 15px;
    font-weight: normal;
    border-bottom: 1px solid #e0e0e0;
    background-color: #fff;
    width: 100%;
    box-sizing: border-box;
  }

  .sub-menu li a:last-child {
    border-bottom: none;
  }

  .has-sub.is-open > .menu-title {
    background: rgba(255,255,255,0.15);
  }
}

