/*
Theme Name: PANYACOSMO Blog
Theme URI: https://panyacosmo.in.th/blog
Description: Child theme ของ Twenty Twenty-Five ปรับหน้าตาให้ตรงกับ landing panyacosmo.in.th (แดงเงา + เงิน + ขาว, Kanit/Noto Sans Thai) เป็น child theme เพื่อให้ธีมแม่อัปเดตได้โดยไม่ทับงานเรา
Author: PANYACOSMO
Template: twentytwentyfive
Version: 1.0.1
Text Domain: panyacosmo-blog
*/

/* โทนสีชุดเดียวกับ panyacosmo-web/styles.css — ถ้าแก้ที่ landing ต้องแก้ที่นี่ด้วย */
:root {
    --pc-red-600: #d5111f;
    --pc-red-700: #b30f1e;
    --pc-red-800: #8f0d18;
    --pc-grad-red: linear-gradient(135deg, #e11d3a 0%, #c8102e 42%, #8a0d1f 100%);
    --pc-ink: #16171d;
    --pc-ink-2: #33363f;
    --pc-muted: #6b7280;
    --pc-silver-100: #f3f5f8;
    --pc-silver-200: #e6e9ef;
    --pc-silver-300: #d0d5df;
    --pc-white: #fff;
    --pc-paper: #fbfbfd;
    --pc-shadow-sm: 0 2px 8px rgba(20, 12, 16, .06);
    --pc-shadow-md: 0 10px 30px rgba(20, 12, 16, .10);
    --pc-shadow-red: 0 12px 30px rgba(200, 16, 46, .28);
    --pc-radius: 18px;
    --pc-radius-sm: 12px;
    --pc-maxw: 1200px;
    --pc-head: "Kanit", "Noto Sans Thai", system-ui, sans-serif;
    --pc-body: "Noto Sans Thai", "Kanit", system-ui, sans-serif;
}

body {
    font-family: var(--pc-body);
    color: var(--pc-ink);
    background: var(--pc-white);
    line-height: 1.75;
}

h1, h2, h3, h4, h5,
.wp-block-heading {
    font-family: var(--pc-head);
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -.01em;
}

/* ── Header ─────────────────────────────────────────────────────────────── */

.pc-nav-wrap {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, .88);
    backdrop-filter: saturate(160%) blur(12px);
    -webkit-backdrop-filter: saturate(160%) blur(12px);
    border-bottom: 1px solid var(--pc-silver-200);
}

.pc-nav {
    max-width: var(--pc-maxw);
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.pc-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--pc-head);
    font-weight: 700;
    font-size: 17px;
    letter-spacing: .04em;
    color: var(--pc-ink);
    text-decoration: none;
    flex: none;
}

.pc-brand img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.pc-nav-links {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-left: auto;
}

.pc-nav-links a {
    font-family: var(--pc-head);
    font-size: 14.5px;
    font-weight: 500;
    color: var(--pc-ink-2);
    text-decoration: none;
    padding: 6px 0;
    border-bottom: 2px solid transparent;
    transition: color .18s, border-color .18s;
    white-space: nowrap;
}

.pc-nav-links a:hover {
    color: var(--pc-red-600);
}

.pc-nav-links a.is-active {
    color: var(--pc-red-600);
    border-bottom-color: var(--pc-red-600);
}

.pc-cta {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--pc-grad-red);
    color: #fff !important;
    font-family: var(--pc-head);
    font-weight: 600;
    font-size: 14.5px;
    padding: 10px 20px;
    border-radius: 999px;
    text-decoration: none;
    box-shadow: var(--pc-shadow-red);
    transition: transform .18s, box-shadow .18s;
    white-space: nowrap;
}

.pc-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 38px rgba(200, 16, 46, .36);
}

/* มือถือ: ซ่อนลิงก์กลางไว้ เหลือโลโก้ + ปุ่มปรึกษา เพื่อไม่ให้แถบล้น
   (ทราฟฟิกเกือบทั้งหมดมาจากมือถือ ปุ่ม CTA ต้องอยู่เสมอ) */
@media (max-width: 860px) {
    .pc-nav-links { display: none; }
    .pc-nav { padding: 10px 16px; gap: 12px; }
    .pc-cta { margin-left: auto; padding: 9px 16px; font-size: 13.5px; }
}

