@charset "UTF-8";

/*!
Theme Name: Cocoon Child
Description: Cocoon専用の子テーマ
Theme URI: https://wp-cocoon.com/
Author: わいひら
Author URI: https://nelog.jp/
Template:   cocoon-master
Version:    1.1.3
*/

/************************************
** 子テーマ用のスタイルを書く
************************************/
body {
    overflow-x: hidden !important;
	font-family: ui-monospace !important;
}
#toc3 {
    color: #0096d6 !important; /* 好きな水色に変更可 */
}
.is-style-blank-box-blue .wp-block-list {
    border: none;
    padding-left: 10px;
}
/* ===== Popular Posts Slider ===== */
.pps {
  --gap: 28px;
  --radius: 16px;
  --shadow: 0 6px 20px rgba(0,0,0,.08);
  /* 両端の “のぞかせ幅”：25% で「半分見せ」相当。画面に応じて上限も設定 */
  --peek: clamp(16px, 25vw, 200px);
}

.pps-swiper{
  position: relative;
  /* 両端に余白＝のぞかせ幅。overflowを可視化 */
  padding-left: var(--peek);
  padding-right: var(--peek);
  overflow: visible;
}

/* スライドの横幅は「全幅 − 左右のぞかせ分×2」= 中央を大きく見せる */
.pps-swiper .swiper-slide{
  width: calc(89% - (var(--peek) * 2));
  height: auto;
  transition: transform .35s ease, opacity .35s ease, box-shadow .35s ease;
  transform: scale(.94);
  opacity: .7;
}

/* 中央を主役に */
.pps-swiper .swiper-slide-active{
  transform: scale(1);
  opacity: 1;
}

/* 隣のスライドは少しだけ強調 */
.pps-swiper .swiper-slide-prev,
.pps-swiper .swiper-slide-next{
  transform: scale(.97);
  opacity: .85;
}

/* 既存カードレイアウトはそのまま */
.pps-card{
  display:grid; grid-template-columns: 42% 58%;
  background:#fff; border-radius: var(--radius); box-shadow: var(--shadow);
  overflow:hidden; height:100%;
width: 70%;
margin: auto;
}
.pps-card__media img{
  width:100%; height:100%; object-fit:cover; display:block; aspect-ratio: 4/3;
}

/* ナビは外側に被せる */
.pps-nav{
  position:absolute; top:50%; transform: translateY(-50%);
  width:42px; height:42px; border-radius:50%; background:#b40019;
  border:none; box-shadow: var(--shadow); cursor:pointer; z-index: 5;
color: #fff;
font-weight: bold;
font-size: 1rem;
}
.pps-prev{ left: 30%; }
.pps-next{ right: 30%; }
/* === Popular Posts：画像上／テキスト下 レイアウト === */
.pps-card{
  display:flex;
  flex-direction: column;     /* ← 縦並び */
  background:#fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow:hidden;
  height:100%;
}

/* 画像は横幅いっぱい／比率固定 */
.pps-card__media{
  position: relative;
  width: 100%;
}
.pps-card__media img{
  display:block;
  width:100%;
  height:auto;
  aspect-ratio: 16 / 9;       /* お好みで 4/3 などに変更可 */
  object-fit: cover;
}

/* 本文は残りを占有して最下部にボタンが来るように */
.pps-card__body{
  display:flex;
  flex-direction: column;
  gap:10px;
  padding: clamp(12px, 2vw, 18px);
  flex: 1 1 auto;
}

