/*
Theme Name: Miki Farm Theme
Author: Yukie Sakai
Description: ミキファーム公式サイト用のカスタムテーマ
Version: 1.0
*/

/* 基本設定・モバイルファースト */
:root{
  font-family: "Zen Maru Gothic", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  --header-height:35vh;
  /* カラー設定 */
  --main-color: #795548; 
  --accent-color: #FBC02D;
  --bar-color: #F7E7CD;
  --background-color: #FFFDE7; 
  --text-color-b: #3e2723; 
  --text-color-w: #ffffff;
}
/* 1rem=10px */
html {
    font-size: 62.5%;
}
  
html, body {
    height: 100%;
}
body{
  font-size: 1rem;
  background:var(--background-color);
  color:var(--text-color-b);
  -webkit-font-smoothing:antialiased;
  line-height: 1.8;
  /* スティッキーフッター設定 */
  display: flex;
  flex-direction: column;
  min-height: 100vh; 
}

/* ★WordPress管理バーが表示されている時のヘッダー位置調整 */
body.admin-bar .site-header {
    top: 32px;
}
@media screen and (max-width: 782px) {
    body.admin-bar .site-header {
        top: 46px;
    }
}

/* 共通セクションスタイル */
section {
  font-size: 1.4rem;
  padding: 50px 20px;
  max-width: 960px;
  margin: 0 auto;
}

section h2 {
  font-size: 2.2em;
  font-weight: 600;
  text-align: center;
  color: var(--main-color);
  margin-bottom: 40px;
}
section h3 {
  font-size: 1.8em;
  font-weight: 500;
  text-align: center;
}
img{
  display:block;
  max-width:100%;
  height:auto
}
/* 固定ヘッダー */
.site-header{
  position:fixed;
  top:0; /* body.admin-bar の時はCSSで上書きされます */
  left:0;
  right:0;
  backdrop-filter:blur(6px);
  background:transparent;
  z-index:120;
  padding: 0.5em;
}

.site-header.scrolled{
  background:linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(250, 246, 222,0.9));
  box-shadow:0 2px 10px rgba(0,0,0,0.06);
}
  
/* ヘッダー内部 */
.header-inner {
    display:flex;
    width: 90%;
    margin: 0.5em auto; 
    align-items: center;      
    justify-content: space-between; 
    padding: 20px; 
    height: var(--header-height); 
}

.logo a {
  width: 120px;
  height: 120px;
  display: flex;
  margin-right: 2rem;
}
.logo img {
  width: 100%
}

/* ハンバーガーメニューボタン */
.menu-toggle {
  display: none; /* デフォルト（PC）では非表示 */
  position: absolute;
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 9999; 
}

.menu-toggle .line {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--text-color-b);
  transition: all 0.3s ease;
  border-radius: 2px;
}

.menu-toggle .line:nth-child(2) {
  margin: 6px 0;
}

/* メニュー開時（active）のアイコン変化 */
.menu-toggle.active .line:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}
.menu-toggle.active .line:nth-child(2) {
  opacity: 0;
}
.menu-toggle.active .line:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* グローバルナビ */
.main-nav{
  transition:transform .25s ease;
  z-index:130;
}
.main-nav ul{
  display:flex;
  flex-direction: column;
  gap:.6rem;
  margin-bottom: 4rem;
  padding:0;
  list-style:none;
}
.main-nav li {
  display: flex;
  gap:.5rem;
  align-items:center;
}

/* ナビゲーション項目 */
.main-nav li a{
  display: flex;
  background:#ffffff;
  padding:.55rem .85rem;
  box-shadow:0 4px 10px rgba(0,0,0,0.04);
  color:var(--text-color-b);
  text-decoration:none;
  font-size: 1.3rem;
  font-weight:700;
  transition:background .18s, color .18s, transform .12s;
  width: 160px;
  gap: 1rem;
  justify-content: center;
}
.main-nav li a svg{ 
  width:20px;
  height:20px;
  flex-shrink:0;
  color:var(--accent-color);
}
.main-nav li a:hover{
  background:var(--accent-color);
  color:#fff;
  transform:translateY(-2px);
}

