/* ========================================
   Variables (LP Specific)
   ======================================== */

body.is-subpage {
  overflow-x: visible !important;
  overflow-y: visible !important;
}

/* is-subpage: areas/ ページ用 — body.subpage と同等のフローティングヘッダー */
body.is-subpage header {
  top: 8px;
  padding: 0 20px;
}

body.is-subpage header .header-inner {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border-radius: 80px;
  box-shadow: 0 15px 40px rgba(0, 45, 92, 0.15);
  min-height: 80px;
  border: 1px solid rgba(255, 255, 255, 0.5);
}

body.is-subpage main {
  padding-top: 130px;
}


:root {
  /* Brand Colors - Traffic Accident Theme (Refined 2026) */
  --color-main: #002D5C;
  /* Deeper Navy */
  --color-main-light: #1E4D8C;
  --color-main-dark: #001A36;
  --color-accent: #00C896;
  /* Vibrant Safety Green */
  --color-accent-soft: rgba(0, 200, 150, 0.1);
  --color-cta: #FF9F00;
  /* Energetic Amber Gold */
  --color-cta-dark: #E68A00;
  --color-cta-soft: rgba(255, 159, 0, 0.15);
  --color-text-primary: #1A1A1A;
  /* Near Black for luxury feel */
  --color-text-secondary: #4A4A4A;
  --color-text-muted: #7A7A7A;
  --color-bg-light: #F8FAFC;
  --color-bg-secondary: #EFFAFF;
  --color-white: #ffffff;

  /* Gradients */
  --grad-main: linear-gradient(135deg, var(--color-main) 0%, var(--color-main-light) 100%);
  --grad-cta: linear-gradient(135deg, var(--color-cta) 0%, var(--color-cta-dark) 100%);
  --grad-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.6) 100%);

  /* Shadow & Transitions (Refined) */
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-extra: 0 35px 60px -15px rgba(0, 0, 0, 0.2);

  --transition-base: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), color 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.2s ease;

  /* Typography (Editorial Style) */
  --font-family: 'Outfit', 'Noto Sans JP', sans-serif;
  --font-serif: 'Playfair Display', 'Shippori Mincho', serif;

  /* Spacing */
  --container-width: 1240px;
  --section-padding: 120px 0;
  --section-padding-sp: 80px 0;

  /* Executive Effects */
  --glow-accent: 0 0 20px rgba(0, 200, 150, 0.3);
  --glass-surface: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.4);

  --bg-white: #ffffff;
  --white: #ffffff;
}

.nowrap-phrase {
  display: inline-block;
}



/* Executive Micro-interactions */
.btn-primary {
  position: relative;
  overflow: hidden;
}

.btn-primary::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg,
      transparent 45%,
      rgba(255, 255, 255, 0.1) 50%,
      transparent 55%);
  transform: rotate(-45deg);
  transition: left 0.6s ease, top 0.6s ease;
  pointer-events: none;
  will-change: left, top;
}

.btn-primary:hover::after {
  left: 100%;
  top: 100%;
}

.executive-card {
  background: var(--color-white);
  border-radius: 24px;
  padding: 40px;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(0, 0, 0, 0.03);
  transition: var(--transition-base);
  position: relative;
  overflow: hidden;
  will-change: transform, box-shadow;
}

.executive-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-accent);
}

/* -----------------------------------------
   Step-type Diagnosis Tool Styles
   ----------------------------------------- */
.diag-section {
  padding: 100px 0;
  background: var(--color-bg-secondary);
  position: relative;
  overflow: hidden;
}

.diag-card {
  max-width: 800px;
  margin: 0 auto;
  background: var(--color-white);
  border-radius: 30px;
  padding: 50px;
  box-shadow: var(--shadow-extra);
  position: relative;
}

.diag-progress-container {
  margin-bottom: 40px;
}

.diag-progress-bar {
  height: 8px;
  background: #E2E8F0;
  border-radius: 4px;
  overflow: hidden;
}

.diag-progress-fill {
  height: 100%;
  background: var(--grad-main);
  width: 0%;
  transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.diag-step {
  display: none;
  animation: fadeIn 0.5s ease both;
}

.diag-step.is-active {
  display: block;
}

.diag-question {
  font-family: var(--font-serif);
  font-size: 2rem;
  color: var(--color-main);
  margin-bottom: 30px;
  text-align: center;
}

.diag-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.diag-option {
  padding: 25px;
  border: 2px solid #E2E8F0;
  border-radius: 20px;
  cursor: pointer;
  transition: var(--transition-base);
  text-align: center;
  background: #F8FAFC;
}

.diag-option:hover {
  border-color: var(--color-accent);
  background: var(--color-accent-soft);
  transform: scale(1.02);
}

.diag-option i {
  font-size: 2.5rem;
  margin-bottom: 15px;
  display: block;
}

.diag-option span {
  font-weight: 700;
  font-size: 1.1rem;
}

.diag-result {
  text-align: center;
}

.diag-result-title {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  color: var(--color-main);
  margin-bottom: 20px;
}

.diag-result-desc {
  font-size: 1.2rem;
  margin-bottom: 35px;
  line-height: 1.8;
}

/* Floating Interactive CTA */
.floating-cta {
  position: fixed;
  bottom: 220px; /* Moved up to avoid overlapping with new navigation buttons on PC */
  right: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 15px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@media (max-width: 1150px) {
  .floating-cta { display: none !important; } /* Hidden on mobile in favor of sticky footer */
}

.f-cta-btn {
  width: 70px;
  height: 70px;
  border-radius: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: var(--shadow-lg);
  transition: var(--transition-base);
  text-decoration: none;
  position: relative;
  will-change: transform;
}

.f-cta-btn:hover {
  transform: scale(1.1) rotate(5deg);
}

.f-cta-btn.tel {
  background: var(--color-main);
  display: none;
}

.f-cta-btn.line {
  background: #06C755;
}

.f-cta-btn.form {
  background: var(--color-cta);
}

.f-cta-label {
  position: absolute;
  right: 85px;
  background: white;
  color: #333;
  padding: 8px 15px;
  border-radius: 8px;
  white-space: nowrap;
  font-weight: 700;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateX(20px);
  transition: var(--transition-base);
  pointer-events: none;
  will-change: opacity, transform;
}

.f-cta-btn:hover .f-cta-label {
  opacity: 1;
  transform: translateX(0);
}

/* Background Parallax Patterns */
.parallax-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .diag-options {
    grid-template-columns: 1fr;
  }

  .diag-question {
    font-size: 1.5rem;
  }

  .floating-cta {
    display: none !important;
  }
}

.executive-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 0;
  background: var(--color-accent);
  transition: height 0.4s ease;
}

.executive-card:hover::before {
  height: 100%;
}

/* Counter Animation Styles */
.stat-number {
  font-family: var(--font-family);
  font-weight: 800;
  font-size: 3.5rem;
  color: var(--color-main);
  line-height: 1;
  display: block;
}

.stat-unit {
  font-size: 1.2rem;
  font-weight: 700;
  margin-left: 4px;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: var(--transition-base);
  will-change: transform, opacity;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========================================
   Settlement Calculator Styles
   ======================================== */
.calc-section {
  padding: 100px 0;
  background: var(--color-bg-light);
  position: relative;
}

.calc-box {
  max-width: 600px;
  margin: 0 auto;
  background: #fff;
  border-radius: 24px;
  padding: 40px;
  box-shadow: var(--shadow-extra);
  border: 1px solid rgba(0, 45, 92, 0.05);
}

.calc-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 30px;
  justify-content: center;
}

.calc-header i {
  font-size: 2rem;
  color: var(--color-cta);
}

.calc-header h3 {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  color: var(--color-main);
}

.calc-input-group {
  margin-bottom: 25px;
}

.calc-input-group label {
  display: block;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--color-text-primary);
}

.calc-radio-group {
  display: flex;
  gap: 20px;
}

.calc-radio-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  background: #f1f5f9;
  padding: 10px 15px;
  border-radius: 10px;
  transition: var(--transition-fast);
}

.calc-radio-group input:checked + label,
.calc-radio-group label:has(input:checked) {
  background: var(--color-main);
  color: #fff;
}

.calc-input-group input[type="range"] {
  width: 100%;
  accent-color: var(--color-cta);
  cursor: pointer;
}

.range-value {
  text-align: right;
  font-weight: 800;
  color: var(--color-main);
  margin-top: 5px;
}

.calc-input-group select {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  font-family: inherit;
  font-weight: 700;
}

.calc-result {
  background: var(--color-main);
  color: #fff;
  border-radius: 16px;
  padding: 30px;
  text-align: center;
  margin-top: 30px;
}

.result-label {
  font-size: 0.9rem;
  opacity: 0.9;
  margin-bottom: 5px;
}

.result-amount {
  font-size: 3.5rem;
  font-weight: 900;
  line-height: 1;
}

.result-amount small {
  font-size: 1.5rem;
  margin-left: 5px;
}

.result-note {
  font-size: 0.8rem;
  opacity: 0.8;
  margin-top: 15px;
}

.calc-cta {
  margin-top: 30px;
  text-align: center;
}

.calc-cta .btn {
  display: inline-block;
  width: 100%;
  padding: 18px;
  font-size: 1.1rem;
}

@media (max-width: 768px) {
  .calc-box {
    padding: 30px 20px;
  }
}

/* Accessibility: Skip Link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--color-main);
  color: #ffffff;
  padding: 8px 16px;
  z-index: 9999;
  text-decoration: none;
  font-weight: bold;
  transition: top 0.3s ease;
  border-radius: 0 0 8px 0;
}

.skip-link:focus {
  top: 0;
}

/* ========================================
   Floating Navigation Styles
   ======================================== */

/* Page Top Button */
.page-top-btn {
  position: fixed;
  bottom: 180px;
  right: 30px;
  width: 60px;
  height: 60px;
  background: var(--color-main);
  color: #fff;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: var(--shadow-md);
  line-height: 1;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1000;
}

.page-top-btn.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.page-top-btn:hover {
  background: var(--color-cta);
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.page-top-btn svg {
  width: 20px;
  height: 20px;
  margin-bottom: 2px;
}

.page-top-btn span {
  font-size: 10px;
  font-weight: 900;
  font-family: var(--font-main);
  letter-spacing: 0.05em;
}

/* Section Navigation (Dots) */
.section-nav-container {
  position: fixed;
  right: 30px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 15px;
  z-index: 999;
}

.section-nav-dot {
  width: 12px;
  height: 12px;
  background: rgba(0, 45, 92, 0.2);
  border-radius: 50%;
  cursor: pointer;
  position: relative;
  transition: all 0.3s ease;
}

/* Utility Classes */
@media (max-width: 1150px) { .pc-only { display: none !important; } }

.sp-only {
  display: none !important;
}

@media (max-width: 1150px) { .sp-only { display: block !important; } }

/* Mobile Quick Menu Styles */
.mobile-nav-container {
  position: fixed;
  bottom: 100px;
  right: 20px;
  z-index: 1001;
}

.mobile-nav-trigger {
  width: 56px;
  height: 56px;
  background: var(--color-cta);
  border: none;
  border-radius: 50%;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.mobile-nav-trigger.is-active {
  background: var(--main-blue);
  transform: rotate(45deg);
}

.trigger-icon {
  width: 20px;
  height: 2px;
  background: #fff;
  position: relative;
  margin-bottom: 4px;
}

.trigger-icon::before,
.trigger-icon::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 2px;
  background: #fff;
  left: 0;
  transition: all 0.3s;
}

.trigger-icon::before { top: -6px; }
.trigger-icon::after { top: 6px; }

.trigger-label {
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.mobile-nav-menu {
  position: absolute;
  bottom: 70px;
  right: 0;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  width: 180px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.9);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.mobile-nav-container.is-open .mobile-nav-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.mobile-nav-list {
  padding: 10px 0;
}

.mobile-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  color: var(--main-blue);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.2s;
}

.mobile-nav-item:last-child {
  border-bottom: none;
}

.mobile-nav-item:active {
  background: #f8f9fa;
}

.mobile-nav-item i {
  width: 18px;
  font-size: 1rem;
  color: var(--color-cta);
  text-align: center;
}

/* Page Top Adjustment for Mobile */
@media (max-width: 768px) {
  .page-top-btn {
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    z-index: 1000;
  }
  
  /* Ensure it doesn't overlap with CTA if present, 
     but since we have a menu, we can make it smaller or move it */
  .page-top-btn.is-visible {
    opacity: 0.8;
  }
}
.section-nav-dot.is-active {
  background: var(--color-cta);
  transform: scale(1.3);
}

.section-nav-label {
  position: absolute;
  right: 25px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--color-main);
  color: #fff;
  padding: 5px 12px;
  border-radius: 4px;
  font-size: 0.75rem;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  pointer-events: none;
}

