/* =========================================
   1. 全域變數與基礎設定
   ========================================= */
:root {
    --primary-color: #1f3c55;    /* 深藍主色 */
    --secondary-color: #3b5c6b;  /* 淺藍色 (Hover用) */
    --bg-color: #f2f7f9;         /* 背景淡藍色 */
    --text-main: #333333;        /* 一般內文 */
    --text-muted: #6b7c88;       /* 輔助文字 */
    --border-color: #e7eef2;     /* 分隔線/邊框 */
    --card-bg: #ffffff;          /* 卡片底色 */
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.05); /* 統一陰影 */
    --radius: 20px;              /* 統一圓角 */
}

* { box-sizing: border-box; }

body {
    margin: 0;
    /* 統一使用無襯線字體，長文可套用 Noto Serif TC */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans TC", sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* 主容器：限制最大寬度並置中 */
.container, main.page {
    flex: 1;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 40px 100px;
}

/* =========================================
   2. 標題與文字樣式
   ========================================= */
h2 {
    color: var(--primary-color);
    margin: 80px 0 30px 0; /* 統一推開上方 80px */
    position: relative;
    padding-left: 20px;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* 頁面第一個標題不需要上方間距 */
.container h2:first-of-type, 
main.page h2:first-of-type {
    margin-top: 10px;
}

h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 4px;
    width: 6px;
    height: 26px;
    border-radius: 10px;
    background-color: var(--primary-color);
}

p {
    margin-bottom: 1.2em;
    text-align: justify;
}

/* =========================================
   3. 區塊卡片與面板 (Section Card)
   ========================================= */
.section-card, .panel, .form-container {
    background-color: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 40px;
}

/* 表單專用容器 */
.form-container {
    width: min(720px, 92vw);
    margin: 54px auto;
    padding: 44px;
}

/* =========================================
   4. 按鈕與連結
   ========================================= */
.btn-link, button[type="submit"] {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 12px 45px;
    text-decoration: none;
    border: none;
    border-radius: 30px;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(31, 60, 85, 0.2);
}

.btn-link:hover, button[type="submit"]:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(31, 60, 85, 0.3);
}

/* =========================================
   5. 表單元件 (Input/Radio)
   ========================================= */
label { display: block; font-size: 18px; color: var(--primary-color); margin: 16px 2px 10px; }

input[type="text"], input[type="email"], input[type="password"], 
input[type="number"], select {
    width: 100%;
    padding: 14px 16px;
    margin: 0 0 22px 0;
    border-radius: 10px;
    border: 1px solid #c9d6de;
    font-size: 18px;
    background: #fff;
    transition: border-color 0.2s;
}

input:focus { border-color: var(--primary-color); outline: none; }

/* 註冊頁面的 Radio Item */
.radio-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; border: 1px solid #d7e3ea;
    border-radius: 10px; background: #fafcfe;
    transition: all 0.2s; cursor: pointer;
}
.radio-item:hover { border-color: var(--primary-color); }

/* =========================================
   6. 輪播與圖片網格 (首頁/活動花絮)
   ========================================= */
.photo-slideshow, .tile {
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.tile img {
    transition: transform 0.35s ease;
}
.tile:hover img { transform: scale(1.05); }

/* =========================================
   7. 響應式佈局 (RWD)
   ========================================= */
@media (max-width: 768px) {
    .container, main.page { padding: 20px; }
    h2 { margin-top: 60px; font-size: 22px; }
    .form-container { padding: 25px; }
    
    /* 首頁目標願景自動切換 */
    .goal-layout { flex-direction: column-reverse; }
    .photo-sidebar { position: static !important; width: 100% !important; }
}