:root {
  --primary-color: #0078d7;
  --accent-color: #00A0E9;
  --action-color: #FFB340;
  --text-color: #333333;
  --text-light: #666666;
  --bg-color: #FFFFFF;
  --bg-light: #F4F7F9;
  --white: #FFFFFF;
}

/* Handwriting Animation */
/* Hero Message Image */
.hero-message-img {
  max-width: 100%;
  height: auto;
  margin-bottom: 20px;
}

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

body {
  font-family: 'Noto Sans JP', sans-serif;
  color: var(--text-color);
  line-height: 1.8;
  background-color: var(--bg-color);
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

.section {
  padding: 100px 0;
}

.bg-light {
  background-color: var(--bg-light);
}

.text-center {
  text-align: center;
}

.mb-20 {
  margin-bottom: 20px;
}

.mb-40 {
  margin-bottom: 40px;
}

/* Typography */
.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 1rem;
  color: var(--primary-color);
  letter-spacing: 0.05em;
}

.section-subtitle {
  display: block;
  text-align: center;
  color: var(--accent-color);
  font-weight: 700;
  margin-bottom: 50px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* --- ボタン --- */
.btn-main {
  display: inline-block;
  background: var(--primary-color);
  color: var(--white);
  padding: 15px 40px;
  border-radius: 50px;
  font-weight: bold;
  box-shadow: 0 4px 15px rgba(0, 120, 215, 0.3);
}

.btn-main:hover {
  transform: translateY(-2px);
  background: #005a9e;
  box-shadow: 0 8px 20px rgba(0, 120, 215, 0.4);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 15px 40px;
  background-color: var(--primary-color);
  color: var(--white);
  border-radius: 50px;
  font-weight: 700;
  letter-spacing: 0.1em;
  transition: all 0.3s;
  border: 2px solid transparent;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.btn-large {
  padding: 20px 60px;
  font-size: 1.2rem;
  background-color: #fff;
  /* White background */
  color: var(--primary-color);
  /* Primary color text */
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  border: 2px solid var(--primary-color);
}

.btn-large:hover {
  background-color: var(--primary-color);
  color: #fff;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}


/* Header */
header {
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  height: 80px;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

/* Header Logo */
.logo {
  text-decoration: none;
  display: block;
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.05);
}

.logo img {
  height: 60px;
  width: auto;
  display: block;
}

@media (max-width: 768px) {
  .logo img {
    height: 50px;
  }
}

@media (max-width: 480px) {
  .logo img {
    height: 40px;
  }
}

.nav-menu {
  display: flex;
  gap: 30px;
  list-style: none;
  align-items: center;
}

.nav-menu a {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-color);
  position: relative;
}

.nav-menu a:hover {
  color: var(--accent-color);
}

/* Hero Section */
.hero {
  height: 100vh;
  min-height: 700px;
  background-color: #fff;
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  margin-top: 0;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.6);
  /* Semi-transparent white */
  clip-path: polygon(0 0, 55% 0, 40% 100%, 0% 100%);
  /* Original diagonal cut */
  z-index: 1;
  transform: translateZ(0);
  will-change: clip-path;
}

.hero-slide-wrapper {
  display: flex;
  height: 100%;
  will-change: transform;
  /* transition is managed by JS to prevent visual glitch on page refresh */
  user-select: none;
}

.hero-slide {
  flex: 0 0 100%;
  height: 100%;
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
}

@media (max-width: 768px) {
  .hero-slide {
    background-position: 75% center;
  }
}

@media (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
  .hero-slide-7987 {
    background-position: right center;
  }

  .feature-card {
    padding: 15px;
  }

  .feature-img-thumb {
    aspect-ratio: 3 / 2;
  }
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 50%;
  padding-left: 5%;
}



.hero-tag {
  display: inline-block;
  background: var(--bg-light);
  color: var(--accent-color);
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 700;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: 3.5rem;
  line-height: 1.2;
  font-weight: 900;
  color: var(--primary-color);
  margin-bottom: 20px;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 40px;
  color: var(--text-light);
}

/* Features */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 60px;
  position: relative;
  z-index: 10;
}

