/* ── index.php 專用樣式 ── */

/* ── CSS Variables ── */
:root {
    --brand: #A71E22;
    --brand-dark: #7A1316;
    --brand-light: #E8484D;
    --brand-bg: #FDF5F5;
    --brand-border: #F0D0D1;
    --text-dark: #222;
    --text-muted: #666;
    --card-shadow: 0 2px 8px rgba(167, 30, 34, 0.08);
    --card-hover: 0 4px 16px rgba(167, 30, 34, 0.15);
    --gradient-red: linear-gradient(135deg, #A71E22 0%, #c43136 100%);
    --gradient-bg: linear-gradient(135deg, #fdf2f2 0%, #f5f5f5 100%);
}

/* ── Reset / Base ── */
* { box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans TC", "Microsoft JhengHei", sans-serif;
    background: var(--gradient-bg);
    color: var(--text-dark);
    margin: 0;
    padding: 0 0px;
    min-height: 100vh;
    overflow-x: hidden;
}
.row {
    max-width: 1440px;
    margin: 0 auto;
}
.row-pad {
    padding: 3px 5px;
}
.sticky {
    width: 100%;
    max-width: 100%;
}
.sticky .top-bar {
    width: 100%;
    max-width: 100%;
}
a { color: #0058A5; text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }

/* ── 搜尋列 ── */
.search-section {
    background: #FFBF00;
    padding: 14px 16px;
    border-radius: 10px;
    margin: 6px 0 16px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.search-input {
    flex: 1;
    min-width: 180px;
    padding: 10px 14px;
    font-size: 14px;
    font-family: inherit;
    border: 1.5px solid #ddd;
    border-radius: 6px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    -webkit-appearance: none;
    appearance: none;
}
.search-input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(167, 30, 34, 0.12);
}
.search-btn {
    padding: 8px 22px;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    color: #fff !important;
    background: var(--gradient-red);
    border: 1.5px solid var(--brand);
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.25s, color 0.25s, transform 0.15s;
    box-shadow: 0 2px 6px rgba(167, 30, 34, 0.25);
}
.search-btn:hover {
    color: #333 !important;
    background: #fff;
    transform: translateY(-1px);
}
.search-note {
    width: 100%;
    margin: 6px 0 0;
    padding: 8px 12px;
    font-size: 88%;
    font-weight: 600;
    color: #991b1b;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 6px;
    line-height: 1.6;
}

/* ── 職務分類按鈕 ── */
.cat-section {
    background: #fff;
    border: 1px solid var(--brand-border);
    border-radius: 12px;
    padding: 6px 4px 10px;
    box-shadow: 0 2px 8px rgba(167, 30, 34, 0.06);
    margin-bottom: 16px;
}
.cat-section-title {
    text-align: center;
    padding: 6px 0 10px;
    font-size: 105%;
    font-weight: 700;
    color: var(--brand);
    border-bottom: 2px solid var(--brand-bg);
    margin: 0 0 8px;
    letter-spacing: 2px;
}
.cat-section-title i {
    margin-right: 6px;
    color: var(--brand-light);
}
.cat-group {
    padding: 2px 8px 6px;
    margin-bottom: 0;
}
.cat-group-label {
    display: block;
    font-size: 100%;
    font-weight: 700;
    color: var(--brand);
    margin-bottom: 6px;
    border-bottom: 1.5px solid var(--brand-border);
    padding: 4px 0 5px;
}
.cat-group-label i { margin-right: 6px; color: var(--brand-light); }
.cat-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding-top: 4px;
}
.cat-pill {
    display: inline-block;
    padding: 5px 12px;
    font-size: 88%;
    font-weight: 500;
    color: #555;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    transition: all 0.2s ease;
    text-decoration: none;
    line-height: 1.4;
}
.cat-pill:hover {
    color: #fff !important;
    background: var(--gradient-red);
    border-color: var(--brand);
    text-decoration: none;
    transform: translateY(-1px) scale(1.03);
    box-shadow: 0 3px 10px rgba(167, 30, 34, 0.25);
}

/* ── 收合展開 ── */
.cat-section .cat-body {
    max-height: 0 !important;
    overflow: hidden !important;
    transition: max-height 0.45s ease;
}
.cat-section .cat-body.expanded {
    max-height: 2000px !important;
}

/* ── 幻燈片 ── */
.slideshow-wrapper {
    margin-bottom: 20px;
}
.slideshow-wrapper img {
    width: 100%;
    border-radius: 10px;
}
#featured1 {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* ── 區塊標題 ── */
.section-title {
    font-size: 120%;
    font-weight: 700;
    padding-left: 6px;
    margin: 18px 0 10px;
    border-left: 4px solid var(--brand);
    padding-left: 12px;
}
.section-title.red { color: var(--brand); }
.section-title.green { color: #4E700E; border-color: #4E700E; }
.section-sub {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 8px 10px;
    margin: 0 0 10px;
    background: var(--brand-bg);
    border-radius: 8px;
    font-size: 95%;
}

/* ── 舊樣式保留（相容性：note, note2, note4 等） ── */
.note {
    background: #fff;
    margin: 5px 0;
    padding: 6px 4px;
    color: #333;
    font-size: 110%;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0 1px 1px 0 rgba(100,100,100,0.3);
}
.note h4 {
    padding: 0 12px;
    height: 50px;
    max-height: 51px;
    overflow: hidden;
    font-size: 120%;
    font-family: 'Noto Sans TC', sans-serif;
}
.note h4 a { color: #0058A5; font-weight: 400; }
.note2 {
    background: #fff;
    margin: 5px 2px;
    padding: 6px 4px;
    color: #333;
    font-size: 98%;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0 1px 1px 0 rgba(100,100,100,0.3);
}
.note4 {
    background: #fff;
    margin: 5px 0;
    padding: 5px 1px;
    font-size: 11pt;
    color: #222;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0 1px 1px 0 rgba(100,100,100,0.3);
}
.ha3 {
    background: url('images/0801905_s.png') no-repeat;
    padding-left: 53px;
    min-height: 46px;
}
.ha3 span { font-weight: 400; color: #444; font-size: 92%; }

/* ── 自訂 Grid ── */
.colx { margin: 0 -10px; }
.c1,.c2,.c3,.c4,.c5,.c6,.c7,.c8,.c9,.c10,.c11,.c1-5,.c1-8 {
    min-height: 1px;
    float: left;
    padding-left: 2px;
    padding-right: 2px;
    position: relative;
}
.c1{width:8.33%}.c2{width:16.66%}.c3{width:25%}.c4{width:33.33%}
.c5{width:41.66%}.c6{width:50%}.c7{width:58.33%}.c8{width:66.66%}
.c9{width:75%}.c10{width:83.33%}.c11{width:91.66%}.c12{width:100%;min-height:1px;float:left;position:relative}
.c1-5{width:20%}.c1-8{width:12.5%}
.c1.first,.c2.first,.c3.first,.c4.first,.c5.first,.c6.first,.c7.first,.c8.first,.c9.first,.c10.first,.c11.first,.c1-5.first,.c1-8.first { padding-left: 0; }
.c1.last,.c2.last,.c3.last,.c4.last,.c5.last,.c6.last,.c7.last,.c8.last,.c9.last,.c10.last,.c11.last,.c1-5.last,.c1-8.last { padding-right: 0; }
.cov {
    margin: 0;
    padding: 1px;
    font-weight: 600;
    font-size: 115%;
    height: 270px;
    max-height: 270px;
    overflow-y: hidden;
}
.cov img { width: 99%; max-width: 100%; border: 1px solid #fafafa; }
.smallc { min-height: 148px; max-height: 148px; overflow: hidden; }

/* ── Divider ── */
hr {
    border: 0;
    height: 3px;
    background: linear-gradient(to right, rgba(136,1,43,0), rgba(136,1,43,0.45), rgba(136,1,43,0));
}
hr.Slim {
    border: 0;
    height: 1px;
    background: linear-gradient(to right, rgba(136,1,43,0), rgba(136,1,43,0.45), rgba(136,1,43,0));
}

/* ── h2 裝飾 ── */
h2{font-family:'Noto Sans TC',sans-serif;color:var(--brand);font-weight:600;font-size:105%}
h4{font-family:'Noto Sans TC',sans-serif}
.ha2:before{content:url('images/newests.png');position:relative;z-index:3;padding-right:5px}
.stxt{color:#222}

/* ── 會員照片卡片 ── */
.unsealer-card img {
    float: right;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
}

/* ── 求職會員卡片 ── */
.member-card {
    background: #fff;
    border: 1px solid #f0d0d1;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(167, 30, 34, 0.08);
    overflow: hidden;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
    margin: 4px 2px;
}
.member-card:hover {
    box-shadow: 0 4px 16px rgba(167, 30, 34, 0.15);
    border-color: #E8484D;
}
.member-avatar {
    text-align: center;
    padding: 14px 8px 6px;
    background: linear-gradient(135deg, #fdf5f5 0%, #fff 100%);
    border-bottom: 1px solid #f0d0d1;
}
.member-avatar img {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    object-fit: cover;
    border: 2.5px solid #f0d0d1;
    transition: border-color 0.2s, transform 0.2s;
}
.member-card:hover .member-avatar img {
    border-color: #A71E22;
    transform: scale(1.05);
}
.member-body {
    padding: 8px 10px 10px;
    font-size: 90%;
    line-height: 1.7;
    min-height:140px;
}
.member-job {
    font-weight: 700;
    font-size: 100%;
    color: #7A1316;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.member-name a {
    color: #0058A5;
    font-weight: 600;
    text-decoration: none;
    font-size: 95%;
}
.member-name a:hover {
    text-decoration: underline;
}
.member-edu,
.member-age {
    font-size: 88%;
    color: #666;
}
.member-edu i,
.member-age i {
    width: 16px;
}

/* ── 職缺卡片 ── */
.agent-card {
    margin: 8px 4px;
    background: #fff;
    border: 1px solid var(--brand-border);
    border-radius: 10px;
    box-shadow: var(--card-shadow);
    overflow: hidden;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.agent-card:hover {
    box-shadow: var(--card-hover);
    border-color: var(--brand-light);
}
.agent-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 14px;
    background: var(--brand-bg);
    border-bottom: 1px solid var(--brand-border);
}
.agent-badge {
    display: inline-block;
    padding: 2px 10px;
    font-size: 82%;
    font-weight: 700;
    color: #fff;
    background: var(--brand);
    border-radius: 4px;
    letter-spacing: 1px;
}
.agent-date {
    font-size: 82%;
    color: var(--text-muted);
}
.agent-card-body {
    min-height: 200px;
    padding: 12px 14px 14px;
}
.agent-title {
    min-height: 36px;
    margin: 0 0 6px;
    font-family: 'Noto Sans TC', sans-serif;
    font-size: 115%;
    font-weight: 700;
    line-height: 1.4;
}
.agent-title a {
    color: var(--brand-dark);
    text-decoration: none;
}
.agent-title a:hover {
    color: var(--brand);
    text-decoration: underline;
}
.agent-company {
    font-size: 93%;
    color: var(--text-dark);
    margin-bottom: 8px;
}
.agent-company a {
    color: #0058A5;
    font-weight: 600;
    text-decoration: none;
}
.agent-company a:hover {
    text-decoration: underline;
}
.agent-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 8px;
    font-size: 90%;
    color: var(--text-muted);
}
.agent-meta-item i {
    color: var(--brand-light);
    width: 16px;
}
.agent-location {
    font-size: 90%;
    color: var(--text-muted);
    margin-bottom: 6px;
    line-height: 1.6;
}
.agent-location a {
    color: var(--brand);
    text-decoration: none;
    font-weight: 600;
}
.agent-location a:hover {
    text-decoration: underline;
}
.agent-hit {
    font-size: 88%;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 4px;
    display: inline-block;
    margin-top: 4px;
}
.agent-hit.hit-low { color: #555; background: #f5f5f5; }
.agent-hit.hit-mid { color: #E67E22; background: #FEF5E7; }
.agent-hit.hit-high { color: #C0392B; background: #FDEDEC; }
.agent-hit.hit-fire { color: #A71E22; background: #FDF5F5; }
.agent-hit.hit-blazing {
    color: #fff;
    background: linear-gradient(135deg, #E74C3C, #C0392B);
    animation: pulse-hot 1.5s infinite;
}
@keyframes pulse-hot {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.04); }
}

/* ── 首頁新聞列表 ── */
.home-news-list {
    padding: 4px 0;
}
.news-item {
    padding: 8px 4px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.15s;
}
.news-item:last-child {
    border-bottom: none;
}
.news-item:hover {
    background: #fafafa;
    border-radius: 4px;
}
.news-item-title {
    font-size: 100%;
    font-weight: 600;
    line-height: 1.5;
    margin-bottom: 2px;
}
.news-item-title i {
    margin-right: 6px;
    font-size: 90%;
}
.news-item-title a {
    color: #000;
    text-decoration: none;
}
.news-item-title a:hover {
    color: var(--brand);
    text-decoration: underline;
}
.news-item-summary {
    font-size: 90%;
    font-weight:400;
    color: #333;
    line-height: 1.5;
    padding-left: 18px;
}

/* ── RWD ── */
@media handheld, only screen and (max-width: 768px), only screen and (max-device-width: 768px) and (orientation: portrait) {
    .content { padding: 30px 2px; }
    .note h4 { height: 100%; font-size: 150%; }
    .note h4 a { color: #0058A5; font-weight: 600; }
    .c1,.c3,.c4,.c5,.c6,.c7,.c8,.c9,.c10,.c11,.c12,.c1-5,.c1-8 { width: 100%; margin: 0 0 20px; padding: 5px 1px; }
    .c2 { width: 49%; max-width: 49%; margin-right: 1px; margin-bottom: 10px; padding: 5px 1px; }
    .c1.first,.c2.first,.c3.first,.c4.first,.c5.first,.c6.first,.c7.first,.c8.first,.c9.first,.c10.first,.c11.first,.c1-5.first,.c1-8.first { padding-left: 1px; }
    blockquote { line-height: 110%; }
    .smallc { width: 100%; max-height: 90%; overflow: hidden; }
    .stxt { display: none; }
    .search-section { flex-direction: column; align-items: stretch; }
    .search-input { min-width: auto; }
    .agent-card-header {
        flex-direction: column;
        gap: 4px;
        text-align: center;
    }
}
