/* =====================================================
   components.css — 共通コンポーネント
   Header / Footer / Nav / Breadcrumb / CTA / Forms
   ===================================================== */

/* ===== Header ===== */
header {
  background: var(--bg-white);
  position: sticky;
  top: 0;
  z-index: 200;
  transition: box-shadow .4s ease;
}
header.scrolled {
  box-shadow: 0 2px 24px rgba(30,58,95,.08);
}
.header-top {
  background: var(--primary);
  color: #c8d6e5;
  font-size: .76em;
  padding: 6px 0;
  text-align: center;
  letter-spacing: .04em;
}
.header-top a {
  color: #fff;
  text-decoration: none;
}
.header-top a:hover { opacity: .8; }
.header-top span { margin: 0 14px; opacity: .35; }

.header-main { padding: 14px 0; }
.header-main .inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
  gap: 16px;
}

.logo {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo-icon-img { width: 44px; height: auto; }
.logo-text {
  font-family: "Zen Maru Gothic", sans-serif;
  font-size: 1.15em;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.2;
}
.logo-text small {
  display: block;
  font-size: .48em;
  color: var(--text-light);
  font-weight: 400;
  letter-spacing: .08em;
}

/* ===== Navigation ===== */
nav ul {
  display: flex;
  list-style: none;
  gap: 14px;
  align-items: center;
  flex-wrap: nowrap;
}
nav li {
  white-space: nowrap;
}
nav a {
  text-decoration: none;
  color: #4a5c6e;
  font-size: .82em;
  font-weight: 500;
  white-space: nowrap;
}
nav a:hover { color: var(--secondary); }
nav a.active,
nav a[aria-current="page"] {
  color: var(--secondary);
  font-weight: 600;
}
.nav-cta {
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: #fff !important;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(240,160,80,.3);
  white-space: nowrap;
}
.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(240,160,80,.4);
}

/* ===== Hamburger ===== */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
  transition: transform .4s ease, opacity .4s ease;
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

