/* 基本樣式 */
html {
    scroll-padding-top: 60px;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Arial', sans-serif;
    background: url('images/0001@0000@.png') center/cover fixed;
    background-color: #ecf0f1;
}

.language-buttons button {
    background-color: #2c3e50;
    color: white;
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    margin: 0 5px;
    transition: background-color 0.3s ease;
}

.language-buttons button:hover {
    background-color: #34495e;
}

/* 標頭區域 */
header {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0;
    background-color: #ffffff;
}

header h2, header h3, header h4, header h5, header h6, header h7 {
    color: black;
    font-size: 30px;
    opacity: 0.9;
    margin: 20px auto;
    text-align: center;
}

.centerend {
    text-align: center;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.centerend a {
    display: inline-block;
    background-color: #2c3e50;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.centerend a:hover {
    background-color: #34495e;
    transform: scale(1.05);
}

.logo {
    width: 100%;
    height: auto;
    max-height: 480px;
    object-fit: contain;
    display: block;
}

/* 導覽區域 */
.navigation-container {
    display: flex;
    margin: 0;
}

.nav-item {
    background-color: #2c3e50;
    color: white;
    padding: 20px 0;
    text-align: center;
    cursor: pointer;
    flex: 1;
    border: none;
    margin: 0;
    transition: transform 0.3s ease, background-color 0.3s ease, color 0.3s ease;
}

.nav-item:hover {
    transform: scale(1.05);
    background-color: rgba(144,224,238,1.00);
    color: #1b263b;
}

.nav-item a {
    text-decoration: none;
    color: inherit;
    font-weight: bold;
    display: block;
}

.nav-item:hover a {
    color: inherit;
}

.content-section {
    padding: 20px;
    background-color: white;
    margin: 20px auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    clear: both;
    width: 80%;
    max-width: 800px;
    display: block;
}

.content-section h2,
.content-section h3,
.content-section h4,
.content-section h5,
.content-section h6,
.content-section h7,
.content-section h8 {
    text-align: center;
    color: black;
    font-size: 30px;
    opacity: 0.9;
    margin: 20px auto;
    display: block;
    width: 100%;
}

.content-section iframe {
    display: block;
    margin: 20px auto;
}

/* 底下連結 */
footer {
    background-color: rgba(44, 62, 80, 0.9);
    padding: 20px;
    text-align: center;
    margin-top: 20px;
}

footer a {
    color: #aaa;
    font-size: 1.6rem;
    text-decoration: none;
    transition: color 0.2s, transform 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 10px;
}

footer a:hover {
    color: #fff;
    transform: scale(1.15);
}

/* 影片滑動區域樣式 */
.video-section {
    position: relative;
    width: 80%;
    max-width: 800px;
    margin: 20px auto;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.video-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.video-container {
    display: flex;
    position: relative;
    transition: transform 0.3s ease-in-out;
}

.video-container iframe {
    width: 100%;
    height: 450px;
    flex-shrink: 0;
    display: none;
}

.video-container iframe.visible {
    display: block;
}

/* 圖片滑動區域樣式 */
.image-slider {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 20px auto;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.image-container {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.image-container img {
    width: 100%;
    flex-shrink: 0;
    height: auto;
    border-radius: 8px;
}

/* 自動播放圖片 */
.carousel {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 20px auto;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.carousel-images {
    display: flex;
    transition: transform 0.3s ease-in-out;
    position: relative;
    z-index: 1;
}

.carousel-images img {
    width: 100%;
    height: 450px;
    object-fit: cover;
    flex-shrink: 0;
    border-radius: 8px;
    user-select: none;
    -webkit-user-drag: none;
    touch-action: manipulation;
}

.carousel-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    gap: 10px;
}

.dot {
    height: 12px;
    width: 12px;
    margin: 0 5px;
    background-color: #bbb;
    border-radius: 50%;
    display: inline-block;
    transition: background-color 0.3s ease;
    cursor: pointer;
}

.dot.active {
    background-color: #717171;
}

/* 左右箭頭樣式 */
.arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 30px;
    color: #fff;
    background-color: rgba(0, 0, 0, 0.5);
    border: none;
    padding: 10px;
    cursor: pointer;
    z-index: 100;
    opacity: 0.5;
    transition: opacity 0.3s ease;
    pointer-events: auto;
}

.arrow:hover {
    opacity: 1;
}

.arrow.left {
    left: 10px;
}

.arrow.right {
    right: 10px;
}

/* 回到最上方按鈕 */
.back-to-top-container {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    cursor: pointer;
    position: fixed;
    bottom: 50px;
    left: 70px;
    width: 80px;
    height: 40px;
    padding: 10px 0;
    display: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
    line-height: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgb(0, 0, 0, 0.2);
    opacity: 0.7;
    z-index: 1000;
}

.back-to-top-container:hover {
    transform: scale(1.05);
    background-color: rgba(144, 224, 238, 1.00);
    color: #180806;
    opacity: 1;
}

.back-to-top-container a {
    text-decoration: none;
    color: inherit;
    font-weight: bold;
    font-size: 16px;
}

/* 背景的模態 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

/* 放大後的圖片 */
.modal-content {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

/* 社群媒體 FB 區塊 */
.fb-post-container {
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.fb-inner-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 10px;
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 10px;
}

.fb-page {
    width: 100%;
    max-width: 100%;
    height: 500px;
    margin: 0 auto;
}

.fb-post {
    width: 100%;
    max-width: 500px;
    height: 500px;
}

.zoomable img {
    transition: transform 0.3s ease-in-out;
    cursor: pointer;
}

.zoomable img.zoomed {
    transform: translate(-50%, -50%) scale(2);
    z-index: 9999;
    position: fixed;
    top: 50%;
    left: 50%;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

/* 手機優化 (768px) */
@media screen and (max-width: 768px) {
    .video-section {
        width: 100%;
        max-width: none;
        margin: 10px auto;
    }

    .video-container iframe {
        height: 400px;
    }

    .nav-item {
        padding: 14px 0;
        font-size: 12px;
    }

    header h1 {
        font-size: 24px;
    }

    .content-section {
        padding: 10px;
        width: 80%;
        box-sizing: border-box;
    }

    .back-to-top-container {
        width: 80px;
        height: 40px;
        font-size: 14px;
        line-height: 40px;
        padding: 10px 0;
        left: 10px;
        bottom: 50px;
    }

    .fb-post-container {
        width: 100%;
        max-width: 100%;
        padding: 0 10px;
        margin: 10px auto;
    }

    .fb-post {
        width: 100%;
        height: auto;
        margin: 10px auto;
    }

    .fb-page {
        width: 100%;
        margin: 10px auto;
        height: auto;
    }

    .carousel-images img {
        height: 350px;
    }
}

/* 手機優化 (480px) */
@media screen and (max-width: 480px) {
    .video-section {
        width: 100%;
        max-width: none;
        margin: 10px auto;
    }

    .video-container iframe {
        height: 275px;
    }

    .nav-item {
        padding: 14px 0;
        font-size: 12px;
    }

    header h1 {
        font-size: 24px;
    }

    .content-section {
        padding: 10px;
        width: 80%;
        box-sizing: border-box;
    }

    .back-to-top-container {
        width: 80px;
        height: 40px;
        font-size: 14px;
        line-height: 40px;
        padding: 10px 0;
        left: 10px;
        bottom: 50px;
    }

    .fb-post-container {
        width: 100%;
        max-width: 100%;
        padding: 0 10px;
        margin: 10px auto;
    }

    .fb-post {
        width: 100%;
        height: auto;
        margin: 10px auto;
    }

    .fb-page {
        width: 100%;
        height: auto;
        margin: 10px auto;
    }

    .carousel-images img {
        height: 250px;
    }
}