/* ==========================================================
   神奈川県立戸塚南高等学校 サイト共通スタイル
   テーマカラーを変えたい時は下の :root の色コードを変更
   ========================================================== */
:root {
  --navy: #1b2a4a;        /* 濃紺（メイン） */
  --navy-dark: #131f38;
  --blue: #4a7ec2;        /* スクールブルー（アクセント） */
  --blue-light: #dce9f7;
  --gray-bg: #f5f7fa;
  --text: #2b2f36;
  --text-sub: #5a6472;
  --white: #ffffff;
  --line: #dfe4ea;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", "Noto Sans JP", sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.8;
}

img { max-width: 100%; display: block; }

a { color: var(--blue); }

/* ---------- ヘッダー ---------- */
.site-header {
  background: var(--white);
  border-top: 4px solid var(--navy);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 14px 20px 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.school-name { line-height: 1.3; }
.school-name .pref { font-size: 12px; color: var(--text-sub); letter-spacing: .1em; }
.school-name .name {
  font-size: 24px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: .08em;
  text-decoration: none;
  display: block;
}
.school-name .tag {
  font-size: 11px;
  color: var(--white);
  background: var(--blue);
  border-radius: 3px;
  padding: 1px 8px;
  margin-left: 6px;
  vertical-align: middle;
  white-space: nowrap;
}

/* ---------- ナビ ---------- */
.global-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}
.global-nav a {
  display: block;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
  text-decoration: none;
  border-radius: 6px;
  transition: background .2s;
}
.global-nav a:hover { background: var(--blue-light); }
.global-nav a.current { background: var(--navy); color: var(--white); }

/* スマホではヘッダーを画面に固定しない（画面を広く使う） */
@media (max-width: 600px) {
  .site-header { position: static; }
  .header-inner { padding: 12px 14px 8px; }
  .global-nav a { padding: 7px 10px; font-size: 13px; }
  .school-name .name { font-size: 21px; }
}

/* ---------- ヒーロー（トップページ） ---------- */
.hero {
  position: relative;
  min-height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
  background: linear-gradient(rgba(19, 31, 56, .55), rgba(19, 31, 56, .65)),
              url("../images/school02.jpg") center 40% / cover no-repeat;
  padding: 60px 20px;
}
.hero-inner { max-width: 800px; }
.hero .open-badge {
  display: inline-block;
  background: var(--white);
  color: var(--navy);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .15em;
  padding: 4px 18px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(30px, 6vw, 52px);
  letter-spacing: .06em;
  line-height: 1.15;   /* 「塚」の点の位置決めに使うため固定 */
  text-shadow: 0 2px 10px rgba(0,0,0,.4);
  margin-bottom: 14px;
}
/* 「神奈川県立」と「戸塚南高等学校」を、途中で切れないかたまりにする。
   画面に収まらない時だけ、このかたまりの間で折り返す
   （スマホ＝「神奈川県立」／「戸塚南高等学校」の2行になる） */
.hero h1 .t-part { display: inline-block; white-space: nowrap; }
.hero .catch {
  font-size: clamp(16px, 3vw, 22px);
  font-weight: 700;
  letter-spacing: .05em;
  text-shadow: 0 1px 6px rgba(0,0,0,.5);
}
.hero .sub {
  margin-top: 16px;
  font-size: 14px;
  opacity: .9;
}

/* ---------- 桜の演出（トップページ） ----------
   舞い散る花びらの一枚が「塚」に着地して点になり、
   正式な字体「塚（点あり）」になる演出 */
.hero { overflow: hidden; }

.sakura-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;   /* 花びらはクリックの邪魔をしない */
}

