/* estate/css/modern.css */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700&family=Shippori+Mincho:wght@400;700&display=swap');

:root {
    --primary-color: #0b8a4f;
    /* 一条グリーン (エメラルド) */
    --primary-dark: #086a3d;
    --text-color: #333333;
    --text-muted: #666666;
    --light-bg: #f8f8f8;
    --border-color: #dddddd;
    --accent-red: #e74c3c;

    --font-main: "Noto Sans JP", sans-serif;
    --font-serif: "Shippori Mincho", serif;
}

/* Base Styles */
body {
    -webkit-font-smoothing: antialiased;
}

/* 縦スクロールバーの出没で中央寄せ幅が変わり、ヘッダー等が横にズレるのを防ぐ
   （スクロールバー領域を常に確保して clientWidth を一定に保つ） */
html {
    scrollbar-gutter: stable;
}

/* estate ページ全体の背景（温かみのあるオフホワイト） */
.land-main-content {
    background-color: #f7f6f2;
    padding-bottom: 15px;
}
/* 一覧・詳細ページは背景を白に */
.land-main-content.is-list,
.land-main-content.is-detail {
    background-color: #fff;
}

/* body は flex(column, min-height:100vh)。コンテンツ領域を伸ばして余白を吸収し、
   フッターを最下部に固定する（従来の min-height ハックを置換）。
   これにより、余白をヘッダーの margin:auto が吸って下がり、固定配置のナビ帯(::before)と
   縦にズレる問題も解消する。 */
#bg_contents {
    flex: 1 0 auto;
    /* コンテンツをヘッダーより下のスタッキングコンテキストに収める。
       モバイルの sticky ヘッダー(.sp.header)は z-index が低い(1)ため、
       SOLD OUTバッジ(z-index:4)等がヘッダーより前面に出るのを防ぐ。 */
    position: relative;
    z-index: 0;
}

.land-container,
.land-detail-container {
    max-width: 960px;
    /* サイト共通ヘッダー(約960px)と左右を揃える */
    margin: 40px auto;
    padding: 0 20px;
    font-family: var(--font-main);
    color: var(--text-color);
    line-height: 1.6;
}

/* 詳細ページは全体を同じ幅の中央カラムに（デザイン準拠） */
.land-detail-container {
    max-width: 960px;
}

/* Breadcrumb */
.breadcrumb {
    font-size: 0.85rem;
    margin-bottom: 2rem;
    color: var(--text-muted);
}

.breadcrumb a {
    color: inherit;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* Header Banner - index.php */
.info-banner {
    margin-bottom: 50px;
}

/* Index Page Section Title */
.pref-section {
    margin-bottom: 50px;
}

.pref-title {
    font-family: 'Shippori Mincho', serif;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 30px;
    background: #f2f2f2;
    padding: 7px 15px; /* 上下をデザインに合わせて狭める */
    text-align: center;
    color: #333;
}
/* 「土地情報　宮 城 県」: ジャンル名 ＋ 字間を空けた県名 */
.pref-genre {
    margin-right: 1.2em;
}
.pref-name {
    letter-spacing: 0.4em;
    padding-left: 0.4em; /* 字間の右余白を中央寄せ補正 */
}

/* Land Grid (Text List style per design) */
.land-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px 60px;
    padding: 0 15px;
}

@media (max-width: 900px) {
    .land-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .land-grid {
        grid-template-columns: 1fr;
    }
}

.land-list-item {
    text-decoration: none;
    color: var(--text-color);
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    transition: color 0.2s;
}

.land-list-item::before {
    content: '●';
    color: #ccc;
    font-size: 0.7rem;
    margin-right: 10px;
}

.land-list-item::after {
    content: '〉';
    font-size: 0.8rem;
    color: #999;
    margin-left: 10px;
    flex-shrink: 0;
}

.land-list-item:hover {
    color: var(--primary-color);
}

