/* ====== SMILE CURVE Homepage - Main Stylesheet ====== */

/* ====== CSS Variables & Configuration ====== */
:root {
  /* Color Palette */
  --green: #56B870;
  --green-light: #A8E6A3;
  --green-deep: #2E8B57;
  
  /* Background Colors */
  --bg: #FFFFFF;
  --bg-soft: #F8FFF8;
  
  /* Text Colors */
  --text: #143018;
  --muted: #6A7C6F;
  
  /* UI Elements */
  --border: #E6F2E6;
  --shadow: 0 8px 24px rgba(20, 48, 24, 0.12);
  
  /* Layout */
  --container-width: min(1120px, 92%);
  --section-padding: 80px 0;
  --header-height: 64px;
  
  /* Typography */
  --font-family: "Noto Sans JP", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-family-heading: "Roboto", sans-serif;
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.6s ease-out;
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 999px;
}

/* ====== Reset & Base Styles ====== */
* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: var(--font-family);
  color: var(--text);
  background: var(--bg);
  padding-top: var(--header-height);
}

/* ====== Typography ====== */
h1, h2, h3 {
  line-height: 1.25;
  margin: 0 0 16px;
}

h2 {
  font-size: clamp(24px, 2.4vw, 32px);
}

p {
  line-height: 1.9;
  color: var(--text);
}

.note {
  font-size: 0.92rem;
  color: var(--muted);
}

/* ====== Layout Components ====== */
.container {
  width: var(--container-width);
  margin-inline: auto;
}

.section {
  padding: var(--section-padding);
  background: var(--bg);
}

.section.alt {
  background: var(--bg-soft);
}

/* ====== Header & Navigation ====== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
  transform: translateY(0);
  transition: transform var(--transition-normal);
}

.site-header.hidden {
  transform: translateY(-100%);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-height);
}

.logo img {
  height: 60px;
}

/* ====== Global Navigation ====== */
.gnav ul {
  display: flex;
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.gnav a {
  display: inline-block;
  padding: 8px 6px;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
  transition: color var(--transition-fast);
}

.gnav a.active,
.gnav a:hover {
  color: var(--green);
}

/* ====== Language Switcher ====== */
.switches {
  display: flex;
  gap: 10px;
  align-items: center;
}

.switch .chip {
  background: #fff;
  border: 1px solid var(--border);
  padding: 6px 10px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.switch .chip.active {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}

/* ====== Mobile Navigation ====== */
.hamburger {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: var(--radius-sm);
}

.hamburger:hover {
  background: rgba(86, 184, 112, 0.1);
  transform: scale(1.05);
}

.hamburger span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
}

.hamburger:hover span {
  background: var(--green);
}

.hamburger[aria-expanded="true"] span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
  background: var(--green);
}

.hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.hamburger[aria-expanded="true"] span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
  background: var(--green);
}

/* ====== Hero Section ====== */
.hero {
  position: relative;
  height: 80vh;
  min-height: 520px;
  overflow: hidden;
}

.hero .layer {
  position: absolute;
  inset: 0;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
}

