body {
  font-family: "游ゴシック体", YuGothic, "ヒラギノ角ゴ ProN W3", "Hiragino Kaku Gothic ProN", sans-serif;
  margin: 0;
  background: var(--body-bg); 
  overflow-x: hidden; 
}

/* General Anchor Tag Styling */
a {
  color: var(--primary-color);
  text-decoration: none;
}

a:visited {
  color: var(--primary-color);
}

a:hover {
  text-decoration: underline;
}

.hero {
  background: linear-gradient(to bottom, var(--hero-gradient-start), var(--hero-gradient-end)), linear-gradient(to bottom, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.1)) no-repeat center center/cover;
  color: var(--text-color-on-primary);
  padding: 150px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 60vh;
}

.hero h2 {
  font-size: 1.8em;
  margin-bottom: 0.3em;
  opacity: 0;
  animation: floatUp 1s ease-out forwards;
}

.hero p { 
  font-size: 1.3em;
  margin-top: 0;
  opacity: 0;
  animation: fadeIn 1.5s ease-in-out 0.5s forwards; /* floatUpからfadeInに変更 */
}

.hero-text-box {
  background-color: rgba(0, 0, 0, 0.5);
  padding: 20px;
  border-radius: 10px;
  display: inline-block;
}

nav {
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  padding: 10px 0px 10px 0px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-logo {
  height: 32px;
  width: auto;
}

nav .links {
  display: flex;
  justify-content: right;
  flex-grow: 1;
  padding-right:10px;
}

nav a { 
  color: var(--nav-link-color);
  text-decoration: none;
  margin: 0 10px;
  font-weight: bold;
  font-size: 1em;
}

nav span.selected-page { 
  color: var(--nav-link-selected-color);
  text-decoration: none;
  margin: 0 10px;
  font-weight: bold;
  font-size: 1em;
}

nav a:hover {
  color: var(--nav-link-hover-color);
  text-decoration: underline; 
}

.main-content {
  margin-top: 30px;
  margin-bottom: 30px;
}

section { 
  max-width: 900px;
  margin: 48px auto;
  background: var(--section-bg);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  padding: 36px 28px;
  opacity: 0;
  animation: fadeIn 1s ease-in-out 1s forwards; 
}

section h2 {
  color: var(--primary-color);
  margin-top: 0; 
}

/* Common Section Block Styles */
.common-section-block {
  max-width: 1000px;
  margin: 60px auto;
  background: var(--section-bg);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  padding: 0;
  overflow: hidden;
  opacity: 0;
  animation: fadeIn 1s ease-in-out 0.5s forwards;
}

.common-section-header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-color-light) 100%);
  color: var(--text-color-on-primary);
  padding: 20px 20px;
  text-align: center;
}

.common-section-header h2 {
  font-size: 2.2em;
  margin: 0 0 10px 0;
  font-weight: bold;
  color: var(--text-color-on-primary);
  text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
}

.common-section-subtitle {
  font-size: 1.1em;
  margin: 0;
  opacity: 0.9;
  font-weight: 300;
}

.common-section-content {
  padding: 20px;
}

.common-section-content h3 {
  text-align: center; font-size: 1.4em; margin-bottom: 20px;
}

/* CTA section */
.cta-section {
  max-width: 700px;
  margin-top: 5px;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-color-light) 100%);
  color: var(--text-color-on-primary);
  padding: 30px 10px 30px 10px;
  text-align: center;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.cta-section h2 {
  font-size: 1.75em;
  margin: 0 0 20px 0;
  font-weight: bold;
  color: var(--text-color-on-primary);
}

.cta-section p {
  font-size: 1.05em;
  color: var(--text-color-on-primary);
  margin: 0 0 30px 0;
  opacity: 0.9;
}

.cta-button {
  display: inline-block;
  background: white;
  color: var(--cta-button-color);
  padding: 15px 30px;
  text-decoration: none;
  border-radius: 8px;
  font-weight: bold;
  font-size: 1.1em;
  transition: background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
  box-shadow: 0 6px var(--cta-button-shadow);
}

.cta-button:hover {
  background: var(--menu-button-hover-bg);
  color: var(--text-color-on-primary);
  transform: translateY(-2px);
  box-shadow: 0 2px var(--menu-button-shadow);
  text-decoration: none;
}