.feature-card {
  background: #fff;
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.feature-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 15px;
  color: var(--primary-color);
}

.feature-img-thumb {
  width: 100%;
  height: auto;
  max-height: 200px;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 20px;
}

/* Animations */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Header */
header {
  background-color: white;
  padding: 10px 40px;
  /* Reduced padding for compact look */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 1000;
  height: auto;
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: auto;
}

.logo img {
  height: 50px;
  /* Adjust size */
  width: auto;
}

/* Navigation Container */
.nav-container {
  display: flex;
  align-items: center;
  margin-left: auto;
  margin-right: 30px;
}

/* Nav Menu (Desktop) */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 15px;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Nav Links Styling (Inherited from previous step but refined) */
.nav-menu a {
  padding: 10px 15px;
  color: #333;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  border: none;
  background: transparent;
  transition: all 0.3s ease;
  position: relative;
  display: inline-block;
  white-space: nowrap;
}

.nav-menu a:hover {
  color: #00A0E9;
  transform: translateY(-1px);
}

@media (min-width: 1281px) {
  .nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: #00A0E9;
    transition: width 0.3s;
  }

  .nav-menu a:hover::after {
    width: 80%;
  }

  .nav-menu a.active {
    color: #0078d7;
    font-weight: 700;
  }

  .nav-menu a.active::after {
    width: 80%;
    background-color: #0078d7;
  }
}

/* Header Right (Action Area) */
.header-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

/* Entry Button (in Header Right) */
.btn-header-entry {
  padding: 10px 24px;
  background-color: #0078d7;
  color: white;
  border-radius: 50px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  box-shadow: 0 4px 10px rgba(0, 120, 215, 0.2);
  transition: all 0.3s;
  white-space: nowrap;
}

.btn-header-entry:hover {
  background-color: #005a9e;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 120, 215, 0.3);
  color: white;
}

/* Hamburger Icon (Animated Spans) */
.hamburger {
  display: none;
  /* Desktop hidden */
  cursor: pointer;
  width: 30px;
  height: 20px;
  position: relative;
  z-index: 2000;
  /* Ensure strictly above menu */
}

.hamburger span {
  display: block;
  position: absolute;
  height: 2px;
  width: 100%;
  background: #333;
  border-radius: 2px;
  opacity: 1;
  left: 0;
  transition: .25s ease-in-out;
}

.hamburger span:nth-child(1) {
  top: 0px;
}

.hamburger span:nth-child(2) {
  top: 9px;
}

.hamburger span:nth-child(3) {
  top: 18px;
}

/* Hamburger Active State */
.hamburger.active span:nth-child(1) {
  top: 9px;
  transform: rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  top: 9px;
  transform: rotate(-45deg);
}

/* Responsive */
@media (max-width: 1280px) {
  header {
    padding: 10px 20px;
  }

  .nav-container {
    display: block;
    margin: 0;
    padding: 0;
    width: 0;
  }

  /* But .nav-menu inside it: */
  .nav-menu {
    display: none;
  }

  .hamburger {
    display: block !important;
    width: 30px;
    height: 20px;
    position: relative;
    z-index: 2000;
  }

  .header-right {
    margin-left: auto;
  }

  /* Adjust Entry Btn for mobile */
  .btn-header-entry {
    padding: 8px 16px;
    font-size: 13px;
  }

  /* Mobile Menu Active State - for all screen sizes <= 1280px */
  .nav-menu.active {
    display: flex !important;
    flex-direction: column;
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    background: #fff;
    padding: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    gap: 0;
    z-index: 9999;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
  }

  .nav-menu.active li {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
  }

  .nav-menu.active a {
    width: 100%;
    display: block;
    padding: 18px 30px;
    text-align: left;
    font-size: 15px;
    font-weight: 500;
    background-color: #003d82;
    color: white;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0;
    box-shadow: none;
    transform: none;
    transition: all 0.2s ease;
  }

  .nav-menu.active li:last-child a {
    border-bottom: none;
  }

  .nav-menu.active a.active {
    background-color: #00A0E9;
  }

  .nav-menu.active a:hover {
    background-color: white;
    color: #003d82;
    padding-left: 40px;
  }
}

