/*
 Theme Name: ANVYGO SWELL Child
 Template: swell
 Text Domain: swell-child
 Description: Child theme tweaks for ANVYGO
 Version: 1.0.0
 Author: ANVYGO Studio
*/

/* 透かしラッパー（本文/アイキャッチ） */
.watermark-wrapper{
  position:relative;
  display:inline-block;
  max-width:100%;
  height:auto;
  pointer-events:none !important; /* 画像リンクも無効化：保存抑止を優先 */
}
.watermark-wrapper img{
  display:block;
  max-width:100%;
  height:auto;
  -webkit-touch-callout:none !important; /* iOS 長押しメニュー無効 */
  -webkit-user-select:none !important;
  user-select:none !important;
  -webkit-user-drag:none !important;
}

/* 透かしロゴ（本文画像用） */
.watermark-wrapper::after{
  content:"";
  position:absolute;
  right:3%;
  bottom:3%;
  width:100px;
  aspect-ratio:1/1;
  background-image:url('https://nomaways.com/wp-content/uploads/2025/08/mainlogo.png');
  background-repeat:no-repeat;
  background-size:contain;
  opacity:.38;
  pointer-events:none;
  z-index:10;
}

/* Gutenberg figure 直置き画像も保険で透かし */
.entry-content figure.wp-block-image{ position:relative; overflow:hidden; }
.entry-content figure.wp-block-image::after{
  content:"";
  position:absolute; right:3%; bottom:3%;
  width:clamp(64px,18%,120px); aspect-ratio:1/1;
  background-image:url('https://nomaways.com/wp-content/uploads/2025/08/mainlogo.png');
  background-repeat:no-repeat; background-size:contain;
  opacity:.38; pointer-events:none;
}

/* SWELLのアイキャッチ枠に重ねる（背景方式でも確実に表示） */
.single-post .post-thumbnail,
.single-post .c-eyecatch,
.single-post [class*="eyecatch"],
.single-post [class*="post-thumb"],
.single-post .p-articleThumb,
.single-post .p-article__thumb,
.single-post .p-articleHead{
  position:relative;
}
.single-post .post-thumbnail::after,
.single-post .c-eyecatch::after,
.single-post [class*="eyecatch"]::after,
.single-post [class*="post-thumb"]::after,
.single-post .p-articleThumb::after,
.single-post .p-article__thumb::after,
.single-post .p-articleHead::after{
  content:"";
  position:absolute;
  right:3%; bottom:3%;
  width:120px; aspect-ratio:1/1;
  background-image:url('https://nomaways.com/wp-content/uploads/2025/08/mainlogo.png');
  background-repeat:no-repeat; background-size:contain;
  opacity:.38; pointer-events:none; z-index:10;
}

/* スマホは少し小さく */
@media (max-width:767px){
  .watermark-wrapper::after{ width:88px; }
  .single-post .post-thumbnail::after,
  .single-post .c-eyecatch::after,
  .single-post [class*="eyecatch"]::after,
  .single-post [class*="post-thumb"]::after,
  .single-post .p-articleThumb::after,
  .single-post .p-article__thumb::after,
  .single-post .p-articleHead::after{ width:108px; }
}

/* ===== タイトル(コンテンツヘッダー)の調整 ===== */

/* 1) タイトルエリアの透かしロゴは非表示（当てていた擬似要素＆JSフォールバック両方を無効化） */
.single-post .p-articleHead::after { content: none !important; }
.single-post .p-articleHead .wm-badge { display: none !important; }

/* 2) タイトル背後の四角い帯（背景）を消す */
.single-post .p-articleHead .c-postTitle,
.single-post .p-articleHead .c-postTitle__inner,
.single-post .p-articleHead .p-articleTitle,
.single-post .p-articleHead .p-articleTitle__inner{
  background: transparent !important;
  backdrop-filter: none !important;
  box-shadow: none !important;
  border: none !important;
}

/* 3) 文字は読みやすく（色＋テキストシャドウ） */
.single-post .p-articleHead h1,
.single-post .p-articleHead .c-postTitle__ttl{
  color: #fff !important;
  text-shadow: 0 2px 8px rgba(0,0,0,.55);
}

/* 4) （任意）SWELLのドット等のフィルターやオーバーレイが残る場合は消す */
.single-post .p-articleHead::before{
  background: none !important;
  opacity: 0 !important;
}

/* ===== タイトル帯（背景ボックス）を完全に消す ===== */
.single-post .p-articleHead .c-postTitle,
.single-post .p-articleHead .c-postTitle__inner,
.single-post .p-articleHead .p-articleTitle,
.single-post .p-articleHead .p-articleTitle__inner,
.single-post .p-articleHead [class*="postTitle"]{
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* ボックスの疑似要素で出している帯も消す */
.single-post .p-articleHead .c-postTitle::before,
.single-post .p-articleHead .c-postTitle__inner::before,
.single-post .p-articleHead .p-articleTitle::before,
.single-post .p-articleHead .p-articleTitle__inner::before,
.single-post .p-articleHead [class*="postTitle"]::before,
.single-post .p-articleHead [class*="postTitle"]::after{
  content: none !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* 文字は読みやすく（必要に応じて） */
.single-post .p-articleHead h1,
.single-post .p-articleHead .c-postTitle__ttl{
  color: #fff !important;
  text-shadow: 0 2px 8px rgba(0,0,0,.55);
}

/* 記事ヘッダー内のタイトル帯（背景ボックス）を強制的に消す */
.p-articleHead .c-postTitle,
.p-articleHead .p-article__title { background: transparent !important; box-shadow:none !important; padding:0 !important; color: inherit !important; }

/* --- 記事ヘッダー(コンテンツヘッダー)内の背景プレート/帯を完全に無効化 --- */
.single-post .p-articleHead,
.single-post .p-articleHead *,
.single-post .p-articleHead::before,
.single-post .p-articleHead::after {
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  border: 0 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* 見出し文字は読みやすく（必要なら調整） */
.single-post .p-articleHead h1,
.single-post .p-articleHead .c-postTitle__ttl{
  color: #fff !important;
  text-shadow: 0 2px 8px rgba(0,0,0,.55);
}