.hero .sky {
  z-index: 1;
  background-image: linear-gradient(#E7FFE7, #FFFFFF);
}

.hero .hills {
  z-index: 2;
  background-image: url(./assets/hills.svg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: rgba(86, 184, 112, 0.3); /* Debug background */
}

.hero .grass {
  z-index: 3;
  background-image: url(./assets/grass.svg);
  background-repeat: repeat-x;
  background-size: auto 100%;
  opacity: 0.5;
  will-change: background-position;
  animation: grassMove 20s linear infinite;
}

.hero .family {
  z-index: 4;
  background-image: url(./assets/children_alpha.png);
  background-size: contain;
  background-position: bottom center;
  background-repeat: no-repeat;
}

.hero-inner {
  position: relative;
  z-index: 10;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.hero-title {
  font-family: var(--font-family-heading);
  font-weight: 800;
  font-size: clamp(28px, 4.5vw, 56px);
  letter-spacing: 0.02em;
  color: #ffffff;
  text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.6), 1px 1px 2px rgba(0, 0, 0, 0.4);
  position: relative;
  z-index: 11;
}

.hero-sub {
  margin: 8px 0 24px;
  font-size: clamp(15px, 2.2vw, 20px);
  color: #f8f8f8;
  position: relative;
  z-index: 11;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5), 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* ====== Hero Animations ====== */
@keyframes grassMove {
  0% { background-position: 0px 0; }
  100% { background-position: -1440px 0; }
}

/* ====== Call-to-Action Buttons ====== */
.cta-group {
  display: flex;
  flex-direction: row; /* horizontal */
  gap: 8px;
  position: relative;
  z-index: 11;
  width: 100%;
  max-width: none;
  margin: 0 auto;
  align-items: center;
  justify-content: center;
  overflow: visible; /* avoid clipping */
}

.btn {
  display: inline-block;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: 700;
  transition: all var(--transition-fast);
  border: 2px solid transparent;
}

/* Make CTA buttons full-width inside the vertical group */
.cta-group .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto; /* compact */
  padding: 8px 12px; /* smaller */
  font-weight: 600;
}

/* Responsive: prevent side clipping on small screens */
@media (max-width: 600px) {
  .cta-group {
    padding: 0 16px; /* breathing room on both sides */
    flex-wrap: wrap;  /* wrap to new line if needed */
    gap: 10px 8px;
  }
  .cta-group .btn {
    flex: 1 1 calc(50% - 8px); /* two per row */
    min-width: 130px;
  }
}

@media (max-width: 360px) {
  .cta-group .btn {
    flex: 1 1 100%; /* one per row on very small devices */
  }
}

.btn-primary {
  background: var(--green);
  color: #fff;
  box-shadow: 0 4px 16px rgba(86, 184, 112, 0.4), 0 2px 8px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(86, 184, 112, 0.5), 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.5); /* semi-transparent */
  backdrop-filter: saturate(120%) blur(2px);
  color: var(--green-deep);
  border-color: rgba(86, 184, 112, 0.6);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.8);
  color: var(--green-deep);
  box-shadow: 0 3px 14px rgba(86, 184, 112, 0.25), 0 2px 6px rgba(0, 0, 0, 0.15);
}

.btn-large {
  font-size: 1.1rem;
  padding: 16px 32px;
  min-width: 280px;
}

/* ====== Grid Layouts ====== */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

/* ====== Card Components ====== */
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(30px);
  transition: all var(--transition-slow);
}

.card.animate {
  opacity: 1;
  transform: translateY(0);
}

.check {
  padding-left: 18px;
}

.check li {
  margin: 6px 0;
}

/* ====== Mission/Vision/Values Section ====== */
.mission-vision-section {
  text-align: center;
  margin: 40px 0;
  padding: 30px 0;
  background: var(--bg-soft);
  border-radius: var(--radius-xl);
}

.mission-vision-section h2 {
  color: var(--green-deep);
  font-size: clamp(20px, 2.5vw, 28px);
  margin-bottom: 30px;
  font-weight: 700;
}

.mission-vision-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
}

.mission-section,
.values-section,
.principles-section {
  text-align: left;
}

.mission-section.full-width {
  grid-column: 1 / -1;
}

.mission-section h3,
.values-section h3,
.principles-section h3 {
  color: var(--green-deep);
  font-size: 1.1rem;
  margin: 0 0 12px;
  font-weight: 600;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* ====== Section Icons ====== */
.section-icon {
  width: 24px;
  height: 24px;
  display: inline-block;
  transition: transform var(--transition-fast);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.section-icon:hover {
  transform: scale(1.1);
}

.mission-icon {
  background: var(--green);
  border-radius: 50%;
  position: relative;
}

.mission-icon::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  background: #fff;
  border-radius: 50%;
}

.mission-icon::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 16px;
  height: 16px;
  border: 2px solid #fff;
  border-radius: 50%;
}

.values-icon {
  background: var(--green);
  transform: rotate(45deg);
  position: relative;
}

.values-icon::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-45deg);
  width: 12px;
  height: 12px;
  background: #fff;
  border-radius: 2px;
}

