/*
=====================================
nheader.css  v1.2
北見工大生協ルームガイド – ヘッダー共通スタイル
-------------------------------------
v1.1 → v1.2 修正点
  ・サブメニューリンクの文字色を白に変更（#ffffff !important）
  ・ホバー時は opacity で明度調整（下線も白半透明に）
=====================================
*/

/* ========================================
   Google Fonts（nheader.php 側で読込済みだが念のため）
======================================== */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700&display=swap');

/* ========================================
   ヘッダー全体
======================================== */
header {
  background: #ffffff;
}

.header.cl {
  max-width: 1060px;
  margin: 0 auto;
  padding: 10px 16px;
}

/* ========================================
   ロゴ
======================================== */
.logo img {
  height: 44px;
  width: auto;
}

/* ========================================
   メニューエリア
======================================== */
.menu {
  background: #ffffff;
  border-top: 1px solid #eef2f0;
  border-bottom: 1px solid #eef2f0;
}

/* 旧・画像ボタン行は非表示 */
.main_menu,
.main_spmenu {
  display: none !important;
}

/* ========================================
   CSS タイルグリッド本体
======================================== */
.n-main-nav {
  max-width: 1060px;
  margin: 0 auto;
  padding: 14px 16px;
}

.n-menu-grid {
  display: grid !important;
  grid-template-columns: repeat(6, 1fr) !important;
  gap: 10px !important;
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* ========================================
   個別タイル共通
======================================== */
.n-menu-tile {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  padding: 16px 8px !important;
  border-radius: 18px !important;
  border: 1.5px solid transparent !important;
  text-decoration: none !important;
  text-align: center !important;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  min-height: 112px !important;
  font-family: 'Noto Sans JP', Verdana, sans-serif;
  box-sizing: border-box;
}

.n-menu-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 18px rgba(31, 107, 58, 0.14);
  text-decoration: none !important;
}

/* 食事付バッジ */
.tile-tag {
  display: inline-block !important;
  background: rgba(255, 255, 255, 0.75) !important;
  border: 1px solid rgba(0, 0, 0, 0.12) !important;
  border-radius: 999px !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  padding: 2px 9px !important;
  line-height: 1.6 !important;
  color: inherit !important;
}

/* アイコン */
.tile-icon {
  font-size: 22px !important;
  line-height: 1 !important;
  display: block !important;
}

/* メインテキスト */
.tile-main {
  font-size: 15px !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  color: inherit !important;
  display: block !important;
}

/* サブテキスト */
.tile-sub {
  font-size: 11px !important;
  opacity: 0.72;
  color: inherit !important;
  display: block !important;
}

/* ========================================
   タイル6種の色（直値で確実に適用）
======================================== */

/* 1. 食事付き下宿 ── ウォームアンバー */
.tile-gesyuku {
  background: linear-gradient(150deg, #ffe8c8, #ffd4a0) !important;
  color: #7a3400 !important;
  border-color: #f5c080 !important;
}
.tile-gesyuku:hover {
  background: linear-gradient(150deg, #ffd4a0, #f0c080) !important;
}

/* 2. 食事付きアパート ── ソフトローズ */
.tile-apart-shoku {
  background: linear-gradient(150deg, #ffe8ee, #ffd0da) !important;
  color: #78182a !important;
  border-color: #f5a8bc !important;
}
.tile-apart-shoku:hover {
  background: linear-gradient(150deg, #ffd0da, #f0b8c8) !important;
}

/* 3. アパート・マンション ── ミントグリーン */
.tile-apaman {
  background: linear-gradient(150deg, #d8f4ee, #bce8e0) !important;
  color: #185448 !important;
  border-color: #8ecec2 !important;
}
.tile-apaman:hover {
  background: linear-gradient(150deg, #bce8e0, #9cd4ca) !important;
}

/* 4. 大学生協オリジナルマンション ── ソフトブルー */
.tile-seikyo {
  background: linear-gradient(150deg, #e4ecfc, #ccd8f8) !important;
  color: #1a2870 !important;
  border-color: #9eb4e4 !important;
}
.tile-seikyo:hover {
  background: linear-gradient(150deg, #ccd8f8, #b0c8f0) !important;
}

/* 5. 地図エリアから探す ── ライムグリーン */
.tile-map {
  background: linear-gradient(150deg, #e0f4c8, #c8eca0) !important;
  color: #285010 !important;
  border-color: #96d068 !important;
}
.tile-map:hover {
  background: linear-gradient(150deg, #c8eca0, #a8d880) !important;
}

/* 6. 希望条件から探す ── ラベンダー */
.tile-search {
  background: linear-gradient(150deg, #ece0fc, #e0ccf8) !important;
  color: #3c1878 !important;
  border-color: #b898e4 !important;
}
.tile-search:hover {
  background: linear-gradient(150deg, #e0ccf8, #c8acf0) !important;
}

/* ========================================
   サブメニュー（PC用リンクバー）
======================================== */
.submenu.pc_only {
  background: #ffffff;
  border-top: 1px solid #dbe3df;
  border-bottom: 2px solid #a8dfc0;
}

.submenu.pc_only ul {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex !important;
  list-style: none !important;
  gap: 0;
}

.submenu.pc_only li {
  display: list-item;
}

.submenu.pc_only li a {
  display: block;
  padding: 10px 16px;
  font-size: 13px;
  color: #ffffff !important;
  text-decoration: none;
  border-bottom: 2.5px solid transparent;
  transition: color 0.15s, border-color 0.15s, opacity 0.15s;
  white-space: nowrap;
}

.submenu.pc_only li a:hover {
  color: #ffffff !important;
  opacity: 0.75;
  border-bottom-color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
}

/* ========================================
   slicknav（SP用ドロワー）の緑化
======================================== */
.slicknav_btn {
  background: #4caf6e !important;
  border-radius: 0 !important;
  margin-top: 0 !important;
}

.slicknav_nav > li,
.slicknav_nav ul li {
  background: #2f8a4d !important;
}

.slicknav_nav li {
  border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important;
}

.slicknav_nav a {
  color: #ffffff !important;
  text-decoration: none !important;
}

.slicknav_nav a:hover {
  background: rgba(255, 255, 255, 0.12) !important;
  text-decoration: none !important;
}

/* ========================================
   レスポンシブ：タブレット～SP（750px以下）3列
======================================== */
@media screen and (max-width: 750px) {
  .n-main-nav {
    padding: 10px !important;
  }

  .n-menu-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 8px !important;
  }

  .n-menu-tile {
    min-height: 90px !important;
    padding: 12px 6px !important;
    border-radius: 12px !important;
  }

  .tile-main {
    font-size: 13px !important;
  }

  .tile-icon {
    font-size: 18px !important;
  }

  .tile-sub {
    font-size: 10px !important;
  }
}

/* ========================================
   極小SP（380px以下）: "から探す" 非表示
======================================== */
@media screen and (max-width: 380px) {
  .n-menu-tile {
    min-height: 76px !important;
    padding: 10px 4px !important;
  }

  .tile-main {
    font-size: 12px !important;
  }

  .tile-icon {
    font-size: 16px !important;
  }

  .tile-sub {
    display: none !important;
  }
}
