/* ===========================
   大谷珠算塾 共通スタイルシート
   =========================== */

/* --- CSS Variables --- */
:root {
  --color-primary: #5b7e7a;
  --color-primary-dark: #3f5c59;
  --color-primary-light: #8ba989;
  --color-accent: #c8a96e;
  --color-text: #333333;
  --color-text-light: #666666;
  --color-bg: #ffffff;
  --color-bg-light: #f5f7f5;
  --color-border: #e0e8e0;
  --font-sans: 'Noto Sans JP', sans-serif;
  --font-serif: 'Playfair Display', serif;
  --transition: 0.3s ease;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 8px 32px rgba(0, 0, 0, 0.14);
  --radius: 12px;
  --header-height: 72px;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.8;
  font-size: 16px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* --- Container --- */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 14px 36px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
  letter-spacing: 0.05em;
}
.btn--primary {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}
.btn--primary:hover {
  background: #b8943e;
  border-color: #b8943e;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(200,169,110,0.4);
}
.btn--secondary {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.btn--secondary:hover {
  background: var(--color-primary);
  color: #fff;
}
.btn--large { padding: 18px 56px; font-size: 1.1rem; }
.btn--outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.btn--outline:hover {
  background: var(--color-primary);
  color: #fff;
  transform: translateY(-2px);
}

/* --- Section --- */
.section { padding: 80px 0; }
.section--light-bg { background: var(--color-bg-light); }
.section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  color: var(--color-primary-dark);
  text-align: center;
  margin-bottom: 12px;
  position: relative;
  padding-bottom: 20px;
}
.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 48px;
  height: 3px;
  background: var(--color-accent);
  border-radius: 2px;
}
.section-subtitle {
  text-align: center;
  color: var(--color-text-light);
  margin-bottom: 48px;
  font-size: 1rem;
}

/* --- Text Utils --- */
.text-center { text-align: center; }

/* --- Link Text --- */
.link-text {
  color: var(--color-primary);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}
.link-text:hover { color: var(--color-accent); gap: 10px; }

/* ===========================
   HEADER
   =========================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
  height: var(--header-height);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  gap: 16px;
  overflow: hidden;
}
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo h1 {
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--color-primary-dark);
  letter-spacing: 0.05em;
  white-space: nowrap;
}
/* ロゴ画像サイズはここで変更 */
/* .logo img { height: 36px; width: auto; max-width: 140px; flex-shrink: 0; }*/
.logo img { height: 56px; width: auto; max-width: 240px; flex-shrink: 0; }
.logo { flex-shrink: 0; max-width: 260px; }
.nav { display: flex; align-items: center; gap: 4px; flex-wrap: nowrap; flex-shrink: 0; }
.nav__list {
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: nowrap;
  white-space: nowrap;
}
.nav__list a {
  padding: 8px 8px;
  font-size: 0.78rem;
  font-weight: 500;
  border-radius: 6px;
  color: var(--color-text);
  transition: var(--transition);
  white-space: nowrap;
}
.nav__list a:hover { color: var(--color-primary); background: var(--color-bg-light); }
.nav__list a.active { color: var(--color-primary); font-weight: 700; }
.header__cta-btn { margin-left: 6px; padding: 8px 14px; font-size: 0.78rem; white-space: nowrap; }
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--color-primary-dark);
  cursor: pointer;
}

/* ===========================
   PAGE HERO (inner pages) — 写真バナー
   =========================== */
.page-hero {
  position: relative;
  height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-top: var(--header-height);
  color: #fff;
  text-align: center;
}

/* 背景写真
   ※ 画像ファイルは img/ フォルダに配置してください
      hero-lesson.jpg / hero-admission.jpg / hero-trial.jpg
      画像がない場合はグラデーションで代替表示されます */
.page-hero__bg {
  position: absolute;
  inset: 0;
  /* フォールバック：画像未設定時のグラデーション */
  background-color: var(--color-primary);
  background-image: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary-light) 100%);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: scale(1.05);
  transition: transform 8s ease;
  z-index: 0;
}
.page-hero:hover .page-hero__bg {
  transform: scale(1.0);
}

/* 暗めのオーバーレイ */
.page-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(20, 40, 38, 0.55) 0%,
    rgba(20, 40, 38, 0.70) 100%
  );
  z-index: 1;
}

/* 左端の縦アクセントライン */
.page-hero__overlay::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: var(--color-accent);
}

.page-hero__content {
  position: relative;
  z-index: 2;
  padding: 0 24px;
}

.page-hero__en {
  font-family: var(--font-serif);
  font-size: clamp(0.8rem, 1.5vw, 0.95rem);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 12px;
  display: block;
}

.page-hero h2 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 16px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.4);
}

.page-hero p {
  font-size: 1rem;
  color: rgba(255,255,255,0.88);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.8;
  text-shadow: 0 1px 6px rgba(0,0,0,0.35);
}

/* パンくずの上に薄ボーダーライン装飾 */
.page-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(to right, var(--color-accent), var(--color-primary-light));
  z-index: 3;
}

@media (max-width: 768px) {
  .page-hero { height: 280px; }
  .page-hero h2 { font-size: 1.9rem; }
}


/* Breadcrumb */
.breadcrumb {
  background: var(--color-bg-light);
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border);
}
.breadcrumb__list {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--color-text-light);
}
.breadcrumb__list li:not(:last-child)::after {
  content: '›';
  margin-left: 8px;
  color: var(--color-text-light);
}
.breadcrumb__list a { color: var(--color-primary); }
.breadcrumb__list a:hover { text-decoration: underline; }

/* ===========================
   CARDS
   =========================== */
.card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: var(--transition);
}
.card:hover { box-shadow: var(--shadow-hover); transform: translateY(-4px); }

/* ===========================
   CTA SECTION
   =========================== */
.cta-section {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
  color: #fff;
  text-align: center;
  padding: 80px 0;
}
.cta-section .section-title { color: #fff; }
.cta-section .section-title::after { background: var(--color-accent); }
.cta-section__text { color: rgba(255,255,255,0.85); margin-bottom: 36px; font-size: 1rem; }

/* ===========================
   FOOTER
   =========================== */
.footer {
  background: #333333;
  color: rgba(255,255,255,0.8);
}
.footer__inner {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 48px;
  padding: 56px 24px 40px;
  align-items: start;
}
.footer__brand p {
  font-family: var(--font-serif);
  font-size: 0.9rem;
  margin-top: 8px;
  color: rgba(255,255,255,0.6);
}
.footer__logo { height: 40px; filter: brightness(0) invert(1); }
.footer__list { display: flex; flex-direction: column; gap: 10px; }
.footer__list a {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.75);
  transition: var(--transition);
}
.footer__list a:hover { color: var(--color-accent); padding-left: 4px; }
.footer__social { display: flex; gap: 16px; justify-content: flex-end; }
.footer__social a {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: grid;
  place-items: center;
  color: #fff;
  transition: var(--transition);
}
.footer__social a:hover { background: var(--color-accent); }
.footer__copyright {
  text-align: center;
  padding: 20px 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
}

/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 768px) {
  .section { padding: 56px 0; }
  .nav__list {
    display: none;
    flex-direction: column;
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background: #fff;
    padding: 24px;
    border-bottom: 1px solid var(--color-border);
    gap: 8px;
    z-index: 99;
  }
  .nav__list.is-active { display: flex; }
  .header__cta-btn { display: none; }
  .menu-toggle { display: block; }
  .footer__inner { grid-template-columns: 1fr; gap: 32px; }
  .footer__social { justify-content: flex-start; }
  .logo h1 { display: none; } 
}
