:root {
  --primary-color: #2E8B57;
  /* SeaGreen - Natural */
  --secondary-color: #20B2AA;
  /* LightSeaGreen - Scientific/Medical */
  --text-dark: #333333;
  --text-light: #666666;
  --bg-white: #ffffff;
  --bg-light: #f4f9f4;
  /* Very light green tint */
  --accent-color: #e0f2f1;
  --font-main: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
  --max-width: 1200px;
  --header-height: 100px;
}

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

body {
  font-family: var(--font-main);
  color: var(--text-dark);
  line-height: 1.6;
  background-color: var(--bg-white);
  overflow-x: hidden;
}

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

/* Header */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background: rgba(255, 255, 255, 1);
  /* backdrop-filter: blur(10px); removed for solid white background */
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 5%;
}

.logo {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.logo span {
  color: var(--text-dark);
  font-weight: 400;
  font-size: 0.9rem;
  display: block;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 30px;
}

nav a {
  font-weight: 500;
  color: var(--text-dark);
  position: relative;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: width 0.3s;
}

nav a:hover::after {
  width: 100%;
}

/* Mobile Menu */
.menu-toggle {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Hero Section */
#hero {
  height: 100vh;
  width: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-align: center;
  overflow: hidden;
  padding-top: var(--header-height);
  background-color: var(--primary-color);
  /* Fallback color */
}

.hero-media {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero-content {
  max-width: 800px;
  padding: 20px;
  animation: fadeInUp 1s ease-out;
  position: relative;
  z-index: 1;
}

#hero h1 {
  font-size: 3rem;
  margin-bottom: 20px;
  font-weight: 700;
  /* Bold */
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.9), 0 0 20px rgba(0, 0, 0, 0.7), 0 0 30px rgba(0, 0, 0, 0.5);
}

#hero p {
  font-size: 1.5rem;
  margin-bottom: 30px;
  font-weight: 500;
  /* Increased from 300 to 500 */
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.9), 0 0 15px rgba(0, 0, 0, 0.5);
}

.btn {
  display: inline-block;
  padding: 12px 30px;
  background-color: var(--primary-color);
  color: white;
  border-radius: 50px;
  font-weight: 600;
  letter-spacing: 1px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.btn:hover {
  background-color: var(--secondary-color);
  transform: translateY(-2px);
}

/* News Section */
.news-section {
  background-color: var(--bg-white);
  padding-bottom: 40px;
}

.news-container {
  max-width: 900px;
  margin: 0 auto;
  border-top: 1px solid #eee;
}

.news-item {
  display: flex;
  align-items: baseline;
  padding: 20px 10px;
  border-bottom: 1px solid #eee;
  flex-wrap: wrap;
  gap: 15px;
}

.news-date {
  font-family: 'Roboto', sans-serif;
  color: var(--text-light);
  font-weight: 500;
  width: 100px;
}

.news-category {
  font-size: 0.8rem;
  padding: 4px 10px;
  border-radius: 4px;
  color: white;
  min-width: 90px;
  text-align: center;
  font-weight: bold;
}

.tag-info {
  background-color: #999;
}

.tag-press {
  background-color: var(--primary-color);
}

.tag-academic {
  background-color: #5d9cec;
}

.tag-event {
  background-color: #f6bb42;
}

.news-content {
  flex: 1;
  min-width: 300px;
}

.news-content a {
  color: var(--primary-color);
  text-decoration: underline;
}

.news-content a:hover {
  text-decoration: none;
  color: var(--secondary-color);
}

@media (max-width: 600px) {

  .news-date,
  .news-category {
    font-size: 0.8rem;
  }
}

/* Sections General */
section {
  padding: 80px 5%;
}

.section-title {
  text-align: center;
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 50px;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--secondary-color);
  margin: 15px auto 0;
}

