:root {
  --color-primary: #800000;
  --color-text-on-primary: #fff;
  --hero-overlay: rgba(0, 0, 0, 0.5);
  --font-sans: 'Helvetica Neue', Arial, sans-serif;
  --transition-fast: 0.3s ease-out;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: var(--font-sans);
  line-height: 1.6;
  color: #333;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--color-primary);
  color: var(--color-text-on-primary);
  z-index: 1000;
  backdrop-filter: blur(4px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  opacity: 0.9;
}

.header-inner {
  max-width: 1300px;
  margin: auto;
  padding: 0.8rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-logo {
  font-size: 1.7rem;
  font-weight: bold;
  line-height: 1.5;
  text-align: center;
}
.site-logo span {
  display: block;
  font-size: 0.85rem;
  font-weight: normal;
  opacity: 0.8;
}

.site-nav {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
}
.site-nav .nav-top {
  gap: 1rem;
}
.site-nav .nav-bottom {
  gap: 1rem;
  margin-top: 0.5rem;
}

.site-nav a {
  position: relative;
  display: inline-block;
  color: var(--color-text-on-primary);
  text-decoration: none;
  padding: 0.4rem 0.6rem;
  border-radius: 4px;
  transition: background var(--transition-fast);
}
/* .site-nav a:hover {
  background: rgba(255, 255, 255, 0.2);
} */
.site-nav a::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 0;
  width: 0;
  height: 1px;
  background: #fff;
  transition: width 0.6s ease;
}
.site-nav a:hover::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--color-text-on-primary);
  cursor: pointer;
}
@media (max-width: 768px) {
  .site-nav ul {
    display: none;
    flex-direction: column;
    width: 200px;
    background: var(--color-primary);
    border-radius: 4px;
  }
  .site-nav.open .nav-top,
  .site-nav.open .nav-bottom {
    display: flex;
    flex-direction: column;
  }
  .site-nav .nav-top li + li,
  .site-nav .nav-bottom li + li {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
  }
  .site-nav .nav-top li,
  .site-nav .nav-bottom li {
    padding: 0.5rem 1rem;
  }
  .nav-toggle {
    display: block;
  }
}

/* main-visual */
.hero {
  position: relative;
  height: 90vh;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background: url('../images/top/main-visual2.png') center/cover no-repeat fixed;
  filter: brightness(1.8);
  transform: scale(1.1);
  animation: bgZoom 20s ease-out infinite alternate;
  mix-blend-mode: luminosity;
}
@keyframes bgZoom {
  from {
    transform: scale(1.1);
  }
  to {
    transform: scale(1);
  }
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: 100%;
  margin-left: 4%;
  margin-top: 2%;
}
.hero-text {
  align-self: center;
  padding: 0 2rem;
  color: #fff;
  animation: fadeInUp 1s both;
}
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.hero-text h2 {
  font-size: 2.75rem;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 8px rgba(207, 208, 208, 0.8);
}
.hero-text p {
  font-size: 1.2rem;
  text-shadow: 0 1px 4px rgba(207, 208, 208, 0.8);
}

@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    margin-left: 0;
    margin-top: 0;
  }
  .hero-text {
    padding: 0 1rem;
    text-align: center;
  }
}

/* exhibits-overview */
.exhibits-overview {
  background: var(--color-primary);
  padding: 4rem 1rem;
  color: var(--color-text-on-primary);
}
.section-header {
  text-align: center;
  margin-bottom: 2rem;
}
.section-header h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}
.section-header p {
  font-size: 1.1rem;
  opacity: 0.85;
}

.exhibits-wrapper {
  position: relative;
  overflow: hidden;
  max-width: 1250px;
  margin: auto;
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.exhibit-ball {
  position: relative;
  width: 210px;
  height: 210px;
  padding-top: 1.5rem;
  border-radius: 50%;
  overflow: visible;
  background-size: cover;
  background-position: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px);
  transition: transform 0.2s ease-out, opacity 0.2s ease;
  will-change: transform;
  overflow: visible;
  z-index: 2;
  margin-top: 1.6rem;
}

.exhibit-ball.visible {
  opacity: 1;
  transform: translateY(0);
}

.ball-history {
  background-image: url('../images/top/hunter.png');
}
.ball-brain {
  background-image: url('../images/top/brain-section.png');
}
.ball-heart {
  background-image: url('../images/top/heart-section.png');
}
.ball-lung {
  background-image: url('../images/top/lung-section.png');
}
.ball-digital {
  background-image: url('../images/top/degital.png');
}

.ball-text-en {
  position: absolute;
  top: -8px;
  left: -25px;
  transform: none;
  color: #fff;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-size: 1.7rem;
  font-weight: bold;
  white-space: nowrap;
  z-index: 3;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  opacity: 0.6;
}

.ball-text-ja {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  padding: 0.3rem 0.5rem;
  border-radius: 999px;
  font-weight: bold;
  color: #322b9f;
  font-size: 0.8rem;
  margin-bottom: 1.1rem;
  text-align: center;
}

.exhibit-ball:hover {
  transform: translateY(-10px);
}

.ball-text-en:hover {
  color: rgb(3, 99, 242);
}

@media (max-width: 768px) {
  .exhibits-wrapper {
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
  }
  .ecg-line {
    display: none;
  }
  .exhibit-ball {
    width: 120px;
    height: 120px;
  }
}

/* Anatomy History */
.anatomy-history {
  position: relative;
  background: url('../images/top/history-sectoin.png') no-repeat center/cover;
  color: #fff;
  overflow: hidden;
}

.anatomy-history .overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.8) 100%);
  pointer-events: none;
}

.anatomy-history .container {
  position: relative;
  max-width: 1200px;
  margin: 6rem auto;
  padding: 4rem 1rem;
}

