

body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #f5f7fa, #c3cfe2);
  background-attachment: fixed;
  color: #333;
  transition: background 1s ease-in-out;
}

.container {
  display: flex;
  width: 100%;
  min-height: 100vh;
  align-items: stretch;
}

aside {
  width: 220px;
  background: linear-gradient(180deg, #0d3a6d, #0f4c81);
  padding: 20px;
  box-sizing: border-box;
  position: fixed;
  height: 100vh;
  color: white;
}

aside h1 {
  font-size: 1.5rem;
  margin-bottom: 20px;
}

/* Composite-only animation for sidebar links */
aside nav a.nav-link {
  display: block;
  margin: 12px 0;
  color: white;
  text-decoration: none;
  font-weight: 600;
  position: relative;
  transform: translateX(0);
  transition: transform 0.3s ease;
  padding-left: 16px;
}

/* Highlight bar indicator */
aside nav a.nav-link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background-color: #ffdd57;
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.3s ease;
}

/* Hover and Active States */
aside nav a.nav-link:hover,
aside nav a.nav-link.active {
  transform: translateX(8px);
  color: #ffd54f; /* instantaneous change */
}

aside nav a.nav-link:hover::before,
aside nav a.nav-link.active::before {
  transform: scaleY(1);
}

main {
  margin-left: 220px;
  padding: 40px;
  flex: 1;
  box-sizing: border-box;
  min-height: 100vh;
}

section {
  margin-bottom: 60px;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
  will-change: opacity, transform;
  visibility: hidden;
}

section.visible {
  opacity: 1 !important;
  transform: translateY(0) !important;
  visibility: visible !important;
}

ul {
  padding-left: 20px;
  line-height: 1.8;
}

a {
  color: #0f4c81;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
/* レスポンシブ対応 */
@media (max-width: 768px) {
  .container {
    flex-direction: column;
  }
  aside {
    position: relative;
    width: 100%;
    height: auto;
    box-shadow: none;
    border-right: none;
  }
  aside nav {
    display: flex;
    justify-content: space-around;
  }
  aside nav a.nav-link {
    margin: 10px 0;
    padding: 10px;
  }
  main {
    margin-left: 0;
    padding: 20px;
    height: auto;
  }
}