/* ---------------------------------
   Detail Page
   --------------------------------- */

/* Green Bar Header（コンテナ幅いっぱい・中央揃え） */
.detail-top-bar {
    background: var(--primary-color);
    color: #fff;
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 500;
    display: block;
    text-align: center;
    margin-bottom: 15px;
}

.catchcopy-large {
    font-size: 2.4rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 30px;
    letter-spacing: -0.02em;
    text-align: center;
}

.detail-main-layout {
    max-width: 800px;
    margin: 0 auto 16px;
}

.detail-map-box iframe {
    width: 100%;
    aspect-ratio: 16/10;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

.thumbnail-scroller {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.thumbnail-scroller img {
    width: 120px;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
}

.thumbnail-scroller img:hover {
    opacity: 0.8;
}

.thumbnail-scroller img.active {
    border-color: var(--primary-color);
}

/* Map & Layout Image Area */
.detail-map-box img {
    border-radius: 4px;
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
}

/* Site Data Row (Map & Layout side-by-side) */
.detail-site-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 30px;
}

.site-image-box {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 15px;
    display: flex;
    flex-direction: column;
}

.site-image-label {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 1rem;
    color: var(--primary-color);
    border-left: 4px solid var(--primary-color);
    padding-left: 10px;
}

.site-image-box img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 2px;
}

.site-image-box .image-placeholder {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f5f5f5;
    color: #bbb;
    min-height: 200px;
    font-size: 0.9rem;
}

.detail-layout-area {
    margin: 0 0 40px;
}

@media (max-width: 768px) {
    .detail-site-row {
        grid-template-columns: 1fr;
    }

    .detail-layout-area {
        grid-template-columns: 1fr;
    }
}

/* Spec Highlight Card（左右の枠は無し、上下＋行間を破線に：デザイン準拠） */
.spec-highlight-card {
    background: #fff;
    border: none;
    border-top: 1px dashed #999;
    border-bottom: 1px dashed #999;
    padding: 0;
    position: relative;
}

.spec-row {
    display: grid;
    grid-template-columns: 33% 1fr;
    border-bottom: 1px dashed #999;
}

.spec-row:last-child {
    border-bottom: none;
}

.spec-label {
    background: #fff;
    padding: 15px 20px;
    font-size: 1.35rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    text-align: right;
}

.spec-value {
    padding: 15px 20px;
    font-size: 1.1rem;
    display: flex;
    align-items: baseline;
    gap: 5px;
}

.spec-value .unit {
    font-size: 0.9rem;
    font-weight: 400;
}

.spec-value.price {
    font-size: 1.8rem;
    color: var(--text-color);
    font-weight: 700;
}

/* Zebra Table for Property Overview */
.section-title-modern {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 40px 0 20px;
    font-family: var(--font-serif);
}

.section-title-modern::after {
    display: none;
}

/* Property Overview - 2 columns */
.overview-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 40px;
    margin-bottom: 50px;
}

.designer-table {
    width: 100%;
    border-collapse: collapse;
}

.designer-table th,
.designer-table td {
    border-top: 1px solid #ccc;
    border-bottom: 1px solid #ccc;
    padding: 12px 0;
    font-size: 0.95rem;
    /* ラベル(th)と値(td)を同じ基準線で揃える（値が2行に折り返す行でもズレない） */
    vertical-align: baseline;
}

/* ラベルの均等割付はCSSで（span分割せず text-align: justify で実現） */
.designer-table th {
    text-align: justify;
    text-align-last: justify;
    width: 100px;
    font-weight: 700;
    color: #000;
    padding-right: 15px;
}

.designer-table td {
    color: #333;
    padding-left: 1em;
}

/* 物件概要の下に結合する特記事項（2カラムをまたいで全幅・折り返し表示）
   ラベルを run-in（float）にして、2行目以降は全幅で折り返す（デザイン準拠） */