/* テキストまわり（既存を踏襲。必要なら微調整） */
.pps-card__date{ font-size:12px; color:#777; }
.pps-card__title{ font-size: clamp(16px, 1.6vw, 20px); line-height:1.4; margin:0; }
.pps-card__pill{
  display:inline-block; background:#cf102d; color:#fff; font-weight:700;
  border-radius:999px; padding:6px 10px; font-size:12px; width:max-content;
}
.pps-card__excerpt{
  color:#444; font-size:14px; line-height:1.7; margin:0;
  display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden;
}
.pps-card__btn{
  margin-top:auto; display:inline-block; font-size:14px; text-decoration:none;
  background:#eee; padding:10px 14px; border-radius:10px; transition:.2s;
}
.pps-card__btn:hover{ background:#e5e5e5; }

/* 以前の横並び指定を無効化（保険） */
.pps-card[style*="grid-template-columns"],
.pps-card{
  grid-template-columns: unset !important;
}
.pps-pagination {
    display: none;
}
.hvn-header {
    display: none;
}
button.sub-item:before {
    color: #000000 !important;
    font-size: 10px !important;
}
.wp-block-list .wp-block-list {
    border: none;
    padding-left: 10px;
}
/* レスポンシブ調整 */
@media (max-width: 1500px){
.pps-prev{ left: 35%; }
.pps-next{ right: 35%; }
}
@media (max-width: 1300px){
.pps-card {
    width: 70%;
}
.pps-swiper .swiper-slide {
    width: calc(100% - (var(--peek) * 1));
}
.pps-prev{ left: 28%; }
.pps-next{ right: 28%; }
}
@media (max-width: 1024px){
  .pps { --peek: clamp(12px, 22vw, 160px); }
  .pps-card{ grid-template-columns: 48% 52%; }
.pps-card {
    width: 80%;
}
}
@media (max-width: 835px){
  .pps { --peek: clamp(10px, 18vw, 120px); }
  .pps-card{ grid-template-columns: 1fr; }
  .pps-card__media img{ aspect-ratio: 16/9; }
.pps-prev{ left: 23%; }
.pps-next{ right: 23%; }
}
@media (max-width: 700px){
.pps-card {
width: 100%;
}
.pps-swiper .swiper-slide {
width: calc(133% - (var(--peek) * 0));
}
.pps-prev{ left: 2%; }
.pps-next{ right: 2%; }
}
@media (max-width: 500px){
.pps-nav {
    width: 33px;
    height: 33px;
    font-size: 0.8rem;
}
.custom-header-bottom {
    margin-top: -2rem !important;
}
body {
    padding-top: 130px !important;
}
}
/* ==============================
ポップアップ
============================== */
.bg_onetime_popup {
    position: fixed;
    top: 0px;
    left: 0px;
    z-index: 9999;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: 0.5s;
}

.bg_onetime_popup.js_active {
    opacity: 1;
    visibility: visible;
}

.onetime_popup {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translateX(-50%) translateY(-50%);
    width: 45%;
    min-width: 500px;
/*     background-color: #fff; */
    cursor: pointer;
}

.onetime_popup_title {
    position: relative;
    padding: 2rem;
    margin: 0px;
/*     background-color: #fff; */
    text-align: center;
}

.onetime_popup_title p {
    width: 70%;
    margin: auto;
}

/* ×ボタン */
.onetime_popup_title::before,
.onetime_popup_title::after {
    position: absolute;
    top: 1rem;
    right: 0.5rem;
    transform: translateY(-50%);
    width: 30px;
    height: 4px;
    background-color: #5c5858;
    content: "";
}

.onetime_popup_title::before {
    transform: rotate(45deg);
}

.onetime_popup_title::after {
    transform: rotate(-45deg);
}

/* アニメーション関連（使用する場合） */
.wrap-1 {
    overflow: hidden;
}

.right-1 {
    opacity: 0;
    right: -20%;
}

.right-1.active {
    opacity: 1;
    right: 0;
    transition: 1s;
}

.container-1 {
    width: 100%;
    position: relative;
}

/* レスポンシブ対応 */
@media screen and (min-width: 1400px) {
.onetime_popup {
    width: 35%;
}
}
@media screen and (max-width: 768px) {
    .onetime_popup {
        width: 90%;
        min-width: auto;
    }
    
    .onetime_popup_title {
        padding: 1.5rem;
    }
    
    .onetime_popup_title p {
        width: 85%;
    }
    
    /* スマホ用の×ボタン調整 */
    .onetime_popup_title::before,
    .onetime_popup_title::after {
        top: 3rem;
        right: 1.5rem;
        width: 25px;
        height: 3px;
    }
}

@media screen and (max-width: 480px) {
    .onetime_popup {
        width: 95%;
    }
    
    .onetime_popup_title {
        padding: 1rem;
    }
    
    .onetime_popup_title p {
        width: 90%;
    }
    
    /* より小さい画面用の調整 */
    .onetime_popup_title::before,
    .onetime_popup_title::after {
        top: 2rem;
        right: 1rem;
        width: 20px;
    }
blockquote:before, .is-style-information-box:before, .is-style-question-box:before, .is-style-alert-box:before, .is-style-memo-box:before, .is-style-comment-box:before, .is-style-ok-box:before, .is-style-ng-box:before, .is-style-good-box:before, .is-style-bad-box:before, .is-style-profile-box:before, .information-box:before, .question-box:before, .alert-box:before, .information:before, .question:before, .alert:before, .memo-box:before, .comment-box:before, .common-icon-box:before {
    width: 7%;
}
.wp-block-group {
    padding-left: 33px;
}
.is-style-information-box .wp-block-list,.is-style-alert-box .wp-block-list {
        padding-left: 35px !important;
    }
    .is-style-information-box .wp-block-list .wp-block-list,.is-style-alert-box .wp-block-list .wp-block-list {
        padding-left: 5px !important;
		border: none;
    }
.related-entry-card-thumb-image,
.card-thumb-image,
.wp-post-image {
    width: 100% !important;       /* 横幅は親要素に合わせる */
    height: auto !important;      /* 縦幅を自動調整＝トリミングしない */
    object-fit: contain !important; /* 画像の縦横比を保持したまま表示 */
}
.a-wrap figure {
    aspect-ratio: inherit !important;
}
.daiki {
margin-left: -33px !important;
}
}
.position-pop {
    position: absolute;
    bottom: 7%;
    width: 74%;
    margin: auto;
    left: 0;
    right: 0;
}
.position-pop a {
    margin-top: 0.5rem !important;
    display: block;
}
.position-pop a:hover {
    opacity:0.8;
}
/* 25/11/08 スマホ版表示が崩れたのでその対策ここから */

/* ===== スマホ最適化 ===== */
@media (max-width: 700px){
  .pps { --peek: 0; }                  /* ← 余白ゼロ */
  .pps-swiper{
    padding-left: 16px;                /* ← 画面端に軽い余白だけ */
    padding-right: 16px;
    overflow: hidden;                  /* ← 余計なはみ出しを隠す */
  }
  .pps-swiper .swiper-slide{
    width: 100% !important;            /* ← 133% 指定を完全撤廃 */
    transform: none;
    opacity: 1;
  }
/*   .pps-prev, .pps-next{ display:none; }
  .pps-pagination{ display:block; margin-top: 8px; } */
}

/* タブレット微調整（必要に応じて） */
@media (max-width: 1024px){
  .pps { --peek: clamp(12px, 10vw, 48px); }
}
/* ==============================
フローティングボタン
============================== */
/* フローティングボタンのコンテナ */
.floating-buttons {
    position: fixed;
    bottom: 0;
    left: 0;
	right:0;
    display: flex;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
}

.floating-buttons.show {
    opacity: 1;
    visibility: visible;
}

/* 個別のボタンスタイル */
.floating-button {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: none;
    color: white;
    font-size: 24px;
    position: relative;
    overflow: hidden;
    text-decoration: none; /* リンクの下線を削除 */
}

.floating-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.floating-button:active {
    transform: translateY(-2px);
}
.koyo {
	display:none !important;
}
/* レスポンシブデザイン */
@media (max-width: 1023px) {
/* ==============================
Cocoonテーマのフローティングボタンをカスタマイズ
============================== */
.mobile-footer-menu-buttons,.hvn-open-btn,#header-container {
	display:none !important;
}
.pps-swiper {
    padding-bottom: 1rem;
}
.koyo {
	display:inherit !important;
}
body {
    padding-top: 170px;
}
}
@media (min-width: 1023px) {
.koyo2 {
	display:inherit !important;
}
.koyo2 .floating-buttons {
width:100% !important;
        margin: auto;
        background-color: #fff;
	justify-content: center;
	padding: 0.3rem;
}
.floating-buttons a:nth-child(1) {
width: 14%;
}
.floating-buttons a:nth-child(2) {
width: 6%;
}
.floating-buttons a:nth-child(3) {
width: 6%;
}
}
@media (min-width: 1190px) and (max-width: 1325px) {
.sidebar {
    width: 250px;
}
}