.principles-icon {
  background: var(--green);
  clip-path: polygon(30% 0%, 70% 0%, 50% 40%, 70% 100%, 30% 100%, 50% 60%);
  position: relative;
}

.principles-icon::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 12px;
  background: #fff;
  clip-path: polygon(30% 0%, 70% 0%, 50% 40%, 70% 100%, 30% 100%, 50% 60%);
}

.mission-section p {
  line-height: 1.6;
  color: var(--text);
  font-size: 1rem;
  text-align: center;
}

/* ====== Values Grid ====== */
.values-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.value-item {
  background: #fff;
  padding: 16px;
  border-radius: var(--radius-md);
  border-left: 4px solid var(--green);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  opacity: 0;
  transform: translateY(30px);
  transition: all var(--transition-slow);
}

.value-item.animate {
  opacity: 1;
  transform: translateY(0);
}

.value-item h4 {
  color: var(--green-deep);
  font-size: 1rem;
  margin: 0 0 6px;
  font-weight: 600;
}

.value-item p {
  margin: 0;
  line-height: 1.5;
  color: var(--text);
  font-size: 0.9rem;
}

/* ====== Principles List ====== */
.principles-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.principles-list li {
  margin: 8px 0;
  padding: 12px;
  background: #fff;
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--green);
  line-height: 1.5;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  font-size: 0.9rem;
  opacity: 0;
  transform: translateY(30px);
  transition: all var(--transition-slow);
}

.principles-list li.animate {
  opacity: 1;
  transform: translateY(0);
}

/* ====== Company Table ====== */
.company-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 32px 0;
  background: #fff;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  text-align: left;
  table-layout: fixed;
}

.company-table th {
  background: var(--bg-soft);
  color: var(--text);
  font-weight: 600;
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  width: 25%;
  vertical-align: top;
}

.company-table td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  line-height: 1.6;
  text-align: left;
  width: 75%;
}

.company-table tr:last-child th,
.company-table tr:last-child td {
  border-bottom: none;
}

.company-table tr:hover th,
.company-table tr:hover td {
  background: rgba(86, 184, 112, 0.05);
}

/* ====== Team Grid ====== */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 16px 0;
}

.team-member {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  text-align: center;
  padding: 16px;
  background: var(--bg-soft);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  opacity: 0;
  transform: translateY(30px);
  transition: all var(--transition-slow);
}

.team-member.animate {
  opacity: 1;
  transform: translateY(0);
}

.team-member:hover {
  background: rgba(86, 184, 112, 0.08);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(86, 184, 112, 0.15);
}

.member-avatar {
  flex-shrink: 0;
  width: 105px;
  height: 105px;
}

.avatar-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
  box-shadow: 0 2px 8px rgba(86, 184, 112, 0.3);
}

.avatar-image {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(86, 184, 112, 0.2);
  border: 3px solid #fff;
  transition: all var(--transition-normal);
}

.avatar-image:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2), 0 4px 12px rgba(86, 184, 112, 0.3);
}

.member-info {
  flex: 1;
  min-width: 0;
  width: 100%;
}

.member-info h4 {
  margin: 0 0 4px;
  color: var(--text);
  font-size: 1rem;
}

.member-info p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.85rem;
}

.member-desc {
  line-height: 1.5;
  color: var(--text);
  font-size: 0.8rem;
}

/* ====== Timeline ====== */
.timeline {
  position: relative;
  padding-left: 16px;
  border-left: 3px solid var(--green-light);
}

.tl-item {
  position: relative;
  margin: 18px 0;
  opacity: 0;
  transform: translateY(30px);
  transition: all 1.0s ease-out;
}

.tl-item.animate {
  opacity: 1;
  transform: translateY(0);
}

.tl-badge {
  position: absolute;
  left: -10px;
  top: 0;
  transform: translateX(-100%);
  background: var(--green);
  color: #fff;
  border-radius: var(--radius-full);
  padding: 4px 10px;
  font-size: 0.8rem;
}

.tl-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  box-shadow: var(--shadow);
}

/* ====== News & Jobs Cards ====== */

