/* ==========================================================================
   KEC LP common stylesheet
   Shared by header.php / footer.php and every LP page that includes them.
   Layout is fixed at a smartphone width (580px) and is intentionally
   non-responsive — see index.html <meta name="viewport"> for how narrower
   real devices are scaled down to fit.
   ========================================================================== */

:root {
  --navy: #1557aa;
  --blue: #0068b7;
  --blue-dark: #02518d;
  --sky: #5ebfdb;
  --yellow: #ffd800;
  --yellow-text: #846100;
  --pink: #da7f97;
  --border-dotted: #cfdded;
  --copy-navy: #092a5e;
  --frame-width: 580px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: #dfeaf4;
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", sans-serif;
  -webkit-font-smoothing: antialiased;
  color: #22303f;
}
a { color: var(--blue); text-decoration: none; }
a:hover { color: #f29100; }
ul { margin: 0; padding: 0; list-style: none; }
img { max-width: 100%; }

/* ---------- page frame ---------- */
.lp-page-bg {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  background: #dfeaf4;
}
.lp-frame {
  width: var(--frame-width);
  max-width: 100%;
  background: #fff;
  box-shadow: 0 0 40px rgba(20, 50, 100, 0.16);
  display: flex;
  flex-direction: column;
  position: relative;
}

/* ---------- shared icon ---------- */
.icn-arrow-down {
  width: 13px;
  height: 8px;
  flex: 0 0 auto;
  transition: transform 0.3s ease;
}
.icn-arrow-circle {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border-radius: 100%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}
.icn-ext {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
}

/* =========================================================================
   HEADER
   ========================================================================= */
#header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: #fff;
  box-shadow: 0 2px 8px rgba(20, 50, 100, 0.1);
}
#header .header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 9px 8px 9px 10px;
}
#header .header .logo { margin: 0; display: flex; align-items: center; min-width: 0; }
#header .header .logo a { display: flex; align-items: center; gap: 5px; min-width: 0; }
#header .header .logo img { display: block; width: 330px; max-width: 100%; height: auto; min-width: 0; }

#header .header-nav { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
#header .btn-login { margin: 0; }
#header .btn-login a { display: flex; flex-direction: column; align-items: center; gap: 1px; }
#header .btn-login a span { font-size: 8px; font-weight: 700; color: var(--blue); line-height: 1; }

#header .sp-btn.menu {
  width: 40px;
  height: 40px;
  border: 2px solid var(--blue);
  border-radius: 100%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
#header .sp-btn.menu .menu-line { display: flex; flex-direction: column; gap: 4px; }
#header .sp-btn.menu .menu-line span {
  display: block;
  width: 18px;
  height: 2px;
  background: linear-gradient(270deg, #205eab, #5ab6d4);
  transition: transform 0.3s, opacity 0.3s;
}
#header .sp-btn.menu.active .menu-line-top { transform: translateY(6px) rotate(45deg); }
#header .sp-btn.menu.active .menu-line-center { opacity: 0; }
#header .sp-btn.menu.active .menu-line-bottom { transform: translateY(-6px) rotate(-45deg); }

/* class-nav: 4 color tabs */
#gnav-wrap { position: relative; }
#gnav-wrap .class-nav {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
#gnav-wrap .class-nav > li { display: flex; }
#gnav-wrap .class-nav > li > button,
#gnav-wrap .class-nav > li > a {
  appearance: none;
  border: none;
  margin: 0;
  flex: 1;
  padding: 9px 2px 7px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  font-family: inherit;
}
#gnav-wrap .class-nav > li > button span,
#gnav-wrap .class-nav > li > a span:first-of-type { font-size: 12px; font-weight: 900; line-height: 1.2; }
#gnav-wrap .class-nav > li.lower > button { background: var(--yellow); }
#gnav-wrap .class-nav > li.lower > button span { color: var(--yellow-text); }
#gnav-wrap .class-nav > li.lower > button .icn-arrow-down path { stroke: var(--yellow-text); }
#gnav-wrap .class-nav > li.lower.active > button { background: #e1c020; }
#gnav-wrap .class-nav > li.lower.active > button .icn-arrow-down { transform: rotate(180deg); }

#gnav-wrap .class-nav > li.primary > button { background: var(--sky); }
#gnav-wrap .class-nav > li.primary > button span { color: #fff; }
#gnav-wrap .class-nav > li.primary > button .icn-arrow-down path { stroke: #fff; }
#gnav-wrap .class-nav > li.primary.active > button { background: #42accb; }
#gnav-wrap .class-nav > li.primary.active > button .icn-arrow-down { transform: rotate(180deg); }

