@charset "UTF-8";

/* ==========================================================================
   TOPページ専用スタイル（デモ kanko-nouen-v1/css/index.css を移植）
   - is_front_page() のときだけ enqueue
   - 配色トークンは _tokens.css / site.css に集約（仮配色のrgbaはブランド値へ寄せ済み）
   ========================================================================== */

/* ヒーロー */
.hero {
  position: relative;
  height: 480px;
  background: linear-gradient(135deg, #f5e6c8 0%, #d4e6c4 100%); /* 画像読込前のフォールバック */
  display: flex;
  align-items: center;
  overflow: hidden;
}

/* 背景スライドショー（クロスフェード＋ゆるやかなズーム） */
.hero__slides {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__slide {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.04);
  /* 入場前は軽くボケた状態。フェード中にピントが合う“フォーカスイン”にする */
  filter: blur(12px);
  /* ふわっと溶けるクロスフェード（あたたかみ重視でゆっくりめ）。
     blur は opacity より一足先（1.1s）に晴らすと、拡大と滲みの切り替わりがキレイに見える */
  transition: opacity 1.8s ease-in-out, transform 1.8s ease-in-out, filter 1.1s ease-out;
  will-change: opacity, transform, filter;
}

/* 背景画像：PC=横長KV（1920×720）。モバイルは下部メディアクエリで縦長KVに出し分け。
   本番はクライアント支給バナーを同名で差し替えるだけ */
.hero__slide--1 { background-image: url("../img/hero-img-1.png"); }
.hero__slide--2 { background-image: url("../img/hero-img-2.png"); }
.hero__slide--3 { background-image: url("../img/hero-img-3.png"); }

/* 直前の画像：フェードイン中の“下敷き”として可視のまま（切り替え時の空白を防ぐ）。
   拡大(scale 1.1)を保持し、縮小への逆戻り（拡大→縮小のチラつき）を無くす */
.hero__slide.is-prev {
  opacity: 1;
  z-index: 1;
  transform: scale(1.1);
  filter: blur(0);
}

.hero__slide.is-active {
  /* 現在の画像を最前面でフェードイン。下に is-prev がいるので
     「3枚目→1枚目」の戻りも含め、どの切り替えでも空白が出ない */
  z-index: 2;
  opacity: 1;
  /* 表示中はじんわり寄っていく Ken Burns。linear で頭の急加速（0.2〜0.3秒の“アップ”）を消し一定速で寄せる */
  transform: scale(1.1);
  filter: blur(0);
  transition: opacity 1.8s ease-in-out, transform 7s linear, filter 1.1s ease-out;
}

/* 文字の可読性を保つ暖色オーバーレイ（左を明るく、全体に温かみ） */
.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(100deg,
      rgba(255, 251, 240, 0.92) 0%,
      rgba(255, 248, 233, 0.70) 32%,
      rgba(255, 244, 224, 0.20) 60%,
      rgba(255, 240, 214, 0.05) 100%),
    linear-gradient(180deg, rgba(255, 246, 228, 0.10) 0%, rgba(243, 152, 0, 0.06) 100%);
}

.hero__inner {
  position: relative;
  z-index: 2;
  padding: 0 var(--space-md);
  max-width: var(--container-max);
  margin: 0 auto;
  width: 100%;
}

/* インジケーター（ドット） */
.hero__dots {
  position: absolute;
  z-index: 2;
  bottom: var(--space-md);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: var(--space-sm);
}

.hero__dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(0, 102, 51, 0.25);
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease;
}

.hero__dot:hover {
  background: rgba(0, 102, 51, 0.45);
}

.hero__dot.is-active {
  background: var(--color-accent);
  transform: scale(1.25);
}

/* 動きを抑える設定のユーザーには静止表示 */
@media (prefers-reduced-motion: reduce) {
  .hero__slide,
  .hero__slide.is-active {
    transition: opacity 0.4s ease;
    transform: none;
    filter: none;
  }
}

.hero__catch {
  font-size: 4.2rem;
  font-weight: bold;
  font-family: var(--font-display);
  line-height: 1.3;
  color: var(--color-primary-dark);
  margin-bottom: var(--space-md);
}

