/* CSS 變數定義：溫馨屏東山海色彩系統 */
:root {
    --bg-warm: #FFFDF9;
    --bg-card: rgba(255, 255, 255, 0.85);
    --bg-accent: #FFF3E0;
    --text-main: #1E293B;
    --text-muted: #64748B;
    --primary: #FF9800; /* 屏東陽光橘 */
    --primary-hover: #F57C00;
    --secondary: #00A896; /* 湖水綠 (呼應 Logo 山形) */
    --secondary-hover: #028090;
    --accent-blue: #028090; /* 深邃海洋藍 (呼應 Logo 山形) */
    --accent-red: #E63946; /* 十字架溫暖紅 */
    --gradient-sun: linear-gradient(135deg, #FFB74D 0%, #FF8A65 100%);
    --gradient-sea: linear-gradient(135deg, #00A896 0%, #028090 100%);
    --shadow-soft: 0 10px 30px -10px rgba(245, 124, 0, 0.08);
    --shadow-card: 0 20px 40px -15px rgba(30, 41, 59, 0.05);
    --radius-lg: 20px;
    --radius-md: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 重設與通用樣式 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
body {
    font-family: 'Noto Sans TC', 'Outfit', sans-serif;
    background-color: var(--bg-warm);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    background-image: 
        radial-gradient(at 0% 0%, rgba(255, 243, 224, 0.4) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(0, 168, 150, 0.05) 0px, transparent 50%);
    background-attachment: fixed;
}
a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}
button, input, select, textarea {
    font-family: inherit;
}

/* 頁首導覽列 */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: rgba(255, 253, 249, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 100;
    border-bottom: 1px solid rgba(255, 152, 0, 0.1);
    transition: var(--transition);
    /* Force GPU rendering to prevent backdrop-filter flickering */
    transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}
.header-scrolled {
    height: 70px;
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.05);
}
.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}
.brand-logo-img {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    object-fit: cover;
    cursor: pointer;
    border: 1.5px solid rgba(0, 0, 0, 0.05);
    background: #1A1C23;
}
.brand-text h1 {
    font-size: 18px;
    font-weight: 900;
    color: var(--text-main);
    letter-spacing: 0.5px;
}
.brand-text p {
    font-size: 11px;
    color: var(--text-muted);
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
}
nav {
    display: flex;
    align-items: center;
    gap: 28px;
}
.nav-link {
    font-weight: 700;
    font-size: 15px;
    position: relative;
    padding: 8px 0;
    color: var(--text-main);
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2.5px;
    background: var(--primary);
    border-radius: 2px;
    transition: var(--transition);
}
.nav-link:hover::after {
    width: 100%;
}
.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}
.btn {
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.btn-primary {
    background: var(--gradient-sun);
    color: white;
    box-shadow: 0 8px 20px -6px rgba(255, 110, 64, 0.4);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -6px rgba(255, 110, 64, 0.5);
}
.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}
.btn-outline:hover {
    background: rgba(255, 152, 0, 0.05);
    transform: translateY(-2px);
}
.lang-toggle {
    background: var(--bg-accent);
    border: 1px solid rgba(255,152,0,0.2);
    color: var(--primary-hover);
    padding: 8px 12px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: var(--transition);
}
.lang-toggle:hover {
    background: var(--primary);
    color: white;
}

/* 響應式選單按鈕 */
.menu-btn {
    display: none;
    background: transparent;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-main);
}

/* Hero 迎賓大區塊 */
.hero {
    padding: 160px 24px 100px;
    min-height: 90vh;
    display: flex;
    align-items: center;
    position: relative;
    background: url('/static/hero_bg_clean.jpg') no-repeat center center;
    background-size: cover;
}
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(26, 28, 35, 0.4) 0%, rgba(26, 28, 35, 0.1) 100%);
    pointer-events: none;
    z-index: 1;
}
.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 48px;
    align-items: center;
    position: relative;
    z-index: 2;
}
.hero-content h2 {
    font-size: 48px;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #FFFFFF 30%, #FFE0B2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-content p {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 32px;
    max-width: 600px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
.hero-cta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}
.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}
.hero-logo-large {
    width: 320px;
    height: 320px;
    filter: drop-shadow(0 20px 40px rgba(0, 168, 150, 0.15));
    animation: float 6s ease-in-out infinite;
}
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(2deg); }
}

