/* ================================ 基本設定 ================================ */
body {
  margin: 0;
  font-family: "メイリオ", sans-serif;
}

/* ================================ ヘッダー構造 ================================ */
.n-site-header {
  background: #faf8df;
  padding: 10px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ロゴ行（親） */
.n-logo-line {
  display: block;
  margin-bottom: 6px;
}

/* ロゴ行（子：横並び） */
.n-logo-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}

/* ロゴ画像・アイキャッチ画像（完全独立） */
.n-logo-img,
.n-eyecatch-img {
  width: auto !important;
  height: auto !important;
  max-height: 60px !important;
  max-width: none !important;
  object-fit: contain !important;
}

/* スライド切り換え */
.n-img-switcher {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.n-switch-label {
  font-size: 10px;
  color: #333;
  font-weight: bold;
  background: #fff9c4;
  padding: 3px 6px;
  border-radius: 4px;
}

.n-img-switcher a {
  padding: 4px 8px;
  background-color: #eee;
  border-radius: 4px;
  margin-right: 6px;
  text-decoration: none;
}

.n-img-switcher a:hover {
  background-color: #ddd;
}

.n-main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}

.n-main-nav li {
  padding: 0 12px;
  border-left: 1px solid #333;
}

.n-main-nav li:first-child {
  border-left: none;
}

.n-main-nav a {
  text-decoration: none;
  color: #000;
  font-weight: bold;
}

/* ================================ 流れるメッセージ ================================ */
.n-scroll-message {
  overflow: hidden;
  white-space: nowrap;
  width: 100%;
  height: 30px;
  line-height: 30px;
}

#scrollText {
  display: inline-block;
  animation: marquee 55s linear infinite;
}

@keyframes marquee {
  0% { transform: translateX(1%); }
  100% { transform: translateX(-100%); }
}

/* ================================ スライドショー ================================ */
.n-slideshow {
  width: 96%;
  max-width: 96%;
  aspect-ratio: 16 / 9;
  margin: 0 auto;
  overflow: hidden;
  position: relative;
}

.n-slideshow.ratio-16-9 { aspect-ratio: 16 / 9; }
.n-slideshow.ratio-3-1 { aspect-ratio: 3 / 1; }

.n-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.5s ease;
}

.n-slide.active { opacity: 1; }

/* 矢印ナビ */
.n-slider-nav {
  position: absolute;
  top: 50%;
  left: -1.5%;
  width: 100%;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  padding: 0 20px;
  pointer-events: none;
}

.n-slider-nav span {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  font-size: 40px;
  font-weight: bold;
  background: rgba(0, 0, 0, 0.05);
  color: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
}

.n-slider-nav span:hover {
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
}

/* ================================ 更新日表示 ================================ */
.n-update-date {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  text-align: right;
  color: #555;
  margin: 4px 10px 8px;
}

.n-left-info,
.n-right-info {
  display: flex;
  gap: 1em;
}

/* ================================ 3カラム構造 ================================ */
.n-three-columns {
  display: flex;
  gap: 20px;
  margin: 20px;
}

.n-column {
  background: #fff;
  padding: 15px;
  border-radius: 6px;
  flex: 1;
}

.n-left-column,
.n-right-column {
  flex: 0.3;
  border: 1px solid #ddd;
  padding: 20px;
}

.n-left-column { background: #fffde7; }
.n-right-column { background: #eef7ff; }

.n-center-column { flex: 2.4; }

/* カラム内画像（直下の img のみ） */
.n-left-column .n-column-img,
.n-center-column .n-column-img,
.n-right-column .n-column-img {
  width: 100%;
  height: auto;
  max-width: 100%;
}

/* ================================ main.htm 内 2列レイアウト ================================ */
.n-main-two-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;

    border: 1px solid #ccc;   /* ← 外枠罫線 */
    padding: 15px;            /* ← 内側の余白（枠線が潰れないように） */
    border-radius: 6px;       /* ← 角丸（任意） */
}

.n-main-two-columns .col-left,
.n-main-two-columns .col-right {
    background: #fff;
    padding: 10px;
    border-radius: 6px;
    text-align: center;
}


/* ================================ rightmenu 外枠 ================================ */
.n-right-box { width: 100%; }

/* ================================ フッター ================================ */
.n-site-footer {
  background: #faf8df;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid #ccc;
  font-size: 12px;
}

.n-footer-block { flex: 1; }

.n-footer-block h3 {
  margin: 0 0 4px 0;
  font-size: 14px;
  font-weight: bold;
  color: #333;
  line-height: 1.2;
}

.n-footer-block p {
  margin: 1px 0;
  color: #444;
  line-height: 1.2;
}

/* ================================ 汎用フォントクラス ================================ */
.n-f1 { font-size: 10px; line-height: 1.0; }
.n-f2 { font-size: 14px; line-height: 1.1; }
.n-f3 { font-size: 18px; line-height: 1.2; }
.n-f4 { font-size: 22px; }
.n-f5 { font-size: 28px; }
.n-f6 { font-size: 32px; }
.n-bold { font-weight: bold; }

/* 色 */
.n-red { color: #ff0000; }
.n-pink { color: #ff00ff; }
.n-blue { color: #0000ff; }
.n-green { color: #008000; }
.n-gray { color: #666666; }
.n-black { color: #000000; }
.n-white { color: #ffffff; }

/* 背景色 */
.n-bg-yellow { background-color: #ffff00; }
.n-bg-red { background-color: #ffcccc; }
.n-bg-blue { background-color: #cce5ff; }
.n-bg-green { background-color: #ccffcc; }
.n-bg-gray { background-color: #f0f0f0; }
.n-bg-cream { background-color: #ffffdf; }
.n-bg-black { background-color: #000000; }

/* 画像サイズ */
.n-image-small { width: 50% !important; height: auto; }
.n-image-middle { width: 70% !important; height: auto; }
.n-image-big { width: 100% !important; height: auto; }

.n-img-center {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.n-img-right {
  display: block;
  margin-left: auto;
}

/* 行間 */
.n-narrow-line { line-height: 0.85 !important; }

/* テキスト配置 */
.n-center { text-align: center; }
.n-right { text-align: right; }
.n-left { text-align: left; }

.n-text-center {
  text-align: center;
  display: block;
}

.n-text-right {
  text-align: right;
  display: block;
}

/* ================================ レスポンシブ ================================ */
@media (max-width: 768px) {
  .n-slideshow { max-height: 300px; }
  .n-main-visual { max-height: 250px; }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .n-slideshow { max-height: 400px; }
  .n-main-visual { max-height: 350px; }
}

@media (max-width: 600px) {
  .n-slider-nav { left: 0%; padding: 0 5%; }
  .n-slider-nav span {
    width: 48px;
    height: 48px;
    font-size: 32px;
  }
  .n-slideshow { height: auto; }
}

@media (max-width: 430px) {
  .n-slideshow { max-height: 60vh; }
}

@media (max-width: 480px) {
  .n-slideshow { max-height: 58vh; }
}

@media (min-width: 410px) and (max-width: 450px) {
  .n-logo-img,
  .n-eyecatch-img {
    max-height: 50px !important;
  }
}


/* ================================ スマホ時の3カラム並び替え ================================ */
@media (max-width: 767px) {
  .n-three-columns { flex-direction: column; }
  .n-center-column { order: 1; }
  .n-left-column { order: 2; }
  .n-right-column { order: 3; }
}
