
/* =========================================================
   ENGLISH MOBILE HEADER + FOOTER
   Mobile behavior/geometry matched to the Japanese index page.
   Desktop header and desktop hero are intentionally untouched.
========================================================= */

:root {
  --mobile-footer-navy: #06245c;
  --mobile-footer-blue: #1769d2;
}

/* ---------- MOBILE HEADER ---------- */
@media (max-width: 900px) {
  body.menu-open {
    overflow: hidden;
  }

  .site-header {
    position: sticky !important;
    top: 0 !important;
    z-index: 99999 !important;
    width: 100% !important;
    background: #fff !important;
    border-bottom: 1px solid #e6edf7 !important;
  }

  .site-header .header-inner {
    width: 100% !important;
    height: 68px !important;
    min-height: 68px !important;
    padding: 0 18px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    position: relative !important;
  }

  .site-header .logo {
    display: inline-flex !important;
    align-items: center !important;
    margin: 0 !important;
  }

  .site-header .logo img {
    width: auto !important;
    height: 42px !important;
    max-width: none !important;
    display: block !important;
  }

  .site-header #menu-toggle {
    display: none !important;
  }

  .site-header .hamburger {
    display: inline-flex !important;
    width: 44px !important;
    height: 44px !important;
    align-items: center !important;
    justify-content: center !important;
    flex-direction: column !important;
    gap: 6px !important;
    margin-left: auto !important;
    cursor: pointer !important;
    border: 1px solid #dce7f7 !important;
    border-radius: 12px !important;
    background: #fff !important;
    box-shadow: 0 10px 24px rgba(7,29,73,.08) !important;
    z-index: 100001 !important;
  }

  .site-header .hamburger span {
    display: block !important;
    width: 22px !important;
    height: 2px !important;
    margin: 0 !important;
    background: #071d49 !important;
    border-radius: 10px !important;
    transform-origin: center !important;
    transition: transform .25s ease, opacity .2s ease !important;
  }

  #menu-toggle:checked + .hamburger span:nth-child(1) {
    transform: translateY(8px) rotate(45deg) !important;
  }
  #menu-toggle:checked + .hamburger span:nth-child(2) {
    opacity: 0 !important;
    transform: scaleX(0) !important;
  }
  #menu-toggle:checked + .hamburger span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg) !important;
  }

  .site-header .nav-menu {
    position: fixed !important;
    top: 68px !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: calc(100vh - 68px) !important;
    margin: 0 !important;
    padding: 24px 22px 150px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 6px !important;
    background: rgba(255,255,255,.98) !important;
    backdrop-filter: blur(18px);
    border-top: 1px solid #e6edf7 !important;
    box-shadow: 0 28px 70px rgba(7,29,73,.16) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: translateY(-100%) !important;
    transition: transform .42s cubic-bezier(.22,1,.36,1), opacity .28s ease, visibility .28s ease !important;
    z-index: 99998 !important;
    overflow-y: auto !important;
  }

  #menu-toggle:checked ~ .nav-menu {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: translateY(0) !important;
  }

  .site-header .nav-menu > a {
    width: 100% !important;
    min-height: 56px !important;
    padding: 0 8px !important;
    display: flex !important;
    align-items: center !important;
    color: #071d49 !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    border-bottom: 1px solid #edf2f8 !important;
  }

  .site-header .header-actions {
    display: none !important;
  }

  /* Japanese-style floating mobile language switch */
  .mobile-language-switch {
    position: fixed !important;
    right: 14px !important;
    bottom: 14px !important;
    z-index: 100002 !important;
    display: inline-flex !important;
    align-items: center !important;
    padding: 3px !important;
    border: 1px solid #b9d5ff !important;
    border-radius: 10px !important;
    background: rgba(255,255,255,.97) !important;
    box-shadow: 0 8px 24px rgba(7,29,73,.16) !important;
    overflow: hidden !important;
    font-family: "Poppins","Noto Sans JP",Arial,sans-serif !important;
  }

  .mobile-language-switch .language-switch__item {
    min-width: 45px !important;
    height: 32px !important;
    padding: 0 10px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 7px !important;
    color: #005ce6 !important;
    background: transparent !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
  }

  .mobile-language-switch .language-switch__item.is-active {
    color: #fff !important;
    background: #005ce6 !important;
  }
}

