/*
Theme Name: 羽島郡二町教育委員会
Theme URI: http://kyouiku2chou.jp/
Author: 羽島郡二町教育委員会
Author URI: http://kyouiku2chou.jp/
Description: 羽島郡二町教育委員会の公式WordPressテーマ。岐南町・笠松町の教育情報を発信するモダンな行政サイトデザイン。
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nicho-edu
Tags: education, government, japanese, responsive
*/

/* ============================================================
   CSS カスタムプロパティ（管理画面でカスタマイザーから変更可能）
   ============================================================ */
:root {
  --color-navy:     #1a2744;
  --color-navy2:    #243360;
  --color-green:    #3a7d44;
  --color-green2:   #2d6035;
  --color-green-lt: #e8f3eb;
  --color-gold:     #b8984a;
  --color-gold-lt:  #e8d49a;
  --color-cream:    #f7f4ef;
  --color-white:    #ffffff;
  --color-gray:     #6b7280;
  --color-border:   #ddd8ce;
  --color-text:     #2c2c2c;

  --font-serif: 'Noto Serif JP', 'YuMincho', 'Yu Mincho', serif;
  --font-sans:  'Noto Sans JP', 'YuGothic', 'Yu Gothic', sans-serif;
  --font-en:    'DM Serif Display', Georgia, serif;

  --container-width: 1100px;
  --section-padding: 64px;
}

/* ============================================================
   リセット & ベース
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-sans);
  background: var(--color-cream);
  color: var(--color-text);
  font-size: 0.9375rem; /* 15px */
  line-height: 1.8;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ============================================================
   コンテナ
   ============================================================ */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================================
   ヘッダー
   ============================================================ */
.site-header {
  background: var(--color-navy);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 3px solid var(--color-green);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

/* サイトロゴ */
.site-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.site-logo img {
  height: 44px;
  width: auto;
}
.site-logo__text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.site-logo__en {
  font-family: var(--font-en);
  font-size: 9px;
  letter-spacing: 0.18em;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
}
.site-logo__ja {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 600;
  color: var(--color-white);
  letter-spacing: 0.06em;
}

/* ナビゲーション */
.site-nav {
  display: flex;
  gap: 2px;
}
.site-nav a {
  font-family: var(--font-serif);
  font-size: 13px;
  color: rgba(255,255,255,0.75);
  padding: 8px 13px;
  border-radius: 4px;
  letter-spacing: 0.06em;
  transition: background 0.2s, color 0.2s;
}
.site-nav a:hover,
.site-nav .current-menu-item > a,
.site-nav .current_page_item > a {
  background: rgba(58,125,68,0.3);
  color: #a8d8b0;
}

/* モバイルメニューボタン */
.menu-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(255,255,255,0.3);
  color: var(--color-white);
  padding: 6px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 18px;
}

/* ============================================================
   ヒーローセクション（フロントページ用）
   ============================================================ */
.hero {
  background: var(--color-navy2);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 55% 70% at 65% 50%, rgba(58,125,68,0.15) 0%, transparent 70%),
    repeating-linear-gradient(-45deg, transparent, transparent 40px,
      rgba(255,255,255,0.012) 40px, rgba(255,255,255,0.012) 41px);
}
.hero .container {
  display: grid;
  grid-template-columns: 1fr 480px;
  align-items: stretch;
  min-height: 340px;
  position: relative;
}
.hero__text {
  padding: 56px 40px 56px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  animation: fadeUp 0.7s ease both;
}
.hero__kana {
  font-family: var(--font-en);
  font-size: 10px;
  color: #a8d8b0;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: 16px;
  display: block;
}
.hero__title {
  font-family: var(--font-serif);
  font-size: clamp(24px, 3.2vw, 38px);
  font-weight: 300;
  color: var(--color-white);
  line-height: 1.5;
  letter-spacing: 0.04em;
  margin-bottom: 20px;
}
.hero__title strong {
  font-weight: 700;
  color: #a8d8b0;
}
.hero__desc {
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  line-height: 2;
  max-width: 420px;
}
.hero__cover {
  position: relative;
  overflow: hidden;
  animation: fadeUp 0.7s 0.15s ease both;
}
.hero__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
}
.hero__cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, var(--color-navy2) 0%, transparent 30%);
}

