﻿/* =========================
   General Styles
   ========================= */
html, body {
    overflow-x: hidden;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #eee;
    color: #6c6c6c;
    font-family: "Open Sans", Helvetica, Arial, sans-serif;
    font-size: 18px;
    overflow-x: hidden;
    /* 避免固定導覽列造成 CLS（依實際高度微調） */
    padding-top: 72px;
}

.tm-container {
    background-color: #fff;
    max-width: 1400px;
    margin: 0 auto;
}

.tm-site-title {
    color: #cc0064;
    font-size: 2.2rem;
}

.tm-site-subtitle {
    color: #0095bf;
    font-size: 1.2rem;
    margin-bottom: 30px;
}

/* =========================
   Navbar
   ========================= */
/* Navbar：未捲動時半透明 */
.navbar {
    background: rgba(255, 255, 255, 0.6) !important; /* 半透明白，整塊一致透明 */
    backdrop-filter: blur(8px); /* 毛玻璃效果，可略 */
    -webkit-backdrop-filter: blur(8px);
    transition: background .3s ease-in-out, box-shadow .3s ease-in-out;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    padding: 15px 20px;
}



    .navbar.scrolled {
        background: rgba(255,255,255,.96) !important;
        box-shadow: 0 4px 10px rgba(0,0,0,.1);
    }

.navbar-brand {
    font-size: 1.5rem;
    font-weight: bold;
}

    .navbar-brand img {
        height: 50px;
        width: auto;
    }

.navbar .nav-link {
    color: #000 !important;
    font-weight: bold;
}

/* 手機選單容器：預設隱藏，點漢堡加 .show 顯示（原生 JS 控制） */
.navbar-collapse {
    display: none;
    flex-direction: column;
    align-items: center;
    background: rgba(255,255,255,.96);
    padding: 10px;
    border-radius: 5px;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
    z-index: 999;
}

    .navbar-collapse.show {
        display: flex;
    }

/* 開單時可鎖滾動（選用） */
body.menu-open {
    overflow: hidden;
}

.navbar-nav {
    margin-left: auto;
    display: flex;
    align-items: center;
}

/* =========================
   Hero Section
   ========================= */
.hero-section {
    position: relative;
    min-height: 500px;
    max-height: 500px;
    height: auto;
    padding: 10% 5%;
    text-align: center;
    background: url('../img/new-banner02.png') no-repeat center top / cover; /* 穩定 PNG */
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.hero-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
}

.hero-section .overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,.2);
    display: none; /* 若要保留原色 */
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 2.6rem;
    font-weight: 700;
}

.hero-subtitle-line {
    font-size: 2.2rem;
    font-weight: 600;
    color: #fff;
    margin: 10px 0;
    display: inline;
    text-shadow: -2px -2px 4px rgba(0,0,0,.4), 2px -2px 2px rgba(0,0,0,.4), -2px 2px 2px rgba(0,0,0,.4), 2px 2px 2px rgba(0,0,0,.4);
}

.hero-subtitle {
    color: #003366;
    font-size: 1.4rem;
    margin: 5px 0;
    line-height: 1.5;
}

/* =========================
   Sections
   ========================= */
.container {
    max-width: 1100px;
}

section {
    padding: 60px 20px;
    text-align: center;
}

.tm-section-1 {
    height: 650px;
    background-image: url(../img/spot-bg-01.png);
    background-size: cover;
    -webkit-clip-path: polygon(0 0, 100% 0, 100% 84%, 0 100%);
    clip-path: polygon(0 0, 100% 0, 100% 84%, 0 100%);
    background-repeat: no-repeat;
    padding-top: 30px;
}

.tm-section-3 {
    height: 650px;
    background-image: url(../img/spot-bg-02.jpg);
    background-size: cover;
    -webkit-clip-path: polygon(0 14%, 100% 0, 100% 86%, 0 100%);
    clip-path: polygon(0 14%, 100% 0, 100% 86%, 0 100%);
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
}

.tm-color-primary {
    color: #cc0064;
}

.tm-color-secondary {
    color: #0095bf;
}