/* SVG Logo 線條動畫效果 */
.svg-mtn-stroke {
    stroke-dasharray: 500;
    stroke-dashoffset: 500;
    animation: drawLine 3s ease-out forwards;
}
.svg-cross {
    opacity: 0;
    animation: fadeIn 1.5s ease-out forwards 1.8s;
}
.svg-wave-1 {
    animation: waveMotion 4s ease-in-out infinite alternate;
}
.svg-wave-2 {
    animation: waveMotion 5s ease-in-out infinite alternate-reverse;
}
@keyframes drawLine {
    to { stroke-dashoffset: 0; }
}
@keyframes fadeIn {
    to { opacity: 1; }
}
@keyframes waveMotion {
    0% { transform: translateX(-2px) translateY(1px); }
    100% { transform: translateX(2px) translateY(-1px); }
}

/* 溫馨聚會直播區塊 */
.live-banner {
    max-width: 1200px;
    margin: -40px auto 80px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 152, 0, 0.15);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    padding: 24px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    box-shadow: var(--shadow-soft);
    z-index: 10;
    position: relative;
}
.live-info {
    display: flex;
    align-items: center;
    gap: 16px;
}
.live-pulse {
    width: 12px;
    height: 12px;
    background: var(--accent-red);
    border-radius: 50%;
    position: relative;
    animation: pulse 1.5s infinite;
}
@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(230, 57, 70, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(230, 57, 70, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(230, 57, 70, 0); }
}
.live-text h3 {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-main);
}
.live-text p {
    font-size: 13px;
    color: var(--text-muted);
}

/* 核心版面設定 */
section {
    padding: 80px 24px;
    max-width: 1200px;
    margin: 0 auto;
}
.section-title {
    text-align: center;
    margin-bottom: 50px;
}
.section-title h2 {
    font-size: 36px;
    font-weight: 900;
    position: relative;
    display: inline-block;
    margin-bottom: 12px;
    color: var(--text-main);
}
.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--primary);
    border-radius: 2px;
}
.section-title p {
    color: var(--text-muted);
    font-size: 15px;
    max-width: 600px;
    margin: 0 auto;
}

/* 關於牧師與教會 (About Pastor Section) */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 56px;
    align-items: center;
}
.about-img-frame {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    border: 8px solid white;
    background: var(--bg-accent);
    aspect-ratio: 4/3;
    display: flex;
    align-items: center;
    justify-content: center;
}
.about-img-placeholder {
    text-align: center;
    color: var(--primary);
    padding: 24px;
}
.about-img-placeholder i {
    font-size: 48px;
    margin-bottom: 16px;
}
.about-text h3 {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.about-text .pastor-title {
    font-size: 14px;
    background: var(--bg-accent);
    color: var(--primary-hover);
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 700;
}
.about-text p {
    color: var(--text-muted);
    font-size: 15px;
    margin-bottom: 20px;
    text-align: justify;
}
.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 32px;
}
.stat-card {
    background: white;
    padding: 16px;
    border-radius: var(--radius-md);
    text-align: center;
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(255,152,0,0.05);
}
.stat-card h4 {
    font-size: 24px;
    color: var(--secondary);
    font-weight: 800;
}
.stat-card p {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 0;
}

/* 聚會時程與小組 (Schedule & Cell Groups) */
.gathering-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(20px);
    transition: var(--transition);
}
.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px -15px rgba(245, 124, 0, 0.1);
    border-color: rgba(255, 152, 0, 0.2);
}
.card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}
.card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: var(--bg-accent);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
}
.card-title h3 {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-main);
}
.card-title p {
    font-size: 12px;
    color: var(--text-muted);
}
.gathering-details {
    margin-bottom: 24px;
}
.detail-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 14px;
}
.detail-item i {
    color: var(--secondary);
    margin-top: 4px;
    font-size: 16px;
}
.detail-label {
    font-weight: 700;
    color: var(--text-main);
    min-width: 80px;
}
.detail-val {
    color: var(--text-muted);
}