.section-nav-dot:hover .section-nav-label {
  opacity: 1;
  visibility: visible;
  right: 30px;
}

@media (max-width: 768px) {
  .page-top-btn {
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
  }
}

/* ========================================
   Base Styles
   ======================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  color: var(--color-text-primary);
  line-height: 1.8;
  /* Slightly looser for readability especially for older audience */
  background-color: var(--color-white);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: bottom;
}

a {
  color: var(--color-main);
  text-decoration: none;
  transition: opacity 0.3s;
}

a:hover {
  opacity: 0.8;
}

ul,
ol {
  list-style: none;
}

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: var(--section-padding);
}

@media (max-width: 768px) {
  .section {
    padding: var(--section-padding-sp);
  }
}

.section-title {
  font-size: 3.5rem;
  font-weight: 900;
  text-align: center;
  margin-bottom: 24px;
  color: var(--color-main);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.section-title span {
  display: block;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--color-accent);
  margin-bottom: 12px;
  font-weight: 700;
}

.section-subtitle {
  font-size: 1.25rem;
  text-align: center;
  margin-bottom: 80px;
  color: var(--color-text-secondary);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

@media (max-width: 768px) {
  .section-title {
    font-size: 2.25rem;
  }

  .section-subtitle {
    font-size: 1.1rem;
    margin-bottom: 50px;
  }
}

.text-highlight {
  font-weight: bold;
  color: #c0392b;
  /* Red for emphasis text */
}

.marker-yellow {
  background: linear-gradient(transparent 60%, #fff3cd 60%);
  font-weight: bold;
}

/* ========================================
   Header & Navigation
   ======================================== */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), color 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

header.is-scrolled,
body.subpage header {
  top: 20px;
}

.header-container {
  pointer-events: auto;
  transition: padding 0.4s ease, max-width 0.4s ease;
  width: 100%;
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 20px;
}

.header-inner {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 110px;
  padding: 10px 40px;
  background: transparent;
  border-radius: 0;
  transition: background-color 0.4s ease, min-height 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease, padding 0.4s ease;
}

header.is-scrolled .header-inner {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border-radius: 80px;
  box-shadow: 0 15px 40px rgba(0, 45, 92, 0.15);
  /* More refined blue-toned shadow */
  min-height: 80px;
  border: 1px solid rgba(255, 255, 255, 0.5);
}

body.subpage header .header-inner {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border-radius: 80px;
  box-shadow: 0 15px 40px rgba(0, 45, 92, 0.15);
  min-height: 80px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  margin-top: 0;
}

body.subpage main {
  padding-top: 140px;
}

body.subpage header.is-scrolled .header-inner {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border-radius: 80px;
  box-shadow: 0 15px 40px rgba(0, 45, 92, 0.15);
  min-height: 80px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  margin-top: 0;
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.header-bottom {
  display: flex;
  justify-content: center;
  width: 100%;
  padding-top: 5px;
}

.header-logo a {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo-img {
  height: 45px;
  width: auto;
}

.logo-text .office-name {
  font-size: 0.9rem;
  color: var(--color-main);
  font-weight: 800;
  letter-spacing: 0.05em;
}

/* Gnav */
.gnav.pc-only {
  display: flex;
}

.gnav>ul {
  display: flex;
  gap: 20px;
}

.gnav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 16px;
  color: var(--color-text-primary);
  font-weight: bold;
  border-radius: 12px;
  transition: var(--transition-base);
  position: relative;
}

.gnav-link small {
  font-size: 0.6rem;
  color: var(--color-main);
  opacity: 0.7;
  text-transform: uppercase;
}

.gnav-link:hover {
  color: var(--color-accent);
  background: rgba(0, 45, 92, 0.05);
  transform: translateY(-2px);
}

/* Dropdown Menu */
.gnav-item {
  position: relative;
}

.gnav-item.has-dropdown:hover .gnav-link {
  color: var(--color-accent);
}

.dropdown-menu {
  display: block;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  width: 260px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  border-radius: 12px;
  opacity: 0;
  visibility: hidden;
  transition: transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1), opacity 0.3s cubic-bezier(0.165, 0.84, 0.44, 1), background-color 0.3s cubic-bezier(0.165, 0.84, 0.44, 1), border-color 0.3s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.3s cubic-bezier(0.165, 0.84, 0.44, 1), color 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
  z-index: 1100;
  border: 1px solid rgba(0, 64, 112, 0.1);
  padding: 10px 0;
  margin-top: 5px;
}

.dropdown-menu::before {
  content: '';
  position: absolute;
  top: -20px;
  left: 0;
  width: 100%;
  height: 20px;
}

.gnav-item:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.dropdown-item a {
  display: block;
  padding: 12px 24px;
  color: var(--color-text-primary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: transform 0.2s, opacity 0.2s, background-color 0.2s, border-color 0.2s, box-shadow 0.2s, color 0.2s;
  text-align: left;
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.dropdown-item:last-child a {
  border-bottom: none;
}

.dropdown-item a:hover {
  background: var(--color-bg-secondary);
  color: var(--color-main);
  padding-left: 28px;
}

/* Header Right */
.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-contact {
  text-align: right;
  line-height: 1.1;
}

.header-tel-label {
  font-size: 0.7rem;
  color: var(--color-text-secondary);
  display: block;
}

.header-tel-number {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--color-main);
}

.header-cta-btn {
  background: linear-gradient(135deg, var(--color-cta) 0%, var(--color-cta-dark) 100%);
  color: #fff !important;
  padding: 12px 25px;
  border-radius: 50px;
  font-weight: bold;
  font-size: 0.9rem;
  box-shadow: 0 5px 15px rgba(243, 156, 18, 0.4);
  transition: transform 0.3s;
}

.header-cta-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

/* Hamburger */
.hamburger {
  display: none;
  width: 30px;
  height: 20px;
  position: relative;
  cursor: pointer;
  z-index: 2000;
  background: transparent;
  border: none;
  padding: 0;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-main);
  position: absolute;
  left: 0;
  transition: transform 0.4s, opacity 0.4s, background-color 0.4s, border-color 0.4s, box-shadow 0.4s, color 0.4s;
  border-radius: 2px;
}

.hamburger span:nth-child(1) {
  top: 0;
}

.hamburger span:nth-child(2) {
  top: 9px;
}

.hamburger span:nth-child(3) {
  top: 18px;
}

.hamburger.is-active span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.hamburger.is-active span:nth-child(2) {
  opacity: 0;
}

.hamburger.is-active span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* Mobile Nav */
.nav-sp {
  position: fixed;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100vh;
  background: rgba(255, 255, 255, 0.98);
  z-index: 1050;
  padding: 120px 20px 80px;
  transition: left 0.4s ease;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
}

.nav-sp.is-active {
  left: 0;
  pointer-events: auto;
}

.nav-sp .gnav {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.nav-sp .gnav-link {
  font-size: 1.2rem;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid #eee;
}

@media (max-width: 1150px) {
  .header-bottom {
    display: none;
  }

  .header-contact {
    display: none;
  }

  .header-cta-btn.pc-only {
    display: none;
  }

  .hamburger {
    display: block;
  }

  .header-inner {
    min-height: 70px;
    padding: 5px 20px;
  }

  header.is-scrolled .header-inner,
  body.subpage header .header-inner {
    min-height: 60px;
  }

  header {
    top: 10px !important;
  }

  .header-inner {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 40px !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    min-height: 64px !important;
    padding: 0 15px;
    position: relative;
    z-index: 2005;
    border: 1px solid rgba(255, 255, 255, 0.5);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  
  .header-top {
    border-bottom: none !important;
    padding-bottom: 0 !important;
    flex: 1;
  }
  .logo-img {
    height: 38px !important;
  }

  /* Ensure hamburger is visible inside the capsule */
  .hamburger {
    display: block;
    z-index: 2006;
    /* Ensure it stays clickable */
  }

  header.is-scrolled .header-inner,
  body.subpage header .header-inner {
    min-height: 70px;
    top: 0;
  }

  header.is-scrolled,
  body.subpage header {
    top: 10px;
  }
}

/* Header visibility adjustment for light background on hero */
body:not(.subpage) header:not(.is-scrolled) .logo-img {
  filter: none;
}

body:not(.subpage) header:not(.is-scrolled) .logo-text .office-name {
  color: var(--color-main);
  text-shadow: none;
}

body:not(.subpage) header:not(.is-scrolled) .gnav-link {
  color: var(--color-text-primary) !important;
  text-shadow: none;
}

body:not(.subpage) header:not(.is-scrolled) .gnav-link:hover {
  background: rgba(0, 45, 92, 0.05);
  transform: translateY(-2px);
  color: var(--color-main) !important;
}

body:not(.subpage) header:not(.is-scrolled) .gnav-link small {
  color: var(--color-main) !important;
  opacity: 0.7;
}

body:not(.subpage) header:not(.is-scrolled) .header-tel-label {
  color: var(--color-text-secondary) !important;
}

body:not(.subpage) header:not(.is-scrolled) .header-tel-number {
  color: var(--color-main) !important;
  text-shadow: none;
}

body:not(.subpage) header:not(.is-scrolled) .hamburger span {
  background: var(--color-main);
  box-shadow: none;
}

body:not(.subpage) header:not(.is-scrolled) .header-top {
  border-bottom-color: rgba(0, 0, 0, 0.05);
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  /* Jikou LP style - vertical center */
  overflow: hidden;
  background: #f0f0f0;
}

.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease-out, visibility 0s linear 0.5s;
  z-index: 1;
  pointer-events: none;
  display: flex;
  align-items: center;
  padding-top: 100px;
  box-sizing: border-box;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.5s ease-out, visibility 0s linear 0s;
  z-index: 10;
  pointer-events: auto;
}

.slide-background {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}

.slide-background video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
}

.video-placeholder {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
}

.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 620px;
  margin-left: 8%;
  /* Adjust to match Jikou LP feel */
  /* Remove fixed margin-top to allow flex centering */
  padding: 50px 40px;
  /* Glass Card Effect - Refined */
  background: rgba(255, 255, 255, 0.4);
  /* Slightly lighter like Jikou */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 30px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
  opacity: 0;
  transform: translateY(30px);
  pointer-events: none;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.hero-slide.is-active .hero-content {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  animation: fadeInUp 1.0s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: 2.8rem;
  font-weight: 900;
  line-height: 1.3;
  margin-bottom: 25px;
  color: var(--color-main);
  letter-spacing: -0.01em;
  text-shadow: 0 2px 10px rgba(255, 255, 255, 0.5);
}

.hero-description {
  font-size: 1.2rem;
  margin-bottom: 40px;
  color: var(--color-text-secondary);
  font-weight: 600;
  line-height: 1.7;
}

.hero-cta .btn {
  font-size: 1.25rem;
  padding: 24px 64px;
  font-weight: 800;
  letter-spacing: 0.05em;
}

@media (max-width: 768px) {
  .hero {
    /* No padding needed on container as we use hero-content padding */
    padding-top: 0;
  }

  /* ========================================
   Interactive Success Timeline (Phase 2)
   ======================================== */
  @media (max-width: 768px) {
    .hero {
      align-items: center;
      /* Corrected to vertical center */
    }

    .hero-slide {
      padding-top: 0;
      /* Reset PC safe area for mobile */
    }

    .hero-content {
      margin-left: auto !important;
      margin-right: auto !important;
      width: calc(100% - 30px) !important;
      text-align: center !important;
      padding: 40px 20px !important;
      padding-top: 100px !important;
      margin-top: 0 !important;
      min-height: auto !important;
    }

    .hero-title {
      font-size: 1.8rem !important;
      line-height: 1.5 !important;
      margin-bottom: 20px !important;
    }

    .hero-description {
      font-size: 0.95rem !important;
      line-height: 1.6 !important;
      margin-bottom: 25px !important;
    }
  }
}



/* Extra small width support */
@media (max-width: 350px) {
  .hero-title {
    font-size: 1.3rem;
  }

  .hero-description {
    display: none !important;
  }
}

/* ========================================
   Interactive Success Timeline (Phase 2)
   ======================================== */
.timeline-section {
  padding: 160px 0;
  background: var(--color-bg-light);
  position: relative;
  overflow: hidden;
}

.timeline-container {
  max-width: 1000px;
  margin: 0 auto;
  position: relative;
  padding-left: 50px;
}

.timeline-container::before {
  content: '';
  position: absolute;
  left: 20px;
  top: 0;
  width: 2px;
  height: 100%;
  background: linear-gradient(to bottom, transparent, var(--color-main), transparent);
  opacity: 0.3;
}

.timeline-item {
  position: relative;
  margin-bottom: 80px;
  opacity: 0;
  transform: translateX(-30px);
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.8s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.8s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.8s cubic-bezier(0.16, 1, 0.3, 1), color 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.timeline-item.is-visible {
  opacity: 1;
  transform: translateX(0);
}

.timeline-dot {
  position: absolute;
  left: -42px;
  top: 0;
  width: 24px;
  height: 24px;
  background: var(--color-main);
  border-radius: 50%;
  border: 4px solid var(--color-bg-light);
  box-shadow: 0 0 15px var(--color-accent-soft);
  z-index: 2;
  transition: transform 0.3s ease;
}

.timeline-item:hover .timeline-dot {
  transform: scale(1.5);
  background: var(--color-accent);
}

.timeline-content {
  background: var(--color-white);
  padding: 40px;
  border-radius: 30px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--glass-border);
  position: relative;
}

.timeline-item::after {
  content: '';
  position: absolute;
  left: -20px;
  top: 12px;
  width: 20px;
  height: 2px;
  background: var(--color-main);
  opacity: 0.2;
}

.timeline-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

.timeline-step-num {
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: 1.5rem;
  color: var(--color-main);
  opacity: 0.5;
}

.timeline-title {
  font-family: var(--font-serif);
  font-weight: 800;
  font-size: 1.6rem;
  color: var(--color-main);
}

.timeline-desc {
  line-height: 1.8;
  color: var(--color-text-secondary);
}

.attorney-note {
  margin-top: 25px;
  padding: 15px 20px;
  background: var(--color-bg-secondary);
  border-radius: 15px;
  font-size: 0.95rem;
  border-left: 4px solid var(--color-accent);
  display: flex;
  gap: 15px;
  align-items: center;
}

.attorney-note i {
  font-size: 1.5rem;
}

/* Editorial Typography Enhancements (Refined) */
.editorial-title {
  font-family: var(--font-serif);
  font-size: 3.8rem;
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 40px;
  letter-spacing: -0.03em;
  color: var(--color-main);
  background: linear-gradient(135deg, var(--color-main) 0%, var(--color-main-light) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* Text Highlights */
.text-highlight {
  display: inline-block;
  position: relative;
  z-index: 1;
  padding: 0 5px;
}

.text-highlight::after {
  content: '';
  position: absolute;
  bottom: 5px;
  left: 0;
  width: 100%;
  height: 35%;
  background: rgba(255, 159, 0, 0.2);
  z-index: -1;
  border-radius: 4px;
}

.hero-text-glow {
  color: #FF9F00 !important;
  font-weight: 900;
  text-shadow: 0 0 15px rgba(255, 159, 0, 0.4);
}


@media (max-width: 768px) {
  .editorial-title {
    font-size: 2.6rem;
  }

  .timeline-container {
    padding-left: 30px;
  }

  .timeline-dot {
    left: -32px;
  }

  .section {
    padding: 100px 0;
  }
}

/* Hero Dots (Navigation) */
.hero-dots {
  position: absolute;
  bottom: 40px;
  /* PC position - like Jikou */
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 10;
}





@media (max-width: 768px) {
  .hero-dots {
    bottom: 85px;
    /* Above sticky footer */
  }
}

/* ========================================
   Buttons
   ======================================== */
.btn {
  display: inline-block;
  padding: 18px 45px;
  border-radius: 100px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  line-height: 1.2;
  transition: transform 0.3s, opacity 0.3s, background-color 0.3s, border-color 0.3s, box-shadow 0.3s, color 0.3s;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-cta) 0%, var(--color-cta-dark) 100%);
  color: #fff;
  box-shadow: 0 10px 20px rgba(243, 156, 18, 0.4);
}

.btn-primary:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(243, 156, 18, 0.5);
}