#gnav-wrap .class-nav > li.middle > button { background: var(--pink); }
#gnav-wrap .class-nav > li.middle > button span { color: #fff; }
#gnav-wrap .class-nav > li.middle > button .icn-arrow-down path { stroke: #fff; }
#gnav-wrap .class-nav > li.middle.active > button { background: #c96b84; }
#gnav-wrap .class-nav > li.middle.active > button .icn-arrow-down { transform: rotate(180deg); }

#gnav-wrap .class-nav > li.class-list > a { background: var(--navy); padding: 6px 2px 7px; gap: 1px; }
#gnav-wrap .class-nav > li.class-list > a span { color: #fff; }

/* tab panels under the 4 color tabs */
#gnav-wrap .tab-panel { display: none; }
#gnav-wrap .tab-panel.active { display: block; }
#gnav-wrap .tab-panel li { border-top: 1px dotted rgba(21, 87, 170, 0.35); }
#gnav-wrap .tab-panel a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 14.5px;
  font-weight: 700;
  padding: 16px;
}
#gnav-wrap .tab-panel a:hover { opacity: 0.75; }
#gnav-wrap .tab-panel[data-tab-panel="lower"] { background: var(--yellow); }
#gnav-wrap .tab-panel[data-tab-panel="lower"] a,
#gnav-wrap .tab-panel[data-tab-panel="lower"] a:hover { color: var(--navy); }
#gnav-wrap .tab-panel[data-tab-panel="lower"] .icn-arrow-circle { border: 1px solid var(--navy); }
#gnav-wrap .tab-panel[data-tab-panel="lower"] .icn-arrow-circle path { stroke: var(--navy); }
#gnav-wrap .tab-panel[data-tab-panel="primary"],
#gnav-wrap .tab-panel[data-tab-panel="middle"] { }
#gnav-wrap .tab-panel[data-tab-panel="primary"] { background: var(--sky); }
#gnav-wrap .tab-panel[data-tab-panel="middle"] { background: var(--pink); }
#gnav-wrap .tab-panel[data-tab-panel="primary"] li,
#gnav-wrap .tab-panel[data-tab-panel="middle"] li { border-top: 1px dotted rgba(255, 255, 255, 0.6); }
#gnav-wrap .tab-panel[data-tab-panel="primary"] a,
#gnav-wrap .tab-panel[data-tab-panel="primary"] a:hover,
#gnav-wrap .tab-panel[data-tab-panel="middle"] a,
#gnav-wrap .tab-panel[data-tab-panel="middle"] a:hover { color: #fff; }
#gnav-wrap .tab-panel[data-tab-panel="primary"] .icn-arrow-circle,
#gnav-wrap .tab-panel[data-tab-panel="middle"] .icn-arrow-circle { border: 1px solid #fff; }
#gnav-wrap .tab-panel[data-tab-panel="primary"] .icn-arrow-circle path,
#gnav-wrap .tab-panel[data-tab-panel="middle"] .icn-arrow-circle path { stroke: #fff; }

/* hamburger drawer */
#gnav-wrap .drawer {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  max-height: calc(100vh - 96px);
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.97);
  border-top: 1px solid #dbe7f3;
  box-shadow: 0 16px 24px rgba(20, 50, 100, 0.18);
  padding: 16px 16px 24px;
}
#gnav-wrap .drawer.active { display: block; }

#gnav-wrap .drawer .gnav { display: flex; flex-direction: column; gap: 10px; }
#gnav-wrap .drawer .gnav > li > a,
#gnav-wrap .drawer .gnav > li > button {
  appearance: none;
  border: 2px solid var(--blue);
  border-radius: 8px;
  background: #fff;
  font-size: 15px;
  font-weight: 600;
  color: var(--blue);
  padding: 15px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  font-family: inherit;
}
#gnav-wrap .drawer .gnav > li > a:hover,
#gnav-wrap .drawer .gnav > li > button:hover { background: #e5eef6; color: var(--blue); }
#gnav-wrap .drawer .gnav .icn-arrow-circle { border: 1px solid #1068b7; }
#gnav-wrap .drawer .gnav .icn-arrow-circle path { stroke: #1068b7; }
#gnav-wrap .drawer .gnav > li.accordion > .accordion-panel {
  display: none;
  margin: 8px 0 0;
  padding: 0 0 0 14px;
  border-left: 1px dotted var(--blue);
}
#gnav-wrap .drawer .gnav > li.accordion.active > .accordion-panel { display: flex; flex-direction: column; }
#gnav-wrap .drawer .gnav > li.accordion.active > button .icn-arrow-circle { transform: rotate(90deg); }
#gnav-wrap .drawer .gnav > li.accordion > .accordion-panel.grid-2 { display: none; grid-template-columns: 1fr 1fr; }
#gnav-wrap .drawer .gnav > li.accordion.active > .accordion-panel.grid-2 { display: grid; }
#gnav-wrap .drawer .gnav .accordion-panel li { border-bottom: 1px dotted #cfdded; }
#gnav-wrap .drawer .gnav .accordion-panel a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--navy);
  padding: 12px 4px;
}

