/*
Theme Name: himawari-festa
Theme URI: https://himawari-festa.local
Author: TSS
Description: 第18回 ひまわりフェスタ in Nissan 公式サイト用オリジナルテーマ
Version: 1.9
Requires PHP: 7.4
Text Domain: himawari-festa
*/

* { box-sizing: border-box; }
body { margin: 0; }

@keyframes floatUp {
  from { transform: translateY(6px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ===== HOME ===== */
@media (max-width: 768px) {
  #fv { padding-top: 64px !important; padding-left: 16px !important; padding-right: 16px !important; }
  #fv-logo { width: 82% !important; max-width: 380px !important; top: -44px !important; }
  #hero-band { min-height: 300px !important; }
  #hero-mascot { height: 200px !important; right: 6px !important; }
  #contents-grid { grid-template-columns: 1fr 1fr !important; }
  #about-inner { padding-left: 16px !important; padding-right: 16px !important; }
  #about-mascot { height: 108px !important; opacity: 0.85 !important; }
  #access-info { padding-right: 0 !important; }
  #access-mascot { height: 118px !important; opacity: 0.85 !important; }
  header { padding-left: 16px !important; padding-right: 16px !important; }
  /* 「地域を支えるパートナー企業を募集しています」ボックス：内側の余白(44px)が
     大きく、min-width:300pxの文字ブロックが画面幅に収まりきらず右側にはみ出す
     ため、スマホ幅では余白を縮小しmin-widthを解除する。 */
  #sponsor > div { padding: 30px 22px !important; }
  #sponsor div[style*="min-width: 300px"],
  #sponsor div[style*="min-width: 240px"] {
    min-width: 0 !important;
    flex: 0 0 100% !important;
    margin-top: 18px;
  }
  #sponsor div[style*="min-width: 300px"] {
    margin-top: 0;
  }
}
@media (max-width: 520px) {
  #contents-grid { grid-template-columns: 1fr !important; }
  #fv-logo { top: -34px !important; }
  #hero-mascot { height: 158px !important; }
  #about-mascot, #access-mascot { display: none !important; }
}

/* ===== ABOUT ===== */
@media (max-width: 820px) {
  .about-split { flex-direction: column !important; }
  .about-split-rev { flex-direction: column !important; }
  #about-contents-grid { grid-template-columns: 1fr !important; }
  .learn-stack { min-height: 300px !important; margin-top: 12px !important; }
  .about-hero-title { font-size: 34px !important; }
}

/* ===== ACCESS ===== */
@media (max-width: 820px) {
  .acc-split { flex-direction: column !important; }
  .acc-hero-title { font-size: 32px !important; }
}

/* ===== EXHIBITOR ===== */
@media (max-width: 860px) {
  #ex-stalls { grid-template-columns: 1fr !important; }
  #ex-flow { grid-template-columns: 1fr !important; overflow-x: visible !important; }
  #ex-flow-arrow { display: none !important; }
  #ex-compare { grid-template-columns: 1fr !important; }
  #ex-compare > div:first-child { display: none !important; }
  .ex-fv-title { font-size: 27px !important; }
}

/* ===== PAINTERS (写生コンテスト) ===== */
@media (max-width: 860px) {
  #cc-fv { flex-direction: column !important; }
  #cc-fv-copy { text-align: center !important; }
  #cc-fv-cta { justify-content: center !important; }
  #cc-prize { grid-template-columns: 1fr 1fr !important; }
  #cc-apply { grid-template-columns: 1fr !important; }
  #cc-b2b { flex-direction: column !important; text-align: center !important; }
  .cc-fv-title { font-size: 30px !important; }
}

/* ===== SPONSOR ===== */
@media (max-width: 860px) {
  #sp-stats { grid-template-columns: 1fr !important; }
  #sp-pr { flex-direction: column !important; }
  #sp-flow { grid-template-columns: 1fr !important; }
  #sp-logos { grid-template-columns: repeat(2, 1fr) !important; }
  .sp-fv-title { font-size: 30px !important; }
  #sp-fv-cta { flex-direction: column !important; align-items: stretch !important; }
}

/* ===== ホバーエフェクト ===== */
/* 元のバンドルHTMLではJavaScriptでマウスオーバー時に浮き上がる演出が付いていた
   ボタン・カード類。CSSの:hoverで同等の効果を再現する。
   個別にクラスを付け直す代わりに、「背景色+余白」または「枠線+余白」を持つ
   リンク（＝見た目がボタンになっているaタグ）と、実際のbutton要素すべてに
   共通で当たる汎用ルールにしている。新しくボタンを追加した際も自動で効く。 */
a[style*="padding"][style*="background: rgb"],
a[style*="padding"][style*="border: 1"],
a[style*="padding"][style*="background:#"],
a[style*="padding"][style*="background: #"],
a[style*="padding"][style*="border: 2px solid #"],
a[style*="padding"][style*="border: 3px solid #"],
a[style*="padding"][style*="border:2px solid #"],
a[style*="padding"][style*="border:3px solid #"],
.scp0,
.scp1,
.scp2,
.scp3,
button:not([disabled]) {
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
a[style*="padding"][style*="background: rgb"]:hover,
a[style*="padding"][style*="border: 1"]:hover,
a[style*="padding"][style*="background:#"]:hover,
a[style*="padding"][style*="background: #"]:hover,
a[style*="padding"][style*="border: 2px solid #"]:hover,
a[style*="padding"][style*="border: 3px solid #"]:hover,
a[style*="padding"][style*="border:2px solid #"]:hover,
a[style*="padding"][style*="border:3px solid #"]:hover,
.scp0:hover,
.scp1:hover,
.scp2:hover,
.scp3:hover,
button:not([disabled]):hover {
  transform: translateY(-3px);
  filter: brightness(1.04);
}
button:not([disabled]):active,
a[style*="padding"][style*="background: rgb"]:active,
a[style*="padding"][style*="border: 1"]:active,
a[style*="padding"][style*="background:#"]:active,
a[style*="padding"][style*="background: #"]:active,
a[style*="padding"][style*="border: 2px solid #"]:active,
a[style*="padding"][style*="border: 3px solid #"]:active {
  transform: translateY(-1px);
}

/* 下線付きテキストリンク型のCTA（箱型ボタンではないもの）は、浮き上がりではなく
   薄くするだけの控えめなホバーにする。 */
a[style*="border-bottom: 2px solid"] {
  transition: opacity 0.15s ease;
}
a[style*="border-bottom: 2px solid"]:hover {
  opacity: 0.7;
}

/* ===== アコーディオン（FAQ・出店規定など） ===== */
.hf-accordion-toggle {
  appearance: none;
}
.hf-accordion-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.hf-accordion-item.is-open .hf-accordion-panel {
  max-height: 600px;
}
.hf-accordion-arrow {
  display: inline-block;
  transition: transform 0.25s ease;
}
.hf-accordion-item.is-open .hf-accordion-arrow {
  transform: rotate(180deg);
}
.hf-accordion-icon-plus,
.hf-accordion-icon-minus {
  display: inline-flex;
}
.hf-accordion-icon-minus {
  display: none;
}
.hf-accordion-item.is-open .hf-accordion-icon-plus {
  display: none;
}
.hf-accordion-item.is-open .hf-accordion-icon-minus {
  display: inline-flex;
}

/* ===== 共通: ハンバーガーメニュー（スマホ幅） ===== */
.hf-menu-toggle {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgb(28, 42, 78);
  box-shadow: 0 6px 16px rgba(28, 42, 78, 0.38);
  cursor: pointer;
  flex-shrink: 0;
  z-index: 70;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.hf-menu-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 9px 20px rgba(28, 42, 78, 0.45);
}
.hf-menu-toggle span {
  position: absolute;
  left: 12px;
  width: 20px;
  height: 3px;
  border-radius: 3px;
  background: rgb(255, 253, 247);
  transition: transform 0.25s ease, opacity 0.2s ease, top 0.25s ease;
}
.hf-menu-toggle span:nth-child(1) { top: 15px; }
.hf-menu-toggle span:nth-child(2) { top: 21px; }
.hf-menu-toggle span:nth-child(3) { top: 27px; }
.hf-menu-toggle[aria-expanded="true"] span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.hf-menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hf-menu-toggle[aria-expanded="true"] span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

.hf-nav-backdrop {
  display: none;
}

body.hf-nav-open {
  overflow: hidden;
}

@media (max-width: 860px) {
  .hf-menu-toggle { display: block; }

  header nav.hf-nav {
    position: fixed !important;
    top: 0;
    right: 0;
    bottom: 0;
    height: 100vh;
    width: min(78vw, 320px);
    max-width: 320px;
    margin: 0;
    background: #FFFDF7;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    gap: 4px !important;
    padding: 96px 30px 30px !important;
    box-shadow: -10px 0 34px rgba(28, 42, 78, 0.22);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 65;
    overflow-y: auto;
    display: flex !important;
  }
  header nav.hf-nav.is-open {
    transform: translateX(0);
  }
  header nav.hf-nav a {
    width: 100%;
    box-sizing: border-box;
    padding-top: 12px !important;
    padding-bottom: 12px !important;
    font-size: 16px !important;
    border-radius: 10px !important;
  }

  .hf-nav-backdrop.is-open {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(28, 42, 78, 0.35);
    z-index: 60;
    animation: hfFadeIn 0.2s ease;
  }
}

@keyframes hfFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ===== 写真マーキー（常時ゆっくり横流れするフィルムストリップ） ===== */
.hf-marquee {
  max-width: 1100px;
  width: 100%;
  margin: 32px auto 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.hf-marquee-track {
  display: flex;
  align-items: center;
  width: max-content;
  gap: 14px;
  animation: hfMarquee 46s linear infinite;
}
.hf-marquee:hover .hf-marquee-track {
  animation-play-state: paused;
}
.hf-marquee-track img {
  height: 330px;
  width: auto;
  max-width: none;
  display: block;
  border-radius: 16px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: rgba(28, 42, 78, 0.4) 0px 14px 26px -16px;
}
@keyframes hfMarquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (max-width: 600px) {
  .hf-marquee-track img { height: 210px; border-radius: 12px; }
  .hf-marquee-track { gap: 10px; animation-duration: 33s; }
}

/* ===== ひまわりフェスタ CF7 フォーム共通スタイル ===== */
.hf-form-wrap {
  font-family: "Noto Sans JP", sans-serif;
  color: rgb(42,36,24);
  max-width: 760px;
  margin: 0 auto;
}
.hf-form-wrap .wpcf7-form { margin: 0; }

.hf-hero {
  position: relative;
  padding: 56px 24px 40px;
  background: linear-gradient(135deg, rgb(28,42,78) 0%, rgb(38,56,98) 100%);
  overflow: hidden;
  border-radius: 20px;
  margin-bottom: 40px;
  text-align: center;
}
.hf-hero.hf-hero-green { background: linear-gradient(135deg, rgb(78,139,58) 0%, rgb(101,163,79) 100%); }
.hf-hero-eyebrow { color: rgb(245,179,1); font-weight: 700; letter-spacing: 0.14em; font-size: 12px; }
.hf-hero-green .hf-hero-eyebrow { color: rgb(28,42,78); }
.hf-hero-title {
  font-family: "Zen Maru Gothic", sans-serif;
  font-weight: 900;
  font-size: 28px;
  color: rgb(255,253,247);
  margin: 12px 0 16px;
  line-height: 1.5;
}
.hf-hero-body { font-size: 14px; line-height: 1.9; color: rgb(199,210,234); max-width: 560px; margin: 0 auto; }
.hf-hero-green .hf-hero-body { color: rgba(255,253,247,0.9); }
.hf-hero-deadline {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 22px;
  background: rgba(245,179,1,0.14); border: 1px solid rgba(245,179,1,0.4);
  color: rgb(245,179,1); font-weight: 700; font-size: 13px; padding: 10px 20px; border-radius: 20px;
}
.hf-hero-green .hf-hero-deadline { background: rgba(28,42,78,0.16); border-color: rgba(28,42,78,0.3); color: rgb(28,42,78); }

.hf-section {
  background: rgb(255,253,247);
  border-radius: 20px;
  padding: 30px 28px;
  margin-bottom: 20px;
  border: 1px solid rgba(28,42,78,0.08);
  box-shadow: rgba(28,42,78,0.5) 0 12px 30px -22px;
}
.hf-section-title {
  display: flex; align-items: center; gap: 10px; margin-bottom: 22px;
  font-family: "Zen Maru Gothic", sans-serif; font-weight: 900; font-size: 19px; color: rgb(28,42,78);
}
.hf-section-num {
  width: 30px; height: 30px; border-radius: 50%;
  background: rgb(245,179,1); color: rgb(28,42,78);
  font-family: "Zen Maru Gothic", sans-serif; font-weight: 900; font-size: 14px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.hf-section-num.hf-num-green { background: rgb(78,139,58); color: rgb(255,253,247); }

.hf-field { margin-bottom: 20px; }
.hf-label-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.hf-label { font-weight: 700; font-size: 14px; }
.hf-badge {
  font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 10px;
}
.hf-badge-required { background: rgba(178,58,58,0.08); color: rgb(178,58,58); }
.hf-badge-optional { background: rgba(138,127,102,0.12); color: rgb(138,127,102); }
.hf-note { font-size: 12px; color: rgb(138,127,102); margin-bottom: 8px; }

.hf-form-wrap input[type="text"],
.hf-form-wrap input[type="tel"],
.hf-form-wrap input[type="email"],
.hf-form-wrap input[type="number"],
.hf-form-wrap textarea,
.hf-form-wrap select {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid rgba(28,42,78,0.15);
  border-radius: 10px;
  font-size: 15px;
  font-family: "Noto Sans JP", sans-serif;
  background: rgb(255,253,247);
  box-sizing: border-box;
}
.hf-form-wrap input:focus, .hf-form-wrap textarea:focus, .hf-form-wrap select:focus {
  border-color: rgb(245,179,1); outline: none;
}
.hf-form-wrap textarea { resize: vertical; }

.hf-chip-group { display: flex; gap: 14px; flex-wrap: wrap; }
.hf-chip-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(160px,1fr)); gap: 10px; }
.hf-chip {
  display: flex; align-items: center; gap: 8px; font-size: 14px;
  background: rgb(251,246,234); padding: 10px 16px; border-radius: 10px;
}
.hf-form-wrap input[type="radio"], .hf-form-wrap input[type="checkbox"] {
  accent-color: rgb(28,42,78); width: 17px; height: 17px;
}

.hf-submit-wrap { text-align: center; margin-top: 12px; }
.hf-form-wrap input.wpcf7-submit {
  border: none; cursor: pointer;
  background: linear-gradient(135deg, rgb(245,179,1) 0%, rgb(247,201,72) 100%);
  color: rgb(28,42,78);
  font-family: "Zen Maru Gothic", sans-serif; font-weight: 900; font-size: 16px;
  padding: 17px 56px; border-radius: 14px;
  box-shadow: rgba(245,179,1,0.8) 0 14px 30px -14px;
  transition: transform 0.15s ease, filter 0.15s ease;
}
.hf-form-wrap input.wpcf7-submit:hover { transform: translateY(-3px); filter: brightness(1.04); }
.hf-form-wrap.hf-theme-green input.wpcf7-submit {
  background: linear-gradient(135deg, rgb(78,139,58) 0%, rgb(101,163,79) 100%);
  color: rgb(255,253,247);
  box-shadow: rgba(78,139,58,0.8) 0 14px 30px -14px;
}

.hf-info-box {
  background: rgb(255,253,247); border-radius: 16px; padding: 22px 26px;
  margin-bottom: 24px; border: 1px solid rgba(28,42,78,0.08);
  font-size: 13px; color: rgb(90,82,64); line-height: 1.9;
}
.hf-info-box strong {
  display: block; font-family: "Zen Maru Gothic", sans-serif; font-weight: 900;
  font-size: 14px; color: rgb(28,42,78); margin-bottom: 8px;
}

.wpcf7-not-valid-tip { color: rgb(178,58,58); font-size: 12px; margin-top: 4px; }
.wpcf7-response-output {
  border-radius: 10px !important; font-size: 13px; padding: 12px 16px !important;
}

.hf-form-wrap {
  background: rgb(251,246,234);
  padding: 40px 20px;
  border-radius: 20px;
}