/* Mobile adjustments: avoid badge clipping on the left edge */
@media (max-width: 600px) {
  .timeline {
    padding-left: 20px; /* a bit more space from the edge */
    border-left-width: 2px;
  }

  .tl-item {
    padding-left: 0;
  }

  .tl-badge {
    position: static; /* flow with content instead of absolute */
    transform: none;
    display: inline-block;
    margin-bottom: 6px;
  }
}
.card-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card-news,
.card-job {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 16px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.card-news {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  min-height: auto;
  transition: all var(--transition-fast);
}

.card-news:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(20, 48, 24, 0.15);
}

.card-news time {
  flex-shrink: 0;
  font-size: 0.85rem;
  color: var(--muted);
  min-width: 90px;
  text-align: center;
  background: var(--bg-soft);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.card-news-content {
  flex: 1;
  min-width: 0;
}

.card-news h4 {
  margin: 0 0 4px;
  font-size: 0.95rem;
  line-height: 1.3;
  color: var(--text);
}

.card-news p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--muted);
  transition: all var(--transition-normal);
}

.card-news .news-summary {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

/* ====== News Navigation ====== */
.news-navigation {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin: 24px 0 0;
  padding: 16px 0;
}

.news-nav-btn {
  padding: 10px 20px;
  background: var(--green);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  min-width: 120px;
}

.news-nav-btn:hover:not(:disabled) {
  background: var(--green-deep);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(86, 184, 112, 0.4);
}

.news-nav-btn:disabled {
  background: var(--muted);
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
  box-shadow: none;
}

.news-page-info {
  font-size: 0.9rem;
  color: var(--text);
  font-weight: 600;
  padding: 8px 16px;
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
  min-width: 60px;
  text-align: center;
}

/* ====== News Responsive Design ====== */
@media (max-width: 768px) {
  .card-news {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    min-height: auto;
  }
  
  .card-news time {
    min-width: auto;
    width: 100%;
    text-align: left;
  }
  
  .card-news-content {
    width: 100%;
  }
  
  .news-navigation {
    flex-direction: column;
    gap: 12px;
  }
  
  .news-nav-btn {
    width: 100%;
    max-width: 200px;
  }
  
  .news-page-info {
    order: -1;
  }
}

/* ====== Contact Section ====== */
.contact-cta {
  text-align: center;
  margin: 40px 0;
}

.gform-wrap {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 16px;
  overflow: hidden;
}

.gform-wrap iframe {
  filter: contrast(1.02);
  border: none;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* ====== Footer ====== */
.site-footer {
  background: var(--green-deep);
  color: #fff;
  padding: 40px 0;
}

.footer-inner {
  display: flex;
  gap: 24px;
  justify-content: space-between;
  align-items: flex-start;
}

.footer-inner .col {
  flex: 1;
  min-width: 0;
}

.footer-logo img {
  height: 60px;
  filter: brightness(100);
}

.footer-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 16px;
}

.footer-nav a {
  color: #e9ffe9;
  text-decoration: none;
  transition: text-decoration var(--transition-fast);
}

.footer-nav a:hover {
  text-decoration: underline;
}

.sns {
  color: #e9ffe9;
  margin-top: 16px;
}

.sns a {
  display: inline-block;
  margin-right: 12px;
  color: #e9ffe9;
  text-decoration: none;
  transition: text-decoration var(--transition-fast);
}

.sns a:hover {
  text-decoration: underline;
}

/* ====== Scoliosis Section ====== */
#scoliosis {
  --g: #56B870;
  --gd: #2E8B57;
  --gl: #A8E6A3;
  --bd: #E6F2E6;
  --tx: #143018;
}

#scoliosis .sc-wrap {
  width: var(--container-width);
  margin-inline: auto;
}

#scoliosis h2 {
  font-size: clamp(24px, 2.4vw, 32px);
  margin: 0 0 12px;
  color: var(--gd);
}

#scoliosis p.lead {
  color: #294e33;
  margin: 6px 0 18px;
}

/* ====== KPIs ====== */
#scoliosis .kpis {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin: 18px 0 28px;
}

