/* =========================
   RecycleCube Noda TOP (rc-top.css)
   TOP専用：rc-hero/rc-section/rc-card/CTA/アクセス
   ========================= */

/* TOPカラートークン（TOPだけでOK。全体で使うならbaseへ） */
:root{
  --rc-green: #2f7f6f;
  --rc-dark:  #2f2f2f;
  --rc-white: #ffffff;
  --rc-radius: 14px;
}

/* =========================
   TOPの“中身だけ”横幅制限（PCのみ）
   ※TOPが .rc-page を持つ前提
   ========================= */
:root{
  --rc-max: 1100px; /* 好みで 1000〜1200px */
  --rc-pad: 24px;
}

@media (min-width: 992px){
  .rc-page > .wp-block-group__inner-container{
    max-width: var(--rc-max);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--rc-pad);
    padding-right: var(--rc-pad);
  }

  /* HEROだけは少し狭く締める（必要なら） */
  .rc-hero .wp-block-group{
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
  }
}

/* =========================
   sections
   ========================= */
.rc-section{
  padding: 40px 16px;
}
@media (min-width: 768px){
  .rc-section{ padding: 64px 20px; }
}
.rc-section__title{
  margin: 0 0 18px;
  letter-spacing: .02em;
}

/* =========================
   hero
   ========================= */
.rc-hero{
  background: linear-gradient(180deg, rgba(47,127,111,.10), rgba(47,127,111,0));
  padding-top: 52px;
  padding-bottom: 40px;
}
.rc-hero__title{
  margin: 0 0 10px;
  line-height: 1.25;
}
.rc-hero__lead{
  margin: 0 0 18px;
  line-height: 1.8;
  opacity: .9;
}
.rc-hero__note,
.rc-note{
  margin-top: 12px;
  font-size: 0.95em;
  opacity: .85;
}

/* =========================
   buttons
   ========================= */
.rc-hero__buttons .wp-block-button__link,
.rc-btn .wp-block-button__link{
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 700;
  text-decoration: none;
}

/* primary = green */
.rc-btn--primary .wp-block-button__link{
  background: var(--rc-green);
  color: var(--rc-white);
  border: 2px solid var(--rc-green);
}

/* white button */
.rc-btn--white .wp-block-button__link{
  background: var(--rc-white);
  color: var(--rc-dark);
  border: 2px solid rgba(0,0,0,.12);
}

/* ghost button */
.rc-btn--ghost .wp-block-button__link{
  background: transparent;
  color: var(--rc-dark);
  border: 2px dashed rgba(0,0,0,.18);
  opacity: .9;
}

/* PC：CTA中央寄せ */
@media (min-width: 992px){
  .rc-hero__buttons{
    justify-content: center;
  }
}

/* =========================
   cards
   ========================= */
.rc-card{
  border: 1px solid rgba(0,0,0,.08);
  border-radius: var(--rc-radius);
  padding: 18px 18px;
  background: var(--rc-white);
  box-shadow: 0 6px 20px rgba(0,0,0,.06);
}
.rc-card h3{
  margin-top: 0;
  margin-bottom: 8px;
}

/* =========================
   access / cta
   ========================= */
.rc-cta{
  background: rgba(47,127,111,.10);
  border-top: 1px solid rgba(0,0,0,.06);
}
.rc-access{
  border-top: 1px solid rgba(0,0,0,.06);
}

/* アクセスのボタンを横並び＆等幅っぽく */
.rc-access .rc-access__buttons{
  display: flex;
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
  flex-wrap: wrap;
}
.rc-access .rc-access__buttons .wp-block-button{
  flex: 1 1 calc(50% - 12px);
  min-width: 0;
}
.rc-access .rc-access__buttons .wp-block-button__link{
  width: 100%;
  text-align: center;
  white-space: nowrap;
  min-width: 0;
  padding-left: 14px;
  padding-right: 14px;
}

.rc-access .rc-zip{ white-space: nowrap; }
.rc-nowrap{ white-space: nowrap; }

/* =========================
   SP：ファーストビュー圧縮（来店導線優先）
   ※あなたのCSSは“同じ目的の指定が複数ある”ので統合してます
   ========================= */
