/*
Theme Name: SOFTEC Custom Theme
Author: SOFTEC
Description: ソフテックMC オリジナルテーマ (ドロップダウン対応版)
Version: 1.2
*/

:root {
  --accent: #0055ff;
  --text-main: #0a0a0a;
  --text-sub: #555;
  --bg: #ffffff;
  --line: rgba(0, 85, 255, 0.05);
  --card-bg: rgba(255, 255, 255, 0.8);
}

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

body {
  background-color: var(--bg);
  color: var(--text-main);
  font-family: "Inter", "Noto Sans JP", sans-serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* 共通設定 */
a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }

/* 共通：記事・固定ページ */
.generic-page {
  padding: 120px 8% 80px;
  max-width: 1000px;
  margin: 0 auto;
  min-height: 60vh;
}
.generic-page h1 {
  font-size: 2.2rem;
  margin-bottom: 40px;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 10px;
}
.generic-content p { line-height: 1.8; margin-bottom: 20px; }

/* 背景・演出 */
.grid-bg {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background-image: 
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 50px 50px;
  z-index: -2;
}
.scanline {
  position: fixed; top: 0; left: 0; width: 100%; height: 10vh;
  background: linear-gradient(to bottom, transparent, rgba(0, 85, 255, 0.04), transparent);
  z-index: 100; pointer-events: none; animation: scan 6s linear infinite;
}
@keyframes scan { from { top: -10vh; } to { top: 110vh; } }

/* 画像設定 */
.img-container { overflow: hidden; position: relative; background: #f0f4ff; }
.img-container img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1); }

/* ▼▼▼ ヘッダー設定（PC版） ▼▼▼ */
header {
  position: fixed; top: 0; width: 100%; height: 80px; padding: 0 40px;
  display: flex; justify-content: space-between; align-items: center;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 85, 255, 0.1);
}

.logo { font-size: 1.4rem; font-weight: 800; letter-spacing: -0.02em; display: flex; align-items: center; gap: 8px; }
.logo span { color: var(--accent); }

/* ナビゲーション基本 */
.nav-list { display: flex; gap: 30px; align-items: center; }

.nav-item { position: relative; } /* ドロップダウンの基準 */

.nav-item > a {
  font-size: 0.85rem; font-weight: 600; letter-spacing: 0.05em;
  color: var(--text-main); display: block; padding: 10px 0;
}
.nav-item > a:hover { color: var(--accent); }

/* ドロップダウンメニュー (PC) */
.sub-menu {
  position: absolute;
  top: 100%; left: -20px;
  background: #fff;
  min-width: 240px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  border-top: 2px solid var(--accent);
  opacity: 0; visibility: hidden; /* 初期状態は隠す */
  transform: translateY(10px);
  transition: 0.3s;
  padding: 10px 0;
  border-radius: 0 0 4px 4px;
}

/* ホバーで表示 */
.nav-item:hover .sub-menu {
  opacity: 1; visibility: visible;
  transform: translateY(0);
}

.sub-menu li a {
  display: block;
  padding: 12px 20px;
  font-size: 0.85rem;
  color: #555;
  border-bottom: 1px solid #f5f5f5;
}
.sub-menu li a:hover {
  background: #f8faff; color: var(--accent); padding-left: 25px; /* 右に動く演出 */
}
.sub-menu li:last-child a { border-bottom: none; }

/* CONTACTボタン */
.contact-btn a {
  padding: 10px 24px !important;
  background: var(--text-main);
  color: #fff !important;
  border-radius: 4px;
  font-size: 0.8rem;
}
.contact-btn a:hover {
  background: var(--accent);
  box-shadow: 0 4px 15px rgba(0, 85, 255, 0.3);
}

/* ▼▼▼ スマホ用メニューボタン (PCでは非表示) ▼▼▼ */
.mobile-menu-btn {
  display: none; background: none; border: none; cursor: pointer;
  width: 30px; height: 24px; position: relative; z-index: 2000;
}
.mobile-menu-btn span {
  display: block; width: 100%; height: 2px; background-color: var(--text-main);
  position: absolute; left: 0; transition: 0.3s;
}
.mobile-menu-btn span:nth-child(1) { top: 0; }
.mobile-menu-btn span:nth-child(2) { top: 11px; }
.mobile-menu-btn span:nth-child(3) { bottom: 0; }

.mobile-menu-btn.active span:nth-child(1) { transform: rotate(45deg); top: 11px; }
.mobile-menu-btn.active span:nth-child(2) { opacity: 0; }
.mobile-menu-btn.active span:nth-child(3) { transform: rotate(-45deg); bottom: 11px; }

