/*
Theme Name: Astra Child
Theme URI: https://feevera.com/
Description: Child theme for Astra
Author: あなたの名前
Author URI: https://feevera.com/
Template: astra
Version: 1.0
*/

/* =====================================
   feevera-post-list（ショートコード出力）
===================================== */

/* 投稿リスト全体 */
body .feevera-post-list{
  display:flex !important;
  flex-direction:column !important;
  gap:15px !important;
  margin:0 !important;
  padding:0 !important;
}

/* 各記事カード */
body .feevera-post-list .feevera-post-item{
  display:flex !important;
  align-items:flex-start !important;
  gap:12px !important;
  border:2px solid #f2dfe4 !important;
  border-radius:10px !important;
  background-color:#fff !important;
  box-shadow:0 3px 6px rgba(0,0,0,0.06) !important;
  padding:10px !important;
  transition:all 0.3s ease !important;
}

body .feevera-post-list .feevera-post-item:hover{
  border-color:#e8b7c1 !important;
  box-shadow:0 5px 10px rgba(0,0,0,0.10) !important;
  background-color:#fdf8f9 !important;
}

/* サムネイル */
body .feevera-post-list .feevera-thumb{
  flex-shrink:0 !important;
}
body .feevera-post-list .feevera-thumb img{
  width:80px !important;
  height:80px !important;
  object-fit:cover !important;
  border-radius:6px !important;
  box-shadow:0 2px 4px rgba(0,0,0,0.15) !important;
}

/* 本文 */
body .feevera-post-list .feevera-post-content{
  flex:1 !important;
}

/* タイトル */
body .feevera-post-list .feevera-post-title{
  margin:0 0 4px !important;
  font-weight:700 !important;
  font-size:15px !important;
  line-height:1.4 !important;
}
body .feevera-post-list .feevera-post-title a{
  color:#333 !important;
  text-decoration:none !important;
}
body .feevera-post-list .feevera-post-title a:hover{
  color:#c06b84 !important;
}

/* 日付 */
body .feevera-post-list .feevera-post-meta{
  font-size:12px !important;
  color:#888 !important;
  margin-bottom:3px !important;
}

/* カテゴリ */
body .feevera-post-list .feevera-post-categories{
  font-size:12px !important;
  color:#666 !important;
  margin:2px 0 !important;
}

/* タグ */
body .feevera-post-list .feevera-post-tags{
  font-size:12px !important;
  color:#666 !important;
}
body .feevera-post-list .feevera-post-tags a{
  color:#c06b84 !important;
  text-decoration:none !important;
}
body .feevera-post-list .feevera-post-tags a:hover{
  text-decoration:underline !important;
}

/* 重複hover（統一） */
.feevera-post-item:hover{
  border-color:#e8b7c1 !important;
  background-color:#fff !important;
  box-shadow:0 4px 12px rgba(0,0,0,0.08) !important;
}

/* =====================================
   AdSense広告枠の高さ固定（CLS対策）
===================================== */
.adsbygoogle{
  display:block;
  width:100%;
  min-height:300px;
  overflow:hidden;
}
@media (max-width:768px){
  .adsbygoogle{
    min-height:250px;
  }
}

/* =====================================
   見出しデザイン（記事内）
===================================== */
h1,h2,h3,h4,h5,h6{
  font-weight:normal;
  margin:0;
  padding:0;
}

