/*
Theme Name: Komugien
Theme URI: https://komugien.com/
Author: Komugien Support
Description: こむぎえん専用。先生が投稿するだけでトップページが自動更新される軽量テーマです。
Version: 0.2.2
Requires at least: 6.6
Requires PHP: 8.1
Text Domain: komugien
*/

:root {
  --green: #3d8b37;
  --soft-green: #6bbf59;
  --pale-green: #e8f5df;
  --orange: #f18b4d;
  --yellow: #ffd44d;
  --cream: #fffaf0;
  --pink: #fff0f3;
  --blue: #edf8fc;
  --ink: #3f493e;
  --muted: #6f796d;
  --line: #e7eadf;
  --white: #fff;
  --shadow: 0 16px 42px rgba(73, 91, 60, .12);
  --round: 28px;
  --content: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: "Zen Maru Gothic", "M PLUS Rounded 1c", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  line-height: 1.8;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--green); }
button, input, textarea { font: inherit; }
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.site-shell { min-height: 100vh; }
.section-inner { width: min(calc(100% - 40px), var(--content)); margin-inline: auto; }
.section-label {
  margin-bottom: 8px;
  color: var(--orange);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.section-title {
  margin: 0;
  color: var(--green);
  font-family: "M PLUS Rounded 1c", sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.35;
}
.section-desc { max-width: 720px; margin: 16px auto 0; color: var(--muted); }
.section-heading { margin-bottom: 44px; text-align: center; }
.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 24px;
  border: 0;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 8px 22px rgba(61, 139, 55, .22);
}
.button:hover { background: #2f742b; color: #fff; transform: translateY(-1px); }

.site-header {
  position: fixed;
  z-index: 50;
  inset: 0 0 auto;
  background: rgba(255, 250, 240, .94);
  border-bottom: 1px solid rgba(61, 139, 55, .08);
  backdrop-filter: blur(12px);
}
.admin-bar .site-header { top: 32px; }
.header-inner {
  display: flex;
  width: min(calc(100% - 36px), var(--content));
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  margin-inline: auto;
  gap: 28px;
}
.site-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--green);
  font-family: "M PLUS Rounded 1c", sans-serif;
  font-size: 1.25rem;
  font-weight: 900;
  text-decoration: none;
}
.site-brand small {
  display: block;
  margin-top: -2px;
  color: #9a9f91;
  font-size: .62rem;
  font-weight: 600;
  letter-spacing: .02em;
}
.site-nav ul { display: flex; align-items: center; gap: 27px; margin: 0; padding: 0; list-style: none; }
.site-nav a { color: #60695d; font-size: .86rem; font-weight: 700; text-decoration: none; }
.site-nav a:hover { color: var(--green); }
.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--pale-green);
  color: var(--green);
  font-size: 1.25rem;
}

