/* 全局 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Microsoft JhengHei", sans-serif;
}

body {
  background-color: #f8f9fa;
}

/* navbar */
.navbar {
  background-color: #0066cc;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 3%;
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
}

.navbar-logo {
  display: flex;
  align-items: center;
}

.navbar-logo img {
  height: 40px;
  margin-right: 10px;
}

.navbar-logo h1 {
  color: white;
  font-size: 1.8rem;
  font-weight: 700;
}

.navbar-menu {
  display: flex;
  list-style: none;
}

.navbar-item {
  margin-left: 30px;
}

.navbar-link {
  color: white;
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.navbar-link:hover,
.navbar-link.active {
  background-color: rgba(255, 255, 255, 0.2);
}

/* picture */
.banner {
  position: relative;
  width: 100%;
  height: 400px;
  overflow: hidden;
}

.banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.banner-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
  text-align: center;
  padding: 20px;
}

.banner-overlay h2 {
  font-size: 2.5rem;
  margin-bottom: 15px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.banner-overlay p {
  font-size: 1.2rem;
  max-width: 700px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
}

/* 打字效果動畫 */
.typing-effect {
  position: relative;
  width: fit-content;
  white-space: nowrap;
  overflow: hidden;
  border-right: 3px solid white;
  animation: typing-cycle 10s linear infinite,
    blink-caret 0.75s step-end infinite;
}

@keyframes typing-cycle {
  0% {
    width: 0;
    opacity: 1;
  }
  40% {
    width: 100%;
    opacity: 1;
  }

  80% {
    width: 100%;
    opacity: 1;
  }

  95% {
    width: 0;
    opacity: 1;
  }

  100% {
    width: 0;
    opacity: 1;
  }
}

@keyframes blink-caret {
  from,
  to {
    border-color: transparent;
  }
  50% {
    border-color: white;
  }
}

/* sections */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

section {
  padding: 60px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 40px;
}

.section-header h2 {
  font-size: 2.2rem;
  color: #0066cc;
  margin-bottom: 15px;
}

.underline {
  height: 4px;
  width: 70px;
  background-color: #0066cc;
  margin: 0 auto;
}

/* 宗旨 */
.purpose-section {
  background-color: #ffffff;
}

.purpose-content {
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}

.purpose-text {
  flex: 1;
  min-width: 300px;
}

.purpose-text p {
  font-size: 1.2rem;
  line-height: 1.8;
  color: #333;
  text-align: justify;
}

.purpose-image {
  flex: 1;
  min-width: 300px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

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

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

/* 系史 */
.history-section {
  background-color: #f5f7fa;
}

.history-content {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
}

.history-image {
  flex: 1;
  min-width: 300px;
  height: 400px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.history-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.3s ease;
}

.history-text {
  flex: 1;
  min-width: 300px;
}

.history-item {
  margin-bottom: 25px;
  position: relative;
  padding-left: 30px;
  border-left: 3px solid #0066cc;
}

.history-item:last-child {
  margin-bottom: 0;
}

.history-item .year {
  font-weight: bold;
  font-size: 1.2rem;
  color: #0066cc;
  display: block;
  margin-bottom: 8px;
}

.history-item p {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #444;
  text-align: justify;
}

/* 教學目標 */
.teaching-section {
  background-color: #ffffff;
  padding: 80px 0;
}

.teaching-content {
  margin-bottom: 40px;
}

.teaching-text p {
  font-size: 1.2rem;
  line-height: 1.8;
  color: #333;
  text-align: justify;
  margin-bottom: 30px;
}

.edu-levels {
  display: flex;
  flex-wrap: wrap;
  gap: 25px;
  margin-bottom: 50px;
}

.level-item {
  flex: 1;
  min-width: 250px;
  background-color: #f8f9fa;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.level-item h3 {
  color: #0066cc;
  margin-bottom: 15px;
  font-size: 1.3rem;
}

.level-item p {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #444;
}

.teaching-areas {
  margin-top: 30px;
}

.teaching-areas h3 {
  color: #0066cc;
  text-align: center;
  margin-bottom: 25px;
  font-size: 1.5rem;
}

.areas-container {
  display: flex;
  flex-wrap: wrap;
  gap: 25px;
}

.area-item {
  flex: 1;
  min-width: 300px;
  background-color: #f8f9fa;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.area-item h4 {
  color: #0066cc;
  margin-bottom: 15px;
  font-size: 1.2rem;
}

.area-item p {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #444;
}

/* 重要成就 */
.achievement-section {
  background-color: #f5f7fa;
  padding: 70px 0;
}

.achievement-content {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.achievement-text p {
  font-size: 1.2rem;
  line-height: 1.8;
  color: #333;
  text-align: justify;
}

.achievement-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  gap: 20px;
  margin-top: 20px;
}

.stat-item {
  flex: 1;
  min-width: 200px;
  max-width: 250px;
  background-color: #ffffff;
  padding: 25px 15px;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 102, 204, 0.2);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: #0066cc;
  margin-bottom: 10px;
}

.stat-label {
  font-size: 1.2rem;
  color: #444;
  font-weight: 500;
}

/* 發展目標 */
.goals-section {
  background-color: #ffffff;
  padding: 70px 0;
}

.goals-intro {
  margin-bottom: 40px;
}

.goals-intro p {
  font-size: 1.2rem;
  line-height: 1.8;
  color: #333;
  text-align: justify;
}

.goals-list {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.goal-item {
  display: flex;
  gap: 20px;
  background-color: #f8f9fa;
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.goal-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 102, 204, 0.15);
}

.goal-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: #0066cc;
  min-width: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 102, 204, 0.1);
  border-radius: 50%;
  width: 70px;
  height: 70px;
}