.entry-button {
  display: inline-block;
  background-color: var(--entry-button-bg);
  color: white;
  padding: 12px 25px;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold; 
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  margin-top: 10px;
  box-shadow: 0 4px var(--menu-button-shadow);
}

.entry-button:hover {
  background-color: var(--entry-button-hover-bg);
  color: white;
  text-decoration: none;
  box-shadow: none;
}


/* Keyframes */
@keyframes floatUp {
  0% {
    opacity: 0;
    transform: translateY(50px);
  }
  50% {
    opacity: 0.5;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0px);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}


.footer-section {
  background-color: #fff;
  color: #000;
  text-align: center;
  padding: 10px 20px;
  margin-top: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
}

.footer-logo-left {
  height: 32px;
  width: auto;
}

.footer-logo-right {
  height: 32px;
  width: auto;
}

.footer-content p {
  margin: 0;
}

/* Back to Top Button */
.back-to-top-container {
  text-align: right;
  margin: 20px 40px;
  text-wrap-mode: nowrap;
}
.back-to-top-link {
  text-decoration: none;
  color: #333;
  font-weight: bold;
  padding: 10px 20px;
  border: 1px solid #ccc;
  border-radius: 5px;
  background-color: #ffffff;
}
.back-to-top-link:hover {
  background-color: #ddd;
}

/* --- Responsive Styles for Smart Phone --- */
@media (max-width: 768px) {
  /* Header */
  nav {
    flex-wrap: wrap; /* Allow items to wrap */
    padding: 15px 20px; /* Increased vertical padding */
    position: relative; /* For absolute positioning of hamburger */
  }

  .header-logo {
    height: 28px; /* Adjust logo size for mobile */
  }

  /* Hide the checkbox */
  .menu-toggle {
    display: none;
  }

  /* Hamburger Icon */
  .hamburger-icon {
    display: block; /* Change from flex to block for background image */
    width: 48px; /* Adjust size for image */
    height: 48px; /* Adjust size for image */
    cursor: pointer;
    position: absolute; /* Position hamburger icon */
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100; /* Ensure it's above other content */
    background-image: url('../img/ham-menu-off.png'); /* Default icon */
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
  }

  .hamburger-icon span {
    display: none; /* Hide the spans as we are using background images */
  }

  /* Hamburger animation when checked */
  .menu-toggle:checked + .hamburger-icon {
    background-image: url('../img/ham-menu-on.png'); /* Open icon */
  }
  /* Navigation Links */
  nav .links {
    display: none; /* Hide by default on mobile */
    flex-direction: column;
    align-items: center;
    width: 100%;
    background: #fff; /* Ensure background for menu */
    position: absolute;
    top: 100%; /* Position below the header */
    left: 0;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    z-index: 99;
    padding-bottom: 10px;
  }

  /* Show menu when checkbox is checked */
  .menu-toggle:checked ~ .links {
    display: flex;
  }

  nav .links a,
  nav .links span {
    margin: 0; /* Reset margin */
    padding: 15px 20px;
    width: 100%;
    text-align: center;
    border-bottom: 1px solid #eee;
  }

  nav .links a:last-child,
  nav .links span:last-child {
    border-bottom: none;
  }

  /* Hero Section */
  .hero {
    padding: 80px 20px;
    min-height: 40vh;
  }

  .hero h2 {
    font-size: 1.5em;
  }

  .hero p {
    font-size: 1.1em;
  }

  /* Sections */
  section {
    margin: 24px auto;
    padding: 24px 20px;
  }

  /* Footer */
  .footer-section {
    flex-direction: column;
  }

  .footer-logo-left,
  .footer-logo-right {
    margin-bottom: 15px;
  }

  .footer-content {
    order: 1; /* ロゴより下に表示 */
    margin-bottom: 15px;
  }


  .common-section-content {
  padding: 1px;
}
}

/* Desktop styles for hamburger elements - ensure they are hidden */
@media (min-width: 769px) {
  .menu-toggle,
  .hamburger-icon {
    display: none;
  }
}

/* Remove top margin from the first content block after the nav bar */
.main-content > section:first-of-type,
.main-content > .common-section-block:first-of-type,
.main-content > .hero:first-of-type,
.main-content > .tab-container:first-of-type {
  margin-top: 0;
}