/* ===== JISCO 公開サイト 共通スタイル ===== */
/* public/index.html のデザイントークン・ヘッダー・フッターを共有化したもの。 */

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

:root {
  --navy:      #0f1e3d;
  --navy-mid:  #1a3060;
  --navy-light:#2a4a8a;
  --gold:      #b8a060;
  --gold-light:#d4bc80;
  --white:     #ffffff;
  --off-white: #f7f6f2;
  --gray-light:#e8e6e0;
  --gray:      #9a9890;
  --text-dark: #1a1a1a;
  --text-mid:  #444444;

  --font-ja: 'Hiragino Mincho ProN', 'Hiragino Mincho Pro', 'Yu Mincho', 'YuMincho', 'Noto Serif JP', serif;
  --font-en: Georgia, 'Times New Roman', serif;
  --font-sans: 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', 'Yu Gothic', 'YuGothic', 'Meiryo', sans-serif;

  --section-pad: 100px 0;
  --container: 1100px;
  --radius: 2px;
  --transition: 0.3s ease;
}

html {
  scroll-behavior: smooth;
  font-size: 17px;
}

body {
  font-family: var(--font-sans);
  color: var(--text-dark);
  background: var(--white);
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.hidden { display: none !important; }

/* ===== UTILITY ===== */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 40px;
}

.section-label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-en);
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 18px;
}

.section-label::after {
  content: '';
  display: block;
  width: 40px;
  height: 1px;
  background: var(--gold);
}

.section-title {
  font-family: var(--font-ja);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 400;
  color: var(--navy);
  line-height: 1.5;
  margin-bottom: 8px;
}

.section-title-en {
  font-family: var(--font-en);
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  color: var(--gray);
  margin-bottom: 50px;
}

.divider {
  width: 40px;
  height: 2px;
  background: var(--gold);
  margin: 24px 0 36px;
}

/* ===== HEADER ===== */
#header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(15, 30, 61, 0.97);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(184, 160, 96, 0.2);
  transition: var(--transition);
}

#header.scrolled {
  box-shadow: 0 2px 20px rgba(0,0,0,0.25);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 70px;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 40px;
}

.logo-wrap {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex-shrink: 0;
}

.logo-ja {
  font-family: var(--font-ja);
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--white);
  letter-spacing: 0.06em;
  line-height: 1.2;
  white-space: nowrap;
}

.logo-en {
  font-family: var(--font-en);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  color: var(--gold-light);
  line-height: 1;
  white-space: nowrap;
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 20px;
  align-items: center;
  flex-shrink: 0;
}

.nav-list a {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.82);
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
}

.nav-list a:hover,
.nav-list a.active {
  color: var(--gold-light);
  border-color: var(--gold-light);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--white);
  transition: var(--transition);
  transform-origin: center;
}

.hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.mobile-nav {
  display: none;
  position: fixed;
  top: 70px;
  left: 0;
  right: 0;
  background: rgba(15, 30, 61, 0.99);
  padding: 20px 0 30px;
  z-index: 999;
  transform: translateY(-10px);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}

.mobile-nav.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.mobile-nav ul { list-style: none; }

.mobile-nav ul li a {
  display: block;
  padding: 14px 40px;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.85);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: var(--transition);
}

.mobile-nav ul li a:hover {
  color: var(--gold-light);
  background: rgba(255,255,255,0.03);
}

/* ===== PAGE HEAD（下層ページ用の簡易ヒーロー） ===== */
.page-head {
  background: var(--navy);
  background-image: linear-gradient(160deg, var(--navy) 0%, var(--navy-mid) 100%);
  padding: 158px 0 64px;
  color: var(--white);
}

.page-head .section-label { color: var(--gold); margin-bottom: 20px; }
.page-head .section-label::after { background: var(--gold); }

.page-head-title {
  font-family: var(--font-ja);
  font-size: clamp(1.7rem, 3.6vw, 2.4rem);
  font-weight: 400;
  color: var(--white);
  line-height: 1.5;
}

.page-head-sub {
  margin-top: 14px;
  font-size: 0.92rem;
  color: rgba(255,255,255,0.65);
  max-width: 640px;
  line-height: 1.9;
}

/* ===== FOOTER ===== */
#footer {
  background: #07111e;
  color: rgba(255,255,255,0.45);
  padding: 48px 0 32px;
}

.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 40px;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  gap: 40px;
  flex-wrap: wrap;
}

.footer-brand .logo-ja { font-size: 0.88rem; color: rgba(255,255,255,0.7); }
.footer-brand .logo-en { margin-top: 4px; font-size: 0.6rem; }

.footer-brand p {
  margin-top: 14px;
  font-size: 0.75rem;
  line-height: 1.9;
  max-width: 260px;
}

.footer-nav { display: flex; gap: 48px; flex-wrap: wrap; }

.footer-nav-col h4 {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
  font-weight: 500;
}

.footer-nav-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.footer-nav-col ul li a {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.45);
  transition: var(--transition);
}

.footer-nav-col ul li a:hover { color: rgba(255,255,255,0.8); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-copy { font-family: var(--font-en); font-size: 0.72rem; letter-spacing: 0.06em; }
.footer-addr { font-size: 0.72rem; text-align: right; }

/* ===== SCROLL ANIMATIONS ===== */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible { opacity: 1; transform: translateY(0); }

.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }
.fade-in-delay-4 { transition-delay: 0.4s; }

/* ===== 状態表示（読み込み中・空・エラー） ===== */
.state-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 90px 20px;
  text-align: center;
  color: var(--gray);
}

