/* 
 * 國際扶輪3482地區 社友職業資料庫 - 全站視覺與 UI/UX 樣式檔 
 * 參考展覽黃頁風 (fair.acd.com.tw) 升級為扶輪尊榮藍金視覺
 */

:root {
    --rotary-blue: #162F4D;
    --rotary-blue-light: #1E3E62;
    --rotary-blue-dark: #0B192C;
    --rotary-gold: #F7941E;
    --rotary-gold-hover: #E67E22;
    --rotary-gold-light: #FFF5EC;
    --text-primary: #0F172A;
    --text-secondary: #475569;
    --bg-light: #F8FAFC;
    --bg-white: #FFFFFF;
    --card-shadow: 0 10px 25px -5px rgba(11, 25, 44, 0.08), 0 8px 10px -6px rgba(11, 25, 44, 0.04);
    --hover-shadow: 0 20px 35px -10px rgba(247, 148, 30, 0.25);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --font-main: 'Noto Sans TC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* 活潑 Keyframe 動畫 */
@keyframes floatAnim {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-8px) rotate(2deg); }
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 15px rgba(247, 148, 30, 0.4); }
    50% { box-shadow: 0 0 30px rgba(247, 148, 30, 0.8); }
}

@keyframes spinSlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes waveMove {
    0% { transform: translateX(0) translateZ(0) scaleY(1); }
    50% { transform: translateX(-25%) translateZ(0) scaleY(1.05); }
    100% { transform: translateX(-50%) translateZ(0) scaleY(1); }
}

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

/* 無障礙：整體字級微升（rem 基準），鍵盤焦點可視 */
html {
    font-size: 17px;
}

:focus-visible {
    outline: 3px solid rgba(247, 148, 30, 0.75);
    outline-offset: 2px;
    border-radius: 4px;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-light);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--rotary-blue);
    text-decoration: none;
    transition: all 0.25s ease;
}

a:hover {
    color: var(--rotary-gold-hover);
}

/* --- 導覽列 Nav Bar --- */
.navbar {
    background: rgba(11, 25, 44, 0.96);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    border-bottom: 3px solid var(--rotary-gold);
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0.8rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #FFF;
    font-weight: 700;
    font-size: 1.25rem;
}

.nav-logo img {
    height: 44px;
    width: auto;
}

.nav-logo span {
    display: block;
    font-size: 0.75rem;
    color: var(--rotary-gold);
    font-weight: 400;
    letter-spacing: 1px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    list-style: none;
}

.nav-link {
    color: rgba(255, 255, 255, 0.88);
    font-weight: 500;
    padding: 0.5rem 0.8rem;
    border-radius: var(--radius-sm);
}

.nav-link:hover, .nav-link.active {
    color: #FFF;
    background: rgba(255, 255, 255, 0.15);
}

.nav-btn-cta {
    background: linear-gradient(135deg, var(--rotary-gold), #E67E22);
    color: #000 !important;
    font-weight: 700 !important;
    padding: 0.5rem 1.2rem !important;
    border-radius: 50px !important;
    box-shadow: 0 4px 12px rgba(247, 148, 30, 0.4);
}

.nav-btn-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(247, 148, 30, 0.6);
}

.hamburger {
    display: none;
    cursor: pointer;
    color: #FFF;
    font-size: 1.5rem;
}