/* ========================================
   Pain Points
   ======================================== */
.pain-points-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.pain-point-item {
  background: var(--color-white);
  padding: 40px 30px;
  border-radius: 30px;
  text-align: center;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(0, 0, 0, 0.03);
  transition: var(--transition-base);
  animation: fadeInUp 0.8s ease both;
}

.pain-point-item:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-accent);
}

.pain-point-text {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.6;
  color: var(--color-text-primary);
}

.pain-point-icon {
  font-size: 3.5rem;
  margin-bottom: 20px;
  display: block;
  line-height: 1;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.pain-point-icon span {
  display: inline-block;
  animation: bounceIn 0.6s ease both;
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.5);
  }

  60% {
    opacity: 1;
    transform: scale(1.1);
  }

  100% {
    transform: scale(1);
  }
}

/* Strength Section Icons */
.strength-icon {
  font-size: 3.5rem;
  margin-bottom: 25px;
  display: block;
  text-align: center;
  line-height: 1;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.strength-icon span {
  display: inline-block;
  animation: bounceIn 0.6s ease both;
}

/* Solution/Services Section Icons */
.solution-icon {
  font-size: 3.5rem;
  margin-bottom: 25px;
  display: block;
  text-align: center;
  line-height: 1;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.solution-icon span {
  display: inline-block;
  animation: bounceIn 0.6s ease both;
}

/* Category Icons (Knowledge Subpages) */
.category-icon {
  font-size: 3.5rem;
  margin-bottom: 20px;
  display: block;
  text-align: center;
  line-height: 1;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

/* Flow/Process Section Icons */
.flow-icon,
.process-icon,
.step-icon {
  font-size: 3.5rem;
  margin-bottom: 20px;
  display: block;
  text-align: center;
  line-height: 1;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

@media (max-width: 900px) {

  .pain-points-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .pain-points-grid {
    grid-template-columns: 1fr;
  }
}

/* ========================================
   Comparison Table (NEW)
   ======================================== */
.comparison-table-wrapper {
  overflow-x: auto;
  margin-bottom: 40px;
  border-radius: 40px;
  box-shadow: var(--shadow-lg);
  padding: 20px;
  background: var(--color-white);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.comparison-table {
  width: 100%;
  border-collapse: separate;
  /* For border-radius */
  border-spacing: 0;
  background: #fff;
  min-width: 600px;
  /* Force width on mobile */
}

.comparison-table th,
.comparison-table td {
  padding: 20px;
  text-align: center;
  vertical-align: middle;
  border-bottom: 1px solid #eee;
}

.comparison-table th {
  background: #f5f5f5;
  color: #555;
  font-weight: bold;
}

/* Highlight Lawyer Column */
.comparison-table .col-lawyer {
  background: var(--color-main);
  color: var(--color-white);
  position: relative;
  width: 30%;
  border-radius: 20px 20px 0 0;
}

.comparison-table .col-lawyer::before {
  content: "RECOMMENDED";
  display: block;
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--grad-cta);
  color: var(--color-white);
  font-size: 0.75rem;
  padding: 4px 16px;
  border-radius: 50px;
  font-weight: 800;
  letter-spacing: 0.1em;
  box-shadow: var(--shadow-sm);
}

.row-head {
  text-align: left;
  font-weight: 700;
  background: var(--color-bg-light);
  width: 25%;
  color: var(--color-text-secondary);
}

.cell-ok {
  color: var(--color-main-light);
  font-size: 1.8rem;
  font-weight: 700;
}

.cell-ng {
  color: #777;
  font-size: 1.8rem;
}

.cell-best {
  color: var(--color-white);
  font-size: 2rem;
  font-weight: 900;
  background: var(--color-main);
}

.comparison-table td.cell-best {
  border-left: none;
  border-right: none;
}

/* Bottom border for lawyer column */
.comparison-table tr:last-child td.cell-best {
  border-bottom: none;
  border-radius: 0 0 20px 20px;
}

.comparison-note {
  font-size: 0.9rem;
  color: #666;
  margin-top: 15px;
}

/* ========================================
   Services / Solution Grid
   ======================================== */
.solution-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.solution-item {
  background: #fff;
  padding: 40px 30px;
  border-radius: 20px;
  text-align: center;
  box-shadow: var(--shadow-md);
  transition: transform 0.3s;
}

.solution-item:hover {
  transform: translateY(-5px);
}

.solution-title {
  font-size: 1.25rem;
  font-weight: bold;
  margin: 15px 0;
  color: var(--color-main);
}

/* Specific Override for Knowledge Category Buttons to avoid CTA clash */
.category-link .btn {
  background: var(--color-main);
  /* Navy instead of Orange */
  box-shadow: 0 4px 10px rgba(0, 45, 92, 0.2);
}

.category-link .btn:hover {
  background: var(--color-main-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 45, 92, 0.3);
}

@media (max-width: 900px) {
  .solution-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .solution-grid {
    grid-template-columns: 1fr;
  }
}

/* ========================================
   Flow
   ======================================== */
.flow-container {
  max-width: 800px;
  margin: 0 auto;
}

.flow-item {
  display: flex;
  gap: 30px;
  background: #fff;
  padding: 30px;
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 25px;
  align-items: flex-start;
}

.flow-content h3 {
  margin-bottom: 10px;
  color: var(--color-main);
}

/* ========================================
   Lawyer Profile
   ======================================== */
.lawyer-profile {
  display: flex;
  gap: 40px;
  align-items: center;
  background: #fff;
  padding: 50px;
  border-radius: 30px;
  box-shadow: var(--shadow-md);
}

.lawyer-img {
  width: 240px;
  flex-shrink: 0;
}

.lawyer-img img {
  width: 100%;
  height: auto;
  border-radius: 20px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.lawyer-info h3 {
  font-size: 2rem;
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  .lawyer-profile {
    flex-direction: column;
    padding: 30px;
  }

  .lawyer-img {
    width: 100%;
    max-width: 300px;
  }
}

/* ========================================
   Contact Form
   ======================================== */
.contact-form {
  background: #fdfdfd;
}

.form-wrapper {
  max-width: 700px;
  margin: 0 auto;
  background: #fff;
  padding: 40px;
  border-radius: 20px;
  box-shadow: var(--shadow-md);
}

.form-group {
  margin-bottom: 20px;
}

.form-control {
  width: 100%;
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: 10px;
  font-size: 1rem;
}

.form-label {
  font-weight: bold;
  display: block;
  margin-bottom: 8px;
}

.required {
  color: red;
  font-size: 0.8rem;
  margin-left: 5px;
}

.form-wrapper .btn {
  padding: 20px;
  font-size: 1.2rem;
  font-weight: bold;
}

/* ========================================
   Footer
   ======================================== */
footer {
  background: var(--color-main);
  color: #fff;
  padding: 60px 0;
  text-align: center;
}

.footer-logo {
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 20px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  margin: 0 10px;
}

.footer-links {
  margin: 20px 0;
}

/* Sticky Footer (SP) */
.sticky-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #fff;
  display: flex;
  z-index: 2000;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  display: none;
  /* Default hidden */
}

@media (max-width: 768px) {
  .sticky-footer {
    display: flex;
  }
}

.sticky-btn {
  flex: 1;
  text-align: center;
  padding: 15px;
  font-weight: bold;
  overflow: hidden;
}

.sticky-tel {
  background: #fff;
  color: var(--color-main);
}

.sticky-mail {
  background: var(--color-main);
  color: #fff;
}

/* Utilities */
.pc-only {
  display: block;
}

.sp-only {
  display: none;
}

@media (max-width: 1150px) { .pc-only { display: none !important; } .sp-only { display: block !important; } }

/* ========================================
   Cost Section (NEW)
   ======================================== */
.cost-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}

.cost-item {
  background: #fff;
  padding: 30px 20px;
  border-radius: 20px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid #eee;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  position: relative;
  transition: transform 0.3s;
}

.cost-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.cost-item.featured {
  border: 2px solid var(--color-accent);
  background: #fffcf5;
}

.cost-item .badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-accent);
  color: #fff;
  font-size: 0.8rem;
  font-weight: bold;
  padding: 4px 15px;
  border-radius: 20px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.cost-title {
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--color-main);
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid #eee;
  position: relative;
}

.cost-title::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 2px;
  background: var(--color-accent);
}