#scoliosis .kpi {
  background: #fff;
  border: 1px solid var(--bd);
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 8px 24px rgba(20, 48, 24, 0.06);
}

#scoliosis .kpi b {
  display: block;
  font-size: 1.6rem;
  color: var(--gd);
}

#scoliosis .kpi small {
  display: block;
  color: #6a7c6f;
}

#scoliosis .kpi .citation {
  display: block;
  font-size: 10px;
  color: #666;
  font-style: italic;
  margin-top: 4px;
  text-align: center;
}

/* ====== Scoliosis Grid ====== */
#scoliosis .grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 20px;
}

#scoliosis .card {
  background: #fff;
  border: 1px solid var(--bd);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: 0 8px 24px rgba(20, 48, 24, 0.08);
}

#scoliosis .note {
  color: #6a7c6f;
  font-size: 0.9rem;
  margin-top: 8px;
}

/* ====== Charts ====== */
#scoliosis .bars {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

#scoliosis .bar {
  display: grid;
  grid-template-columns: 120px 1fr;
  align-items: center;
  gap: 12px;
}

#scoliosis .bar-label {
  font-weight: 700;
  color: #1e4025;
}

#scoliosis .bar-track {
  position: relative;
  height: 14px;
  background: #f1fbf1;
  border-radius: var(--radius-full);
  border: 1px solid var(--bd);
  overflow: hidden;
}

#scoliosis .bar-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: linear-gradient(90deg, var(--gl), var(--g), var(--gd));
  border-radius: var(--radius-full);
}

/* ====== Map ====== */
#scoliosis .map-wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

#scoliosis .legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

#scoliosis .leg {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.92rem;
  color: #294e33;
}

#scoliosis .dot {
  width: 12px;
  height: 12px;
  border-radius: var(--radius-full);
  background: #ccc;
  border: 1px solid #9fb7a6;
}

#scoliosis .dot.vlow {
  background: #e8f3ea;
}

#scoliosis .dot.low {
  background: #cfe9d3;
}

#scoliosis .dot.ok {
  background: #56B870;
}

#scoliosis svg#jp-map {
  width: 100%;
  height: auto;
}

/* ====== Issues Section ====== */
#scoliosis .issues {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

#scoliosis .issues .card {
  background: #fff;
  border: 1px solid var(--bd, #E6F2E6);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: 0 8px 24px rgba(20, 48, 24, 0.08);
}

#scoliosis .issues .card h4 {
  margin-top: 0;
  color: var(--gd, #2E8B57);
  font-size: 1.1rem;
}

#scoliosis .issues .card p {
  margin-bottom: 0;
  color: #143018;
  line-height: 1.8;
}

/* ====== Cobb Images Animation ====== */
.cobb-images-container {
  display: flex;
  gap: 20px;
  justify-content: center;
  align-items: flex-start;
  margin: 40px 0;
  flex-wrap: wrap;
}

.cobb-image-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.cobb-image {
  width: 200px;
  height: 300px;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  transition: all var(--transition-slow);
  opacity: 0;
  transform: translateX(-30px);
}