.petal {
  position: absolute;
  top: -5%;
  left: var(--x, 50%);
  width: var(--size, 12px);
  height: calc(var(--size, 12px) * .82);
  background: linear-gradient(135deg, #fbd9e2, #f5aec4);
  border-radius: 100% 4% 100% 4%;
  opacity: .85;
  animation: petalFall var(--dur, 9s) linear var(--delay, 0s) infinite;
}

@keyframes petalFall {
  0%   { transform: translate(0, -6vh) rotate(0deg); }
  25%  { transform: translate(calc(var(--drift, 40px) * .6), 25vh) rotate(140deg); }
  50%  { transform: translate(var(--drift, 40px), 52vh) rotate(280deg); }
  75%  { transform: translate(calc(var(--drift, 40px) * .3), 78vh) rotate(420deg); }
  100% { transform: translate(calc(var(--drift, 40px) * .8), 108vh) rotate(560deg); }
}

/* 「塚」に着地する特別な1枚（動きはJSで制御） */
.petal.special {
  animation: none;
  z-index: 3;
  opacity: 1;
}

/* 「塚」の点の位置マーカー
   着地の瞬間に文字自体が点付きの「塚」（U+FA10）に切り替わるため、
   この要素は「花びらが点に変わる瞬間の光」としてだけ使う。
   位置はピクセル計測で求めた実際の点の座標（字の左から46%・上から61%） */
.hero h1 .tsuka { position: relative; display: inline-block; }
.tsuka-dot {
  position: absolute;
  left: 44%;
  top: 60%;
  width: .10em;
  height: .09em;
  background: #f5aec4;
  border-radius: 80% 20% 100% 40%;
  transform: rotate(24deg);
  opacity: 0;
  pointer-events: none;
}
/* 付着した花びらが光を放ち、その光の中で字が点付きに変わる
   （字の切り替えはJSが光のピーク＝約0.8秒後に行う） */
.tsuka-dot.on { animation: dotShine 1.5s ease-in-out forwards; }
@keyframes dotShine {
  0% {   /* 着地直後：桜色の花びらのまま */
    opacity: 1;
    background: #f5aec4;
    box-shadow: 0 0 0 0 rgba(255, 225, 238, 0);
    transform: rotate(24deg) scale(1.15);
  }
  40% {  /* 赤い光がふくらむ（点の周りだけ・中心は白熱） */
    opacity: 1;
    background: #ffa08d;
    box-shadow: 0 0 .06em .03em rgba(255, 235, 225, 1),
                0 0 .16em .07em rgba(255, 95, 70, 1),
                0 0 .3em .1em rgba(230, 40, 30, .8);
    transform: rotate(24deg) scale(1.4);
  }
  55% {  /* 赤い光のピーク（この瞬間に字が点付きの「塚」に変わる） */
    opacity: 1;
    background: #ffbfae;
    box-shadow: 0 0 .08em .04em rgba(255, 240, 232, 1),
                0 0 .2em .09em rgba(255, 85, 60, 1),
                0 0 .38em .13em rgba(225, 30, 20, .95);
    transform: rotate(24deg) scale(1.5);
  }
  100% { /* 光がすっと消え、本物の点だけが残る */
    opacity: 0;
    box-shadow: 0 0 0 0 rgba(255, 225, 238, 0);
    transform: rotate(24deg) scale(1);
  }
}
/* 桜の演出は全端末で表示する（「アニメーションを減らす」設定でも出す・2026-07-16社長指示） */


/* ---------- 下層ページ見出し ---------- */
.page-title {
  background: linear-gradient(rgba(27, 42, 74, .78), rgba(27, 42, 74, .78)),
              url("../images/school02.jpg") center 35% / cover no-repeat;
  color: var(--white);
  text-align: center;
  padding: 52px 20px;
}
.page-title h1 { font-size: clamp(24px, 4vw, 34px); letter-spacing: .1em; }
.page-title p { font-size: 13px; opacity: .85; margin-top: 4px; }

/* ---------- レイアウト ---------- */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 48px 20px;
}

.section { margin-bottom: 56px; }

.section-title {
  font-size: 24px;
  color: var(--navy);
  letter-spacing: .08em;
  border-left: 6px solid var(--blue);
  padding-left: 14px;
  margin-bottom: 24px;
}
.section-title small {
  display: block;
  font-size: 12px;
  color: var(--blue);
  letter-spacing: .15em;
  font-weight: 600;
}

.lead { color: var(--text-sub); margin-bottom: 24px; }

