/*
Theme Name: AQUAPLANET
Template: twentytwentyfive
Description: 有限会社アクアプラネット 会社サイト用の子テーマ（旧静的サイトのデザインを再現）。文章は固定ページ・投稿で編集する。
Version: 1.2.3
Text Domain: aquaplanet
Update URI: false
*/

body {
  font-feature-settings: "palt";
  -webkit-font-smoothing: antialiased;
}

/* ---------- ヘッダー ---------- */
.ap-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid #e6ebf2;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: saturate(160%) blur(10px);
}
.ap-header__inner {
  display: flex;
  align-items: center;
  max-width: 1200px;
  height: 84px;
  margin: 0 auto;
  padding: 0 24px;
}
.ap-logo,
.ap-logo a {
  margin: 0;
  font-family: Inter, sans-serif;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: .06em;
  color: #0b1a33 !important;
  text-decoration: none;
}
@media (max-width: 640px) {
  .ap-logo, .ap-logo a { font-size: 24px; }
  .ap-header__inner { padding: 0 16px; }
}

/* ---------- 本文の帯（会社概要・お問い合わせなど） ---------- */
main.ap-main { margin-top: 0; }
main.ap-main > .entry-content > *:first-child { margin-top: 0; }
.ap-band {
  /* 背景はブロック側（スタイル > 色 > 背景）で設定する。初期値は「薄い青のグラデーション」 */
  padding-top: 96px !important;
  padding-bottom: 96px !important;
}
.ap-band + .ap-section { padding-top: 96px; }
.ap-section { padding-top: 56px; }
.ap-section:last-child { padding-bottom: 96px; }
@media (max-width: 720px) {
  .ap-band { padding-top: 64px !important; padding-bottom: 64px !important; }
  .ap-band + .ap-section { padding-top: 64px; }
  .ap-section { padding-top: 40px; }
  .ap-section:last-child { padding-bottom: 64px; }
}
.ap-page-title {
  margin: 0 auto 56px !important;
  text-align: center;
  font-size: clamp(28px, 3.2vw, 38px) !important;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -.005em;
}

/* 見出し（沿革・代表者経歴）: 左に青い線 */
.ap-section-title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 24px !important;
  font-size: 20px !important;
  font-weight: 800;
}
.ap-section-title::before {
  content: "";
  width: 36px;
  height: 2px;
  background: #0057b7;
}

/* ---------- 表: 会社概要 ---------- */
.wp-block-table.is-style-ap-company { margin: 0; }
.wp-block-table.is-style-ap-company table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border: 1px solid #e6ebf2;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 20px 50px -20px rgba(11, 26, 51, .18), 0 4px 12px -6px rgba(11, 26, 51, .08);
}
.wp-block-table.is-style-ap-company td {
  border: 0;
  border-bottom: 1px solid #e6ebf2;
  padding: 22px 32px;
  font-size: 15px;
  line-height: 1.85;
  color: #0b1a33;
  vertical-align: middle;
}
.wp-block-table.is-style-ap-company tr:last-child td { border-bottom: 0; }
.wp-block-table.is-style-ap-company td:first-child {
  width: 220px;
  padding: 22px 28px;
  border-right: 1px solid #e6ebf2;
  background: #f4f7fb;
  font-size: 14px;
  font-weight: 700;
  color: #0b1a33;
}

