/*--------------------------------------------------------------
# cover
--------------------------------------------------------------*/
 #hero2 {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

#hero2 .hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; 
  z-index: 0; 
  background-color: black; 
}

#hero2::before {
  content: '';
  position: absolute;
  inset: 0;
  background-color: rgba(0,0,0,0.25);
  z-index: 1;
}

#hero2 .hero-container {
  position: relative; 
  z-index: 2;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  text-align: center;
  color: var(--white);
  height: 100%;
}

#hero2 h1{
  font-size: 60px;
  font-weight: 800;
  position: absolute;
  z-index: 2;
  line-height: 1.4;
  text-transform: uppercase;
  text-shadow: 4px 2px 4px #292929;
  margin-bottom: 12rem;
}
#hero2 h2{
  position: absolute;
  z-index: 2;
  line-height: 1.4;
  text-transform: uppercase;
  background-color: #1a1a1a;
  padding: 4px 16px;
  margin: 120px 0 0 180px;
}

@media (max-width: 767.98px) {
  #hero2 {
    margin-top: 56px;
    height: 66.66vw;
    background-position: center 20%;
    background-attachment: scroll;
    
  }
  #hero2 h1 {
    margin: 0 0 6rem 0;
    font-size: 32px;
  }
  #hero2 h2{
    margin: 100px 0 0 142px;
    font-size: 18px;
    padding: 4px 8px;
  }
} 
section .row{
  justify-content: center;
}
.section-dictionary{
  background-color: #f5f5f5;
  padding: 1rem 2rem;
}
.dictionary-container{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.dictionary-container img{
  max-width: 200px; width: 100%; height: 100%;
  border-radius: 8px;
}
@media (max-width: 767.98px) {
  .dictionary-container{
    flex-direction: column-reverse;
    margin-bottom: 16px;
  }
}
.section-intro p {
  font-size: 1.125rem;
  margin-bottom: 1.5rem;
}
.highlight{
  color: var(--primary);
  font-weight: 600;
}
.highlight-2{
  display: flex;
  width: fit-content;
  color: #FFFFFF;
  font-weight: 400;
  background-color: var(--primary);
  padding: 0px 8px;
  margin-bottom: 8px;
}
.read-more{
  width: 100%;
  max-width: 140px;
  margin: 20px auto 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--primary);
  color: #FFFFFF;
  padding: 4px 8px;
  border-radius: 4px;
}
.read-more:hover{
  background-color: #8e5f31;
  color: #FFFFFF;
  transition: 0.3s ease;
}
/* 影片 */
.video-container-1 {
  position: relative;
  padding-bottom: 100%;
  height: 0;
  overflow: hidden;
}
.video-container-1 iframe{
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
.swiper{
  margin: 20px 0;
}
.swiper-button-next,
.swiper-button-prev,
.swiper-button-next:not(.swiper-button-disabled),
.swiper-button-prev:not(.swiper-button-disabled) {
  color: #ffffff; 
}
.swiper-pagination {
  position: relative;
  bottom: auto; 
  margin-top: 16px; 
  text-align: center;
  padding: 0;
}
.swiper-pagination-bullet {
  background: var(--gray-800); 
}

.swiper-pagination-bullet-active {
  background: var(--primary); 
  opacity: 1; 
}
@media (max-width: 767.98px){
  .highlight-2 {
    font-size: 1rem;
  }
}

/* 視差滾動 */
#parallax-section {
    position: relative;
    isolation: isolate; 
    overflow: visible;
    padding: 20px 0;
}
.map-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 0;
  overflow: hidden; 
}
 #map-container {
  position: relative;
  inset: 0;
  height: 100%;
  width: 100%;
  pointer-events: none;
  transition: transform .9s cubic-bezier(.22,.61,.36,1);
}
#base-map {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .9s cubic-bezier(.22,.61,.36,1);
    transform: scale(1) translate(0, 0); 
    transform-origin: center center;
}