@media (max-width: 480px) {
  .site-header .header-inner {
    padding: 0 16px !important;
  }
  .site-header .logo img {
    height: 38px !important;
  }
}

/* ---------- FOOTER: SAME STRUCTURE/STYLING AS JAPANESE VERSION ---------- */
.footer {
  width: 100%;
  background: linear-gradient(135deg, var(--mobile-footer-navy), var(--mobile-footer-blue));
  color: #fff;
  font-family: "Poppins","Inter",sans-serif;
}

.footer-container {
  display: grid;
  grid-template-columns: 340px 1fr;
  padding: 0;
}

.footer-brand {
  background: #fff;
  color: #0047a8;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: auto;
}

.footer-brand img {
  width: auto;
  height: 78px;
  max-width: 100%;
  margin-bottom: 5px;
}

.footer-brand .tagline {
  margin: 0;
  color: #0047a8;
  font-size: 16px;
  line-height: 1.2;
  font-weight: 600;
  font-family: "Poppins",sans-serif;
  text-align: center;
}

.footer-links {
  background: linear-gradient(135deg, var(--mobile-footer-navy), var(--mobile-footer-blue));
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 60px;
  padding: 30px 50px 10px;
  font-family: "Poppins",sans-serif;
}

.footer-column h3 {
  margin: 0 0 28px;
  color: #b6d4f9;
  font-size: 22px;
  font-weight: 600;
}

.footer-column a {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  color: #fff;
  font-size: 17px;
  text-decoration: none;
  transition: color .3s ease, transform .3s ease;
}

.footer-column a:hover {
  color: #dbe8f9;
  transform: translateX(5px);
}

.footer-column i {
  width: 20px;
  text-align: center;
  font-size: 18px;
}

.footer-bottom {
  background: #fff;
  border-top: 1px solid rgba(21,95,151,.5);
  color: #333;
  text-align: center;
  padding: 22px;
  font-size: 17px;
  font-family: "Poppins",sans-serif;
}

@media (max-width: 1100px) {
  .footer-container {
    grid-template-columns: 1fr;
  }

  .footer-brand {
    align-items: center;
    text-align: center;
    padding: 50px 30px;
  }

  .footer-links {
    padding: 50px 40px;
  }
}

@media (max-width: 768px) {
  .footer {
    text-align: left;
  }

  .footer-container {
    grid-template-columns: 1fr !important;
    padding: 0 !important;
  }

  .footer-brand {
    align-items: center;
    text-align: center;
    padding: 42px 24px 34px !important;
    background: #fff !important;
  }

  .footer-brand img {
    width: auto !important;
    height: 78px !important;
  }

  .footer-brand .tagline {
    max-width: 330px;
    font-size: 16px !important;
    line-height: 1.5 !important;
  }

  .footer-links {
    grid-template-columns: 1fr !important;
    gap: 30px !important;
    padding: 36px 28px 28px !important;
    background: linear-gradient(135deg, var(--mobile-footer-navy), var(--mobile-footer-blue)) !important;
  }

  .footer-column h3 {
    margin-bottom: 14px !important;
    font-size: 20px !important;
  }

  .footer-column a {
    justify-content: flex-start !important;
    margin-bottom: 12px !important;
    font-size: 15px !important;
    line-height: 1.45 !important;
  }

  .footer-bottom {
    padding: 18px 16px !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
  }
}


