/* style.css */

body {
  margin: 0;
  font-family: 'Noto Sans TC', sans-serif;
  background: linear-gradient(to bottom right, #e0f7fa, #ffffff);
  color: #003c62;
}

header {
  background: linear-gradient(to bottom, #87ceeb, #ffffff);
  padding: 2rem 1rem;
  text-align: center;
  border-bottom: 3px solid #00557f;
}

.school-name {
  font-size: 2.5rem;
  margin: 0;
  color: #004a8f;
  font-weight: bold;
}

.lab-name {
  font-size: 1.8rem;
  font-weight: bold;
  margin: 0.5rem 0 0;
  color: #003c62;
}

nav {
  display: flex;
  justify-content: center;
  background-color: #d0ecf7;
  border-bottom: 2px solid #00557f;
}

nav button {
  background: none;
  border: none;
  padding: 1rem 2rem;
  font-size: 1rem;
  cursor: pointer;
  color: #004a8f;
  transition: background-color 0.3s;
}

nav button:hover,
nav button.active {
  background-color: #b4dff5;
  font-weight: bold;
}

main {
  padding: 2rem;
}

section {
  display: none;
}

section.active {
  display: block;
  animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 教師卡片：桌機版（預設） */
.professor-card {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  margin-top: 2rem;
  background-color: #f2fbfd;
  padding: 1.5rem;
  border-left: 5px solid #87ceeb;
  border-radius: 10px;
  box-shadow: 0 0 6px rgba(0, 76, 108, 0.1);
}

.professor-card img {
  width: 180px;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.2);
}

.professor-info {
  flex: 1;
  text-align: left;
}

/* 手機版：圖片在上、文字在下，皆靠左 */
@media screen and (max-width: 768px) {
  .professor-card {
    flex-direction: column;
    align-items: flex-start;
    border-left: none;
    border-top: 5px solid #87ceeb;
    padding: 1.2rem;
  }

  .professor-card img {
    width: 150px;
    margin-bottom: 1rem;
  }

  .professor-info {
    width: 100%;
    text-align: left;
  }
}
/* 共用樣式 */
.members-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-top: 2rem;
}

.member-photo {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid #b0e0f8;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}

.member-info h4 {
  margin-top: 0;
  color: #00557f;
  font-size: 1.3rem;
}

.member-info p {
  margin: 0.3rem 0;
  font-size: 1rem;
}

/* 桌機版（預設） */
.member-card {
  display: flex;
  flex-direction: row;  /* 圖左文右 */
  align-items: flex-start;
  gap: 1.5rem;
  padding: 1.5rem;
  background-color: #f2fbfd;
  border-left: 5px solid #87ceeb;
  box-shadow: 0 0 6px rgba(0, 76, 108, 0.1);
  border-radius: 10px;
  transition: transform 0.3s ease;
}

.member-card:hover {
  transform: translateY(-5px);
}

/* 手機版（窄螢幕） */
@media screen and (max-width: 768px) {
  .member-card {
    flex-direction: column;  /* 圖上文下 */
    align-items: flex-start;
    border-left: none;
    border-top: 5px solid #87ceeb;
  }

  .member-photo {
    width: 120px;
    height: 120px;
    margin-bottom: 1em;
  }

  .member-info {
    width: 100%;
    text-align: left;
  }
}