/* ── หัวหน้ารายการบทความ ─────────────────────────────────────────────────── */

.pc-main {
    padding-bottom: 72px;
}

.pc-page-head {
    padding: 56px 0 36px;
    text-align: center;
}

.pc-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--pc-head);
    font-weight: 600;
    font-size: 13px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--pc-red-600);
    margin-bottom: 10px;
}

.pc-eyebrow::before {
    content: "";
    width: 26px;
    height: 2px;
    background: var(--pc-grad-red);
    border-radius: 2px;
}

.pc-page-title {
    font-size: clamp(30px, 4.4vw, 46px);
    margin: 0 0 14px;
}

.pc-page-sub {
    color: var(--pc-muted);
    font-size: 16.5px;
    max-width: 620px;
    margin: 0 auto;
}

/* ── การ์ดบทความ ────────────────────────────────────────────────────────── */

.pc-grid {
    gap: 30px !important;
}

.pc-card {
    background: var(--pc-white);
    border: 1px solid var(--pc-silver-200);
    border-radius: var(--pc-radius);
    overflow: hidden;
    box-shadow: var(--pc-shadow-sm);
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.pc-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--pc-shadow-md);
    border-color: var(--pc-silver-300);
}

.pc-card-media {
    margin: 0;
    overflow: hidden;
    background: var(--pc-silver-100);
}

.pc-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}

.pc-card:hover .pc-card-media img {
    transform: scale(1.045);
}

.pc-card-body {
    padding: 22px 24px 24px !important;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.pc-card-cat a,
.pc-article-head .pc-card-cat a {
    font-family: var(--pc-head);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--pc-red-600);
    text-decoration: none;
}

.pc-card-cat a:hover {
    text-decoration: underline;
}

.pc-card-title {
    margin: 0;
    font-size: 21px;
    line-height: 1.35;
}

.pc-card-title a {
    color: var(--pc-ink);
    text-decoration: none;
    transition: color .18s;
}

.pc-card-title a:hover {
    color: var(--pc-red-600);
}

.pc-card-excerpt {
    color: var(--pc-muted);
    font-size: 15px;
    line-height: 1.7;
    margin: 0;
}

.pc-card-excerpt .wp-block-post-excerpt__more-link {
    display: inline-block;
    margin-top: 8px;
    font-family: var(--pc-head);
    font-weight: 600;
    font-size: 14px;
    color: var(--pc-red-600);
    text-decoration: none;
}

.pc-card-excerpt .wp-block-post-excerpt__more-link:hover {
    text-decoration: underline;
}