/* =========================================================
   FINAL RESPONSIVE HEADER — MATCH JAPANESE VERSION
   Desktop >= 901px remains unchanged.
   Mobile/tablet <= 900px uses the exact compact JP geometry.
========================================================= */
@media (max-width: 900px) {
  body.menu-open {
    overflow: hidden !important;
  }

  .site-header {
    position: sticky !important;
    top: 0 !important;
    z-index: 99999 !important;
    width: 100% !important;
    background: #ffffff !important;
    border-bottom: 1px solid #e6edf7 !important;
    box-shadow: none !important;
  }

  .site-header .header-inner {
    width: 100% !important;
    height: 68px !important;
    min-height: 68px !important;
    padding: 0 18px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0 !important;
  }

  .site-header .logo {
    flex: 0 0 auto !important;
    display: inline-flex !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .site-header .logo img {
    width: auto !important;
    height: 42px !important;
    max-width: none !important;
    display: block !important;
  }

  .site-header #menu-toggle {
    display: none !important;
  }

  .site-header .hamburger {
    display: inline-flex !important;
    flex: 0 0 44px !important;
    width: 44px !important;
    height: 44px !important;
    margin: 0 !important;
    padding: 0 !important;
    align-items: center !important;
    justify-content: center !important;
    flex-direction: column !important;
    gap: 6px !important;
    cursor: pointer !important;
    border: 1px solid #dce7f7 !important;
    border-radius: 12px !important;
    background: #ffffff !important;
    box-shadow: 0 10px 24px rgba(7,29,73,.08) !important;
    position: relative !important;
    z-index: 100001 !important;
  }

  .site-header .hamburger span {
    display: block !important;
    width: 22px !important;
    height: 2px !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #071d49 !important;
    border-radius: 10px !important;
    transform-origin: center !important;
    transition: transform .25s ease, opacity .2s ease !important;
  }

  #menu-toggle:checked + .hamburger span:nth-child(1) {
    transform: translateY(8px) rotate(45deg) !important;
  }

  #menu-toggle:checked + .hamburger span:nth-child(2) {
    opacity: 0 !important;
    transform: scaleX(0) !important;
  }

  #menu-toggle:checked + .hamburger span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg) !important;
  }

  .site-header .nav-menu {
    position: fixed !important;
    top: 68px !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: calc(100vh - 68px) !important;
    margin: 0 !important;
    padding: 24px 22px 150px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 6px !important;
    background: rgba(255,255,255,.98) !important;
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    border-top: 1px solid #e6edf7 !important;
    box-shadow: 0 28px 70px rgba(7,29,73,.16) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: translateY(-100%) !important;
    transition:
      transform .42s cubic-bezier(.22,1,.36,1),
      opacity .28s ease,
      visibility .28s ease !important;
    z-index: 99998 !important;
    overflow-y: auto !important;
  }

  #menu-toggle:checked ~ .nav-menu {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: translateY(0) !important;
  }

  .site-header .nav-menu > a {
    width: 100% !important;
    min-height: 56px !important;
    padding: 0 8px !important;
    display: flex !important;
    align-items: center !important;
    color: #071d49 !important;
    font-family: "Poppins","Noto Sans JP",Arial,sans-serif !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    text-decoration: none !important;
    border-bottom: 1px solid #edf2f8 !important;
  }

  .site-header .header-actions {
    display: none !important;
  }

  /* floating language switch exactly like JP mobile */
  .mobile-language-switch {
    position: fixed !important;
    right: 14px !important;
    bottom: 14px !important;
    z-index: 100002 !important;
    display: inline-flex !important;
    align-items: center !important;
    padding: 3px !important;
    border: 1px solid #b9d5ff !important;
    border-radius: 10px !important;
    background: rgba(255,255,255,.97) !important;
    box-shadow: 0 8px 24px rgba(7,29,73,.16) !important;
    overflow: hidden !important;
  }

  .mobile-language-switch .language-switch__item {
    min-width: 45px !important;
    height: 32px !important;
    padding: 0 10px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 7px !important;
    color: #005ce6 !important;
    background: transparent !important;
    font-family: "Poppins","Noto Sans JP",Arial,sans-serif !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    text-decoration: none !important;
    white-space: nowrap !important;
  }

  .mobile-language-switch .language-switch__item.is-active {
    color: #ffffff !important;
    background: #005ce6 !important;
  }
}

