@charset "UTF-8";
body {
  margin: 0;
  font-size: 20px;
}
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background-color: #F5F5F5;
  font-size: 20px;
  color: #0E3C33;
  font-weight: bold;
}

.logo {
  margin-left: 20px;
}
.logo img {
  width: 80px;
  height: 80px;
  vertical-align: middle;
}
header {
  max-height: 40px;
}

nav {
  margin-right: 20px;
}
nav .hamburger-menu {
  display: none;
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}
nav ul li {
  margin-left: 20px;
}
nav ul li a {
  text-decoration: none;
  color: #0E3C33;
  font-weight: bold;
}

/* .banner {
    text-align: center;
    padding-top: 100px;

} */
.banner {
  height: 250px;
  margin-top: 10px;
  background-color: #A5D1D0;
  color: #0E3C33;
  font-weight: bold;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
}
.banner h2 {
  font-size: 40px;
  line-height: 1.5;
  margin: 0;
}

main {
  width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.thumbnail {
  display: flex;
  justify-content: space-between;
  margin: 0 auto;
  margin-top: 50px;
  gap: 20px;
}

.thumbnail-li {
  flex: 1;
  max-width: calc((100% - 40px) / 3);
  max-height: 50px;
  background-color: #EDEAE2;
  display: flex;
  align-items: center;
  overflow: hidden;
  /* 添加這行 */
}
.thumbnail-li a {
  text-decoration: none;
  color: #0E3C33;
  font-weight: bold;
}

.thumbnail-img {
  width: 80px;
  height: auto;
  object-fit: cover;
  margin-right: 10px;
}

/* Profile方框的容器 */
.profile {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}

/* 12個Profile方框的容器 */
.profile {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-top: 20px;
  margin-bottom: 20px;
  gap: 20px 20px;
}

/* Profile方框 */
.profile-li {
  height: 300px;
  /* 自訂的方框高度 */
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  background-color: lightblue;
  flex-grow: 1;
  flex-basis: 15%;
  overflow: hidden;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}
 /* Profile方框內的圖片 */
.profile-li .profile-img {
  width: 100%;
  min-height: 250px;
  /* 圖片寬度和方框相同 */
  object-fit: cover;
}
 /* Profile方框內的文字 */
.profile-li .profile-title {
  display: flex;
  justify-content: center; /* 水平置中 */
  align-items: center; /* 垂直置中 */
  height: 100%; /* 填滿父元素的高度 */
}

@media  (max-width: 1200px) {
 main {
    width: 90%;
  }
}

/* 在600 像素 < 螢幕解析度的寬度 <= 1200 像素 */
/* 主內容上⽅3個thumbnail，分為上下兩列。主內容上⽅ 3 個⽅框，總寬度必須在 90%，
   內部的圖片尺⼨保持 80x50 像素。 上列保持寬度相同且各占⼀半 */
@media (min-width: 600px) and (max-width: 1200px) {
  .hamburger-menu {
    display: none;
  }
  .thumbnail {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
  }
  
  .thumbnail-li {
    flex-grow: 1;
    width: calc(50% - 10px); /* 上列的方框寬度相同且各占一半，减去間距的一半 */
    max-width: calc(50% - 10px); /* 上列的方框寬度相同且各占一半，减去間距的一半 */
    box-sizing: border-box;
  }
  
  .thumbnail-li-3 {
    flex-grow: 1;
    flex-basis: 100%;
    max-width: 100%; /*下列的方框獨立佔據一行，最大寬度为100% */
  }
  
  .thumbnail-img {
    width: 80px; /* 内部的圖片寬度為80像素 */
    height: 50px; /* 内部的圖片高度為50像素 */
  }

  .profile {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
  }
  
  .profile-li {
    /* display: flex; */
    flex-grow: 1;
    flex-basis: calc(20% - 10px); /* 每行4個方框，減去間距的一半 */
    box-sizing: border-box;
  }
  .profile-img {
    width: 100%;
    object-fit: cover;
  }
  .profile-title {
    display: flex;
    justify-content: center; /* 水平置中 */
    align-items: center; /* 垂直置中 */
    height: 20px; /* 填滿父元素的高度 */
  }
}
  
@media (min-width: 360px) and (max-width: 600px) {
  nav ul {
     display: none; /* 隱藏原有的導航菜單 */
  }
  nav .hamburger-menu {
    display: flex;
    justify-content: flex-end;
    align-items: center;

  }
  
  .hamburger-menu img {
    width: 20px;
  }
  
  .menu-items {
    display: none;
  }

  .thumbnail {
    display: flex;
    flex-direction: column; /* 將 thumbnail 改為垂直排列 */
    /*使之佔據整横 */
  }

  .thumbnail-li {
    flex-grow: 1;
    flex-basis: 100%;
    max-width: 100%; /* 下列的方框獨立佔據一行，最大寬度為100% */
  }
  .profile {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .profile-li {
    flex-basis: 100%; /* 每個 profile-li 佔據整行的寬度 */
    box-sizing: border-box;
  }

  .profile-img {
    width: 100%; /* 圖片寬度與方框相同 */
    height: auto; /* 高度自適應 */
  }
  .profile-title {
    display: flex;
    justify-content: center; /* 水平置中 */
    align-items: center; /* 垂直置中 */
    height: 20px; /* 填滿父元素的高度 */
  }
}