.cost-price {
  margin-bottom: 20px;
  color: var(--color-text-primary);
}

.price-prefix {
  font-size: 0.8rem;
  display: block;
  color: #888;
  margin-bottom: 5px;
}

.price-val {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--color-main);
  line-height: 1;
}

.price-unit {
  font-size: 1rem;
  font-weight: bold;
  margin-left: 2px;
}

.cost-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  width: 100%;
  margin-bottom: 12px;
  border-bottom: 1px dotted #ccc;
  padding-bottom: 5px;
}

.cost-label {
  font-size: 0.9rem;
  font-weight: bold;
  color: #555;
}

.cost-value {
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--color-main);
  text-align: right;
}

.cost-desc {
  font-size: 0.85rem;
  color: #666;
  margin-top: auto;
  line-height: 1.6;
  background: #f9f9f9;
  padding: 10px;
  border-radius: 8px;
  width: 100%;
}

.cost-note {
  text-align: right;
  font-size: 0.8rem;
  color: #777;
  margin-top: 20px;
}

@media (max-width: 1150px) {
  .cost-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .cost-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .cost-item {
    padding: 25px;
  }
}

/* ==========================================================================
   Glossary Page Styles (LP6 Adaptation)
   ========================================================================== */
.glossary-hero {
  background-image: url(assets/images/hero_bg_consult_lawyer_v3.webp);
  background-size: cover;
  background-position: center;
  color: #fff;
  padding: 220px 0 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.glossary-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(0, 45, 92, 0.85) 0%, rgba(0, 26, 54, 0.7) 100%);
  z-index: 1;
}

.glossary-hero .container {
  position: relative;
  z-index: 2;
}

.glossary-hero h1 {
  font-size: 3rem;
  font-weight: 900;
  margin-bottom: 15px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.glossary-hero p {
  font-size: 1.2rem;
  opacity: 0.9;
  letter-spacing: 0.1em;
  font-family: var(--font-serif);
}

.breadcrumbs {
  background: #f0f0f0;
  padding: 15px 0;
  font-size: 0.9rem;
  color: var(--color-text-secondary);
}

.breadcrumbs a {
  color: var(--color-text-secondary);
  text-decoration: underline;
}

.glossary-wrapper {
  background-color: var(--color-bg-light);
}

.glossary-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 50px;
  padding: 60px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

/* Sidebar TOC */
/* Sidebar TOC Container */
.glossary-sidebar {
  position: relative;
}

.glossary-toc {
  background: #fff;
  padding: 30px;
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 140px;
  /* Adjust for sticky header */
}

.glossary-toc h3 {
  font-size: 1.2rem;
  color: var(--color-main);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--color-accent);
}

.toc-list li {
  margin-bottom: 12px;
}

.toc-list a {
  color: var(--color-text-secondary);
  display: block;
  padding: 10px 15px;
  border-radius: 8px;
  font-weight: 500;
  transition: transform 0.3s, opacity 0.3s, background-color 0.3s, border-color 0.3s, box-shadow 0.3s, color 0.3s;
  font-size: 0.95rem;
  border-left: 3px solid transparent;
}

.toc-list a:hover {
  color: var(--color-main);
  background: var(--color-bg-secondary);
  transform: translateX(5px);
}

.toc-list a.active {
  color: var(--color-main);
  font-weight: 700;
  border-left: 3px solid var(--color-accent);
  background: rgba(212, 175, 55, 0.1);
  /* Gold tint */
  padding-left: 15px;
}

/* Glossary Content */
.glossary-content {
  display: flex;
  flex-direction: column;
  gap: 60px;
}

.search-container {
  position: relative;
  margin-bottom: 20px;
}

.search-container input {
  width: 100%;
  padding: 15px 20px 15px 50px;
  border: 1px solid #ddd;
  border-radius: 50px;
  font-size: 1rem;
  transition: transform 0.3s ease, opacity 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
  box-shadow: var(--shadow-sm);
}

.search-container input:focus {
  border-color: var(--color-main);
  outline: none;
  box-shadow: 0 4px 15px rgba(0, 64, 112, 0.15);
}

.search-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  opacity: 0.5;
}

/* Categories */
.glossary-category {
  background: #fff;
  border-radius: 30px;
  padding: 40px;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(0, 0, 0, 0.03);
}

/* Subpage-specific Logo/Nav Color when Header is Transparent */














/* ========================================
   Knowledge & Subpage Components (REFINED)
   ======================================== */
.knowledge-hero {
  background-image: url(assets/images/hero_bg_consult_lawyer_v3.webp);
  background-size: cover;
  background-position: center;
  color: #fff;
  padding: 160px 0 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(0, 45, 92, 0.05);
}

.knowledge-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(0, 45, 92, 0.85) 0%, rgba(0, 26, 54, 0.7) 100%);
  z-index: 1;
}

.knowledge-hero .container {
  position: relative;
  z-index: 2;
}

.knowledge-hero h1 {
  font-size: 3rem;
  font-weight: 900;
  margin-bottom: 15px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.knowledge-hero p {
  font-size: 1.2rem;
  opacity: 0.9;
  letter-spacing: 0.1em;
  font-family: var(--font-serif);
}

.category-card {
  background: var(--color-white);
  padding: 50px 40px;
  border-radius: 40px;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(0, 0, 0, 0.03);
  transition: var(--transition-base);
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.category-card:hover {
  transform: translateY(-15px);
  box-shadow: var(--shadow-extra);
  border-color: var(--color-accent);
}

.category-icon {
  font-size: 3.5rem;
  margin-bottom: 25px;
  background: var(--color-bg-secondary);
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 30px;
  transform: rotate(-5deg);
  transition: var(--transition-base);
}

.category-card:hover .category-icon {
  transform: rotate(0) scale(1.1);
  background: var(--color-accent-soft);
}

.category-title {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--color-main);
  margin-bottom: 20px;
  font-family: var(--font-serif);
}

.category-desc {
  font-size: 1rem;
  color: var(--color-text-secondary);
  line-height: 1.8;
  margin-bottom: 30px;
  flex-grow: 1;
}


.category-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eee;
}

.category-icon {
  font-size: 2.5rem;
  background: var(--color-bg-secondary);
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--color-main);
}

.category-title {
  font-size: 1.8rem;
  color: var(--color-main);
  margin: 0;
  font-weight: 900;
}

/* Terms Grid */
.terms-grid {
  display: grid;
  gap: 25px;
}

.term-card {
  background: #fdfdfd;
  border: 1px solid #f0f0f0;
  border-left: 5px solid var(--color-main);
  border-radius: 12px;
  padding: 25px;
  transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), opacity 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), background-color 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), border-color 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), color 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.term-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  background: #fff;
}

.term-header {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.term-dt {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-text-primary);
}

.term-dd {
  line-height: 1.8;
  color: var(--color-text-secondary);
  font-size: 1rem;
}

.term-dd strong {
  background: linear-gradient(transparent 60%, rgba(212, 175, 55, 0.3) 60%);
  font-weight: 700;
}

/* Scroll To Top */
.scroll-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--color-main);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  z-index: 900;
  opacity: 0;
  visibility: hidden;
  transition: transform 0.3s, opacity 0.3s, background-color 0.3s, border-color 0.3s, box-shadow 0.3s, color 0.3s;
  text-decoration: none;
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-to-top:hover {
  background: var(--color-accent);
  transform: translateY(-5px);
}

/* Responsive */
@media (max-width: 900px) {
  .glossary-layout {
    grid-template-columns: 1fr;
    padding: 40px 15px;
    gap: 30px;
  }

  .glossary-toc {
    display: none;
    /* Hide TOC on mobile for simplicity */
  }

  .category-title {
    font-size: 1.5rem;
  }

  .glossary-category {
    padding: 25px;
  }

  .category-icon {
    width: 50px;
    height: 50px;
    font-size: 1.8rem;
  }
}

/* Information Center Section */
.info-center {
  background-color: #f9f9f9;
  padding: 80px 0;
}

.info-center .section-title {
  color: var(--color-main);
  text-align: center;
  font-size: 2rem;
  margin-bottom: 10px;
}

.info-center .section-subtitle {
  text-align: center;
  margin-bottom: 50px;
  color: #666;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.info-card {
  background: #fff;
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s, box-shadow 0.3s;
  border-bottom: 4px solid var(--color-accent);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.info-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.info-icon {
  font-size: 3.5rem;
  margin-bottom: 20px;
  color: var(--color-main);
}

.info-title {
  font-size: 1.4rem;
  color: #333;
  margin-bottom: 15px;
  font-weight: bold;
}

.info-desc {
  font-size: 0.95rem;
  color: #666;
  line-height: 1.6;
  margin-bottom: 25px;
  flex-grow: 1;
  /* Push button to bottom */
}

.info-btn {
  display: inline-block;
  padding: 10px 25px;
  background: #fff;
  color: var(--color-main);
  border: 1px solid var(--color-main);
  border-radius: 30px;
  text-decoration: none;
  transition: transform 0.3s, opacity 0.3s, background-color 0.3s, border-color 0.3s, box-shadow 0.3s, color 0.3s;
  font-weight: bold;
}

.info-card:hover .info-btn {
  background: var(--color-main);
  color: #fff;
}

@media (max-width: 768px) {
  .info-grid {
    grid-template-columns: 1fr;
  }
}

.glossary-toc h2 {
  font-size: 1.2rem;
  color: var(--color-main);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--color-accent);
}

