/*
Theme Name: AquaDraft
Theme URI: https://blog.aqua-draft.com
Author: やまかず
Author URI: https://blog.aqua-draft.com
Description: AquaDraft公式ブログテーマ。ツールサイトと統一されたデザイン。
Version: 1.0.0
License: All Rights Reserved
Text Domain: aquadraft
*/

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; }

html { font-size: 16px; }

body {
  margin: 0;
  font-family: 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', system-ui, sans-serif;
  font-size: 0.95rem;
  color: #1a1a1a;
  background: #f7f9fc;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

a { color: #1a5fa8; text-decoration: none; }
a:hover { text-decoration: underline; }

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

h1, h2, h3, h4 { font-weight: 700; line-height: 1.4; }

/* ===== Layout ===== */
.site-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.site-content {
  flex: 1;
  max-width: 860px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
  width: 100%;
}

/* ===== Header / Nav ===== */
.site-header {
  background: #1a3a50;
  border-bottom: 1px solid #0f2a3a;
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: 48px;
}

.site-header__brand {
  display: flex;
  align-items: center;
  gap: 0;
  text-decoration: none;
}

.site-header__logo {
  height: 30px;
  width: auto;
  border-radius: 4px;
}

.site-header__title {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.04em;
}

.site-header__subtitle {
  font-size: 0.72rem;
  color: #7aaec8;
  margin-left: 10px;
  padding-left: 10px;
  border-left: 1px solid #2a5a70;
  white-space: nowrap;
}

.site-header__nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-header__nav a {
  font-size: 0.82rem;
  color: #a8cfe0;
  text-decoration: none;
  transition: color 0.15s;
}

.site-header__nav a:hover { color: #fff; text-decoration: none; }

/* ===== Footer ===== */
.site-footer {
  background: #1a3a50;
  border-top: 1px solid #0f2a3a;
  color: #7aaec8;
  font-size: 0.75rem;
  text-align: center;
  padding: 16px 20px;
}

.site-footer a { color: #7aaec8; }
.site-footer a:hover { color: #fff; }

/* ===== Posts ===== */
.posts-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.post-card {
  background: #fff;
  border: none;
  border-radius: 14px;
  padding: 24px 28px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04), 0 4px 18px rgba(0,0,0,0.07);
  transition: box-shadow 0.2s, transform 0.2s;
}

.post-card:hover {
  box-shadow: 0 4px 24px rgba(0,0,0,0.12);
  transform: translateY(-2px);
}

.post-card__meta {
  font-size: 0.78rem;
  color: #999;
  margin-bottom: 6px;
}

.post-card__title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 8px;
}

.post-card__title a { color: #111; }
.post-card__title a:hover { color: #1a5fa8; text-decoration: none; }

.post-card__excerpt {
  font-size: 0.88rem;
  color: #555;
  margin: 0;
}

/* ===== Single Post ===== */
.entry-header { margin-bottom: 2rem; }

.entry-title {
  font-size: 1.6rem;
  margin: 0 0 0.5rem;
}

.entry-meta {
  font-size: 0.8rem;
  color: #999;
}

.entry-content {
  background: #fff;
  border: none;
  border-radius: 14px;
  padding: 2rem 2.5rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04), 0 6px 28px rgba(0,0,0,0.07);
}

.entry-content h2 {
  font-size: 1.15rem;
  margin: 2.2rem 0 0.7rem;
  padding: 2px 0 2px 0.75rem;
  border-left: 3px solid #1a5fa8;
}

.entry-content h3 {
  font-size: 0.97rem;
  margin: 1.5rem 0 0.4rem;
  color: #1a5fa8;
  font-weight: 700;
}

.entry-content p { margin: 0 0 1rem; }

.entry-content ul, .entry-content ol {
  padding-left: 1.4rem;
  margin: 0 0 1rem;
}

/* ===== Page (固定ページ) ===== */
.page-content {
  background: #fff;
  border: none;
  border-radius: 14px;
  padding: 2rem 2.5rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04), 0 6px 28px rgba(0,0,0,0.07);
}

.page-content h2 {
  font-size: 1.15rem;
  margin: 2.2rem 0 0.7rem;
  padding: 2px 0 2px 0.75rem;
  border-left: 3px solid #1a5fa8;
  font-weight: 700;
}

.page-content h2:first-child { margin-top: 0; }

.page-content h3 {
  font-size: 0.97rem;
  margin: 1.4rem 0 0.4rem;
  color: #1a5fa8;
  font-weight: 700;
}

.page-content table,
.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.5rem 0 1.2rem;
  font-size: 0.88rem;
}

.page-content table th,
.entry-content table th {
  background: #f0f5ff;
  color: #1a5fa8;
  font-weight: 600;
  padding: 8px 14px;
  text-align: left;
  border-bottom: 2px solid #dde8f5;
}

.page-content table td,
.entry-content table td {
  padding: 8px 14px;
  border-bottom: 1px solid #f2f4f8;
  color: #333;
}

.page-content table tr:last-child td,
.entry-content table tr:last-child td { border-bottom: none; }

/* ===== Pagination ===== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 2rem;
}

.pagination a, .pagination span {
  padding: 6px 14px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.85rem;
  color: #1a5fa8;
}

.pagination .current {
  background: #1a5fa8;
  color: #fff;
  border-color: #1a5fa8;
}

/* ===== Contact Form 7 ===== */
.wpcf7-form p { margin: 0 0 12px; }
.wpcf7-form label br { display: none; }

/* CF7内部フィールドを非表示 */
.wpcf7 .hidden-fields-container { display: none; }
.honeypot-field-wrap,
p:has(.honeypot-field-wrap) { display: none !important; }

/* 通常ラベル（タイトル・メール・JSON・写真） */
.wpcf7-form > p > label,
.wpcf7-form > p > label > span.wpcf7-form-control-wrap {
  display: block;
}

.wpcf7-form > p > label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #555;
  margin-bottom: 6px;
  cursor: default;
}

.wpcf7-form small {
  display: block;
  font-size: 0.75rem;
  font-weight: 400;
  color: #999;
  margin-bottom: 4px;
}

/* テキスト・メール・テキストエリア */
.wpcf7-form .wpcf7-text,
.wpcf7-form .wpcf7-email,
.wpcf7-form .wpcf7-textarea {
  display: block;
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid #ddd;
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
  box-sizing: border-box;
  background: #fff;
  color: #1a1a1a;
}

.wpcf7-form .wpcf7-text:focus,
.wpcf7-form .wpcf7-email:focus,
.wpcf7-form .wpcf7-textarea:focus { border-color: #1a5fa8; }
.wpcf7-form .wpcf7-textarea { resize: vertical; min-height: 120px; }

/* タグチェックボックス（pillスタイル） */
.wpcf7-form .wpcf7-checkbox {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.wpcf7-form .wpcf7-checkbox .wpcf7-list-item {
  display: inline-flex;
  align-items: center;
  position: relative;
  padding: 5px 13px;
  border: 1.5px solid #ddd;
  border-radius: 20px;
  background: #fff;
  cursor: pointer;
  margin: 0 !important;
  transition: border-color 0.15s, background 0.15s;
}

.wpcf7-form .wpcf7-checkbox .wpcf7-list-item:hover {
  border-color: #1a5fa8;
}

.wpcf7-form .wpcf7-checkbox .wpcf7-list-item input[type="checkbox"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  margin: 0;
}

.wpcf7-form .wpcf7-checkbox .wpcf7-list-item .wpcf7-list-item-label {
  font-size: 0.8rem;
  color: #555;
  font-weight: 400;
  white-space: nowrap;
  cursor: pointer;
}

.wpcf7-form .wpcf7-checkbox .wpcf7-list-item:hover .wpcf7-list-item-label {
  color: #1a5fa8;
}

.wpcf7-form .wpcf7-checkbox .wpcf7-list-item:has(input:checked) {
  border-color: #1a5fa8;
  background: #1a5fa8;
}

.wpcf7-form .wpcf7-checkbox .wpcf7-list-item:has(input:checked) .wpcf7-list-item-label {
  color: #fff;
}

/* ファイルアップロードエリア共通（.wpcf7-formプレフィックスで詳細度を上げてdisplay:flexを確保） */
.wpcf7-form .wpcf7-form-control-wrap[data-name="layout-json"],
.wpcf7-form .wpcf7-form-control-wrap[data-name="layout-photo"] {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  border: 1.5px dashed #b0c4de;
  border-radius: 8px;
  background: #f5f7fa;
  cursor: pointer;
  position: relative;
  margin-top: 6px;
  transition: background 0.15s, border-color 0.15s;
}

.wpcf7-form .wpcf7-form-control-wrap[data-name="layout-json"] { min-height: 72px; }
.wpcf7-form .wpcf7-form-control-wrap[data-name="layout-photo"] { min-height: 180px; max-height: 280px; aspect-ratio: 16 / 9; }

.wpcf7-form .wpcf7-form-control-wrap[data-name="layout-json"]:hover,
.wpcf7-form .wpcf7-form-control-wrap[data-name="layout-photo"]:hover {
  background: #e8f0fb;
  border-color: #1a5fa8;
}

.wpcf7-form .wpcf7-form-control-wrap[data-name="layout-json"]::after {
  content: '+ JSONファイルを選択';
  color: #1a5fa8;
  font-size: 0.85rem;
  font-weight: 600;
  pointer-events: none;
}

.wpcf7-form .wpcf7-form-control-wrap[data-name="layout-photo"]::after {
  content: '+ 写真を追加';
  color: #1a5fa8;
  font-size: 0.85rem;
  font-weight: 600;
  pointer-events: none;
}

.wpcf7-form .wpcf7-form-control-wrap[data-name="layout-json"] .wpcf7-file,
.wpcf7-form .wpcf7-form-control-wrap[data-name="layout-photo"] .wpcf7-file {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

/* JSON選択済み */
.wpcf7-form .wpcf7-form-control-wrap[data-name="layout-json"].has-file {
  border-color: #1a5fa8;
  background: #f0f5ff;
}
.wpcf7-form .wpcf7-form-control-wrap[data-name="layout-json"].has-file::after {
  content: '✓ ' attr(data-filename);
  color: #1a5fa8;
  font-size: 0.82rem;
  font-weight: 600;
  max-width: 90%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 写真プレビュー */
.wpcf7-form .wpcf7-form-control-wrap[data-name="layout-photo"].has-photo::after {
  display: none;
}
.wpcf7-form .wpcf7-form-control-wrap[data-name="layout-photo"] .photo-preview-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
  pointer-events: none;
}
.wpcf7-form .wpcf7-form-control-wrap[data-name="layout-photo"] .wpcf7-file {
  z-index: 1;
}

/* ノーティス（応募時の注意書き） */
.wpcf7-form .cf7-notice {
  font-size: 0.75rem;
  color: #999;
  line-height: 1.6;
  margin-bottom: 16px;
  padding: 10px 12px;
  background: #f9f9f9;
  border-radius: 6px;
}

/* 送信ボタン */
.wpcf7-form .wpcf7-submit {
  display: block;
  width: 100%;
  padding: 12px;
  background: #1a5fa8;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
  font-family: inherit;
  margin-top: 8px;
}

.wpcf7-form .wpcf7-submit:hover { background: #1752a0; }

/* バリデーションエラー */
.wpcf7-form .wpcf7-not-valid-tip {
  display: block;
  font-size: 0.75rem;
  color: #c0392b;
  margin-top: 4px;
}

.wpcf7-form.init .wpcf7-response-output,
.wpcf7-form.resetting .wpcf7-response-output,
.wpcf7-form.submitting .wpcf7-response-output { display: none; }

.wpcf7-form .wpcf7-response-output {
  margin-top: 16px;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 0.85rem;
  border: none;
}

.wpcf7-form.sent .wpcf7-response-output { background: #e8f5e9; color: #2e7d32; }
.wpcf7-form.failed .wpcf7-response-output,
.wpcf7-form.spam .wpcf7-response-output { background: #fdecea; color: #c62828; }
.wpcf7-form.invalid .wpcf7-response-output { background: #fff8e1; color: #f57f17; }
