/* Science page style based on the CS & AI page */
.sub-nav {
  background: #ffffff;
  border-radius: 12px;
  padding: 15px 20px;
  margin: 20px 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.breadcrumb {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.sub-nav ul {
  list-style: none;
  display: flex;
  gap: 20px;
  justify-content: center;
  padding: 0;
  margin: 0;
}

.sub-nav a {
  color: var(--text);
  font-weight: bold;
  text-decoration: none;
  transition: color 0.2s ease;
}

.sub-nav a:hover {
  color: var(--science);
}

.feature-card {
  display: flex;
  align-items: center;
  gap: 40px;
  background: #ffffff;
  border-radius: 12px;
  padding: 40px;
  margin-bottom: 40px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.feature-card.reverse {
  flex-direction: row-reverse;
}

.feature-content {
  flex: 1;
}

.feature-content h3 {
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: var(--science, #11A3A1);
  border-bottom: 2px solid var(--science, #11A3A1);
  display: inline-block;
  padding-bottom: 5px;
}

.feature-content p {
  color: var(--text);
  margin-bottom: 15px;
}

.feature-visual {
  flex: 1;
}

.feature-visual img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.info-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  margin-top: 20px;
}

.info-table th,
.info-table td {
  padding: 20px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  vertical-align: top;
}

.info-table th {
  background-color: var(--bg, #f8fafc);
  color: var(--text);
  width: 25%;
  font-weight: bold;
}

.info-table tr:last-child th,
.info-table tr:last-child td {
  border-bottom: none;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.skill-card {
  background: #ffffff;
  border-radius: 8px;
  padding: 25px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  border-left: 5px solid var(--science, #11A3A1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skill-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.skill-card h3 {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 1.2rem;
}

.skill-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0;
}

@media screen and (max-width: 768px) {

  .feature-card,
  .feature-card.reverse {
    flex-direction: column;
    padding: 25px;
  }

  .sub-nav ul {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  .info-table th {
    display: block;
    width: 100%;
  }

  .info-table th {
    border-bottom: none;
    padding-bottom: 5px;
  }

  .info-table td {
    display: block;
    padding-top: 5px;
  }
}

* {
  margin: 0;
  padding: 0;
  font-family: "Noto Sans CJK JP,Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', sans-serif";
  text-decoration: none;
}

:root {
  --bg: #f8fafc;
  --primary: #2563eb;
  --text: #1e293b;
  --text-muted: #64748b;
  --color-product1: #f7eac1;
  --color-product2: #daf0f0;
  --color-border: #333333;
  --science: #11A3A1;
  --science-AI: #11A3A1;
  --duplo: #93c47d;
  --spike: #f7eac1;
}

body {
  margin: 0;
  font-family: 'Hiragino Sans', 'Meiryo', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.7;
}

.container {
  max-width: 80vw;
  height: 60vh;
  max-height: 35vw;
  margin: 0 auto;
  padding: 20px;
}

.mv {
  width: 95%;
  margin: 0 auto;
  margin-top: 10px;
  background-color: #ffffff;
  padding: 80px 0;
  border-bottom: 1px solid #e2e8f0;
  background-size: 100% auto;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 12px;
  transition: background-image 1s ease;
}

.mv-content {
  display: flex;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
  position: relative;
}

.mv-text {
  flex: 1;
  min-width: 300px;
  max-width: 80%;
  padding: 20px;
  border-radius: 12px;
  color: white;
}

.mv-text h1 {
  font-size: 2.2rem;
  line-height: 1.3;
  margin-bottom: 16px;
  font-weight: 600;
}

.mv-text p {
  margin-bottom: 24px;
  font-weight: 300;
}

.mv-image {
  flex: 1;
  min-width: 300px;
  background-color: #e2e8f0;
  height: 300px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
}

.btn {
  display: inline-block;
  background-color: white;
  color: black;
  padding: 12px 28px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
}

.btn:hover {
  background-color: rgba(255, 255, 255, 0.8);
  transition: all 0.3s ease;
}

.news {
  background-color: #ffffff;
  border-radius: 12px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 30px;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 10px;
}

.section-head h2 {
  margin: 0;
  font-size: 1.5rem;
}

.news_container {
  max-width: 80vw;
  margin: 0 auto;
  padding: 20px;
}

.news-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.news-item {
  background: white;
  padding: 16px 20px;
  border-radius: 8px;
  margin-bottom: 12px;
  display: flex;
  gap: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.news-date {
  color: var(--text-muted);
  font-size: 0.9rem;
  white-space: nowrap;
}

.news-title {
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
}

.news-title h3 {
  margin: 0;
  font-size: 1.2rem;
}

.news-text {
  color: var(--text-muted);
  font-size: 1rem;
  margin-top: 4px;
}

.news-title:hover {
  color: var(--primary);
}

.main-content {
  display: flex;
  justify-content: center;
  gap: 10px;
  width: 95%;
  margin: 0 auto;
  background-color: #f8fafc;
}

.main_container {
  margin: 20px 0;
  width: 80%;
}

.section-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 60px 20px;
}

.section-title {
  text-align: center;
  font-size: 1.8rem;
  font-weight: bold;
  margin-bottom: 40px;
  color: #222;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background-color: var(--science);
  margin: 15px auto 0;
}

.campus-portal {
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 2px solid #0fa3db;
  border-radius: 12px;
  padding: 30px 40px;
  margin-bottom: 60px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  position: relative;
}

.campus-portal h2 {
  font-size: 1.2rem;
  color: var(--text);
  margin-bottom: 20px;
}

.btn-external {
  display: inline-flex;
  align-items: center;
  background-color: #0fa3db;
  color: #fff !important;
  padding: 12px 28px;
  border-radius: 30px;
  font-weight: bold;
  text-decoration: none;
  font-size: 1rem;
  transition: background-color 0.3s;
}

.btn-external:hover {
  background-color: #0c8bbd;
}

.btn-external::after {
  content: '→';
  margin-left: 8px;
  font-family: sans-serif;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.product-card {
  background: #ffffff;
  border: 1px solid #eaeaea;
  border-radius: 8px;
  padding: 30px 20px;
  text-align: center;
  text-decoration: none;
  color: #333;
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.product-img-wrapper {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.product-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.product-card h4 {
  font-size: 1.2rem;
  margin: 0 0 10px;
  color: #222;
}

.product-category {
  display: inline-block;
  font-size: 0.75rem;
  color: #fff;
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 15px;
  align-self: center;
}

.cat-lego {
  background-color: #ffcf00;
  color: #333;
  font-weight: bold;
}

.product-card p {
  font-size: 0.85rem;
  color: #666;
  line-height: 1.5;
  margin: 0;
  flex-grow: 1;
}

@media screen and (max-width: 768px) {
  .campus-portal {
    flex-direction: column;
    text-align: center;
    padding: 25px;
  }

  .mv {
    width: 95%;
    max-height: 90vw;
    height: auto;
    padding: 40px 0;
  }

  .container {
    max-width: 90vw;
    width: 90vw;
    height: auto;
    padding: 5px;
  }

  .mv-text {
    max-width: 95%;
    padding: 10px;
  }

  .mv-text h1 {
    font-size: 1rem;
  }

  .mv-text p {
    display: none;
  }

  .btn {
    padding: 8px 16px;
    font-size: 0.9rem;
  }

  .main_container {
    width: 100%;
    padding: 0;
    margin: 0;
    padding-top: 20px;
  }
}