.overview-notes {
    grid-column: 1 / -1;
    margin-top: 6px;
    padding-top: 14px;
    font-size: 0.95rem;
    line-height: 1.9;
    color: #333;
    text-align: justify;
}
.overview-notes-label {
    float: left;
    width: 100px;
    margin-right: 1em;
    font-weight: 700;
    color: #000;
    text-align: justify;
    text-align-last: justify;
}

/* Surrounding Information - 左に地図/周辺環境イメージ、右にリスト（デザイン準拠） */
.env-layout-split {
    display: grid;
    grid-template-columns: 42% 1fr;
    gap: 40px;
    margin-bottom: 60px;
    align-items: start;
}

/* 左カラム：Googleマップ埋め込み または 周辺環境イメージ */
.env-media iframe {
    width: 100%;
    aspect-ratio: 1 / 1;
    border: 0;
    border-radius: 4px;
    display: block;
}
.env-media img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    display: block;
    cursor: pointer;
}

.env-text-list {
    display: flex;
    flex-direction: column;
}

.env-list-item {
    border-top: 1px solid #ccc;
    border-bottom: 1px solid #ccc;
    padding: 12px 0;
    font-size: 1rem;
    font-weight: 700;
    display: grid;
    grid-template-columns: 13em 1fr;
    gap: 15px;
    align-items: baseline;
}
/* 隣接する行の境界線が二重にならないよう詰める */
.env-list-item + .env-list-item {
    margin-top: -1px;
}

.env-list-item .access {
    font-weight: 400;
    color: #333;
}