/* ============================================================
   統計バー
   ============================================================ */
.stats-bar {
  background: var(--color-green2);
  border-bottom: 2px solid rgba(255,255,255,0.1);
}
.stats-bar .container {
  display: flex;
  justify-content: space-around;
}
.stat-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
}
.stat-item__num {
  font-family: var(--font-en);
  font-size: 32px;
  color: #d4edda;
  line-height: 1;
}
.stat-item__label {
  font-size: 11px;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.08em;
  line-height: 1.5;
}
.stat-divider {
  width: 1px;
  background: rgba(255,255,255,0.15);
  align-self: stretch;
  margin: 10px 0;
}

/* ============================================================
   セクション共通
   ============================================================ */
.section {
  padding: var(--section-padding) 24px;
}
.section--white  { background: var(--color-white); }
.section--cream  { background: var(--color-cream); }
.section--navy   { background: var(--color-navy); }
.section--green  { background: var(--color-green2); }

.section-header {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 36px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--color-border);
}
.section-header--dark {
  border-bottom-color: rgba(255,255,255,0.15);
}
.section-header__title {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 600;
  color: var(--color-navy);
  letter-spacing: 0.06em;
}
.section-header--dark .section-header__title { color: var(--color-white); }
.section-header__en {
  font-family: var(--font-en);
  font-size: 12px;
  color: var(--color-green);
  letter-spacing: 0.15em;
}
.section-header--dark .section-header__en { color: #a8d8b0; }
.section-header__more {
  margin-left: auto;
  font-size: 12px;
  color: var(--color-navy2);
  text-decoration: none;
  border-bottom: 1px solid var(--color-navy2);
  padding-bottom: 1px;
  letter-spacing: 0.05em;
  transition: color 0.2s, border-color 0.2s;
}
.section-header__more:hover { color: var(--color-green); border-color: var(--color-green); }

/* ============================================================
   お知らせ（WordPress posts_loop で出力）
   ============================================================ */
.news-banner {
  margin-bottom: 28px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--color-border);
}
.news-banner img { width: 100%; height: auto; }

.news-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 48px;
}
.news-list { display: flex; flex-direction: column; }

/* 投稿1件（.post や .hentry に対応） */
.news-item {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 12px;
  align-items: baseline;
  padding: 16px 8px;
  border-bottom: 1px solid var(--color-border);
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
  border-radius: 4px;
  margin: 0 -8px;
  opacity: 0;
  animation: fadeUp 0.4s ease forwards;
}
.news-item:nth-child(1) { animation-delay: 0.05s; }
.news-item:nth-child(2) { animation-delay: 0.10s; }
.news-item:nth-child(3) { animation-delay: 0.15s; }
.news-item:hover { background: var(--color-cream); }
.news-item:last-child { border-bottom: none; }

