/* -------------------------------------------------------------
   台灣芬陀利迦學員服務中心 - 核心設計系統 (styles.css)
   理念：輕鬆快樂、溫暖平靜、留白呼吸感、流暢互動
------------------------------------------------------------- */

/* 變數定義 */
:root {
    --primary-color: #0A6323;
    --primary-light: #eef7f2;
    --secondary-color: #2ea44f;
    --body-bg: linear-gradient(135deg, #f5f7fb 0%, #fbf8f5 50%, #f6f9fc 100%);
    --card-bg: #ffffff;
    
    /* 溫和的狀態色彩 */
    --info-bg: #eef7fe;
    --info-border: #d2e9fc;
    --info-text: #1d4d74;
    
    --warning-bg: #fffbf0;
    --warning-border: #fbeec8;
    --warning-text: #72520f;
    
    --success-bg: #f1fbf6;
    --success-border: #cff4e1;
    --success-text: #1e5c3b;
    
    --danger-bg: #fff5f5;
    --danger-border: #ffe0e0;
    --danger-text: #962c2c;
    
    --purple-bg: #f9f5ff;
    --purple-border: #eedffa;
    --purple-text: #593196;

    --text-main: #3d405b;
    --text-muted: #81859c;
    
    --border-radius-lg: 20px;
    --border-radius-md: 12px;
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    
    --shadow-soft: 0 15px 40px rgba(10, 99, 35, 0.05);
    --shadow-hover: 0 25px 50px rgba(10, 99, 35, 0.12);
}

/* 全局樣式 */
body {
    font-family: 'Outfit', 'Noto Sans TC', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--body-bg);
    background-attachment: fixed;
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    letter-spacing: 0.03em;
    line-height: 1.8;
}

/* 導覽列優化 */
.navbar-custom {
    background-color: rgba(10, 99, 35, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition-smooth);
}

.logo-img {
    height: 42px;
    width: auto;
    object-fit: contain;
    transition: var(--transition-smooth);
}

.brand-text {
    font-family: 'Noto Sans TC', sans-serif;
    font-weight: 700;
    font-size: 1.25rem;
    color: #ffffff;
    letter-spacing: 0.05em;
}

/* 導覽列選單 */
.navbar-nav .nav-link {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    padding: 0.5rem 1.2rem !important;
    border-radius: 50px;
    margin: 0 0.2rem;
    transition: var(--transition-smooth);
}

.navbar-nav .nav-link:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.12);
}

.navbar-nav .nav-link.active-nav {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.22);
    font-weight: 600;
}

/* 主要標題與副標題 */
.main-title {
    font-weight: 700;
    font-size: 2.2rem;
    color: #2c2f49;
    letter-spacing: -0.02em;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    font-weight: 300;
}

.section-subtitle {
    font-weight: 700;
    font-size: 1.4rem;
    color: #2c2f49;
}