.env-image-stack {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.env-image-stack img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

@media (max-width: 768px) {
    .zebra-table th {
        width: 35%;
        padding: 15px;
    }

    .env-grid,
    .env-layout-split {
        grid-template-columns: 1fr;
    }
}

/* ===== 公開ページのレスポンシブ調整 ===== */
/* 親サイトのモバイル用ヘッダー(.sp.header)は sticky かつ背景透明のため、
   スクロール時にコンテンツが透けて重なる。背景を付与して重なりを防ぐ。
   （このCSSは estate 公開ページでのみ読み込まれるためスコープは限定的） */
.sp.header {
    background: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

/* モバイル(≤959px)でのヘッダー重なり対策
   親サイトはオフキャンバスメニュー(body>header)を画面外へ退避しつつ flow に残し、
   さらに負マージンでコンテンツをヘッダー下へ引き込む（ヒーロー重ね想定）。
   estate にはヒーローが無く上部が隠れるため、メニューを flow から外し、負マージンを打ち消す。
   ※ハンバーガー展開時(#menu-toggle:checked)の position:fixed は、より詳細度が高いため維持される。 */
@media screen and (max-width: 959px) {
    body > header {
        position: absolute;
    }
    body > div.sp.header {
        margin-bottom: 0;
    }
}

/* 物件概要は狭い画面（767px以下）で1カラム（縦並び）に */
@media (max-width: 767px) {
    .overview-grid {
        grid-template-columns: 1fr;
    }
}

/* Action Bar (Sticky Bottom) */
/* 問い合わせバー：コンテンツの一部として最下部（フッターの手前）に静的配置 */
.fixed-action-bar {
    background: var(--primary-color);
    color: #fff;
    padding: 18px 20px;
    margin-top: 40px;
}

/* 内側コンテンツはページ幅（.land-detail-container）に合わせて中央寄せ */
.fixed-action-inner {
    max-width: 960px;
    margin: auto;
    display: flex;
    align-items: center;
    gap: 24px;
}

/* 問い合わせラベルは左寄せ、電話番号は右寄せ、中央にオフィス名＋ボタン */
.fixed-action-bar .action-label {
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-right: auto;
}

.fixed-action-bar .office-name {
    font-size: 1.3rem;
}

.fixed-action-bar .office-tel {
    font-size: 1.4rem;
    font-weight: 700;
    margin-left: auto;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: #fff;
    border: 1.5px solid #fff;
    text-decoration: none;
    padding: 8px 28px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.95rem;
    transition: background 0.2s, color 0.2s;
}

.action-btn:hover {
    background: #fff;
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .detail-main-layout {
        grid-template-columns: 1fr;
    }

    .catchcopy-large {
        font-size: 1.8rem;
    }

    .fixed-action-bar {
        padding: 10px;
    }

    .fixed-action-inner {
        flex-direction: column;
        gap: 10px;
    }

    .fixed-action-bar .action-label,
    .fixed-action-bar .office-tel {
        margin: 0;
    }

    .fixed-action-bar .office-tel {
        font-size: 1.2rem;
    }

    .land-grid {
        grid-template-columns: 1fr;
    }

    .env-grid {
        grid-template-columns: 1fr;
    }

    .land-container,
    .land-detail-container {
        padding-bottom: 120px;
        /* Action bar offset */
    }
}

/* ---------------------------------
   Inquiry Section (Bottom)
   --------------------------------- */
.bottom-contact-section {
    margin-top: 60px;
    margin-bottom: 40px;
}

.contact-card-modern {
    background: #fff;
    border: 1px solid #eee;
    padding: 40px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.contact-card-modern .office-header h3 {
    font-family: 'Shippori Mincho', serif;
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--primary-dark);
}

.contact-card-modern .office-body {
    margin-bottom: 30px;
}

.contact-card-modern .office-body p {
    margin: 5px 0;
    font-size: 1.1rem;
}

.contact-card-modern .office-body .tel {
    font-size: 1.6rem;
    font-weight: 700;
    margin-top: 10px;
}

.text-emerald {
    color: var(--primary-color);
}

.contact-btn-large {
    display: inline-block;
    background: var(--primary-color);
    color: #fff;
    padding: 20px 60px;
    font-size: 1.2rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s;
    box-shadow: 0 4px 10px rgba(11, 138, 79, 0.3);
}

.contact-btn-large:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(11, 138, 79, 0.4);
    color: #fff;
}

@media (max-width: 600px) {
    .contact-card-modern {
        padding: 30px 20px;
    }

    .contact-card-modern .office-header h3 {
        font-size: 1.4rem;
    }

    .contact-btn-large {
        padding: 15px 30px;
        font-size: 1rem;
        width: 100%;
    }
}
/* ---------------------------------
   Genre selection (Top) / List lead / Sold / Notes
   --------------------------------- */

/* 空状態メッセージ */
.empty-msg {
    text-align: center;
    color: var(--text-muted);
    padding: 40px 0;
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
}

/* トップ: ヒーロー */
/* トップ: ヒーロー（文 ＋ イラスト） */
.genre-hero {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin: 30px 0 40px;
    flex-wrap: wrap;
}
.genre-hero-lead {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    line-height: 1.9;
    color: var(--text-color);
}
.genre-hero-illust {
    width: 130px;
    height: auto;
    flex-shrink: 0;
    margin-top: -15px; /* イラスト上部のグレー縁を半分ほどはみ出させる */
}
@media (max-width: 700px) {
    .genre-hero { flex-direction: column-reverse; }
    .genre-hero-illust { width: 100px; }
}

/* トップ: 2バナー選択（同色・白ピルボタン） */
.genre-select {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 50px;
}
@media (max-width: 700px) {
    .genre-select { grid-template-columns: 1fr; }
}
.genre-banner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #fff;
    padding: 36px 30px;
    background: #65aade;           /* 両バナー同色 */
    transition: background 0.2s;
}
.genre-banner,
.genre-banner:hover,
.genre-banner:focus {
    color: #fff;
}
/* 白の縁取り・透過ピル（デザイン準拠） */
.genre-banner-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    color: #fff;
    border: 2px solid #fff;
    font-size: 1.05rem;
    font-weight: 700;
    padding: 7px 42px;
    border-radius: 999px;
    margin-bottom: 16px;
    transition: background 0.2s;
}
.genre-banner-btn .arrow {
    font-weight: 700;
}
/* オンマウスで色を濃くするのはボタン部分のみ（バナー全体は変えない） */
.genre-banner:hover .genre-banner-btn,
.genre-banner:focus .genre-banner-btn {
    background: #3f8fc8;
}
.genre-banner-copy {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #fff;
    text-align: center;
}

