/* ============================================================
   共通CSS(全ページ共有)
   対象: リセット/ヘッダー・ナビ・ハンバーガー/モバイルパネル/フッター/
         トップに戻るボタン/ニュース欄・実績カードの基本スタイルとフェードイン/
         スマホ用ヒーロー高さ調整/広いデスクトップ画面での本文コンテナ拡大
   ページ固有のスタイル(扉絵の背景画像・実績グリッドの列数など)はここに含めず、
   各ページの<style>に残しています。
   ============================================================ */

:root {
  --transition-duration: 600ms;
  --header-height: 64px; /* ヘッダーの高さ */
  --side-panel-width: 320px; /* サイドメニューの共通張り出し幅 */
  --overlay-color: rgba(0, 0, 0, 0.35); /* トップページのヒーローで使用 */
}

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

body {
  font-family: 'Noto Sans JP', sans-serif;
  color: #121212;
  background-color: #fff;
  min-height: 100vh;
  overflow-x: hidden; /* 背景アクセント図形がセクション外にはみ出しても横スクロールが出ないようにする */
}

.page-body {
  position: relative;
}
.page-body::before {
  content: "";
  display: block;
  height: 3px;
  background: linear-gradient(90deg, #0b66c2 0%, #42a5f5 50%, transparent 90%);
}

/* 固定式ヘッダーのスタイル */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background-color: #fff;
  color: #000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  font-size: 1rem;
  transition: background-color 260ms ease, color 200ms ease;
}

.site-header .logo {
  font-size: 1.8rem;
  font-weight: bold;
  font-family: 'Inter', sans-serif;
  line-height: 1;
  display: flex;
  align-items: center;
}

.site-header .logo a:hover {
  color: #1976d2;
  text-shadow: 0 2px 8px #b3e0ff;
  transition: color 0.18s, text-shadow 0.18s;
}

