/* ----------------------------------------- */
/* ヘッダーとナビゲーション                   */
/* ----------------------------------------- */

/* PC表示（画面幅1024px以上）でのみヘッダーを固定 */
@media (min-width: 1024px) {
  header {
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000; /* z-indexを少し調整 */
    background-color: white; 
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  }
}

/* PC表示のドロップダウン */
.dropdown {
  position: relative;
  display: inline-block;
  padding-bottom: 10px; 
}
.dropdown-content {
  opacity: 0;
  visibility: hidden;
  position: absolute;
  background-color: white;
  min-width: 200px;
  box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
  z-index: 999;
  border-radius: 4px;
  top: 100%;
  left: 0;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  pointer-events: none;
}
.dropdown-content a {
  color: black;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
}
.dropdown-content a:hover {
  background-color: #f1f1f1;
}
.dropdown:hover .dropdown-content {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.dropdown-arrow {
  margin-left: 4px;
  transition: transform 0.2s;
  display: inline-block;
}
.dropdown:hover .dropdown-arrow {
  transform: rotate(180deg);
}


/* ----------------------------------------- */
/* モバイル用ハンバーガーメニュー             */
/* ----------------------------------------- */

/* オーバーレイ（暗い背景）のスタイル */
#menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 998; /* メニュー(999)のすぐ下 */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* bodyに .menu-open クラスが付いた時のオーバーレイ */
body.menu-open #menu-overlay {
  opacity: 1;
  visibility: visible;
}

/* モバイルメニューのコンテナ（普段は非表示） */
#mobile-menu {
  display: none;
}

/* bodyに .menu-open クラスが付いた時のモバイルメニュー */
body.menu-open #mobile-menu {
  display: block;
  position: absolute;
  top: 100%; /* ★ヘッダーの真下に配置 */
  left: 0;
  right: 0;
  background-color: white;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.swiper-container {
    height: 50vh; /* ★ビューポートの高さの40%に設定★ */
    width: 100%; /* 幅は親要素の100%を維持 */
    overflow: hidden; /* コンテナからはみ出す画像を隠す */
}

/* 各スライドと画像の設定 */
.swiper-slide {
    width: 100%;
    height: 100%; /* 親 (swiper-container) の高さいっぱい */
}

.swiper-slide img {
    width: 100%;  /* スライドの幅いっぱいに広げる */
    height: 100%; /* スライドの高さいっぱいに広げる */
    object-fit: cover; /* 画像をトリミングして領域を埋める（比率を固定したい場合） */
    /* object-fit: contain; */ /* 画像全体を表示し、余白を許容する場合 */
}

/* フィードコンテナのスタイル */
.feeds-container {
  display: flex;         /* 要素を横並びにする */
  gap: 2rem;             /* カラム間の間隔 */
  margin-top: 2rem;      /* 上の要素との間隔 */
  margin-bottom: 2rem;   /* 下の要素との間隔 */
}

/* 各カラムのスタイル */
.feed-column {
  flex: 1; /* カラムの幅を均等に分ける */
  min-width: 0; /* flexアイテムの幅が縮小できるようにする */
}

/* スマートフォン表示への対応 */
@media (max-width: 768px) {
  .feeds-container {
    flex-direction: column; /* 画面が狭い場合は縦積みに変更 */
  }
}

/* フォントの設定 */
body {
    font-family: "Open Sans", "Noto Sans JP", sans-serif; /* Noto Sans JPを
    デフォルトのフォントとして設定 */
    font-weight: 300; /* フォントの太さを300に設定 */
}
.content {
    font-family: 'Open Sans', 'Noto Sans JP', sans-serif; /* コンテンツ部分のフォント設定 */
}

h1, h2, h3, h4, h5, h6 {
  /* 本文のフォントファミリーに置き換える */
  font-family: "Open Sans", "Noto Sans JP", sans-serif; /* ← これが新しいフォントファミリー */
  
  /* デフォルトの太さを指定 */
  font-weight: 700; /* 例: h1, h2 はデフォルトで bold (700) にすることが多い */
  
  /* Tailwind CSSのデフォルトのフォントサイズはそのままにする場合が多いですが、
     必要であればここで上書きできます。 */
  /* font-size: 2.5rem; */ /* 必要であれば */
  /* line-height: 1.2; */ /* 必要であれば */
  /* color: inherit; */ /* 必要であれば */
}


/* スポンサーセクションのスタイル */
/* グリッドコンテナのギャップ */
.grid {
    gap: 2rem;
}

/* カード全体のスタイル */
.sponsor-card {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease-in-out;
    height: 200px;
    display: flex;
}

