/* ============================================================
   配布版シンプルCSSフレームワーク 完全版
   ============================================================ */

:root {
  /* メインカラー・テキスト */
  --primary-color: #ff4a52;
  --text-color: #333;
  --bg-white: #ffffff;
  
  /* 装飾用サブカラー */
  --border-color: #eeeeee;      /* 線、区切り用 */
  --input-border: #cccccc;     /* フォーム枠線用 */
  --overlay-bg: rgba(0,0,0,0.5); /* スマホメニュー背景暗転 */
  --nav-bg: #ffffff;           /* ナビゲーション背景 */

  /* レイアウト・余白 */
  --gutter: 20px; 
  --border-radius: 4px;
  --input-padding: 8px 12px;
  --container-space: 1rem; /* 共通の余白量を一括管理 */
  
  /* フォント（日本語対応） */
  --font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
}

/* --- 基本リセット --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  color: var(--text-color);
  line-height: 1.6;
  background-color: var(--bg-white);
}

/* ============================================================
   グリッドシステム
   ============================================================ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin-left: calc(-1 * var(--gutter)/2);
  margin-right: calc(-1 * var(--gutter)/2);
}

[class*="col-"] {
  padding-left: calc(var(--gutter)/2);
  padding-right: calc(var(--gutter)/2);
  flex: 1 0 0%;
}

/* 12カラム定義 */
.col-1 { flex:0 0 8.3333%; max-width:8.3333%; }
.col-2 { flex:0 0 16.6667%; max-width:16.6667%; }
.col-3 { flex:0 0 25%; max-width:25%; }
.col-4 { flex:0 0 33.3333%; max-width:33.3333%; }
.col-5 { flex:0 0 41.6667%; max-width:41.6667%; }
.col-6 { flex:0 0 50%; max-width:50%; }
.col-7 { flex:0 0 58.3333%; max-width:58.3333%; }
.col-8 { flex:0 0 66.6667%; max-width:66.6667%; }
.col-9 { flex:0 0 75%; max-width:75%; }
.col-10{ flex:0 0 83.3333%; max-width:83.3333%; }
.col-11{ flex:0 0 91.6667%; max-width:91.6667%; }
.col-12{ flex:0 0 100%; max-width:100%; }

@media (max-width: 768px) {
  [class*="col-"] { flex: 0 0 100%; max-width: 100%; }
}

/* containerタグに余白を持たせる */
body > .container {
  margin-top: var(--container-space);
  margin-bottom: var(--container-space);
}

/* ============================================================
   ナビゲーション & ハンバーガーメニュー
   ============================================================ */

/* --- 共通・PC設定 --- */
.nav-menu ul {
  list-style: none;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 20px;
  padding: 0;
}

.nav-menu a {
  text-decoration: none;
  color: var(--text-color);
  transition: opacity 0.2s;
}

.nav-menu a:hover { opacity: 0.7; }

.nav-menu .button { color: #fff; }

.nav-logo {
  display: none;
  font-weight: bold;
  padding: 25px;
  border-bottom: 1px solid var(--border-color);
}

/* --- ハンバーガーボタン --- */
.menu-btn {
  display: none;
  cursor: pointer;
  z-index: 1001;
  position: relative;
  flex-direction: column;
  align-items: center;
  line-height: 1;
}

.menu-icon-box {
  display: block;
  height: 18px; 
  width: 25px;
  position: relative;
  margin-bottom: 4px;
}

.menu-icon, .menu-icon::before, .menu-icon::after {
  display: block;
  background: var(--text-color);
  height: 2px;
  width: 25px;
  border-radius: 2px;
  position: absolute;
  transition: all .3s;
}

.menu-icon { top: 8px; }
.menu-icon::before { content: ""; top: -8px; }
.menu-icon::after { content: ""; top: 8px; }

.menu-text {
  font-size: 10px;
  font-weight: bold;
}

/* --- スマホ表示 (768px以下) --- */
@media (max-width: 768px) {
  .nav-menu > ul { display: none; }
  .menu-btn { display: inline-flex; }

  /* スライドメニュー本体 */
  .nav-menu {
    position: fixed;
    top: 0;
    left: -300px;
    width: 280px;
    height: 100%;
    background: var(--nav-bg);
    z-index: 1002;
    transition: all 0.4s ease;
    text-align: left;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
  }

  .nav-menu ul {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }

  .nav-menu ul li {
    width: 100%;
    border-bottom: 1px solid var(--border-color);
  }

  .nav-menu a {
    display: block;
    padding: 18px 25px;
    width: 100%;
  }

  .nav-logo {
    display: block;
    font-size: 1.25rem;
  }

  /* 背景オーバーレイ */
  .menu-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: var(--overlay-bg);
    z-index: 1000;
  }

  /* 開閉ギミック */
  #menu-toggle:checked ~ .nav-menu { left: 0; }
  #menu-toggle:checked ~ .menu-overlay { display: block; }
  
  /* ×印アニメーション */
  #menu-toggle:checked + .menu-btn .menu-icon { background: transparent; }
  #menu-toggle:checked + .menu-btn .menu-icon::before { transform: rotate(45deg); top: 0; }
  #menu-toggle:checked + .menu-btn .menu-icon::after { transform: rotate(-45deg); top: 0; }
}

/* ============================================================
   コンポーネント（ボタン・フォーム）
   ============================================================ */

/* --- ボタン --- */
.button, button, input[type="button"], input[type="submit"] {
  display: inline-block;
  padding: var(--input-padding);
  border: 1px solid var(--primary-color);
  background-color: var(--primary-color);
  color: #fff !important;
  text-align: center;
  text-decoration: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: filter .2s ease;
  font-size: 1rem;
}

.button:hover, button:hover {
  filter: brightness(90%);
}

.btn-small { padding: 4px 8px; font-size: .85rem; }
.btn-large { padding: 12px 20px; font-size: 1.2rem; }

/* --- フォーム --- */
input[type="text"], input[type="email"], input[type="tel"],
input[type="url"], input[type="search"], textarea, select {
  padding: var(--input-padding);
  border: 1px solid var(--input-border);
  border-radius: var(--border-radius);
  font-family: inherit;
  font-size: 1rem;
  width: 100%;
  margin-bottom: 1rem;
  -webkit-appearance: none;
  appearance: none;
}

label { display: block; margin-bottom: .25rem; font-weight: 500; }
input[type="checkbox"], input[type="radio"] { width: auto; margin-right: 0.5rem; }

/* ============================================================
   ユーティリティ
   ============================================================ */
.mt-1 { margin-top: .25rem; }
.mt-2 { margin-top: .5rem; }
.mt-3 { margin-top: 1rem; }
.mb-1 { margin-bottom: .25rem; }
.mb-2 { margin-bottom: .5rem; }
.mb-3 { margin-bottom: 1rem; }

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

a { color: var(--primary-color); text-decoration: none; }
a:hover { text-decoration: underline; }