.site-header nav {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.site-header nav a {
  color: #000;
  text-decoration: none;
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

.site-header nav a:hover {
  background-color: #6B7B8C;
  color: #fff;
}
.inquiry-btn {
  background-color: #2c6fad !important;
  color: #fff !important;
  border-radius: 4px;
}
.inquiry-btn:hover {
  background-color: #1e5288 !important;
  color: #fff !important;
}

/* ハンバーガーメニュー */
.hamburger {
  display: none;
  width: 48px;
  height: 48px;
  border: none;
  background: transparent;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1100;
}

.hamburger .bars {
  width: 28px;
  height: 20px;
  position: relative;
  display: block;
}

.hamburger .bars span {
  position: absolute;
  left: 0; right: 0;
  height: 3px;
  background: #000;
  border-radius: 2px;
  transition: transform 220ms, opacity 220ms;
  display: block;
}

.hamburger .bars span:nth-child(1) { top: 0; }
.hamburger .bars span:nth-child(2) { top: 8px; }
.hamburger .bars span:nth-child(3) { top: 16px; }

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

/* モバイルパネル(横スライド) */
.mobile-panel {
  position: fixed;
  top: var(--header-height);
  right: 0;
  width: min(var(--side-panel-width), 90vw);
  height: calc(100vh - var(--header-height));
  background: rgba(11, 102, 194, 0.82);
  border-radius: 0;
  box-shadow: -12px 0 40px rgba(12,12,12,0.18);
  border: none;
  font-family: 'Inter', sans-serif;
  letter-spacing: normal;
  transform: translateX(100%);
  transition: transform 260ms cubic-bezier(.2,.9,.3,1), opacity 200ms;
  opacity: 0;
  z-index: 1099;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px 16px;
  align-items: center;
}

.mobile-panel.open {
  transform: translateX(0);
  opacity: 1;
}

.mobile-panel a {
  text-decoration: none;
  font-size: 1.1rem;
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  letter-spacing: normal;
  color: #fff;
  text-shadow: none;
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 2px solid rgba(255,255,255,0.3);
  transition: background 0.18s, color 0.18s, font-weight 0.18s, letter-spacing 0.18s;
}
.mobile-panel a:last-child {
  border-bottom: none;
}

.mobile-panel a:hover {
  color: #0b66c2;
  background: rgba(255,255,255,0.9);
  font-weight: 700;
  letter-spacing: 0.05em;
}

.mobile-panel p {
  font-family: 'Inter', sans-serif;
  color: rgba(255,255,255,0.75);
  letter-spacing: normal;
  text-shadow: none;
  text-align: center;
  margin-top: 32px !important;
  margin-bottom: 0 !important;
}

@media (max-width: 1100px) {
  .hamburger { display: flex; }
  .site-header nav { display: none; }
  .site-header .logo {
    font-size: 1.3rem;
  }
}
@media (min-width: 1101px) {
  .mobile-panel { display: none !important; }
}

@media (max-width: 1200px) {
  :root {
    --header-height: 56px;
  }
  .site-header {
    font-size: 0.9rem;
  }
  .site-header .logo {
    font-size: 1.3rem;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 48px;
  }
  .site-header {
    font-size: 0.8rem;
  }
  .site-header .logo {
    font-size: 1.1rem;
  }
}

@media (max-width: 480px) {
  .site-header { padding: 0 0.75rem; }
  .site-header .logo { font-size: 1.1rem; }
  .site-header nav a { padding: 0.6rem 0.8rem; font-size: 0.95rem; }
  .mobile-panel { width: min(var(--side-panel-width), 90vw); padding: 16px; box-sizing: border-box; }
  .mobile-panel a { padding: 0.75rem 12px; font-size: 1.12rem; }
}

@media (min-width: 481px) and (max-width: 1100px) {
  .mobile-panel { width: min(320px, 86vw); }
}

/* スマホでは扉絵(hero)が縦に長すぎるため高さを抑える(トップページの動画ヒーローは対象外) */
@media (max-width: 767px) {
  .hero {
    height: 160px !important;
  }
}

/* ニュース欄・実績カードの共通スタイル */
.news-section {
  max-width: 960px;
  margin: 0 auto;
  padding: 52px 32px;
  border-bottom: 1px solid transparent;
  border-image: linear-gradient(to right, #0b66c2 0%, #b8cfe8 28%, transparent 65%) 1;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.news-section.ns-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (max-width: 768px) {
  .news-section { padding: 36px 20px; }
}

/* 本文コンテナ: 広いデスクトップ画面では余白を減らすため少し広げる */
#main-content {
  max-width: 1000px;
}
@media (min-width: 1100px) {
  #main-content {
    max-width: 1200px;
  }
  .news-section {
    max-width: 1200px;
  }
}

.news-card {
  width: 100%;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  color: #1a2332;
}
.news-card h2 {
  font-family: 'Inter', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: #0d1b2a;
  margin: 0 0 28px;
  padding-left: 18px;
  border-left: 5px solid transparent;
  border-image: linear-gradient(to bottom, #1565c0, #42a5f5) 1;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.news-card h2::after {
  display: none;
}
@media (max-width: 768px) {
  .news-card h2 { font-size: 1.3rem; margin-bottom: 20px; }
}

/* 開発実績カード等の共通フェードイン(グリッドの列数などレイアウトはページごとに定義) */
.jisseki-item {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.jisseki-item.visible {
  opacity: 1;
  transform: translateY(0);
}

/* トップに戻るボタン */
#floatTopBtn{position:fixed;right:18px;bottom:28px;width:56px;height:56px;border-radius:6px;background:#888;color:#fff;display:flex;align-items:center;justify-content:center;box-shadow:0 4px 12px rgba(0,0,0,0.2);border:none;cursor:pointer;z-index:2000;opacity:0;transform:translateY(12px) scale(.98);transition:opacity .26s,transform .26s}
#floatTopBtn.show{opacity:1;transform:translateY(0) scale(1)} #floatTopBtn.hidden{display:none!important}
#floatTopBtn svg{width:22px;height:22px;display:block}

/* フッター */
.site-footer {
  text-align: center;
}
.footer-brand-name {
  display: block;
  font-size: clamp(0.95rem, 4vw, 1.45rem);
  font-weight: 700;
  color: #1a2332;
  letter-spacing: 0.05em;
  font-family: 'Inter', sans-serif;
  word-break: break-word;
}
.footer-nav {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  max-width: 480px;
  margin: 0 auto 12px;
  text-align: left;
}
@media (min-width: 768px) {
  .site-footer {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding-left: 48px !important;
    padding-right: 48px !important;
  }
  .footer-nav {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: repeat(5, auto);
    grid-auto-flow: column;
    max-width: 640px;
    margin: 0;
    flex-shrink: 1;
  }
  .footer-brand {
    text-align: right;
    flex-shrink: 0;
    line-height: 1.9;
  }
}
.footer-nav-link {
  color: rgba(26,35,50,0.6);
  text-decoration: none;
  padding: 4px 8px;
  white-space: nowrap;
  transition: color 0.18s;
}
.footer-nav-link:hover {
  color: #1a2332;
  text-decoration: underline;
}

/* 印刷用調整: 固定ヘッダー・操作系UIを除外し、スクロール連動の
   フェードイン要素(未表示のまま止まっているもの)を強制的に表示する */
@media print {
  .site-header,
  .hamburger,
  .mobile-panel,
  #floatTopBtn {
    display: none !important;
  }
  .hero {
    margin-top: 0 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .news-section,
  .jisseki-item {
    opacity: 1 !important;
    transform: none !important;
  }
  .footer-brand img {
    opacity: 1 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}