/* ---------- カード ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  transition: transform .2s, box-shadow .2s;
  display: block;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 8px 20px rgba(27,42,74,.12); }
.card .card-img { height: 150px; background: var(--blue-light); overflow: hidden; }
.card .card-img img { width: 100%; height: 100%; object-fit: cover; }
.card .card-body { padding: 16px 18px 20px; }
.card h3 { color: var(--navy); font-size: 17px; margin-bottom: 6px; }
.card p { font-size: 13px; color: var(--text-sub); }

/* ---------- 学校説明会 お申し込みボタン ---------- */
.apply-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  margin-top: 8px;
}
.apply-btn {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 22px 20px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: var(--gray-bg);
  text-decoration: none;
  text-align: center;
  cursor: default;
  pointer-events: none;   /* 受付開始前は押せない */
}
.apply-btn-ttl { font-size: 17px; font-weight: 700; color: var(--navy); }
.apply-btn-date { font-size: 13px; color: var(--text-sub); }
.apply-btn-state {
  margin-top: 10px;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 0;
  border-radius: 6px;
  background: #e6e9ee;
  color: var(--text-sub);
}
/* 予約受付が始まったら .is-ready を付ける → 押せる青いボタンになる */
.apply-btn.is-ready {
  background: var(--navy);
  border-color: var(--navy);
  cursor: pointer;
  pointer-events: auto;
  transition: transform .15s, box-shadow .15s;
}
.apply-btn.is-ready .apply-btn-ttl,
.apply-btn.is-ready .apply-btn-date { color: #fff; }
.apply-btn.is-ready .apply-btn-state { background: var(--blue); color: #fff; }
.apply-btn.is-ready:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(27,42,74,.18); }

/* ---------- お知らせ ---------- */
.news-list { list-style: none; border-top: 1px solid var(--line); }
.news-list li {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  padding: 14px 6px;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.news-list .date {
  font-size: 13px;
  color: var(--text-sub);
  min-width: 95px;
  font-feature-settings: "tnum";
}
.news-list .label {
  font-size: 11px;
  font-weight: 700;
  color: var(--white);
  background: var(--navy);
  border-radius: 3px;
  padding: 1px 10px;
  white-space: nowrap;
}
.news-list .label.event { background: var(--blue); }
.news-list .text { flex: 1 1 300px; font-size: 15px; }

/* ---------- テーブル ---------- */
.info-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
.info-table th, .info-table td {
  border: 1px solid var(--line);
  padding: 12px 16px;
  text-align: left;
  vertical-align: top;
}
.info-table th {
  background: var(--gray-bg);
  color: var(--navy);
  white-space: nowrap;
  width: 200px;
  font-weight: 700;
}
.info-table.schedule th { width: auto; }
.info-table.schedule thead th {
  background: var(--navy);
  color: var(--white);
  text-align: center;
}
@media (max-width: 600px) {
  .info-table th { width: 110px; padding: 10px; }
  .info-table td { padding: 10px; }
}

/* ---------- 表の横スクロール（スマホ用） ----------
   列の多い表は .table-scroll で囲むと、スマホでは
   潰れずに横スクロールで見られる */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 600px) {
  .table-scroll .info-table { min-width: 560px; }
}

/* ---------- 画像枠（制服など） ---------- */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.photo-slot {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.photo-slot img {
  width: auto;
  max-width: 100%;
  max-height: 560px;      /* 縦長の画像もこの高さまでに収める */
  margin: 0 auto;         /* 画像全体を切らずに中央に表示 */
}
.photo-slot .caption {
  padding: 12px 16px;
  font-size: 14px;
  color: var(--text-sub);
  background: var(--white);
  border-top: 1px solid var(--line);
}
.photo-slot .caption strong { color: var(--navy); }

/* 画像ファイルがまだ無い時に表示される案内 */
.photo-slot.img-missing .placeholder {
  display: block;
  text-align: center;
  padding: 110px 24px;
  line-height: 2;
  color: var(--text-sub);
  font-size: 13px;
  background: repeating-linear-gradient(45deg, #eef2f7, #eef2f7 12px, #f7f9fc 12px, #f7f9fc 24px);
}
.photo-slot .placeholder { display: none; }
.photo-slot.img-missing img { display: none; }

/* ---------- 準備中 ---------- */
.coming-soon {
  border: 2px dashed var(--line);
  border-radius: 12px;
  background: var(--gray-bg);
  text-align: center;
  padding: 70px 20px;
  color: var(--text-sub);
}
.coming-soon .icon { font-size: 40px; margin-bottom: 10px; }
.coming-soon h2 { color: var(--navy); font-size: 20px; margin-bottom: 8px; letter-spacing: .1em; }

/* ---------- 注意書き ---------- */
.note {
  background: var(--blue-light);
  border-left: 4px solid var(--blue);
  border-radius: 0 8px 8px 0;
  padding: 14px 18px;
  font-size: 14px;
  margin-top: 20px;
}

/* ---------- フッター ---------- */
.site-footer {
  background: var(--navy-dark);
  color: #c8d2e0;
  margin-top: 40px;
}
.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 36px 20px 24px;
}
.footer-inner .f-name { color: var(--white); font-size: 18px; font-weight: 700; letter-spacing: .08em; }
.footer-inner .f-addr { font-size: 13px; margin-top: 6px; }
.footer-inner .credit {
  font-size: 11px;
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,.15);
  opacity: .7;
}
