/* =========================================================
   responsive.css
   株式会社 山金 スマホ・タブレット調整
========================================================= */

/* =========================
   共通：横はみ出し対策
========================= */
@media (max-width: 1024px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  * {
    box-sizing: border-box;
  }

  img,
  svg {
    max-width: 100%;
    height: auto;
  }
}

/* =========================
   スマホ横向き・小型タブレット：ヘッダー
========================= */
@media (max-width: 1024px) and (orientation: landscape) {
  .site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
  }

  .header-inner {
    width: 100%;
    max-width: 100%;
    min-height: auto;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 10px;
    padding: 8px 10px;
  }

  .site-logo {
    flex-shrink: 0;
    margin: 0;
  }

  .site-logo img {
    display: block;
    max-width: 145px;
    height: auto;
  }

  .site-nav {
    flex: 1;
  }

  .site-nav ul {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-end;
    align-items: center;

    gap: 4px;

    margin: 0;
    padding: 0;

    list-style: none;
  }

  .site-nav li {
    width: 86px;
    list-style: none;
  }

  .site-nav li::marker,
  .site-nav li::before {
    content: none;
    display: none;
  }

  .site-nav a {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    height: 34px;

    padding: 0 4px;

    font-size: 12px;
    line-height: 1.2;

    white-space: nowrap;
  }
}

/* =========================
   MAPへ戻るボタン
========================= */
.fixed-map-link {
  display: none;
}

/* =========================
   スマホ縦向き
========================= */
@media (max-width: 768px) and (orientation: portrait) {
  /* =========================
     ヘッダー
  ========================= */
  .site-header {
    position: relative;
  }

  .header-inner {
    width: 100%;
    max-width: 100%;
    min-height: auto;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 12px;
    padding: 10px 12px;
  }

  .site-logo {
    flex-shrink: 0;
  }

  .site-logo img {
    display: block;
    max-width: 140px;
    height: auto;
  }

  .site-nav {
    flex: 1;
  }

  .site-nav ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;

    gap: 6px 8px;

    margin: 0;
    padding: 0;

    list-style: none;
  }

  .site-nav li {
    width: auto;
    list-style: none;
  }

  .site-nav li::marker,
  .site-nav li::before {
    content: none;
    display: none;
  }

  .site-nav a {
    display: flex;
    align-items: center;
    justify-content: center;

    min-width: 88px;
    height: 34px;

    padding: 0 10px;

    font-size: 0.78rem;
    line-height: 1.2;

    white-space: nowrap;
  }

  /* =========================
     MAPへ戻るボタン
  ========================= */
  .fixed-map-link {
    position: fixed;

    right: 14px;
    bottom: 15px;

    z-index: 9999;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 130px;
    height: 44px;

    padding: 0 18px;

    background: #4a7c59;
    color: #fff;

    font-size: 0.9rem;
    font-weight: 600;

    text-decoration: none;

    border-radius: 999px;

    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);
  }

  .fixed-map-link:hover {
    background: #3f6d4d;
    color: #fff;
  }
}