/* drawer: 4 curriculum blocks (always expanded) */
#gnav-wrap .drawer .class-nav-list { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
#gnav-wrap .drawer .class-nav-list > li > p {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  padding: 15px;
}
#gnav-wrap .drawer .class-nav-list > li > ul {
  margin: 8px 0 0;
  padding: 0 0 0 14px;
  display: flex;
  flex-direction: column;
}
#gnav-wrap .drawer .class-nav-list > li > ul li { border-bottom: 1px dotted #cfdded; }
#gnav-wrap .drawer .class-nav-list > li > ul a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
  padding: 13px 4px;
}
#gnav-wrap .drawer .class-nav-list > li.lower > p { background: var(--yellow); color: var(--yellow-text); }
#gnav-wrap .drawer .class-nav-list > li.lower > ul { border-left: 3px solid var(--yellow); }
#gnav-wrap .drawer .class-nav-list > li.lower > p .icn-arrow-circle { border-color: var(--yellow-text); }
#gnav-wrap .drawer .class-nav-list > li.lower > p .icn-arrow-circle path { stroke: var(--yellow-text); }
#gnav-wrap .drawer .class-nav-list > li.primary > p,
#gnav-wrap .drawer .class-nav-list > li.middle > p,
#gnav-wrap .drawer .class-nav-list > li.seminar > p { color: #fff; }
#gnav-wrap .drawer .class-nav-list > li.primary > p { background: var(--sky); }
#gnav-wrap .drawer .class-nav-list > li.primary > ul { border-left: 3px solid var(--sky); }
#gnav-wrap .drawer .class-nav-list > li.middle > p { background: var(--pink); }
#gnav-wrap .drawer .class-nav-list > li.middle > ul { border-left: 3px solid var(--pink); }
#gnav-wrap .drawer .class-nav-list > li.seminar > p { background: var(--navy); }
#gnav-wrap .drawer .class-nav-list > li.seminar > ul { border-left: 3px solid var(--navy); }
#gnav-wrap .drawer .class-nav-list > li p .icn-arrow-circle { border: 1px solid var(--navy); background: #fff; }
#gnav-wrap .drawer .class-nav-list > li p .icn-arrow-circle path { stroke: var(--navy); }

#gnav-wrap .drawer .form-wrap {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  border-radius: 10px;
  overflow: hidden;
  margin: 0;
}
#gnav-wrap .drawer .form-wrap li { display: flex; }
#gnav-wrap .drawer .form-wrap a {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}
#gnav-wrap .drawer .form-wrap a:hover { opacity: 0.85; color: #fff; }
#gnav-wrap .drawer .form-wrap .nav-report { background: linear-gradient(90deg, var(--blue-dark), var(--blue)); }
#gnav-wrap .drawer .form-wrap .nav-request { background: linear-gradient(90deg, #f0712b, #f0932b); }
#gnav-wrap .drawer .form-wrap .nav-contact { background: linear-gradient(90deg, #278caf, #5ab6d4); }