.pc-card-date {
    margin: 4px 0 0;
    font-size: 13px;
    color: var(--pc-silver-500, #8b93a5);
    border-top: 1px solid var(--pc-silver-200);
    padding-top: 14px;
    margin-top: auto;
}

/* ── Pagination ─────────────────────────────────────────────────────────── */

.pc-pagination {
    margin-top: 48px !important;
    gap: 8px;
}

.pc-pagination a,
.pc-pagination span {
    font-family: var(--pc-head);
    font-size: 14px;
    font-weight: 500;
    color: var(--pc-ink-2);
    text-decoration: none;
    padding: 8px 14px;
    border: 1px solid var(--pc-silver-200);
    border-radius: 999px;
    transition: all .18s;
}

.pc-pagination a:hover {
    border-color: var(--pc-red-600);
    color: var(--pc-red-600);
}

.pc-pagination .current {
    background: var(--pc-grad-red);
    border-color: transparent;
    color: #fff;
}

/* ── หน้าบทความ ─────────────────────────────────────────────────────────── */

.pc-article-head {
    padding: 52px 0 22px;
    text-align: center;
}

.pc-article-title {
    font-size: clamp(28px, 3.8vw, 42px);
    margin: 10px 0 16px;
    max-width: 860px;
    margin-inline: auto;
}

.pc-article-meta {
    justify-content: center;
    gap: 10px;
    color: var(--pc-muted);
    font-size: 14px;
}

.pc-hero-img {
    margin: 8px auto 42px !important;
}

.pc-hero-img img {
    width: 100%;
    border-radius: var(--pc-radius);
    box-shadow: var(--pc-shadow-md);
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

/* เนื้อบทความ — คุมความกว้างบรรทัดให้อ่านสบาย ไม่ให้ลากยาวเต็มจอ */
.pc-content {
    font-size: 17px;
    line-height: 1.85;
    color: var(--pc-ink-2);
}

.pc-content > * {
    max-width: 760px;
    margin-inline: auto;
}

.pc-content p {
    margin: 0 0 20px;
}

.pc-content h2 {
    font-size: 27px;
    margin: 44px 0 16px;
    padding-top: 8px;
    color: var(--pc-ink);
    position: relative;
}

.pc-content h2::before {
    content: "";
    display: block;
    width: 42px;
    height: 3px;
    background: var(--pc-grad-red);
    border-radius: 3px;
    margin-bottom: 14px;
}

.pc-content h3 {
    font-size: 20px;
    margin: 30px 0 12px;
    color: var(--pc-ink);
}

.pc-content ul,
.pc-content ol {
    margin: 0 auto 22px;
    padding-left: 22px;
}

.pc-content li {
    margin-bottom: 9px;
}

.pc-content li::marker {
    color: var(--pc-red-600);
}

/* รูปในเนื้อหาบทความ — จำกัดกว้างตามคอลัมน์ + จัดกึ่งกลางเสมอ */
.pc-content figure {
    margin: 28px auto;
    text-align: center;
}

.pc-content img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    border-radius: var(--pc-radius-sm);
    box-shadow: var(--pc-shadow-sm);
}

.pc-content strong {
    color: var(--pc-ink);
    font-weight: 600;
}

.pc-content a {
    color: var(--pc-red-600);
    text-decoration: underline;
    text-underline-offset: 3px;
    font-weight: 500;
}

.pc-content a:hover {
    color: var(--pc-red-800);
}

/* ย่อหน้าปิดท้ายที่มี CTA — ทำให้เด่นขึ้นโดยไม่ต้องแก้เนื้อบทความ */
.pc-content > p:last-child {
    background: var(--pc-paper);
    border: 1px solid var(--pc-silver-200);
    border-left: 4px solid var(--pc-red-600);
    border-radius: var(--pc-radius-sm);
    padding: 18px 22px;
    margin-top: 32px;
    font-size: 16px;
}

/* ── นำทางบทความก่อนหน้า/ถัดไป ──────────────────────────────────────────── */

.pc-postnav {
    max-width: 760px;
    margin: 56px auto 0 !important;
    padding-top: 28px;
    border-top: 1px solid var(--pc-silver-200);
    gap: 16px;
}

.pc-postnav a {
    font-family: var(--pc-head);
    font-size: 14.5px;
    font-weight: 500;
    color: var(--pc-ink-2);
    text-decoration: none;
}

.pc-postnav a:hover {
    color: var(--pc-red-600);
}

/* ── Footer ─────────────────────────────────────────────────────────────── */

.pc-footer {
    background: var(--pc-ink);
    color: #fff;
    padding: 54px 24px 30px;
}

.pc-footer-inner {
    max-width: var(--pc-maxw);
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    justify-content: space-between;
}

.pc-footer-brand {
    max-width: 330px;
}

.pc-footer-brand .pc-brand {
    color: #fff;
    margin-bottom: 12px;
}

.pc-footer-brand p {
    color: rgba(255, 255, 255, .62);
    font-size: 14.5px;
    line-height: 1.7;
    margin: 0;
}

.pc-footer-col h5 {
    font-family: var(--pc-head);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .5);
    margin: 0 0 14px;
}

.pc-footer-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.pc-footer-col a {
    color: rgba(255, 255, 255, .82);
    font-size: 14.5px;
    text-decoration: none;
    transition: color .18s;
}

.pc-footer-col a:hover {
    color: #fff;
}

.pc-footer-bottom {
    max-width: var(--pc-maxw);
    margin: 34px auto 0;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, .12);
    color: rgba(255, 255, 255, .45);
    font-size: 13px;
    text-align: center;
}

@media (max-width: 720px) {
    .pc-page-head { padding: 40px 0 26px; }
    .pc-article-head { padding: 34px 0 16px; }
    .pc-hero-img { margin-bottom: 30px !important; }
    .pc-content { font-size: 16.5px; }
    .pc-content h2 { font-size: 23px; margin-top: 34px; }
    .pc-footer-inner { gap: 28px; }
}
