/* 全体レイアウト */
body {
  background-color: #0b0231;
  padding-top: 56px;
}
img {
  display: block;
  max-width: 100%;
  height: auto;
  margin-left: auto;
  margin-right: auto;
}


/* 画面固定ヘッダー（表題） */
.top-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 56px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  background-color: rgba(60, 60, 60, 0.55);
  color: #ffffff;
  font-family: "Cherry Bomb One", sans-serif;
  font-size: 1.4em;
  font-weight: bold;
  letter-spacing: 0.15em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  z-index: 1000;
}
.site-title {
  margin: 0 auto;
  width: 100%;
  max-width: 960px;
  padding: 0;
  text-align: left;
}
.page-center {
  max-width: 960px;
  margin: 0 auto;
  padding: 12px 8px 24px;
  background-color: #ffffcc;
  border-radius: 14px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

/* ヘッダー（ロゴ・キャッチコピー） */
.site-header {
  box-sizing: border-box;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 14px;
  margin-bottom: 12px;
  background-color: #99ffff;
  border-radius: 12px;
}

.site-logo {
  max-width: 100%;
  height: auto;
}

.tagline {
  margin: 0;
  font-weight: bolder;
  font-size: 120%;
  color: #008080;
  text-align: center;
}

.gallery-section {
  background-color: #99ffff;
  border-radius: 12px;
  padding: 8px;
}

.gallery-title {
  margin: 8px 0;
  font-weight: bolder;
  color: #008080;
  text-align: center;
}

/* サムネイル・ギャラリー（スマホ：2列 / タブレット：3列 / PC：4列固定） */
.gallery {
  box-sizing: border-box;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  justify-content: center;
  padding: 10px;
  background-color: #99ffff;
  border-radius: 12px;
}

.card,
.card_01 {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 4px;
  padding: 10px;
  background-color: #ccccff;
  border-radius: 8px;
  transition: transform 0.2s ease;
}
.card_01{
  padding: 40px;
  margin-bottom: 20px;
}
.card:hover,
.card_01:hover,
.card:focus-within,
.card_01:focus-within {
  background-color: #99ffff;
  transform: scale(1.1);
  position: relative;
  z-index: 1;
}

/* 他ページのフローティングアイコンから戻ってきたカードを一時的に強調。
   outline-offsetがプラスだと枠線との間に隙間ができ、二重線に見えてしまうため、
   マイナスにしてワシにも言わせろ/ババの奮闘カードの8px枠の内側に重ねる(同色なので1本の太枠に見える) */
.card:target,
.card_01:target {
  outline: 3px solid #008080;
  outline-offset: -3px;
}

/* サムネイル画像を収める正方形の枠。カード幅に合わせて縮み、130pxを上限に広がる */
.card-thumb {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  max-width: 130px;
  aspect-ratio: 1 / 1;
}

.card-thumb img {
  display: block;
  border: 0;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
}

/* ワシにも言わせろ・ババの奮闘の2カードをまとめて横並び表示するための外枠。
   スマホでは縦積み、600px以上で横並びにする(モバイルファースト) */
.card-pair {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

@media (min-width: 600px) {
  .card-pair {
    flex-direction: row;
    align-items: stretch;
  }
  .card-pair > #card-washinimoiwasero,
  .card-pair > #card-baba {
    width: calc(50% - 6px);
    padding: 20px;
  }
}

/* ワシにも言わせろカードのみ、3枚のイラスト・写真を横並びに表示。
   paddingはモバイルファーストで小さめ(15px)にし、600px以上で20pxに広げる(下のmedia query参照)。
   40pxのままだとスマホで画像エリアを過度に圧迫するため(2026-10-28) */
#card-washinimoiwasero {
  width: 100%;
  padding: 15px;
  border: 8px solid #008080;
  /* 隣のババの奮闘カードに高さを合わせてstretchされるため、
     画像とラベルが上寄りにならないよう縦方向を中央揃えにする */
  justify-content: center;
}

#card-washinimoiwasero:hover,
#card-washinimoiwasero:focus-within {
  transform: none;
}

#card-washinimoiwasero .card-thumb {
  max-width: none;
  aspect-ratio: auto;
  height: auto;
  position: relative;
}

/* 「ワシにも言わせろ」のラベルを画像の上にレイヤー表示する。
   hero_01のpadding-topが画像を上に押し上げてしまっていたため、
   ラベルを画像の下に積む構成をやめ、画像内にオーバーレイする方式に変更(2026-10-27) */
#card-washinimoiwasero .card-label-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  margin: 0;
  padding: 6px 8px;
  padding-top: 6px;
  /* 黄文字+黒縁取り(0.5px)にする */
  color: #ffcc00;
  -webkit-text-stroke: 0.5px #000000;
  text-shadow: 0.5px 0.5px 0 #000000, -0.5px -0.5px 0 #000000, 0.5px -0.5px 0 #000000, -0.5px 0.5px 0 #000000;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0));
  min-height: 0;
  /* スマホでは2remだと2行に折り返すため、モバイルファーストで小さめにし、
     600px以上(横並び表示)でのみ2remに拡大する(2026-10-28) */
  font-size: 1.3rem;
  font-family: "M PLUS Rounded 1c", sans-serif;
  font-weight: 500;
}

