/* =========================================
   防犯カメラ販売工事センター - 共通スタイル
   v5 - 2026/04 サイドバー・レイアウト修正
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700&family=Oswald:wght@500;700&display=swap');

/* ===== CSS変数 ===== */
:root {
  --navy:        #0f5f78;
  --navy-mid:    #177e9f;
  --blue:        #0f5f78;
  --blue-light:  #1a9ac4;
  --accent:      #f5a623;
  --accent-light:#f7bc55;
  --gray-bg:     #eef7fa;
  --gray-border: #b8d9e6;
  --gray-text:   #4a6a78;
  --white:       #ffffff;
  --danger:      #c0392b;
  --success:     #27ae60;
}

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

body {
  font-family: 'Noto Sans JP', sans-serif;
  background: var(--gray-bg);
  color: var(--navy);
  line-height: 1.7;
}

/* ===== STICKY HEADER ===== */
.sticky-header {
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

header { background: #ffffff; border-bottom: 3px solid var(--navy-mid); }
.header-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 24px;
}
.logo {
  color: var(--navy);
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 1.9rem; font-weight: 700;
  text-decoration: none; letter-spacing: 0.02em;
  display: flex; align-items: center; gap: 12px;
}
.logo:hover { color: var(--navy-mid); }
.logo-img {
  height: 52px; width: 52px;
  object-fit: contain; flex-shrink: 0; border-radius: 4px;
}
.header-contact-btn {
  display: flex; align-items: center; gap: 8px;
  background: var(--accent); color: var(--navy);
  font-weight: 700; font-size: 0.88rem;
  padding: 10px 20px; border-radius: 6px;
  text-decoration: none; white-space: nowrap;
  transition: background 0.2s, transform 0.15s;
  letter-spacing: 0.03em;
}
.header-contact-btn:hover { background: var(--accent-light); transform: translateY(-1px); }
.header-contact-icon { font-size: 1rem; }
.header-contact-text { font-size: 0.88rem; }

/* ===== NAV ===== */
nav { background: var(--navy-mid); border-top: 3px solid var(--accent); position: relative; }
.nav-inner {
  max-width: 1100px; margin: 0 auto; padding: 0;
  display: flex; flex-wrap: wrap;
  justify-content: center; align-items: center;
}
.nav-inner a {
  color: #ffffff; text-decoration: none;
  font-size: 0.92rem; font-weight: 700; padding: 12px 15px;
  display: block; transition: color 0.15s, background 0.15s;
  white-space: nowrap; letter-spacing: 0.03em;
}
.nav-inner a:hover { color: #ffff99; background: rgba(255,255,255,0.1); }
.nav-inner a.active { color: #ffff99; }

/* ===== HAMBURGER ===== */
.hamburger {
  display: none !important;
  position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  padding: 8px; z-index: 101;
  flex-direction: column; justify-content: center; gap: 5px;
}
.hamburger span {
  display: block; width: 22px; height: 2px;
  background: rgba(255,255,255,0.8); border-radius: 2px;
  transition: transform 0.25s, opacity 0.2s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-overlay {
  display: none; position: fixed; inset: 0; z-index: 99;
  background: rgba(0,0,0,0.45);
}
.nav-overlay.open { display: block; }

@media (max-width: 760px) {
  .hamburger { display: flex !important; }
  nav { min-height: 44px; }
  .nav-inner {
    display: none; position: fixed;
    top: 0; right: 0;
    width: min(280px, 80vw); height: 100dvh;
    background: var(--navy);
    flex-direction: column; flex-wrap: nowrap;
    justify-content: flex-start;
    padding: 72px 0 24px; z-index: 100;
    box-shadow: -4px 0 24px rgba(0,0,0,0.4);
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.25s ease;
  }
  .nav-inner.open { display: flex; transform: translateX(0); }
  .nav-inner a { padding: 15px 28px; border-bottom: 1px solid rgba(255,255,255,0.06); font-size: 0.95rem; }
}

/* ===== NAV DROPDOWN ===== */
.nav-dropdown { position: relative; display: inline-block; }
.nav-dropdown-trigger {
  color: #ffffff; text-decoration: none;
  font-size: 0.92rem; font-weight: 700; padding: 12px 15px;
  display: block; transition: color 0.15s, background 0.15s;
  white-space: nowrap; cursor: pointer;
  user-select: none; letter-spacing: 0.03em;
}
.nav-dropdown-trigger:hover,
.nav-dropdown:hover .nav-dropdown-trigger { color: #ffff99; background: rgba(255,255,255,0.1); }
.nav-dropdown-trigger.active { color: #ffff99; }
.nav-dropdown-menu {
  display: none; position: absolute;
  top: 100%; left: 0;
  background: var(--navy); border-top: 2px solid var(--accent);
  border-radius: 0 0 8px 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  min-width: 160px; z-index: 200;
}
.nav-dropdown:hover .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a {
  display: block; padding: 11px 18px;
  color: rgba(255,255,255,0.8); text-decoration: none;
  font-size: 0.82rem; border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: background 0.15s, color 0.15s; white-space: nowrap;
}
.nav-dropdown-menu a:last-child { border-bottom: none; }
.nav-dropdown-menu a:hover { background: rgba(255,255,255,0.1); color: #ffff99; }
.nav-dropdown-menu a.active { color: #ffff99; font-weight: 700; }

@media (max-width: 760px) {
  .nav-dropdown { display: contents; }
  .nav-dropdown-trigger { display: block; padding: 15px 28px; border-bottom: 1px solid rgba(255,255,255,0.06); font-size: 0.95rem; }
  .nav-dropdown-menu { display: block; position: static; box-shadow: none; border: none; border-radius: 0; background: rgba(0,0,0,0.2); }
  .nav-dropdown-menu a { padding: 12px 40px; font-size: 0.88rem; }
}

/* ===== PAGE HERO ===== */
.page-hero {
  background:
    linear-gradient(135deg, rgba(10,60,100,0.82) 0%, rgba(15,95,150,0.76) 50%, rgba(20,120,180,0.72) 100%),
    url('img/hero_bg.jpg') center center / cover no-repeat;
  padding: 52px 24px 44px; position: relative; overflow: hidden;
}
.page-hero-inner { max-width: 900px; margin: 0 auto; position: relative; text-align: center; }
.breadcrumb { font-size: 0.78rem; color: rgba(255,255,255,0.5); margin-bottom: 16px; }
.breadcrumb a { color: rgba(255,255,255,0.6); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent-light); }
.page-hero h1 {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: #fff; letter-spacing: 0.08em; margin-bottom: 10px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.35), 0 4px 24px rgba(0,0,0,0.2);
}
.page-hero .subtitle { color: rgba(255,255,255,0.75); font-size: 0.92rem; }
.accent-bar { width: 56px; height: 4px; background: var(--accent); margin: 16px auto; border-radius: 2px; }

/* ===== TOP HERO (index.html専用) ===== */
.hero-catch { margin-bottom: 28px; }
.hero-catch-main {
  font-size: clamp(1.2rem, 2.2vw, 1.55rem); font-weight: 700;
  color: #fff; line-height: 1.6; margin-bottom: 10px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.hero-catch-sub {
  font-size: clamp(1.3rem, 2.5vw, 1.75rem); font-weight: 700;
  color: #fff; line-height: 1.5; margin-bottom: 16px;
}
.hero-catch-sub em { font-style: normal; color: #ffee55; }
.hero-catch-bar {
  display: inline-block; background: #ff6600; color: #fff;
  font-size: clamp(0.95rem, 1.6vw, 1.15rem); font-weight: 700;
  padding: 10px 20px; border-radius: 4px; letter-spacing: 0.02em;
  box-shadow: 0 4px 16px rgba(255,102,0,0.45);
}
.top-hero {
  background:
    linear-gradient(135deg, rgba(10,60,100,0.82) 0%, rgba(15,95,150,0.76) 50%, rgba(20,120,180,0.72) 100%),
    url('img/hero_bg.jpg') center center / cover no-repeat;
  position: relative;
}
.top-hero-inner {
  position: relative; z-index: 2;
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 260px;
  gap: 40px; align-items: center;
  padding: 60px 40px 56px;
}
.top-hero-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.top-hero-badge {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.95);
  font-size: 0.74rem; padding: 5px 13px; border-radius: 20px;
  backdrop-filter: blur(4px);
}
.top-hero-badge strong { color: #ffee55; }
.top-hero-cta { display: flex; flex-direction: column; gap: 16px; }
.top-hero-right { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.top-hero-stats { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.top-hero-stat {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 10px; padding: 14px 16px; text-align: center;
  backdrop-filter: blur(6px);
}
.top-hero-stat-num {
  font-family: 'Oswald', sans-serif;
  font-size: 1.7rem; color: #ffffff; line-height: 1;
}
.top-hero-stat-label { font-size: 0.68rem; color: rgba(255,255,255,0.65); margin-top: 4px; }

@media (max-width: 700px) {
  .top-hero-inner { grid-template-columns: 1fr !important; padding: 36px 16px 32px !important; }
  .top-hero-right { display: none; }
  .hero-catch { flex-direction: column !important; }
  .hero-catch > img { display: none !important; }
  .top-hero-right { flex-direction: row; align-items: flex-start; }
  .top-hero-stats { flex-direction: column; gap: 8px; flex: 1; }
}

/* ===== CONTENT AREA ===== */
.content-wrap {
  max-width: 1060px; margin: 0 auto;
  padding: 48px 20px 72px;
}
.content-wrap.with-sidebar {
  display: grid; grid-template-columns: 1fr 220px; gap: 32px; align-items: start;
}
.main-content { min-width: 0; }

/* ===== CARDS ===== */
.card {
  background: var(--white); border-radius: 12px;
  box-shadow: 0 4px 24px rgba(13,31,60,0.09);
  padding: 36px 40px; margin-bottom: 28px;
}
.card:last-child { margin-bottom: 0; }
.card h2 {
  font-size: 1.3rem; font-weight: 700; color: var(--navy);
  padding-bottom: 14px; border-bottom: 2px solid var(--gray-bg);
  margin-bottom: 22px; display: flex; align-items: center; gap: 10px;
}
.card h3 { font-size: 1.05rem; font-weight: 700; color: var(--navy); margin: 20px 0 10px; }
.section-card h3 { transition: color 0.2s; }
.section-card:hover h3 { color: var(--blue-light); }
.card p { color: #3a4a60; margin-bottom: 14px; font-size: 0.94rem; }
.card p:last-child { margin-bottom: 0; }

/* ===== SECTION GRID ===== */
.section-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px; margin-top: 8px;
}
.section-card {
  background: var(--white); border-radius: 10px;
  box-shadow: 0 3px 16px rgba(13,31,60,0.08);
  padding: 28px 26px; text-decoration: none; color: var(--navy);
  display: flex; flex-direction: column; gap: 10px;
  border: 1.5px solid transparent;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.section-card:hover {
  border-color: var(--blue); transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(13,31,60,0.14);
}
.section-card .icon {
  width: 48px; height: 48px; background: #eef4fc; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; font-size: 1.4rem;
}
.section-card h3 { font-size: 1rem; font-weight: 700; color: var(--navy); margin: 0; }
.section-card p { font-size: 0.85rem; color: var(--gray-text); margin: 0; }
.section-card .arrow { margin-top: auto; font-size: 0.82rem; color: var(--blue); font-weight: 700; }

/* ===== TABLE ===== */
.styled-table {
  width: 100%; border-collapse: collapse; font-size: 0.9rem; margin: 16px 0;
}
.styled-table th {
  background: var(--navy); color: var(--white);
  padding: 11px 16px; text-align: left; font-weight: 700;
}
.styled-table td {
  padding: 10px 16px; border-bottom: 1px solid var(--gray-border); vertical-align: top;
}
.styled-table tr:last-child td { border-bottom: none; }
.styled-table tr:nth-child(even) td { background: var(--gray-bg); }

/* ===== PRICE TABLE ===== */
.price-table {
  width: 100%; border-collapse: collapse; font-size: 0.9rem; margin: 16px 0;
}
.price-table th {
  background: var(--navy); color: var(--white);
  padding: 12px 16px; text-align: center; font-weight: 700;
}
.price-table td { padding: 12px 16px; border: 1px solid var(--gray-border); vertical-align: middle; }
.price-table .price-val { font-family: 'Oswald', sans-serif; font-size: 1.2rem; color: var(--blue); }
.price-table .price-val.main { font-size: 1.8rem; color: var(--navy); font-weight: 700; }
.price-table tr.highlight td { background: #fff9ed; }
.price-table tr.sub td { background: var(--gray-bg); }
.price-table tr.sub .price-val { font-size: 1rem; color: var(--gray-text); }

/* ===== CTA BUTTON ===== */
.cta-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px; background: var(--accent);
  color: var(--navy); font-weight: 700; font-size: 0.93rem;
  border-radius: 7px; text-decoration: none;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 14px rgba(232,160,32,0.3);
}
.cta-btn:hover {
  background: var(--accent-light); transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(232,160,32,0.42);
}
.cta-btn.large { padding: 17px 34px; font-size: 1.02rem; }
.cta-btn.secondary {
  background: transparent;
  border: 1.5px solid rgba(255,255,255,0.35);
  color: rgba(255,255,255,0.85); box-shadow: none;
}
.cta-btn.secondary:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.6);
  color: #fff; transform: translateY(-2px);
}

/* ===== FLOW STEPS (works_newly.html等) ===== */
.flow-steps { display: flex; flex-direction: column; }
.flow-step { display: flex; gap: 20px; position: relative; padding-bottom: 28px; }
.flow-step::before {
  content: ''; position: absolute;
  left: 23px; top: 48px; bottom: 0;
  width: 2px; background: var(--gray-border);
}
.flow-step:last-child::before { display: none; }
.flow-step:last-child { padding-bottom: 0; }
.step-num {
  flex-shrink: 0; width: 48px; height: 48px;
  background: var(--navy); color: var(--accent-light);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-family: 'Oswald', sans-serif; font-size: 1.1rem; font-weight: 700; z-index: 1;
}
.step-body { flex: 1; padding-top: 4px; }
.step-body h4 { font-size: 1rem; font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.step-body p { font-size: 0.88rem; color: var(--gray-text); margin: 0; line-height: 1.7; }

/* ===== SIDEBAR ===== */
.sidebar { display: flex; flex-direction: column; gap: 20px; }
.sidebar-card {
  background: var(--white); border-radius: 12px;
  box-shadow: 0 4px 20px rgba(13,31,60,0.09); padding: 24px;
}
.sidebar-card h3 {
  font-size: 0.95rem; font-weight: 700; color: var(--navy);
  padding-bottom: 12px; border-bottom: 2px solid var(--gray-bg);
  margin-bottom: 16px; display: flex; align-items: center; gap: 8px;
}
.sidebar-card .icon-sm {
  width: 26px; height: 26px; background: var(--navy); border-radius: 5px;
  display: flex; align-items: center; justify-content: center; font-size: 0.85rem; flex-shrink: 0;
}
.sidebar-dark {
  background: var(--navy); border-radius: 12px; padding: 24px;
  color: rgba(255,255,255,0.75); font-size: 0.85rem;
}
.sidebar-dark h3 {
  font-size: 0.95rem; font-weight: 700; color: var(--white);
  margin-bottom: 14px; display: flex; align-items: center; gap: 8px;
}
.sidebar-dark ul { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.sidebar-dark ul li { display: flex; align-items: flex-start; gap: 8px; }
.sidebar-dark ul li::before { content: '✓'; color: var(--accent-light); font-weight: 700; flex-shrink: 0; }

/* ===== SUB NAV (サイドバーナビ) ===== */
.sub-nav {
  background: var(--white); border-radius: 10px;
  box-shadow: 0 3px 16px rgba(13,31,60,0.08);
  padding: 6px 0; margin-bottom: 24px; overflow: hidden;
}
.sub-nav a {
  display: block; padding: 10px 20px;
  font-size: 0.88rem; color: var(--navy-mid); text-decoration: none;
  border-left: 3px solid transparent; transition: all 0.15s;
}
.sub-nav a:hover { background: var(--gray-bg); border-left-color: var(--blue); color: var(--blue); }
.sub-nav a.active { background: #eef4fc; border-left-color: var(--blue); color: var(--blue); font-weight: 700; }

/* ===== BADGE / ALERT ===== */
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 20px;
  font-size: 0.75rem; font-weight: 700;
}
.badge-blue { background: #eef4fc; color: var(--blue); }
.badge-accent { background: #fef3dc; color: #a06800; }
.badge-gray { background: var(--gray-bg); color: var(--gray-text); }

.alert-box {
  border-radius: 8px; padding: 16px 20px;
  font-size: 0.88rem; margin: 16px 0;
  display: flex; gap: 12px; align-items: flex-start;
}
.alert-box.info { background: #eef4fc; border-left: 4px solid var(--blue); color: #1a3a6a; }
.alert-box.warning { background: #fffbf0; border-left: 4px solid var(--accent); color: #7a5c00; }
.alert-box.danger { background: #fdecea; border-left: 4px solid var(--danger); color: #7a1515; }
.alert-box .icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 1px; }

/* ===== ACHIEVEMENT GRID (achievement.html) ===== */
.achievement-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px; margin-top: 8px;
}
.achievement-item {
  background: var(--white); border-radius: 10px;
  box-shadow: 0 2px 12px rgba(13,31,60,0.08); overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.achievement-item:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(13,31,60,0.14); }
.achievement-item img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.achievement-item .caption { padding: 10px 12px; font-size: 0.82rem; color: var(--navy); font-weight: 500; }
.achievement-item .location { font-size: 0.75rem; color: var(--gray-text); }

/* ===== CTA SECTION (ネイビー背景の見積ブロック) ===== */
.cta-section {
  background: var(--navy); border-radius: 12px;
  padding: clamp(24px,5vw,44px) clamp(16px,5vw,40px);
  text-align: center; color: #fff;
}
.cta-section h2 {
  font-family: 'Oswald', sans-serif; font-size: 1.8rem; color: #fff;
  margin: 0 0 24px; border: none; padding: 0;
  text-align: center; justify-content: center;
}
.cta-section p { font-size: 0.85rem; color: rgba(255,255,255,0.6); margin: 0 0 6px; }
.cta-btn-group {
  display: flex; gap: 12px; justify-content: center;
  flex-wrap: wrap; align-items: stretch;
}
.cta-btn-group .cta-btn {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; flex: 1; min-width: 160px; max-width: 280px;
}

/* ===== FOOTER ===== */
footer { background: var(--navy); padding: 32px 24px 24px; text-align: center; }
.footer-links {
  display: flex; flex-wrap: wrap;
  justify-content: center; align-items: center;
  max-width: 1060px; margin: 0 auto 16px; gap: 0;
}
.footer-links a {
  color: rgba(255,255,255,0.55); text-decoration: none;
  font-size: 0.82rem; padding: 7px 16px;
  border-right: 1px solid rgba(255,255,255,0.15);
  transition: color 0.15s; display: inline-block;
}
.footer-links a:last-child { border-right: none; }
.footer-links a:hover { color: var(--accent-light); }
.footer-copy { font-size: 0.75rem; color: rgba(255,255,255,0.3); }

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
  .header-inner { padding: 8px 12px; }
  .logo { font-size: 1.05rem; gap: 6px; }
  .logo-img { height: 36px; width: 36px; }
  .header-contact-btn { padding: 8px 12px; font-size: 0.8rem; }
  .header-contact-text { display: none; }
}

@media (max-width: 700px) {
  .styled-table, .price-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; }
  .styled-table th, .styled-table td,
  .price-table th, .price-table td { white-space: normal; }
  .alert-box { flex-direction: column; gap: 8px; }
  .flow-step { gap: 14px; }
}

@media (max-width: 820px) {
  .content-wrap.with-sidebar { grid-template-columns: 1fr !important; padding: 24px 14px 52px; }
  .card { padding: 24px 20px; }
  .section-grid { grid-template-columns: 1fr 1fr; }
  .achievement-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}
@media (max-width: 500px) {
  .section-grid { grid-template-columns: 1fr; }
}