/* ========================================
   Strength Section (New)
   ======================================== */
.strength-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 40px;
}

.strength-item {
  background: #fff;
  padding: 40px 30px;
  border-radius: 20px;
  text-align: center;
  box-shadow: var(--shadow-md);
  transition: transform 0.3s, box-shadow 0.3s;
  border-top: 5px solid var(--color-main);
  position: relative;
  overflow: hidden;
}

.strength-item:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
}

.strength-icon {
  font-size: 3.5rem;
  margin-bottom: 20px;
  background: var(--color-bg-secondary);
  width: 90px;
  height: 90px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--color-main);
}

.header-tel-label {
  display: block;
  font-size: 12px;
  color: var(--main-blue);
  margin-bottom: 2px;
  font-weight: 500;
  white-space: nowrap;
}

.strength-item h3 {
  font-size: 1.4rem;
  color: var(--color-main);
  margin-bottom: 15px;
  font-weight: 900;
}

.strength-item p {
  color: var(--color-text-secondary);
  line-height: 1.7;
}

@media (max-width: 900px) {
  .strength-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* ========================================
   Case Studies Section (New)
   ======================================== */
.case-studies {
  background-color: #fcfcfc;
}

.case-study-list {
  display: flex;
  flex-direction: column;
  gap: 40px;
  max-width: 900px;
  margin: 0 auto;
}

.case-card {
  background: #fff;
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  border: 1px solid #eee;
  transition: transform 0.3s;
}

.case-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.case-header {
  background: var(--color-main);
  color: #fff;
  padding: 20px 30px;
  position: relative;
}

.case-badge {
  display: inline-block;
  background: var(--color-accent);
  color: #fff;
  font-size: 0.8rem;
  font-weight: bold;
  padding: 3px 12px;
  border-radius: 20px;
  margin-bottom: 10px;
}

.case-title {
  font-size: 1.3rem;
  font-weight: bold;
  line-height: 1.4;
  margin: 0;
}

.case-body {
  padding: 30px;
}

.case-flow {
  display: flex;
  align-items: stretch;
  gap: 20px;
}

.case-step {
  flex: 1;
  background: #f9f9f9;
  padding: 20px;
  border-radius: 12px;
}

.case-step h4 {
  font-size: 1rem;
  color: var(--color-main);
  margin-bottom: 10px;
  border-bottom: 2px solid #ddd;
  padding-bottom: 5px;
  display: inline-block;
}

.case-step.situation h4 {
  border-color: #999;
  color: #555;
}

.case-step.result h4 {
  border-color: var(--color-cta);
  color: var(--color-cta-dark);
}

.case-step p {
  font-size: 0.95rem;
  color: #333;
}

.case-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #ccc;
}

@media (max-width: 768px) {
  .case-flow {
    flex-direction: column;
    gap: 10px;
  }

  .case-arrow {
    transform: rotate(90deg);
    /* Down arrow */
    height: 30px;
  }
}

/* ========================================
   Animation & Premium Tweaks
   ======================================== */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Enhanced Typography */
body {
  font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ========================================
   Form Submission Modal & States
   ======================================== */

/* Dialog Backdrop */
#loading-modal {
  display: none;
  /* Hidden by default */
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  /* Semi-transparent black */
  align-items: center;
  justify-content: center;
}

#loading-modal.is-active {
  display: flex !important;
}

/* Dialog Box */
.modal-content {
  background-color: #fff;
  padding: 40px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  max-width: 90%;
  width: 400px;
}

.spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid var(--color-main);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px auto;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.modal-text {
  font-size: 1.1rem;
  color: var(--color-text-primary);
  font-weight: bold;
}

/* Disabled Form Handler */
.form-wrapper.is-submitting {
  pointer-events: none;
  opacity: 0.7;
}

/* Visual disable for inputs inside submitting form */
.form-wrapper.is-submitting input,
.form-wrapper.is-submitting textarea,
.form-wrapper.is-submitting button {
  background-color: #e9ecef;
  color: #6c757d;
  cursor: not-allowed;
}

/* ========================================
   Knowledge & Subpage Components
   ======================================== */
.knowledge-hero {
  background: radial-gradient(circle at top left, #f8fafc 0%, #e8f4ff 100%);
  padding: 100px 0 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(0, 45, 92, 0.05);
}

.knowledge-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -10%;
  width: 120%;
  height: 200%;
  background: radial-gradient(circle at center, rgba(0, 200, 150, 0.03) 0%, transparent 70%);
  z-index: 0;
  pointer-events: none;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin: 60px 0;
}

.category-card {
  background: var(--color-white);
  padding: 50px 40px;
  border-radius: 40px;
  text-align: center;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(0, 0, 0, 0.03);
  transition: var(--transition-base);
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.category-card:hover {
  transform: translateY(-15px);
  box-shadow: var(--shadow-extra);
  border-color: var(--color-accent);
}

.category-icon {
  font-size: 3.5rem;
  margin-bottom: 25px;
  background: var(--color-bg-secondary);
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 30px;
  transform: rotate(-5deg);
  transition: var(--transition-base);
}

.category-card:hover .category-icon {
  transform: rotate(0) scale(1.1);
  background: var(--color-accent-soft);
}

.category-title {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--color-main);
  margin-bottom: 20px;
  font-family: var(--font-serif);
}

.category-desc {
  font-size: 1rem;
  color: var(--color-text-secondary);
  line-height: 1.8;
  margin-bottom: 30px;
  flex-grow: 1;
}

.category-link {
  width: 100%;
}

.category-link .btn {
  width: 100%;
  padding: 15px;
}

@media (max-width: 1024px) {
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }
}

@media (max-width: 640px) {
  .category-grid {
    grid-template-columns: 1fr;
  }

  .category-card {
    padding: 40px 25px;
  }
}

/* Breadcrumbs refinement */
.breadcrumbs {
  padding: 30px 0;
  font-size: 0.95rem;
  color: var(--color-text-muted);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  margin-bottom: 60px;
}

.breadcrumbs a {
  color: var(--color-main);
  font-weight: 500;
  transition: color 0.3s;
}

.breadcrumbs a:hover {
  color: var(--color-accent);
  text-decoration: underline;
}

/* Specific Subpage Tweaks */
.subpage main {
  background: #ffffff;
  /* Explicit background to prevent vignette overlap */
}

/* Timeline / Flow Enhancements */
.flow-visual {
  position: relative;
  padding-left: 60px;
}

.flow-visual::before {
  content: '';
  position: absolute;
  left: 30px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--color-accent), var(--color-main));
  opacity: 0.3;
}

/* ========================================
   Subpage Information Components
   ======================================== */
.info-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin: 40px 0;
}

.info-card {
  background: #ffffff;
  padding: 40px;
  border-radius: 30px;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: var(--transition-base);
}

.info-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-accent);
}

.info-card h3 {
  color: var(--color-main);
  font-family: var(--font-serif);
  font-size: 1.4rem;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
}

.info-card h3::before {
  content: '';
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--color-accent);
  color: white;
  border-radius: 50%;
  font-size: 0.9rem;
}

.premium-table-wrapper {
  overflow-x: auto;
  border-radius: 30px;
  box-shadow: var(--shadow-lg);
  margin: 40px 0;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.premium-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  min-width: 800px;
}

.premium-table th {
  background: var(--color-main);
  color: white;
  padding: 25px 30px;
  text-align: left;
  font-family: var(--font-serif);
  font-size: 1.1rem;
}

.premium-table td {
  padding: 20px 30px;
  border-bottom: 1px solid #f0f0f0;
  color: var(--color-text-primary);
  line-height: 1.6;
}

.premium-table tr:last-child td {
  border-bottom: none;
}

.premium-table tr:hover td {
  background: var(--color-bg-secondary);
}

.grade-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 10px;
  background: var(--color-main-light);
  color: white;
  font-weight: bold;
  font-size: 0.9rem;
}

/* ========================================
   Phase 3: Dynamic & Interactive UI
   ======================================== */

/* Mesh Gradient Aura for Hero (Rotating Base) */
.dynamic-aura {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 50%, rgba(0, 200, 150, 0.15) 0%, transparent 70%);
  z-index: 4;
  pointer-events: none;
  filter: blur(60px);
  animation: auraRotate 30s infinite linear;
}

/* Interactive Mouse Glow (Non-rotating & Performance Optimized) */
.mouse-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 600px;
  height: 600px;
  margin-left: -300px;
  /* Center adjustment */
  margin-top: -300px;
  /* Center adjustment */
  background: radial-gradient(circle at center, rgba(0, 255, 200, 0.25) 0%, transparent 70%);
  z-index: 6;
  pointer-events: none;
  mix-blend-mode: screen;
  filter: blur(40px);
  opacity: 0;
  transition: opacity 0.6s ease;
  will-change: transform;
  transform: translate3d(0, 0, 0);
  /* Force GPU */
}

.hero:hover .mouse-glow {
  opacity: 1;
}

@keyframes auraRotate {
  0% {
    opacity: 0.3;
    transform: scale(1) rotate(0deg);
  }

  50% {
    opacity: 0.6;
    transform: scale(1.1) rotate(180deg);
  }

  100% {
    opacity: 0.3;
    transform: scale(1) rotate(360deg);
  }
}

/* Shimmer Effect for Buttons */
.shimmer-btn {
  position: relative;
  overflow: hidden;
  display: inline-block;
  isolation: isolate;
}

.shimmer-btn::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -60%;
  width: 20%;
  height: 200%;
  background: rgba(255, 255, 255, 0.4);
  transform: rotate(30deg);
  animation: shimmer 3s infinite;
  will-change: left;
}

@keyframes shimmer {
  0% {
    left: -60%;
  }

  100% {
    left: 150%;
  }
}

/* Glass Card Refinement */
.glass-card {
  background: rgba(255, 255, 255, 0.7) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(255, 255, 255, 0.4) !important;
  box-shadow: 0 8px 32px 0 rgba(0, 45, 92, 0.1) !important;
}

/* Hover Scale & Glow */
.interactive-card {
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}

.interactive-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 200, 150, 0.2);
}

/* Staggered Reveal Delays */
.reveal-delay-1 {
  transition-delay: 0.1s;
}

.reveal-delay-2 {
  transition-delay: 0.2s;
}

.reveal-delay-3 {
  transition-delay: 0.3s;
}

.reveal-delay-4 {
  transition-delay: 0.4s;
}

.reveal-delay-5 {
  transition-delay: 0.5s;
}


.f-cta-btn {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
  text-decoration: none;
  position: relative;
  font-size: 1.8rem;
  /* Icon size */
  line-height: 1;
}

