/*
Theme Name: STINGER8 Child
Template: stinger8
Description: 湖南市社協「お知らせ」サイト用 STINGER8 子テーマ
Version: 1.0.0
*/

/* ==========================================================
   読み込み順:
   normalize.css → font-awesome → 親 style.css → このファイル
   親と同じ詳細度のルールは、このファイルが後勝ちになる。
   ブレークポイントは親テーマに合わせる
   (スマホ: 〜599px / タブレット: 600〜959px / PC: 960px〜)
   ========================================================== */


/* ----------------------------------------------------------
   1. ページ全体・背景
   ---------------------------------------------------------- */
body {
  background: #fff url("https://shiga-konan-shakyo.or.jp/news/wp-content/uploads/2020/10/お知らせ背景85.jpg") no-repeat top;
  background-size: contain;
}

#content {
  max-width: 840px;                      /* 全体の横幅 */
  background: rgba(255, 255, 255, 0.2);
}

/* 記事エリア(旧: 2か所に分かれていた定義を統合) */
.st-main {
  max-width: 520px;
  display: block;
  padding-top: 8px;                      /* 親: PC30px / スマホ20px を縮小 */
  padding-left: 20px;
  padding-right: 10px;
  margin-right: 0;
  background-color: transparent;
}

#content-w {
  margin: 0;
  padding: 0;
}

.wp-element-caption {
  font-size: small;
}

/* PC幅(親テーマのPCレイアウトと同じ960px〜) */
@media screen and (min-width: 960px) {
  body {
    background-size: auto;
  }
  .ad {
    margin-top: 20px;
    max-width: 240px;
  }
  #mybox {
    float: right;
    margin-right: 20px;
  }
}


/* ----------------------------------------------------------
   2. ヘッダー(ロゴ行・ハンバーガー・画像メニュー)
   ---------------------------------------------------------- */

/* ハンバーガーをPCでも常時表示(親: 960px〜で .pcnone を !important で隠すため) */
@media screen and (min-width: 960px) {
  #s-navi {
    display: block !important;
  }
}

/* ハンバーガー: 行を取らず、ロゴと同じ行の右上に重ねる */
#headbox {
  position: relative;
  padding: 6px 10px 4px;
}

#s-navi {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 0;
  margin: 0;                             /* 親の margin:0 -10px を解除 */
  z-index: 10000;
}

#s-navi:after {
  display: none;                         /* 親が入れる下5pxの余白を消す */
}

#s-navi dt.trigger {
  height: 0;
  overflow: visible;                     /* ボタンがはみ出して見えるように */
}

#s-navi dt.trigger .op {
  background: #3669ba;
  color: #fff;
  position: absolute;
  top: 6px;
  right: 6px;
  float: none;
  margin: 0;
  max-width: none;
  padding: 6px 10px;
  font-size: 22px;
  line-height: 26px;
  border-radius: 4px;
}

/* 開いたメニューはページを押し下げず、上に重ねて表示 */
#s-navi dd.acordion_tree {
  position: absolute;
  top: 46px;
  right: 6px;
  width: calc(100% - 12px);
  max-width: 340px;
  background: #fff;
  border: 2px solid #3669ba;
  border-radius: 6px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .3);
  max-height: 75vh;
  overflow-y: auto;
}

/* アコーディオン: 行全体をホバー色にし、行のどこでもクリック可能にする */
#s-navi .acordion_tree ul.menu li {
  position: relative;
  transition: background-color .15s;
}

#s-navi .acordion_tree ul.menu li:hover {
  background-color: #d5ffff;
}

#s-navi .acordion_tree ul.menu li a::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}

/* キーボード操作時に現在位置が分かるようにする(追加) */
#s-navi .acordion_tree ul.menu li a:focus-visible {
  outline: 2px solid #3669ba;
  outline-offset: -2px;
}

/* ロゴ行: 600px以上は横並び、599px以下は縦並び */
header .sitename {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  margin: 0;
  padding: 0 56px 0 0;                   /* 右はハンバーガーボタンの避け幅 */
  line-height: 1;
}

header .sitename a {
  margin: 0;
  display: block;
  flex: none;                            /* 縮ませない(サイズ固定) */
}

header .sitename a:first-child {
  margin-top: 17px;                      /* 社協ロゴの上の余白 */
}

header .sitename img {
  width: auto;
  max-width: none;                       /* 親の max-width:100% を解除 */
  max-height: none;
  margin: 0;
}

@media (max-width: 599px) {
  header .sitename {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}

/* PCの画像メニュー(アイコン5つ)と本文開始位置の余白 */
#gazou-wide {
  margin: 5px;
  padding: 0;
}

#st-menubox {
  margin-bottom: 15px;
}

#st-menuwide {
  background: rgba(25, 181, 254, 0.1);
}

header .smanone ul.menu li {
  height: 50px;
  width: 168px;
}


/* ----------------------------------------------------------
   3. 記事一覧・サイドバー
   ---------------------------------------------------------- */
.st-aside .kanren {
  padding-top: 0;                        /* 一覧直前の20pxを削除 */
}

.side-topad .ad {
  margin-top: 0;                         /* サイドバー最上部の20pxを削除 */
}

.menu_underh2 {
  margin-bottom: 0;
}

/* 講座申込ボタン(サイドバー) */
.box13 {
  text-align: center;
  padding: 0.1em 0.5em;
  margin: 0;
  color: #fff;
  background: #6eb7ff;
  border-bottom: solid 6px #3f87ce;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.25);
  border-radius: 9px;
}

.box13 p {
  margin: 0;
  padding: 0;
}

.box13 a {
  color: #fff;
}

/* 記事内の表 */
.t2 td {
  padding: 6px;
}

/* ページ送り */
.st-pagelink .page-numbers {
  padding-top: 1px;
  height: 25px;
  background-color: whitesmoke;
}


/* ----------------------------------------------------------
   4. SNSボタン(Xボタンを黒に)
   ---------------------------------------------------------- */
.sns .twitter a {
  background: #1e282e;
}

.sns .twitter a:hover {
  background: #000;
}

.sns .fa-twitter {
  border-right: 1px solid #000;
  padding-right: 15px;
}


/* ----------------------------------------------------------
   5. ユーティリティ
   ---------------------------------------------------------- */
/* 画面には出さず、読み上げ・検索エンジンには見せる(h1用) */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