.cobb-image:hover {
  transform: translateX(5px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

.cobb-caption {
  margin-top: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--green-deep);
  opacity: 0;
  transform: translateY(10px);
  transition: all var(--transition-normal);
}

.cobb-caption.orange {
  color: #ff8c00;
}

.light-yellow {
  color: #fcdb58;
}

.cobb-caption.red {
  color: #dc143c;
}

/* ====== Cobb Animation States ====== */
.fade-in-1, .fade-in-2, .fade-in-3, .fade-in-4, .fade-in-5 {
  animation: none;
}

.cobb-images-container.animate .fade-in-1 {
  animation: slideInFromLeft 0.8s ease-out 0.4s forwards;
}

.cobb-images-container.animate .fade-in-2 {
  animation: slideInFromLeft 0.8s ease-out 0.8s forwards;
}

.cobb-images-container.animate .fade-in-3 {
  animation: slideInFromLeft 0.8s ease-out 1.2s forwards;
}

.cobb-images-container.animate .fade-in-4 {
  animation: slideInFromLeft 0.8s ease-out 1.6s forwards;
}

.cobb-images-container.animate .fade-in-5 {
  animation: slideInFromLeft 0.8s ease-out 2.0s forwards;
}

.cobb-images-container.animate .cobb-image-item:nth-child(1) .cobb-caption {
  animation: fadeInCaption 0.6s ease-out 0.8s forwards;
}

.cobb-images-container.animate .cobb-image-item:nth-child(2) .cobb-caption {
  animation: fadeInCaption 0.6s ease-out 1.2s forwards;
}

.cobb-images-container.animate .cobb-image-item:nth-child(3) .cobb-caption {
  animation: fadeInCaption 0.6s ease-out 1.6s forwards;
}

.cobb-images-container.animate .cobb-image-item:nth-child(4) .cobb-caption {
  animation: fadeInCaption 0.6s ease-out 2.0s forwards;
}

.cobb-images-container.animate .cobb-image-item:nth-child(5) .cobb-caption {
  animation: fadeInCaption 0.6s ease-out 2.4s forwards;
}

@keyframes slideInFromLeft {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInCaption {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ====== Research Images ====== */
.research-image {
  width: 100%;
  max-width: 150px;
  height: 200px;
  object-fit: contain;
  border-radius: 6px;
  margin: 12px 8px;
  transition: transform var(--transition-normal);
  background-color: #ffffff;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* ====== Scoliosis Images ====== */
.scoliosis-image {
  width: 100%;
  max-width: 50vw;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  margin: 16px auto;
  display: block;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform var(--transition-normal);
}

.scoliosis-image:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

/* ====== Achievements Show More Button ====== */
.achievements-show-more {
  text-align: center;
  margin-top: 24px;
  padding: 16px 0;
}

.btn-show-more {
  background: white;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  padding: 12px 24px;
  border-radius: 25px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-normal);
  box-shadow: 0 4px 12px rgba(86, 184, 112, 0.2);
  min-width: 180px;
}

.btn-show-more:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(86, 184, 112, 0.4);
  background: rgba(86, 184, 112, 0.1) !important;
  color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
}

.btn-show-more:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(86, 184, 112, 0.3);
  background: rgba(86, 184, 112, 0.2) !important;
  color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
}

/* より具体的なセレクターで確実に適用 */
.achievements-show-more .btn-show-more:hover {
  background: rgba(86, 184, 112, 0.1) !important;
  color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
}

.achievements-show-more .btn-show-more:active {
  background: rgba(86, 184, 112, 0.2) !important;
  color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
}

.research-image:hover {
  transform: translateY(-2px);
}

.card {
  text-align: center;
}

.card .research-image:first-of-type {
  margin-left: auto;
}

.card .research-image:last-of-type {
  margin-right: auto;
}

/* ====== Legal Pages ====== */
.legal-wrap {
  width: min(900px, 92%);
  margin: 40px auto;
}

.legal-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.legal-logo {
  height: 80px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
  flex-shrink: 0;
}

.legal-meta {
  color: var(--muted);
  margin-bottom: 24px;
  text-align: center;
}

.legal-tabs {
  display: flex;
  border-bottom: 2px solid var(--border);
  margin-bottom: 24px;
}

.legal-tab {
  flex: 1;
  padding: 12px 16px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  transition: all var(--transition-fast);
}

.legal-tab:hover {
  color: var(--green-deep);
  background: var(--bg-soft);
}

.legal-tab.active {
  color: var(--green-deep);
  border-bottom-color: var(--green);
  font-weight: 600;
}

.legal-tab-content {
  display: none;
}

.legal-tab-content.active {
  display: block;
}

.legal-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  box-shadow: var(--shadow);
  margin: 14px 0;
}

.legal-card h2 {
  font-size: 1.1rem;
  margin: 0 0 6px;
  color: #1e4025;
}

.legal-card p,
.legal-card li {
  line-height: 1.9;
}

.legal-card ul {
  margin: 8px 0 0 1.2em;
}

.legal-note {
  color: var(--muted);
  font-size: 0.92rem;
}

