/* ==========================================================
   Cocoonテーマの上書き・調整
   親テーマの挙動を調整するための最終上書きCSS
========================================================== */

/* ==========================================================
   不要な要素を完全に非表示
========================================================== */

/* パンくずリスト */
.breadcrumb,
#breadcrumb {
  display: none !important;
}

/* サイドバー */
#sidebar,
.sidebar {
  display: none !important;
}

/* シェアボタン */
.sns-share,
.sns-follow,
.share-buttons {
  display: none !important;
}

/* コメント欄 */
#comments,
.comments-area {
  display: none !important;
}

/* 関連記事 */
.related-entries,
.blogcard {
  display: none !important;
}

/* ページネーション（不要な場合） */
.pagination,
.pager {
  display: none !important;
}



/* ==========================================================
   Cocoonのデフォルトスタイルをリセット
========================================================== */

/* リンク色 */
a {
  color: inherit;
  transition: color 0.2s ease;
}

a:hover {
  opacity: 0.8;
}



/* フォーム */
input,
textarea,
select,
button {
  font-family: inherit;
}

/* ==========================================================
   モバイルフッターメニューを完全削除
========================================================== */

.mobile-menu-buttons,
.mobile-footer-menu-buttons,
#mobile-menu {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* ==========================================================
   トップへ戻るボタンを削除
========================================================== */

.go-to-top,
#go-to-top,
.go-to-top-button,
.page-top,
#page-top {
  display: none !important;
}

/* ==========================================================
   フッターの不要な要素
========================================================== */

.footer-widgets,
.footer-menu,
.footer-navi {
  display: none !important;
}

/* ==========================================================
   アクセシビリティ改善
========================================================== */

/* フォーカス時のアウトライン */
a:focus,
button:focus,
input:focus,
textarea:focus {
  outline: 2px solid #ffc107;
  outline-offset: 2px;
}

/* スキップリンク */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--bg);
  color: var(--text);
  padding: 8px;
  text-decoration: none;
  z-index: 100000;
}

.skip-link:focus {
  top: 0;
}

/* ==========================================================
   印刷時の調整
========================================================== */

@media print {
  #header,
  #footer,
  .fv-video-controls,
  .menu-toggle,
  #navi {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }

  a {
    color: black;
    text-decoration: underline;
  }
}

/* ===== SP: メニューの黒背景が上に出るのを防止（完全に隠す） ===== */
@media (max-width: 960px){
  /* ヘッダーを必ず最前面に */
  #header-container{ z-index: 100000 !important; }

  /* メニューはヘッダーより下に。安全領域（iPhoneノッチ）も考慮 */
  #navi.ob-nav{
    top: calc(var(--header-h) + env(safe-area-inset-top, 0px)) !important;
    height: calc(100dvh - var(--header-h) - env(safe-area-inset-top, 0px)) !important;

    /* 閉じてる時は完全に不可視 */
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;

    transform: translateY(-120%) !important; /* 念のため余分に上へ */
  }

  /* 開いた時 */
  #navi.ob-nav.active{
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: translateY(0) !important;
  }
}