/* 地圖整合 */
.map-wrapper {
    margin-top: 32px;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid rgba(0, 168, 150, 0.15);
    box-shadow: var(--shadow-card);
    height: 240px;
}
.map-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* 課程活動報名 (Events Section) */
.event-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}
.event-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.02);
}
.event-badge {
    position: absolute;
    top: 20px;
    right: -30px;
    background: var(--secondary);
    color: white;
    font-size: 11px;
    font-weight: 800;
    padding: 6px 36px;
    transform: rotate(45deg);
}
.event-content h3 {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 12px;
    padding-right: 40px;
}
.event-content p {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 24px;
    min-height: 60px;
}
.event-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid #F1F5F9;
    padding-top: 20px;
    margin-top: 10px;
}
.event-price {
    display: flex;
    flex-direction: column;
}
.price-label {
    font-size: 11px;
    color: var(--text-muted);
}
.price-val {
    font-size: 18px;
    font-weight: 800;
    color: var(--accent-red);
}
.price-eb {
    font-size: 12px;
    color: var(--secondary);
    font-weight: 700;
}

/* 奉獻支持區塊 (Donation Section) */
.donation-section {
    background: linear-gradient(180deg, transparent 0%, var(--bg-accent) 100%);
    border-radius: var(--radius-lg);
    padding: 60px 40px;
    margin-bottom: 80px;
}
.donation-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 56px;
    align-items: center;
}
.donation-info h3 {
    font-size: 28px;
    font-weight: 900;
    color: var(--text-main);
    margin-bottom: 16px;
}
.donation-info p {
    color: var(--text-muted);
    font-size: 15px;
    margin-bottom: 24px;
    text-align: justify;
}
.donation-box {
    background: white;
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-card);
}
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.form-group-full {
    grid-column: span 2;
}
label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
}
.input-control {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 14px;
    border: 1.5px solid #E2E8F0;
    border-radius: var(--radius-md);
    font-size: 14px;
    transition: var(--transition);
    background: #F8FAFC;
}
.input-control:focus {
    border-color: var(--primary);
    background: white;
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 152, 0, 0.15);
}
.btn-full {
    width: 100%;
    justify-content: center;
    padding: 12px;
}

/* 頁尾 (Footer) */
footer {
    background: #1E293B;
    color: #94A3B8;
    padding: 60px 24px 30px;
    font-size: 14px;
    border-top: 4px solid var(--primary);
}
.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr repeat(3, 0.6fr);
    gap: 48px;
    padding-bottom: 40px;
    border-bottom: 1px solid #334155;
}
.footer-brand h2 {
    color: white;
    font-size: 20px;
    font-weight: 900;
    margin-bottom: 8px;
}
.footer-brand p {
    font-size: 12px;
    line-height: 1.8;
}
.footer-col h4 {
    color: white;
    font-weight: 700;
    margin-bottom: 18px;
    font-size: 15px;
}
.footer-links {
    list-style: none;
}
.footer-links li {
    margin-bottom: 10px;
}
.footer-links a:hover {
    color: white;
}
.footer-socials {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}
.social-icon {
    width: 36px;
    height: 36px;
    background: #334155;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: var(--transition);
}
.social-icon:hover {
    background: var(--primary);
    transform: translateY(-2px);
}
.footer-bottom {
    max-width: 1200px;
    margin: 24px auto 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}

/* 彈出式 Modal 基礎樣式 (會友中心 / 線上金流) */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 150;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}
.modal-box {
    background: var(--bg-warm);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 500px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255,255,255,0.7);
    overflow: hidden;
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.modal-overlay.active .modal-box {
    transform: scale(1);
}
.modal-header {
    background: white;
    padding: 20px 24px;
    border-bottom: 1px solid #E2E8F0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.modal-header h3 {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}
.modal-close {
    background: transparent;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
}
.modal-close:hover {
    color: var(--text-main);
}
.modal-body {
    padding: 24px;
}

/* 會友中心登入與狀態 */
.login-tip {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
    background: var(--bg-accent);
    padding: 10px 14px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255,152,0,0.15);
}

/* 會友大面板 (Member Portal Layout) */
.portal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.35);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 120;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    display: flex;
    justify-content: flex-end; /* 右側側拉滑出 */
}
.portal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}
.portal-drawer {
    background: var(--bg-warm);
    width: 100%;
    max-width: 780px; /* 大面積展示 */
    height: 100%;
    box-shadow: -20px 0 50px rgba(15, 23, 42, 0.15);
    border-left: 1px solid rgba(255,255,255,0.7);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.portal-overlay.active .portal-drawer {
    transform: translateX(0%);
}
.portal-header {
    padding: 24px 32px;
    border-bottom: 1px solid rgba(255, 152, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
}
.portal-user-info {
    display: flex;
    align-items: center;
    gap: 16px;
}
.portal-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--gradient-sun);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 800;
}
.portal-username h3 {
    font-size: 18px;
    font-weight: 900;
    color: var(--text-main);
}
.portal-username p {
    font-size: 11px;
    color: var(--primary-hover);
    font-weight: 700;
    background: var(--bg-accent);
    padding: 2px 8px;
    border-radius: 10px;
    display: inline-block;
    margin-top: 2px;
}
.portal-body {
    flex: 1;
    overflow-y: auto;
    padding: 32px;
    background-color: var(--bg-warm);
}