.state-block p { font-size: 0.9rem; line-height: 1.9; }

.spinner {
  width: 30px;
  height: 30px;
  border: 3px solid var(--gray-light);
  border-top-color: var(--navy);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.state-block .btn-outline {
  display: inline-block;
  margin-top: 8px;
  font-family: var(--font-en);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  color: var(--navy);
  border: 1px solid var(--gray-light);
  padding: 10px 28px;
  transition: var(--transition);
}

.state-block .btn-outline:hover { border-color: var(--navy); background: var(--off-white); }

/* ===== ブログ一覧 ===== */
#blog-list { padding: var(--section-pad); background: var(--white); }

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px 32px;
  margin-top: 8px;
}

.blog-card {
  background: var(--white);
  border-top: 3px solid var(--navy);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(15, 30, 61, 0.06);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.blog-card:hover { transform: translateY(-6px); box-shadow: 0 14px 52px rgba(15, 30, 61, 0.13); }

.blog-card::after {
  content: '';
  position: absolute;
  left: 0; top: 0;
  width: 3px; height: 0;
  background: var(--gold);
  transition: height 0.45s ease;
  z-index: 2;
}

.blog-card:hover::after { height: 100%; }

.blog-card-link { display: contents; }

.blog-card-thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: linear-gradient(145deg, #e8e5dd 0%, #d8d3c9 50%, #ccc7bc 100%);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.blog-card-thumb img { width: 100%; height: 100%; object-fit: cover; }

.blog-card-thumb svg { width: 44px; height: 44px; opacity: 0.25; }

.blog-card-body {
  padding: 26px 28px 30px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.blog-card-date {
  font-family: var(--font-en);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  color: var(--gold);
  margin-bottom: 10px;
}

.blog-card-title {
  font-family: var(--font-ja);
  font-size: 1.08rem;
  font-weight: 400;
  color: var(--navy);
  line-height: 1.6;
  margin-bottom: 12px;
}

.blog-card-excerpt {
  font-size: 0.85rem;
  color: var(--text-mid);
  line-height: 1.9;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  font-family: var(--font-en);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--navy-light);
  border-bottom: 1px solid var(--navy-light);
  align-self: flex-start;
  padding-bottom: 2px;
}

.blog-card-more::after { content: '→'; }

/* ===== ブログ詳細 ===== */
#post-detail { padding: 158px 0 100px; background: var(--white); }

.post-container { max-width: 760px; margin: 0 auto; padding: 0 40px; }

.post-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-en);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--gray);
  margin-bottom: 36px;
  transition: var(--transition);
}

.post-back:hover { color: var(--navy); }
.post-back::before { content: '←'; }

.post-date {
  font-family: var(--font-en);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  color: var(--gold);
  margin-bottom: 16px;
}

.post-title {
  font-family: var(--font-ja);
  font-size: clamp(1.5rem, 3.4vw, 2.1rem);
  font-weight: 400;
  color: var(--navy);
  line-height: 1.6;
  margin-bottom: 32px;
}

.post-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  margin-bottom: 40px;
  background: var(--gray-light);
}

.post-body {
  font-size: 0.98rem;
  color: var(--text-dark);
  line-height: 2.1;
}

.post-body p { margin-bottom: 1.6em; }
.post-body h1, .post-body h2, .post-body h3, .post-body h4 {
  font-family: var(--font-ja);
  color: var(--navy);
  font-weight: 400;
  line-height: 1.6;
  margin: 2em 0 0.9em;
}
.post-body h1 { font-size: 1.5rem; }
.post-body h2 { font-size: 1.3rem; }
.post-body h3 { font-size: 1.12rem; }
.post-body h4 { font-size: 1.02rem; }
.post-body ul, .post-body ol { margin: 0 0 1.6em 1.4em; }
.post-body li { margin-bottom: 0.5em; }
.post-body img { width: 100%; height: auto; margin: 1.8em 0; }
.post-body blockquote {
  border-left: 3px solid var(--gold);
  padding: 4px 0 4px 24px;
  color: var(--text-mid);
  margin: 1.8em 0;
  font-style: italic;
}
.post-body a { color: var(--navy-light); border-bottom: 1px solid var(--navy-light); word-break: break-word; }
.post-body strong { color: var(--navy); }
.post-body code {
  background: var(--off-white);
  padding: 2px 6px;
  font-size: 0.88em;
  border-radius: var(--radius);
}

/* ===== RESPONSIVE ===== */
/* ナビ項目数が多いため、コンテナ最大幅(1100px)より広い範囲で先にハンバーガーへ切り替え、
   ロゴとナビが窮屈になって折り返し崩れするのを防ぐ */
@media (max-width: 1180px) {
  .nav-list { display: none; }
  .hamburger { display: flex; }
  .mobile-nav { display: block; }
}

@media (max-width: 960px) {
  :root { --section-pad: 72px 0; }

  .container { padding: 0 28px; }
  .header-inner { padding: 0 28px; }

  .footer-top { flex-direction: column; }
  .footer-nav { gap: 32px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .footer-addr { text-align: left; }

  .blog-grid { grid-template-columns: repeat(2, 1fr); gap: 32px 24px; }
}

@media (max-width: 600px) {
  :root { --section-pad: 56px 0; }

  .container { padding: 0 20px; }
  .header-inner { padding: 0 20px; }
  .footer-inner { padding: 0 20px; }
  .post-container { padding: 0 20px; }

  .page-head { padding: 128px 0 48px; }
  #post-detail { padding: 128px 0 64px; }
  .blog-grid { grid-template-columns: 1fr; }
}
