/* portal.css — ส่วนที่เพิ่มสำหรับเว็บใหม่ (ใช้สีชุดเดิม --pcshs-*) */

/* ---------- topbar: ปุ่ม login / ผู้ใช้ ---------- */
.topbar-login{
  display:inline-flex;align-items:center;gap:.4rem;height:30px;padding:0 .8rem;border-radius:999px;
  font-size:.78rem;font-weight:700;color:#fff;background:rgba(255,255,255,.10);border:1px solid rgba(255,255,255,.14);
  text-decoration:none;white-space:nowrap;
}
.topbar-login:hover{color:#fff;background:rgba(255,255,255,.18)}
.topbar-user .dropdown-menu{font-size:.9rem;z-index:1300}
.topbar-user form{margin:0}

/* ---------- หัวหน้าเพจ ---------- */
.page-hero{
  background:
    radial-gradient(circle at top right, rgba(94,168,255,.25), transparent 40%),
    linear-gradient(135deg, var(--pcshs-navy) 0%, var(--pcshs-navy-2) 60%, #1b4f91 100%);
  color:#fff;padding:2.6rem 0 2.2rem;
}
.page-hero h1{font-family:"Prompt",sans-serif;font-weight:700;font-size:clamp(1.5rem,3vw,2.3rem);margin:0;color:#fff}
.page-hero .lead{color:rgba(255,255,255,.82);margin:.5rem 0 0;font-size:1.05rem}
.page-hero .breadcrumb{margin-bottom:.7rem;font-size:.85rem}
.page-hero .breadcrumb a{color:rgba(255,255,255,.78);text-decoration:none}
.page-hero .breadcrumb-item+.breadcrumb-item::before{color:rgba(255,255,255,.45)}
.page-hero .breadcrumb-item.active,.page-hero .breadcrumb-item{color:rgba(255,255,255,.95)}
.page-section{padding:2.6rem 0 1rem}

/* ---------- ว่าง ---------- */
.empty-state{text-align:center;padding:3rem 1rem;color:var(--pcshs-muted)}
.empty-state i{font-size:2.6rem;display:block;margin-bottom:.6rem;opacity:.55}

/* ---------- ประกาศปักหมุด ---------- */
.home-pinned{padding:1.2rem 0 0}
.pinned-bar{
  display:flex;flex-wrap:wrap;align-items:center;gap:.4rem 1rem;padding:.8rem 1.1rem;margin-bottom:.6rem;border-radius:14px;
  background:#fff8e8;border:1px solid rgba(240,180,76,.45);color:var(--pcshs-text);text-decoration:none;
}
.pinned-bar:hover{background:#fff2d2;color:var(--pcshs-text)}
.pinned-tag{font-weight:700;color:#a15c00;font-size:.85rem;white-space:nowrap}
.pinned-title{font-weight:600;flex:1 1 300px}
.pinned-meta{font-size:.82rem;color:var(--pcshs-muted)}

/* ---------- การ์ดข่าว: โครงหลักใช้ได้ทุกหน้า (เดิมอยู่แค่ home.css ทำให้หน้า /news ไม่มีระยะขอบ หัวข้อใหญ่เกิน) ---------- */
.news-card{height:100%;display:flex;flex-direction:column;background:#fff;overflow:hidden}
.news-card .news-image{flex:0 0 auto;background:#eef3fa}
.news-card .news-image::after{content:"";position:absolute;inset:auto 0 0 0;height:40%;background:linear-gradient(to top,rgba(6,22,52,.28),transparent);pointer-events:none}
.news-card .news-body{flex:1;display:flex;flex-direction:column;padding:1rem 1.2rem 1.15rem}
.news-card .news-date{display:flex;flex-wrap:wrap;align-items:center;gap:.15rem .4rem;margin:0 0 .5rem;font-size:.8rem;font-weight:500;color:#6b7a90}
.news-card .news-school{color:var(--pcshs-blue,#1d4f91);font-weight:600}
.news-card .news-title{margin:0 0 .45rem;font-size:1.06rem;font-weight:500;line-height:1.5;color:#0f1f3d;
  display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;overflow:hidden}
.news-card .news-excerpt{margin:0 0 .9rem;font-size:.88rem;line-height:1.7;color:#5b6678;
  display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;overflow:hidden}
.news-card .news-link{margin-top:auto;display:inline-flex;align-items:center;gap:.4rem;align-self:flex-start;
  font-size:.86rem;font-weight:600;color:var(--pcshs-blue,#1d4f91);text-decoration:none}
.news-card .news-link i{font-size:.75rem;transition:transform .2s ease}
.news-card:hover .news-link i{transform:translateX(4px)}
.news-card:hover .news-title a{color:var(--pcshs-blue,#1d4f91)}

/* ---------- การ์ดข่าว (เสริมของเดิม) ---------- */
.news-card .news-image{position:relative;display:block}
.news-card .news-image img.is-placeholder{object-fit:contain;padding:2rem;background:var(--pcshs-soft)}
.news-type{position:absolute;left:12px;top:12px;font-size:.72rem;font-weight:700;padding:.25rem .6rem;border-radius:999px;background:rgba(11,42,82,.85);color:#fff}
.news-type.type-announcement{background:#b45309}
.news-type.type-event{background:#047857}
.news-title a{color:inherit;text-decoration:none}
.news-title a:hover{color:var(--pcshs-blue)}
.news-school{font-weight:600}

/* ---------- กิจกรรมที่จะถึง ---------- */
.home-upcoming{padding:1rem 0 2.5rem}
.event-tile{display:flex;gap:.9rem;padding:1rem;border-radius:16px;background:#fff;border:1px solid var(--pcshs-line);text-decoration:none;color:var(--pcshs-text);height:100%;box-shadow:0 6px 20px rgba(11,42,82,.05)}
.event-tile:hover{border-color:var(--pcshs-blue);color:var(--pcshs-text)}
.event-date{flex:0 0 62px;text-align:center;border-radius:12px;background:var(--pcshs-navy);color:#fff;padding:.45rem 0;align-self:flex-start}
.event-date .d{display:block;font-size:1.5rem;font-weight:800;line-height:1.1}
.event-date .m{display:block;font-size:.72rem;opacity:.85}
.event-title{font-weight:700;margin-bottom:.25rem;line-height:1.35}
.event-meta{font-size:.8rem;color:var(--pcshs-muted)}

/* ---------- ตัวกรอง ---------- */
.filter-bar{display:flex;flex-wrap:wrap;gap:.6rem;margin-bottom:1.8rem}
.filter-bar .form-select,.filter-bar .form-control{flex:1 1 180px;max-width:280px}
.chip-filter{display:flex;flex-wrap:wrap;gap:.5rem}
.chip{padding:.35rem .9rem;border-radius:999px;border:1px solid var(--pcshs-line);text-decoration:none;color:var(--pcshs-text);font-size:.88rem;background:#fff}
.chip.on,.chip:hover{background:var(--pcshs-navy);color:#fff;border-color:var(--pcshs-navy)}
.pager{display:flex;justify-content:center;align-items:center;gap:1rem;margin:2.2rem 0 1rem}
.pager-info{color:var(--pcshs-muted);font-size:.9rem}

/* ---------- บทความ ---------- */
.post-meta{display:flex;flex-wrap:wrap;gap:.4rem 1.1rem;align-items:center;font-size:.88rem;color:var(--pcshs-muted);margin-bottom:1.2rem}
.post-cover{width:100%;border-radius:18px;margin-bottom:1.6rem;max-height:520px;object-fit:cover}
.event-box{background:#ecfdf5;border:1px solid #a7f3d0;border-radius:14px;padding:.9rem 1.1rem;margin-bottom:1.4rem;display:grid;gap:.3rem}
.prose{font-size:1.04rem;line-height:1.85;color:var(--pcshs-text);overflow-wrap:anywhere}
.prose img{max-width:100%;height:auto;border-radius:12px;margin:.6rem 0}
.prose h2,.prose h3{font-family:"Prompt",sans-serif;margin-top:1.6rem;color:var(--pcshs-navy)}
.prose blockquote{border-left:4px solid var(--pcshs-gold);padding:.4rem 1rem;background:var(--pcshs-soft);border-radius:0 10px 10px 0}
.prose table{width:100%;border-collapse:collapse;margin:1rem 0}
.prose th,.prose td{border:1px solid var(--pcshs-line);padding:.45rem .6rem}
.gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:.6rem}
.gallery img{width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:10px}
.file-list{list-style:none;padding:0}
.file-list li{padding:.45rem 0;border-bottom:1px dashed var(--pcshs-line)}

/* ---------- โรงเรียน ---------- */
.school-card{display:block;border-radius:18px;overflow:hidden;background:#fff;border:1px solid var(--pcshs-line);text-decoration:none;color:var(--pcshs-text);height:100%;box-shadow:0 8px 24px rgba(11,42,82,.06);transition:transform .15s ease}
.school-card:hover{transform:translateY(-3px);color:var(--pcshs-text)}
.school-card-img{position:relative;aspect-ratio:16/10;background:linear-gradient(135deg,var(--pcshs-navy),var(--pcshs-blue));display:grid;place-items:center;color:rgba(255,255,255,.7);font-size:2.6rem}
.school-card-img{overflow:hidden}
.school-card-img img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.school-code{position:absolute;right:10px;top:10px;font-size:.72rem;font-weight:800;padding:.2rem .55rem;border-radius:999px;background:rgba(255,255,255,.92);color:var(--pcshs-navy)}
.school-card-body{padding:.9rem 1rem 1.1rem}
.school-card-name{font-weight:700;line-height:1.4}
.school-card-prov{font-size:.85rem;color:var(--pcshs-muted);margin-top:.3rem}
.info-card{background:#fff;border:1px solid var(--pcshs-line);border-radius:18px;padding:1.3rem;box-shadow:0 8px 24px rgba(11,42,82,.05)}
.info-card dl{margin-bottom:1rem}
.info-card dt{font-size:.8rem;color:var(--pcshs-muted);font-weight:600}
.info-card dd{margin-bottom:.7rem}
.info-logo{max-width:120px;display:block;margin:0 auto 1rem}
.person-card{text-align:center;background:#fff;border:1px solid var(--pcshs-line);border-radius:16px;padding:1rem;height:100%}
.person-card img,.person-ph{width:96px;height:96px;border-radius:50%;object-fit:cover;margin:0 auto .6rem;display:grid;place-items:center;background:var(--pcshs-soft);font-size:2.2rem;color:var(--pcshs-muted)}
.person-name{font-weight:700}
.person-pos{font-size:.85rem;color:var(--pcshs-muted)}

/* ---------- ระบบงาน ---------- */
.sys-card{background:#fff;border:1px solid var(--pcshs-line);border-radius:18px;padding:1.3rem;height:100%;display:flex;flex-direction:column;gap:.8rem;box-shadow:0 8px 24px rgba(11,42,82,.05)}
.sys-card .btn{align-self:flex-start;margin-top:auto}
.sys-head{display:flex;gap:.9rem;align-items:flex-start}
.sys-icon{flex:0 0 52px;height:52px;border-radius:14px;display:grid;place-items:center;font-size:1.5rem;color:#fff;background:linear-gradient(135deg,var(--pcshs-navy),var(--pcshs-blue))}
.sys-name{font-size:1.08rem;font-weight:700;margin:0 0 .35rem}
.sys-status{font-size:.72rem;font-weight:700;padding:.18rem .55rem;border-radius:999px;background:#e2e8f0;color:#334155}
.sys-status.st-live{background:#dcfce7;color:#166534}
.sys-status.st-pilot{background:#e0f2fe;color:#075985}
.sys-status.st-dev{background:#fef3c7;color:#92400e}
.sys-tag{font-size:.72rem;color:var(--pcshs-muted);margin-left:.4rem}
.sys-desc{margin:0;color:#475569;font-size:.93rem}
.sys-meta{margin:0;font-size:.85rem;display:grid;grid-template-columns:auto 1fr;gap:.2rem .7rem}
.sys-meta dt{color:var(--pcshs-muted);font-weight:600}
.sys-meta dd{margin:0}
a.system-card{text-decoration:none}

/* ---------- กิจกรรมเครือข่าย ---------- */
.series-block{margin-bottom:2.6rem}
.series-head h2{font-family:"Prompt",sans-serif;font-size:1.4rem;color:var(--pcshs-navy)}
.series-head a{color:inherit;text-decoration:none}
.year-card{display:block;padding:1.1rem;border-radius:16px;background:#fff;border:1px solid var(--pcshs-line);text-decoration:none;color:var(--pcshs-text);height:100%}
.year-card:hover{border-color:var(--pcshs-blue);color:var(--pcshs-text)}
.year-card .year{font-size:1.7rem;font-weight:800;color:var(--pcshs-blue)}
.year-title{font-weight:600;margin:.2rem 0 .4rem}
.year-meta{font-size:.82rem;color:var(--pcshs-muted)}

/* ---------- หน้าเนื้อหา ---------- */
.content-card{background:#fff;border:1px solid var(--pcshs-line);border-radius:18px;padding:1.3rem;height:100%}
.content-card-icon{width:46px;height:46px;border-radius:12px;display:grid;place-items:center;background:var(--pcshs-soft);color:var(--pcshs-blue);font-size:1.3rem;margin-bottom:.7rem}
.content-card h3{font-size:1.08rem;font-weight:700}
.timeline{position:relative;padding-left:1.4rem;border-left:3px solid var(--pcshs-line)}
.tl-item{position:relative;padding:0 0 1.6rem 1rem}
.tl-item::before{content:"";position:absolute;left:-1.95rem;top:.35rem;width:14px;height:14px;border-radius:50%;background:var(--pcshs-gold);border:3px solid #fff;box-shadow:0 0 0 2px var(--pcshs-gold)}
.tl-year{font-weight:800;color:var(--pcshs-blue)}
.tl-body h3{font-size:1.05rem;font-weight:700;margin:.2rem 0}
.tl-body p{margin:0;color:#475569}

/* ---------- login ---------- */
.login-wrap{padding:4rem 0}
.login-card{max-width:420px;margin:0 auto;text-align:center;background:#fff;border:1px solid var(--pcshs-line);border-radius:22px;padding:2.2rem;box-shadow:var(--pcshs-shadow-lg)}
.login-logo{width:84px;margin-bottom:1rem}
.btn-google{display:inline-flex;align-items:center;justify-content:center;gap:.6rem;border:1px solid #dadce0;background:#fff;color:#3c4043;font-weight:600;padding:.65rem 1rem;border-radius:12px}
.btn-google:hover{background:#f8fafc}

/* ---------- error ---------- */
.error-page{padding:5rem 0}
.error-code{font-size:4.5rem;font-weight:800;color:var(--pcshs-navy);line-height:1}
.error-icon{font-size:2.4rem;color:var(--pcshs-gold);display:block;margin:.6rem 0 1rem}

/* ---------- ผลงานและรางวัล (หน้าแรก + /awards) ---------- */
.hm-awards { list-style: none; margin: 0; padding: .35rem 1.4rem; border: 1px solid #e3e9f2; border-radius: 20px; background: #fff; box-shadow: 0 10px 28px rgba(11, 42, 82, .07); }
.hm-award { display: flex; gap: 1rem; align-items: flex-start; padding: 1rem 0; border-bottom: 1px solid #eef2f7; }
.hm-award:last-child { border-bottom: 0; }
.hm-award-medal {
  flex: 0 0 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; font-size: 1.25rem;
  color: #fff; background: linear-gradient(150deg, #1a4a8f, #0d2a5c); box-shadow: 0 6px 14px rgba(13, 42, 92, .22);
}
.hm-award.is-intl .hm-award-medal { color: #3d2800; background: linear-gradient(150deg, #fbe3a2, #e2bd62); box-shadow: 0 6px 14px rgba(226, 189, 98, .35); }
.hm-award-body { min-width: 0; }
.hm-award-top { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .6rem; margin-bottom: .3rem; font-size: .8rem; }
.hm-award-level { padding: .1rem .6rem; border-radius: 999px; background: #e8f0fd; color: #1d4f91; font-weight: 600; }
.hm-award.is-intl .hm-award-level { background: #fbf1d6; color: #7a5a12; }
.hm-award-meta { color: #64748b; }
.hm-award-demo { padding: .05rem .5rem; border-radius: 999px; border: 1px dashed #c2cad6; color: #64748b; }
.hm .hm-award h3, .hm-award h3 { font-family: inherit; letter-spacing: normal; margin: 0; font-size: 1rem; line-height: 1.55; font-weight: 400 !important; color: #0b2545; }
.hm-award h3 b { font-weight: 600; color: #0b2545; }
.hm-award h3 a { color: inherit; }
.hm-award h3 a:hover { color: #1d4f91; }
.hm-award-team { margin-top: .2rem; font-size: .85rem; color: #64748b; }
@media (max-width: 575.98px) { .hm-awards { padding: .25rem 1rem; } .hm-award-medal { flex-basis: 38px; height: 38px; font-size: 1.05rem; } }
