/* ============================================================
   pahang.co — Articles, 华文社区, article detail, News (mobile-first)
   Shared .chip / .hscroll / .pcard live in main.css
   ============================================================ */

/* ── Header band (same pattern as browse.css .br-head) ── */
.ar-head { padding: 22px 16px 18px; color: #fff; background: linear-gradient(135deg, #0d2b5e, #1a56db); }
.ar-head.is-zh { background: linear-gradient(135deg, #7c1d1d, #dc2626); }
.ar-head.is-news { background: linear-gradient(135deg, #1e293b, #475569); }
.ar-head-inner { max-width: 1200px; margin: 0 auto; }
.ar-crumb { font-size: 12px; color: rgba(255,255,255,.65); margin-bottom: 8px; }
.ar-crumb a { color: inherit; text-decoration: none; }
.ar-crumb span { margin: 0 5px; }
.ar-head h1 { font-family: 'Playfair Display', serif; font-size: 24px; font-weight: 700; line-height: 1.2; }
.ar-head p { font-size: 13px; color: rgba(255,255,255,.72); line-height: 1.55; margin-top: 6px; max-width: 560px; }

/* ── Search bar ── */
.ar-bar { background: #fff; border-bottom: 1px solid var(--border); padding: 10px 16px; }
.ar-bar form { max-width: 1200px; margin: 0 auto; display: flex; gap: 8px; }
.ar-bar input { flex: 1; min-width: 0; border: 1.5px solid var(--border); border-radius: 10px; padding: 11px 14px; font: 400 15px 'DM Sans', sans-serif; color: var(--charcoal); outline: none; }
.ar-bar input:focus { border-color: var(--blue); }
.ar-bar button { border: 0; background: var(--blue); color: #fff; border-radius: 10px; padding: 0 18px; font: 600 14px 'DM Sans', sans-serif; cursor: pointer; }
.is-zh .ar-bar button, .ar-bar.is-zh button { background: #dc2626; }
.ar-bar .ar-reset { display: flex; align-items: center; padding: 0 12px; font-size: 13px; font-weight: 600; color: var(--muted); text-decoration: none; }

/* ── Layout ── */
.ar-wrap { max-width: 1200px; margin: 0 auto; padding: 14px 16px 32px; }
.ar-section { padding: 28px 16px 32px; }
.ar-section.is-pale { background: var(--pale); }
.ar-section.is-zh { background: #fff5f5; }
.ar-section-inner { max-width: 1200px; margin: 0 auto; }
.ar-h2 { font-family: 'Playfair Display', serif; font-size: 20px; font-weight: 700; color: var(--navy); margin-bottom: 12px; }
.ar-h2 small { display: block; font: 700 11px 'DM Sans', sans-serif; letter-spacing: 2px; text-transform: uppercase; color: var(--blue); margin-bottom: 4px; }
.is-zh .ar-h2 { color: #7c1d1d; }
.is-zh .ar-h2 small { color: #dc2626; }

/* ── Article cards: row on mobile, column in grid on desktop ── */
.ar-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.acard { display: flex; background: #fff; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-card); text-decoration: none; transition: transform .15s, box-shadow .15s; }
.acard:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.acard-media { position: relative; flex: 0 0 120px; min-height: 100px; background: linear-gradient(135deg, var(--navy), var(--sky)); display: grid; place-items: center; font-size: 28px; overflow: hidden; }
.is-zh .acard-media { background: linear-gradient(135deg, #7c1d1d, #dc2626); }
.acard-media img { width: 100%; height: 100%; object-fit: cover; display: block; position: absolute; inset: 0; }
.acard-badge { position: absolute; top: 6px; left: 6px; font-size: 10px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; padding: 3px 7px; border-radius: 6px; background: var(--accent); color: #1f1300; }
.acard-badge.is-sponsored { left: auto; right: 6px; background: rgba(0,0,0,.55); color: #eee; }
.acard-badge.is-property { background: var(--navy); color: #fff; }   /* article from property.pahang.co */
.acard-body { flex: 1; min-width: 0; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.acard-cat { font-size: 10px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--blue); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.is-zh .acard-cat { color: #dc2626; }
.acard-title { font-family: 'Playfair Display', serif; font-size: 14px; font-weight: 700; line-height: 1.35; color: var(--navy); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.is-zh .acard-title { color: #7c1d1d; }
.acard-meta { margin-top: auto; font-size: 11px; color: var(--muted); }

/* ── Empty state ── */
.ar-empty { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 48px 20px; text-align: center; color: var(--muted); }
.ar-empty b { display: block; font-size: 40px; margin-bottom: 10px; }

/* ── Pagination ── */
.ar-pages { position: static; border: 0; box-shadow: none; background: transparent; padding: 0; display: flex; justify-content: center; align-items: center; gap: 6px; flex-wrap: wrap; margin: 24px 0 8px; }
.ar-pages a, .ar-pages span { min-width: 38px; height: 38px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; border: 1.5px solid var(--border); background: #fff; font-size: 13px; font-weight: 600; color: var(--charcoal); text-decoration: none; }
.ar-pages a:hover { border-color: var(--blue); color: var(--blue); }
.ar-pages .is-current { background: var(--navy); border-color: var(--navy); color: #fff; }
.is-zh .ar-pages .is-current { background: #dc2626; border-color: #dc2626; }
.ar-pages .is-gap { border: 0; background: transparent; color: var(--muted); min-width: 0; padding: 0 2px; }

/* ── Listing grids (reuse .pcard) ── */
.ar-pgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.is-zh .pcard-media { background: linear-gradient(135deg, #7c1d1d, #dc2626); }
.is-zh .pcard-name { color: #7c1d1d; }

/* ── Article detail ── */
.artd-crumb { background: #fff; border-bottom: 1px solid var(--border); padding: 10px 16px; font-size: 12px; color: var(--muted); }
.artd-crumb a { color: var(--muted); text-decoration: none; }
.artd-crumb span { margin: 0 5px; }
.artd-crumb b { font-weight: 500; color: var(--charcoal); }
.artd-spottop { background: #fff; border-bottom: 1px solid var(--border); padding: 6px 16px; }
.artd-main { background: var(--pale); padding: 20px 0 40px; }
.artd-article { max-width: 760px; margin: 0 auto; padding: 0 16px; }
.artd-cover { border-radius: 14px; overflow: hidden; margin-bottom: 18px; box-shadow: var(--shadow-card); }
.artd-cover img { width: 100%; height: auto; display: block; }
.artd-kicker { font-size: 11px; color: var(--blue); font-weight: 700; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.artd-kicker .is-sponsored { background: #fef9c3; color: #ca8a04; padding: 2px 8px; border-radius: 4px; letter-spacing: .5px; }
.artd-title { font-family: 'Playfair Display', serif; font-size: clamp(24px, 6vw, 38px); font-weight: 700; color: var(--navy); line-height: 1.25; margin-bottom: 12px; }
.artd-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--muted); padding-bottom: 14px; border-bottom: 1px solid var(--border); margin-bottom: 18px; }
.artd-share { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; margin-bottom: 20px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.artd-share-label { font-size: 13px; font-weight: 700; color: var(--navy); }
.share-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.share-btn { display: inline-flex; align-items: center; gap: 5px; padding: 8px 14px; border-radius: 999px; font: 600 12px 'DM Sans', sans-serif; text-decoration: none; border: 0; cursor: pointer; }
.share-btn.is-fb { background: #1877f2; color: #fff; }
.share-btn.is-wa { background: #25d366; color: #fff; }
.share-btn.is-copy { background: var(--pale); color: var(--navy); border: 1px solid var(--border); }
.artd-excerpt { background: #fff; border-left: 4px solid var(--blue); border-radius: 0 10px 10px 0; padding: 14px 18px; margin-bottom: 22px; font-size: 15px; color: var(--charcoal); line-height: 1.7; font-style: italic; }
.artd-spot { margin: 24px 0; }
.artd-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.artd-tags a { background: var(--pale); color: var(--blue); padding: 6px 14px; border-radius: 20px; font-size: 12px; font-weight: 600; text-decoration: none; border: 1px solid var(--border); }
.artd-related { border-top: 1px solid var(--border); padding-top: 24px; margin-top: 8px; }
.artd-related .ar-grid { gap: 10px; }

/* Article body typography */
.article-body { font-size: 17px; line-height: 1.85; color: var(--charcoal); word-wrap: break-word; }
.article-body h2 { font-family: 'Playfair Display', serif; font-size: 24px; font-weight: 700; color: var(--navy); margin: 28px 0 12px; line-height: 1.3; }
.article-body h3 { font-family: 'Playfair Display', serif; font-size: 19px; font-weight: 700; color: var(--navy); margin: 22px 0 10px; }
.article-body p { margin: 0 0 16px; }
.article-body img { max-width: 100%; height: auto; border-radius: 10px; margin: 14px 0; display: block; }
.article-body a { color: var(--blue); text-decoration: underline; }
.article-body ul, .article-body ol { padding-left: 24px; margin: 0 0 16px; }
.article-body li { margin-bottom: 8px; }
.article-body blockquote { border-left: 4px solid var(--blue); padding: 14px 20px; margin: 20px 0; background: var(--pale); border-radius: 0 10px 10px 0; color: var(--muted); font-style: italic; }
.article-body strong { color: var(--navy); }
.article-body iframe, .article-body table { max-width: 100%; }

/* ── News ── */
.nw-layout { max-width: 1200px; margin: 0 auto; padding: 14px 16px 32px; display: flex; flex-direction: column; gap: 20px; }
.nw-main { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.nw-big { display: block; background: #fff; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-card); text-decoration: none; transition: transform .15s, box-shadow .15s; }
.nw-big:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.nw-big-media { position: relative; aspect-ratio: 16 / 9; background: linear-gradient(135deg, #1e293b, #475569); display: grid; place-items: center; font-size: 44px; overflow: hidden; }
.nw-big-media img { width: 100%; height: 100%; object-fit: cover; display: block; position: absolute; inset: 0; }
.nw-big-body { padding: 14px 16px 16px; }
.nw-source { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.nw-tag { background: var(--accent); color: #1f1300; padding: 2px 8px; border-radius: 4px; font-size: 10px; }
.nw-big-title { font-family: 'Playfair Display', serif; font-size: 20px; font-weight: 700; color: var(--navy); line-height: 1.3; margin-bottom: 8px; }
.nw-big-summary { font-size: 14px; color: var(--charcoal); line-height: 1.6; margin-bottom: 10px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.nw-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--muted); }
.nw-meta .is-read { color: var(--blue); font-weight: 700; }
.nw-row { display: flex; background: #fff; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; text-decoration: none; box-shadow: var(--shadow-card); transition: transform .15s, box-shadow .15s; }
.nw-row:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.nw-row-media { position: relative; flex: 0 0 110px; min-height: 90px; background: linear-gradient(135deg, #1e293b, #475569); display: grid; place-items: center; font-size: 26px; overflow: hidden; }
.nw-row-media img { width: 100%; height: 100%; object-fit: cover; display: block; position: absolute; inset: 0; }
.nw-row-body { flex: 1; min-width: 0; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.nw-row-source { font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.nw-row-title { font-weight: 700; font-size: 14px; line-height: 1.35; color: var(--navy); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.nw-row-meta { margin-top: auto; font-size: 11px; color: var(--muted); }
.nw-note { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 12px 16px; font-size: 12px; color: var(--muted); text-align: center; line-height: 1.6; margin-top: 8px; }
.nw-side { display: flex; flex-direction: column; gap: 14px; }
.nw-box { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 14px; box-shadow: var(--shadow-card); }
.nw-box-title { font-family: 'Playfair Display', serif; font-size: 16px; font-weight: 700; color: var(--navy); margin-bottom: 10px; }
.nw-item { display: flex; gap: 10px; padding: 8px 0; border-top: 1px solid var(--border); text-decoration: none; }
.nw-item:first-of-type { border-top: 0; }
.nw-item-num { font-family: 'Playfair Display', serif; font-size: 20px; font-weight: 700; color: var(--border); line-height: 1; flex: 0 0 28px; }
.nw-item-title { font-size: 13px; font-weight: 600; color: var(--charcoal); line-height: 1.4; }
.nw-item-meta { font-size: 11px; color: var(--muted); margin-top: 2px; }
.nw-ad { background: linear-gradient(135deg, #eff6ff, #dbeafe); border: 1.5px dashed #93c5fd; border-radius: 14px; min-height: 200px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--sky); font-size: 12px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; }
.nw-ad b { font-size: 28px; opacity: .4; }
.nw-ad small { font-size: 10px; opacity: .6; }
.nw-cta { background: linear-gradient(135deg, var(--navy), var(--blue)); border-radius: 14px; padding: 20px; text-align: center; color: #fff; }
.nw-cta b { display: block; font-size: 15px; margin: 8px 0 4px; }
.nw-cta p { font-size: 13px; opacity: .7; margin-bottom: 14px; line-height: 1.5; }
.nw-cta a { display: block; background: #fff; color: var(--blue); padding: 10px; border-radius: 10px; font-size: 13px; font-weight: 700; text-decoration: none; }

/* ── Tablet ── */
@media (min-width: 720px) {
    .ar-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .acard { flex-direction: column; }
    .acard-media { flex: none; aspect-ratio: 16 / 9; min-height: 0; font-size: 44px; }
    .acard-body { padding: 14px 16px 16px; }
    .acard-title { font-size: 16px; }
    .acard-meta { font-size: 12px; padding-top: 6px; }
    .ar-pgrid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
    .artd-related .ar-grid { grid-template-columns: 1fr; }
    .artd-related .acard { flex-direction: row; }
    .artd-related .acard-media { flex: 0 0 140px; aspect-ratio: auto; min-height: 100px; font-size: 28px; }
    .nw-big-title { font-size: 24px; }
}

/* ── Desktop ── */
@media (min-width: 900px) {
    .ar-head { padding: 36px 24px 30px; }
    .ar-head h1 { font-size: 34px; }
    .ar-head p { font-size: 14px; }
    .ar-bar { padding: 12px 24px; }
    .ar-bar form { max-width: 560px; margin: 0; }
    .ar-wrap { padding: 24px 24px 48px; }
    .ar-grid { grid-template-columns: repeat(3, 1fr); }
    .ar-section { padding: 40px 24px 48px; }
    .ar-h2 { font-size: 24px; }
    .artd-main { padding: 32px 0 56px; }
    .artd-article { padding: 0 24px; }
    .nw-layout { padding: 24px 24px 48px; display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
    .nw-side { position: sticky; top: 80px; }
    .nw-ad { min-height: 280px; }
}