@media (max-width: 767px){

  .rc-hero{
    padding-top: 12px;
    padding-bottom: 10px;
    margin-top: 0;
  }

  .rc-hero__title{
    font-size: 22px;
    line-height: 1.25;
    margin: 0 0 10px;
  }

  .rc-hero__lead{
    font-size: 14px;
    line-height: 1.7;
    margin: 0 0 12px;
  }

  /* CTA：2列 + LINEは下で控えめ */
  .rc-hero .wp-block-buttons.rc-hero__buttons{
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
    justify-content: normal !important;
    align-items: stretch !important;
    margin: 0 0 10px;
  }

  .rc-hero .wp-block-buttons.rc-hero__buttons > .wp-block-button{
    width: 100% !important;
    margin: 0 !important;
    justify-self: stretch !important;
  }

  .rc-hero .wp-block-buttons.rc-hero__buttons > .wp-block-button > .wp-block-button__link{
    width: 100% !important;
    display: block !important;
    text-align: center !important;
    padding: 10px 14px !important;
    font-size: 15px !important;
    border-radius: 999px !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
    line-height: 1.2 !important;
  }

  /* LINEだけ控えめ（rc-btn--ghost想定） */
  .rc-hero .wp-block-buttons.rc-hero__buttons > .wp-block-button.rc-btn--ghost{
    grid-column: 1 / -1 !important;
    justify-self: center !important;
    width: auto !important;
  }
  .rc-hero .wp-block-buttons.rc-hero__buttons > .wp-block-button.rc-btn--ghost > .wp-block-button__link{
    width: auto !important;
    padding: 9px 16px !important;
    font-size: 14px !important;
    opacity: .88 !important;
  }

  .rc-hero__note{
    font-size: 12px;
    margin-top: 8px;
    margin-bottom: 10px;
  }

  /* ヒーロー直後の次セクションが見えるように */
  .rc-hero + .rc-section{
    padding-top: 2px;
    margin-top: 0;
  }
}

/* SPだけ改行させる（TOPでも使うならここでOK） */
.sp-only{ display:none; }
@media (max-width: 767px){
  .sp-only{ display:block; }
}

/* =========================
   TOP：セクション余白を全体で詰める（PC/SP共通）
   ========================= */

/* 基準値（好みで微調整） */
:root{
  --rc-sec-py: 28px;     /* セクション上下（PC基準） */
  --rc-sec-py-sp: 18px;  /* セクション上下（SP基準） */
  --rc-sec-px: 16px;     /* 左右（SP） */
  --rc-sec-px-md: 20px;  /* 左右（タブレット〜） */
}

/* テーマ由来のmarginを殺し、paddingを基準化 */
.rc-page .rc-section{
  margin: 0 !important;                 /* ← 15px margin-top を潰す */
  padding: var(--rc-sec-py) var(--rc-sec-px) !important;
}

/* タブレット以上：左右だけ少し広げる（上下は同じ） */
@media (min-width: 768px){
  .rc-page .rc-section{
    padding-left: var(--rc-sec-px-md) !important;
    padding-right: var(--rc-sec-px-md) !important;
  }
}

/* SP：上下をさらに詰める */
@media (max-width: 767px){
  .rc-page .rc-section{
    padding-top: var(--rc-sec-py-sp) !important;
    padding-bottom: var(--rc-sec-py-sp) !important;
  }
}

/* セクション内の最後のブロックmarginが余白を増やすのを防ぐ */
.rc-page .rc-section :where(p, ul, ol, .wp-block-columns, .wp-block-group, .wp-block-buttons):last-child{
  margin-bottom: 0 !important;
}

/* =========================
   買取の流れ：カード化（#flow）
   ========================= */

#flow ol,
#flow .wp-block-list{
  list-style: none;
  padding-left: 0;
  margin: 0;
  counter-reset: rcflow;
}

#flow li{
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 14px;
  padding: 14px 14px;
  margin: 0 0 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,.05);
  counter-increment: rcflow;
  position: relative;
  padding-left: 48px;
}

#flow li::before{
  content: counter(rcflow);
  position: absolute;
  left: 14px;
  top: 14px;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-weight: 700;
  background: rgba(92,158,49,.12);
  color: #2f6c1c;
}

/* 注釈/補足を薄く（使ってる場合だけ） */
#flow small,
#flow .rc-sub{
  display:block;
  margin-top: 6px;
  font-size: .92em;
  opacity: .85;
  line-height: 1.6;
}

/* =========================
   FAQ：カード + 線の＋/−（rc-faq のみ）
   - 文字（＋/−）は使わず、線で描画して文字化け回避
   - テーマ側の疑似要素contentも確実に無効化
   ========================= */

/* カード本体 */
.rc-faq .wp-block-details{
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 14px;
  background: #fff;
  padding: 14px 16px;
  margin: 12px 0;
  box-shadow: 0 1px 0 rgba(0,0,0,.03);
}

/* summary（質問行） */
.rc-faq .wp-block-details > summary{
  cursor: pointer;
  font-weight: 700;
  list-style: none;
  display: flex;
  align-items: flex-start;
  gap: 12px;

  position: relative;
  padding-right: 34px; /* 右側に＋/−のスペース */
}

/* 標準のマーカー（Safari等）を消す */
.rc-faq .wp-block-details > summary::-webkit-details-marker{
  display: none;
}

/* テーマや既存CSSの「文字content」を確実に殺す */
.rc-faq .wp-block-details > summary::after{
  content: "" !important;
}

