/* 定義全域變數與基本設定 */
:root {
    --primary-color: #004b87;
    --secondary-color: #f1f7fc;
    --text-color: #333333;
    --light-text: #666666;
    --white: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans TC', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    scroll-behavior: smooth;
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
}

.text-center { text-align: center; }
.text-white { color: var(--white) !important; }
.bg-light { background-color: var(--secondary-color); }
.bg-primary { background-color: var(--primary-color); }


/* ================================
   導覽列
================================ */
.navbar {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 20px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 400;
    transition: color 0.3s;
}

.nav-links a:hover { color: var(--primary-color); }

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--primary-color);
}


/* ================================
   全螢幕輪播
================================ */
.slider-container {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    background-color: var(--primary-color);
    padding: 0 !important;
}

.slider-wrapper {
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    display: flex;
    justify-content: center;
    align-items: center;
    background-size: cover;
    background-position: center;
}

.slide.active {
    opacity: 1;
    z-index: 10;
}

.slide-content {
    max-width: 700px;
    padding: 40px;
    text-align: center;
    color: white;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin: 0 20px;
}

.slide-content h2 { font-size: 2.5rem; margin-bottom: 20px; }
.slide-content p { font-size: 1.2rem; line-height: 1.8; }

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    padding: 20px 15px;
    cursor: pointer;
    font-size: 2rem;
    z-index: 100;
    transition: background 0.3s;
    border-radius: 0 5px 5px 0;
}

.slider-btn:hover { background: rgba(255, 255, 255, 0.5); }
.next { right: 0; border-radius: 5px 0 0 5px; }
.prev { left: 0; }

.v-img-1 { background-image: url('vision1.jpg'); }
.v-img-2 { background-image: url('vision2.jpg'); }
.v-img-3 { background-image: url('vision3.jpg'); }


/* ================================
   聚會時間
================================ */
.service-times {
    padding: 120px 0;
    background-color: var(--white);
}

.service-times .section-title {
    margin-bottom: 60px;
}

.cards {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.card {
    flex: 1;
    min-width: 200px;
    height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    background-size: cover;
    background-position: center;
    color: white;
    transition: transform 0.3s ease;
    text-align: center;
}

.card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(1px) saturate(120%);
    -webkit-backdrop-filter: blur(1px) saturate(120%);
    z-index: 1;
}

.card h3, .card .time {
    position: relative;
    z-index: 2;
    margin: 5px 10px;
    color: white !important;
}

.card:hover { transform: translateY(-5px); }

.card-3m    { background-image: url('3m.jpg'); }
.card-zone  { background-image: url('zone.jpg'); }
.card-adult { background-image: url('adult.jpg'); }
.card-child { background-image: url('child.jpg'); }


/* ================================
   影片 / 講道
================================ */
.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    max-width: 800px;
    margin: 30px auto;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.video-container iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
}

.sermon-list {
    list-style: none;
    max-width: 800px;
    margin: 0 auto;
}

.sermon-list li {
    padding: 15px 0;
    border-bottom: 1px solid #ddd;
}


/* ================================
   最新消息
================================ */
.news {
    padding: 100px 0 150px;
}

.news-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
    max-width: 800px;
    margin: 0 auto;
}

.news-item {
    background: var(--white);
    padding: 25px;
    border-left: 5px solid var(--primary-color);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.news-item .date {
    font-size: 0.9rem;
    color: var(--light-text);
    display: block;
    margin-bottom: 10px;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.news-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}

.news-card:hover { transform: translateY(-5px); }

.news-img-box {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background-color: #eee;
}

.news-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: zoom-in;
}

.news-content { padding: 20px; }
.news-content h3 { color: var(--primary-color); margin: 10px 0; }


/* ================================
   彈出視窗 (Modal)
================================ */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.9);
    backdrop-filter: blur(8px);
}

.modal-content {
    display: block;
    max-width: 90%;
    max-height: 80vh;
    margin: 50px auto 0;
    border-radius: 10px;
    animation: zoomIn 0.3s;
}

@keyframes zoomIn {
    from { transform: scale(0.7); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}

.close-modal {
    position: absolute;
    top: 20px; right: 35px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}


/* ================================
   聯絡我們
================================ */
.contact {
    padding: 150px 0 100px;
    background-color: var(--primary-color);
    color: white;
    text-align: left;
}

.contact-container {
    max-width: 900px;
    margin: 0 auto;
}

.contact-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: white;
}

.contact-subtitle {
    font-size: 1.2rem;
    margin-bottom: 60px;
    opacity: 0.85;
    font-weight: 300;
}

.contact-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 60px;
}

.contact-column {
    flex: 0 1 auto;
    min-width: 280px;
}

.contact-column h3 {
    font-size: 1.4rem;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    display: inline-block;
}

.contact-column p {
    margin-bottom: 15px;
    line-height: 1.7;
}

.contact-link {
    color: white;
    text-decoration: underline;
    transition: opacity 0.3s;
}

.contact-link:hover { opacity: 0.7; }


/* ================================
   使命區塊
================================ */
.mission-section {
    background-color: var(--primary-color);
    padding: 80px 0;
    color: white;
}

.mission-box {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.3rem;
    line-height: 1.8;
    font-weight: 300;
    font-style: italic;
    border-left: 4px solid white;
    padding-left: 30px;
    text-align: left;
}


/* ================================
   Facebook 直播卡片
================================ */
.fb-live-card {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    max-width: 600px;
    margin: 30px auto;
    border-top: 5px solid #1877F2;
}

.fb-icon {
    background: #1877F2;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 40px;
    font-weight: bold;
    line-height: 60px;
    margin: 0 auto 20px;
}

.btn-fb {
    display: inline-block;
    background: #1877F2;
    color: white;
    padding: 15px 30px;
    text-decoration: none;
    border-radius: 50px;
    margin-top: 20px;
    font-weight: bold;
    transition: background 0.3s;
}

.btn-fb:hover { background: #145dbf; }


/* ================================
   IG 按鈕
================================ */
.ig-button {
    position: relative;
    z-index: 2;
    margin-top: 15px;
    padding: 8px 15px;
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: white;
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.ig-button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(220, 39, 67, 0.4);
}

.ig-icon { font-size: 1rem; }


/* ================================
   頁尾
================================ */
footer {
    background-color: #00335e;
    color: #fff;
    text-align: center;
    padding: 20px 0;
    font-size: 0.9rem;
}


/* ================================
   手機版響應式 (@media max-width: 768px)
================================ */
@media (max-width: 768px) {

    /* 導覽列 */
    .mobile-menu-btn { display: block; }

    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 60px; left: 0;
        background-color: var(--white);
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        text-align: center;
        padding: 20px 0;
    }

    .nav-links.active { display: flex; }

    /* 輪播標題 */
    .hero h2 { font-size: 2rem; }

    /* 聯絡我們 */
    .contact {
        padding: 80px 20px;
    }

    .contact-title { font-size: 2rem; }

    .contact-grid {
        flex-direction: column;
        gap: 40px;
    }

    .contact-column {
        width: 100%;
        text-align: left !important;
    }

    .contact-column h3 {
        display: block;
        width: 100%;
    }
}