/* =========================================================
   水まわりノート (/media 配下) — STUDIO CMSテンプレ実測ベース
   コンテナ 1360 = メイン 1000 + 余白 80 + サイドバー 280
   ========================================================= */
:root {
  --m-blue: #008AD7;
  --m-ink: #313131;        /* rgb(49,49,49) */
  --m-footer: #1757A2;     /* rgb(23,87,162) */
  --m-line: #D9D9D9;
}
body.media-body { color: var(--m-ink); font-family: var(--f-a1); font-weight: 400; }

/* ---------- ヘッダー ---------- */
.m-header {
  position: fixed; top: 0; left: 0; right: 0; height: 80px; z-index: 50;
  background: #fff; display: flex; align-items: center; justify-content: space-between;
  padding: 0 40px; animation: m-fade .6s ease both;
}
@keyframes m-fade { from { opacity: 0; } to { opacity: 1; } }
.m-header .logo { font-family: var(--f-a1); font-weight: 500; font-size: 24px; line-height: 1; color: var(--m-ink); }
.m-header nav { display: flex; align-items: center; gap: 10px; }
.m-header nav button, .m-header nav a.icon {
  width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; color: var(--m-ink);
}
.m-header nav .material-symbols-outlined, .m-header nav .material-icons { font-size: 28px; }
.m-header nav .menu-btn { display: none; }