/* h2 グラデ下線 */
.entry-content h2{
  position:relative;
  padding:0.25em 0;
}
.entry-content h2:after{
  content:"";
  display:block;
  height:4px;
  background:linear-gradient(to right, rgb(255,186,115), #ffb2b2);
}

/* h3 左線 */
.entry-content h3{
  padding:0.5em;
  color:#494949;
  background:#fffaf4;
  border-left:solid 5px #ffaf58;
}

/* h4 二重線 */
.entry-content h4{
  border-bottom:double 5px #FFC778;
}

/* =====================================
   sidemenu（FontAwesomeアイコンの箇条書き）
===================================== */
.sidemenu{
  padding:0.5em 1em 0.5em 2.3em;
}
.sidemenu li{
  list-style-type:none;
  position:relative;
  padding-left:1.5em;
  line-height:1.5;
}
.sidemenu li:before{
  font-family:FontAwesome;
  content:"\f138";
  position:absolute;
  left:0;
  color:skyblue;
  top:50%;
  transform:translateY(-50%);
}

/* =====================================
   ボタン風リンク
===================================== */
.styled-link{
  display:inline-block;
  text-decoration:none;
  background:linear-gradient(135deg, #4CAF50, #8BC34A);
  color:#fff;
  font-size:18px;
  font-weight:bold;
  padding:15px 30px;
  border-radius:30px;
  transition:background 0.3s, box-shadow 0.3s;
  box-shadow:0 4px 6px rgba(0,0,0,0.10);
}
.styled-link:hover{
  background:linear-gradient(135deg, #388E3C, #689F38);
  box-shadow:0 6px 8px rgba(0,0,0,0.15);
}
.styled-link .arrow-icon{
  margin-left:10px;
  border:solid #fff;
  border-width:0 3px 3px 0;
  display:inline-block;
  padding:3px;
  transform:rotate(45deg);
}

/* =====================================
   検索結果タイトル
===================================== */
.page-title.ast-archive-title{
  font-size:26px !important;
  font-weight:normal !important;
  text-align:left;
  margin-bottom:0;
}

/* =====================================
   検索フォーム
===================================== */
.search-form{
  display:flex;
  align-items:center;
  border:1px solid #ccc;
  border-radius:5px;
  overflow:hidden;
  justify-content:center;
  margin:0 auto;
  max-width:300px;
  background:#fff;
}
.search-form input[type="search"]{
  flex-grow:1;
  padding:10px;
  font-size:14px;
  border:none;
  outline:none;
  width:100%;
}
.search-form input::placeholder{
  font-size:14px;
  color:#888;
}
.search-form button{
  background:#555;
  border:none;
  padding:10px;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  height:100%;
}
.search-form button:hover{
  background:#ddd;
}
.search-form svg{
  width:18px;
  height:18px;
  fill:#333;
}

/* =====================================
   カルーセル（Swiper）
===================================== */
.custom-carousel{
  width:100%;
  max-width:900px;
  margin:auto;
  border-radius:10px;
  overflow:hidden;
  box-shadow:0 4px 10px rgba(0,0,0,0.10);
}
.custom-carousel img{
  width:100%;
  height:auto;
  border-radius:10px;
  transition:transform 0.3s ease-in-out;
}
.custom-carousel a:hover img{
  transform:scale(1.05);
}
.swiper-button-next,
.swiper-button-prev{
  color:#555;
  background:rgba(255,255,255,0.6);
  border-radius:50%;
  width:40px;
  height:40px;
  display:flex;
  align-items:center;
  justify-content:center;
  transition:background 0.3s ease-in-out;
}
.swiper-button-next:hover,
.swiper-button-prev:hover{
  background:rgba(255,255,255,0.9);
}
.swiper-pagination-bullet{
  background:#888;
  opacity:0.7;
}
.swiper-pagination-bullet-active{
  background:#555;
  opacity:1;
}

/* =====================================
   post-list（別の一覧UI）
===================================== */
.post-list{
  list-style:none;
  padding:0;
  margin:0;
}
.post-item{
  display:flex;
  align-items:flex-start;
  gap:15px;
  background:#fff;
  padding:10px;
  border-radius:8px;
  box-shadow:0 2px 5px rgba(0,0,0,0.10);
  transition:background 0.3s ease-in-out;
  width:100%;
  margin-bottom:10px;
}
.post-thumbnail{
  flex-shrink:0;
}
.post-thumbnail img{
  width:85px;
  height:85px;
  object-fit:cover;
  border-radius:5px;
}
.post-content{
  display:flex;
  flex-direction:column;
  flex-grow:1;
  width:100%;
}
.post-title{
  font-size:14px;
  font-weight:bold;
  margin:0 0 5px 0;
  color:#333;
  line-height:1.4;
}
.post-meta{
  font-size:12px;
  color:#666;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-bottom:5px;
}
.post-date,
.post-modified-date{
  background:#f3f3f3;
  padding:3px 8px;
  border-radius:4px;
}
.post-categories{
  display:flex;
  flex-direction:column;
  gap:5px;
}
.post-categories .category{
  background:#6a8eae;
  color:#fff;
  font-size:10px;
  padding:3px 6px;
  border-radius:4px;
  display:inline-block;
}
.post-tags .tag{
  background:#c4a484;
  color:#fff;
  font-size:10px;
  padding:3px 6px;
  border-radius:4px;
  display:inline-block;
}

/* スマホ */
@media screen and (max-width:600px){
  .post-item{
    flex-direction:row;
    align-items:center;
    padding:4px 5px;
    margin-bottom:2px;
  }
  .post-thumbnail img{
    width:45px;
    height:45px;
  }
  .post-content{
    width:calc(100% - 50px);
    padding:2px;
  }
  .post-title{
    font-size:13px;
    margin-bottom:2px;
    line-height:1.2;
  }
  .post-meta{
    font-size:8px;
    margin-bottom:2px;
    gap:2px;
  }
  .post-date,
  .post-modified-date{
    font-size:8px;
    padding:1px 4px;
    margin-bottom:1px;
    border-radius:3px;
    line-height:1.1;
  }
  .post-categories,
  .post-tags{
    display:flex;
    flex-wrap:wrap;
    gap:2px;
    margin-bottom:1px;
  }
  .post-categories .category,
  .post-tags .tag{
    font-size:8px;
    padding:2px 4px;
    border-radius:3px;
    margin-bottom:1px;
    line-height:1.1;
  }
}

/* =====================================
   announcement（お知らせUI）
===================================== */
.announcement-list{
  list-style:none;
  padding:0;
  margin:0;
}
.announcement-item{
  display:flex !important;
  flex-direction:row;
  align-items:center;
  gap:12px;
  padding:10px;
  border-radius:6px;
  background:#fff;
  box-shadow:0 2px 5px rgba(0,0,0,0.10);
  transition:background 0.3s ease-in-out;
  width:100%;
  margin-bottom:10px;
}
.announcement-thumbnail{
  flex-shrink:0;
}
.announcement-thumbnail img{
  width:80px;
  height:80px;
  object-fit:cover;
  border-radius:5px;
}
.announcement-content{
  display:flex !important;
  flex-direction:column;
  flex-grow:1;
  justify-content:center;
  width:calc(100% - 90px);
}
.announcement-title{
  font-size:14px;
  font-weight:bold;
  color:#333;
  margin:0;
  line-height:1.4;
}
.announcement-meta{
  font-size:12px;
  color:#666;
  margin-top:2px;
}
@media screen and (max-width:600px){
  .announcement-item{
    flex-direction:row !important;
    align-items:center;
    padding:6px;
  }
  .announcement-thumbnail img{
    width:50px;
    height:50px;
  }
  .announcement-content{
    width:calc(100% - 60px);
  }
  .announcement-title{
    font-size:12px;
    line-height:1.2;
  }
  .announcement-meta{
    font-size:10px;
  }
}

/* =====================================
   Elementor 見出し（feevera雰囲気）
===================================== */
.elementor-heading-title{
  font-size:22px;
  font-weight:bold;
  text-align:center;
  position:relative;
  display:inline-block;
  padding:8px 16px;
  color:#5a4a42;
  font-family:"Noto Sans JP", sans-serif;
  letter-spacing:0.05em;
}
.elementor-heading-title::after{
  content:"";
  display:block;
  width:80%;
  height:3px;
  background:linear-gradient(to right, #e6c4a3, #f4e0c2);
  margin:6px auto 0;
  border-radius:2px;
}

/* =========================================================
   feevera / Astra ナビ（PC優先）
   見た目改善 + 2階層目はみ出し対策 + 切れ(overflow)対策
   ========================================================= */

/* --- 0) サブメニューが切れる原因(overflow)を潰す保険 --- */
.ast-primary-header-bar,
.main-header-bar,
.ast-main-header-wrap,
.ast-builder-menu-1,
.ast-builder-menu-1 .main-header-bar-navigation{
  overflow: visible !important;
}

/* ドロップダウンが他要素の下に潜るのを防ぐ */
.ast-builder-menu-1 .main-header-menu,
.ast-builder-menu-1 .main-header-menu li{
  position: relative;
  z-index: 50;
}

/* =========================================================
   feevera / Astra ナビ（1階層目）
   ・hover中は薄い丸背景
   ・現在地は「下線のみ」で統一（トップも同じ）
   ========================================================= */

/* 1) 1階層目リンク共通 */
.ast-builder-menu-1 .main-header-menu > li > a.menu-link{
  padding: 10px 14px;
  border-radius: 999px;
  transition: background-color .18s ease, color .18s ease, box-shadow .18s ease;
  white-space: nowrap;
  position: relative; /* 下線用 */
}

/* 2) hover / focus（操作中だけ丸く） */
.ast-builder-menu-1 .main-header-menu > li > a.menu-link:hover,
.ast-builder-menu-1 .main-header-menu > li > a.menu-link:focus{
  background: rgba(230, 183, 198, .22);
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
}

/* 3) 現在地：背景は付けない（固定の丸枠を作らない） */
.ast-builder-menu-1 .main-header-menu > li.current-menu-item > a.menu-link,
.ast-builder-menu-1 .main-header-menu > li.current_page_item > a.menu-link,
.ast-builder-menu-1 a.menu-link[aria-current="page"]{
  background: transparent !important;
  box-shadow: none !important;
}

/* 4) 現在地の下線（全メニュー共通） */
.ast-builder-menu-1 .main-header-menu > li.current-menu-item > a.menu-link::after,
.ast-builder-menu-1 .main-header-menu > li.current_page_item > a.menu-link::after,
.ast-builder-menu-1 a.menu-link[aria-current="page"]::after{
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 4px;
  height: 2px;
  border-radius: 999px;
  background: rgba(230, 183, 198, .75);
  opacity: 1;
}

/* 5) hover中も下線は消さない（トップだけ変になるのを防ぐ） */
.ast-builder-menu-1 .main-header-menu > li > a.menu-link:hover::after,
.ast-builder-menu-1 .main-header-menu > li > a.menu-link:focus::after{
  opacity: 1;
}



/* =========================================================
   2) ドロップダウン（サブメニュー共通）
   ========================================================= */

/* Astra のドロップダウンは absolute 表示なので、ここで見た目を統一 */
.ast-builder-menu-1 .main-header-menu .sub-menu{
  min-width: 270px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,.06);
  box-shadow: 0 14px 40px rgba(0,0,0,.12);
  background: #fff;

  /* 表示安定用 */
  z-index: 9999;
}

/* サブメニュー項目 */
.ast-builder-menu-1 .main-header-menu .sub-menu > li > a.menu-link{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  line-height: 1.35;
  transition: background-color .16s ease, transform .16s ease;
}

/* hover */
.ast-builder-menu-1 .main-header-menu .sub-menu > li > a.menu-link:hover,
.ast-builder-menu-1 .main-header-menu .sub-menu > li > a.menu-link:focus{
  background: rgba(230, 183, 198, .18);
  transform: translateX(2px);
}

/* 先頭の矢印アイコンがゴチャつく場合だけ非表示（必要なら） */
.ast-builder-menu-1 .main-header-menu .sub-menu a.menu-link > .ast-icon.icon-arrow{
  display: none;
}

/* =========================================================
   3) 2階層目（孫メニュー）
   - 기본: 右に出す
   - 右端で切れそうな項目: 左に出す（CSSだけでできる現実的対策）
   ========================================================= */

/* 2階層目は「親(1階層目)のサブメニュー項目」を基準に出す */
.ast-builder-menu-1 .main-header-menu .sub-menu li{
  position: relative;
}

/* 2階層目のデフォルト配置（右） */
.ast-builder-menu-1 .main-header-menu .sub-menu .sub-menu{
  top: -8px;
  left: calc(100% + 10px);
  right: auto;
  min-width: 270px;
}

/* --------------------------
   左に出すルール
   「右寄り」になりがちな親メニューを指定して反転させる
   ※ 今のメニュー構成だと「ショップ」「feevera」あたりが該当しやすい
   -------------------------- */

/* 親(1階層目)が右側にある場合は、孫メニューを左に出す */
.ast-builder-menu-1 .main-header-menu > li:nth-last-child(-n+2) .sub-menu .sub-menu{
  left: auto;
  right: calc(100% + 10px);
}

/* サブメニュー内でも、右端寄りの項目は左出しにする保険 */
.ast-builder-menu-1 .main-header-menu .sub-menu > li:last-child > .sub-menu,
.ast-builder-menu-1 .main-header-menu .sub-menu > li:nth-last-child(2) > .sub-menu{
  left: auto;
  right: calc(100% + 10px);
}

/* =========================================================
   4) PCで「途切れ」を減らす：サブメニュー内の文字折り返し
   ========================================================= */
.ast-builder-menu-1 .main-header-menu .sub-menu a.menu-link{
  white-space: normal;          /* 1行固定を解除 */
  word-break: keep-all;         /* 日本語が変に割れにくい */
  overflow-wrap: anywhere;      /* 長い英字がはみ出す場合に折る */
}

/* =========================================================
   5) スマホ/タブレット（Astraのブレークポイント付近）
   横に飛ばさず縦に開く（途切れ防止）
   ========================================================= */
@media (max-width: 921px){

  /* モバイルは「カード風」より軽く */
  .ast-builder-menu-1 .main-header-menu .sub-menu{
    min-width: auto;
    padding: 6px 10px;
    border-radius: 12px;
    box-shadow: none;
    border: none;
    background: transparent;
  }

  /* 2階層目を横に出さない */
  .ast-builder-menu-1 .main-header-menu .sub-menu .sub-menu{
    left: 0 !important;
    right: auto !important;
    top: 0 !important;
    margin: 6px 0 0 0 !important;
    min-width: auto;
  }

  /* タップしやすい */
  .ast-builder-menu-1 .main-header-menu .sub-menu > li > a.menu-link{
    background: rgba(255,255,255,.88);
    border: 1px solid rgba(0,0,0,.06);
  }
}
