@charset "UTF-8";
* {
  margin: 0;
  box-sizing: border-box;
  cursor: url("../img/cursor16.ico"), auto;
  letter-spacing: 1.5px;
  font-family: "微軟正黑體";
  position: relative;
}
* section {
  padding: 100px 0;
}
* a {
  text-decoration: none;
  color: #334155;
}

h1 {
  font-size: 42px;
}

h2 {
  font-size: 26px;
  margin-bottom: 20px;
}

h3 {
  font-size: 24px;
}

button {
  border: 1px solid #334155;
  padding: 10px 30px;
  border-radius: 50px;
  background-color: #ffffff;
  color: #334155;
  transition: background-color 0.3s;
}
button:hover {
  background-color: #334155;
  color: #ffffff;
}

.b_container {
  max-width: 1200px;
  width: 90%;
  position: relative;
  margin: 0 auto;
}

.container {
  max-width: 1024px;
  width: 90%;
  position: relative;
  margin: 0 auto;
}

header nav {
  display: flex;
  align-items: center;
  position: fixed;
  background-color: #334155;
  max-width: 1200px;
  width: 90%;
  border: 0;
  border-radius: 50px;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 20px;
  padding: 8px 0;
  z-index: 1;
  box-shadow: 0 0 5px #ffffff;
}
header nav .nav_logo {
  margin-left: 80px;
}
header nav .nav_logo img {
  width: 32px;
}
header nav ul {
  display: flex;
  margin-left: 20px;
}
header nav ul li {
  list-style: none;
  padding: 0 20px;
  color: #ffffff;
  transition: transform 0.3s;
}
header nav ul li a {
  text-decoration: none;
  color: #ffffff;
}
header nav ul li:hover {
  transform: scale(1.1);
}
header nav .hamburger {
  display: none; /* 預設隱藏，桌面版不顯示 */
  flex-direction: column;
  margin-left: auto;
  margin-right: 40px;
}
header nav span {
  width: 25px;
  height: 3px;
  background: #fff;
  margin: 4px 0;
  border-radius: 2px;
}

footer {
  display: flex;
  flex-direction: column;
  background-color: #334155;
  padding: 40px 20px 20px;
}
footer .footer_contain {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 20px;
}
footer .footer_contain > img {
  width: 72px;
}
footer .social_media {
  display: flex;
  justify-content: flex-end;
  gap: 20px;
  flex: 1;
}
footer .social_media a > img {
  width: 38px;
  border: 0;
  border-radius: 50px;
  transition: transform 0.3s;
}
footer .social_media a > img:hover {
  transform: scale(1.1);
}
footer small {
  text-align: center;
  color: #ffffff;
}

@media (max-width: 767px) {
  header nav {
    width: 100%;
    margin: 0;
    border-radius: 0;
  }
  header nav ul {
    border-radius: 0px;
    margin-top: 58px;
    margin-left: 0;
    padding: 8px 0;
    z-index: 1;
    box-shadow: 0 0 5px rgba(255, 255, 255, 0);
    /* ⭐ 修改：不要用 display:none，改用 transform + opacity */
    width: 100%;
    flex-direction: column;
    position: absolute;
    top: 0;
    right: 0;
    background: #43546b;
    /* ⭐ 新增：初始狀態往右邊收起 */
    transform: translateX(100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.4s ease, opacity 0.4s ease;
  }
  header nav .nav_logo {
    margin-left: 40px;
  }
  header nav .nav_logo img {
    width: 38px;
  }
  header nav ul.active {
    /* ⭐ 新增：展開時由右邊滑出 */
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
  }
  header nav ul.active li {
    padding: 1rem 10px;
    text-align: center;
  }
  header nav ul.active li:hover {
    transform: translateX(15px);
  }
  header nav .hamburger {
    display: flex; /* 手機版顯示漢堡 icon */
  }
}
header .banner {
  padding: 120px 0 50px;
  border-bottom: 1px solid rgba(51, 65, 85, 0.2901960784);
}
header .banner .banner_img img {
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
}

main .works .work-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: flex-start;
  align-content: flex-start;
}
main .works .work-cards {
  margin-top: 48px;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
main .works .work-cards .card {
  border: 3px solid #334155;
  background: #fff;
  display: flex;
}
main .works .work-cards .card > img {
  width: 40%;
  max-width: 450px;
  min-width: 300px;
}
main .works .work-cards .card .info {
  padding: 2rem calc(120px + 1rem) 2rem 1rem;
  flex-grow: 1;
}
main .works .work-cards .card .info .tools {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
main .works .work-cards .card .info .tools .tool {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
main .works .work-cards .card .info .tools .tool img {
  width: 18px;
}
main .works .work-cards .card .work-type-tag {
  width: 120px;
  padding: 0.5rem 0;
  text-align: center;
  background: #10b981;
  color: #fff;
  position: absolute;
  top: 2rem;
  right: 0;
  box-shadow: -5px 5px 5px #ccc;
}
main .works .work-cards .card .author {
  text-align: right;
  position: absolute;
  bottom: 1rem;
  right: 1rem;
}

@media (max-width: 767px) {
  main .works .work-cards .card {
    flex-direction: column;
  }
  main .works .work-cards .card > img {
    width: 100%;
    max-width: none;
    min-width: none;
  }
  header .banner .banner_img img {
    width: 100%;
  }
}/*# sourceMappingURL=portfolio.css.map */