/*
 * Lightning Theme Reset CSS
 * WordPress Lightning 親テーマ用リセットCSS
 *
 * 用途: 子テーマのカスタムスタイルを適用する前に
 *       Lightning / VK テーマのデフォルトスタイルを初期化します。
 *
 * 読み込み順: このファイル → 子テーマの style.css
 *
 * 対象バージョン: Lightning 15.x / ExUnit 対応
 */

/* ============================================================
   1. CSS カスタムプロパティのリセット
   ============================================================ */
:root {
  /* Lightning が定義するカラー変数を中立値で上書き */
  --color-primary:        initial;
  --color-primary-dark:   initial;
  --color-secondary:      initial;
  --vk-color-primary:     initial;
  --vk-color-primary-dark:initial;
  --vk-color-secondary:   initial;

  /* フォント */
  --vk-font-size-base:    initial;
  --vk-line-height-base:  initial;
  --vk-font-family:       initial;

  /* コンテナ幅 */
  --vk-width-container:   initial;
  --vk-width-content:     initial;
  --vk-width-col-2:       initial;

  /* ヘッダー */
  --vk-height-header:              initial;
  --vk-height-header-mobile:       initial;
  --vk-header-bg-color:            initial;
  --vk-header-text-color:          initial;
  --vk-header-logo-height:         initial;
  --vk-header-logo-height-mobile:  initial;

  /* フッター */
  --vk-footer-bg-color:            initial;
  --vk-footer-text-color:          initial;

  /* ボタン */
  --vk-btn-border-radius:          initial;
  --vk-btn-padding-x:              initial;
  --vk-btn-padding-y:              initial;
}

/* ============================================================
   2. ボックスモデル統一
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* ============================================================
   3. HTML / Body の基本リセット
   ============================================================ */
html {
  font-size: 100%; /* 親テーマの rem 基準を保持しつつ上書き可能に */
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  line-height: 1.7;
  background-color: #fff;
  color: #333;
  font-family: inherit; /* 子テーマで上書き */
  word-break: break-word;
  overflow-wrap: break-word;
}

/* ============================================================
   4. 見出し (h1–h6)
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  margin: 0 0 1rem;
  padding: 0;
  font-weight: bold;
  line-height: 1.3;
  border: none;           /* Lightning が付ける border-left などを除去 */
  background: none;       /* 背景色リセット */
  letter-spacing: normal;
}

/* Lightning / ExUnit が追加する疑似要素装飾を除去 */
h1::before, h1::after,
h2::before, h2::after,
h3::before, h3::after,
h4::before, h4::after,
h5::before, h5::after,
h6::before, h6::after {
  display: none;
  content: none;
}

/* ============================================================
   5. テキスト要素
   ============================================================ */
p {
  margin: 0 0 0rem;
  padding: 0;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover,
a:focus {
  opacity: 0.75;
  text-decoration: none;
  outline: none;
}

strong, b { font-weight: bold; }
em, i     { font-style: italic; }
small     { font-size: 0.875em; }

abbr[title] {
  text-decoration: underline dotted;
  cursor: help;
}

/* ============================================================
   6. リスト
   ============================================================ */
ul, ol, dl {
  margin: 0 0 1.25rem;
  padding: 0 0 0 1.5rem;
}

li {
  margin: 0;
  padding: 0;
}

/* Lightning がリセットしていない ul のスタイルを明示的に除去 */
.entry-content ul,
.entry-content ol {
  list-style: revert; /* ブロックエディタのデフォルトに戻す */
}

/* ============================================================
   7. テーブル
   ============================================================ */
table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
}

th, td {
  padding: 0.5rem 0.75rem;
  text-align: left;
  vertical-align: top;
  border: 1px solid #ddd;
}

/* ============================================================
   8. フォーム要素
   ============================================================ */
input,
textarea,
select,
button {
  margin: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  border-radius: 0;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: none;
  outline: none;
}

button,
[type="button"],
[type="submit"],
[type="reset"] {
  cursor: pointer;
}