.hero__catch-sub {
  display: block;
  font-size: 1.6rem;
  color: var(--color-text-sub);
  margin-top: var(--space-sm);
  font-weight: normal;
}

.hero__search {
  margin-top: var(--space-lg);
  display: flex;
  gap: var(--space-sm);
  max-width: 480px;
}

.hero__search-input {
  flex: 1;
  padding: 12px var(--space-md);
  font-size: 1.4rem;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  font-family: inherit;
}

/* 「今行ける農園」セクション */
.now-open {
  background-color: #fff;
}

.now-open__list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.now-open__more {
  text-align: center;
  margin-top: var(--space-xl);
}

/* 大阪府マップセクション */
.osaka-map {
  background-color: #f5f5ef;
}

.osaka-map__container {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: var(--space-xl);
  align-items: center;
}

/* 色分けマスク地図（各エリアの“形”どおりに点灯） */
.osaka-map__figure {
  position: relative;
  margin: 0 auto;
  width: 100%;
  max-width: 440px;
  aspect-ratio: 543 / 724;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}

/* 各エリア＝マスクで形を切り出し、背景色で塗る（色はコード側で制御） */
.osaka-map__area {
  position: absolute;
  inset: 0;
  -webkit-mask: no-repeat center / contain;
  mask: no-repeat center / contain;
  background-color: var(--area-color, #cfe0c2);
  transition: background-color 0.2s ease, filter 0.2s ease;
  pointer-events: none;
}

.osaka-map__area.is-active {
  background-color: var(--area-active, var(--color-primary));
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.18));
}