/* 側拉面板分頁分區 (Tabs) */
.portal-tabs {
    display: flex;
    gap: 12px;
    border-bottom: 1px solid #E2E8F0;
    margin-bottom: 24px;
    padding-bottom: 8px;
}
.tab-btn {
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    background: transparent;
    color: var(--text-muted);
    transition: var(--transition);
}
.tab-btn.active {
    background: var(--primary);
    color: white;
}
.tab-content {
    display: none;
}
.tab-content.active {
    display: block;
}

/* 卡片網格與樣式 */
.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}
.info-subcard {
    background: white;
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(255, 152, 0, 0.05);
}
.info-subcard h4 {
    font-size: 14px;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.info-subcard h4 i {
    color: var(--primary);
}

/* 電子收據樣式 (Receipt Printable) */
.receipt-card {
    background: white;
    border: 2px solid #475569;
    padding: 32px;
    border-radius: 8px;
    font-family: 'Noto Sans TC', sans-serif;
    color: black;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    max-width: 550px;
    margin: 0 auto;
    position: relative;
}
.receipt-card::before {
    content: "PBC RECEIPT";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-30deg);
    font-size: 40px;
    font-weight: 900;
    color: rgba(255, 152, 0, 0.05);
    letter-spacing: 5px;
    pointer-events: none;
}
.receipt-header {
    text-align: center;
    border-bottom: 2px solid black;
    padding-bottom: 16px;
    margin-bottom: 20px;
}
.receipt-header h2 {
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 1px;
}
.receipt-header p {
    font-size: 11px;
    color: #475569;
}
.receipt-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    margin-bottom: 16px;
}
.receipt-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}
.receipt-table th, .receipt-table td {
    border: 1px solid black;
    padding: 8px 12px;
    font-size: 13px;
    text-align: left;
}
.receipt-table th {
    background-color: #F8FAFC;
}
.receipt-stamp {
    display: flex;
    justify-content: flex-end;
    margin-top: 16px;
}
.stamp-box {
    border: 2px solid var(--accent-red);
    color: var(--accent-red);
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 900;
    text-align: center;
    transform: rotate(-5deg);
}

/* 藍星金流支付頁面樣式 */
.newebpay-body {
    background: #F1F5F9;
    padding: 20px;
    border-radius: var(--radius-md);
    border: 1px solid #CBD5E1;
}
.newebpay-logo {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 20px;
    color: #1E3A8A;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 16px;
}
.newebpay-logo span {
    color: var(--primary);
}
.newebpay-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px dashed #CBD5E1;
}

/* 表格共用樣式 */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    border: 1px solid #E2E8F0;
}
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    text-align: left;
}
th, td {
    padding: 12px 16px;
    border-bottom: 1px solid #E2E8F0;
}
th {
    background-color: #F8FAFC;
    font-weight: 800;
    color: var(--text-main);
}
tr:last-child td {
    border-bottom: none;
}
.status-badge {
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
    display: inline-block;
}
.status-paid {
    background: #DCFCE7;
    color: #16A34A;
}
.status-pending {
    background: #FEF9C3;
    color: #CA8A04;
}
.status-filed {
    background: #DBEAFE;
    color: #2563EB;
}