.main-nav li a:hover svg path { fill:#fff; }

/* main の上部余白（ヘッダー分） */
main { 
  padding-top:calc(var(--header-height) + 16px);
  flex: 1; /* 余ったスペースをmainが埋める */
  width: 100%; 
}

/* ヒーローセクション */
.hero-section{ padding:5rem 0; }
.hero-inner{
display:flex;
flex-direction:column;
align-items:center;
justify-content:center;
text-align:center;
position: relative;
}

/* ヒーローフレーム（スライダー親） */
.hero-frame{
  width:100vw;
  max-width:none;
  height:56vh;
  max-height:720px;
  margin:0 calc(50% - 50vw) 0 calc(50% - 50vw); /* 画面幅いっぱいに広げる */
  overflow:hidden;
  position:relative; 
}

/* モグラアニメーション ラッパー */
.mogura-animation-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2; 
  pointer-events: none; 
  overflow: visible;
}
/* モグラ ポップアップアニメーション */
@keyframes popup-animation {
  0% {
    top: 8%; 
    opacity: 0;
  }
  10% {
    top: 3%; 
    opacity: 1;
  }
  50% {
    top: 3%; 
    opacity: 1;
  }
  60% {
    top: 8%;
    opacity: 0;
  }
  100% {
    top: 8%;
    opacity: 0;
  }
}
/* モグラ イメージ本体 */
.mogura-popup {
  position: absolute;
  left: 50%;
  width: 15%; 
  max-width: 120px; 
  height: auto;
  animation: popup-animation 5s ease-in-out infinite 1s;
  transform: translateX(-50%);
}

