/* =========================================
   全体
========================================= */
body {
    font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
    background: #f5f6fa;
    margin: 0;
    padding: 30px;
    color: #333;
    font-size: 16px;   /* ★ 追加：管理画面の基本文字サイズ */
}


/* =========================================
   見出し
========================================= */
h2 {
    font-size: 26px;
    margin-bottom: 10px;
}

h3 {
    font-size: 20px;
    margin-top: 30px;
    margin-bottom: 10px;
}

/* =========================================
   リンク
========================================= */
a {
    color: #007bff;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* =========================================
   テーブル（管理画面用）
========================================= */
table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

table th {
    background: #eef2f7;
    padding: 12px;
    font-weight: bold;
    border-bottom: 1px solid #ddd;
}

table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
}

table tr:last-child td {
    border-bottom: none;
}

/* =========================================
   ボタン
========================================= */
.btn-danger {
    padding: 6px 12px;
    background: #d9534f !important;
    color: #fff !important;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.btn-danger:hover {
    background: #c9302c !important;
}

.btn-small {
    padding: 5px 12px;
    background: #007bff;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    border: none;
}

.btn-small:hover {
    background: #005fcc;
}

button[type="submit"] {
    padding: 6px 12px;
    background: #005fcc;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

button[type="submit"]:hover {
    background: #004bb5;
}

/* =========================================
   ページヘッダー / セクションカード
========================================= */
.page-header {
    background: #fff;
    padding: 18px 24px;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    margin-bottom: 25px;
}

.section-block {
    position: relative;    
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    margin-bottom: 35px; /* ★ 増やすと区切りが明確になる */
    border: 1px solid #e5e5e5; /* ★ 境界線を追加 */
}

/* セクション右上の操作ボタン */
.section-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 6px;
}

.section-block::after {
    content: "";
    display: block;
    height: 1px;
    background: #ddd;
    margin-top: 25px;
}

.section-block {
    border: 2px solid #d0d7e2; /* ★ 境界を強くする */
    border-radius: 10px;
    margin-bottom: 30px;
    background: #fff;
}

.section-block::after {
    content: "";
    display: block;
    height: 1px;
    background: #ccc;
    margin-top: 25px;
}

.section-actions button {
    padding: 4px 8px;
    font-size: 14px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background: #eee;
}

.section-actions button:hover {
    background: #ddd;
}


/* =========================================
   テンプレート一覧
========================================= */
.template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.template-item {
    border: 1px solid #ccc;
    padding: 10px;
    text-align: center;
    background: #fff;
    border-radius: 8px;
}

.template-item img.thumb {
    width: 100%;
    height: auto;
    border-radius: 6px;
    border: 1px solid #ddd;
}

.template-item button {
    margin-top: 10px;
    padding: 8px 12px;
    background: #007bff;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.template-item button:hover {
    background: #0056b3;
}

/* =========================================
   言語タブ（edit_page.php と統一）
========================================= */
.tab-bar {
    margin-bottom: 15px;
    display: flex;
    gap: 8px;
}

.tab-btn {
    padding: 8px 15px;
    background: #ddd;
    color: #333;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s;
}

.tab-btn:hover {
    background: #ccc;
}

.tab-btn.active {
    background: #007bff;
    color: #fff;
    font-weight: bold;
}

/* =========================================
   言語フィールド
========================================= */
.lang-field {
    display: none;
}

.lang-field.active {
    display: block;
}

.lang-label {
    font-weight: bold;
    margin-top: 10px;
    display: block;
}

/* =========================================
   ギャラリー
========================================= */
.gallery-images {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.gallery-item {
    background: #fafafa;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

/* =========================================
   FAQ
========================================= */
.faq-item {
    background: #fafafa;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #ddd;
    margin-bottom: 15px;
}

/* =========================================
   テーブル入力
========================================= */
.table-input input {
    width: 100%;
    box-sizing: border-box;
}

.table-input th,
.table-input td {
    vertical-align: top;
    padding: 8px;
}

/* =========================================
   Google ログインボタン
========================================= */
.google-login-btn {
    display: inline-block;
    padding: 10px 15px;
    background: #4285F4;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
}

.google-login-btn:hover {
    background: #357AE8;
}

.accordion-header {
    padding: 12px 15px;
    background: #eef2f7;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.accordion-content {
    display: none;
    padding-top: 15px;
}

.section-block.open .accordion-content {
    display: block;
}

/* =========================================
   ボタン（統一デザイン）
========================================= */
.btn {
    padding: 8px 16px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    display: inline-block;
}

/* メイン操作（保存など） */
.btn-primary {
    background: #007bff;
    color: #fff;
}
.btn-primary:hover {
    background: #005fcc;
}

/* サブ操作（破棄・戻るなど） */
.btn-secondary {
    background: #6c757d;
    color: #fff;
}
.btn-secondary:hover {
    background: #5a6268;
}

/* 危険操作（削除・サブドメイン変更） */
.btn-warning {
    background: #d9534f;
    color: #fff;
}
.btn-warning:hover {
    background: #c9302c;
}
/* ============================================
   セクション全体のブロック
============================================ */
.section-block {
    border: 1px solid #ddd;
    border-radius: 8px;
    margin: 25px 0;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    overflow: hidden;
}

/* ============================================
   セクションのヘッダー（タイトル部分）
============================================ */
.accordion-header {
    background: #f7f7f7;
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    border-bottom: 1px solid #e5e5e5;
}

.accordion-header h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

/* セクション操作ボタン（↑ ↓ ✕） */
.section-actions button {
    margin-left: 6px;
    padding: 4px 8px;
    font-size: 14px;
    border: 1px solid #ccc;
    background: #fafafa;
    border-radius: 4px;
    cursor: pointer;
}

.section-actions button:hover {
    background: #eee;
}

/* ============================================
   セクションの中身
============================================ */
.accordion-content {
    padding: 20px;
    background: #fff;
}

/* ============================================
   ラベルと入力欄
============================================ */
.accordion-content label {
    font-weight: 600;
    margin-top: 12px;
    display: block;
}

.accordion-content input[type="text"],
.accordion-content input[type="number"],
.accordion-content input[type="email"],
.accordion-content textarea,
.accordion-content select {
    width: 100%;
    padding: 10px;
    margin-top: 6px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 15px;
    background: #fafafa;
}

.accordion-content textarea {
    min-height: 120px;
}

/* ============================================
   多言語フィールドの切り替え
============================================ */
.lang-field {
    border: 1px solid #eee;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    background: #fcfcfc;
}

.lang-field.active {
    border-color: #c8d8ff;
    background: #f4f7ff;
}

/* ============================================
   セクション間の視覚的区切り
============================================ */
.section-block + .section-block {
    margin-top: 35px;
}