@media (max-width: 900px) {

  .btn-header-entry {
    display: none;
  }

  /* Overlay covers full width on mobile */
  .hero-overlay {
    clip-path: none;
  }

  .hero-content {
    width: 100%;
    text-align: center;
    padding: 0 20px;
  }

  .hero p {
    font-size: clamp(0.85rem, 4vw, 1.2rem);
  }

  .features-grid {
    grid-template-columns: 1fr;
    margin-top: 50px;
  }

  .nav-menu {
    display: none;
    /* Mobile menu logic in JS */
  }

  .hamburger {
    display: block;
    font-size: 1.5rem;
    cursor: pointer;
  }

  /* Mobile Menu Link Animation */
  .nav-menu a span {
    position: relative;
    display: inline-block;
  }

  .nav-menu.active a span::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: currentColor;
    transition: width 0.3s;
  }

  /* Hover effect for mobile menu items */
  .nav-menu.active a:hover span::after {
    width: 100%;
  }

  /* Mobile Menu Active State - Previously in JS */
  .nav-menu.active {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 80px;
    /* Header height */
    left: 0;
    width: 100%;
    background: #fff;
    padding: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    gap: 0;
    z-index: 9999;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
  }

  .nav-menu.active li {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
  }

  /* Base style for links in mobile menu */
  .nav-menu.active a {
    width: 100%;
    display: block;
    padding: 18px 30px;
    text-align: left;
    font-size: 15px;
    font-weight: 500;
    background-color: #003d82;
    /* Default blue background */
    color: white;
    /* Default white text */
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0;
    box-shadow: none;
    transform: none;
    transition: all 0.2s ease;
  }

  /* Remove bottom border for the last item */
  .nav-menu.active li:last-child a {
    border-bottom: none;
  }

  /* Active page style in mobile menu */
  .nav-menu.active a.active {
    background-color: #00A0E9;
  }

  /* Hover state for mobile menu links */
  .nav-menu.active a:hover {
    background-color: white;
    color: #003d82;
    padding-left: 40px;
  }
}

.services-page {
  background-color: #fff;
}