/* About Section */
.about-content {
  display: flex;
  align-items: center;
  gap: 50px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.about-text {
  flex: 1;
}

.about-image {
  flex: 1;
  background: #eee;
  height: 400px;
  border-radius: 20px;
  overflow: hidden;
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}


/* Research Section */
.research-container {
  padding: 20px;
}

.research-item {
  display: flex;
  align-items: center;
  gap: 50px;
  margin-bottom: 50px;
}

.research-item:nth-child(even) {
  flex-direction: row-reverse;
}

.research-text {
  flex: 1;
}

.research-text h3 {
  font-size: 1.8rem;
  color: var(--primary-color);
  margin-bottom: 20px;
}

.research-text p {
  margin-bottom: 15px;
  text-align: justify;
}

.research-image {
  flex: 1;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  padding: 10px;
  background: white;
}

.research-image img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s ease;
}

.research-image:hover img {
  transform: scale(1.05);
}

/* Responsive adjustments for Research */
@media (max-width: 768px) {

  .research-item,
  .research-item:nth-child(even) {
    flex-direction: column;
    gap: 20px;
  }

  .research-image {
    width: 100%;
    height: auto;
  }
}

/* Members Section */
.members-container {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.member-group {
  background: white;
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.member-role {
  color: var(--primary-color);
  border-bottom: 2px solid var(--accent-color);
  padding-bottom: 10px;
  margin-bottom: 20px;
  font-size: 1.5rem;
}

.student-category {
  margin-bottom: 25px;
}

.student-category h4 {
  color: var(--secondary-color);
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.member-list {
  list-style: none;
  padding-left: 10px;
}

.member-list li {
  margin-bottom: 8px;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
}

.member-list li::before {
  content: '•';
  color: var(--primary-color);
  font-weight: bold;
  display: inline-block;
  width: 1em;
  margin-left: -1em;
}

/* Gallery Section */
.gallery-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.gallery-item {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  background: white;
}



.gallery-mini-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
}

.gallery-img-wrapper {
  position: relative;
  overflow: hidden;
  height: 150px;
  /* Fixed height for consistency */
}

.gallery-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  display: block;
}

.gallery-img-wrapper:hover img {
  transform: scale(1.1);
}

.gallery-img-wrapper::after {
  content: attr(data-text);
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 8px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  font-size: 0.8rem;
  text-align: center;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  pointer-events: none;
}

.gallery-img-wrapper:hover::after {
  transform: translateY(0);
}

.gallery-caption {
  padding: 15px;
  text-align: center;
  font-weight: bold;
  color: var(--text-dark);
  background: white;
}

/* Footer */
footer {
  background: var(--text-dark);
  color: white;
  padding: 50px 5%;
  text-align: center;
}

/* Social Buttons */
.social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 30px;
  border-radius: 50px;
  color: white;
  font-weight: bold;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.social-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  color: white;
}

.social-btn.instagram {
  background: linear-gradient(45deg, #405de6, #5851db, #833ab4, #c13584, #e1306c, #fd1d1d);
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

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

/* Responsive */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  /* Header Mobile Fixes */
  header {
    height: auto;
    min-height: 80px;
    padding: 10px 20px;
  }

  .logo {
    font-size: 0.75rem;
    /* Reduce font size */
    flex-wrap: wrap;
    /* Allow wrapping */
    line-height: 1.2;
  }

  .logo img {
    height: 40px !important;
    /* Force smaller logo size on mobile */
    margin-right: 5px !important;
  }

  nav ul {
    position: fixed;
    top: 80px;
    /* Approximate header height */
    right: -100%;
    width: 70%;
    height: calc(100vh - 80px);
    background: white;
    flex-direction: column;
    padding: 50px;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
  }

  nav ul.active {
    right: 0;
  }

  .about-content {
    flex-direction: column;
  }

  /* Research Item Mobile Fixes */
  .research-item {
    flex-direction: column !important;
    /* Override inline styles to stack vertically */
    gap: 20px;
  }

  .research-item>div {
    width: 100%;
    /* Full width for stacked items */
    order: unset !important;
    /* Reset visual order to DOM order if needed, or rely on flex */
  }

  /* Specific fix to ensure Text comes first, then Image */
  .research-text {
    order: 1 !important;
  }

  .research-image {
    order: 2 !important;
    height: auto;
  }

  .hero h1 {
    font-size: 2rem;
  }
}

/* Movie Section */
.video-responsive {
  overflow: hidden;
  padding-bottom: 56.25%;
  position: relative;
  height: 0;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.video-responsive iframe {
  left: 0;
  top: 0;
  height: 100%;
  width: 100%;
  position: absolute;
}