#card-washinimoiwasero .card-thumb img {
  flex: 1 1 0;
  min-width: 0;
  width: auto;
  max-width: 200px;
  height: auto;
}

/* テッシー通信カード。スライダーが大きすぎたため高さ360px程度(4:3のまま)に縮小。
   .card_01の既定padding(40px)だとカードの余白が大きすぎるため10pxに短縮 */
#card-tessimail {
  width: 100%;
  padding: 10px;
  border: 8px solid #008080;
}

#card-tessimail .card-slider {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
}

#card-tessimail:hover,
#card-tessimail:focus-within {
  transform: none;
}

#card-tessimail .slider-caption {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  width: 74%;
  font-family: "Noto Sans JP", sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  text-align: center;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.85), 0 0 3px rgba(0, 0, 0, 0.6);
  pointer-events: none;
  white-space: nowrap;
}

#card-tessimail .slider-caption-sub {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  font-weight: 400;
  white-space: normal;
}

.card-label {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  min-height: 2.6em;
  text-align: center;
  font-size: 0.85rem;
  line-height: 1.3;
}
.hero_01{
  font-size: 1.4rem;
  color: red;
  padding-top: 2rem;
}
.hero_02{
  font-size: 1.4rem;
  color: #0066cc;
  padding-top: 2rem;
}
.hero_03{
  font-size: 1.4rem;
  color: #cc3366;
  padding-top: 2rem;
}

/* ババの奮闘60余年カードのみ、ワシにも言わせろと同様の全幅表示。
   paddingはモバイルファーストで小さめ(15px)にする(2026-10-28、理由は上のwashinimoiwaseroと同じ) */
#card-baba {
  width: 100%;
  padding: 15px;
  border: 8px solid #008080;
  /* 隣のワシにも言わせろカードに高さを合わせてstretchされるため、
     画像ブロックが上寄りにならないよう縦方向を中央揃えにする */
  justify-content: center;
}

#card-baba:hover,
#card-baba:focus-within {
  transform: none;
}

#card-baba .card-thumb {
  max-width: none;
  width: 100%;
  aspect-ratio: 550 / 299;
  height: auto;
}

/* 画像をバックグラウンド表示にし、リンクボタンを画像の上にレイヤーする */
.card-thumb-bg {
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  border-radius: 8px;
  overflow: hidden;
  align-items: flex-end;
}

.card-sublinks-overlay {
  width: 100%;
  margin: 0;
  padding: 10px 8px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0));
  border-radius: 0 0 8px 8px;
}

.card-sublinks {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 4px;
}

.card-sublinks a {
  padding: 6px 14px;
  background-color: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  color: #1a1a2e;
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.card-sublinks a:hover,
.card-sublinks a:focus-visible {
  background-color: rgba(255, 255, 255, 1);
  transform: scale(1.05);
}

.card-label-icon {
  display: block;
  min-height: 23px;
}

/* 4大分類カード */
.category-grid {
  box-sizing: border-box;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 10px;
  background-color: #99ffff;
  border-radius: 12px;
}

.category-card {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px;
  border-radius: 10px;
  text-decoration: none;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover,
.category-card:focus-visible {
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.category-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
  margin: 0;
}

.category-label {
  font-size: 1.15rem;
  font-weight: 700;
}

.category-sub {
  font-size: 0.75rem;
  line-height: 1.3;
  text-align: center;
  opacity: 0.9;
}

.cat-travel      { background-color: #2f6fb3; }
.cat-motorsports  { background-color: #b3312f; }
.cat-classics     { background-color: #3d6b4f; }
.cat-earth        { background-color: #1f7a6c; }

/* 文字色 */
.c-red { color: #ff3366; }

/* ラベルアイコンのサイズ */
.img-aurora-logo { max-width: 60px; height: auto; }
.img-sahara-logo { max-width: 76px; height: auto; }
.img-uzume-logo  { max-width: 83px; height: auto; }

/* ==== タブレット（600px以上） ==== */
@media (min-width: 600px) {
  #card-washinimoiwasero .card-label-overlay {
    font-size: 2rem;
  }

  .page-center {
    padding: 20px 16px 40px;
  }

  .site-title {
    padding: 0;
  }

  .site-header {
    padding: 20px;
    margin-bottom: 20px;
  }

  .tagline {
    font-size: 150%;
  }

  #card-tessimail .slider-caption {
    width: 90%;
    font-size: 36px;
  }

  #card-tessimail .slider-caption-sub {
    margin-top: 6px;
    font-size: 16px;
  }

  .gallery {
    grid-template-columns: repeat(3, 1fr);
    padding: 16px;
  }

  .card {
    padding: 12px;
  }

  .category-grid {
    padding: 16px;
  }
}

/* ==== PC（900px以上） ==== */
@media (min-width: 900px) {
  .gallery {
    grid-template-columns: repeat(4, 168px);
    padding: 20px;
  }

  .card {
    width: 160px;
  }

  .card_01 {
    width: 640px;
  }

  .category-grid {
    grid-template-columns: repeat(4, 1fr);
    padding: 20px;
  }
}