/* Page Hero (サブページ共通) */
.page-hero {
  background: linear-gradient(135deg, #003d82 0%, #00a0e9 100%);
  color: #fff;
  padding: 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.page-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 0;
}

.page-description {
  font-size: 16px;
  line-height: 1.8;
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

@media (max-width: 768px) {
  .page-hero {
    padding: 15px;
  }

  .page-title {
    font-size: 28px;
  }

  .page-description {
    font-size: 14px;
    line-height: 1.6;
  }
}

.page-header {
  text-align: center;
  padding: 20px 20px 20px;
  background: linear-gradient(135deg, #003d82 0%, #00a0e9 100%);
  color: white;
}

.page-header h1 {
  font-size: 40px;
  margin-top: 0;
  margin-bottom: 0;
}

.services-section {
  padding: 80px 20px;
  background-color: #f8f9fa;
}

.services-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 80px;
}

.service-item {
  display: flex;
  gap: 50px;
  align-items: center;
  background: white;
  padding: 50px;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.service-item-reverse {
  flex-direction: row-reverse;
}

.service-image {
  flex: 0 0 45%;
}

.service-image img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.service-content {
  flex: 1;
}

.service-title {
  font-size: 32px;
  color: #003d82;
  margin-bottom: 8px;
  font-weight: bold;
}

.service-subtitle {
  font-size: 14px;
  color: #00a0e9;
  margin-bottom: 20px;
  font-weight: 500;
}

.service-description {
  font-size: 16px;
  color: #555;
  line-height: 1.8;
  margin-bottom: 25px;
}

.service-features {
  list-style: none;
  padding: 0;
  margin: 0;
}

.service-features li {
  padding: 10px 0 10px 30px;
  position: relative;
  color: #333;
  font-size: 15px;
}

.service-features li:before {
  content: "✔";
  position: absolute;
  left: 0;
  color: #00a0e9;
  font-weight: bold;
  font-size: 18px;
}

.cta-section {
  text-align: center;
  padding: 80px 20px;
  background-color: #003d82;
  color: white;
}

.cta-section h2 {
  font-size: clamp(1.2rem, 5.5vw, 2.25rem);
  margin-bottom: 16px;
}

.cta-section p {
  font-size: clamp(0.85rem, 4vw, 1.125rem);
  margin-bottom: 30px;
}

.btn-primary {
  display: inline-block;
  padding: 16px 40px;
  background-color: white;
  color: #003d82;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
}

.btn-primary:hover {
  background-color: #00a0e9;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.4);
}

@media (max-width: 768px) {
  .page-header {
    padding: 15px 15px 15px;
  }

  .page-header h1 {
    font-size: 28px;
  }

  .services-section {
    padding: 60px 15px;
  }

  .services-container {
    gap: 50px;
  }

  .service-item,
  .service-item-reverse {
    flex-direction: column;
    padding: 30px;
    gap: 30px;
  }

  .service-image {
    flex: 0 0 auto;
    width: 100%;
  }

  .service-title {
    font-size: 28px;
  }

  .service-description {
    font-size: 15px;
  }
}

/* Index Page Services Preview */
.services-preview {
  padding: 80px 20px;
  background-color: var(--bg-color);
  text-align: center;
}

.services-preview h2 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.services-preview .section-subtitle {
  display: block;
  text-align: center;
  color: var(--accent-color);
  font-weight: 700;
  margin-bottom: 50px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.services-preview-circles {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto 80px;
  padding: 20px;
}

.preview-circle {
  width: 280px;
  aspect-ratio: 1 / 1;
  flex-shrink: 0;
  border-radius: 50%;
  background: #003d82;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px 30px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 61, 130, 0.3);
  animation: gentle-bounce 3s ease-in-out infinite;
}

.preview-circle h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 15px;
  color: white;
}

.preview-circle p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.95);
}

.preview-circle-1 {
  animation-delay: 0s;
}

.preview-circle-2 {
  animation-delay: 0.5s;
}

.preview-circle-3 {
  animation-delay: 1s;
}

@keyframes gentle-bounce {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-15px);
  }
}

.btn-outline {
  display: inline-block;
  padding: 12px 30px;
  border: 2px solid #003d82;
  color: #003d82;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-outline:hover {
  background-color: #003d82;
  color: white;
}

@media (min-width: 769px) and (max-width: 1100px) {
  .services-preview-circles {
    gap: 20px;
    padding: 10px;
  }

  .preview-circle {
    width: 210px;
    padding: 30px 18px;
  }

  .preview-circle h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
  }

  .preview-circle p {
    font-size: 0.82rem;
  }
}

@media (max-width: 768px) {
  .services-preview-circles {
    height: auto;
    display: flex;
    flex-direction: column;
    gap: 30px;
    padding: 20px;
  }

  .preview-circle {
    position: relative !important;
    width: 100%;
    max-width: 280px;
    aspect-ratio: 1 / 1;
    flex-shrink: 1;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    margin: 0 auto;
  }

  .preview-circle h3 {
    font-size: 1.3rem;
  }

  .preview-circle p {
    font-size: 0.85rem;
  }
}