/* --- Hero 頂部 Banner 區塊 (參考展覽頁彩帶與亮點) --- */
.hero-section {
    position: relative;
    background: linear-gradient(135deg, #0B192C 0%, #162F4D 55%, #1E3E62 100%);
    color: #FFF;
    padding: 4rem 1.5rem 5rem;
    overflow: hidden;
}

.hero-ribbons {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.hero-container {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 3rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-tag {
    display: inline-block;
    background: rgba(212, 175, 55, 0.2);
    border: 1px solid var(--rotary-gold);
    color: var(--rotary-gold);
    padding: 0.35rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.hero-title {
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #FFFFFF 60%, var(--rotary-gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 2rem;
    max-width: 600px;
}

/* 頂部搜尋搜尋引擎卡片 */
.hero-search-box {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 0.6rem;
    border-radius: var(--radius-lg);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
    display: flex;
    gap: 0.5rem;
    border: 2px solid var(--rotary-gold);
}

.hero-search-box input {
    flex: 1;
    border: none;
    outline: none;
    padding: 0.8rem 1.2rem;
    font-size: 1.05rem;
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--text-primary);
}

.hero-search-box button {
    background: linear-gradient(135deg, var(--rotary-blue), var(--rotary-blue-light));
    color: #FFF;
    border: none;
    padding: 0.8rem 1.8rem;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.hero-search-box button:hover {
    background: linear-gradient(135deg, var(--rotary-gold), #F39C12);
    color: #000;
}

/* 熱門分類標籤 */
.popular-tags {
    margin-top: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    font-size: 0.85rem;
}

.popular-tags span {
    color: rgba(255, 255, 255, 0.7);
}

.tag-item {
    background: rgba(255, 255, 255, 0.15);
    color: #FFF;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    transition: all 0.2s ease;
}

.tag-item:hover {
    background: var(--rotary-gold);
    color: #000;
}

/* 展覽統計數據列 (Stats Bar) */
.stats-bar {
    max-width: 1280px;
    margin: -2.5rem auto 3rem;
    background: #FFF;
    border-radius: var(--radius-lg);
    padding: 1.5rem 2rem;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    box-shadow: var(--card-shadow);
    position: relative;
    z-index: 10;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.stat-item {
    text-align: center;
    border-right: 1px solid #E2E8F0;
}

.stat-item:last-child {
    border-right: none;
}

.stat-number {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--rotary-blue);
    line-height: 1;
    margin-bottom: 0.3rem;
}

.stat-number span {
    color: var(--rotary-gold-hover);
    font-size: 1.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* --- 主要內容區容器 --- */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem 4rem;
    width: 100%;
}

.section-header {
    margin-bottom: 2rem;
    text-align: center;
}

.section-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--rotary-blue-dark);
    margin-bottom: 0.5rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 4px;
    background: var(--rotary-gold);
    margin: 8px auto 0;
    border-radius: 2px;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.05rem;
}

/* --- 職業分類 Grid 卡片與繽紛色彩 --- */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3.5rem;
}

.category-card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--card-shadow);
    transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.category-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0,0,0,0.12);
    border-color: var(--rotary-gold);
}

.category-icon {
    width: 68px;
    height: 68px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 1rem;
    transition: all 0.4s ease;
    box-shadow: 0 8px 15px rgba(0,0,0,0.08);
}

.category-card:hover .category-icon {
    transform: rotate(10deg) scale(1.1);
}