/* ▼▼▼ レスポンシブ (スマホ・タブレット) ▼▼▼ */
@media (max-width: 1024px) {
  header { padding: 0 20px; }
  
  /* ボタンを表示 */
  .mobile-menu-btn { display: block; }

  /* ナビゲーションをスマホ用に変更 */
  nav {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    z-index: 1500;
    transition: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    transform: translateX(100%); opacity: 0; pointer-events: none;
    display: flex; justify-content: center; padding-top: 80px; /* 上部を空ける */
    overflow-y: auto; /* スクロール可能に */
  }

  nav.active {
    transform: translateX(0); opacity: 1; pointer-events: auto;
  }

  /* リストを縦並びに */
  .nav-list { flex-direction: column; width: 100%; gap: 0; padding-bottom: 100px; }

  .nav-item { width: 100%; text-align: center; }
  
  /* 親メニュー */
  .nav-item > a {
    font-size: 1.4rem; padding: 20px;
    border-bottom: 1px solid #eee;
  }

  /* CONTACTボタン修正 */
  .contact-btn { margin-top: 30px; border: none; }
  .contact-btn a {
    display: inline-block; width: auto; font-size: 1rem; padding: 15px 50px !important;
  }

  /* スマホでのサブメニュー（常時表示でインデント） */
  .sub-menu {
    position: static; /* 浮かさない */
    opacity: 1; visibility: visible;
    transform: none;
    box-shadow: none; border: none;
    background: #f9f9f9;
    padding: 0;
    min-width: auto;
  }

  .sub-menu li a {
    font-size: 1rem;
    padding: 15px 0;
    color: #666;
    border-bottom: 1px solid #eee;
  }
  .sub-menu li a:hover { padding-left: 0; background: none; color: var(--accent); }
}

/* 他のスタイル（TOPページ等）は維持 */
.hero-section { min-height: 90vh; display: grid; grid-template-columns: 1fr 1.1fr; align-items: center; padding-top: 80px; }
.hero-text { padding: 0 5% 0 10%; z-index: 2; }
.hero-tag { color: var(--accent); font-weight: bold; font-size: 0.85rem; letter-spacing: 0.3em; margin-bottom: 24px; display: block; }
.hero h1 { font-size: clamp(3rem, 5vw, 4.5rem); line-height: 1.1; margin-bottom: 30px; font-weight: 800; letter-spacing: -0.02em; }
.mask { overflow: hidden; display: block; }
.mask span { display: block; transform: translateY(110%); animation: rise 1s cubic-bezier(0.2, 1, 0.3, 1) forwards; }
.hero-desc { color: var(--text-sub); font-size: 1.05rem; line-height: 1.8; opacity: 0; animation: fadein 1s 0.6s forwards; margin-bottom: 40px; }
.hero-img { height: 85vh; position: relative; clip-path: polygon(15% 0, 100% 0, 100% 100%, 0% 100%); }
.hero-img .img-container { width: 100%; height: 100%; }
.parallax-img { transform: scale(1.1); }
@keyframes rise { to { transform: translateY(0); } }
@keyframes fadein { to { opacity: 1; } }

/* セクション・カード・フッター等（以前と同じものを維持） */
section.main-sec { padding: 100px 8%; max-width: 1400px; margin: 0 auto; }
.sec-title-area { margin-bottom: 60px; }
.sec-title { font-size: 2rem; font-weight: 700; margin-bottom: 15px; }
.sec-sub { color: var(--text-sub); }
.rev { opacity: 0; transform: translateY(40px); transition: 1s cubic-bezier(0.2, 1, 0.3, 1); }
.rev.active { opacity: 1; transform: translateY(0); }
.business-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px; }
.glass-card { background: var(--card-bg); border: 1px solid #f0f0f0; backdrop-filter: blur(5px); transition: 0.4s; display: flex; flex-direction: column; border-radius: 8px; overflow: hidden; height: 100%; }
.glass-card:hover { border-color: var(--accent); box-shadow: 0 20px 50px rgba(0, 85, 255, 0.1); transform: translateY(-8px); }
.card-img-box { height: 240px; width: 100%; overflow: hidden; }
.glass-card:hover .card-img-box img { transform: scale(1.08); }
.card-body { padding: 30px; flex-grow: 1; display: flex; flex-direction: column; }
.card-tag { font-size: 0.75rem; color: var(--accent); font-weight: bold; margin-bottom: 12px; letter-spacing: 0.1em; display: inline-block; background: rgba(0, 85, 255, 0.05); padding: 4px 8px; border-radius: 2px; }
.card-title { font-size: 1.4rem; font-weight: bold; margin-bottom: 15px; line-height: 1.4; color: var(--text-main); }
.card-text { font-size: 0.95rem; color: var(--text-sub); line-height: 1.8; margin-bottom: 25px; flex-grow: 1; }
.card-arrow { font-size: 1.2rem; color: var(--accent); align-self: flex-end; font-weight: bold; }
.info-section { background: #f8faff; border-top: 1px solid #eef2ff; }
.info-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 40px; border-bottom: 2px solid var(--accent); padding-bottom: 20px; }
.info-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.info-item { display: block; text-decoration: none; color: var(--text-main); transition: 0.3s; padding: 25px; background: #fff; border: 1px solid #eee; }
.info-item:hover { border-color: var(--accent); transform: translateY(-5px); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05); }
.i-date { font-size: 0.8rem; color: #999; margin-bottom: 10px; display: block; }
.i-cat { color: var(--accent); font-weight: bold; font-size: 0.75rem; margin-right: 10px; border: 1px solid var(--accent); padding: 2px 6px; border-radius: 2px; }
.i-title { font-size: 1rem; font-weight: bold; line-height: 1.6; }
footer { padding: 80px 10%; background: #fff; border-top: 1px solid #eee; }
.footer-inner { display: flex; justify-content: space-between; align-items: flex-end; }

/* PC/タブレット調整 */
@media (max-width: 1024px) {
  .hero h1 { font-size: 3.5rem; }
  .info-list { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .hero-section { grid-template-columns: 1fr; padding-top: 80px; gap: 40px; }
  .hero-text { padding: 0 5%; }
  .hero-img { height: 40vh; clip-path: none; }
  .business-grid { grid-template-columns: 1fr; }
}