html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f5f7fa;
  color: #333;
}

hr {
  width: 60%;
  border: none; /* 移除預設線條 */
  height: 1px; /* 線條厚度 */
  background-color: #aaa; /* 灰色 */
  margin: 20px auto; /* 置中 */
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2); /* 陰影 */
}

/* ── 導覽列 ── */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  height: 8%;
  background: white;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  padding: 10px 30px;
  box-sizing: border-box;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

.navbar ul {
  display: flex;
  list-style: none;
  gap: 20px;
  margin: 0;
  padding: 0;
}

.navbar a {
  text-decoration: none;
  color: #333;
  transition: color 0.3s;
}

.navbar a:hover {
  color: #4a90e2;
}

.logo {
  font-weight: bold;
  font-size: 1.1rem;
  cursor: pointer;
  transition: color 0.3s;
  position: absolute;
  position: fixed;
}

.logo:hover {
  color: #4a90e2;
}

/* ── 區塊 ── */
/* .section {
  padding: 8% 20px 2%;
} */
.section {
  padding: 40px 20px;
}
#about {
  padding-top: 120px;
}

.section-title {
  text-align: center;
  margin-bottom: 20px;
  margin-top: 10px;
  font-size: 1.6rem;
  color: #333;
}

/* ── 卡片 ── */
.card {
  background: white;
  padding: 20px;
  margin: auto;
  max-width: 800px;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s;
}

.card:hover {
  transform: translateY(-5px);
}

/* ── 個人區 ── */
.profile {
  display: flex;
  gap: 20px;
  align-items: center;
}

.profile img {
  width: 120px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── 輪播容器 ── */
.carousel {
  position: relative;
  max-width: 640px;
  margin: 0 auto;
  height: 460px;
  border-radius: 20px;
  overflow: hidden; /* 讓圓角對圖片生效 */
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
  background: #1a1a1a;
}

/* ── 圖片軌道 ── */
.carousel-track {
  width: 100%;
  height: 100%;
  position: relative;
}

/* ── 所有輪播圖片 ── */
.carousel-track img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain; /* 預設：完整顯示（適合證照） */
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.carousel-track img.active {
  opacity: 1;
  pointer-events: auto;
}

/* ── 風景照專用：cover 填滿 ── */
.carousel-track.cover-mode img {
  object-fit: cover;
}

/* ── 左右按鈕 ── */
.carousel button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: white;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.2s,
    transform 0.15s;
}

.carousel button:hover {
  background: rgba(255, 255, 255, 0.45);
}

.carousel button:active {
  transform: translateY(-50%) scale(0.92);
}

.carousel .prev {
  left: 14px;
}

.carousel .next {
  right: 14px;
}

/* ── 底部：指示點 + 計數 ── */
.carousel-footer {
  position: absolute;
  bottom: 5%;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  z-index: 10;
}

.carousel-dots {
  display: flex;
  gap: 8px;
}

.carousel-dots .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition:
    background 0.3s,
    transform 0.3s;
}

.carousel-dots .dot.active {
  background: white;
  transform: scale(1.3);
}

.carousel-counter {
  color: white;
  font-size: 12px;
  letter-spacing: 1px;
  font-weight: bolder;
  padding: 5px;
  background-color: rgba(128, 128, 128, 0.582);
}

/* ── 響應式 ── */
@media (max-width: 768px) {
  .profile {
    flex-direction: column;
    text-align: center;
  }

  .navbar ul {
    display: none;
  }

  .carousel {
    height: 300px;
    border-radius: 14px;
  }
}

.section-divider {
  border: none;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    var(--color-border) 20%,
    var(--color-primary) 50%,
    var(--color-border) 80%,
    transparent
  );
  max-width: 860px;
  margin: 0 auto;
}

/* ════════════════════════════════════════
   雙欄區塊（區域三 + 四並排）
   ════════════════════════════════════════ */
.section--dual {
  max-width: 100%; /* 比單欄更寬，容納兩個輪播 */
  display: flex;
  align-items: flex-start;
  gap: 0;
  padding-top: 0%;
}

.dual-col {
  flex: 1;
  min-width: 0; /* 防止 flex 子項溢出 */
}

/* 中間垂直分隔線 */
.dual-divider {
  width: 1px;
  align-self: stretch;
  margin: 20px 2%; /* 上下留白 + 左右間距 */
  flex-shrink: 0;
}

/* 雙欄模式下輪播高度縮小，避免太高 */
.section--dual .carousel {
  height: 380px;
}

/* ════════════════════════════════════════
   響應式：小螢幕雙欄改單欄
   ════════════════════════════════════════ */
@media (max-width: 900px) {
  .section--dual {
    flex-direction: column;
  }

  .dual-divider {
    width: auto;
    height: 1px;
    align-self: auto;
    background: linear-gradient(
      to right,
      transparent,
      var(--color-border) 20%,
      var(--color-primary) 50%,
      var(--color-border) 80%,
      transparent
    );
    margin: 0 0 32px 0;
  }

  .section--dual .carousel {
    height: 300px;
  }
}
footer {
  background-color: rgb(155, 153, 153);
  margin: 0px;
  padding: 5px;
  text-align: center;
}