/* 10大活潑亮彩圖示主題 */
.cat-bg-1 { background: linear-gradient(135deg, #3B82F6, #1D4ED8); color: #FFF; }
.cat-bg-2 { background: linear-gradient(135deg, #10B981, #047857); color: #FFF; }
.cat-bg-3 { background: linear-gradient(135deg, #F59E0B, #D97706); color: #FFF; }
.cat-bg-4 { background: linear-gradient(135deg, #EC4899, #BE185D); color: #FFF; }
.cat-bg-5 { background: linear-gradient(135deg, #8B5CF6, #6D28D9); color: #FFF; }
.cat-bg-6 { background: linear-gradient(135deg, #06B6D4, #0E7490); color: #FFF; }
.cat-bg-7 { background: linear-gradient(135deg, #EF4444, #B91C1C); color: #FFF; }
.cat-bg-8 { background: linear-gradient(135deg, #F7941E, #E67E22); color: #FFF; }
.cat-bg-9 { background: linear-gradient(135deg, #14B8A6, #0D9488); color: #FFF; }
.cat-bg-10 { background: linear-gradient(135deg, #6366F1, #4338CA); color: #FFF; }

/* 活潑徽章 (無浮動) */
.floating-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    color: #FFF;
    font-weight: 700;
    font-size: 0.85rem;
}

.category-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
}

.category-count {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* --- 社友職業卡片 (Directory Cards) --- */
.controls-bar {
    background: #FFF;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--card-shadow);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.filter-select {
    padding: 0.5rem 1rem;
    border: 1px solid #CBD5E1;
    border-radius: var(--radius-sm);
    outline: none;
    font-size: 0.95rem;
    background: #FFF;
    color: var(--text-primary);
}

.view-toggle {
    display: flex;
    gap: 0.3rem;
    background: #F1F5F9;
    padding: 0.25rem;
    border-radius: var(--radius-sm);
}

.view-btn {
    border: none;
    background: transparent;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    color: var(--text-secondary);
}

.view-btn.active {
    background: #FFF;
    color: var(--rotary-blue);
    font-weight: 700;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Cards Grid */
.members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 1.8rem;
}

.member-card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    border: 1px solid #E2E8F0;
    display: flex;
    flex-direction: column;
}

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

.card-header {
    background: linear-gradient(135deg, #0B192C, #1E3E62);
    color: #FFF;
    padding: 1.25rem 1.5rem;
    display: flex;
    gap: 1rem;
    align-items: center;
    position: relative;
}

.card-avatar {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--rotary-gold);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.card-info {
    flex: 1;
}

.card-name {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.2;
}

.card-nickname {
    font-size: 0.85rem;
    color: var(--rotary-gold);
}

.card-club {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.85);
    margin-top: 0.3rem;
}

.card-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.card-meta-item {
    font-size: 0.95rem;
    display: flex;
    gap: 0.5rem;
}

.card-meta-item strong {
    color: var(--rotary-blue);
    min-width: 80px;
}

.badge-group {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-top: 0.3rem;
}

.badge {
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    border-radius: 50px;
    font-weight: 600;
}

.badge-speaker { background: #E0F2FE; color: #0369A1; }
.badge-consultant { background: #FEF3C7; color: #B45309; }
.badge-exhibitor { background: #DCFCE7; color: #15803D; }
.badge-member { background: #F1F5F9; color: #475569; }

.card-footer {
    padding: 1rem 1.5rem;
    background: #F8FAFC;
    border-top: 1px solid #F1F5F9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-detail {
    background: var(--rotary-blue);
    color: #FFF;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-detail:hover {
    background: var(--rotary-gold-hover);
    color: #000;
}

/* --- List View 系統性高易讀性列表排版 --- */
.members-list-view {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.members-list-view .member-card {
    flex-direction: row;
    align-items: stretch;
    background: #FFF;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid #E2E8F0;
    transition: all 0.3s ease;
    min-height: 150px;
}

.members-list-view .member-card:hover {
    transform: translateX(6px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-color: var(--rotary-gold);
}

/* 左側社友頭像與身分欄 */
.members-list-view .card-header {
    width: 240px;
    flex-shrink: 0;
    background: linear-gradient(135deg, #0B192C, #1E3E62);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.members-list-view .card-avatar {
    width: 64px;
    height: 64px;
    margin-bottom: 0.5rem;
}

.members-list-view .card-name {
    font-size: 1.15rem;
    font-weight: 800;
}

.members-list-view .card-club {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.85);
    margin-top: 0.2rem;
}

/* 中間主要資訊欄位 (公司、職業條目、服務資源) */
.members-list-view .card-body {
    flex: 1;
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.6rem;
    border-right: 1px solid #F1F5F9;
}

.members-list-view .card-meta-item {
    font-size: 0.92rem;
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    line-height: 1.5;
}

.members-list-view .card-meta-item strong {
    color: var(--rotary-blue-light);
    font-weight: 700;
    min-width: 100px;
    flex-shrink: 0;
    font-size: 0.88rem;
}

/* 右側操作按鈕與意願標籤欄 */
.members-list-view .card-footer {
    width: 200px;
    flex-shrink: 0;
    padding: 1.25rem;
    background: #F8FAFC;
    border-top: none;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: stretch;
    gap: 0.8rem;
}

.members-list-view .badge-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    align-items: flex-start;
}

.members-list-view .btn-detail {
    width: 100%;
    text-align: center;
    justify-content: center;
    padding: 0.6rem 0.8rem;
    font-size: 0.88rem;
    box-shadow: 0 4px 10px rgba(0, 36, 107, 0.15);
}

/* 列表模式 RWD 適應 */
@media (max-width: 868px) {
    .members-list-view .member-card {
        flex-direction: column;
    }
    .members-list-view .card-header {
        width: 100%;
        border-radius: var(--radius-md) var(--radius-md) 0 0;
        flex-direction: row;
        text-align: left;
        gap: 1rem;
    }
    .members-list-view .card-avatar {
        margin-bottom: 0;
    }
    .members-list-view .card-footer {
        width: 100%;
        flex-direction: row;
        align-items: center;
        border-radius: 0 0 var(--radius-md) var(--radius-md);
    }
    .members-list-view .badge-group {
        flex-direction: row;
    }
}

/* Modal 彈窗樣式 */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.modal-backdrop.active {
    display: flex;
}

.modal-card {
    background: #FFF;
    width: 100%;
    max-width: 750px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.3);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: modalPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalPop {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.modal-header {
    background: linear-gradient(135deg, #0B192C, #1E3E62);
    color: #FFF;
    padding: 1.5rem 2rem;
    position: relative;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.modal-close {
    position: absolute;
    top: 1.2rem;
    right: 1.5rem;
    background: rgba(255, 255, 255, 0.2);
    color: #FFF;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
}

.modal-body {
    padding: 2rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.detail-block {
    background: #F8FAFC;
    padding: 1.2rem 1.5rem;
    border-radius: var(--radius-md);
    border-left: 4px solid var(--rotary-gold);
}

.detail-block h4 {
    color: var(--rotary-blue);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.modal-footer {
    padding: 1rem 2rem;
    background: #F1F5F9;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* Footer */
.footer {
    background: var(--rotary-blue-dark);
    color: rgba(255, 255, 255, 0.7);
    padding: 3rem 1.5rem 1.5rem;
    margin-top: auto;
    border-top: 4px solid var(--rotary-gold);
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2.5rem;
    margin-bottom: 2rem;
}

.footer-brand h3 {
    color: #FFF;
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.85rem;
}

/* RWD */
@media (max-width: 992px) {
    .hero-container {
        grid-template-columns: 1fr;
    }
    .stats-bar {
        grid-template-columns: repeat(2, 1fr);
    }
    .stat-item:nth-child(2) {
        border-right: none;
    }
    .footer-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0.2rem;
        background: rgba(11, 25, 44, 0.98);
        padding: 0.8rem 1.2rem 1.2rem;
        border-bottom: 3px solid var(--rotary-gold);
        box-shadow: 0 15px 25px rgba(0, 0, 0, 0.35);
    }
    .nav-menu.active {
        display: flex;
    }
    .nav-menu .nav-link {
        display: block;
        padding: 0.85rem 1rem;
    }
    .nav-menu .nav-btn-cta {
        display: block;
        text-align: center;
        margin-top: 0.5rem;
    }
    .hamburger {
        display: block;
        padding: 0.4rem 0.6rem;
    }
    .hero-title {
        font-size: 2rem;
    }
    .stats-bar {
        grid-template-columns: 1fr;
    }
    .stat-item {
        border-right: none;
        border-bottom: 1px solid #E2E8F0;
        padding-bottom: 1rem;
    }
    .members-grid {
        grid-template-columns: 1fr;
    }
}

/* --- 共用頁面標頭 (Page Hero) --- */
.page-hero {
    background: linear-gradient(135deg, #0B192C, #1E3E62);
    color: #FFF;
    padding: 2.5rem 1.5rem;
}

.page-hero-inner {
    max-width: 1280px;
    margin: 0 auto;
}

.page-hero h1 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.page-hero p {
    opacity: 0.9;
}

/* --- 共用訊息框 (Alerts) --- */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    margin-bottom: 2rem;
    font-weight: 700;
    border: 1px solid transparent;
}

.alert-success {
    background: #DEF7EC;
    border-color: #31C48D;
    color: #03543F;
}

.alert-error {
    background: #FDE8E8;
    border-color: #F98080;
    color: #9B1C1C;
}

/* --- 共用表單元件 --- */
.form-label {
    display: block;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.form-control {
    width: 100%;
    padding: 0.65rem 0.9rem;
    border: 1px solid #CBD5E1;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    background: #FFF;
    color: var(--text-primary);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
    border-color: var(--rotary-blue-light);
    box-shadow: 0 0 0 3px rgba(30, 62, 98, 0.15);
}

/* --- 分頁 (Pagination) --- */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.4rem;
    margin-top: 2.5rem;
    flex-wrap: wrap;
}

.page-link {
    min-width: 42px;
    padding: 0.5rem 0.9rem;
    text-align: center;
    background: #FFF;
    border: 1px solid #E2E8F0;
    border-radius: var(--radius-sm);
    font-weight: 600;
    color: var(--text-primary);
}

.page-link:hover {
    border-color: var(--rotary-gold);
    color: var(--rotary-gold-hover);
}

.page-link.current {
    background: var(--rotary-blue);
    color: #FFF;
    border-color: var(--rotary-blue);
    pointer-events: none;
}

.page-link.disabled {
    opacity: 0.45;
    pointer-events: none;
}

/* --- 三步驟登錄精靈 (Register Wizard) --- */
.wizard-progress {
    display: flex;
    justify-content: center;
    gap: 0;
    margin-bottom: 2rem;
}

.wizard-step-ind {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0 1rem;
    color: #94A3B8;
    font-weight: 700;
    font-size: 0.92rem;
    position: relative;
}

.wizard-step-ind .step-dot {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #E2E8F0;
    color: #64748B;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.wizard-step-ind.active {
    color: var(--rotary-blue);
}

.wizard-step-ind.active .step-dot {
    background: var(--rotary-blue);
    color: #FFF;
    box-shadow: 0 0 0 4px rgba(30, 62, 98, 0.15);
}

.wizard-step-ind.done .step-dot {
    background: #10B981;
    color: #FFF;
}

.form-step {
    display: none;
}

.form-step.active {
    display: block;
    animation: stepFadeIn 0.3s ease;
}

@keyframes stepFadeIn {
    from { opacity: 0; transform: translateX(12px); }
    to { opacity: 1; transform: translateX(0); }
}

.wizard-nav {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
    border-top: 1px solid #E2E8F0;
    padding-top: 1.5rem;
}

/* --- Modal 開啟時鎖定背景捲動 --- */
body.modal-open {
    overflow: hidden;
}

/* --- 列印：只印出社友名片 Modal --- */
@media print {
    body.modal-open > *:not(#memberModal) {
        display: none !important;
    }
    body.modal-open {
        overflow: visible;
    }
    body.modal-open .modal-backdrop {
        position: static;
        display: block;
        width: auto;
        height: auto;
        background: none;
        backdrop-filter: none;
        padding: 0;
    }
    body.modal-open .modal-card {
        box-shadow: none;
        max-height: none;
        max-width: 100%;
        animation: none;
        border: 1px solid #CBD5E1;
    }
    body.modal-open .modal-header {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    body.modal-open .modal-body {
        overflow: visible;
    }
    body.modal-open .modal-footer,
    body.modal-open .modal-close {
        display: none !important;
    }
}
