/* --- 全域設定與變數 --- */
:root {
    --primary-color: #1A2E40; /* 深海軍藍 */
    --secondary-color: #F2E8DC; /* 米白 */
    --accent-color: #C0A062; /* 沉穩金 */
    --text-color: #333333;
    --light-text-color: #FFFFFF;
    --font-serif: 'Noto Serif TC', serif;
    --font-sans: 'Noto Sans TC', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--secondary-color);
    color: var(--text-color);
    line-height: 1.8;
}

/* --- 導覽列 Header --- */
header {
    background: rgba(192, 160, 98, 0.85); /* 金色半透明 */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1rem 5%;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: top 0.3s;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1300px;
    margin: auto;
    margin-top: -20px;
    margin-bottom: -20px;
}


.logo img {
    /*width: 60px;
    height: auto;*/
    height: 75px;
    z-index: 1001; 
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 700;
    position: relative;
    padding-bottom: 5px;
    transition: color 0.3s;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color:#ffffff;
    transition: width 0.4s ease-out;
}

.nav-links a:hover {
    color: var(--light-text-color);
}

.nav-links a:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    cursor: pointer;
    z-index: 1001; /* 確保漢堡選單在最上層 */
}

.hamburger div {
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 5px;
    transition: all 0.3s ease;
}



.kv-web {display: inline-block;}
.kv-mobile {display: none;}


/* --- 主視覺 Hero --- */
.hero {
    min-height: 80vh;
    padding-bottom: 150px; /* 增加底部空間，讓下方區塊疊加效果更好 */
    display: flex;
    justify-content: center;
    align-items: center;
/*    text-align: center;*/
    color: var(--light-text-color);
    position: relative;
    overflow: hidden;
}

.slideshow-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}


.slide {
    position: absolute;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: opacity 1.5s ease-in-out;
}

.hero::after { /* 遮罩層 */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: -1;
}

.hero-text h1 {
    font-family: var(--font-serif);
    font-size: 4rem;
    letter-spacing: 5px;
    font-weight: 600;
    padding-right: 465px;
    margin-top: 120px;
}

.hero-text p {
    font-size: 1.5rem;
    margin-top: -3rem;
    font-weight: 400;
    padding-left: 45px;
}


/* --- 主視覺動畫 --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-hero-title {
    animation: fadeInUp 1.5s ease-out 0.5s backwards;
}

.animate-hero-subtitle {
    animation: fadeInUp 1.5s ease-out 1s backwards;
}

.animate-hero-p {
    animation: fadeInUp 1.5s ease-out 1.5s backwards;
}

.animate-hero-s {
    animation: fadeInUp 1.5s ease-out 2.5s backwards;
}


.foreword-text {
    display: block;
    width: 560px;
    font-size: 18px;
    line-height: 30px;
    margin-left: 60px;
}


.slogan-text {
    font-family: var(--font-serif);
    margin-left: 85px;
    padding-top: 40px;
}


/*.slogan-text_m {
    display: block;
    font-size: 32px;
    font-family: var(--font-serif);
    margin-left: 100px;
    padding-top: 50px;
}*/


/* --- 通用區塊設定 --- */
section {
    padding: 2rem 3%;
    margin: auto;
}


/* 修正錨點連結捲動位置，避免標題被導覽列遮擋 */
section[id] {
  scroll-margin-top: 90px; /* 這個數值可以依據您的導覽列實際高度微調 */
}



.section-title {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    font-weight: 600;
}

main {
    max-width: 1200px;
    margin: auto;
}



/* 滾動動畫 */
.reveal {
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}


/* --- 活動時間與費用資訊 --- */
.info-cta {
    background-color: #fff;
    margin-top: -50px; /* 向上提拉，疊加在主圖上 */
    position: relative;
    z-index: 10;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    align-items: center;
    text-align: center;
    margin-top: -10px;
}

.info-item h3 {
    color: var(--primary-color);
    font-family: var(--font-serif);
    margin-bottom: 0.5rem;
}


.info-item .date {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--accent-color);
}


.info-item .price {
    font-size: 1.2rem;
    font-weight: bold;
    color: #D32F2F;
    text-decoration: line-through;
}

.info-item .early-bird {
    color: #D32F2F;
    font-size: 2rem;
    font-weight: bold;
}

.info-item small {
    display: block;
    font-size: 1.3rem;
    color: #666;
    line-height: 27px;
}

.info-item .phone {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--accent-color);
}


/* --- 行程亮點 Highlights --- */
.highlights-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.2rem;
}

