/* ===========================
   Genba System CSS (共通)
   =========================== */

body {
    background-color: #eee;
    font-family: 'Open Sans', sans-serif;
    font-size: 20px;
    line-height: 1.4em;
    padding: 0;
    margin: 0;
}

.container {
    display: block;
    max-width: 960px;
    margin: 2em auto;
    padding: 2em;
}

.container > section {
    height: 100%;
    display: block;
    margin-bottom: 2em;
}

h1, h2, h3, h4, h5 {
    color: #494949;
    font-family: 'Open Sans', sans-serif;
    font-weight: 700;
}

h1 {
    font-size: 36px;
    color: #137899;
}

h2 {
    font-size: 29px;
}

h3 {
    font-size: 24px;
}

a {
    color: #0f7096;
}

ul {
    padding-left: 2em;
}

img {
    max-width: 100%;
    height: auto;
}

.disclaimer {
    max-width: 960px;
    display: block;
    margin: 0 auto;
    text-align: center;
    color: #333;
    font-size: .6em;
}

/* ===========================
   タブレット（横向き）調整
   =========================== */

@media (min-width: 768px) and (max-width: 991px) {
    .container {
        padding: 1em;
        border: 0;
        border-radius: 0;
    }
}

/* ===========================
   PC版（768px以上）
   =========================== */

@media (min-width: 768px) {

    /* 写真一覧テーブルのサムネイル */
    .genba-photo-thumb {
        max-width: 150px !important;
        height: auto !important;
    }

    /* 写真一覧テーブル専用の中央揃え */
    .genba-photo-table th,
    .genba-photo-table td {
        text-align: center !important;
        vertical-align: middle !important;
    }

    .genba-photo-table td textarea {
        text-align: left !important;
    }
}

/* ===========================
   ★ PCワイド画面（992px以上）
   上の余白を詰めて一覧性アップ
   =========================== */

@media (min-width: 992px) {
    .container {
        max-width: 960px;
        margin: 1.2em auto 2em;   /* ← 上だけ少し詰める */
        padding: 1.5em 2em 2em;   /* ← 中の余白も少しだけ減らす */
    }

    h1 {
        margin-top: 0;            /* 見出し上の余白もカット */
        margin-bottom: 0.6em;
    }
}

/* ===========================
   スマホ版（767px以下）
   =========================== */

@media (max-width: 767px) {

    /* --- 共通レイアウト --- */
    body {
        font-size: 16px;
    }

    .container {
        padding: 1em;
        margin: 0 0 1em;
        border: 0;
        border-radius: 0;
    }

    /* 見出し統一 */
    h1, h2, h3, h4, h5 {
        line-height: 1.4;
        margin-top: 0.6em;
        margin-bottom: 0.6em;
        word-break: break-word;
    }

    h1 { font-size: 24px; }
    h2 { font-size: 20px; }
    h3 { font-size: 18px; }
    h4 { font-size: 16px; }
    h5 { font-size: 14px; }

    /* ===========================
       ★ 写真一覧だけカード化 ★
       =========================== */

    .genba-photo-table {
        width: 100%;
        border-collapse: separate;
        border-spacing: 0 14px;
    }

    .genba-photo-table th {
        display: none !important;
    }

    .genba-photo-table td:nth-child(1),
    .genba-photo-table th:nth-child(1) {
        display: none !important;
    }

    .genba-photo-table tr {
        display: block;
        background: #fff;
        padding: 12px;
        border-radius: 10px;
        box-shadow: 0 0 6px rgba(0,0,0,0.12);
        margin-bottom: 12px;
    }

    .genba-photo-table td {
        display: block;
        width: 100%;
        border: none;
        padding: 6px 2px;
        box-sizing: border-box;
        text-align: left;
    }

    .genba-thumb img,
    .genba-photo-thumb {
        width: 100% !important;
        height: auto !important;
        border-radius: 6px;
        display: block;
    }

    .shoot-date {
        font-size: 15px;
        margin-top: 6px;
        color: #444;
    }

    textarea {
        width: 100% !important;
        height: 80px;
        font-size: 15px;
        padding: 6px;
        box-sizing: border-box;
    }

    .btn-save,
    .btn-delete {
        padding: 8px 14px;
        font-size: 15px;
    }

    .genba-actions-row {
        display: flex;
        justify-content: flex-end;
        gap: 8px;
        margin-top: 4px;
    }

    .map-link a {
        font-size: 16px;
        display: inline-block;
        margin-top: 8px;
    }

    .delete-area {
        margin-top: 12px;
        display: flex;
        justify-content: space-between;
        gap: 10px;
    }

    .delete-area .btn-delete {
        flex: 1;
        padding: 10px;
        font-size: 15px;
        background: #dd5555;
        color: #fff;
        border-radius: 6px;
        border: none;
    }
}

/* ===========================
   共通ボタンスタイル（青ボタン）
   =========================== */

.genba-photo-table button,
.genba-photo-table .map-button,
.genba-btn {
    display: inline-block;
    padding: 6px 14px;
    background: #1B86C1;
	background: #8BCE45;
	/*background: #0b79d0;       /* 柔らかい青 */
    border: 1px solid #fff; /* 少し濃い青で引き締め */
    border-radius: 4px;        /* ちょうどいい角丸 */
    font-size: 14px;
    line-height: 1.4;
    color: #333;               /* 白文字 */
    text-align: center;
    text-decoration: none;
    box-sizing: border-box;
    cursor: pointer;
    font-weight: 600;          /* ほんの少し強調 */
}

/* ホバー時（色を少し濃く） */
.genba-photo-table button:hover,
.genba-photo-table .map-button:hover,
.genba-btn:hover {
    background: #9ED860;
    border-color: #fff;
}


/* 協力会社トップの現場一覧テーブル用のリセット */
.genba-site-table {
    border-collapse: collapse;   /* 余計な行間を消す */
    border-spacing: 0;
}

/* tbody 行の高さをリセット */
.genba-site-table tbody tr {
    height: auto;
}

/* 先頭行の上に変な余白が付いている場合の保険 */
.genba-site-table tbody tr:first-child td {
    padding-top: 0;
    margin-top: 0;
}