.btn-primary {
    background-color: #0b939f !important;
    border-color: #0b939f !important;
}

    .btn-primary:hover, .btn-primary:focus {
        background-color: #087983 !important;
        border-color: #087983 !important;
    }

.tm-btn-secondary {
    color: #fff;
    background-color: #0095bf;
}

    .tm-btn-secondary:hover, .tm-btn-secondary:focus {
        background-color: #44cbf1;
    }

/* 白底圓形/卡片（若要永遠正圓，可改用偽元素做法） */
.tm-bg-circle-white {
    background: #fff;
    color: #6c6c6c;
    width: 90%;
    height: auto;
    max-width: 550px;
    padding: 40px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

    .tm-bg-circle-white p {
        font-weight: bold;
        margin: 4px 0;
        line-height: 1.3;
    }

.tm-bg-circle-pad-2 {
    padding-left: 120px;
}

p, ul {
    line-height: 2;
    font-weight: 300;
}

ul {
    margin: 0;
}

    ul.dashed {
        list-style: none;
    }

        ul.dashed > li {
            text-indent: -5px;
        }

            ul.dashed > li:before {
                content: "-";
                margin-right: 5px;
                text-indent: -5px;
            }

.btn {
    padding: 10px 30px;
    font-size: 1.15rem;
    font-weight: 300;
    border-radius: 8px;
    margin-top: 20px;
}

a.btn:hover {
    color: #fff;
    text-decoration: none;
}

.tm-flex-center-v {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.tm-text-container {
    max-width: 420px;
}

.tm-circle-img {
    width: 550px;
}

.tm-circle-img-container {
    text-align: right;
}

.tm-contact-form {
    max-width: 280px;
}

.form-control {
    border-radius: 0;
    border: none;
    border-bottom: 1px solid #cc0064;
}

    .form-control:focus {
        box-shadow: none;
        border-color: #cc0064;
        border-width: 2px;
    }

.tm-send-btn {
    border-radius: 5px;
    padding: 6px 0;
}

.tm-footer-link {
    color: #6c6c6c;
}

    .tm-footer-link:hover, .tm-footer-link:focus {
        color: #cc0064;
        text-decoration: none;
    }

/* =========================
   頁面背景（內頁）
   ========================= */
body.join-page {
    background: linear-gradient(to bottom,#fceabb,#f8b500);
}

body.gathering-page {
    background: linear-gradient(to right,#ffd6e7,#ffafcc);
}

body.about-page {
    background: linear-gradient(to bottom,#ffdab9,#ff7f50);
}

body.contact-page {
    background: linear-gradient(to right,#fff2d9,#ffd9b3);
}

body.video-page {
    background: linear-gradient(to right,#ffe0c3,#ffb88c);
}

body.testimony-page {
    background: linear-gradient(to right,#fff3d1,#ffc67e);
}

body.activities-page {
    background: linear-gradient(to right,#ffe0ec,#ffc1cc,#ff9eb3);
}

body.pray-page {
    background: linear-gradient(to right,#fff7e6,#ffd39b);
}

/* =========================
   Join 區塊
   ========================= */
#join {
    max-width: 900px;
    margin: 100px auto 50px;
    padding: 40px 30px;
    background: #fff;
    border-radius: 10px;
    border: 1px solid #ddd;
    box-shadow: 0 6px 15px rgba(0,0,0,.1);
    text-align: center;
}

.join-title {
    color: #c70080;
    font-size: 2.2rem;
    font-weight: 700;
}

.join-subtitle {
    color: #007bbf;
    font-size: 1.6rem;
    font-weight: 700;
    margin-top: 20px;
}

#join p {
    font-weight: bold;
    text-align: left;
    padding-left: 20px;
}

.meeting-title {
    color: #c70080;
    font-size: 1.8rem;
    font-weight: 700;
}

.meeting-info {
    color: #007bbf;
    font-size: 1.4rem;
    font-weight: 700;
}

/* =========================
   影音區塊
   ========================= */
.youtube-videos {
    width: 100%;
    padding: 10px 5%;
    background: linear-gradient(to right,#ffe0c3,#ffb88c);
    color: #000;
    text-align: center;
}

    .youtube-videos h2 {
        font-size: 36px;
        font-weight: 700;
        text-align: center;
        margin: 40px 0 20px;
    }

.video-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

.video-box {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    overflow: hidden;
    flex: 0 0 calc(50% - 40px);
    max-width: 500px;
    width: 100%;
    box-shadow: 0 4px 8px rgba(0,0,0,.1);
    text-align: center;
    color: #000;
    transition: transform .3s ease-in-out;
    display: flex;
    flex-direction: column;
    align-items: center;
}

    .video-box:hover {
        transform: translateY(-5px);
    }

.video-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    overflow: hidden;
    border-radius: 10px 10px 0 0;
}

    .video-wrapper iframe {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        border: none;
    }

/* 懶載縮圖與播放鈕（內嵌 SVG，移除第三方請求） */
.youtube-thumbnail {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    cursor: pointer;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60px;
    height: 60px;
    transform: translate(-50%,-50%);
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="48" fill="rgba(0,0,0,0.35)"/><polygon points="40,30 75,50 40,70" fill="white"/></svg>');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    pointer-events: none;
}

.video-box .video-info {
    padding: 15px;
    text-align: center;
}

.video-box h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 10px;
}

.video-box p {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.more-button {
    background: #343a40;
    color: #fff;
    padding: 12px 24px;
    font-size: 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 20px;
    display: inline-block;
    transition: .3s;
}

    .more-button:hover {
        background: #fce184;
    }

/* =========================
   Desktop ≥ 992px
   ========================= */
@media (min-width: 992px) {
    .navbar {
        padding: .5rem 1rem;
    }

        .navbar .container {
            max-width: 1320px;
            padding: 0 20px;
            display: flex;
            align-items: center;
            justify-content: flex-start;
        }

    .navbar-brand {
        margin-right: 16px;
        padding: 0;
        display: flex;
        align-items: center;
    }

    /* 桌機：選單橫排、顯示為 flex、重置手機樣式 */
    .navbar-collapse {
        display: flex !important;
        position: static;
        background: transparent;
        padding: 0;
        border-radius: 0;
        width: auto;
        max-height: none;
        overflow: visible;
    }

    .navbar-nav {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 4px;
    }

        .navbar-nav .nav-item {
            margin: 0 3px;
        }

        .navbar-nav .nav-link {
            font-size: 1.2rem;
            white-space: nowrap;
            padding: 6px 10px;
        }

        /* 桌機 hover 展開下拉 */
        .navbar-nav .dropdown:hover .dropdown-menu {
            display: block;
            margin-top: 0;
        }

        .navbar-nav .dropdown-menu {
            display: none;
            position: absolute;
            top: 100%;
            left: 0;
            background: #fff;
            min-width: 200px;
            box-shadow: 0 4px 6px rgba(0,0,0,.1);
            z-index: 999;
        }

            .navbar-nav .dropdown-menu a.dropdown-item {
                padding: 10px 16px;
                color: #333;
                text-decoration: none;
                display: block;
                white-space: nowrap;
            }

                .navbar-nav .dropdown-menu a.dropdown-item:hover {
                    background: #f2f2f2;
                }
}

/* =========================
   Tablet/Mobile ≤ 1024px（圖文調整）
   ========================= */
@media screen and (max-width: 1024px) {
    .hero-content {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

        .hero-content .btn {
            margin-top: 20px;
        }

    .tm-circle-img {
        width: 80%;
        max-width: 500px;
        height: auto;
        display: block;
        margin: 0 auto;
    }

    .tm-circle-img-container {
        text-align: center;
        margin-top: 40px;
    }

    .tm-section-left {
        padding: 0 20px;
        margin: 0 auto 30px;
        max-width: 650px;
        text-align: center;
    }

    .tm-btn-container {
        margin-top: 20px;
    }
}

/* =========================
   Mobile ≤ 768px
   ========================= */
@media screen and (max-width: 768px) {
    .hero-section {
        background: url('/img/new-banner02-mobile.png') no-repeat right top / cover;
        min-height: 70vh; /* 原為100vh → 改成80%，可露出下方內容 */
        padding-top: 70px; /* 可視實際navbar高度微調 */
        padding-bottom: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        position: relative;
    }

    .hero-content {
        padding-top: 10px;
    }

    .hero-title {
        font-size: 1.8rem;
        line-height: 1.4;
        padding: 0 10px;
        text-shadow: 2px 2px 4px rgba(0,0,0,.5);
    }

    .hero-subtitle-line {
        font-size: 2rem;
        line-height: 1.4;
        padding: 0 15px;
        font-weight: 600;
        background: transparent;
        border-radius: 0;
        display: inline;
        margin: 5px auto;
        text-shadow: -2px -2px 4px rgba(0,0,0,.8), 2px -2px 4px rgba(0,0,0,.8), -2px 2px 4px rgba(0,0,0,.8), 2px 2px 4px rgba(0,0,0,.8);
    }

    .hero-subtitle {
        color: #fffacc;
        font-size: 1.1rem;
        font-weight: 700;
        padding: 0 10px;
        margin-top: 10px;
        background: transparent;
        text-shadow: -2px -2px 4px rgba(0,0,0,.85), 2px -2px 4px rgba(0,0,0,.85), -2px 2px 4px rgba(0,0,0,.85), 2px 2px 4px rgba(0,0,0,.85);
    }

    .navbar {
        z-index: 1001;
    }

    .navbar-toggler {
        background: rgba(0,0,0,.6);
        border-radius: 5px;
        padding: 5px 10px;
        z-index: 1002;
        position: relative;
    }

    .navbar-brand {
        z-index: 1002;
        position: relative;
    }

    /* 手機選單樣式：顯示/隱藏由 .show 控制 */
    .navbar-nav {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        padding-left: 0;
        padding-right: 0;
        margin: 0;
    }

        .navbar-nav .nav-item {
            width: 100%;
            background: #f2f2f2;
            border-bottom: 1px solid #ccc;
            text-align: center;
        }

        .navbar-nav .nav-link {
            display: block;
            width: 100%;
            text-align: center;
            padding: 6px 0;
            font-size: 1.1rem;
            font-weight: 600;
            font-family: "Noto Sans TC","微軟正黑體",sans-serif;
            color: #000;
            text-decoration: none;
        }

    .tm-circle-img {
        width: 100%;
        max-width: 450px;
        height: auto;
        display: block;
        margin: 0 auto;
    }

    .video-box {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .tm-btn-container {
        display: flex;
        justify-content: center;
    }

    /* 手風琴：分類再展開 */
    .mobile-toggle-item {
        width: 100%;
        background: #f2f2f2;
        border-bottom: 1px solid #ccc;
    }

    .mobile-toggle-header {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 10px;
        font-size: 1.1rem;
        font-weight: bold;
        font-family: "Noto Sans TC","微軟正黑體",sans-serif;
        padding: 12px 0;
        color: #000;
        position: relative;
    }

    .mobile-toggle-icon {
        position: absolute;
        left: 16px;
        font-size: 1.2rem;
        font-weight: bold;
        color: #333;
        width: 20px;
        text-align: center;
    }

    .mobile-submenu {
        display: none;
        background: #f9f9f9;
        padding: 5px 15px 5px 30px;
    }

        .mobile-submenu li {
            list-style: none;
            padding: 3px 0;
            text-align: left;
        }

        .mobile-submenu a.nav-link {
            font-size: 1rem;
            font-weight: 400;
            padding: 2px 0;
            font-family: "Noto Sans TC","微軟正黑體",sans-serif;
            color: #333;
            text-decoration: none;
            display: block;
        }

    .mobile-toggle-item.open .mobile-submenu {
        display: block;
    }
}

/* =========================
   小尺寸 Join 區塊微調
   ========================= */
@media (max-width: 768px) {
    .tm-bg-circle-white {
        border-radius: 16px; /* 不再用 50%，避免被拉成橢圓 */
        width: 95%;
        max-width: 560px;
        padding: 32px 24px;
        height: auto; /* 讓高度跟內容走 */
    }
    .tm-section-1 {
        background-image: none !important;
        background: linear-gradient(to bottom, #fde2b2, #f8c77e) !important; /* 橘黃色漸層 */
        -webkit-clip-path: none;
        clip-path: none;
        height: auto;
        padding: 60px 20px 40px;
    }
}
