/* =============================================================
   最新消息 & 學員見證 Archive Pages — archive.css
   Prefix: .iparch-  .iptestimony-
   ============================================================= */

/* ── GP grid override ─────────────────────────────────────── */
#page,
#page.grid-container,
#content,
#content.grid-container,
#primary,
.content-area {
    display: block !important;
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    float: none !important;
}

/* ── Hero ──────────────────────────────────────────────────── */
.iparch-hero {
    position: relative;
    height: 200px;
    background: #0a1628 center / cover no-repeat;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.iparch-hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 22, 40, .52);
}
.iparch-hero-subtitle {
    position: relative;
    z-index: 1;
    color: rgba(255, 255, 255, .72);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: .12em;
    margin: 0 0 8px;
}
.iparch-hero-title {
    position: relative;
    z-index: 1;
    color: #ffffff;
    font-size: 42px;
    font-weight: 900;
    margin: 0;
    text-shadow: 0 2px 16px rgba(0, 0, 0, .5);
    letter-spacing: .04em;
}

/* ── Body layout ───────────────────────────────────────────── */
.iparch-body {
    background: #ffffff;
    padding: 48px 0 80px;
}
.iparch-wrap {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 32px;
    display: grid;
    grid-template-columns: 1fr 240px;
    gap: 48px;
    align-items: start;
}
.iparch-main { min-width: 0; }

/* ── News card (vertical) ──────────────────────────────────── */
.iparch-card {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    margin-bottom: 28px;
    transition: box-shadow .2s, transform .2s;
}
.iparch-card:hover {
    box-shadow: 0 8px 28px rgba(0, 0, 0, .1);
    transform: translateY(-2px);
}
.iparch-card-thumb {
    display: block;
    overflow: hidden;
}
.iparch-card-thumb img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    display: block;
    transition: transform .4s ease;
}
.iparch-card:hover .iparch-card-thumb img {
    transform: scale(1.04);
}
.iparch-card-body {
    padding: 24px 28px 28px;
}
.iparch-card-title {
    font-size: 20px;
    font-weight: 800;
    line-height: 1.4;
    margin: 0 0 10px;
}
.iparch-card-title a {
    color: #1a1a2e;
    text-decoration: none;
    transition: color .2s;
}
.iparch-card-title a:hover { color: #d63a4a; }
.iparch-card-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 14px;
}
.iparch-card-meta svg { flex-shrink: 0; }
.iparch-card-excerpt {
    font-size: 14px;
    color: #4b5563;
    line-height: 1.78;
    margin: 0 0 20px;
}
.iparch-card-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #2d3a5c;
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    padding: 7px 16px;
    border-radius: 6px;
    text-decoration: none;
    transition: background .2s;
}
.iparch-card-btn:hover {
    background: #d63a4a;
    color: #ffffff;
}
/* 學員見證卡片按鈕：靠右對齊，不撐滿寬度 */
.iptestimony-card-body .iparch-card-btn {
    align-self: flex-end;
    padding: 7px 20px;
}