.highlight-card {
    background: #ffffff;
    padding: 1.5rem;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.highlight-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.highlight-card .icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.highlight-card h3 {
    font-family: var(--font-serif);
    color: #D32F2F;
    font-size: 1.3rem;
    margin-bottom: 0.2rem;
}


/* --- 亮點企業參訪 Company Visits --- */
.company-visits {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.highlights-title {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: -1.5rem;
    color: var(--primary-color);
    font-weight: 600;
}

.company-card {
    display: flex;
    gap: 2rem;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: box-shadow 0.3s ease;
}

.company-card:hover {
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
}

.company-card:nth-child(even) {
    flex-direction: row-reverse;
}

.company-image {
    flex: 1;
    min-height: 300px;
    background-size: cover;
    background-position: center;
    transition: transform 0.4s ease;
}

.company-card:hover .company-image {
    transform: scale(1.05);
}

.company-info {
    flex: 1;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.company-info h3 {
    font-family: var(--font-serif);
    color: #b28247;
    margin-bottom: 0rem;
    font-size: 1.8rem;
}

.company-info h4 {
/*    font-family: var(--font-serif);*/
    color: #5c5858;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.btn-visits {
    display: inline-block;
    background-color: #b28247;
    color: white;
    padding: 0.6rem 1.5rem;
    text-decoration: none;
    border-radius: 50px;
    margin-top: 1rem;
    align-self: flex-start;
    transition: background-color 0.3s;
}

.btn-visits:hover {
    background-color: var(--accent-color);
}


/* --- 文化深度×地域風土 Culture --- */
.culture-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.culture-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
    padding-bottom: 15px; 
}

.culture-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.culture-img {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
}

.culture-title {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1.2rem;
    color: var(--primary-color);
    font-weight: 600;
}

.culture-card h3 {
    font-family: var(--font-serif);
    color: var(--primary-color);
    margin: 0.5rem 0.5rem 0rem 0.5rem;
    font-size: 1.2rem;
}

.culture-card p {
    padding: 0rem 0.5rem 0rem 0.5rem;
    font-size: 0.95rem;
}


.btn-more {
    display: inline-block;
    background-color: #b28247;
    color: white;
    padding: 0.3rem 1.2rem;
    text-decoration: none;
    border-radius: 50px;
    margin-top: 1rem;
    align-self: flex-start;
    transition: background-color 0.3s;
}

.btn-more:hover {
    background-color: var(--accent-color);
}



/* --- 下載報名表&行程表  --- */
.download-section {
    text-align: center;
    background-color: #B0A18F;
    margin-top: 25px;
}

.download-section p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.button-group {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.btn {
    text-decoration: none;
    padding: 0.6rem 2rem;
    font-size: 1.5rem;
    font-weight: bold;
    border-radius: 50px;
    transition: all 0.3s ease;
    transition: background-color 0.3s, transform 0.3s;
}

.btn:hover {
    transform: scale(1.05);
}


.btn-primary {
/*    background-color: var(--accent-color);*/
    background-color: #da0707;
    color: white;
    border-color: var(--accent-color);
}

.btn-primary:hover {
    background-color: #b70617;
    color: var(--accent-color);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: white;
}


/* --- 頁尾 footer --- */
footer {
    background-color: var(--primary-color);
/*    color: var(--light-text-color);*/
    text-align: center;
    padding: 2rem 5%;
    background-color: #333;
    color: #ccc;
    font-size: 1rem;
}






/* --- 響應式設計 (手機版) --- */
@media screen and (max-width: 768px) {
   .kv-web {display: none;}
   .kv-mobile {display: inline-block;}


    body {
        line-height: 1.7;
    }
    
    .section-title {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }
    
    section {
        padding: 3rem 5%;
    }

    .info-cta {
        margin-top: -80px;
        border-radius: 0;
    }

    /* 手機版導覽列 - 下拉式動畫 */
    .nav-links {
        position: absolute; /* 改為 absolute，相對於 header 定位 */
        top: 68px; /* header 高度 */
        left: 0;
        right: 0;
        width: 100%;
        background: rgba(192, 160, 98, 0.98); /* 加深一點透明度 */
        flex-direction: column;
        align-items: center;
        gap: 0;
        
        /* 動畫核心 */
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        transition: max-height 0.5s ease-in-out, opacity 0.3s ease-in-out;
    }

    .nav-links.nav-active {
        max-height: 50vh; /* 給一個足夠大的高度讓它展開 */
        opacity: 1;
    }
    
    .nav-links li {
        width: 100%;
        text-align: center;
    }

    .nav-links a {
        display: block;
        padding: 1.2rem;
        font-size: 1.3rem;
        width: 100%;
        border-bottom: 3px solid rgba(248, 245, 236, 0.1);
    }

    .nav-links a:hover {
        background-color: var(--primary-color);
        color: var(--light-text-color);
    }
     .nav-links a::after {
        display: none;
    }

    .hamburger {
        display: block;
    }


    /* 增加漢堡選單三條線的垂直間距 */
    .hamburger div {
        margin: 6px 0; /* 增加垂直間距 */
    }

    
    .toggle .line1 {
        transform: rotate(-45deg) translate(-5px, 6px);
    }

    .toggle .line2 {
        opacity: 0;
    }

    .toggle .line3 {
        transform: rotate(45deg) translate(-5px, -6px);
    }


    /* 主視覺 */
    .hero {
        min-height: 70vh;
        padding-top: 80px; /* 增加頂部空間，避免內容被導覽列遮擋 */
        padding-bottom: 100px;
        align-items: center; /* 讓內容垂直置中 */
   }
    
    /* [優化] 讓主視覺文字區塊置中 */
       .hero-text {
        text-align: center;
        width: 100%; /* 確保容器滿寬以利內容置中 */
    }

   .hero-text h1 {
        font-size: 2.5rem;
        padding-right: 0; /* 移除桌面版的大間距 */
        margin-top: 130px;
   }
    
    /* 讓標題圖片和副標題圖片自動縮放 */
    .hero-text h1 img, 
    .hero-text .animate-hero-subtitle img {
        width: 95%;
        height: auto; /* 維持圖片長寬比 */
        max-width: 450px; /* 設定最大寬度，避免在平板等較寬螢幕上過大 */
    }

   .hero-text p {
        font-size: 1.2rem;
        padding-left: 0; /* 移除桌面版的間距 */
        margin-top: -1.5rem; /* 調整與主標題圖片的距離 */
    }
    
    /* 讓前言文字區塊適應手機寬度並置中 */
    .foreword-text {
        width: 92%; /* 使用百分比寬度 */
        margin: 1rem auto 0 auto; /* 上邊距1rem，左右自動置中 */
        font-size: 0.8rem;
        line-height: 1.5;
        margin-top: 0px;
    }


    .slogan-text {
        font-size: 20px;
        margin: 1rem auto 0 auto;
        margin-left: 0px;
        padding-top: 0px;
    }




    /* --- 活動時間與費用資訊 --- */
    .info-grid {
        margin-top: -30px;
        margin-bottom: -35px;
    } 

    .info-item h3 {
        font-size: 1.5rem;
        margin-bottom: -5px;
    }

    .info-item .early-bird {
        font-size: 2rem;  
    }


    .info-item .date {
       font-size: 1.5rem;
    }


    /* 行程亮點 */
    .highlight-card h3 {
        font-size: 1.7em;
    }

    .highlight-card p {
        font-size: 1.2em;
    }

    .highlight-card .icon {
        margin-bottom: -1rem;
        margin-top: -15px;
    } 


   /* 亮點企業參訪 */
   .highlights-title {
        font-size: 2rem;
        margin-bottom: -1.5rem;
        margin-top: -50px; 
   }
    
   .company-info {
        padding: 0rem 2rem 2rem 2rem; 
   }

   .company-info h3 {
       font-size: 2rem;
       line-height: 37px; 
   }

   .company-info h4 {
       font-size: 1.5rem;
   }

    .company-info p {
       font-size: 1.2rem;
   }

   
    .btn-visits {
        font-size: 20px;
        padding: 0.6rem 1.5rem;
        width: 100%;
        text-align: center;       
    }


    /* 文化深度×地域風土 */
    .culture-title {
        font-size: 2rem;
        margin-bottom: 1.5rem;
        margin-top: -45px;
    }

    .culture-card h3 {
        font-size: 1.5rem;
        line-height: 34px;
    }

    .culture-card p {
        font-size: 1.2rem;
        line-height: 30px;
    }


/* --- 下載報名表&行程表  --- */
    .download-section {
        margin-top: 0px;
    }

    .button-group {
        gap: 1rem;
    }

    .btn {
      padding: 0.5rem 1.5rem;  
    }


    /* 行程亮點 */
    .highlights-grid {
        grid-template-columns: 1fr;
    }

    /* 亮點企業參訪 */
    .company-card, .company-card:nth-child(even) {
        flex-direction: column;
    }

    /* 文化深度×地域風土 */
    .culture-grid {
        grid-template-columns: 1fr;
    }
}