.header-foot {
  margin-top: 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.header-foot figure.logo { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.header-foot figure.logo img { display: block; width: 135px; height: auto; }
.header-foot figcaption { margin: 0; font-size: 14px; line-height: 1.667; color: #333; text-align: center; }
.header-foot figcaption .accent { color: #c00; font-weight: 400; }
.header-foot .copy { margin: 8px 0 0; font-size: 12px; color: var(--copy-navy); text-align: center; }

/* =========================================================================
   GROUP LIST WIDGET (KECグループ一覧) — shared by header drawer + footer
   ========================================================================= */
.group-widget { }
.group-widget .ttl { margin: 0 0 12px; font-size: 20px; font-weight: 700; color: var(--navy); text-align: center; }
.group-widget .select-wrap { border: 1px solid var(--blue); background: #fff; overflow: hidden; }
.group-widget .group-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 13px 14px;
  cursor: pointer;
  width: 100%;
  appearance: none;
  border: none;
  background: none;
  font-family: inherit;
}
.group-widget .group-btn span { font-size: 15px; font-weight: 700; color: var(--navy); }
.group-widget .group-btn svg { width: 20px; height: 20px; flex: 0 0 auto; transition: transform 0.3s ease; transform: rotate(180deg); }
.group-widget.active .group-btn svg { transform: rotate(0deg); }
.group-widget .group-list { display: none; text-align: left; }
.group-widget.active .group-list { display: block; }
.group-widget .group-list li { border-top: 1px dotted var(--blue); }
.group-widget .group-list a {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--navy);
  padding: 14px 16px;
}

/* =========================================================================
   FOOTER
   ========================================================================= */
#footer { background: #f8f8f8; }
#footer .footer { padding: 26px 16px 22px; }
#footer .group-wrap { margin-bottom: 0; }
#footer .sitemap-wrap .ttl { margin: 0 0 12px; font-size: 20px; font-weight: 700; color: var(--navy); text-align: center; }
#footer .sitemap-list {
  margin: 0 0 22px;
  padding: 10px;
  background: #fff;
  border-radius: 20px 0 20px 0;
}
#footer .sitemap-list > li { border-top: 1px dotted #ccc; }
#footer .sitemap-list > li > a { display: block; font-size: 15px; padding: 15px 10px; color: var(--blue); }
#footer .sitemap-list > li > p { margin: 0; font-size: 15px; padding: 15px 10px; color: var(--blue); }
#footer .sitemap-list .ext { display: flex; align-items: center; gap: 5px; }
#footer .sitemap-list .ext svg path,
#footer .sitemap-list .ext svg rect { stroke: #777; }

#footer .sitemap-sub {
  margin: 0 0 15px 2rem;
  padding: 0 0 0 1rem;
  border-left: 1px solid #777;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
#footer .sitemap-sub > li > p { margin: 0; font-size: 14px; padding: 8px; color: var(--blue); }
#footer .sitemap-sub-inner {
  margin: 0 0 8px 1rem;
  padding: 0 0 0 1rem;
  border-left: 1px solid #bbb;
  display: flex;
  flex-direction: column;
}
#footer .sitemap-sub-inner a { display: block; font-size: 13.5px; padding: 7px 8px; color: var(--blue); }
#footer .sitemap-sub.results-list a,
#footer .sitemap-sub.guide-list a { display: block; font-size: 14px; padding: 8px; color: var(--blue); }
#footer .sitemap-sub.school-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0 0 15px 2rem;
  padding: 0 0 0 1rem;
}
#footer .sitemap-sub.school-list a { display: block; font-size: 13.5px; padding: 8px; color: var(--blue); }

#footer figure.logo { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; }
#footer figure.logo a { display: flex; align-items: center; gap: 8px; }
#footer figure.logo img { display: block; width: 150px; height: auto; }
#footer figure.logo figcaption { margin: 4px 0 0; font-size: 14px; line-height: 1.667; color: #333; text-align: center; }
#footer figure.logo figcaption .accent { color: #c00; font-weight: 400; }
#footer .copy { margin: 8px 0 0; font-size: 12px; color: var(--copy-navy); text-align: center; }

/* pagetop */
.pagetop-wrap {
  position: sticky;
  bottom: 16px;
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  height: 0;
  margin-top: -70px;
  padding: 0 14px;
  pointer-events: none;
  z-index: 50;
}
.pagetop {
  pointer-events: auto;
  width: 44px;
  height: 52px;
  border-radius: 100px;
  background: linear-gradient(0deg, #205eab, #5ab6d4);
  box-shadow: 0 4px 12px rgba(20, 50, 100, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
}
.pagetop:hover { opacity: 0.8; }

/* =========================================================================
   SHARED CONTENT COMPONENTS (reusable across LPs)
   ========================================================================= */
.illust-placeholder {
  width: 100%;
  border-radius: 16px;
  background: repeating-linear-gradient(135deg, #eaf1f8 0 10px, #dbe7f3 10px 20px);
  border: 1px solid var(--border-dotted);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12px;
}
.illust-placeholder span {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  line-height: 1.8;
  color: #4a6a8a;
}

.btn-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 56px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 900;
}
.btn-cta.primary { background: #f29100; color: #fff; box-shadow: 0 4px 0 #c97900; }
.btn-cta.primary:hover { background: #ff9f14; color: #fff; }
.btn-cta.secondary { background: #2fb8a0; color: #fff; box-shadow: 0 4px 0 #22927e; }
.btn-cta.secondary:hover { background: #38d0b6; color: #fff; }
.btn-cta.outline { background: #fff; border: 2px solid #17418c; color: #17418c; min-height: 52px; font-size: 15px; box-shadow: none; }
.btn-cta.outline:hover { background: #eef4fb; color: #17418c; }