/* =========================
   768px以下：スマホ共通
========================= */
@media (max-width: 768px) {
  /* 全体 */
  body {
    font-size: 15px;
  }

  .container {
    width: 100%;
    max-width: 100%;

    padding-left: 16px;
    padding-right: 16px;
  }

  section {
    padding: 45px 0;
  }

  .section-title,
  .results-page-heading h1,
  .page-heading h1 {
    font-size: 1.65rem;
    line-height: 1.4;
  }

  .lead-text,
  .results-page-heading p,
  .page-heading p {
    font-size: 0.95rem;
    line-height: 1.8;
  }

  /* hero */
  .hero,
  .top-hero,
  .main-hero {
    width: 100%;
    max-width: 100%;

    min-height: 420px;

    background-size: cover;
    background-position: center center;

    overflow: hidden;
  }

  .hero-content,
  .hero-text-box {
    width: 100%;
    max-width: 100%;

    padding: 60px 18px 40px;
  }

  .hero h1,
  .hero-title {
    font-size: 1.65rem;
    line-height: 1.45;
  }

  .hero p,
  .hero-subtitle,
  .hero-text {
    font-size: 0.95rem;
    line-height: 1.8;
  }

  /* 会社概要 */
  .company-table,
  .company-table tbody,
  .company-table tr,
  .company-table th,
  .company-table td {
    display: block;
    width: 100%;
  }

  .company-table th {
    border-bottom: none;
    padding-bottom: 6px;
  }

  .company-table td {
    padding-top: 6px;
  }

  /* 実績 */
  .results-page-heading {
    margin-bottom: 28px;
  }

  .results-map-box,
  .results-map-info {
    padding: 18px 16px;
  }

  .results-map-info h2 {
    font-size: 1.25rem;
  }

  /* 地図 */
  .map-panel,
  .area-info-panel {
    padding: 18px 16px;
  }

  .area-info-panel h2,
  .area-info-panel h3 {
    font-size: 1.2rem;
  }

  .area-note {
    font-size: 0.9rem;
    line-height: 1.7;
  }

  /* 物件 */
  .property-grid,
  .property-list {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .property-card {
    width: 100%;
  }

  .property-img-wrap {
    width: 100%;
    aspect-ratio: 4 / 3;
  }

  .property-content {
    padding: 18px 16px;
  }

  .property-content h3 {
    font-size: 1.15rem;
  }

  /* ボタン */
  .btn-primary,
  .btn-secondary,
  .btn-outline {
    display: inline-block;

    width: 100%;

    text-align: center;

    box-sizing: border-box;

    margin-top: 10px;
  }
}

/* =========================
   480px以下：小さめスマホ
========================= */
@media (max-width: 480px) {
  body {
    font-size: 14px;
  }

  .container {
    padding-left: 14px;
    padding-right: 14px;
  }

  section {
    padding: 36px 0;
  }

  .section-title,
  .results-page-heading h1,
  .page-heading h1 {
    font-size: 1.45rem;
  }

  .site-logo img {
    max-width: 130px;
  }

  .site-nav a {
    min-width: 82px;

    font-size: 0.76rem;

    padding: 0 6px;
  }

  .map-panel,
  .area-info-panel,
  .results-map-box,
  .results-map-info {
    padding: 16px 14px;
  }

  .property-content h3 {
    font-size: 1.05rem;
  }
}

/* =========================
   900px以下：地図・実績ページ
========================= */
@media (max-width: 900px) {
  .area-map-main,
  .results-map-main {
    display: grid !important;
    grid-template-columns: 1fr !important;

    gap: 24px !important;
  }

  .map-panel,
  .area-info-panel,
  .results-map-box,
  .results-map-info {
    width: 100% !important;
  }

  .japan-map-wrap {
    max-width: 100%;
    margin: 0 auto;
  }

  .japan-map-wrap svg {
    width: 100%;
    height: auto;
  }

  .area-list-inline .area-link {
    margin-right: 8px;
    margin-bottom: 8px;
  }

  /* スマホ：MAPへ戻るボタン */
  .fixed-map-link {
    display: inline-block;
    position: fixed;
    right: 14px;
    bottom: 18px;
    z-index: 9999;

    padding: 10px 16px;

    background: #4a7c59;
    color: #fff;

    border-radius: 999px;

    font-size: 0.9rem;
    font-weight: 600;

    text-decoration: none;

    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
  }
}

@media (min-width: 901px) {
  #mapTop {
    scroll-margin-top: 70px;
  }
}

/* =========================
   物件情報募集ページ（スマホ）
========================= */

@media (max-width: 768px) {
  .wanted-section {
    padding: 50px 0;
  }

  .wanted-lead,
  .wanted-note,
  .wanted-card {
    padding: 22px 20px;
  }

  .wanted-card-header {
    display: block;
  }

  .wanted-code {
    display: block;
    margin-top: 8px;
  }

  .wanted-card h2 {
    font-size: 1.15rem;
  }

  .wanted-detail {
    grid-template-columns: 1fr;
    gap: 4px 0;
  }

  .wanted-detail dt {
    margin-top: 12px;
  }
}
