/*
Theme Name: 埼玉塾ナビ
Theme URI: https://example.com/
Author: Codex
Description: 埼玉県の塾・予備校比較サイト向けオリジナルテーマ
Version: 1.0.0
Text Domain: saitama-juku-guide
*/

:root {
  --orange: #f26b21;
  --orange-dark: #d94f0b;
  --orange-soft: #fff3e8;
  --orange-pale: #fffaf5;
  --yellow: #ffc84a;
  --green: #159a78;
  --ink: #26221f;
  --muted: #6f6964;
  --line: #e8e1da;
  --white: #fff;
  --shadow: 0 12px 32px rgba(80, 48, 25, .1);
  --max: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Noto Sans JP", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  line-height: 1.8;
  letter-spacing: 0;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button, select, input { font: inherit; }
.container { width: min(calc(100% - 32px), var(--max)); margin-inline: auto; }
.section { padding: 72px 0; }
.section--soft { background: var(--orange-pale); }
.section--gray { background: #f7f6f4; }
.section-heading { margin-bottom: 30px; text-align: center; }
.section-heading__eyebrow { margin: 0 0 4px; color: var(--orange-dark); font-size: 13px; font-weight: 800; }
.section-heading h2 { margin: 0; font-size: clamp(25px, 3vw, 36px); line-height: 1.45; }
.section-heading p { margin: 10px auto 0; max-width: 680px; color: var(--muted); }
.button {
  display: inline-flex; min-height: 48px; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 22px; border: 0; border-radius: 6px; background: var(--orange); color: #fff;
  font-weight: 800; cursor: pointer; transition: .2s ease;
}
.button:hover { background: var(--orange-dark); transform: translateY(-1px); }
.button--outline { border: 1px solid var(--orange); background: #fff; color: var(--orange-dark); }
.button--outline:hover { background: var(--orange-soft); }
.dashicons { width: auto; height: auto; font-size: 21px; }

.site-header {
  position: sticky; z-index: 50; top: 0; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.97);
}
.header-top { background: var(--orange); color: #fff; font-size: 12px; text-align: center; }
.header-top .container { padding-block: 4px; }
.header-main { display: flex; min-height: 70px; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 900; line-height: 1.25; }
.brand__mark {
  display: grid; width: 40px; height: 40px; place-items: center; border-radius: 6px;
  background: var(--orange); color: #fff;
}
.brand small { display: block; color: var(--muted); font-size: 10px; font-weight: 700; }
.main-nav { display: flex; align-items: center; gap: 24px; font-size: 14px; font-weight: 700; }
.main-nav a:hover { color: var(--orange-dark); }
.menu-toggle { display: none; border: 0; background: transparent; cursor: pointer; }

.hero { position: relative; overflow: hidden; min-height: 620px; background: #f5eee6; }
.hero__image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero::after { content: ""; position: absolute; inset: 0; background: rgba(255,255,255,.42); }
.hero__inner { position: relative; z-index: 2; display: flex; min-height: 620px; align-items: center; }
.hero__copy { width: min(620px, 58%); padding: 54px 0 170px; text-shadow: 0 1px 12px rgba(255,255,255,.9); }
.hero__label { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 16px; padding: 5px 10px; border-radius: 4px; background: var(--orange-soft); color: var(--orange-dark); font-size: 13px; font-weight: 800; }
.hero h1 { margin: 0; font-size: clamp(34px, 5vw, 58px); line-height: 1.35; }
.hero h1 strong { color: var(--orange-dark); }
.hero__lead { max-width: 560px; margin: 18px 0 0; font-size: 16px; font-weight: 600; }
.hero__checks { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 18px 0 0; padding: 0; list-style: none; font-size: 14px; font-weight: 700; }
.hero__checks li::before { content: "✓"; margin-right: 5px; color: var(--green); }

.search-panel {
  position: relative; z-index: 5; width: min(calc(100% - 32px), var(--max)); margin: -138px auto 0;
  padding: 25px; border: 1px solid #f1d7c3; border-radius: 8px; background: #fff; box-shadow: var(--shadow);
}
.search-panel__title { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 0 18px; font-size: 22px; }
.search-grid { display: grid; grid-template-columns: repeat(4, 1fr) 148px; gap: 10px; }
.search-field label { display: block; margin-bottom: 4px; font-size: 12px; font-weight: 800; }
.search-field select {
  width: 100%; height: 50px; padding: 0 12px; border: 1px solid #d9d1ca; border-radius: 5px; background: #fff; color: var(--ink);
}
.search-grid .button { align-self: end; height: 50px; }
.search-panel__quick { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 16px; }
.search-panel__quick a { padding: 5px 11px; border-radius: 4px; background: var(--orange-soft); color: #9a420e; font-size: 12px; font-weight: 700; }

.feature-strip { padding: 40px 0 18px; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature {
  display: flex; align-items: center; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: 7px; background: #fff;
}
.feature__icon { display: grid; flex: 0 0 48px; height: 48px; place-items: center; border-radius: 50%; background: var(--orange-soft); color: var(--orange-dark); }
.feature strong { display: block; font-size: 15px; }
.feature span { display: block; color: var(--muted); font-size: 12px; }

.grade-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grade-card { position: relative; overflow: hidden; min-height: 240px; padding: 26px; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: 0 8px 22px rgba(70,50,35,.06); }
.grade-card::after { content: ""; position: absolute; right: -30px; bottom: -55px; width: 160px; height: 160px; border-radius: 50%; background: var(--orange-soft); }
.grade-card:nth-child(2)::after { background: #fff4cb; }
.grade-card:nth-child(3)::after { background: #e8f7f2; }
.grade-card__icon { position: relative; z-index: 1; color: var(--orange-dark); }
.grade-card h3 { position: relative; z-index: 1; margin: 10px 0 4px; font-size: 23px; }
.grade-card p { position: relative; z-index: 1; margin: 0 0 14px; color: var(--muted); font-size: 13px; }
.link-list { position: relative; z-index: 1; display: grid; gap: 4px; padding: 0; list-style: none; font-size: 13px; font-weight: 700; }
.link-list a::after { content: "›"; margin-left: 5px; color: var(--orange); }

.area-layout { display: grid; grid-template-columns: 1fr 1.5fr; gap: 28px; }
.area-map {
  display: grid; min-height: 370px; place-items: center; border-radius: 8px;
  background: #fff3e8; color: var(--orange-dark); text-align: center;
}
.area-map__shape { position: relative; display: grid; width: 210px; height: 240px; place-items: center; background: var(--orange); color: #fff; clip-path: polygon(33% 3%, 74% 10%, 96% 40%, 80% 86%, 46% 100%, 8% 75%, 2% 36%); }
.area-map__shape strong { font-size: 23px; }
.area-map__shape span { display: block; font-size: 12px; }
.city-groups { display: grid; gap: 14px; }
.city-group { padding: 18px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.city-group h3 { margin: 0 0 10px; font-size: 16px; }
.city-links { display: flex; flex-wrap: wrap; gap: 7px; }
.city-links a { padding: 5px 10px; border: 1px solid #ead4c4; border-radius: 4px; color: #73401e; font-size: 12px; font-weight: 700; }
.city-links a:hover { background: var(--orange-soft); }

.ranking-list { display: grid; gap: 18px; }
.ranking-card {
  position: relative; display: grid; grid-template-columns: 64px 120px 1fr auto; align-items: center; gap: 20px;
  padding: 20px; border: 1px solid var(--line); border-radius: 8px; background: #fff;
}
.rank { display: grid; width: 50px; height: 50px; place-items: center; border-radius: 50%; background: #f4eee8; font-size: 20px; font-weight: 900; }
.ranking-card:first-child .rank { background: #fff1bb; color: #8a6500; }
.ranking-card:nth-child(2) .rank { background: #eceff1; color: #54616a; }
.ranking-card:nth-child(3) .rank { background: #f3dfd2; color: #8c4c25; }
.school-logo { display: grid; min-height: 70px; place-items: center; border-radius: 6px; background: var(--orange-soft); color: var(--orange-dark); font-weight: 900; text-align: center; line-height: 1.3; }
.ranking-card h3 { margin: 0; font-size: 20px; }
.ranking-card p { margin: 4px 0 7px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tag { padding: 2px 7px; border-radius: 3px; background: #f3f1ef; color: #5b5652; font-size: 11px; font-weight: 700; }

.purpose-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.purpose-card { padding: 20px; border: 1px solid var(--line); border-radius: 7px; background: #fff; text-align: center; }
.purpose-card .dashicons { color: var(--orange-dark); font-size: 30px; }
.purpose-card h3 { margin: 9px 0 3px; font-size: 15px; }
.purpose-card p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.6; }

.article-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.article-card { overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.article-card__image { display: grid; aspect-ratio: 16 / 9; place-items: center; background: var(--orange-soft); color: var(--orange-dark); }
.article-card__body { padding: 16px; }
.article-card__category { color: var(--orange-dark); font-size: 11px; font-weight: 800; }
.article-card h3 { margin: 5px 0 7px; font-size: 16px; line-height: 1.6; }
.article-card p { margin: 0; color: var(--muted); font-size: 12px; }

.cta { padding: 62px 0; background: var(--orange); color: #fff; text-align: center; }
.cta h2 { margin: 0; font-size: clamp(25px, 4vw, 38px); }
.cta p { margin: 8px 0 22px; }
.cta .button { background: #fff; color: var(--orange-dark); }

.site-footer { padding: 44px 0 20px; background: #2c2825; color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 30px; }
.footer-grid h3 { margin: 0 0 12px; font-size: 14px; }
.footer-grid ul { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; color: #d5ceca; font-size: 12px; }
.footer-about { color: #d5ceca; font-size: 12px; }
.copyright { margin-top: 34px; padding-top: 18px; border-top: 1px solid #4a4440; color: #b8afaa; font-size: 11px; text-align: center; }

@media (max-width: 900px) {
  .main-nav { display: none; position: absolute; top: 100%; right: 0; left: 0; padding: 20px; border-bottom: 1px solid var(--line); background: #fff; }
  .main-nav.is-open { display: grid; }
  .menu-toggle { display: block; }
  .hero { min-height: 630px; }
  .hero::after { background: rgba(255,255,255,.82); }
  .hero__inner { min-height: 630px; }
  .hero__copy { width: 100%; padding-bottom: 200px; }
  .search-grid { grid-template-columns: 1fr 1fr; }
  .search-grid .button { grid-column: span 2; }
  .grade-grid, .article-grid { grid-template-columns: 1fr; }
  .area-layout { grid-template-columns: 1fr; }
  .purpose-grid { grid-template-columns: 1fr 1fr; }
  .ranking-card { grid-template-columns: 50px 90px 1fr; }
  .ranking-card .button { grid-column: 2 / -1; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 620px) {
  .section { padding: 52px 0; }
  .brand { font-size: 18px; }
  .hero { min-height: 650px; }
  .hero__inner { min-height: 650px; align-items: flex-start; }
  .hero__copy { padding-top: 54px; }
  .hero h1 { font-size: 34px; }
  .hero__lead { font-size: 14px; }
  .search-panel { margin-top: -162px; padding: 18px; }
  .search-panel__title { font-size: 18px; }
  .search-grid { grid-template-columns: 1fr; }
  .search-grid .button { grid-column: auto; }
  .feature-grid, .purpose-grid, .footer-grid { grid-template-columns: 1fr; }
  .area-map { min-height: 300px; }
  .ranking-card { grid-template-columns: 44px 1fr; gap: 12px; }
  .school-logo { grid-column: 2; min-height: 56px; }
  .ranking-card__content { grid-column: 1 / -1; }
  .ranking-card .button { grid-column: 1 / -1; }
}
