@charset "UTF-8";

:root {
  --header-height: 141px; /* ロゴ 120px + padding 10px*2 + border 1px */
  --nav-height: 40px;
}

/* 基本スタイル */
body {
  font-family: sans-serif;
  margin: 0;
  line-height: 1.6;
  color: #333;
  background-image: url('../img/background.png'), url('../img/background.png');
  background-repeat: repeat-y, repeat-y;
  background-position: left top, right top;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.pc-only { display: block; }
.sp-only { display: none; }

header {
  text-align: center;
  padding: 0;
  background-color: #f8f8f8;
  border-bottom: 1px solid #eee;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
}

header .header-inner {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 10px 40px;
  box-sizing: border-box;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4vw;
  width: auto;
}

.site-title {
  margin: 0;
  padding: 0;
}

.site-title a {
  text-decoration: none;
  color: inherit;
}

.site-title img {
  height: 120px;
  width: auto;
  display: block;
}

.header-contact {
  text-align: left;
  font-size: 1rem;
  color: #555;
  line-height: 1.5;
  white-space: nowrap;
}

.header-contact p:first-child {
  color: #006400;
  font-weight: bold;
  font-size: 1.1em;
  margin-bottom: 5px;
}

.header-contact p {
  margin: 0;
  display: flex;
  align-items: center;
}

.contact-label {
  display: inline-block;
  width: 4.5em;
  text-align: right;
  margin-right: 8px;
}

.header-contact a {
  color: #cc6600;
  text-decoration: none;
}

.header-contact a:hover {
  text-decoration: underline;
}

/* ナビゲーション (共通 & PC) */
#main-nav {
  background-color: #333;
  padding: 0;
  position: fixed;
  top: var(--header-height);
  left: 0;
  width: 100%;
  height: auto;
  z-index: 999;
}

#main-nav ul {
  list-style: none;
  margin: 0;
  display: flex;
  padding: 5px 100px 5px 0;
  justify-content: flex-end;
  flex-wrap: wrap;
  align-items: center;
}

#main-nav ul li {
  margin: 0 15px;
  padding-top: 10px;
  padding-bottom: 10px;
}

#main-nav ul li a, #main-nav ul li button {
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-decoration: none;
  padding: 0 15px;
  white-space: nowrap;
  font-size: 1rem;
}

#main-nav ul li button {
  background: none;
  border: none;
  outline: none;
  cursor: pointer;
  appearance: none;
}

#main-nav ul li a:hover, #main-nav ul li button:hover {
  background-color: #555;
  border-radius: 5px;
}

/* サブメニュー (PC) */
#main-nav ul li.has-submenu {
  position: relative;
}

#main-nav ul li.has-submenu .submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #444;
  min-width: 150px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  z-index: 1000;
}

@media (min-width: 769px) {
  #main-nav ul li.has-submenu:hover .submenu {
    display: block;
  }
}

#main-nav ul li.has-submenu .submenu li {
  margin: 0;
  padding: 0;
}

#main-nav ul li.has-submenu .submenu li a {
  padding: 10px 15px;
  text-align: left;
}

/* ハンバーガーボタン（デフォルト非表示） */
.nav-toggle {
  display: none;
}

/* スマホ調整 (768px以下) */
@media (max-width: 768px) {
  .pc-only { display: none; }
  .sp-only { display: block; }

  :root {
    --header-height: 80px;
  }

  header .header-inner {
    justify-content: center;
    padding: 0 10px;
    height: var(--header-height);
  }

  .header-content {
    width: 100%;
    justify-content: center;
  }

  .site-title {
    width: 100%;
  }

  .site-title img {
    height: auto;
    max-height: 60px;
    width: 90%;
    max-width: 300px;
    object-fit: contain;
    margin: 0 auto;
  }

  .nav-toggle {
    display: block;
    background: none;
    border: none;
    cursor: pointer;
    width: 44px;
    height: 44px;
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1001;
  }

  .nav-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: #333;
    margin: 5px auto;
    transition: 0.3s;
  }

  /* メニューが開いている時のボタン */
  .nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  #main-nav {
    display: block;
    position: fixed;
    top: var(--header-height);
    left: 100%;
    width: 100%;
    height: calc(100vh - var(--header-height));
    background-color: rgba(51, 51, 51, 0.98);
    transition: left 0.3s;
    overflow-y: auto;
  }

  .nav-open #main-nav {
    left: 0;
  }

  #main-nav ul {
    flex-direction: column;
    align-items: stretch;
    padding: 20px 0;
    justify-content: flex-start;
  }

  #main-nav ul li {
    margin: 0;
    border-bottom: 1px solid #444;
    padding: 0;
  }

  #main-nav ul li a, #main-nav ul li button {
    padding: 15px 20px;
    justify-content: flex-start;
    width: 100%;
    text-align: left;
    box-sizing: border-box;
  }

  #main-nav ul li.has-submenu .submenu {
    position: static;
    display: none;
    background-color: #111;
    width: 100%;
    padding: 0;
  }
  
  #main-nav ul li.has-submenu.is-open .submenu {
    display: block;
  }

  #main-nav ul li.has-submenu .submenu li a {
    padding-left: 40px;
  }

  /* メニュー内の連絡先 (下部) */
  .mobile-contact {
    padding: 30px 20px;
    background: #333;
    border-top: 1px solid #555;
    text-align: center;
  }

  .contact-msg {
    color: #90ee90;
    font-size: 0.9em;
    margin-bottom: 10px;
  }

  .mobile-tel a {
    font-size: 1.2em;
    font-weight: bold;
    color: #FFA500 !important;
    text-decoration: none;
  }

  .mobile-mail {
    font-size: 0.8em;
    margin: 8px 0;
  }
  
  .mobile-mail a {
    color: #ccc !important;
    text-decoration: none;
  }
}

/* メインコンテンツ */
main {
  max-width: 1200px;
  margin-top: 30px;
  padding: 0 20px;
  flex: 3;
}

#scrollable-content {
  margin-top: calc(var(--header-height) + var(--nav-height));
  flex-grow: 1;
}

@media (max-width: 768px) {
  #scrollable-content {
    margin-top: var(--header-height);
  }
}

.container {
  display: flex;
  flex-wrap: wrap;
  width: 75%;
  max-width: 1000px;
  margin: 20px auto;
  padding: 0 40px;
}

@media (max-width: 992px) {
  .container {
    flex-direction: column;
    width: 95%;
    padding: 0 10px;
  }
}

/* 各種装飾 */
.newsbox {
  padding: 15px 30px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  margin-bottom: 20px;
}

main h2 {
  font-size: 1.8em;
  color: #555;
  background-color: #f7f7f7;
  padding: 10px 20px 12px 50px;
  border-left: 5px solid #cc6600;
  border-bottom: 2px dashed #777;
  margin-bottom: 25px;
  position: relative;
}

main h2::before {
  content: '';
  display: block;
  width: 32px;
  height: 32px;
  background-image: url('../img/onpu.jpg');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
}

footer {
  text-align: center;
  padding: 20px;
  background-color: #333;
  color: white;
}

/* ヒーロー画像 */
.hero-image {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 8px;
}