input:focus,
textarea:focus,
select:focus {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/*
 * チェックボックス・ラジオボタンはブラウザデフォルト外観を復元。
 * input リセットで appearance:none / border:none になるのを上書き。
 */
input[type="checkbox"],
input[type="radio"] {
  -webkit-appearance: auto;
  appearance: auto;
  border: revert;
  background: revert;
  border-radius: revert;
  box-shadow: revert;
  width: auto;
  height: auto;
  padding: 0;
  cursor: pointer;
}

input[type="submit"] {
  cursor: pointer;
}

/* ============================================================
   9. メディア要素
   ============================================================ */
img,
video,
iframe,
embed,
object {
  max-width: 100%;
  height: auto;
  display: block;
  border: none;
  vertical-align: middle;
}

figure {
  margin: 0;
}

figcaption {
  font-size: 0.875em;
  color: #666;
}

/* ============================================================
   10. Lightning / VK コンポーネント 個別リセット
   ============================================================ */

/* --- グローバルナビゲーション --- */
.global-nav,
.vk-global-nav {
  background: none;
  border: none;
  box-shadow: none;
}

.global-nav ul,
.global-nav li {
  margin: 0;
  padding: 0;
  list-style: none;
}

.global-nav a {
  color: inherit;
  background: none;
}

/* ドロップダウン */
.global-nav .sub-menu {
  box-shadow: none;
  border: none;
}

/* --- ページヘッダー (site-header) --- */
.site-header {
  background: none;
  box-shadow: none;
  border-bottom: none;
}

/* --- パンくずリスト (VK Breadcrumb) --- */
.vk-breadcrumb,
.breadcrumb {
  margin: 0;
  padding: 0;
  background: none;
  border: none;
  font-size: inherit;
  color: inherit;
}

/* --- ヒーローヘッダー / メインビジュアル --- */
.vk-hero,
.vk-mv,
.mv_before_loop {
  margin: 0;
  padding: 0;
}

/* --- ウィジェット --- */
.widget {
  margin: 0 0 2rem;
  padding: 0;
}

.widget-title,
.widgettitle {
  margin: 0 0 0.75rem;
  padding: 0;
  font-size: 1rem;
  font-weight: bold;
  border: none;
  background: none;
}

.widget-title::before,
.widget-title::after,
.widgettitle::before,
.widgettitle::after {
  display: none;
  content: none;
}

/* --- カード / ブロック --- */
.vk-card,
.vk-block-card {
  margin: 0;
  padding: 0;
  border: none;
  box-shadow: none;
  background: none;
  border-radius: 0;
}

/* --- ボタン (vk-btn) --- */
.vk-btn,
.btn,
[class*="wp-block-button__link"] {
  margin: 0;
  padding: 0.5em 1.25em;
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: none;
  color: inherit;
  font: inherit;
  letter-spacing: normal;
  text-transform: none;
  transition: none;
  cursor: pointer;
}

/* --- セクション / コンテンツエリア --- */
.site-main,
.content-area,
.entry-content {
  margin: 0;
  padding: 0;
}

/* --- サイドバー --- */
.widget-area,
.sidebar {
  margin: 0;
  padding: 0;
}

/* --- フッター --- */
.site-footer {
  margin: 0;
  padding: 0;
  background: none;
  border: none;
  box-shadow: none;
  color: inherit;
}

/* --- ページネーション --- */
.pagination,
.page-numbers,
.vk-pagenation {
  margin: 0;
  padding: 0;
}

.page-numbers li {
  list-style: none;
}

/* --- 投稿メタ情報 --- */
.entry-meta,
.vk-post-meta {
  font-size: 0.875rem;
  color: #666;
}

/* ============================================================
   11. Gutenberg / ブロックエディタ関連リセット
   ============================================================ */
.wp-block-group,
.wp-block-columns,
.wp-block-column {
  margin: 0;
  padding: 0;
}

.wp-block-image {
  margin: 0;
}

.wp-block-image img {
  height: auto;
}

/* ============================================================
   12. アクセシビリティ補助
   ============================================================ */
.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

.skip-link:focus {
  background: #000;
  color: #fff;
  clip: auto !important;
  clip-path: none;
  display: block;
  height: auto;
  left: 0;
  position: fixed;
  top: 0;
  width: 100%;
  padding: 1rem;
  z-index: 9999;
}

/* ============================================================
   13. ユーティリティ（任意で使用）
   ============================================================ */
.reset-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.reset-button {
  all: unset;
  cursor: pointer;
}

/* ============================================================
   END OF RESET
   ここ以降に 子テーマの style.css を読み込んでください。
   ============================================================ */

/* ============================================================
   14. Lightning 固定ページ フルワイド化
       & ページヘッダー / パンくずリスト 非表示
   ============================================================ */

/*
 * ページソース確認で判明した実際の制約構造:
 *
 *   <div class="site-body-container container">   ← Bootstrap .container で幅制限
 *     <div class="main-section">
 *       <div class="entry entry-full">
 *         <div class="entry-body">
 *           <section class="alignfull">  ← 全幅にしたい箇所
 *
 * .site-body-container.container / .main-section / .entry / .entry-body
 * の4層すべての max-width・padding を解除する。
 */

/* 【核心】.container による幅制限を解除 */
.cf-pattern-page .site-body-container,
.cf-pattern-page .site-body-container.container {
  max-width: none !important;
  width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* .main-section の余白を除去 */
.cf-pattern-page .main-section {
  max-width: none !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* .entry / .entry-full / .entry-body の余白を除去 */
.cf-pattern-page .entry,
.cf-pattern-page .entry-full,
.cf-pattern-page .entry-body {
  max-width: none !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* .site-body 自体にも念のため overflow を許可 */
.cf-pattern-page .site-body {
  overflow-x: hidden;
}

/*
 * 既存セレクタ（l-main 系）も残す（テーマバージョン差異への保険）
 */
.cf-pattern-page .l-main,
.cf-pattern-page .l-main__primary,
.cf-pattern-page #primary,
.cf-pattern-page .content-area,
.cf-pattern-page .site-main,
.cf-pattern-page article.page,
.cf-pattern-page .entry-content {
  max-width: 100% !important;
  width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  float: none !important;
}

/*
 * alignfull ブロックの全幅表示
 * 親がすでに 100vw になっていれば margin の計算は不要だが保険として残す
 */
.cf-pattern-page .entry-body > .alignfull,
.cf-pattern-page .entry-body > section.alignfull,
.cf-pattern-page .entry-body > .wp-block-group.alignfull {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/*
 * ページタイトル（エントリーヘッダー）を非表示
 * ソース確認: <div class="page-header"><div class="page-header-inner container">
 */
.page-header,
.cf-pattern-page .page-header,
.cf-pattern-page .entry-header {
  display: none !important;
}

/*
 * パンくずリスト（VK All in One Expansion Unit）を非表示
 * ソース確認: <div id="breadcrumb" class="breadcrumb">
 */
#breadcrumb,
.breadcrumb,
.cf-pattern-page #breadcrumb,
.cf-pattern-page .breadcrumb,
.vk-breadcrumb-wrapper,
.vk-breadcrumbs,
.vk_breadcrumbs {
  display: none !important;
}

/*
 * サイドバー列を完全非表示
 */
.cf-pattern-page .l-main__secondary,
.cf-pattern-page .widget-area {
  display: none !important;
}