.news-item__date {
  font-family: var(--font-en);
  font-size: 12px;
  color: var(--color-green);
  white-space: nowrap;
}
.news-item__body {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.news-item__title {
  font-size: 13px;
  line-height: 1.6;
  color: var(--color-text);
}
.news-item:hover .news-item__title { color: var(--color-navy2); }

/* カテゴリタグ（WordPressカテゴリに対応） */
.cat-tag {
  display: inline-block;
  font-size: 9px;
  padding: 2px 7px;
  border-radius: 2px;
  letter-spacing: 0.05em;
  white-space: nowrap;
  font-weight: 500;
}
/* カテゴリ別色：管理画面でカテゴリに class を付与して使い分け */
.cat-tag--general  { background: #e8edf5; color: var(--color-navy2); }
.cat-tag--adoption { background: #f0ebe0; color: #7a5c1a; }
.cat-tag--guideline{ background: var(--color-green-lt); color: var(--color-green2); }
.cat-tag--policy   { background: #f0e8f0; color: #6b2d7a; }
.cat-tag--security { background: #ffe8e8; color: #7a1a1a; }

/* ============================================================
   構成二町カード
   ============================================================ */
.towns-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.town-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
  display: block;
  color: inherit;
  text-decoration: none;
}
.town-card:hover {
  box-shadow: 0 8px 24px rgba(26,39,68,0.1);
  transform: translateY(-2px);
}
.town-card__img {
  background: #f0f4f0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  height: 200px;
}
.town-card__img img {
  max-height: 140px;
  max-width: 100%;
  object-fit: contain;
}
.town-card__body {
  padding: 20px 24px;
  border-top: 3px solid var(--color-green);
}
.town-card__name {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 600;
  color: var(--color-navy);
  margin-bottom: 8px;
}
.town-card__desc {
  font-size: 12px;
  color: var(--color-gray);
  line-height: 1.8;
}

/* ============================================================
   概要セクション
   ============================================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.about-text p {
  font-size: 13.5px;
  line-height: 2;
  color: rgba(255,255,255,0.72);
  margin-bottom: 16px;
}
.about-cards { display: flex; flex-direction: column; gap: 14px; }

.info-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-left: 3px solid #a8d8b0;
  border-radius: 6px;
  padding: 18px 22px;
}
.info-card__title {
  font-family: var(--font-serif);
  font-size: 12px;
  font-weight: 600;
  color: #a8d8b0;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
}
.info-table { width: 100%; border-collapse: collapse; }
.info-table td {
  font-size: 12.5px;
  padding: 4px 0;
  vertical-align: top;
  color: rgba(255,255,255,0.7);
}
.info-table td:first-child {
  width: 90px;
  color: rgba(255,255,255,0.4);
  font-size: 11px;
}

/* ============================================================
   関連リンク
   ============================================================ */
.links-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.link-group {
  background: rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 20px 22px;
}
.link-group__title {
  font-family: var(--font-serif);
  font-size: 11px;
  font-weight: 600;
  color: #c8e6cc;
  letter-spacing: 0.2em;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}
.link-group ul { display: flex; flex-direction: column; gap: 8px; }
.link-group ul li a {
  font-size: 13px;
  color: rgba(255,255,255,0.75);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s;
}
.link-group ul li a::before {
  content: '→';
  font-size: 10px;
  color: #a8d8b0;
  transition: transform 0.2s;
}
.link-group ul li a:hover { color: #d4edda; }
.link-group ul li a:hover::before { transform: translateX(3px); }

/* ============================================================
   お問い合わせ
   ============================================================ */
.contact-box {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.contact-info { padding: 36px 40px; }
.contact-info__title {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 600;
  color: var(--color-navy);
  margin-bottom: 24px;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.contact-info__title img { height: 32px; width: auto; }

.contact-row {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 14px;
  align-items: flex-start;
}
.contact-row__label {
  width: 52px;
  font-size: 10px;
  color: var(--color-green);
  font-weight: 600;
  letter-spacing: 0.1em;
  padding-top: 3px;
  flex-shrink: 0;
}
.contact-row__value { color: #444; line-height: 1.7; }
.contact-row__value a { color: var(--color-navy2); }
.contact-row__value a:hover { text-decoration: underline; }

.contact-map {
  background: #e8edf5;
  position: relative;
  overflow: hidden;
  min-height: 280px;
}
/* Google Maps iframe を埋め込む場合 */
.contact-map iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}
/* iframe が無い場合のプレースホルダー */
.contact-map__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  color: var(--color-gray);
}
.contact-map::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(0deg, rgba(58,125,68,0.06) 0px, transparent 1px, transparent 32px),
    repeating-linear-gradient(90deg, rgba(58,125,68,0.06) 0px, transparent 1px, transparent 32px);
  pointer-events: none;
}

/* ============================================================
   ページ内コンテンツ（投稿・固定ページ）
   ============================================================ */
.page-header {
  background: var(--color-navy);
  padding: 40px 24px;
  border-bottom: 3px solid var(--color-green);
}
.page-header .container {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.page-header__breadcrumb {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.05em;
}
.page-header__breadcrumb a { color: rgba(255,255,255,0.6); }
.page-header__breadcrumb a:hover { color: #a8d8b0; }
.page-header__title {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 600;
  color: var(--color-white);
  letter-spacing: 0.06em;
}

/* 投稿本文 */
.entry-content {
  background: var(--color-white);
  border-radius: 8px;
  padding: 40px;
  font-size: 14px;
  line-height: 2;
  margin-top: 32px;
}
.entry-content h2 {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 600;
  color: var(--color-navy);
  margin: 32px 0 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--color-green-lt);
}
.entry-content h3 {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 600;
  color: var(--color-navy2);
  margin: 24px 0 12px;
  padding-left: 10px;
  border-left: 3px solid var(--color-green);
}
.entry-content p { margin-bottom: 16px; }
.entry-content ul, .entry-content ol {
  margin: 0 0 16px 24px;
  list-style: revert;
}
.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}
.entry-content table th,
.entry-content table td {
  border: 1px solid var(--color-border);
  padding: 10px 14px;
  font-size: 13px;
  text-align: left;
}
.entry-content table th {
  background: var(--color-green-lt);
  font-weight: 600;
  color: var(--color-navy);
}
.entry-content a { color: var(--color-navy2); text-decoration: underline; }
.entry-content a:hover { color: var(--color-green); }

/* ============================================================
   フッター
   ============================================================ */
.site-footer {
  background: #111827;
  padding: 28px 24px;
  border-top: 3px solid var(--color-green);
}
.site-footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.footer-logo img { height: 36px; width: auto; }
.footer-logo__name {
  font-family: var(--font-serif);
  font-size: 14px;
  color: rgba(255,255,255,0.8);
  letter-spacing: 0.06em;
}
.footer-copy {
  font-size: 11px;
  color: rgba(255,255,255,0.3);
  letter-spacing: 0.05em;
}

/* ============================================================
   ウィジェットエリア
   ============================================================ */
.widget-area { padding: 32px 0; }
.widget {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 20px;
}
.widget-title {
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 600;
  color: var(--color-navy);
  letter-spacing: 0.08em;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--color-green-lt);
}

/* ============================================================
   アニメーション
   ============================================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   WordPress アライメントクラス（エディタ互換）
   ============================================================ */
.alignleft  { float: left; margin: 0 20px 20px 0; }
.alignright { float: right; margin: 0 0 20px 20px; }
.aligncenter { text-align: center; margin: 0 auto 20px; display: block; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 12px; color: var(--color-gray); text-align: center; margin-top: 4px; }

/* ============================================================
   レスポンシブ
   ============================================================ */
@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero__cover { display: none; }
  .news-grid { grid-template-columns: 1fr; }
  .towns-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .links-grid { grid-template-columns: 1fr; }
  .contact-box { grid-template-columns: 1fr; }
  .stats-bar .container { flex-wrap: wrap; justify-content: center; gap: 0 24px; }
  .stat-divider { display: none; }
}

@media (max-width: 640px) {
  :root { --section-padding: 48px; }
  .site-nav { display: none; }
  .menu-toggle { display: block; }
  .site-nav.is-open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--color-navy);
    padding: 16px;
    border-bottom: 2px solid var(--color-green);
    z-index: 99;
  }
  .news-item { grid-template-columns: 96px 1fr; }
}