/* 響應式佈局適配 */
@media (max-width: 992px) {
    .hero-container, .about-grid, .donation-wrapper {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }
    .hero-content h2 {
        font-size: 38px;
    }
    .hero-cta {
        justify-content: center;
    }
    .about-img-frame {
        max-width: 500px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    nav {
        display: none; /* 手機端收合 */
    }
    .menu-btn {
        display: block;
    }
    .hero {
        min-height: auto; /* 移除強制的 90vh，避免小螢幕產生巨大空白 */
        padding: 100px 16px 40px;
        display: block; /* 改為 block 以讓內容靠頂部排列，不被 flex 置中推下 */
    }
    .event-container, .gathering-grid, .info-grid {
        grid-template-columns: 1fr;
    }
    .live-banner {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }
    .form-grid {
        grid-template-columns: 1fr;
    }
    .form-group-full {
        grid-column: span 1;
    }
    .footer-container {
        grid-template-columns: 1fr; /* 頁尾四欄改為垂直單欄堆疊，避免窄螢幕擠壓字體 */
        gap: 36px;
    }
    .footer-bottom {
        flex-direction: column; /* 頁尾版權資訊改為垂直排列 */
        gap: 12px;
        text-align: center;
    }
}

/* 針對 iPhone 4 與小解析度手機 (<= 480px / 320px) 極致縮放適配 */
@media (max-width: 480px) {
    header {
        height: 70px;
    }
    .nav-container {
        padding: 0 12px;
    }
    .brand-logo-svg {
        width: 36px;
        height: 36px;
    }
    .brand-text h1 {
        font-size: 14px;
    }
    .brand-text p {
        font-size: 9px;
        display: none; /* 隱藏副標以騰出寬度 */
    }
    .nav-actions {
        gap: 8px;
    }
    .lang-toggle {
        padding: 6px 8px;
        font-size: 11px;
    }
    #member-btn {
        padding: 8px 10px;
    }
    #member-btn span {
        display: none; /* 小螢幕僅顯示頭像/圖示，省去文字空間 */
    }
    
    .hero {
        padding: 90px 12px 30px; /* 大幅降低頂部內襯，貼緊導覽列 */
    }
    .hero-content h2 {
        font-size: 26px;
    }
    .hero-content p {
        font-size: 14px;
    }
    .hero-logo-large {
        width: 200px;
        height: 200px;
        margin: 24px auto 0; /* 置中並緊隨按鈕後方 */
    }

    .section-title {
        margin-bottom: 30px;
    }
    .section-title h2 {
        font-size: 26px;
    }

    .about-stats {
        grid-template-columns: 1fr; /* 三個數據小卡改為垂直排列 */
        gap: 12px;
    }
    
    .event-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        text-align: center;
    }
    
    .donation-section {
        padding: 30px 16px;
    }
    .donation-box {
        padding: 20px 16px;
    }

    /* 會友中心大面板小螢幕適配 */
    .portal-drawer {
        max-width: 100%;
    }
    .portal-header {
        padding: 16px;
    }
    .portal-body {
        padding: 16px;
    }
    .portal-tabs {
        overflow-x: auto;
        white-space: nowrap;
        flex-wrap: nowrap;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
    }
    .portal-tabs::-webkit-scrollbar {
        height: 4px;
    }
    .portal-tabs::-webkit-scrollbar-thumb {
        background: var(--primary);
        border-radius: 2px;
    }
    .tab-btn {
        padding: 6px 12px;
        font-size: 12px;
        flex-shrink: 0;
    }

    /* Modals 彈窗小螢幕適配 */
    .modal-overlay {
        padding: 12px;
    }
    .modal-body {
        padding: 16px;
    }
    .receipt-card {
        padding: 16px;
        border-width: 1px;
    }
    .receipt-card::before {
        font-size: 28px;
    }
    .receipt-header h2 {
        font-size: 18px;
    }
    .receipt-table th, .receipt-table td {
        padding: 6px 8px;
        font-size: 12px;
    }
}

/* 針對極端小螢幕 (如 iPhone 4 的 320px 寬度) 微調 */
@media (max-width: 320px) {
    .brand-text h1 {
        font-size: 12px; /* 更小的標題字型 */
    }
    .hero-logo-large {
        width: 160px;
        height: 160px;
    }
    .hero-content h2 {
        font-size: 20px;
    }
    .receipt-header h2 {
        font-size: 16px;
    }
    .stamp-box {
        padding: 4px 8px;
        font-size: 10px;
    }
}