.anatomy-history .section-title {
  font-size: 3rem;
  max-width: 850px;
  margin: 0 auto 4rem;
  color: #fff;
  opacity: 0.5;
  text-align: left;
  text-shadow: 0 1px 4px rgba(207, 208, 208, 0.9);
}

.anatomy-history .content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: left;
  gap: 2rem;
}

.anatomy-history .text {
  max-width: 850px;
  font-size: 1rem;
  line-height: 3rem;
  text-shadow: 0 1px 4px rgba(207, 208, 208, 0.9);
  margin-bottom: 3rem;
}

.anatomy-history .widget {
  width: 100%;
  text-align: center;
}

.anatomy-history .book-link {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid #fff;
  border-radius: 4px;
  color: #fff;
  font-weight: bold;
  text-decoration: none;
  transition: background 0.2s ease;
}

.anatomy-history .book-link:hover {
  background: rgba(255, 255, 255, 0.2);
}

.anatomy-history .section-title,
.anatomy-history .text,
.anatomy-history .widget {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.anatomy-history .visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 768px) {
  .anatomy-history .container {
    margin: 4rem auto;
    padding: 2rem 1rem;
  }
  .anatomy-history .section-title {
    font-size: 2rem;
    margin-bottom: 1.5rem;
  }
  .anatomy-history .text {
    line-height: 2rem;
  }
}

/* Anatomical Sections: Brain, Heart, Lung */
.anatomy-sections {
  display: flex;
  width: 100%;
  background-color: #000;
  padding: 1rem 0;
}

.anatomy-sections .section-item {
  flex: 1;
  position: relative;
  min-height: 400px;
  padding: 2rem 3.5rem;
  color: #fff;
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.anatomy-sections .section-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}
.anatomy-sections .section-item .item-title {
  font-size: 2.5rem;
  margin: 0 auto 4rem;
  position: relative;
  z-index: 1;
  text-align: left;
  opacity: 0.7;
  text-shadow: 0 1px 4px rgba(207, 208, 208, 0.9);
}

.anatomy-sections .section-item .item-text {
  position: relative;
  z-index: 1;
  text-align: left;
  font-size: 1rem;
  line-height: 3rem;
  text-shadow: 0 1px 4px rgba(207, 208, 208, 0.9);
}

.anatomy-sections .section-item.brain {
  background-image: url('../images/top/brain-section.png');
}
.anatomy-sections .section-item.heart {
  background-image: url('../images/top/heart-section.png');
}
.anatomy-sections .section-item.lung {
  background-image: url('../images/top/lung-section.png');
}
.anatomy-sections .section-item.visible {
  opacity: 1;
  transform: translateY(0);
}
@media (max-width: 992px) {
  .anatomy-sections {
    flex-direction: column;
  }
  .anatomy-sections .section-item {
    min-height: 300px;
  }
}

/* Digital Arts section */
.digital-arts {
  position: relative;
  background: url('../images/top/degital.png') center/cover no-repeat;
  color: #fff;
  overflow: hidden;
}
.digital-arts .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.8) 100%);
  pointer-events: none;
}
.digital-arts .container {
  position: relative;
  max-width: 1200px;
  margin: 6rem auto;
  padding: 4rem 1rem;
}
.digital-arts .section-title {
  font-size: 3rem;
  max-width: 850px;
  margin: 0 auto 4rem;
  color: #fff;
  opacity: 0.5;
  text-align: left;
  text-shadow: 0 1px 4px rgba(207, 208, 208, 0.9);
}
.digital-arts .content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: left;
  gap: 2rem;
}
.digital-arts .text {
  max-width: 850px;
  font-size: 1rem;
  line-height: 3rem;
  text-shadow: 0 1px 4px rgba(207, 208, 208, 0.9);
}

.digital-arts .section-title,
.digital-arts .text {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.digital-arts .visible {
  opacity: 1;
  transform: translateY(0);
}
@media (max-width: 768px) {
  .digital-arts .container {
    margin: 4rem auto;
    padding: 2rem 1rem;
  }
  .digital-arts .section-title {
    font-size: 2rem;
    margin-bottom: 1.5rem;
  }
  .digital-arts .text {
    line-height: 2rem;
  }
}

/* footer secrion */
.site-footer {
  background: var(--color-primary);
  color: var(--color-text-on-primary);
  padding: 2rem 1rem 1rem;
}
.footer-inner {
  max-width: 1250px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-left {
  flex: 1 1 auto;
}
.footer-logo {
  font-size: 2rem;
  margin: 0;
  line-height: 1.2;
}
.footer-logo span {
  display: block;
  font-size: 0.85rem;
  font-weight: normal;
  opacity: 0.8;
  padding-top: 0.5rem;
}
.footer-right {
  flex: 0 1 auto;
  text-align: right;
}
.footer-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 2rem;
}
.footer-nav a {
  position: relative;
  color: var(--color-text-on-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
  padding-bottom: 0.2rem;
}
.footer-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: #fff;
  transition: width 0.6s ease;
}
.footer-nav a:hover::after {
  width: 100%;
}
.footer-nav a:hover {
  color: #fff;
}
.footer-bottom {
  max-width: 1200px;
  margin: 1.5rem auto 0;
  text-align: center;
  font-size: 0.9rem;
  opacity: 0.7;
}
@media (max-width: 768px) {
  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
  .footer-right {
    order: 2;
    width: 100%;
    margin-top: 1rem;
  }
  .footer-left {
    order: 1;
    width: 100%;
    margin-bottom: 1rem;
  }
  .footer-nav {
    justify-content: center;
    flex-wrap: wrap;
  }
  .footer-bottom {
    order: 3;
  }
}