/* 讓文字內容在上方滾動 */
#scroll-container {
    position: relative;
    z-index: 1; 
}
.step {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}
.step-content {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    border-radius: 8px;
    max-width: 600px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.step-content.active {
    opacity: 1;
    transform: translateY(0);
}
.step-content h2 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}
/* 步驟 2: 放大並移動到左側（堰塞湖區）*/
#base-map.zoomed-left {
    transform: scale(1.5) translate(16%, 8%); 
}
/* 步驟 3: 放大並居中（馬太鞍溪橋）*/
#base-map.zoomed-center {
    transform: scale(1.6) translate(0%, 0%); 
}
/* 步驟 4: 放大並移動到右側（光復市區）*/
#base-map.zoomed-right {
    transform: scale(1.5) translate(-15%, -5%); 
}

@media (max-width: 767.98px) {
  #base-map {
    object-fit: contain; 
    background-color: #000;
    transform-origin: center center;
  }

  #base-map.zoomed-left {
    transform: scale(2.6) translate(26%, 0%);
  }
  #base-map.zoomed-center {
    transform: scale(3) translate(-12%, 0%);
  }
  #base-map.zoomed-right {
    transform: scale(2.2) translate(-22%, 0%);
  }
}


/* 前後對比 */
.compare {
    --pos: 50%; 
    position: relative;
    width: min(100%, 1000px); 
    aspect-ratio: 1 / 1; 
    overflow: hidden;
    user-select: none;
    touch-action: none;
    border-radius: 8px;
  }
.compare__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; 
  object-position: left top;  
  display: block;
}
.compare__img--after { z-index: 1; }
.reveal-pane {
  position: absolute;
  inset: 0;
  width: var(--pos);
  overflow: hidden;
  z-index: 2;
}
.reveal-pane .compare__img--before { z-index: 2; }
.handle {
  position: absolute;
  top: 0;
  left: var(--pos);
  transform: translateX(-50%);
  height: 100%;
  width: 0; 
  z-index: 3;
  border: 0;
  background: none;
  padding: 0;
  cursor: ew-resize;
}
.handle__bar {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  width: 2px; 
  height: 100%;
  background: #ffffffcc; 
  box-shadow: 0 0 0 1px #00000033; 
}
.handle__knob {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%,-50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.35);
}

.compare:has(.handle:hover),
.compare:has(.handle:focus-visible) { cursor: ew-resize; }

.handle:focus-visible .handle__knob {
  outline: 3px solid #3b82f6;
  outline-offset: 2px;
}

.news-container {
  display: flex;
  align-items: center;
  background-color: #f8f8f8;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  transition: box-shadow 0.3s ease, scale 0.3s ease;
  margin: 12px 0px;
  border-radius: 4px;
}

.news-container:hover {
  color: var(--primary);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  scale: 0.98;
}

.news-container img {
  width: 280px; 
  aspect-ratio: 3 / 2;
  object-fit: cover;
  flex-shrink: 0;
}
.content-container {
  padding: 12px;
  flex: 1;
}
.content-container p {
  color: var(--gray-800);
  font-size: 0.875rem;
  margin: 0;
}
@media (max-width: 767.98px){
  .content-container{
    padding: 8px;
  }
  .content-container h4{
    font-size: 1rem;
    line-height: 1.4;
  }
  
  .news-container img{
    width: 40%;
  }
  
}

.separator {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 20px 0;
}
.separator::before {
  content: '\2022 \2022 \2022'; 
  font-size: 24px;
  letter-spacing: 10px; 
}
.post-share {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: center;
  margin: 8px 0 32px 0;
  flex-wrap: wrap;
}
.share-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: none;
  border-radius: 8px;
  background: #f5f5f5;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s ease;
  border: 1px solid #333;
}
.share-btn:hover { opacity: 0.8;}
.share-btn i { font-size: 24px;}
.facebook-btn i{ color: #0866FF;}
.line-btn i{  color: #06C755;}
.copy-btn i{  color: #333;}

@keyframes popup {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}
.animate {
  animation: popup 0.3s ease;
}
@media (max-width: 768px){
  .post-share {
    gap: 8px;
    margin: 0 0 20px 0;
  }
  .share-btn {
    gap: 4px;
    font-size: 14px;
    padding: 4px 6px;
  }
}