/* ---------- 表: 年表（沿革・代表者経歴） ---------- */
.wp-block-table.is-style-ap-timeline { margin: 0; }
.wp-block-table.is-style-ap-timeline table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border: 1px solid #e6ebf2;
  border-radius: 20px;
  background: #fff;
}
.wp-block-table.is-style-ap-timeline td {
  border: 0;
  border-bottom: 1px solid #e6ebf2;
  padding: 18px 28px;
  font-size: 14.5px;
  line-height: 1.85;
  color: #25324a;
  vertical-align: baseline;
}
.wp-block-table.is-style-ap-timeline tr:last-child td { border-bottom: 0; }
.wp-block-table.is-style-ap-timeline tr:hover td { background: #f4f7fb; }
.wp-block-table.is-style-ap-timeline td:first-child {
  width: 120px;
  padding-right: 0;
  font-family: Inter, sans-serif;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -.01em;
  color: #0057b7;
  white-space: nowrap;
}
.wp-block-table.is-style-ap-timeline strong { color: #0b1a33; font-weight: 700; }

@media (max-width: 720px) {
  .wp-block-table.is-style-ap-company td,
  .wp-block-table.is-style-ap-timeline td { display: block; width: auto !important; }
  .wp-block-table.is-style-ap-company td { padding: 18px 20px; font-size: 14.5px; }
  .wp-block-table.is-style-ap-company td:first-child {
    padding: 14px 20px;
    border-right: 0;
    border-bottom: 1px solid #e6ebf2;
    font-size: 12.5px;
  }
  .wp-block-table.is-style-ap-company tr:last-child td:first-child { border-bottom: 1px solid #e6ebf2; }
  .wp-block-table.is-style-ap-timeline td { padding: 4px 20px; border-bottom: 0; }
  .wp-block-table.is-style-ap-timeline td:first-child { padding-top: 16px; }
  .wp-block-table.is-style-ap-timeline td:last-child { padding-bottom: 16px; border-bottom: 1px solid #e6ebf2; }
  .wp-block-table.is-style-ap-timeline tr:last-child td:last-child { border-bottom: 0; }
}

/* ---------- 注記・関連特許の枠 ---------- */
.ap-note-box {
  margin-top: 24px !important;
  padding: 20px 24px !important;
  border: 1px solid #e6ebf2;
  border-radius: 12px;
  background: #fff;
  font-size: 13px;
  line-height: 1.85;
  color: #25324a;
}
.ap-note-box p { margin: 0 0 6px; }
.ap-note-box p:last-child { margin-bottom: 0; }
.ap-note-box strong {
  display: inline-block;
  min-width: 28px;
  margin-right: 8px;
  font-family: Inter, sans-serif;
  color: #0057b7;
}
.ap-eyebrow {
  margin: 0 0 10px !important;
  font-family: Inter, sans-serif;
  font-size: 11px !important;
  font-weight: 700;
  letter-spacing: .18em;
  color: #0057b7;
}
.ap-patent-title {
  margin: 0 0 10px !important;
  font-size: 15px !important;
  font-weight: 700;
  line-height: 1.6;
  color: #0b1a33;
}
.ap-note-box .wp-block-table { margin: 0; }
.ap-note-box .wp-block-table td {
  border: 0;
  padding: 3px 12px 3px 0;
  font-size: 13px;
  line-height: 1.7;
  color: #25324a;
}
.ap-note-box .wp-block-table td:first-child {
  width: 110px;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  letter-spacing: .02em;
  color: #0057b7;
}

/* ---------- お問い合わせ ---------- */
.ap-lead { text-align: center; font-size: 18px; color: #4b5563; margin-bottom: 32px !important; }
.ap-card {
  max-width: 832px;
  margin-left: auto !important;
  margin-right: auto !important;
  padding: 48px !important;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, .1), 0 8px 10px -6px rgba(0, 0, 0, .1);
  text-align: center;
}
.ap-card h2 { margin: 0 0 16px; font-size: 18px; font-weight: 600; color: #1f2937; }
.ap-card p { color: #4b5563; }
.ap-card .wp-block-button__link {
  border-radius: 6px;
  background: #2563eb;
  padding: 12px 32px;
  font-weight: 500;
  color: #fff;
}
.ap-card .wp-block-button__link:hover { background: #1d4ed8; }
.ap-small { font-size: 14px !important; color: #6b7280 !important; }
@media (max-width: 720px) { .ap-card { padding: 32px 20px !important; } }

.ap-back { text-align: center; margin-top: 32px !important; }
.ap-back a { font-weight: 500; text-decoration: none; }

/* ---------- お知らせ記事 ---------- */
.ap-article { max-width: 768px; margin: 0 auto; padding: 48px 24px 80px; }
.ap-article .ap-back-top { margin: 0 0 24px; text-align: left; }
.ap-article .ap-back-top a { font-weight: 700; color: #0057b7; text-decoration: none; }
.ap-article .ap-back-top a:hover { text-decoration: underline; }
.ap-article .wp-block-post-title { margin: 0; font-size: 24px; font-weight: 700; color: #111827; }
.ap-article .wp-block-post-date { margin: 4px 0 24px; font-size: 14px; color: #6b7280; }
.ap-article-body {
  padding: 24px !important;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .1), 0 1px 2px -1px rgba(0, 0, 0, .1);
  line-height: 1.75;
}
.ap-article-body > * + * { margin-top: 24px !important; }

/* ---------- フッター ---------- */
.ap-footer {
  margin-top: 0 !important;
  padding: 56px 0 28px !important;
  background: #0b1a33;
  font-size: 13.5px;
  color: #8ea1c4;
}
.ap-footer__inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.ap-footer__grid {
  display: grid;
  grid-template-columns: 1fr 1.8fr .9fr;
  gap: 32px;
  margin-bottom: 40px;
}
@media (max-width: 900px) {
  .ap-footer__grid { grid-template-columns: 1fr 1fr; }
  .ap-footer__brand { grid-column: span 2; }
}
@media (max-width: 640px) {
  .ap-footer__grid { grid-template-columns: 1fr; }
  .ap-footer__brand { grid-column: auto; }
}
.ap-footer__brand {
  margin: 0;
  font-family: Inter, sans-serif;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: .06em;
  color: #fff;
}
.ap-footer h2.ap-footer__heading {
  margin: 0 0 16px;
  font-family: Inter, "Noto Sans JP", sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .14em;
  color: #fff;
}
.ap-footer a { color: #8ea1c4; text-decoration: none; }
.ap-footer a:hover { color: #fff; }
.ap-footer p { margin: 0; }
.ap-footer .wp-block-post-template { margin: 0; padding: 0; list-style: none; }
.ap-footer .ap-news-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
}
.ap-footer .ap-news-item .wp-block-post-date { margin: 0; font-size: 12px; color: #7183a4; }
.ap-footer .ap-news-item .wp-block-post-title { margin: 0; font-size: 14px; font-weight: 500; }
.ap-footer .ap-news-item .wp-block-post-title a {
  color: #b3c0d7;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, .25);
  text-underline-offset: 3px;
}
.ap-footer .ap-news-item .wp-block-post-title a:hover { color: #fff; }
.ap-footer__bottom {
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, .1);
  text-align: center;
  font-size: 12px;
  color: #5e7095;
}

/* ---------- ブロックテーマ既定の余白を打ち消す ---------- */
.wp-site-blocks > * { margin-block-start: 0 !important; }
.ap-footer__grid > *,
.ap-footer__col > *,
.ap-news-item > *,
.ap-header__inner > * { margin-block-start: 0 !important; }
.ap-footer__col > * + * { margin-top: 0 !important; }
.ap-footer__bottom p { margin: 0; }
.ap-article-bg { min-height: 60vh; }
.ap-page-title--sm { margin-bottom: 16px !important; font-size: 24px !important; font-weight: 700; }
.ap-card > * + * { margin-top: 0 !important; }
.ap-card .wp-block-buttons { margin: 24px 0 16px !important; }
.ap-section > * { margin-block-start: 0 !important; }
.ap-section > .ap-note-box { margin-top: 24px !important; }
.ap-band > .ap-page-title + * { margin-top: 0 !important; }

/* 本文が短いページでもフッターを画面下に置く */
.wp-site-blocks { display: flex; flex-direction: column; min-height: 100vh; }
.wp-site-blocks > main { flex: 1 0 auto; }

/* フッターのお知らせ: 最大3件。2件目以降は線で区切る */
.ap-footer .wp-block-post-template > li + li {
  margin-top: 8px !important;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, .1);
}

/* ---------- お知らせ一覧（/news） ---------- */
.ap-band--list { padding-top: 48px !important; padding-bottom: 80px !important; }
.ap-band--list > * { margin-block-start: 0 !important; }
.ap-list-title { margin-top: 0 !important; margin-bottom: 24px !important; font-size: clamp(30px, 3.2vw, 36px) !important; font-weight: 700; }
.ap-list-lead { margin-top: 0 !important; margin-bottom: 24px !important; color: #25324a; }
.ap-news-list .wp-block-post-template { margin: 0; padding: 0; list-style: none; }
.ap-news-list .wp-block-post-template > li + li { margin-top: 16px; }
.ap-news-card {
  padding: 24px !important;
  border: 1px solid #e6ebf2;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
  color: #25324a;
  transition: box-shadow .15s, border-color .15s;
}
.ap-news-card:hover { border-color: #a8c6ea; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, .1), 0 2px 4px -2px rgba(0, 0, 0, .1); }
.ap-news-card > * { margin-block-start: 0 !important; }
.ap-news-card__head { gap: 16px; }
.ap-news-card .wp-block-post-title { margin: 0; font-size: 18px !important; font-weight: 600; line-height: 1.6; }
.ap-news-card .wp-block-post-title a { color: #0b1a33; text-decoration: none; }
.ap-news-card .wp-block-post-title a::after { content: ""; position: absolute; inset: 0; } /* カード全体をクリック可能に */
.ap-news-card { position: relative; }
.ap-news-card .wp-block-post-date { flex-shrink: 0; margin: 4px 0 0; font-size: 14px; color: #5a6577; }
.ap-news-card .wp-block-post-excerpt { margin-top: 8px !important; }
.ap-news-card .wp-block-post-excerpt__excerpt { margin: 0; }
@media (max-width: 640px) { .ap-news-card__head { flex-direction: column; gap: 4px; } }
.ap-news-list .wp-block-query-pagination { margin-top: 24px; }
.ap-pill-buttons { margin-top: 40px !important; }
.ap-pill-buttons .wp-block-button__link {
  padding: 12px 24px;
  border-radius: 999px;
  background: #0b1a33; /* ヘッダーの AQUAPLANET と同じ濃紺 */
  font-weight: 700;
  color: #fff;
  box-shadow: 0 6px 14px -8px rgba(11, 26, 51, .5);
}
.ap-pill-buttons .wp-block-button__link:hover { background: #25324a; transform: translateY(-1px); }
.ap-footer__heading a { color: #fff !important; }

/* 表ブロックで「文字色」を指定したときはそちらを優先する（年表の年の青・会社概要の項目名は除く） */
.wp-block-table.is-style-ap-company table.has-text-color td:not(:first-child),
.wp-block-table.is-style-ap-timeline table.has-text-color td:not(:first-child),
.wp-block-table.is-style-ap-timeline table.has-text-color strong,
.ap-note-box .wp-block-table table.has-text-color td:not(:first-child) {
  color: inherit;
}