/* ===== Footer ===== */
footer {
  background: #0f1f33;
  padding: 56px 28px 100px;
  color: rgba(255,255,255,.6);
  font-size: .82em;
}
.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.footer-links a {
  color: rgba(255,255,255,.7);
  text-decoration: none;
  font-size: .88em;
}
.footer-links a:hover { color: #fff; }
footer p { margin-bottom: 4px; }

/* Footer grid layout */
.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 48px;
  align-items: start;
  margin-bottom: 40px;
}
.footer-brand .logo { margin-bottom: 16px; }
.footer-brand .logo-text { color: rgba(255,255,255,.9); }
.footer-brand .logo-text small { color: rgba(255,255,255,.5); }
.footer-address {
  font-size: .82em;
  color: rgba(255,255,255,.5);
  line-height: 1.9;
  margin-bottom: 10px;
}
.footer-address a { color: rgba(255,255,255,.7); text-decoration: none; }
.footer-address a:hover { color: #fff; }
.footer-copy {
  font-size: .8em;
  color: rgba(255,255,255,.35);
}
.footer-nav {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.footer-nav-label {
  font-size: .74em;
  font-weight: 700;
  color: rgba(255,255,255,.4);
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.footer-nav ul { list-style: none; }
.footer-nav li { margin-bottom: 8px; }
.footer-nav a {
  color: rgba(255,255,255,.6);
  text-decoration: none;
  font-size: .84em;
}
.footer-nav a:hover { color: #fff; }

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .footer-nav {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
}

/* ===== Breadcrumb ===== */
.breadcrumb {
  background: var(--bg-alt);
  padding: 10px 0;
  font-size: .82em;
}
.breadcrumb ol {
  display: flex;
  align-items: center;
  list-style: none;
  flex-wrap: wrap;
  gap: 4px;
}
.breadcrumb li {
  display: flex;
  align-items: center;
  color: var(--text-light);
}
.breadcrumb li + li::before {
  content: "›";
  margin-right: 4px;
  color: var(--text-light);
  opacity: .5;
}
.breadcrumb a {
  color: var(--secondary);
  text-decoration: none;
}
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb li[aria-current="page"] { color: var(--text); font-weight: 500; }

/* ===== CTA Box (共通) ===== */
.cta-box {
  background: linear-gradient(135deg, rgba(30,58,95,.92), rgba(30,58,95,.88)), url('/images/tutoring.jpg') center/cover no-repeat;
  padding: 72px 28px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-box__lead {
  font-family: "Zen Maru Gothic", sans-serif;
  color: #fff;
  font-size: 1.5em;
  font-weight: 800;
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
}
.cta-box__sub {
  color: rgba(255,255,255,.85);
  font-size: .95em;
  margin-bottom: 28px;
  position: relative;
  z-index: 1;
}
.cta-box__btns {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}
.cta-box__note {
  margin-top: 20px;
  font-size: .85em;
  color: rgba(255,255,255,.65);
  position: relative;
  z-index: 1;
}
.cta-box__note a {
  color: rgba(255,255,255,.85);
  text-decoration: none;
}
.cta-box__note a:hover { color: #fff; }

/* ===== CTA Buttons ===== */
.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 44px;
  border-radius: var(--radius-full);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05em;
  transition: transform .3s, box-shadow .3s;
}
.cta-btn--primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: #fff;
  box-shadow: 0 4px 16px rgba(240,160,80,.35);
}
.cta-btn--primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(240,160,80,.45);
}
.cta-btn--line {
  background: var(--line);
  color: #fff;
  box-shadow: 0 4px 16px rgba(6,199,85,.3);
}
.cta-btn--line:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(6,199,85,.4);
}
.cta-btn--tel {
  background: rgba(255,255,255,.15);
  color: #fff;
  border: 2px solid rgba(255,255,255,.4);
}
.cta-btn--tel:hover {
  transform: translateY(-2px);
  background: rgba(255,255,255,.25);
}
.cta-btn--outline {
  border: 2px solid var(--secondary);
  color: var(--secondary);
  background: transparent;
}
.cta-btn--outline:hover {
  background: var(--secondary);
  color: #fff;
  transform: translateY(-2px);
}

/* ===== Page Hero (各ページ共通ヒーロー) ===== */
.page-hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  padding: 72px 0 60px;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: .03;
  pointer-events: none;
}
.page-hero .inner { position: relative; z-index: 1; }
.page-hero__badge {
  display: inline-block;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  color: rgba(255,255,255,.85);
  padding: 5px 18px;
  border-radius: var(--radius-full);
  font-size: .74em;
  font-weight: 500;
  margin-bottom: 16px;
  letter-spacing: .06em;
}
.page-hero h1 {
  font-family: "Zen Maru Gothic", sans-serif;
  color: #fff;
  font-size: 2.1em;
  font-weight: 800;
  line-height: 1.4;
  margin-bottom: 14px;
  text-wrap: balance;
}
.page-hero__lead {
  color: rgba(255,255,255,.82);
  font-size: .95em;
  line-height: 1.9;
  max-width: 680px;
  margin-bottom: 24px;
}
.page-hero__btns {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* ===== FAQ component ===== */
.faq {
  background: var(--bg-white);
  padding: 80px 0;
}
.faq-list {
  max-width: 780px;
  margin: 0 auto;
}
.faq-item {
  border: 1px solid rgba(74,144,217,.08);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow);
}
.faq-q {
  padding: 18px 24px;
  cursor: pointer;
  font-family: "Zen Maru Gothic", sans-serif;
  font-weight: 700;
  color: var(--primary);
  font-size: .95em;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background .3s;
}
.faq-q:hover { background: rgba(74,144,217,.02); }
.faq-q::after {
  content: "+";
  font-size: 1.3em;
  color: var(--secondary);
  font-weight: 300;
  transition: transform .3s;
  flex-shrink: 0;
  margin-left: 12px;
}
.faq-item.open .faq-q::after { transform: rotate(45deg); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .4s ease, padding .4s ease;
  padding: 0 24px;
  font-size: .88em;
  color: var(--text-light);
  line-height: 1.9;
}
.faq-item.open .faq-a {
  max-height: 400px;
  padding: 0 24px 20px;
}

/* ===== Access table ===== */
.access { background: var(--bg-alt); padding: 80px 0; }
.access-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  align-items: start;
}
.access-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9em;
}
.access-table th,
.access-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(74,144,217,.06);
  text-align: left;
}
.access-table th {
  font-weight: 600;
  color: var(--primary);
  width: 80px;
  white-space: nowrap;
}
.access-table a { color: var(--secondary); text-decoration: none; }
.access-table a:hover { text-decoration: underline; }
.map-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.map-wrap iframe {
  width: 100%;
  height: 320px;
  border: 0;
}

/* ===== Responsive ===== */
/* ナビゲーション：1023px以下はハンバーガー、1024px以上はフルナビ */
@media (max-width: 1023px) {
  .hamburger { display: flex; }
  nav { position: relative; }
  nav ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    padding: 20px;
    gap: 0;
    box-shadow: 0 8px 24px rgba(0,0,0,.08);
    z-index: 300;
  }
  nav ul.open { display: flex; }
  nav li { padding: 12px 0; border-bottom: 1px solid rgba(74,144,217,.06); white-space: normal; }
  nav li:last-child { border-bottom: none; padding-top: 16px; }
  .nav-cta { text-align: center; display: block; }
}

@media (max-width: 768px) {
  .page-hero h1 { font-size: 1.65em; }
  .cta-box__lead { font-size: 1.25em; }
  .access-content { grid-template-columns: 1fr; }
  footer { padding: 40px 28px 80px; }

  /* Focus buttons on mobile */
  .cta-btn--primary:focus-visible,
  .cta-btn--line:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 3px;
  }
}