.hero {
  position: relative;
  min-height: 780px;
  padding: 132px 20px 88px;
  overflow: hidden;
  background: linear-gradient(150deg, #eaf9df 0%, #fff9df 70%, #fff1d1 100%);
}
.hero::before, .hero::after {
  position: absolute;
  content: "";
  border-radius: 50%;
  filter: blur(1px);
}
.hero::before { width: 140px; height: 140px; top: 140px; left: -45px; background: rgba(255, 212, 77, .2); }
.hero::after { width: 190px; height: 190px; right: -90px; bottom: 110px; background: rgba(126, 203, 240, .18); }
.hero-inner { position: relative; z-index: 1; width: min(100%, 800px); margin-inline: auto; text-align: center; }
.hero-photo {
  width: min(100%, 670px);
  aspect-ratio: 16 / 9;
  margin: 0 auto 38px;
  overflow: hidden;
  border: 6px solid rgba(255, 255, 255, .95);
  border-radius: 26px;
  box-shadow: var(--shadow);
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero h1 {
  margin: 0;
  color: #74af74;
  font-family: "M PLUS Rounded 1c", sans-serif;
  font-size: clamp(2rem, 5.4vw, 3.6rem);
  font-weight: 900;
  line-height: 1.55;
  letter-spacing: .03em;
}
.hero h1 strong { color: var(--orange); }
.hero-lead { max-width: 770px; margin: 22px auto 0; color: #64715f; font-size: .98rem; }
.hero-badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 26px; }
.hero-badge { padding: 7px 15px; border-radius: 999px; background: rgba(255,255,255,.78); font-size: .8rem; font-weight: 800; box-shadow: 0 4px 12px rgba(54,81,46,.08); }

.latest { padding: 76px 0; background: #fff; }
.latest-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.latest-card {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 20px;
  min-height: 150px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 6px 22px rgba(60, 75, 52, .06);
}
.latest-card:hover { border-color: #bfdcb9; transform: translateY(-2px); }
.latest-thumb { overflow: hidden; border-radius: 16px; background: var(--pale-green); }
.latest-thumb img { width: 100%; height: 100%; object-fit: cover; }
.latest-meta { color: var(--muted); font-size: .75rem; }
.latest-card h3 { margin: 8px 0 5px; color: var(--green); font-size: 1.05rem; line-height: 1.55; }
.latest-card p { margin: 0; color: var(--muted); font-size: .84rem; line-height: 1.65; }

.features { padding: 100px 0; background: #fff; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.feature-card { overflow: hidden; border-radius: var(--round); background: var(--cream); box-shadow: 0 10px 28px rgba(73, 91, 60, .08); }
.feature-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.feature-body { padding: 24px 24px 28px; }
.feature-body h3 { margin: 0 0 10px; color: var(--green); font-size: 1.17rem; }
.feature-body p { margin: 0; color: var(--muted); font-size: .9rem; }

.policy { padding: 100px 0; background: var(--cream); }
.policy-stack { display: grid; gap: 28px; }
.policy-card {
  display: grid;
  grid-template-columns: 42% 1fr;
  overflow: hidden;
  border-radius: var(--round);
  background: #fff;
  box-shadow: var(--shadow);
}
.policy-card:nth-child(even) { grid-template-columns: 1fr 42%; }
.policy-card:nth-child(even) .policy-photo { order: 2; }
.policy-photo img { width: 100%; height: 100%; min-height: 330px; object-fit: cover; }
.policy-copy { display: flex; flex-direction: column; justify-content: center; padding: 42px; }
.policy-copy h3 { margin: 0 0 14px; color: var(--green); font-size: 1.4rem; }
.policy-copy p { margin: 0; color: var(--muted); }

.schedule { padding: 100px 0; background: #fff; }
.timeline { position: relative; max-width: 830px; margin: 0 auto; }
.timeline::before { position: absolute; content: ""; width: 3px; top: 10px; bottom: 10px; left: 76px; background: linear-gradient(var(--soft-green), var(--yellow), #f5a0b2); border-radius: 3px; }
.time-row { position: relative; display: grid; grid-template-columns: 58px 44px 1fr; gap: 14px; align-items: start; margin: 0 0 28px; }
.time { padding-top: 7px; color: var(--orange); font-size: .82rem; font-weight: 900; text-align: right; }
.time-icon { z-index: 1; display: grid; width: 44px; height: 44px; place-items: center; border: 4px solid #fff; border-radius: 50%; background: var(--pale-green); font-size: 1.25rem; }
.time-copy { padding: 5px 0 0 6px; }
.time-copy h3 { margin: 0 0 4px; color: var(--green); font-size: 1.02rem; }
.time-copy p { margin: 0; color: var(--muted); font-size: .87rem; }

.daily-life { padding: 100px 0; background: var(--cream); }
.life-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.life-card { padding: 12px 12px 20px; border-radius: 999px 999px 32px 32px; background: #fff; text-align: center; box-shadow: 0 9px 28px rgba(72, 90, 62, .08); }
.life-card img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 50%; }
.life-card h3 { margin: 14px 0 5px; color: var(--green); font-size: .98rem; }
.life-card p { margin: 0; color: var(--muted); font-size: .76rem; line-height: 1.6; }

.temporary { padding: 0 0 90px; background: var(--cream); }
.temporary-card { display: grid; max-width: 760px; grid-template-columns: 150px 1fr; gap: 28px; align-items: center; margin-inline: auto; padding: 26px; border-radius: 24px; background: #fff; box-shadow: 0 8px 25px rgba(72,90,62,.08); }
.temporary-card img { width: 150px; height: 150px; object-fit: cover; border-radius: 18px; }
.temporary-card h3 { margin: 0 0 8px; color: var(--orange); }
.temporary-card p { margin: 0; color: var(--muted); }

.admission { padding: 100px 0; background: #fff; }
.info-table { width: min(100%, 830px); margin: 0 auto 36px; border-collapse: collapse; overflow: hidden; border-radius: 20px; box-shadow: 0 8px 30px rgba(64,79,57,.07); }
.info-table th, .info-table td { padding: 18px 22px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.info-table th { width: 28%; background: var(--pale-green); color: var(--green); font-size: .86rem; }
.info-table td { background: #fff; }
.info-table small { display: block; margin-top: 3px; color: var(--muted); }
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; max-width: 900px; margin: 34px auto; }
.contact-card { padding: 24px 18px; border-radius: 20px; background: var(--cream); color: var(--ink); text-align: center; text-decoration: none; }
.contact-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.contact-card strong { display: block; margin-top: 5px; color: var(--green); word-break: break-word; }
.contact-card small { color: var(--muted); }
.map { max-width: 900px; height: 380px; margin: 36px auto 0; overflow: hidden; border-radius: 24px; box-shadow: var(--shadow); }
.map iframe { width: 100%; height: 100%; border: 0; }

.content-wrap { width: min(calc(100% - 40px), 860px); margin: 0 auto; padding: 140px 0 90px; }
.content-header { margin-bottom: 36px; text-align: center; }
.content-header h1 { margin: 0; color: var(--green); font-size: clamp(1.8rem, 4vw, 2.8rem); line-height: 1.45; }
.content-meta { margin-top: 10px; color: var(--muted); font-size: .82rem; }
.entry-thumbnail { margin: 0 0 34px; overflow: hidden; border-radius: 24px; box-shadow: var(--shadow); }
.entry-content { font-family: "Zen Maru Gothic", sans-serif; font-size: 1rem; }
.entry-content h2 { margin: 2.5em 0 .8em; padding: 10px 15px; border-left: 6px solid var(--soft-green); color: var(--green); background: var(--pale-green); border-radius: 0 14px 14px 0; }
.entry-content h3 { margin: 2em 0 .7em; color: var(--green); }
.entry-content p, .entry-content ul, .entry-content ol { margin: 0 0 1.4em; }
.entry-content img { border-radius: 18px; }
.post-list { display: grid; gap: 20px; }
.post-list article { padding: 24px; border: 1px solid var(--line); border-radius: 20px; }
.post-list h2 { margin: 0; font-size: 1.3rem; }
.post-list h2 a { color: var(--green); text-decoration: none; }
.pagination { margin-top: 40px; }

.site-footer { padding: 58px 20px; background: var(--green); color: rgba(255,255,255,.86); text-align: center; }
.footer-brand { color: #fff; font-size: 1.24rem; font-weight: 900; }
.footer-info { margin: 14px 0; font-size: .82rem; line-height: 1.9; }
.footer-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin: 18px 0; }
.footer-nav a { color: #fff; font-size: .8rem; }
.copyright { color: rgba(255,255,255,.66); font-size: .72rem; }

.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .site-nav { position: absolute; top: 76px; right: 18px; display: none; width: min(330px, calc(100vw - 36px)); padding: 18px; border-radius: 18px; background: #fff; box-shadow: var(--shadow); }
  .site-nav.is-open { display: block; }
  .site-nav ul { display: grid; gap: 0; }
  .site-nav a { display: block; padding: 11px 8px; }
  .menu-toggle { display: grid; place-items: center; }
  .feature-grid { grid-template-columns: 1fr; max-width: 650px; margin-inline: auto; }
  .feature-card { display: grid; grid-template-columns: 42% 1fr; }
  .feature-card img { height: 100%; aspect-ratio: auto; }
  .life-grid { grid-template-columns: repeat(3, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .header-inner { min-height: 68px; }
  .site-brand { font-size: 1.08rem; }
  .site-brand small { font-size: .56rem; }
  .site-nav { top: 68px; }
  .hero { min-height: auto; padding: 104px 16px 70px; }
  .hero-photo { margin-bottom: 28px; border-width: 4px; border-radius: 20px; }
  .hero h1 { font-size: clamp(1.7rem, 8vw, 2.45rem); }
  .hero-lead { font-size: .86rem; text-align: left; }
  .latest, .features, .policy, .schedule, .daily-life, .admission { padding: 76px 0; }
  .latest-list { grid-template-columns: 1fr; }
  .latest-card { grid-template-columns: 110px 1fr; gap: 14px; min-height: 122px; padding: 12px; }
  .latest-card p { display: none; }
  .feature-card { display: block; }
  .feature-card img { aspect-ratio: 4 / 3; }
  .policy-card, .policy-card:nth-child(even) { grid-template-columns: 1fr; }
  .policy-card:nth-child(even) .policy-photo { order: 0; }
  .policy-photo img { min-height: 220px; max-height: 280px; }
  .policy-copy { padding: 28px 24px 32px; }
  .timeline::before { left: 66px; }
  .time-row { grid-template-columns: 48px 44px 1fr; gap: 8px; }
  .life-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .life-card:last-child { grid-column: 1 / -1; max-width: 230px; margin-inline: auto; }
  .temporary-card { grid-template-columns: 96px 1fr; gap: 18px; padding: 18px; margin-inline: 20px; }
  .temporary-card img { width: 96px; height: 96px; }
  .temporary-card h3 { font-size: 1rem; }
  .temporary-card p { font-size: .82rem; }
  .info-table th, .info-table td { display: block; width: 100%; padding: 13px 16px; }
  .info-table th { padding-bottom: 4px; border-bottom: 0; }
  .map { height: 310px; }
  .content-wrap { padding-top: 112px; }
}

@media (max-width: 782px) {
  .admin-bar .site-header { top: 46px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