/* 検索モーダル */
.m-search-modal { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.4); display: none; align-items: flex-start; justify-content: center; padding-top: 120px; }
.m-search-modal.open { display: flex; }
.m-search-modal form { display: flex; width: min(640px, calc(100% - 48px)); }
.m-search-modal input { flex: 1 1 auto; height: 56px; padding: 0 20px; border: 1px solid var(--m-line); background: #fff; font: 500 16px var(--f-a1); }
.m-search-modal button { width: 56px; height: 56px; background: var(--m-blue); color: #fff; display: flex; align-items: center; justify-content: center; }

/* メニューモーダル(スマホ) */
.m-menu-modal { position: fixed; inset: 0; z-index: 60; background: #fff; display: none; padding: 80px 24px 24px; }
.m-menu-modal.open { display: block; }
.m-menu-modal a { display: block; padding: 16px 0; border-bottom: 1px solid var(--m-line); font-size: 16px; font-weight: 700; }
.m-menu-modal .close { position: absolute; top: 9px; right: 16px; width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; }

/* ---------- レイアウト ---------- */
.m-page { padding-top: 80px; }
.m-container { width: 1360px; max-width: calc(100% - 48px); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1000px) 280px; column-gap: 80px; }
.m-main { min-width: 0; }
.m-side { padding-top: 16px; }

/* ---------- ヒーロースライダー ---------- */
.m-hero { position: relative; height: 540px; overflow: hidden; }
.m-hero .track { display: flex; gap: 24px; position: absolute; top: 0; left: 50%; transition: transform .5s ease; will-change: transform; }
.m-hero .slide { position: relative; flex: 0 0 1029px; width: 1029px; height: 540px; overflow: hidden; }
.m-hero .slide img { width: 100%; height: 100%; object-fit: cover; }
.m-hero .slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,.55) 100%); }
.m-hero .slide .cap { position: absolute; left: 40px; right: 40px; bottom: 32px; z-index: 1; color: #fff; }
.m-hero .slide .date { font-family: var(--f-poppins); font-weight: 500; font-size: 18px; line-height: 1; }
.m-hero .slide .ttl { margin-top: 8px; font-family: var(--f-a1); font-weight: 500; font-size: 24px; line-height: 1.6; }
.m-hero .arrow {
  position: absolute; top: 253px; width: 34px; height: 34px; border: 3px solid #fff; border-radius: 50%; z-index: 2;
  display: flex; align-items: center; justify-content: center; color: #fff;
}
.m-hero .arrow .material-icons { font-size: 20px; }
.m-hero .arrow.prev { left: calc(50% - 810px); }
.m-hero .arrow.next { left: calc(50% + 776px); }

/* ---------- 見出し ---------- */
.m-head { display: flex; align-items: center; gap: 16px; }
.m-head .en { font-family: var(--f-poppins); font-weight: 600; font-size: 40px; line-height: 1; color: var(--m-blue); }
.m-head .ja { font-family: var(--f-a1); font-weight: 500; font-size: 14px; line-height: 1; color: var(--m-ink); }
.m-head .viewall { margin-left: auto; display: flex; align-items: center; gap: 16px; font-family: var(--f-poppins); font-weight: 600; font-size: 16px; color: var(--m-blue); }
.m-head .viewall .circle { width: 40px; height: 40px; border-radius: 50%; background: var(--m-blue); color: #fff; display: flex; align-items: center; justify-content: center; }
.m-head .viewall .material-icons { font-size: 20px; }

/* ---------- カードグリッド ---------- */
.m-pickup { margin-top: 120px; }
.m-latest { margin-top: 120px; }
.m-all { margin-top: 120px; }
.m-grid { display: grid; gap: 24px; margin-top: 32px; }
.m-grid.c2 { grid-template-columns: repeat(2, 1fr); }
.m-grid.c4 { grid-template-columns: repeat(4, 1fr); }
.m-card { display: block; }
.m-card .thumb { width: 100%; aspect-ratio: 1200 / 630; overflow: hidden; background: #E9F4FB; }
.m-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.m-card .date { margin-top: 24px; font-family: var(--f-poppins); font-size: 16px; line-height: 1; color: var(--m-ink); }
.m-card .ttl { margin-top: 8px; font-family: var(--f-a1); font-weight: 400; font-size: 18px; line-height: 1.6; color: var(--m-ink); }
.m-empty { margin-top: 32px; font-size: 16px; }

/* ---------- サイドバー ---------- */
.m-side .sh { font-family: var(--f-poppins); font-weight: 600; font-size: 24px; line-height: 1; color: var(--m-blue); }
.m-side .cats { margin-top: 16px; }
.m-side .cats a { display: flex; align-items: center; justify-content: space-between; height: 55px; padding: 0 4px 0 0; border-bottom: 1px solid var(--m-line); font-size: 16px; font-weight: 500; color: var(--m-ink); }
.m-side .cats a .material-icons { font-size: 18px; color: var(--m-ink); }
.m-side .search { margin-top: 96px; }
.m-side .search form { display: flex; margin-top: 16px; }
.m-side .search input { width: 232px; height: 48px; padding: 0 12px; border: 1px solid var(--m-line); background: #fff; box-shadow: var(--shadow); font: 500 14px var(--f-a1); }
.m-side .search button { width: 48px; height: 48px; background: var(--m-blue); color: #fff; box-shadow: var(--shadow); display: flex; align-items: center; justify-content: center; }
.m-side .search button .material-symbols-outlined { font-size: 24px; }

/* ---------- 記事ページ ---------- */
.m-article { padding-top: 120px; }
.m-article .date { font-family: var(--f-poppins); font-size: 16px; line-height: 1; color: var(--m-ink); }
.m-article h1 { margin-top: 8px; font-family: var(--f-a1); font-weight: 400; font-size: 32px; line-height: 1.6; color: var(--m-ink); }
.m-article .cover { margin-top: 20px; aspect-ratio: 1200 / 630; overflow: hidden; background: #E9F4FB; }
.m-article .cover img { width: 100%; height: 100%; object-fit: cover; }
.m-body { font-family: var(--f-a1); font-weight: 400; font-size: 16px; line-height: 1.8; color: var(--m-ink); }
.m-body p { margin: 10px 0; }
.m-body h2 { margin: 16px 0; font-weight: 700; font-size: 28px; line-height: 1.8; }
.m-body h3 { margin: 16px 0; font-weight: 700; font-size: 24px; line-height: 1.8; }
.m-body strong { font-weight: 700; }
.m-body ul { list-style: disc; padding-left: 20px; }
.m-body ul li p { margin: 0; }
.m-body blockquote { margin: 16px 0; padding: 4px 0 4px 15px; border-left: 3px solid var(--m-blue); }
.m-body a { color: var(--m-blue); text-decoration: underline; word-break: break-all; }
.m-recommend { margin-top: 80px; }
.m-crumb { margin-top: 120px; display: flex; align-items: center; gap: 12px; font-size: 14px; }
.m-crumb a { font-family: var(--f-poppins); font-weight: 500; color: var(--m-blue); }
.m-crumb .cur { font-weight: 700; }

/* ---------- 一覧ページ見出し ---------- */
.m-list-head { padding-top: 120px; }

/* ---------- フッター ---------- */
.m-footer { margin-top: 120px; background: var(--m-footer); color: #fff; padding: 80px 0; }
.m-footer .in { width: 1360px; max-width: calc(100% - 48px); margin: 0 auto; display: flex; justify-content: space-between; align-items: flex-end; }
.m-footer .name { font-family: var(--f-a1); font-weight: 500; font-size: 24px; line-height: 1; }
.m-footer .links { display: flex; gap: 16px; margin-top: 24px; font-size: 14px; line-height: 1; }
.m-footer .copy { font-family: var(--f-a1); font-weight: 300; font-size: 14px; line-height: 1.6; text-align: center; }

/* ---------- レスポンシブ ---------- */
@media (max-width: 1100px) {
  .m-container { grid-template-columns: minmax(0, 1fr); row-gap: 80px; }
  .m-side { display: grid; grid-template-columns: 1fr 1fr; column-gap: 40px; align-items: start; }
  .m-side .search { margin-top: 0; }
  .m-side .search input { width: 100%; max-width: 232px; }
  .m-hero .arrow.prev { left: 24px; }
  .m-hero .arrow.next { left: auto; right: 24px; }
  .m-grid.c4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 840px) {
  .m-header { height: 56px; padding: 0 16px; }
  .m-header .logo { font-size: 18px; }
  .m-header nav button, .m-header nav a.icon { width: 38px; height: 38px; }
  .m-header nav .material-symbols-outlined, .m-header nav .material-icons { font-size: 22px; }
  .m-header nav .menu-btn { display: flex; }
  .m-page { padding-top: 56px; }
  .m-hero { height: auto; aspect-ratio: 1029 / 540; }
  .m-hero .slide { flex-basis: 100vw; width: 100vw; height: 100%; }
  .m-hero .track { gap: 0; }
  .m-hero .slide .cap { left: 24px; right: 24px; bottom: 20px; }
  .m-hero .slide .date { font-size: 14px; }
  .m-hero .slide .ttl { font-size: 18px; }
  .m-hero .arrow { top: calc(50% - 17px); }
  .m-pickup, .m-latest, .m-all { margin-top: 64px; }
  .m-head .en { font-size: 24px; }
  .m-head .ja { font-size: 12px; }
  .m-head .viewall { font-size: 10px; gap: 8px; }
  .m-head .viewall .circle { width: 24px; height: 24px; }
  .m-head .viewall .material-icons { font-size: 14px; }
  .m-side { grid-template-columns: 1fr; row-gap: 48px; }
  .m-article { padding-top: 64px; }
  .m-article h1 { font-size: 24px; }
  .m-body h2 { font-size: 22px; }
  .m-body h3 { font-size: 19px; }
  .m-recommend { margin-top: 64px; }
  .m-crumb { margin-top: 64px; }
  .m-list-head { padding-top: 64px; }
  .m-footer { margin-top: 64px; padding: 64px 0 40px; }
  .m-footer .in { flex-direction: column; align-items: flex-start; gap: 36px; }
  .m-footer .name { font-size: 16px; }
  .m-footer .links { font-size: 12px; }
  .m-footer .copy { font-size: 10px; align-self: center; }
}
@media (max-width: 540px) {
  .m-grid.c2, .m-grid.c4 { grid-template-columns: 1fr; }
  .m-card .date { margin-top: 16px; font-size: 14px; }
  .m-card .ttl { font-size: 16px; }
}