.legal-divider {
  height: 1px;
  background: var(--border);
  margin: 28px 0;
}

.legal-en {
  margin-top: 22px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
  color: #213c29;
}

.legal-footer {
  margin: 28px 0 40px;
  color: var(--muted);
  font-size: 0.92rem;
}

.legal-card a {
  color: var(--green-deep);
  text-decoration: none;
}

.legal-card a:hover {
  text-decoration: underline;
}

/* ====== Responsive Design ====== */
@media (max-width: 960px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
  
  .card-list {
    grid-template-columns: 1fr 1fr;
  }
  
  .mission-vision-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .team-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  #scoliosis .kpis {
    grid-template-columns: repeat(3, 1fr);
  }
  
  #scoliosis .grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  /* Mobile Navigation */
  .gnav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border);
    padding: 20px;
    z-index: 100;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    max-height: calc(100vh - var(--header-height));
    overflow-y: auto;
    
    /* Animation */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
  
  .gnav.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  
  .gnav ul {
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
  }
  
  .gnav a {
    padding: 12px 16px;
    text-align: center;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(86, 184, 112, 0.2);
    transition: all var(--transition-normal);
    
    /* Initial state */
    opacity: 0;
    transform: translateY(10px);
  }
  
  .gnav.open a {
    opacity: 1;
    transform: translateY(0);
  }
  
  .gnav.open a:nth-child(1) { transition-delay: 0.1s; }
  .gnav.open a:nth-child(2) { transition-delay: 0.15s; }
  .gnav.open a:nth-child(3) { transition-delay: 0.2s; }
  .gnav.open a:nth-child(4) { transition-delay: 0.25s; }
  .gnav.open a:nth-child(5) { transition-delay: 0.3s; }
  .gnav.open a:nth-child(6) { transition-delay: 0.35s; }
  .gnav.open a:nth-child(7) { transition-delay: 0.4s; }
  .gnav.open a:nth-child(8) { transition-delay: 0.45s; }
  
  .gnav a:hover {
    background: var(--green);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(86, 184, 112, 0.3);
  }
  
  .hamburger {
    display: block;
  }
  
  /* Layout adjustments */
  .card-list {
    grid-template-columns: 1fr;
  }
  
  .hero {
    height: 78vh;
  }
  
  /* Company table */
  .company-table th,
  .company-table td {
    padding: 12px 16px;
    font-size: 0.9rem;
  }
  
  .company-table th {
    width: 30%;
  }
  
  .company-table td {
    width: 70%;
  }
  
  /* Footer */
  .site-footer {
    padding: 30px 0;
  }
  
  .footer-inner {
    flex-direction: column;
    gap: 20px;
    text-align: center;
    align-items: center;
  }
  
  .footer-inner .col {
    width: 100%;
    max-width: none;
  }
  
  .footer-nav {
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
  }
  
  .footer-nav a {
    display: block;
    padding: 8px 0;
  }
  
  .sns {
    font-size: 0.9rem;
    margin-top: 0;
  }
  
  /* Team */
  .team-member {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }
  
  .member-avatar {
    align-self: center;
    width: 90px;
    height: 90px;
  }
  
  /* Mission/Vision */
  .mission-vision-section {
    margin: 30px 0;
    padding: 20px 0;
  }
  
  .mission-vision-grid {
    padding: 0 16px;
    gap: 20px;
  }
  
  /* Scoliosis */
  #scoliosis .kpis {
    grid-template-columns: repeat(2, 1fr);
  }
  
  #scoliosis .issues {
    grid-template-columns: 1fr;
  }
  
  /* Cobb images */
  .cobb-images-container {
    gap: 12px;
    margin: 30px 0;
  }
  
  .cobb-image {
    width: 150px;
    height: 150px;
    border-radius: 15px;
  }
  
  .cobb-caption {
    font-size: 12px;
    margin-top: 6px;
  }
  
  /* Research images */
  .research-image {
    max-width: 130px;
    height: 160px;
    margin: 10px 6px;
  }
}

@media (max-width: 640px) {
  #scoliosis .kpis {
    grid-template-columns: repeat(2, 1fr);
  }
}