.f-cta-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.f-cta-btn.tel {
  background: linear-gradient(135deg, #f39c12, #e67e22);
}

.f-cta-btn.form {
  background: linear-gradient(135deg, #004070, #002845);
}

.f-cta-btn i {
  display: inline-block;
  font-style: normal;
  line-height: 1;
  text-align: center;
  width: 100%;
  /* Ensure centering */
  transform: translateY(2px);
  /* Optometric correction for emoji */
}

.f-cta-label {
  position: absolute;
  right: 85px;
  top: 50%;
  transform: translateY(-50%) translateX(10px);
  background: rgba(255, 255, 255, 0.95);
  padding: 8px 15px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: bold;
  white-space: nowrap;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.3s ease, opacity 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
  pointer-events: none;
  color: #333;
}

.f-cta-btn:hover .f-cta-label {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(0);
}

/* Hide on mobile (breakpoint 768px for SP view) */
@media (max-width: 768px) {
  .floating-cta {
    display: none !important;
  }
}

/* Sidebar Sticky Fix */
.glossary-sidebar {
  position: -webkit-sticky;
  position: sticky;
  top: 120px;
}

/* ========================================
   Mobile Hero Section Final Adjustments
   ======================================== */
@media (max-width: 768px) {
  .hero-dots {
    bottom: 85px;
    /* Default mobile position */
  }
}

/* Specific adjustments for narrow/short screens (iPhone SE, etc.) */
@media (max-width: 768px) and (max-height: 720px) {
  .hero-content {
    padding: 20px !important;
    width: 92% !important;
    max-width: 92% !important;
  }

  .hero-title {
    font-size: 1.4rem !important;
    line-height: 1.3 !important;
    margin-bottom: 12px !important;
  }

  /* Force hide description on very short screens if it causes overlap */
  @media (max-height: 580px) {

    .hero-content p,
    .hero-content .hero-description {
      display: none !important;
    }

    .hero-dots {
      bottom: 75px !important;
    }
  }
}

/* Extra small width */
@media (max-width: 350px) {
  .hero-title {
    font-size: 1.2rem !important;
  }
}


/* ========================================
   UX & Gamification Enhancements
   ======================================== */

/* Diagnosis Quiz Styles */
#diagnosis-quiz-container {
  max-width: 700px;
  margin: 40px auto;
}

.quiz-card,
.quiz-result-card {
  background: #fff;
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  /* var(--shadow-lg) */
  border: 1px solid rgba(0, 0, 0, 0.05);
  text-align: center;
}

.quiz-progress-bar {
  height: 6px;
  background: #f0f0f0;
  border-radius: 3px;
  margin-bottom: 20px;
  overflow: hidden;
}

.quiz-progress-fill {
  height: 100%;
  background: #f39c12;
  /* var(--accent-orange) */
  transition: width 0.4s ease;
}

.quiz-step-indicator {
  font-size: 0.9rem;
  color: #f39c12;
  font-weight: 700;
  margin-bottom: 10px;
}

.quiz-question-text {
  font-size: 1.5rem;
  color: #003366;
  /* var(--main-blue) */
  margin-bottom: 30px;
  line-height: 1.5;
}

.quiz-options {
  display: flex;
  gap: 20px;
  justify-content: center;
}

.quiz-btn {
  padding: 15px 40px;
  border-radius: 50px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.btn-yes {
  background: #e74c3c;
  /* var(--alert-red) */
  color: #fff;
  border: none;
}

.btn-yes:hover {
  background: #c0392b;
  transform: translateY(-3px);
}

.btn-no {
  background: #f8fafc;
  color: #636e72;
  border: 2px solid #dfe6e9;
}

.btn-no:hover {
  background: #f1f5f9;
  transform: translateY(-3px);
}

/* Quiz Results */
.quiz-result-card.risk-s {
  border-top: 8px solid #e74c3c;
}

.quiz-result-card.risk-a {
  border-top: 8px solid #f39c12;
}

.quiz-result-card.risk-b {
  border-top: 8px solid #2ecc71;
}

.quiz-result-header {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 15px;
  color: #94a3b8;
}

.quiz-result-title {
  font-size: 1.4rem;
  margin-bottom: 20px;
  color: #003366;
}

.quiz-result-advice {
  line-height: 1.8;
  color: #636e72;
  margin-bottom: 30px;
}

.quiz-result-cta {
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: center;
}

.btn-text {
  background: none;
  border: none;
  color: #636e72;
  text-decoration: underline;
  cursor: pointer;
  font-size: 0.9rem;
}

/* Parallax Effect Fix */
.hero {
  overflow: hidden;
}

.slide-background {
  will-change: transform;
}

/* Reveal Overrides (Fine-tuning) */
.reveal {
  transition-duration: 0.8s;
}

.reveal-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-right {
  opacity: 0;
  transform: translateX(30px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-left.is-visible,
.reveal-right.is-visible {
  opacity: 1;
  transform: translateX(0);
}

/* Feature Grid for New Sections */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.feature-item {
  background: #fff;
  padding: 35px;
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border-left: 5px solid #f39c12;
}

.feature-item h3 {
  font-size: 1.3rem;
  color: #003366;
  margin-bottom: 15px;
  font-family: 'Shippori Mincho', serif;
}


/* =============================================
   PREMIUM UX v2 - Traffic Accident LP
   ============================================= */

/* --- Page Loader --- */
#page-loader {
  position: fixed;
  inset: 0;
  background: #003366;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

#page-loader.loader-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  color: #fff;
  font-family: 'Shippori Mincho', serif;
}

.loader-logo-text {
  font-size: 1.4rem;
  letter-spacing: 0.1em;
}

.loader-bar {
  width: 200px;
  height: 3px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  overflow: hidden;
}

.loader-bar-fill {
  height: 100%;
  background: #f39c12;
  border-radius: 2px;
  animation: loaderFill 1.2s ease forwards;
}

@keyframes loaderFill {
  from {
    width: 0;
  }

  to {
    width: 100%;
  }
}

/* --- Reveal Animations --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-up {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.1s;
}

.reveal.is-visible,
.reveal-left.is-visible,
.reveal-right.is-visible,
.reveal-up.is-visible {
  opacity: 1;
  transform: none;
}

/* --- Stats Counter Section --- */
.stats-section {
  padding: 100px 0;
  background: linear-gradient(135deg, #003366 0%, #022244 100%);
  color: #fff;
  overflow: hidden;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.stat-item {
  padding: 20px;
}

.stat-count-wrap {
  font-size: 5.5rem;
  font-weight: 900;
  font-family: 'Outfit', sans-serif;
  color: #f39c12;
  line-height: 1;
  text-shadow: 0 0 20px rgba(243, 156, 18, 0.3);
}

.stat-count {
  display: inline-block;
}

.stat-suffix {
  font-size: 2.2rem;
}

.stat-label {
  margin-top: 15px;
  font-size: 1.2rem;
  font-weight: 700;
  opacity: 1;
  letter-spacing: 0.1em;
}

.stat-note {
  font-size: 0.7rem;
  opacity: 0.6;
  margin-top: 6px;
}

/* --- Post-Accident Checklist --- */
.checklist-progress-wrapper {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
}

.checklist-progress-bar-wrap {
  flex: 1;
  height: 8px;
  background: #f0f0f0;
  border-radius: 4px;
  overflow: hidden;
}

.checklist-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #f39c12, #e67e22);
  border-radius: 4px;
  transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.checklist-progress-text {
  font-size: 0.9rem;
  font-weight: 700;
  color: #f39c12;
  white-space: nowrap;
}

.checklist-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.checklist-item {
  background: #fff;
  border: 2px solid #dfe6e9;
  border-radius: 16px;
  padding: 16px 20px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.checklist-item:hover {
  border-color: #f39c12;
  transform: translateX(4px);
}

.checklist-item.is-checked {
  background: #eafaf1;
  border-color: #2ecc71;
}

.checklist-item-main {
  display: flex;
  align-items: center;
  gap: 14px;
}

.cli-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.cli-text {
  flex: 1;
  font-weight: 600;
  color: #2d3436;
}

.checklist-item.is-checked .cli-text {
  text-decoration: line-through;
  color: #636e72;
}

.cli-check-box {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid #dfe6e9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  font-size: 1rem;
  font-weight: 900;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.checklist-item.is-checked .cli-check-box {
  background: #2ecc71;
  border-color: #2ecc71;
  color: #fff;
}

.cli-desc {
  margin-top: 8px;
  font-size: 0.85rem;
  color: #636e72;
  line-height: 1.6;
  display: none;
}

.checklist-item.is-checked .cli-desc {
  display: block;
  color: #27ae60;
}

.checklist-complete {
  margin-top: 30px;
  animation: fadeIn 0.6s ease;
}

.checklist-complete-inner {
  background: linear-gradient(135deg, #003366, #022244);
  color: #fff;
  border-radius: 24px;
  padding: 40px;
  text-align: center;
}

.checklist-complete-icon {
  font-size: 3rem;
  margin-bottom: 15px;
}

.checklist-complete-inner h3 {
  font-size: 1.5rem;
  margin-bottom: 15px;
  font-family: 'Shippori Mincho', serif;
}

.checklist-complete-inner p {
  opacity: 0.85;
  margin-bottom: 25px;
  line-height: 1.8;
}

/* --- Confetti --- */
@keyframes confettiFall {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }

  100% {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}

/* --- Injury Grade Grid --- */
.grade-grid-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-top: 40px;
}

#grade-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.grade-cell {
  border: none;
  border-radius: 12px;
  padding: 12px 8px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  overflow: hidden;
}

.grade-cell:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.grade-cell.is-active {
  outline: 3px solid #f39c12;
  box-shadow: 0 0 0 5px rgba(243, 156, 18, 0.2);
  transform: translateY(-3px);
}

.severity-extreme {
  background: linear-gradient(135deg, #2d1b1b, #5c2626);
  color: #fff;
}

.severity-high {
  background: linear-gradient(135deg, #4a2020, #e74c3c);
  color: #fff;
}

.severity-mid {
  background: linear-gradient(135deg, #7f4a00, #f39c12);
  color: #fff;
}

.severity-low-mid {
  background: linear-gradient(135deg, #1a4a2a, #2ecc71);
  color: #fff;
}

.severity-low {
  background: linear-gradient(135deg, #1a3a4a, #3498db);
  color: #fff;
}

.grade-label {
  font-size: 1.1rem;
  font-weight: 900;
  font-family: 'Outfit', sans-serif;
}

.grade-keywords {
  font-size: 0.6rem;
  opacity: 0.85;
  line-height: 1.3;
}

.grade-amount {
  font-size: 0.65rem;
  font-weight: 700;
  margin-top: 4px;
  opacity: 0.9;
}

#grade-detail {
  background: #fff;
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: opacity 0.2s ease;
  min-height: 300px;
}

#grade-detail.is-updating {
  opacity: 0;
}

.grade-detail-header {
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.grade-detail-num {
  font-size: 2rem;
  font-weight: 900;
  font-family: 'Outfit', sans-serif;
  color: #fff;
}

.grade-detail-amount {
  font-size: 0.9rem;
  color: #fff;
  opacity: 0.9;
  text-align: right;
}

.grade-detail-amount strong {
  display: block;
  font-size: 1.4rem;
}

.grade-detail-desc {
  line-height: 1.8;
  color: #2d3436;
  margin-bottom: 15px;
}

.grade-detail-examples {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 12px 15px;
  font-size: 0.9rem;
  color: #636e72;
}

.grade-detail-example-label {
  font-weight: 700;
  color: #003366;
}

/* --- Jidan (Settlement) Traps Section --- */
.traps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.trap-card {
  background: #fff;
  border-radius: 18px;
  padding: 28px;
  border-left: 5px solid #e74c3c;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.07);
  transition: all 0.3s ease;
}

.trap-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.trap-num {
  font-size: 0.8rem;
  font-weight: 900;
  color: #e74c3c;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.trap-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #003366;
  margin-bottom: 12px;
  font-family: 'Shippori Mincho', serif;
}

.trap-desc {
  font-size: 0.9rem;
  color: #636e72;
  line-height: 1.7;
}

.trap-alert {
  display: inline-block;
  margin-top: 10px;
  background: #fff5f5;
  color: #e74c3c;
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 0.8rem;
  font-weight: 700;
}

/* --- Diagnosis Quiz Styles --- */
#diagnosis-quiz-container {
  max-width: 700px;
  margin: 40px auto;
}

.quiz-card,
.quiz-result-card {
  background: #fff;
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.quiz-step-indicator {
  font-size: 0.85rem;
  color: #f39c12;
  font-weight: 700;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.quiz-progress-bar {
  height: 6px;
  background: #f0f4f8;
  border-radius: 3px;
  margin-bottom: 28px;
  overflow: hidden;
}

.quiz-progress-fill {
  height: 100%;
  background: #f39c12;
  transition: width 0.4s ease;
}

.quiz-question-text {
  font-size: 1.4rem;
  color: #003366;
  margin-bottom: 12px;
  line-height: 1.5;
  font-family: 'Shippori Mincho', serif;
}

.quiz-advice-text {
  font-size: 0.9rem;
  color: #636e72;
  margin-bottom: 28px;
  line-height: 1.6;
}

.quiz-options {
  display: flex;
  gap: 16px;
  justify-content: center;
}

.quiz-btn {
  padding: 18px 60px;
  border-radius: 50px;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-yes {
  background: #e74c3c;
  color: #fff;
  border: none;
}

.btn-yes:hover {
  background: #c0392b;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(231, 76, 60, 0.4);
}

.btn-no {
  background: #f8fafc;
  color: #636e72;
  border: 2px solid #dfe6e9;
}

.btn-no:hover {
  background: #f1f5f9;
  transform: translateY(-3px);
}

.quiz-result-rank {
  display: inline-block;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  font-size: 1.8rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-family: 'Outfit', sans-serif;
  white-space: nowrap;
}

.rank-S {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: #fff;
}

.rank-A {
  background: linear-gradient(135deg, #f39c12, #e67e22);
  color: #fff;
}

.rank-B {
  background: linear-gradient(135deg, #2ecc71, #27ae60);
  color: #fff;
}

.quiz-result-card.risk-s {
  border-top: 6px solid #e74c3c;
}

.quiz-result-card.risk-a {
  border-top: 6px solid #f39c12;
}

.quiz-result-card.risk-b {
  border-top: 6px solid #2ecc71;
}

.quiz-result-title {
  font-size: 1.5rem;
  color: #003366;
  margin-bottom: 15px;
  font-family: 'Shippori Mincho', serif;
}

.quiz-result-advice {
  color: #636e72;
  line-height: 1.8;
  margin-bottom: 25px;
}

.quiz-result-cta {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}

.quiz-result-cta .btn-primary {
  padding: 22px 70px;
  font-size: 1.4rem;
  font-weight: 700;
}

/* Grade Grid CTA Specific */
.btn-grade-cta {
  padding: 20px 60px !important;
  font-size: 1.2rem !important;
  font-weight: 700 !important;
}

/* Grade Guide Link Premium */
.btn-guide-premium {
  padding: 16px 45px;
  background: transparent;
  color: #003366;
  border: 2px solid #003366 !important;
  font-size: 1.05rem;
  font-weight: 700;
  position: relative;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.btn-guide-premium::after {
  content: '→';
  margin-left: 10px;
  transition: transform 0.3s ease;
  display: inline-block;
}

.btn-guide-premium:hover {
  background: #003366;
  color: #fff;
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 20px rgba(0, 51, 102, 0.2);
}

.btn-guide-premium:hover::after {
  transform: translateX(5px);
}

.btn-guide-premium:active {
  transform: translateY(-1px) scale(1);
}

.btn-text {
  background: none;
  border: none;
  color: #636e72;
  text-decoration: underline;
  cursor: pointer;
  font-size: 0.9rem;
}

/* --- Feature Grid (New Insights) --- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.feature-item {
  background: #fff;
  padding: 35px;
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border-left: 5px solid #f39c12;
  transition: all 0.3s ease;
}

.feature-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.feature-item h3 {
  font-size: 1.25rem;
  color: #003366;
  margin-bottom: 12px;
  font-family: 'Shippori Mincho', serif;
}

.feature-item p {
  color: #636e72;
  line-height: 1.8;
}

.feature-badge {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 12px;
}

/* --- Utility Animations --- */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Responsive Overrides --- */
@media (max-width: 768px) {
  #grade-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .grade-grid-wrapper {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding: 0 10px;
  }

  .stat-count-wrap {
    font-size: 3.5rem;
  }

  .quiz-question-text {
    font-size: 1.2rem;
  }

  .quiz-options {
    flex-direction: column;
    align-items: center;
  }

  .quiz-btn {
    width: 200px;
  }

  .traps-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Wizard Form (Step-by-Step) Styles
   ========================================================================== */
.form-wizard-container {
  background: #fff;
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  margin-top: 30px;
  position: relative;
  overflow: hidden;
}

/* Step Progress Indicator */
.step-progress-wrapper {
  margin-bottom: 40px;
}

.step-progress-bar {
  display: flex;
  justify-content: space-between;
  position: relative;
  padding: 0 10px;
}

.step-progress-bar::before {
  content: "";
  position: absolute;
  top: 15px;
  left: 0;
  width: 100%;
  height: 3px;
  background: #f0f4f8;
  z-index: 1;
}

#step-progress-line {
  position: absolute;
  top: 15px;
  left: 0;
  height: 3px;
  background: var(--main-blue, #003366);
  z-index: 2;
  transition: width 0.4s ease;
}

.step-indicator {
  width: 34px;
  height: 34px;
  background: #fff;
  border: 3px solid #f0f4f8;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  color: #636e72;
  z-index: 3;
  transition: all 0.3s ease;
}

.step-indicator.active {
  border-color: var(--main-blue, #003366);
  color: var(--main-blue, #003366);
  transform: scale(1.15);
}

.step-indicator.completed {
  background: var(--main-blue, #003366);
  border-color: var(--main-blue, #003366);
  color: #fff;
}

.step-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #636e72;
}

/* Form Steps */
.form-step {
  display: none;
  animation: slideInFade 0.4s ease forwards;
}

.form-step.active {
  display: block;
}

@keyframes slideInFade {
  from {
    opacity: 0;
    transform: translateX(20px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.step-actions {
  margin-top: 40px;
}

/* Category Buttons (Step 1) */
.category-selection {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 15px;
  margin-bottom: 25px;
}

.category-btn {
  cursor: pointer;
  border: 2px solid #f0f4f8;
  border-radius: 16px;
  padding: 20px 10px;
  text-align: center;
  transition: all 0.3s ease;
}

.category-btn:hover {
  border-color: #f39c12;
  background: #fffcf5;
}

.category-btn.is-selected {
  border-color: #f39c12;
  background: #fff8e6;
  box-shadow: 0 4px 15px rgba(243, 156, 18, 0.15);
}

.category-btn input[type="radio"] {
  display: none;
}

.category-content i {
  font-size: 1.8rem;
  margin-bottom: 10px;
  display: block;
}

.category-content span {
  font-weight: 700;
  font-size: 0.95rem;
  color: #2d3436;
}

/* Error States */
.category-error {
  border-color: #e74c3c !important;
}

.input-error {
  border-color: #e74c3c !important;
  background-color: #fff5f5 !important;
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1) !important;
}

.shake-error {
  animation: shake 0.5s cubic-bezier(.36, .07, .19, .97) both;
}

@keyframes shake {

  10%,
  90% {
    transform: translate3d(-1px, 0, 0);
  }

  20%,
  80% {
    transform: translate3d(2px, 0, 0);
  }

  30%,
  50%,
  70% {
    transform: translate3d(-4px, 0, 0);
  }

  40%,
  60% {
    transform: translate3d(4px, 0, 0);
  }
}

/* Confirmation Box (Step 4) */
.confirm-box {
  background: #f8fafc;
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 30px;
}

.confirm-box p {
  margin-bottom: 12px;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 8px;
  font-size: 0.95rem;
}

.confirm-box p:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.confirm-box strong {
  color: #003366;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 4px;
}

.confirm-box span {
  font-weight: 700;
  color: #2d3436;
}

@media (max-width: 500px) {
  .category-selection {
    grid-template-columns: 1fr 1fr;
  }

  .form-wizard-container {
    padding: 25px 20px;
  }
}

/* ==========================================================================
   ULTIMATE UX - PREMIUM EXTENSIONS
   ========================================================================== */

/* 1. Scroll Progress Car Indicator */
#scroll-progress-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: rgba(0, 0, 0, 0.05);
  z-index: 10001;
  pointer-events: none;
}

#scroll-progress-road {
  height: 100%;
  background: linear-gradient(to right, var(--color-main), var(--color-accent));
  width: 0;
  /* JS handles width if needed, but here we use the car position */
  position: absolute;
  top: 0;
  left: 0;
}

#scroll-progress-car {
  position: absolute;
  top: -12px;
  font-size: 24px;
  transition: left 0.1s linear;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
  transform: scaleX(-1);
}

/* 2. Badge Notification System */
#badge-notification-container {
  position: fixed;
  top: 100px;
  right: 20px;
  z-index: 10002;
  pointer-events: none;
}

.badge-notification {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  padding: 15px 20px;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 10px;
  transform: translateX(120%);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.badge-notification.is-visible {
  transform: translateX(0);
}

.badge-icon {
  width: 40px;
  height: 40px;
  background: var(--grad-main);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: white;
}

.badge-msg {
  font-size: 0.75rem;
  color: var(--color-accent);
  font-weight: 800;
}

.badge-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-main);
}

/* 3. Glassmorphism Utilities */
.premium-glass {
  background: rgba(255, 255, 255, 0.6) !important;
  backdrop-filter: blur(15px) !important;
  -webkit-backdrop-filter: blur(15px) !important;
  border: 1px solid rgba(255, 255, 255, 0.4) !important;
  box-shadow: 0 8px 32px rgba(0, 45, 92, 0.05) !important;
}

/* 4. Interactive Roadmap (Horizontal Quest) */
.roadmap-container {
  display: flex;
  gap: 0;
  overflow-x: auto;
  padding: 40px 20px 80px;
  scrollbar-width: none;
  position: relative;
}

.roadmap-container::-webkit-scrollbar {
  display: none;
}

.roadmap-step {
  flex: 0 0 300px;
  position: relative;
  padding: 0 20px;
  text-align: center;
}

.roadmap-step::before {
  content: '';
  position: absolute;
  top: 40px;
  left: 50%;
  width: 100%;
  height: 4px;
  background: #E2E8F0;
  z-index: 1;
}

.roadmap-step:last-child::before {
  display: none;
}

.roadmap-icon-wrap {
  width: 80px;
  height: 80px;
  background: white;
  border: 4px solid #E2E8F0;
  border-radius: 50%;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  position: relative;
  z-index: 2;
  transition: all 0.4s ease;
  box-shadow: var(--shadow-sm);
}

.roadmap-step.is-active .roadmap-icon-wrap {
  border-color: var(--color-accent);
  color: var(--color-accent);
  transform: scale(1.1);
  box-shadow: 0 0 20px var(--color-accent-soft);
}

.roadmap-info {
  opacity: 0.8;
  transition: opacity 0.4s ease;
}

.roadmap-step.is-active .roadmap-info {
  opacity: 1;
}

.roadmap-step h3 {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 10px;
  color: var(--color-main);
}

.roadmap-step p {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--color-text-secondary);
}

/* 5. Trap Cards refinements */
.trap-card {
  background: white;
  padding: 30px;
  border-radius: 20px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.trap-card:hover {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
  border-color: #e74c3c;
}

.trap-num {
  font-family: var(--font-serif);
  font-size: 0.8rem;
  font-weight: 700;
  color: #e74c3c;
  margin-bottom: 15px;
}

.trap-title {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 15px;
  line-height: 1.4;
  color: var(--color-main);
}

.trap-desc {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  margin-bottom: 20px;
}

.trap-alert {
  display: inline-block;
  background: #fff5f5;
  color: #e74c3c;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
}

/* Premium Global Navigation Styles Override for Consistency */
.section-nav-container { position: fixed; right: 10px !important; top: 50% !important; transform: translateY(-50%) !important; z-index: 10020 !important; display: flex !important; flex-direction: column !important; gap: 12px !important; }
.section-nav-dot { width: 12px !important; height: 12px !important; background: rgba(0,0,0,0.2) !important; border: 2px solid #fff !important; border-radius: 50% !important; cursor: pointer !important; transition: all 0.3s ease !important; position: relative !important; }
.section-nav-dot:hover { background: var(--accent-orange, #f39c12) !important; transform: scale(1.2) !important; }
.section-nav-dot.is-active { background: var(--accent-orange, #f39c12) !important; transform: scale(1.3) !important; }
.section-nav-label { position: absolute !important; right: 24px !important; top: 50% !important; transform: translateY(-50%) !important; background: rgba(0,0,0,0.8) !important; color: #fff !important; padding: 4px 8px !important; border-radius: 4px !important; font-size: 12px !important; white-space: nowrap !important; opacity: 0 !important; pointer-events: none !important; transition: all 0.3s ease !important; }
.section-nav-dot:hover .section-nav-label { opacity: 1 !important; right: 28px !important; }

.page-top-btn { position: fixed !important; right: 30px !important; bottom: 30px !important; width: 60px !important; height: 60px !important; background: var(--main-blue, #003366) !important; color: #fff !important; border-radius: 50% !important; display: flex !important; flex-direction: column !important; align-items: center !important; justify-content: center !important; text-decoration: none !important; z-index: 10021 !important; box-shadow: 0 4px 12px rgba(0,0,0,0.2) !important; transition: all 0.3s ease !important; border: none !important; cursor: pointer !important; opacity: 0 !important; visibility: hidden !important; }
.page-top-btn.is-visible { opacity: 1 !important; visibility: visible !important; }
.page-top-btn:hover { background: var(--accent-orange, #f39c12) !important; transform: translateY(-5px) !important; }
.page-top-btn svg { width: 24px !important; height: 24px !important; margin-bottom: 2px !important; }
.page-top-btn span { font-size: 10px !important; font-weight: bold !important; }

.mobile-nav-container { position: fixed !important; right: 30px !important; bottom: 110px !important; z-index: 10022 !important; }
.mobile-nav-trigger { width: 60px !important; height: 60px !important; background: var(--accent-orange, #f39c12) !important; color: #fff !important; border-radius: 50% !important; display: flex !important; flex-direction: column !important; align-items: center !important; justify-content: center !important; box-shadow: 0 4px 12px rgba(0,0,0,0.2) !important; border: 2px solid #fff !important; cursor: pointer !important; padding-top: 4px !important; }
.trigger-icon { width: 24px !important; height: 2px !important; background: #fff !important; position: relative !important; transition: all 0.3s !important; margin-bottom: 2px !important; }
.trigger-icon::before, .trigger-icon::after { content: '' !important; width: 24px !important; height: 2px !important; background: #fff !important; position: absolute !important; left: 0 !important; transition: all 0.3s !important; }
.trigger-icon::before { top: -8px !important; }
.trigger-icon::after { top: 8px !important; }
.trigger-label { font-size: 10px !important; font-weight: bold !important; margin-top: 14px !important; letter-spacing: 0.05em !important; }
.mobile-nav-container.is-open .trigger-icon { background: transparent !important; }
.mobile-nav-container.is-open .trigger-icon::before { transform: rotate(45deg) !important; top: 0 !important; }
.mobile-nav-container.is-open .trigger-icon::after { transform: rotate(-45deg) !important; top: 0 !important; }

.mobile-nav-menu { position: absolute !important; bottom: 70px !important; right: 0 !important; background: #fff !important; border-radius: 16px !important; box-shadow: 0 10px 30px rgba(0,0,0,0.15) !important; width: 220px !important; opacity: 0 !important; visibility: hidden !important; transform: translateY(20px) scale(0.9) !important; transition: all 0.3s cubic-bezier(0.16,1,0.3,1) !important; overflow: hidden !important; }
.mobile-nav-container.is-open .mobile-nav-menu { opacity: 1 !important; visibility: visible !important; transform: translateY(0) scale(1) !important; }
.mobile-nav-list { padding: 10px 0 !important; list-style: none !important; margin: 0 !important; }
.mobile-nav-item { display: flex !important; align-items: center !important; gap: 12px !important; padding: 12px 20px !important; color: #333 !important; text-decoration: none !important; font-size: 14px !important; font-weight: 600 !important; border-bottom: 1px solid #f0f0f0 !important; }
.mobile-nav-item:last-child { border-bottom: none !important; }
.mobile-nav-item:active { background: #f8f9fa !important; }

@media (max-width: 1150px) { 
  .section-nav-container { display: none !important; } 
  .page-top-btn { bottom: 150px !important; right: 15px !important; width: 50px !important; height: 50px !important; } 
  .mobile-nav-container { bottom: 85px !important; right: 15px !important; } 
}

/* Fix Inheritance LP Floating Footer layout and overlap */
.floating-nav { left: 0 !important; right: 0 !important; margin: 0 auto !important; width: 95% !important; max-width: 500px !important; bottom: 90px !important; z-index: 10015 !important; transform: translateY(150%) !important; position: fixed !important; }
.floating-nav.is-visible { transform: translateY(0) !important; }
.read-progress-bar { position: absolute; bottom: 0; left: 0; height: 3px; background: var(--accent-orange, #f39c12); transition: width 0.1s; border-radius: 0 0 40px 40px; }
/* ========================================
   Knowledge Sequential Navigation (Subpage Navigation)
   ======================================== */
.knowledge-navigation {
  margin: 60px 0;
  padding-top: 40px;
  border-top: 1px solid #eee;
}

.k-nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 20px;
}

.k-nav-link {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 24px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  text-decoration: none;
  transition: transform 0.3s, opacity 0.3s, background-color 0.3s, border-color 0.3s, box-shadow 0.3s, color 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  position: relative;
  max-width: 45%;
}

.k-nav-link:hover {
  transform: translateY(-5px);
  border-color: var(--accent-orange, #f39c12);
  box-shadow: 0 12px 20px -5px rgba(243, 156, 18, 0.2);
}

.k-nav-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--accent-orange, #f39c12);
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.k-nav-title {
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--main-blue, #003366);
  line-height: 1.4;
}

.k-nav-link.next {
  text-align: right;
  align-items: flex-end;
}

.k-nav-link.next::after {
  content: "→";
  position: absolute;
  right: 20px;
  bottom: 20px;
  font-size: 1.2rem;
  opacity: 0.3;
  transition: transform 0.3s;
}

.k-nav-link.prev::after {
  content: "←";
  position: absolute;
  left: 20px;
  bottom: 20px;
  font-size: 1.2rem;
  opacity: 0.3;
  transition: transform 0.3s;
}

.k-nav-link:hover::after {
  opacity: 1;
  color: var(--accent-orange, #f39c12);
}

.k-nav-link.next:hover::after {
  transform: translateX(5px);
}

.k-nav-link.prev:hover::after {
  transform: translateX(-5px);
}

.k-nav-index {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  color: #64748b;
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: 50px;
  transition: transform 0.3s, opacity 0.3s, background-color 0.3s, border-color 0.3s, box-shadow 0.3s, color 0.3s;
}

.k-nav-index:hover {
  color: var(--accent-orange, #f39c12);
  background: var(--main-blue-light, #e6f0fa);
}

.k-nav-spacer {
  flex: 1;
  max-width: 45%;
}

@media (max-width: 768px) {
  .k-nav-inner {
    flex-direction: column;
    align-items: center;
  }

  .k-nav-link {
    max-width: 100%;
    width: 100%;
  }

  .k-nav-index {
    order: 3;
    padding: 20px;
  }
}

/* ========================================
   Mega Menu Styles
   ======================================== */
.mega-menu {
  position: absolute;
  top: calc(100% - 15px); /* ヘッダーの下端とわずかに重ねる */
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  padding: 0;
  opacity: 0;
  visibility: hidden;
  display: block;
  pointer-events: none;
  transform: translateY(10px);
  /* 閉じるときに0.1sのディレイを設けて、隙間の通過による誤動作を防ぐ */
  transition: transform 0.4s, opacity 0.4s, visibility 0.4s 0.2s;
  z-index: 9999;
  border-radius: 0 0 30px 30px;
  overflow: hidden;
}

.gnav-item.has-mega:hover .mega-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  /* 開くときは即座に反応させる */
  transition-delay: 0s;
}

/* ホバー時の隙間を埋めるための不可視のバッファ（ナビゲーション側） */
.gnav-item.has-mega .gnav-link::after {
  content: '';
  position: absolute;
  top: 100%;
  left: -10px;
  right: -10px;
  height: 50px;
  z-index: 10010;
  background: transparent;
}

/* リンクとメニューの間の隙間を完全に埋めるブリッジ */
.mega-menu::before {
  content: "";
  position: absolute;
  top: -40px; /* さらに上までカバーしてヘッダー内のリンク部分と確実に重ねる */
  left: 0;
  width: 100%;
  height: 40px;
  background: transparent;
  z-index: 10;
  pointer-events: auto;
}

.mega-tabbed-container {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  background: #fff;
  min-height: 400px;
}

.mega-tab-sidebar {
  width: 280px;
  background: #fafafa;
  border-right: 1px solid rgba(0, 0, 0, 0.05);
  padding: 20px 0;
  flex-shrink: 0;
}

.mega-tab {
  padding: 18px 30px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  color: #777;
  transition: all 0.3s ease;
  border-left: 4px solid transparent;
}

.mega-tab:hover {
  color: #002D5C;
  background: rgba(0, 0, 0, 0.02);
}

.mega-tab.active {
  background: #fff;
  color: #002D5C;
  border-left-color: #00C896;
}

.mega-tab-content {
  flex: 1;
  padding: 40px 50px;
  background: #fff;
  position: relative;
  overflow-y: auto;
  max-height: 600px;
}

.mega-pane {
  display: none;
  opacity: 0;
  transform: translateY(10px);
}

.mega-pane.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.4s, transform 0.4s;
}

.mega-pane-title {
  font-size: 1.25rem;
  margin-bottom: 25px;
  color: #002D5C;
  font-weight: 700;
  border-bottom: 2px solid #f4f4f4;
  padding-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.mega-pane-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px 25px;
}

.mega-grid-item {
  position: relative;
  padding-left: 20px;
}

.mega-grid-item::before {
  content: "→";
  position: absolute;
  left: 0;
  color: #00C896;
  opacity: 0.3;
  transition: all 0.3s ease;
}

.mega-grid-item:hover::before {
  opacity: 1;
  transform: translateX(3px);
}

.mega-grid-item a {
  color: #444;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: all 0.3s ease;
  display: block;
}

.mega-grid-item a:hover {
  color: #002D5C;
  transform: translateX(5px);
}

@media (max-width: 1150px) {
  .mega-menu {
    display: none !important;
  }
}


/* Final Mega Menu Layout Fixes */
.gnav-item.has-mega {
  position: static !important;
}

.mega-menu {
  left: 0 !important;
  width: 100% !important;
  max-width: 100vw !important;
}