.sponsor-card:hover {
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

/* aタグをカード全体に広げ、Flexboxコンテナとして機能させる */
.sponsor-card a {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 1.5rem;
}

/* ロゴを囲むラッパー */
.sponsor-logo-wrapper {
    display: flex;
    align-items: center;   /* 垂直方向の中央揃え */
    justify-content: center;
    flex-grow: 1;          /* 高さを目一杯広げる */
    width: 100%;
    overflow: hidden;
}

/* ロゴ画像自体 */
.sponsor-logo-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* タイトルのスタイル */
.sponsor-card h3 {
    margin-top: 1rem;
    flex-shrink: 0;
    font-size: 1.25rem;
    font-weight: 500;
    color: #2563eb;
    text-align: center;
}

.sponsor-card h3:hover {
    text-decoration: underline;
}

.grid {
    display: grid;
    gap: 2rem; /* ロゴ同士の間隔 */
    grid-template-columns: 1fr; /* スマートフォンなど、小さい画面では1列 */
}

/* 画面幅が640px以上になった場合 */
@media (min-width: 640px) {
    .grid {
        grid-template-columns: repeat(2, 1fr); /* 2列で表示 */
    }
}

/* 本文コンテンツ内のリンクのスタイル */
.content a {
    color: #2563eb; /* 目立ちやすい青色 */
    text-decoration: underline; /* 下線を追加して分かりやすくする */
    transition: color 0.2s; /* ホバー時の色変化を滑らかに */
}

/* リンクにマウスカーソルを合わせた時のスタイル */
.content a:hover {
    color: #1d4ed8; /* 少し濃い青色に変化 */
}

/* スポンサー紹介ページのロゴスタイル */
/* スポンサー紹介ページ内の画像スタイル */

/* 1. ファイル名に "logo" を含む画像（ロゴ）のスタイル */
.sponsor-detail-page .content img[src*="logo"] {
  /* max-width: 300px; ロゴの最大幅 */
  height: 12vh;
  margin-bottom: 1.5rem;
}

/* 2. ファイル名に "detail" を含む画像（詳細画像）のスタイル */
.sponsor-detail-page .content img[src*="goods"] {
  max-width: 80%; /* 詳細画像の最大幅 */
  height: 32vh; /* 高さをビューポートの50%に設定 */
  display: block;
  margin: 1.5rem auto; /* 中央揃え */
}

/* タイムライン全体のコンテナ */
.timeline {
  position: relative;
  padding-left: 48px;
  /* ★この1本の線で、連続性を担保します */
  border-left: 4px solid #e5e7eb; 
}

/* タイムラインの各項目 */
.timeline-item {
  position: relative;
  padding-bottom: 10px; /* 項目間の間隔 */
}

/* タイムラインの丸い点（ズレを修正済み） */
.timeline-item::before {
  content: '';
  position: absolute;
  top: 6px;
  /* ★点の中心が線の中心に正確に来るよう計算した値 */
  left: -58px; 
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: #3b82f6; /* 点の色 */
  border: 2px solid white;
  z-index: 1; /* 線を隠す要素より手前に表示 */
}

/* ★最後の項目で、下に伸びる線を隠すための設定 */
.timeline-item:last-child {
  padding-bottom: 0; /* 最後の項目の下の余白は不要 */
}

.timeline-item:last-child::after {
  content: '';
  position: absolute;
  top: 22px; /* 点の下から隠し始める */
  bottom: 0;
  left: -52px; /* 線の左端から */
  width: 4px;  /* 線の太さ分 */
  background-color: white; /* ★ページの背景色と同じ色で線を隠す */
}

/* 年の見出し */
.timeline-year {
  font-size: 1.25rem;
  font-weight: 600;
  color: #111827;
  margin: 0; /* Remove default heading margins for compact spacing */
}

/* 説明文 */
.timeline-description {
  margin-top: 4px;
  color: #4b5563;
}

.feature-section:hover {
  cursor: pointer;
}

/* 特徴セクション全体のスタイル */
.feature-section {
  display: flex;
  gap: 2rem;
  padding: 3rem 1rem;
  border-bottom: 1px solid #e5e7eb;
  min-height: 350px; /* ★この行を追加: 最低限の高さを指定 */
}

/* 奇数番目のセクションに薄い背景色を付ける */
.feature-section:nth-child(odd) {
    background-color: #f9fafb;
}

/* 画像とテキストを逆方向に配置するクラス */
.feature-section-reverse {
    flex-direction: row-reverse;
}


/* 最新のブログ記事 */
.latest-post-card {
    display: flex;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    overflow: hidden;
    transition: box-shadow 0.3s;
}

.latest-post-card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.latest-post-thumbnail {
    width: 200px;
    height: auto;
    object-fit: cover;
}

.latest-post-content {
    padding: 1.5rem;
}

.latest-post-title-text {
    font-size: 1.25rem;
    font-weight: 600;
}

.latest-post-meta {
    color: #6b7280;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

/* ブログ記事リスト */
.recent-posts-list {
    list-style: none;
    padding: 0;
}

.recent-posts-item a {
    display: block;
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    color: #111827;
    text-decoration: none;
    transition: background-color 0.2s;
}

.recent-posts-item a:hover {
    background-color: #f9fafb;
}

.post-date {
    float: right;
    color: #6b7280;
}

/* 画像とテキストのコンテナ */
.feature-image,
.feature-text {
  flex: 1; /* 1:1の比率で幅を分ける */
}

/* 画像のスタイル */
.feature-image img {
  width: 100%;
  height: 300px; /* ★画像表示エリアの高さを固定 */
  object-fit: cover; /* ★エリアに合わせて画像をトリミング */
  border-radius: 0.75rem;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

/* テキスト部分の見出しのスタイル */
.feature-text h2 {
  font-size: 1.875rem; /* text-3xl */
  font-weight: 700;
  margin-bottom: 1rem;
}

/* スマートフォン表示への対応 */
@media (max-width: 768px) {
  .feature-section,
  .feature-section-reverse {
    flex-direction: column; /* 縦積みに変更 */
  }
}

.nowrap { white-space: nowrap; }

/* ------------------------------ */
/* ギャラリーのキャプション位置調整 */
/* ------------------------------ */
.image-gallery-container figure {
  text-align: center;
}

.image-gallery-container figcaption {
  text-align: center;
}