/* Small phones — exact Japanese compact logo spacing */
@media (max-width: 480px) {
  .site-header .header-inner {
    padding: 0 16px !important;
  }

  .site-header .logo img {
    height: 38px !important;
  }
}

/* Tablet / small laptop: follow JP responsive desktop geometry */
@media (min-width: 901px) and (max-width: 1180px) {
  .site-header .header-inner {
    min-height: 96px !important;
  }
}


/* =========================================================
   MOBILE HERO CTA — JAPANESE REFERENCE
   Header/footer and desktop layout remain unchanged.
========================================================= */
@media (max-width: 600px) {
  .dx-denai-hero-actions {
    width: 100% !important;
    max-width: none !important;
    margin: 12px 0 16px !important;
    padding: 0 !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    box-sizing: border-box !important;
  }

  .dx-denai-hero-actions > .btn,
  .dx-denai-hero-actions > .btn.primary,
  .dx-denai-hero-actions > .btn.outline {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 52px !important;
    margin: 0 !important;
    padding: 0 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    border: 0 !important;
    border-radius: 7px !important;
    color: #fff !important;
    font-family: "Poppins","Noto Sans JP",Arial,sans-serif !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    text-align: center !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    overflow: hidden !important;
  }

  .dx-denai-hero-actions > .btn.primary {
    background: #0861e8 !important;
  }

  .dx-denai-hero-actions > .btn.outline {
    background: #ff9633 !important;
  }

  .dx-denai-patent-card {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }
}


/* =========================================================
   MOBILE OPEN MENU — EXACT JAPANESE-STYLE VISUAL MATCH
   English labels/content only; desktop remains untouched.
========================================================= */
@media (max-width: 900px) {
  /* Full-screen white menu panel below compact header */
  .site-header .nav-menu {
    top: 68px !important;
    height: calc(100vh - 68px) !important;
    padding: 28px 24px 170px !important;
    background: #ffffff !important;
    gap: 10px !important;
    box-shadow: none !important;
    border-top: 1px solid #e6edf7 !important;
  }

  /* Rounded menu cards like JP reference */
  .site-header .nav-menu > a {
    min-height: 62px !important;
    margin: 0 !important;
    padding: 0 20px !important;
    border: 1px solid #edf1f6 !important;
    border-radius: 15px !important;
    background: #ffffff !important;
    box-shadow: 0 6px 18px rgba(7,29,73,.035) !important;
    color: #071d49 !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
  }

  .site-header .nav-menu > a:hover,
  .site-header .nav-menu > a:focus-visible {
    color: #005ce6 !important;
    background: #f8fbff !important;
  }

  /* Keep the CTA buttons at the bottom of the open menu */
  #menu-toggle:checked ~ .header-actions {
    position: fixed !important;
    left: 24px !important;
    right: 24px !important;
    bottom: 26px !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    background: transparent !important;
    box-shadow: none !important;
    z-index: 100000 !important;
  }

  #menu-toggle:checked ~ .header-actions .language-switch {
    display: none !important;
  }

  #menu-toggle:checked ~ .header-actions > .btn {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 56px !important;
    padding: 0 18px !important;
    border: 0 !important;
    border-radius: 7px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #fff !important;
    font-family: "Poppins","Noto Sans JP",Arial,sans-serif !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    text-decoration: none !important;
    white-space: nowrap !important;
  }

  #menu-toggle:checked ~ .header-actions > .btn.primary {
    background: #0861e8 !important;
  }

  #menu-toggle:checked ~ .header-actions > .btn.outline {
    background: #ff9633 !important;
  }

  /* Floating language switch overlaps bottom CTA area exactly like JP reference */
  body.menu-open .mobile-language-switch {
    right: 14px !important;
    bottom: 16px !important;
  }
}