/* ＋/−の横線（afterを“箱”として使う） */
.rc-faq .wp-block-details > summary::after{
  display: block;
  position: absolute;
  right: 16px;
  top: 50%;
  width: 14px;
  height: 2px;
  background: rgba(0,0,0,.45);
  transform: translateY(-50%);
}

/* ＋の縦線（before） */
.rc-faq .wp-block-details > summary::before{
  content: "";
  display: block;
  position: absolute;
  right: 16px;
  top: 50%;
  width: 14px;
  height: 2px;
  background: rgba(0,0,0,.45);
  transform: translateY(-50%) rotate(90deg);
  opacity: .7;
}

/* open時：縦線を消して「−」にする */
.rc-faq .wp-block-details[open] > summary::before{
  opacity: 0;
}

/* 回答文 */
.rc-faq .wp-block-details p{
  margin: 10px 0 0;
  line-height: 1.8;
  opacity: .9;
}


/* =========================================
   TOP（PC）：l-top_global_navi の「お知らせ」リンクが白になるのを確実に潰す
   ※ theme側の !important に勝つため、セレクタ強め＋全状態指定
========================================= */
@media (min-width: 768px){

  html body.type-home div.layout.l-top_global_navi nav.global_navi.global_navi-is-top.global_navi-is-separate
  .global_navi__list > .global_navi__item > a,
  html body.type-home div.layout.l-top_global_navi nav.global_navi.global_navi-is-top.global_navi-is-separate
  .global_navi__list > .global_navi__item > a:link,
  html body.type-home div.layout.l-top_global_navi nav.global_navi.global_navi-is-top.global_navi-is-separate
  .global_navi__list > .global_navi__item > a:visited,
  html body.type-home div.layout.l-top_global_navi nav.global_navi.global_navi-is-top.global_navi-is-separate
  .global_navi__list > .global_navi__item > a:hover,
  html body.type-home div.layout.l-top_global_navi nav.global_navi.global_navi-is-top.global_navi-is-separate
  .global_navi__list > .global_navi__item > a:active{
    color: #222 !important;
    -webkit-text-fill-color: #222 !important;
    opacity: 1 !important;
    visibility: visible !important;
    text-shadow: none !important;
    filter: none !important;
    mix-blend-mode: normal !important;
  }
}

/* =========================================
   TOP（PC）：お知らせ帯〜H1の間の空白を詰める
========================================= */
@media (min-width: 768px){

  /* お知らせ帯の上下余白を圧縮（30px → 8〜12px くらい） */
  body.type-home .l-top_global_navi{
    padding-top: 10px !important;
    padding-bottom: 10px !important;
  }

  /* ヒーロー上の余白も少し圧縮（必要なら） */
  body.type-home .rc-hero{
    padding-top: 14px !important; /* 好みで 10〜18 */
  }
}

/* TOPだけ：パンくずの空白を完全に消す（page-id をTOPに合わせる） */
body.page-id-52 .layout.l-breadcrumb{
  display:none !important;
  margin:0 !important;
  padding:0 !important;
  height:0 !important;
  overflow:hidden !important;
}


/* TOP：ジャンル別（工具/釣具）リンクを“軽い導線”に */
.rc-top-links .wp-block-button__link{
  background: transparent !important;
  border: 1px solid currentColor !important;
  color: inherit !important;
  box-shadow: none !important;
  border-radius: 999px;
  padding: 0.9em 1.2em;
}

/* 矢印っぽいアクセント（文字化け回避のため疑似要素） */
.rc-top-links .wp-block-button__link::after{
  content: "";
  display: inline-block;
  width: 0.45em;
  height: 0.45em;
  margin-left: 0.6em;
  border-right: 2px solid currentColor;
  border-top: 2px solid currentColor;
  transform: rotate(45deg);
  vertical-align: middle;
}

/* スマホ：縦並びを綺麗に（余白だけ整える） */
@media (max-width: 768px){
  .rc-top-links .wp-block-buttons{
    gap: 10px;
  }
  .rc-top-links .wp-block-button{
    width: 100%;
  }
  .rc-top-links .wp-block-button__link{
    width: 100%;
    justify-content: center;
    display: inline-flex;
    text-align: center;
  }
}

/* TOP：ジャンル別ボタンの矢印（疑似要素）を消す */
.rc-top-links .wp-block-button__link::after{
  content: none !important;
  display: none !important;
}

/* 文字の詰まり具合を微調整（任意） */
.rc-top-links .wp-block-button__link{
  letter-spacing: 0.02em;
}

/* 画像キャプション：スマホは1行省略で控えめに */
@media (max-width: 600px){
  .wp-element-caption{
    font-size: 12px;
    line-height: 1.4;
    margin-top: 6px;
    opacity: .75;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