.goal-details {
  flex: 1;
}

.goal-details h3 {
  color: #0066cc;
  font-size: 1.4rem;
  margin-bottom: 15px;
}

.goal-details p {
  font-size: 1.1rem;
  line-height: 1.7;
  color: #444;
  text-align: justify;
}

/* 系所特色 */
.features-section {
  background-color: #f5f7fa;
  padding: 70px 0;
}

.features-content {
  max-width: 100%;
}

.students-count {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.student-categories {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.category-item {
  background-color: #ffffff;
  border-radius: 10px;
  padding: 25px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease;
}

.category-item:hover {
  transform: translateY(-5px);
}

.category-title {
  margin-bottom: 15px;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px;
}

.category-title h4 {
  font-size: 1.5rem;
  color: #0066cc;
  margin-right: 10px;
}

.category-count {
  font-size: 1.3rem;
  font-weight: 700;
  color: #0066cc;
}

.category-note {
  font-size: 1rem;
  color: #666;
  font-style: italic;
}

.category-item p {
  font-size: 1.1rem;
  line-height: 1.7;
  color: #444;
  text-align: justify;
}

/* footer */
.footer {
  background-color: #0052a5;
  color: white;
  padding: 50px 0 20px;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: space-between;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 15px;
}

.footer-logo img {
  height: 60px;
}

.footer-name h3 {
  font-size: 1.4rem;
  margin-bottom: 5px;
}

.footer-name h4 {
  font-size: 1.2rem;
  font-weight: 400;
}

.footer-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-info p {
  margin-bottom: 10px;
  font-size: 1rem;
  display: flex;
  align-items: center;
}

.contact-info p i {
  margin-right: 10px;
  font-size: 1.1rem;
}

.copyright {
  margin-top: 20px;
  font-size: 0.9rem;
  opacity: 0.8;
}

/* RWD */
@media screen and (max-width: 768px) {
  .navbar-container {
    flex-direction: column;
    padding: 10px;
  }

  .navbar-menu {
    margin-top: 15px;
  }

  .navbar-item {
    margin-left: 15px;
    margin-right: 15px;
  }

  .banner {
    height: 300px;
  }

  .banner-overlay h2 {
    font-size: 1.8rem;
  }

  .banner-overlay p {
    font-size: 1rem;
  }

  section {
    padding: 40px 0;
  }

  .section-header h2 {
    font-size: 1.8rem;
  }

  .purpose-content,
  .history-content {
    flex-direction: column;
  }

  .history-content {
    flex-direction: column-reverse;
  }

  .purpose-text p,
  .history-item p {
    font-size: 1rem;
  }

  .history-item .year {
    font-size: 1.1rem;
  }

  .history-image {
    height: 300px;
  }

  .teaching-section {
    padding: 60px 0;
  }

  .teaching-text p,
  .level-item p,
  .area-item p {
    font-size: 1rem;
  }

  .level-item h3,
  .area-item h4 {
    font-size: 1.1rem;
  }

  .teaching-areas h3 {
    font-size: 1.3rem;
  }

  .achievement-text p {
    font-size: 1rem;
  }

  .stat-item {
    min-width: 150px;
    padding: 20px 10px;
  }

  .stat-number {
    font-size: 2rem;
  }

  .stat-label {
    font-size: 1rem;
  }

  .goals-intro p,
  .goal-details p {
    font-size: 1rem;
  }

  .goal-item {
    padding: 20px;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .goal-number {
    font-size: 2rem;
    width: 60px;
    height: 60px;
  }

  .goal-details h3 {
    font-size: 1.2rem;
  }

  .count-header h3 {
    font-size: 1.5rem;
  }

  .total-count {
    font-size: 2rem;
  }

  .category-title {
    flex-direction: column;
    gap: 5px;
    align-items: flex-start;
  }

  .category-title h4 {
    font-size: 1.3rem;
  }

  .category-count {
    font-size: 1.1rem;
  }

  .category-note {
    font-size: 0.9rem;
  }

  .category-item p {
    font-size: 1rem;
  }

  .footer {
    padding: 30px 0 20px;
  }

  .footer-content {
    flex-direction: column;
    gap: 30px;
  }

  .footer-logo img {
    height: 50px;
  }

  .footer-name h3 {
    font-size: 1.2rem;
  }

  .footer-name h4 {
    font-size: 1rem;
  }
}