/* 一覧ページのリード */
/* 一覧: 上部の写真バナー（文字焼き込み） */
.list-banner {
    margin: 10px 0 24px;
}
.list-banner img {
    width: 100%;
    height: auto;
    display: block;
}
/* 一覧: リード文 */
.list-lead-text {
    font-size: 0.95rem;
    line-height: 2;
    color: var(--text-color);
    text-align: center;
    margin: 0 auto 40px;
    max-width: 760px;
}

/* 一覧: 物件名＋SOLD OUT を左にまとめ、矢印を右端へ */
.land-item-main {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}
/* 一覧: 物件名は文節単位で改行（日本語の折り返しを自然に） */
.land-name {
    word-break: auto-phrase;
}
/* 一覧: 売り切れ「SOLD OUT」ラベル（物件名の後ろ）
   初期は小さめ、オンマウスで約20%拡大（ease） */
.sold-label {
    display: inline-block;
    background: #f19ec2;
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.05em;
    padding: 2px 6px;
    border-radius: 3px;
    white-space: nowrap;
    transform-origin: left center;
    transition: transform 0.2s ease;
}
.land-list-item:hover .sold-label {
    transform: scale(1.2);
}

/* 詳細: SOLD OUT バンド（写真とスペック表の境目に配置・写真にも一部かぶる） */
.sold-out-badge {
    position: absolute;
    top: 0;                 /* スペック上端＝写真との境目 */
    left: 6%;
    width: 88%;
    transform: translateY(-55%) rotate(-12deg);
    text-align: center;
    background: rgba(241, 158, 194, 0.92);
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.18em;
    font-size: clamp(1.7rem, 5.5vw, 2.9rem);
    line-height: 1;
    padding: 12px 0;
    z-index: 4;
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.2);
    pointer-events: none;
}

/* 詳細: ギャラリー画像（周辺情報の下・オンマウスで拡大） */
.gallery-section {
    margin-top: 40px;
    margin-bottom: 40px;
}
.gallery-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 14px;
}
.gallery-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}
.gallery-item {
    margin: 0;
    width: 150px;
}
.gallery-item img {
    width: 100%;
    height: 110px;
    object-fit: cover;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: zoom-in;
    transition: opacity 0.2s ease, box-shadow 0.2s ease;
}
.gallery-item img:hover {
    opacity: 0.85;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.gallery-item figcaption {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 5px;
}

/* ギャラリー: ライトボックス（モーダル拡大） */
.lightbox {
    position: fixed;
    top: 0; right: 0; bottom: 0; left: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    z-index: 10000;
}
.lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 6px 36px rgba(0, 0, 0, 0.5);
    cursor: default;
}
.lightbox-close {
    position: fixed;
    top: 18px;
    right: 28px;
    background: none;
    border: none;
    color: #fff;
    font-size: 2.6rem;
    line-height: 1;
    cursor: pointer;
    z-index: 10001;
    padding: 0 8px;
}
.lightbox-close:hover {
    opacity: 0.7;
}

/* クリックで拡大できる画像（広域マップ / 区画図） */
.site-image-box img.zoomable {
    cursor: zoom-in;
    transition: opacity 0.2s ease;
}
.site-image-box img.zoomable:hover {
    opacity: 0.85;
}

/* 詳細: 特記事項セクション */
.notes-section {
    margin-top: 40px;
}
.notes-section .notes-body {
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 20px;
    font-size: 0.9rem;
    line-height: 1.9;
    color: var(--text-color);
}