/* 客製化卡片元件 */
.card-custom {
    background: var(--card-bg);
    border-radius: var(--border-radius-lg);
    padding: 1.8rem 2.2rem;
    border: 1px solid #e2e8f0;
    box-shadow: var(--shadow-soft);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.card-custom:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

/* 圖示盒子 */
.icon-box {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
}

/* 五種狀態卡片的細緻樣式定義 */
.info-card {
    background: var(--info-bg);
    border-left: 5px solid #4a90e2;
}
.info-icon-box {
    background-color: #d8ecff;
    color: #4a90e2;
}
.info-title {
    color: var(--info-text);
    font-weight: 700;
}

.warning-card {
    background: var(--warning-bg);
    border-left: 5px solid #f39c12;
}
.warning-icon-box {
    background-color: #fef1cf;
    color: #f39c12;
}
.warning-title {
    color: var(--warning-text);
    font-weight: 700;
}

.success-card {
    background: var(--success-bg);
    border-left: 5px solid #2ecc71;
}
.success-icon-box {
    background-color: #dafbe8;
    color: #2ecc71;
}
.success-title {
    color: var(--success-text);
    font-weight: 700;
}

.danger-card {
    background: var(--danger-bg);
    border-left: 5px solid #e74c3c;
}
.danger-icon-box {
    background-color: #ffdada;
    color: #e74c3c;
}
.danger-title {
    color: var(--danger-text);
    font-weight: 700;
}

.purple-card {
    background: var(--purple-bg);
    border-left: 5px solid var(--primary-color);
}
.purple-icon-box {
    background-color: #e8dffc;
    color: var(--primary-color);
}
.purple-title {
    color: var(--purple-text);
    font-weight: 700;
}

/* 卡片文字排版 */
.card-title-text {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.card-desc {
    color: var(--text-main);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* 列表樣式 */
.custom-list {
    padding-left: 1.2rem;
    margin-bottom: 0;
    margin-top: 0.5rem;
}

.custom-list li {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    color: var(--text-main);
    position: relative;
    list-style-type: disc;
}

/* 卡片內高亮動作區 */
.alert-action-box {
    background-color: rgba(231, 76, 60, 0.08);
    border-radius: var(--border-radius-md);
    padding: 0.8rem 1.2rem;
    margin-top: 0.8rem;
    color: #c0392b;
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-block;
}

.highlight-box {
    background-color: rgba(255, 255, 255, 0.6);
    border-radius: var(--border-radius-md);
    padding: 0.8rem 1.2rem;
    margin-top: 0.8rem;
    font-size: 0.9rem;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

/* 按鈕美化 */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
    font-weight: 600;
    transition: var(--transition-smooth);
    padding: 0.8rem 2rem;
}

.btn-primary:hover, .btn-primary:focus {
    background: linear-gradient(135deg, #5b46e3 0%, var(--primary-color) 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(116, 93, 253, 0.3);
}

.btn-secondary {
    background-color: #fff;
    color: var(--text-main);
    border: 1px solid rgba(0, 0, 0, 0.08);
    font-weight: 600;
    transition: var(--transition-smooth);
    padding: 0.8rem 2rem;
}

.btn-secondary:hover {
    background-color: #fafbfc;
    color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
}

/* 2. 表單區塊設計 */
.form-card-wrapper {
    background: var(--card-bg);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-soft);
    border: 1px solid #e2e8f0;
    transition: var(--transition-smooth);
}

.form-label-custom {
    font-weight: 600;
    font-size: 0.95rem;
    color: #4a4d6b;
    margin-bottom: 0.6rem;
    display: block;
}

.input-group-custom {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.input-icon {
    position: absolute;
    left: 1rem;
    color: var(--text-muted);
    font-size: 1.1rem;
    z-index: 10;
    pointer-events: none;
}

.form-control-custom {
    width: 100%;
    padding: 0.9rem 1rem 0.9rem 2.8rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--text-main);
    background-color: #ffffff;
    border: 1px solid #b2bdc6;
    border-radius: var(--border-radius-md);
    transition: var(--transition-smooth);
}

/* 傳統單選按鈕 (Radio Button) 自訂 */
.radio-group-custom {
    width: 100%;
}

.form-check-input-custom {
    cursor: pointer;
    border: 2px solid #b2bdc6;
    width: 1.35rem;
    height: 1.35rem;
    margin-top: 0; /* 對齊 flex */
    transition: var(--transition-smooth);
}

.form-check-input-custom:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check-input-custom:focus {
    box-shadow: 0 0 0 4px rgba(10, 99, 35, 0.15);
    border-color: var(--primary-color);
}

.form-check-label-custom {
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-main);
    user-select: none;
    transition: var(--transition-smooth);
}

/* 點選時文字加粗，並切換至綠色主題 */
.form-check-input-custom:checked ~ .form-check-label-custom {
    color: var(--primary-color);
    font-weight: 600;
}

.form-control-custom:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(10, 99, 35, 0.12);
}

.textarea-custom {
    padding-left: 1.2rem;
    resize: none;
}

/* 表單內的小提醒框 */
.form-tips-box {
    background-color: rgba(10, 99, 35, 0.03);
    border-radius: var(--border-radius-md);
    padding: 1.2rem;
    border: 1px dashed rgba(10, 99, 35, 0.15);
    font-size: 0.88rem;
}

.invalid-feedback-custom {
    display: none;
    width: 100%;
    margin-top: 0.4rem;
    font-size: 0.85rem;
    color: #e74c3c;
    font-weight: 500;
    padding-left: 0.2rem;
}

/* 當輸入框不合法時的樣式 */
.form-control-custom.is-invalid-custom {
    border-color: #e74c3c;
    background-color: #fffbfa;
}

.form-control-custom.is-invalid-custom:focus {
    box-shadow: 0 0 0 4px rgba(231, 76, 60, 0.12);
}

/* 3. 成功畫面設計 */
.success-card-wrapper {
    background: var(--card-bg);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

/* 蓮花/打勾呼吸動畫 */
.success-animation-container {
    display: inline-flex;
    justify-content: center;
    align-items: center;
}

.lotus-pulse {
    width: 100px;
    height: 100px;
    background-color: rgba(46, 204, 113, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulseGlow 2.5s infinite ease-in-out;
}

.success-check-icon {
    font-size: 3.8rem;
    color: #2ecc71;
}

@keyframes pulseGlow {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.2);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 20px rgba(46, 204, 113, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(46, 204, 113, 0);
    }
}

/* SPA 頁面切換控制 (隱顯與過渡動畫) */
.view-section {
    display: none;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.view-section.active-view {
    display: block;
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 頁尾 */
.footer {
    border-top: 1px solid rgba(0, 0, 0, 0.03);
    background-color: rgba(255, 255, 255, 0.4);
}

.fs-7 {
    font-size: 0.85rem;
}

/* 響應式優化 */
@media (max-width: 768px) {
    .main-title {
        font-size: 1.8rem;
    }
    .card-custom {
        padding: 1.5rem;
    }
    .form-card-wrapper {
        padding: 1.8rem !important;
    }
    .lotus-pulse {
        width: 80px;
        height: 80px;
    }
    .success-check-icon {
        font-size: 3rem;
    }
}

/* 電子郵件與電話等英數輸入框字型優化，防範 0/o, t/+ 混淆 */
#input-email, #input-phone, #input-byear {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    letter-spacing: 0.05em;
}
