/* =======================================
   神辺土地フェア用 エリアボタンレイアウト調整
   6つのボタン用レスポンシブ対応
   ======================================= */

/* =======================================
   PC表示（1024px以上）
   ======================================= */
@media (min-width: 1024px) {
  .area-buttons {
    position: absolute;
    top: 34% !important;  /* 36% → 34% に上げる */
    left: 50%;
    transform: translateX(-50%);
    width: 70% !important;  /* PCでは大きめに */
    max-width: 850px;  /* 最大幅を制限 */
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    row-gap: 0.6rem !important;     /* 1rem → 0.6rem に狭める */
    column-gap: 0.8rem !important;  /* 1.2rem → 0.8rem に狭める */
    padding: 0;
  }
}

/* =======================================
   タブレット表示（768px〜1023px）
   ======================================= */
@media (min-width: 768px) and (max-width: 1023px) {
  .area-buttons {
    position: absolute;
    top: 35% !important;
    left: 50%;
    transform: translateX(-50%);
    width: 65% !important;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    row-gap: 0.7rem !important;
    column-gap: 0.9rem !important;
    padding: 0;
  }
}

/* =======================================
   スマホ横向き（481px〜767px）
   ======================================= */
@media (min-width: 481px) and (max-width: 767px) {
  .area-buttons {
    position: absolute;
    top: 34% !important;
    left: 50%;
    transform: translateX(-50%);
    width: 62% !important;  /* 55% → 62% に拡大 */
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    row-gap: 0.5rem !important;     /* 0.4rem → 0.5rem に */
    column-gap: 0.6rem !important;  /* 0.5rem → 0.6rem に */
    padding: 0;
  }
}

/* =======================================
   スマホ縦向き（480px以下）
   ======================================= */
@media (max-width: 480px) {
  .area-buttons {
    position: absolute;
    top: 33% !important;
    left: 50%;
    transform: translateX(-50%);
    width: 68% !important;  /* 58% → 68% に大幅拡大 */
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    row-gap: 0.4rem !important;     /* 0.3rem → 0.4rem に */
    column-gap: 0.5rem !important;  /* 0.4rem → 0.5rem に */
    padding: 0;
  }
}

/* =======================================
   小型スマホ（360px以下）
   ======================================= */
@media (max-width: 360px) {
  .area-buttons {
    position: absolute;
    top: 32% !important;
    left: 50%;
    transform: translateX(-50%);
    width: 65% !important;  /* 55% → 65% に大幅拡大 */
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    row-gap: 0.35rem !important;    /* 0.25rem → 0.35rem に */
    column-gap: 0.45rem !important;  /* 0.35rem → 0.45rem に */
    padding: 0;
  }
}

/* =======================================
   共通スタイル（全デバイス）
   ======================================= */
.area-buttons {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
}

/* 各ボタンのスタイル */
.area-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  max-width: 100%;
  position: relative;
}

.area-btn img {
  display: block;
  width: 100%;
  height: auto;
  transition: opacity 0.2s, transform 0.2s;
}

/* ホバー効果（PCとタブレットのみ） */
@media (hover: hover) and (pointer: fine) {
  .area-btn:hover img {
    transform: scale(1.05);
    opacity: 0.95;
  }
}

/* クリック/タップ効果 */
.area-btn:active img {
  opacity: 0.8;
  transform: scale(0.98);
}

/* =======================================
   背景画像のレスポンシブ対応
   ======================================= */
.area-section {
  position: relative;
  width: 100%;
}

.area-bg {
  width: 100%;
  height: auto;
  display: block;
}

/* =======================================
   特殊な画面サイズへの対応
   ======================================= */

/* 大型ディスプレイ（1920px以上） */
@media (min-width: 1920px) {
  .area-buttons {
    top: 35% !important;  /* 37% → 35% に上げる */
    width: 65% !important;
    max-width: 1000px;
    row-gap: 0.8rem !important;     /* 1.5rem → 0.8rem に狭める */
    column-gap: 1.0rem !important;  /* 1.8rem → 1.0rem に狭める */
  }
}

/* iPad Pro等の大型タブレット */
@media (min-width: 1024px) and (max-width: 1366px) and (orientation: portrait) {
  .area-buttons {
    top: 35% !important;
    width: 60% !important;
    row-gap: 0.8rem !important;
    column-gap: 1rem !important;
  }
}