/* ── Testimony 3-col grid ──────────────────────────────────── */
.iptestimony-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}
.iptestimony-card {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    transition: box-shadow .2s, transform .2s;
    display: flex;
    flex-direction: column;
}
.iptestimony-card:hover {
    box-shadow: 0 8px 28px rgba(0, 0, 0, .1);
    transform: translateY(-3px);
}
.iptestimony-card-thumb {
    display: block;
    overflow: hidden;
    flex-shrink: 0;
}
.iptestimony-card-thumb img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    object-position: top center;
    display: block;
    transition: transform .4s ease;
}
.iptestimony-card:hover .iptestimony-card-thumb img {
    transform: scale(1.04);
}
.iptestimony-card-body {
    padding: 16px 18px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.iptestimony-card-title {
    font-size: 16px;
    font-weight: 800;
    line-height: 1.45;
    margin: 0 0 8px;
}
.iptestimony-card-title a {
    color: #1a1a2e;
    text-decoration: none;
    transition: color .2s;
}
.iptestimony-card-title a:hover { color: #d63a4a; }
.iptestimony-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.iptestimony-card-author { color: #9ca3af; }
.iptestimony-card-excerpt {
    font-size: 13px;
    color: #4b5563;
    line-height: 1.72;
    margin: 0 0 16px;
    flex: 1;
}

/* ── Sidebar ───────────────────────────────────────────────── */
.iparch-sidebar {
    position: sticky;
    top: 90px;
}
.iparch-sidebar-heading {
    font-size: 15px;
    font-weight: 800;
    color: #1a1a2e;
    margin: 0 0 14px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e5e7eb;
}
.iparch-sidebar-item {
    display: block;
    padding: 13px 0;
    border-bottom: 1px dashed #e5e7eb;
    text-decoration: none;
}
.iparch-sidebar-item:hover .iparch-sidebar-title { color: #d63a4a; }
.iparch-sidebar-title {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 5px;
    line-height: 1.45;
    transition: color .2s;
    display: flex;
    align-items: baseline;
    gap: 8px;
}
.iparch-sidebar-num {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #6b7280;
    font-size: 11px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .2s, color .2s;
}
.iparch-sidebar-item:hover .iparch-sidebar-num {
    background: #d63a4a;
    color: #ffffff;
}
.iparch-sidebar-meta {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #9ca3af;
    margin-bottom: 4px;
}
.iparch-sidebar-excerpt {
    font-size: 12px;
    color: #6b7280;
    margin: 0;
    line-height: 1.6;
}

/* ── Pagination ────────────────────────────────────────────── */
.iparch-pagination {
    margin-top: 8px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.iparch-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    color: #374151;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all .2s;
}
.iparch-pagination .page-numbers.current,
.iparch-pagination .page-numbers:hover {
    background: #d63a4a;
    border-color: #d63a4a;
    color: #ffffff;
}
.iparch-pagination .page-numbers.dots { border-color: transparent; }

.iparch-empty {
    color: #6b7280;
    font-size: 15px;
    padding: 40px 0;
}

/* ── 最新消息 Hero：六邊形＋菱形＋不規則線條＋星星 ─────── */
.iparch--news .iparch-hero {
    height: 150px;
}
.iparch--news .iparch-hero-overlay {
    background-color: rgba(10, 22, 40, .54);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='200'%3E%3Cpolygon points='75,34 94.05,49 94.05,79 75,94 55.95,79 55.95,49' stroke='white' stroke-width='1' fill='none' opacity='.3'/%3E%3Cpolygon points='310,116 325.59,128 325.59,152 310,164 294.41,152 294.41,128' stroke='white' stroke-width='1' fill='none' opacity='.25'/%3E%3Cpolygon points='510,19 530.78,34 530.78,67 510,82 489.22,67 489.22,34' stroke='white' stroke-width='1.1' fill='none' opacity='.28'/%3E%3Cpolygon points='195,147 207.99,157 207.99,177 195,187 182.01,177 182.01,157' stroke='white' stroke-width='.8' fill='none' opacity='.22'/%3E%3Cpolygon points='235,48 253,82 235,117 217,82' stroke='white' stroke-width='1' fill='none' opacity='.32'/%3E%3Cpolygon points='445,123 459,149 445,175 431,149' stroke='white' stroke-width='.9' fill='none' opacity='.25'/%3E%3Cpolygon points='38,101 48,122 38,144 28,122' stroke='white' stroke-width='.8' fill='none' opacity='.28'/%3E%3Cpolyline points='0,73 45,53 95,90 145,43 210,69 270,51' stroke='white' stroke-width='1' fill='none' opacity='.35' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpolyline points='360,24 415,56 455,37 510,73 570,47 600,60' stroke='white' stroke-width='.9' fill='none' opacity='.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpolyline points='120,180 175,157 225,173 290,144 350,163' stroke='white' stroke-width='.8' fill='none' opacity='.25' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M155,33 L155.84,36 L158,37 L155.84,38 L155,41 L154.16,38 L152,37 L154.16,36 Z' fill='white' opacity='.55'/%3E%3Cpath d='M390,123 L390.7,125 L392.5,126 L390.7,127 L390,129 L389.3,127 L387.5,126 L389.3,125 Z' fill='white' opacity='.45'/%3E%3Cpath d='M548,25 L548.98,28 L551.5,29 L548.98,30 L548,33 L547.02,30 L544.5,29 L547.02,28 Z' fill='white' opacity='.5'/%3E%3Cpath d='M270,155 L270.56,157 L272,158 L270.56,159 L270,161 L269.44,159 L268,158 L269.44,157 Z' fill='white' opacity='.4'/%3E%3Cpath d='M60,23 L60.7,26 L62.5,27 L60.7,28 L60,31 L59.3,28 L57.5,27 L59.3,26 Z' fill='white' opacity='.48'/%3E%3Cpath d='M480,171 L480.56,173 L482,174 L480.56,175 L480,177 L479.44,175 L478,174 L479.44,173 Z' fill='white' opacity='.38'/%3E%3C/svg%3E");
    background-size: 600px 150px;
    background-repeat: repeat-x;
    background-position: center;
}

/* ── 學員見證 Hero：縮高 + 雲朵幾何線條 ───────────────────── */
.iparch--testimony .iparch-hero {
    height: 150px;
}
.iparch--testimony .iparch-hero-overlay {
    background-color: rgba(10, 22, 40, .54);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='150'%3E%3Cpath d='M0 80 Q75 48 150 80 Q225 112 300 80 Q375 48 450 80 Q525 112 600 80' stroke='white' stroke-width='1.3' fill='none' opacity='.5'/%3E%3Cpath d='M0 110 Q60 78 120 110 Q180 142 240 110 Q300 78 360 110 Q420 142 480 110 Q540 78 600 110' stroke='white' stroke-width='.9' fill='none' opacity='.35'/%3E%3Cpath d='M0 48 Q100 22 200 48 Q300 74 400 48 Q500 22 600 48' stroke='white' stroke-width='1' fill='none' opacity='.28'/%3E%3Ccircle cx='95' cy='78' r='28' stroke='white' stroke-width='.9' fill='none' opacity='.28'/%3E%3Ccircle cx='305' cy='92' r='24' stroke='white' stroke-width='.9' fill='none' opacity='.25'/%3E%3Ccircle cx='510' cy='70' r='30' stroke='white' stroke-width='.9' fill='none' opacity='.28'/%3E%3Ccircle cx='158' cy='54' r='2.5' fill='white' opacity='.45'/%3E%3Ccircle cx='378' cy='128' r='2' fill='white' opacity='.38'/%3E%3Ccircle cx='548' cy='38' r='2.5' fill='white' opacity='.36'/%3E%3Ccircle cx='45' cy='130' r='2' fill='white' opacity='.32'/%3E%3Ccircle cx='250' cy='32' r='1.5' fill='white' opacity='.38'/%3E%3C/svg%3E");
    background-size: 600px 150px;
    background-repeat: repeat-x;
    background-position: center;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .iparch-wrap { grid-template-columns: 1fr 260px; gap: 32px; }
    .iptestimony-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .iparch-hero { height: 150px; }
    .iparch-hero-title { font-size: 28px; }
    .iparch-wrap { grid-template-columns: 1fr; }
    .iparch-sidebar { position: static; }
}
@media (max-width: 480px) {
    .iparch-wrap { padding: 0 20px; }
    .iptestimony-grid { grid-template-columns: 1fr; }
}