/* 針對大型裝置、2K、4K 及高解析度螢幕自適應等比例放大，避免大螢幕下字體顯得過小或空白過多 */
@media (min-width: 1400px) {
    :root {
        --radius-lg: 24px;
        --radius-md: 16px;
    }
    body {
        font-size: 17px;
    }
    .nav-container, .footer-container {
        max-width: 1350px;
    }
    section {
        max-width: 1350px;
        padding: 110px 24px;
    }
    .brand-text h1 { font-size: 22px; }
    .brand-text p { font-size: 13px; }
    .nav-link { font-size: 17px; }
    .btn { font-size: 16px; }
    .hero-content h2 { font-size: 56px; }
    .hero-content p { font-size: 20px; max-width: 750px; }
    .hero-logo-large { width: 380px; height: 380px; }
    .section-title h2 { font-size: 44px; }
    .section-title p { font-size: 17px; max-width: 750px; }
    .about-text h3 { font-size: 32px; }
    .about-text p { font-size: 17px; }
    .card-title h3 { font-size: 22px; }
    .detail-item { font-size: 15px; }
    .event-content h3 { font-size: 24px; }
    .event-content p { font-size: 15px; }
    .price-val { font-size: 20px; }
    .donation-info h3 { font-size: 32px; }
    .donation-info p { font-size: 17px; }
    .input-control { font-size: 16px; padding: 12px 16px; }
    .footer-brand h2 { font-size: 22px; }
    .footer-col h4 { font-size: 17px; }
}

@media (min-width: 1800px) {
    :root {
        --radius-lg: 28px;
        --radius-md: 18px;
    }
    body {
        font-size: 19px;
    }
    .nav-container, .footer-container {
        max-width: 1600px;
    }
    section {
        max-width: 1600px;
        padding: 130px 24px;
    }
    .brand-text h1 { font-size: 24px; }
    .nav-link { font-size: 19px; }
    .btn { font-size: 18px; padding: 12px 24px; }
    .hero-content h2 { font-size: 68px; }
    .hero-content p { font-size: 22px; max-width: 850px; }
    .hero-logo-large { width: 440px; height: 440px; }
    .section-title h2 { font-size: 50px; }
    .section-title p { font-size: 19px; }
    .about-text h3 { font-size: 38px; }
    .about-text p { font-size: 19px; }
    .card-title h3 { font-size: 26px; }
    .event-content h3 { font-size: 28px; }
    .price-val { font-size: 24px; }
    .donation-info h3 { font-size: 38px; }
    .donation-info p { font-size: 19px; }
    .footer-brand h2 { font-size: 24px; }
}

/* 最新消息公告 (Announcements Section) */
.announcements-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-top: 20px;
}
.announcement-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    border: 1px solid rgba(0,0,0,0.02);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.announcement-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.06);
}
.announcement-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.announcement-category {
    font-size: 11px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.announcement-category.worship {
    color: #E63946;
    background: rgba(230, 57, 70, 0.08);
}
.announcement-category.event {
    color: #F59E0B;
    background: rgba(245, 158, 11, 0.08);
}
.announcement-category.news, .announcement-category.general {
    color: var(--primary);
    background: rgba(0, 168, 150, 0.08);
}
.announcement-pinned {
    background: #E63946;
    color: white;
    font-size: 10px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.announcement-title {
    font-size: 19px;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 10px;
    line-height: 1.4;
}
.announcement-content {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}
.announcement-date {
    font-size: 12px;
    color: var(--text-muted);
    border-top: 1px solid #F1F5F9;
    padding-top: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* 新朋友專區 (Newcomer Guide Section) */
.newcomer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
    margin-top: 32px;
}
.newcomer-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-card);
    text-align: center;
    border: 1px solid rgba(0,0,0,0.02);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.newcomer-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.06);
}
.newcomer-card h3 {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 12px;
}
.newcomer-card p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* 代禱與見證牆 (Testimony Section) */
.witness-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 32px;
    margin-top: 32px;
}
.witness-bubble {
    background: white;
    border-radius: var(--radius-lg);
    padding: 36px;
    box-shadow: var(--shadow-card);
    position: relative;
    border: 1px solid rgba(255, 152, 0, 0.08);
}
.witness-quote {
    font-size: 64px;
    color: rgba(255, 152, 0, 0.15);
    font-family: Georgia, serif;
    position: absolute;
    top: 10px;
    left: 20px;
    line-height: 1;
}
.witness-text {
    font-size: 15px;
    color: var(--text-main);
    line-height: 1.8;
    position: relative;
    z-index: 1;
    margin-bottom: 20px;
}
.witness-author {
    font-size: 13px;
    color: var(--text-muted);
    text-align: right;
    border-top: 1px dashed #F1F5F9;
    padding-top: 12px;
}