/* スライダー SVGクリップパス */
.hero-frame .slideshow {
  position:absolute;
  inset:0;
  display:block;
  clip-path:url(#wavy-clip);
  -webkit-clip-path:url(#wavy-clip);
  overflow:hidden;
  z-index: 2;
}
.hero-frame .slideshow .slide {
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  opacity:0;
  transition:opacity 1s ease
}
.hero-frame .slideshow .slide.active{opacity:1}

/* ヒーロー キャッチコピー */
.hero-copy p{margin:.5rem 0}
.hero-copy {
  position: absolute;
  z-index: 3;
  top: 20%;
  right: 20%;
  writing-mode: vertical-rl;
  text-align: left;
}
.vertical-text {
  text-align: top;
  color: var(--text-color-w);
  text-shadow:  1px 1px 2px #3e2723;
  font-size: clamp(1.5rem, 2vw, 3rem);
  font-weight: 700;
}

/* Aboutセクション */
.about-section {
  position: relative;
}
.about-section p {
  margin-top: 1.5rem;
  line-height: 2;
}
.about-section::after {
  content: "";
  display: block;
  width: 120px;
  height: 120px;
  background: url(images/imo_mogura.svg) no-repeat right/contain;
  position: absolute;
  top: 10%;
  right: 0%;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1s ease-out, transform 1s ease-out;
  transform: translateX(-50%) translateY(20px);
}
.about-section.mogura-visible::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.about-content {
  display: flex;
  flex-wrap: wrap;
align-items: center;
gap: 30px;
}
.about-image {
  width: 100%;
  max-width: 400px;
  border-radius: 30px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  /* JSアニメーション用 */
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1s ease-out, transform 1s ease-out;
}
.about-content p {
  flex: 1;
  font-size: 1.1em;
}
.product-container{
  display:flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap:2rem;
}
.product-item{
  background:#fff;
  padding:18px;
  width: 200px;
  margin: 0 auto;
  height: 300px;
  border-radius:14px;
  box-shadow:0 8px 18px rgba(0,0,0,0.06);
  /* JSアニメーション用 */
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1s ease-out, transform 1s ease-out;
}
.product-item img {
  width: 100%;
  border-radius: 15px;
  margin-bottom: 15px;
}
.product-visible {
    opacity: 1;
    transform: translateY(0);
}
.online-shop-link {
  text-align: center;
  margin-top: 40px;
}
.button {
    display: inline-block;
    background-color: var(--accent-color);
    color: var(--text-color-w);
    padding: 15px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    border: none;
    cursor: pointer;
    margin-top: 20px;
    transition: background-color 0.3s;
    text-align: center;
}
.button:hover {
    background-color: #FFEB3B;
}
/* 焼き芋販売セクション (トップ) */
.shop-section {
    text-align: center;
}
.shop-card {
    background-color: #fff;
    padding: 40px;
    border-radius: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    width: 100%;
    margin-bottom: 30px;
    /* JSアニメーション用 */
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}
.shop-card p {
    text-align: left;
}

/* お知らせセクション (トップ) */
.news-section {
    margin-bottom: 2rem;
}
.top-news-info, 
.top-news-list {
  font-family: "Yomogi", cursive;
  font-weight: 600;
}
.news-inner-box { 
    border: 8px solid #d8b47d; 
    background: #366627; 
    color: #ffffff; 
    box-shadow: 2px 2px 4px #999999, 2px 2px 2px #002200 inset; 
    padding: 15px;
    margin-bottom: 3rem;
}

.news-inner-box ul {
    margin-left: 20px; 
    padding-left: 0px;
    list-style: none; /* リストマークを消す */
}
.news-inner-box li {
    margin-bottom: 0.5em; /* 項目間の間隔を調整 */
}

/* トップお知らせ タイトル */
.top-news-info{
    width: 200px;
    margin:1.2em auto;
    position: relative;
    padding: 0.5em 1.5em;
    border-top: solid 2px;
    border-bottom: solid 2px;
    text-align: center;
}

.top-news-info:before, .top-news-info:after{
    content: '';
    position: absolute;
    top: -10px;
    width: 2px;
    height: -webkit-calc(100% + 20px);
    height: calc(100% + 20px);
    background-color: white;
}
.top-news-info:before {left: 10px;}
.top-news-info:after {right: 10px;}
.top-news-info p {
    margin: 0; 
    padding: 0;
}
.top-news-item a {
    display: block;
    color: white;
    text-decoration: none;
    padding: 5px;
    transition: background-color 0.2s;
}
.top-news-item a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}
.top-news-date {
    display: block;
    width: 80px;
    font-size: 0.9em;
}
.top-news-text {
  margin-left: 1rem;
}
.all-news-link {
    text-align: center;
    margin-top: 20px;
}
.all-news-link .button {
    margin-top: 0;
}


/* --------------------------------------- */
/* お知らせページ (news.html) */
/* --------------------------------------- */

/* .page-main {
    min-height: 80vh; 
} */

.news-page-section {
    padding-top: 40px;
    padding-bottom: 80px;
}

.page-title {
    font-size: 2.8em;
    font-weight: 700;
    text-align: center;
    color: var(--main-color);
    margin: 30px 0 40px;
}

/* パンくずリスト */
.breadcrumb {
    font-size: 0.9em;
    padding: 10px 0;
}
.breadcrumb ul {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
}
.breadcrumb li:not(:last-child)::after {
    content: " > ";
    margin: 0 5px;
    color: var(--main-color);
}
.breadcrumb a {
    color: var(--text-color-b);
    text-decoration: none;
}
.breadcrumb a:hover {
    text-decoration: underline;
}

/* お知らせ一覧 */
.news-list {
    margin-top: 30px;
}

.news-item {
    border-bottom: 1px solid rgba(var(--main-color), 0.2);
    transition: background-color 0.3s;
}
.news-item a {
    display: flex;
    align-items: center;
    padding: 15px 0;
    text-decoration: none;
    color: var(--text-color-b);
}
/* リンクがある記事のホバー */
.news-item.item-has-link a:hover { 
    background-color: var(--background-color);
}

/* リンクがない記事のラッパー */
.news-content-wrapper { 
    display: flex;
    align-items: center;
    padding: 15px 0;
    width: 100%;
    cursor: default; 
}

/* リンクなしの記事 ホバー無効 */
.news-item:not(.item-has-link):hover {
    background-color: transparent; 
}

.news-date {
    flex-basis: 100px;
    flex-shrink: 0;
    font-size: 0.9em;
    color: #666;
}

.news-category {
    font-size: 0.8em;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 4px;
    margin-right: 15px;
    flex-shrink: 0;
    color: white;
}
.tag-event { background-color: #D32F2F; } 
.tag-product { background-color: var(--accent-color); } 
.tag-news { background-color: #00897B; } 

.news-title {
    font-size: 1.1em;
    font-weight: 500;
    flex-grow: 1;
    text-align: left;
}


/* お問い合わせセクション */
.contact-section {
    opacity: 0;
    transition: opacity 1s ease-out, transform 1s ease-out;
    position: relative;
    text-align: center;
    z-index: 2;
}
.contact-message {
    width: 36rem;
    margin: 0 auto;
}
.contact-section p {
  text-align: left;
}
.contact-section::before {
    content: "";
    display: block;
    width: 120px;
    height: 120px;
    background: url(images/small_leaf2.png) no-repeat center/contain;
    position: absolute;
    top: -40px;
    left: 50%;
    z-index: 2;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1s ease-out, transform 1s ease-out;
    transform: translateX(-50%) translateY(20px);
}

.contact-section.leaf-visible::before {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.social-links {
    margin-top: 20px;
}

.social-icon {
    font-size: 2em;
    color: var(--main-color);
    margin: 0 15px;
    transition: transform 0.3s;
}

.social-icon:hover {
    transform: scale(1.1);
}

footer {
  font-size: 1.2rem;
  text-align: center;
  padding: 20px;
  background-color: var(--main-color);
  color: white;
}


/* --------------------------------------- */
/* お知らせ詳細ページ (news-detail.html) */
/* --------------------------------------- */

.article-detail {
    background: #fff;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.article-header {
    border-bottom: 1px solid rgba(var(--main-color), 0.1);
    padding-bottom: 15px;
    margin-bottom: 30px;
    text-align: left;
}

.article-title {
    font-size: 2em;
    font-weight: 700;
    color: var(--text-color-b);
    margin: 10px 0 0;
}

.article-body {
    line-height: 1.8;
}

.article-body h3 {
    text-align: left;
    color: var(--main-color);
    margin-top: 25px;
    margin-bottom: 10px;
    font-size: 1.4em;
    border-left: 4px solid var(--accent-color);
    padding-left: 10px;
}

.article-body ul {
    list-style: disc;
    margin-left: 20px;
    padding-left: 10px;
}

.article-image {
    margin: 30px 0;
    text-align: center;
}
.article-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.back-to-list {
    text-align: center;
    margin-top: 40px;
}


/* --------------------------------------- */
/* 焼き芋販売ページ (yakiimo-shop.html) */
/* --------------------------------------- */

.stripe{ 
  position: relative;
  padding: 0.3em;
}
.stripe:after {
  content: '';
  position: absolute;
  left: 20%;
  bottom: 1rem;
  width: 60%;
  height: 40px;
  z-index: -1;
  background: repeating-linear-gradient(-45deg, var(--bar-color), var(--bar-color) 2px, white 2px, white 4px);
}

.yakiimo-shop-hero {
    background-image: url('images/yakiimo_bg.jpg'); 
    background-size: cover;
    background-position: center bottom;
    padding-bottom: 40px;
  }
  
  .yakiimo-shop-hero .page-title {
    text-align: center;
    font-size: 3em;
    /* text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    background:linear-gradient(transparent 0%, rgba(244, 230, 208, 0.5) 50%); 
    border-radius: 50%;
    width: 50%;
    margin: 0 auto; */
    position: relative;
}

.yakiimo-shop-section {
    padding: 60px 20px;
}

.yakiimo-shop-card {
    background-color: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.yakiimo-shop-card h3 {
    font-size: 1.6em;
    color: var(--text-color-b);
    text-align: center;
    margin-bottom: 20px;
}

.yakiimo-shop-detail-flex {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-top: 30px;
}

.yakiimo-shop-info h4 {
    color: var(--main-color);
    font-size: 1.2em;
    border-bottom: 2px solid var(--accent-color);
    display: inline-block;
    padding-bottom: 3px;
    margin-top: 20px;
    margin-bottom: 10px;
}

.yakiimo-shop-info .period {
    font-size: 1.3em;
    font-weight: 700;
    color: #c0392b; 
}

.yakiimo-shop-info ul {
    list-style: none;
    padding-left: 0;
}
.yakiimo-shop-info ul li {
    margin-bottom: 5px;
}
.yakiimo-shop-info .fas {
    color: var(--main-color);
    margin-right: 8px;
}

.map-section {
  width: 100%;
  padding: 60px 20px;
}

.map {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  height: 0;
  margin-bottom: 20px;
  border: 5px solid #fff;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.map iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.yakiimo-shop-address p {
    text-align: center;
}


/* --------------------------------------- */
/* メディアクエリ (レスポンシブ設定) */
/* --------------------------------------- */

/* スマホ・タブレット共通 (800px以下) */
@media(max-width:800px){
    :root {
        --header-height: 15vh; /* スマホ時ヘッダー高さ */
    }
    
    /* ヘッダーレイアウト */
    .header-inner {
        flex-direction: row;    
        align-items: center;      
        justify-content: space-between; 
        padding: 0 20px; 
        height: var(--header-height); 
    }

    .logo { 
        order: 0; 
        margin: 0;
    }
    
    /* ハンバーガーボタン表示 */
    .menu-toggle {
        display: block;
        position: static; 
        transform: none; 
        order: 1; 
    }

    /* グローバルナビ (非表示・オーバーレイ化) */
    .main-nav {
        display: none; /* デフォルト非表示 */
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: auto;
        background-color: rgba(255, 255, 255, 0.98); 
        z-index: 100;
        padding-top: calc(var(--header-height) + 20px);
        overflow-y: auto;
        transform: none;
    }
    
    /* ナビ表示時 */
    .main-nav.active {
        display: flex; 
        flex-direction: column;
        align-items: center; 
        justify-content: flex-start; 
    }
    
    .main-nav li {
      border-top: 1px solid rgba(0,0,0,0.1); 
    }
    .main-nav li:first-child{border: none;}

    .main-nav li a{ 
        display: block; 
        width: 100%;
        max-width: none; 
        background: none;
        box-shadow: none;
        padding: 1.2rem 30px; 
        font-size: 1.15rem; 
        font-weight: 500; 
        justify-content: flex-start; /* 左寄せ */
        color: var(--text-color-b); 
        transition: background-color 0.2s; 
    }
    
    .main-nav li a:hover{
        background: var(--accent-color); 
        color: #fff;
        transform: none; 
    }
    .main-nav li a svg{ 
        width:24px; 
        height:24px; 
        flex-shrink:0;
        margin-right: 1rem;
        transform: translateY(15%);
    }
    .main-nav li a:hover svg path { 
        fill: #fff; 
    }

    /* メインコンテンツ上部余白 */
    main{
        padding-top:calc(var(--header-height) + 16px)
    }
    
    /* Aboutセクション (スマホ) */
    .about-content{
      display:flex;
      flex-direction:column;
      gap:1rem;
      align-items:center
    }
    .about-image{
      width:100%;
      max-width:420px;
      border-radius:20px
    }
    .about-section {margin-top: 2rem;}
    .about-section::after {
      content: "";
      display: block;
      width: 120px;
      height: 120px;
      background: url(images/imo_mogura.svg) no-repeat center/contain;
      position: absolute;
      top: -8.5%;
      left: 50%;
      z-index: 2;
      pointer-events: none;
      opacity: 0;
      transition: opacity 1s ease-out, transform 1s ease-out;
      transform: translateX(-50%) translateY(20px);
    }
}

/* スマホ (600px以下) */
@media(max-width:600px){
    /* お知らせ一覧 */
    .news-item a {
        align-items: center;
        padding: 10px 0;
    }
    .news-date {
        flex-basis: auto;
        margin-right: 10px;
    }
    .news-category {
        margin-bottom: 5px;
        margin-right: 10px;
        order: -1; 
    }
    .news-title {
        width: 100%;
        margin-top: 5px;
    }

    /* お知らせ詳細 */
    .article-detail {
        padding: 20px;
    }
    .article-title {
        font-size: 1.5em;
    }
}


/* タブレット (700px以上) */
@media(min-width: 700px) {
  /* 焼き芋販売ページ */
  .yakiimo-shop-detail-flex {
      flex-direction: row;
      align-items: flex-start;
  }
  .yakiimo-shop-info {
      flex: 1;
  }
  .yakiimo-shop-image {
      flex-basis: 40%;
      max-width: 400px;
  }
} 

/* PC (800px以上) */
@media(min-width:800px){
    /* PC ヘッダー */
    .logo a {
      width: 200px;
      height: auto;
    }
    .header-inner{
        flex-direction: row; 
        justify-content: space-between; 
        align-items: center;
        height: auto;
        gap: 10px; 
    }
    .main-nav ul {
        flex-direction: row;
        flex-basis: 25%;
    }
   
    .main-nav li a {
      align-items: center;
      text-wrap: nowrap;
      border-radius: 5px;
      line-height: 3;
    }
    
    /* PC ハンバーガー非表示 */
    .menu-toggle {
        display: none;
    }
    
    /* PC メイン上部余白 */
    main{padding-top:calc(var(--header-height) + 16px)}
    .main-nav li a {
      border-radius: 5px;
    }
    .main-nav li {
      flex-basis: 100%;
    }
}

/* PC (900px以上) */
@media(min-width:900px){
  .hero-copy {
    top: 12%;
    right: 10%;
  }
  .hero-frame{height:60vh}
}

/* 大型PC (1200px以上) */
@media(min-width:1200px){
  .hero-frame{height:64vh}
}

/* アニメーション初期状態（既存の記述があるはずですが念の為確認） */
.about-image, .product-item, .shop-card, .contact-section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

/* JSが付与する表示用クラス */
.is-visible, .product-visible {
    opacity: 1 ;
    transform: translateY(0);
}

/* ==================================== */
/* Contact Form 7 (お問い合わせフォーム) 装飾 */
/* ==================================== */

/* フォーム全体をカード風にする */
.wpcf7 {
    max-width: 600px;
    margin: 30px auto;
    background-color: #ffffff;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

/* ラベル（項目名） */
.wpcf7 label {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-color-b);
    text-align: left; /* 左寄せ */
}

/* 入力エリア（テキスト・メール・メッセージ） */
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #eee;
    border-radius: 10px;
    font-size: 1rem;
    margin-bottom: 20px;
    background: #f9f9f9;
    transition: border-color 0.3s;
    font-family: inherit; /* フォントを継承 */
}

/* 入力中の枠線色 */
.wpcf7 input:focus,
.wpcf7 textarea:focus {
    border-color: var(--accent-color);
    outline: none;
    background: #fff;
}

/* 送信ボタン */
.wpcf7 input[type="submit"] {
    display: block;
    width: 70%;
    max-width: 150px;
    margin: 10px auto 0; /* 中央寄せ */
    background-color: var(--accent-color);
    color: var(--text-color-w);
    padding: 15px 30px;
    border-radius: 50px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.1s;
    appearance: none; /* iOS等のデフォルトスタイル解除 */
    text-align: center;
}

.wpcf7 input[type="submit"]:hover {
    background-color: #FFEB3B; /* ホバー時の色 */
}

/* エラーメッセージ等の調整 */
.wpcf7-not-valid-tip {
    color: #d32f2f;
    font-size: 0.9em;
    margin-top: -15px;
    margin-bottom: 15px;
    display: block;
}

/* スマホ対応 */
@media(max-width:600px){
    .wpcf7 {
        padding: 20px;
    }
}

/* ==================================== */
/* お知らせカテゴリータグの色分け */
/* ==================================== */

/* デフォルト（色指定がない場合や基本設定） */
.news-category {
    background-color: #999; /* グレー */
    color: #fff;
}

/* 個別の設定（クラスを繋げて優先順位を高める） */
.news-category.tag-event { 
    background-color: #D32F2F; /* イベント：赤 */
}

.news-category.tag-product { 
    background-color: #FBC02D; /* 商品：黄色 */
}

.news-category.tag-news { 
    background-color: #00897B; /* お知らせ：緑 */
}

/* ==================================== */
/* ページネーション (1 2 >) のデザイン */
/* ==================================== */

.pagination-wrapper {
    margin-top: 60px;
    text-align: center;
}

.pagination .nav-links {
    display: inline-flex;
    gap: 10px;
    justify-content: center;
}

.pagination .page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid #ddd;
    border-radius: 50%; /* 丸くする */
    text-decoration: none;
    color: var(--text-color-b);
    background: #fff;
    transition: all 0.3s;
    font-weight: 700;
    font-size: 1rem;
}

/* 現在のページ */
.pagination .page-numbers.current {
    background-color: var(--main-color);
    border-color: var(--main-color);
    color: #fff;
}

/* ホバー時 */
.pagination .page-numbers:not(.current):hover {
    background-color: var(--bar-color);
    border-color: var(--bar-color);
}

/* 省略リーダー (...) */
.pagination .page-numbers.dots {
    border: none;
    background: transparent;
}

/* ==================================== */
/* お知らせリストのレイアウト統一と矢印 */
/* ==================================== */

/* --- 1. トップページ (front-page.php) --- */

/* リンクあり(a) も リンクなし(span) も同じレイアウトにする */
.top-news-item a,
.top-news-item .no-link-wrapper {
    display: flex;             /* 横並びにする */
    align-items: center;       /* 上下中央揃え */
    justify-content: flex-start; /* 左寄せ（これが重要） */
    padding: 5px 10px 5px 5px; /* 右側に少し余白 */
    position: relative;        /* 矢印の基準位置 */
    width: 100%;               /* 幅いっぱい */
    box-sizing: border-box;
    text-decoration: none;
}

/* 日付の設定 */
.top-news-date {
    display: block;
    width: 90px;  /* 日付の幅を固定 */
    flex-shrink: 0; /* 日付が縮まないようにする */
}

/* タイトルの設定 */
.top-news-text {
    margin-left: 0;
    flex-grow: 1; /* 余ったスペースを埋める */
}

/* --- リンクがある場合のみ矢印を表示 --- */
.top-news-item a::after {
    content: '\f054'; /* 右矢印 */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5); /* 薄い白 */
    margin-left: 10px; /* タイトルとの隙間 */
    transition: color 0.3s, transform 0.3s;
}

/* ホバー時の動き */
.top-news-item a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}
.top-news-item a:hover::after {
    color: #fff;
    transform: translateX(5px); /* 右に動く */
}


/* --- 2. お知らせ一覧ページ (archive-news.php) --- */

/* リンクあり(a) も リンクなし(div) も同じレイアウトにする */
.news-item a,
.news-content-wrapper {
    display: flex;
    align-items: center;
    padding: 15px 30px 15px 0; /* 右に矢印用の余白(30px)をあける */
    position: relative;
    width: 100%;
    box-sizing: border-box;
    color: var(--text-color-b);
    text-decoration: none;
}

/* リンクなしの場合だけカーソルをデフォルトに */
.news-content-wrapper {
    cursor: default;
}

/* 日付・カテゴリ・タイトルの調整 */
.news-date {
    flex-shrink: 0;
    width: 100px;
    margin-right: 10px;
}
.news-category {
    flex-shrink: 0;
    margin-right: 15px;
}
.news-title {
    flex-grow: 1; /* タイトルが余白を埋める */
    margin: 0;
    line-height: 1.4;
}

/* --- リンクがある場合のみ矢印を表示 --- */
.news-item.item-has-link a::after {
    content: '\f054';
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    right: 0; /* 右端に固定 */
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent-color);
    font-size: 1.2rem;
    transition: transform 0.3s;
}

/* ホバー時の動き */
.news-item.item-has-link a:hover::after {
    transform: translateY(-50%) translateX(5px);
}

/* スマホ対応 */
@media(max-width:600px){
    /* スマホではカテゴリを日付の上にしたり、レイアウトを調整 */
    .news-item a, 
    .news-content-wrapper {
        flex-wrap: wrap; /* 折り返し許可 */
        padding-right: 20px; /* 矢印スペース確保 */
    }
    .news-date {
        width: auto;
        margin-right: 10px;
        margin-bottom: 5px;
    }
    .news-category {
        order: -1; /* 先頭へ */
        margin-bottom: 5px;
    }
    .news-title {
        width: 100%; /* タイトルは改行して全幅 */
    }
    .news-item.item-has-link a::after {
        right: 0;
    }
}