.osaka-map__area--kita           { -webkit-mask-image:url(../img/map/mask-kita.png);           mask-image:url(../img/map/mask-kita.png);           --area-color:#d6e7b8; --area-active:#8bc34a; }
.osaka-map__area--higashi        { -webkit-mask-image:url(../img/map/mask-higashi.png);        mask-image:url(../img/map/mask-higashi.png);        --area-color:#bfe0dc; --area-active:#3fae9b; }
.osaka-map__area--osaka-city     { -webkit-mask-image:url(../img/map/mask-osaka-city.png);     mask-image:url(../img/map/mask-osaka-city.png);     --area-color:#f3e3a6; --area-active:#ecc94b; }
.osaka-map__area--minami-kawachi { -webkit-mask-image:url(../img/map/mask-minami-kawachi.png); mask-image:url(../img/map/mask-minami-kawachi.png); --area-color:#f4d7b3; --area-active:#ef9a3d; }
.osaka-map__area--senshu         { -webkit-mask-image:url(../img/map/mask-senshu.png);         mask-image:url(../img/map/mask-senshu.png);         --area-color:#f1cfc7; --area-active:#e67c66; }

/* 地図上に重ねるラベル（クッキリHTML文字・焼き込みなし） */
.osaka-map__label {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: none;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: #46563b;
  text-shadow: 0 1px 2px rgba(255,255,255,0.95), 0 0 3px rgba(255,255,255,0.8);
  white-space: nowrap;
  transition: color 0.2s ease, transform 0.2s ease;
}

.osaka-map__label.is-active {
  color: #283620;
  transform: translate(-50%, -50%) scale(1.08);
}

/* クリック/ホバーの起動範囲（不可視・最前面） */
.osaka-map__hit {
  position: absolute;
  display: block;
  border-radius: 8px;
  text-decoration: none;
  outline: none;
}

.osaka-map__hit:focus-visible {
  box-shadow: 0 0 0 2px var(--color-primary);
}

/* エリアカード（各エリアのパーツ画像を使用） */
.osaka-map__cards {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.area-card {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  background: #fff;
  border: 2px solid transparent;
  border-radius: 12px;
  text-decoration: none;
  color: var(--color-text);
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.area-card:hover {
  border-color: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.10);
}

.area-card__thumb {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  -webkit-mask: no-repeat center / contain;
  mask: no-repeat center / contain;
  background-color: var(--area-color, #cfe0c2);
}

.area-card__thumb--kita           { -webkit-mask-image:url(../img/map/mask-kita.png);           mask-image:url(../img/map/mask-kita.png);           --area-color:#8bc34a; }
.area-card__thumb--higashi        { -webkit-mask-image:url(../img/map/mask-higashi.png);        mask-image:url(../img/map/mask-higashi.png);        --area-color:#3fae9b; }
.area-card__thumb--osaka-city     { -webkit-mask-image:url(../img/map/mask-osaka-city.png);     mask-image:url(../img/map/mask-osaka-city.png);     --area-color:#ecc94b; }
.area-card__thumb--minami-kawachi { -webkit-mask-image:url(../img/map/mask-minami-kawachi.png); mask-image:url(../img/map/mask-minami-kawachi.png); --area-color:#ef9a3d; }
.area-card__thumb--senshu         { -webkit-mask-image:url(../img/map/mask-senshu.png);         mask-image:url(../img/map/mask-senshu.png);         --area-color:#e67c66; }

.area-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  line-height: 1.4;
}

.area-card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-sm);
}

.area-card__name {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-primary-dark);
}

.area-card__count {
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--color-primary);
  white-space: nowrap;
}

/* 該当エリア内の市町村名（注釈の置き換え） */
.area-card__cities {
  margin-top: 4px;
  font-size: 1.2rem;
  line-height: 1.6;
  color: var(--color-text-sub);
}

/* 旬のフルーツ */
.seasonal-fruits {
  background: #fff;
}

.seasonal-fruits__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
}

.fruit-tile {
  display: block;
  text-align: center;
  padding: var(--space-lg);
  background: var(--color-bg);
  border-radius: 8px;
  transition: transform 0.2s ease;
}

.fruit-tile:hover {
  transform: translateY(-4px);
  opacity: 1;
}

.fruit-tile__icon {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--space-sm);
  background: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  overflow: hidden;
}

.fruit-tile__icon-img {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.fruit-tile__name {
  font-size: 1.6rem;
  font-weight: bold;
  margin-bottom: var(--space-xs);
  color: var(--color-text);
}

.fruit-tile__period {
  font-size: 1.2rem;
  color: var(--color-text-sub);
}

/* 収穫カレンダー */
.harvest-calendar {
  background: var(--color-bg);
}

/* 横スクロール（フリック）ラッパー。狭い画面では表を縮めず原寸のまま横スワイプで閲覧 */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
/* 横スクロール誘導ヒント（モバイルのみ表示・矢印が軽く揺れてスワイプ可能を示す） */
.swipe-hint {
  display: none;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-primary);
  text-align: center;
  margin-bottom: var(--space-sm);
  animation: swipe-nudge 1.4s ease-in-out infinite;
}
@keyframes swipe-nudge {
  0%, 100% { transform: translateX(0); }
  50%      { transform: translateX(8px); }
}
@media (prefers-reduced-motion: reduce) {
  .swipe-hint { animation: none; }
}

.harvest-calendar__table {
  width: 100%;
  min-width: 680px; /* これ未満の画面では .table-scroll が横スクロール */
  background: #fff;
  border-collapse: collapse;
  font-size: 1.3rem;
}

.harvest-calendar__table th,
.harvest-calendar__table td {
  border: 1px solid var(--color-border);
  padding: var(--space-sm);
  text-align: center;
}

.harvest-calendar__table thead th {
  background: var(--color-primary);
  color: #fff;
  font-weight: bold;
}

.harvest-calendar__table .fruit-name {
  text-align: left;
  font-weight: bold;
  background: #f5f5ef;
}

.harvest-calendar__table .is-active {
  background: var(--color-status-coming);
  color: #fff;
  font-weight: bold;
}

/* 観光農園の楽しみ方（コラム導線） */
.guide {
  background: #fff;
}

.guide__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.guide-card {
  display: block;
  background: var(--color-bg);
  border-radius: 8px;
  border: 1px solid var(--color-border);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.guide-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  opacity: 1;
}

/* 上部バナー写真（16:9） */
.guide-card__image {
  aspect-ratio: 16 / 9;
  background-color: #eee;
  position: relative;
  overflow: hidden;
}

.guide-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 写真支給前のプレースホルダー（実画像を入れたら不要） */
.guide-card__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.4rem;
  background: linear-gradient(135deg, #9ccc8f, #7bb86a);
}

.guide-card__body {
  padding: var(--space-lg);
}

.guide-card__title {
  font-size: 1.6rem;
  font-weight: bold;
  margin-bottom: var(--space-sm);
  color: var(--color-text);
}

.guide-card__desc {
  font-size: 1.3rem;
  color: var(--color-text-sub);
  line-height: 1.7;
}

/* NEWS */
.news {
  background: #fff;
}

.news__list {
  max-width: 800px;
  margin: 0 auto;
}

.news__item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: var(--space-md);
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--color-border);
}

.news__date {
  font-size: 1.3rem;
  color: var(--color-text-sub);
}

.news__title {
  font-size: 1.4rem;
  color: var(--color-text);
}

/* CTA帯のスタイルは site.css へ移設（front/guide/about 全ページで中央揃え統一） */

/* レスポンシブ */
@media (max-width: 768px) {
  .hero {
    height: auto;
    min-height: 58vh; /* 横長KVでも画像がしっかり見える高さを確保（中央トリミングの圧迫感を解消） */
    padding: var(--space-lg) 0;
  }

  .hero__catch {
    font-size: 2.6rem;
  }

  /* 副文の改行を均等化して“府下41市町村の／観光農園情報”のような中途半端な折り返しを抑える */
  .hero__catch-sub {
    font-size: 1.3rem;
    text-wrap: balance;
    margin-top: var(--space-xs);
  }

  /* 「今、行ける農園」＝モバイルは横フリック（スワイプ）カルーセル */
  .now-open__list {
    display: flex;
    grid-template-columns: none;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    gap: var(--space-md);
    padding-bottom: var(--space-sm);
    scroll-padding-left: var(--space-md);
  }
  .now-open__list > * {
    flex: 0 0 82%;
    scroll-snap-align: start;
  }

  .osaka-map__container {
    grid-template-columns: 1fr;
  }

  .seasonal-fruits__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .guide__grid {
    grid-template-columns: 1fr;
  }

  /* スワイプ誘導ヒントを表示（カルーセル・カレンダー表 共通） */
  .swipe-hint { display: block; }

  /* 横スクロールバーはモバイルでは隠す（指でのスワイプ＋ヒント＋次要素のチラ見えで誘導） */
  .now-open__list,
  .table-scroll {
    scrollbar-width: none; /* Firefox */
  }
  .now-open__list::-webkit-scrollbar,
  .table-scroll::-webkit-scrollbar {
    display: none; /* WebKit（Chrome / Safari） */
  }

  /* モバイルは縦長KVに出し分け（PCは横長のまま） */
  .hero__slide--1 { background-image: url("../img/hero-sp-1.jpg"); }
  .hero__slide--2 { background-image: url("../img/hero-sp-2.jpg"); }
  .hero__slide--3 { background-image: url("../img/hero-sp-3.jpg"); }

  .news__item {
    grid-template-columns: 1fr;
    gap: var(--space-xs);
  }
}

/* ==========================================================================
   セクション見出しの装飾イラスト（楽し気な雰囲気）
   ========================================================================== */
/* 「今、行ける農園」見出し上のガーランド（旗）装飾 */
.now-open .section__heading::before {
  content: "";
  display: block;
  width: 220px;
  height: 64px;
  margin: 0 auto var(--space-xs);
  background: url("../img/illust/garland.png") no-repeat center / contain;
}
/* 「旬の収穫物から探す」見出し上のフルーツ装飾 */
.seasonal-fruits .section__heading::before {
  content: "";
  display: block;
  width: 200px;
  height: 70px;
  margin: 0 auto calc(var(--space-xs) * -1);
  background: url("../img/illust/fruits-row.png") no-repeat center / contain;
}

/* ==========================================================================
   タブレット最適化（769–1024px）。モバイル(≤768)・PC(>1024)とは範囲が重ならない
   ========================================================================== */
@media (min-width: 769px) and (max-width: 1024px) {
  .now-open__list { grid-template-columns: repeat(2, 1fr); }
  .guide__grid { grid-template-columns: repeat(2, 1fr); }
  .seasonal-fruits__grid { grid-template-columns: repeat(4, 1fr); }
  .osaka-map__container { grid-template-columns: 1fr; }
  .hero__catch { font-size: 3.4rem; }
}
