/* ═══════════════════════════════════════════════════════════════
 *  SCS · ระบบดูแลช่วยเหลือนักเรียน
 *  File:  assets/css/landing.css — หน้าแรกสาธารณะ (Landing)
 *  Version: 1.0.0 · ครูวิรัตน์ หาดคำ · www.kruwirat.com
 * ═══════════════════════════════════════════════════════════════ */

.lp-body {
  background: #fff;
  color: #0f172a;
  font-family: 'Sarabun', system-ui, sans-serif;
}
.lp-wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* ── แถบนำทางด้านบน (glass · ติดขอบบน) ───────────────────── */
.lp-nav {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(15, 23, 42, .07);
  transition: box-shadow .25s;
}
.lp-nav.is-stuck { box-shadow: 0 6px 24px rgba(15, 23, 42, .08); }
.lp-nav-in { display: flex; align-items: center; gap: 16px; height: 64px; }

.lp-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.lp-brand-logo {
  width: 40px; height: 40px; flex: 0 0 40px; border-radius: 13px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #fff; font-size: 19px;
  box-shadow: 0 6px 16px rgba(99, 102, 241, .35);
}
.lp-brand-logo img { width: 100%; height: 100%; object-fit: cover; }
.lp-brand-txt { display: flex; flex-direction: column; line-height: 1.25; }
.lp-brand-txt strong { font-family: 'Kanit', sans-serif; font-size: 15px; font-weight: 700; }
.lp-brand-txt small { font-size: 11px; color: #64748b; }

.lp-menu { display: flex; gap: 4px; margin-left: auto; }
.lp-menu a {
  padding: 8px 13px; border-radius: 10px; font-size: 13.5px; font-weight: 500;
  color: #475569; text-decoration: none; transition: background .18s, color .18s;
}
.lp-menu a:hover { background: #eef2ff; color: #4f46e5; }
.lp-nav-cta { display: flex; gap: 8px; }
.lp-burger {
  display: none; width: 40px; height: 40px; border: 1px solid #e2e8f0;
  background: #fff; border-radius: 11px; font-size: 20px; color: #334155; cursor: pointer;
}

/* ── ปุ่ม ───────────────────────────────────────────────── */
.lp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 17px; border-radius: 12px; font-size: 13.5px; font-weight: 600;
  font-family: 'Kanit', sans-serif; text-decoration: none; border: 1px solid transparent;
  cursor: pointer; transition: transform .18s, box-shadow .18s, background .18s;
  white-space: nowrap;
}
.lp-btn-lg { padding: 13px 24px; font-size: 15px; border-radius: 14px; }
.lp-btn-primary {
  background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #fff;
  box-shadow: 0 10px 24px rgba(99, 102, 241, .32);
}
.lp-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(99, 102, 241, .42); }
.lp-btn-ghost { background: rgba(255, 255, 255, .14); color: #fff; border-color: rgba(255, 255, 255, .32); }
.lp-btn-ghost:hover { background: rgba(255, 255, 255, .24); transform: translateY(-2px); }
.lp-btn-light { background: #fff; color: #4338ca; box-shadow: 0 10px 24px rgba(15, 23, 42, .18); }
.lp-btn-light:hover { transform: translateY(-2px); }
.lp-btn-outline { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .5); }
.lp-btn-outline:hover { background: rgba(255, 255, 255, .14); transform: translateY(-2px); }

/* ── Hero ───────────────────────────────────────────────── */
.lp-hero {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 40%, #8b5cf6 75%, #a855f7 100%);
  background-size: cover; background-position: center;
  color: #fff; padding: 74px 0 66px; text-align: center;
}
.lp-hero-overlay {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(circle at 18% 22%, rgba(255, 255, 255, .22), transparent 45%),
    radial-gradient(circle at 82% 78%, rgba(255, 255, 255, .16), transparent 48%),
    linear-gradient(180deg, rgba(49, 46, 129, .30), rgba(49, 46, 129, .62));
}
.lp-hero-in { position: relative; z-index: 1; }
.lp-pill {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 99px; padding: 6px 15px; font-size: 12.5px; font-weight: 600; margin-bottom: 16px;
}
.lp-pill-dark { background: #eef2ff; border-color: #c7d2fe; color: #4338ca; }
.lp-title {
  font-family: 'Kanit', sans-serif; font-size: 40px; font-weight: 800;
  line-height: 1.22; margin: 0 0 14px; letter-spacing: -.01em;
}
.lp-sub { font-size: 16px; line-height: 1.75; max-width: 760px; margin: 0 auto 26px; opacity: .93; }
.lp-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.lp-org { margin-top: 22px; font-size: 13px; opacity: .82; }

.lp-flash {
  display: flex; align-items: center; gap: 9px; max-width: 560px; margin: 0 auto 18px;
  background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 12px; padding: 10px 16px; font-size: 13.5px; text-align: left;
}
.lp-flash.is-success { background: rgba(16, 185, 129, .22); border-color: rgba(52, 211, 153, .5); }
.lp-flash.is-error   { background: rgba(244, 63, 94, .22);  border-color: rgba(251, 113, 133, .5); }

/* ── แถบสถิติ ───────────────────────────────────────────── */
.lp-stats { background: #fff; padding: 0; }
.lp-stat-grid {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px;
  margin-top: -38px; position: relative; z-index: 2;
}
.lp-stat {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 18px;
  padding: 18px 12px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .07);
  transition: transform .2s, box-shadow .2s;
}
.lp-stat:hover { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(15, 23, 42, .11); }
.lp-stat-ic {
  width: 40px; height: 40px; border-radius: 13px; color: #fff; font-size: 18px;
  display: flex; align-items: center; justify-content: center;
}
.lp-stat-n {
  font-family: 'Kanit', sans-serif; font-size: 26px; font-weight: 800;
  line-height: 1.1; font-variant-numeric: tabular-nums; color: #0f172a;
}
.lp-stat-l { font-size: 11.5px; color: #64748b; }

/* ── section ทั่วไป ─────────────────────────────────────── */
.lp-sec { padding: 66px 0; }
.lp-sec-alt { background: #f8fafc; }
.lp-sec-head { text-align: center; max-width: 720px; margin: 0 auto 34px; }
.lp-sec-head.lp-left { text-align: left; margin-left: 0; }
.lp-sec-head h2 {
  font-family: 'Kanit', sans-serif; font-size: 27px; font-weight: 800;
  margin: 0 0 10px; line-height: 1.3;
}
.lp-sec-head p { font-size: 14.5px; color: #64748b; line-height: 1.75; margin: 0 0 14px; }

/* ── 8 ภารกิจ ───────────────────────────────────────────── */
.lp-mission-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px;
}
.lp-mission {
  position: relative; background: #fff; border: 1px solid #e2e8f0;
  border-radius: 18px; padding: 22px 20px 20px;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.lp-mission:hover { transform: translateY(-4px); border-color: #c7d2fe; box-shadow: 0 16px 34px rgba(99, 102, 241, .14); }
.lp-mission-no {
  position: absolute; top: 16px; right: 18px;
  font-family: 'Kanit', sans-serif; font-size: 34px; font-weight: 800;
  color: #eef2ff; line-height: 1;
}
.lp-mission-ic {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 14px; font-size: 20px; color: #fff;
  background: linear-gradient(135deg, #6366f1, #8b5cf6); margin-bottom: 12px;
  box-shadow: 0 8px 20px rgba(99, 102, 241, .3);
}
.lp-mission h3 { font-family: 'Kanit', sans-serif; font-size: 15.5px; font-weight: 700; margin: 0 0 6px; }
.lp-mission p { font-size: 13px; color: #64748b; line-height: 1.7; margin: 0; }

/* ── ประกาศ ─────────────────────────────────────────────── */
.lp-news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.lp-news {
  display: flex; flex-direction: column; gap: 8px;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 18px; padding: 20px;
  text-decoration: none; color: inherit;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.lp-news:hover { transform: translateY(-4px); border-color: #a5b4fc; box-shadow: 0 16px 34px rgba(99, 102, 241, .14); }
.lp-news-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lp-news-tag {
  background: #eef2ff; color: #4338ca; border-radius: 99px;
  padding: 3px 11px; font-size: 11px; font-weight: 600;
}
.lp-news-date { font-size: 11.5px; color: #94a3b8; }
.lp-news h3 { font-family: 'Kanit', sans-serif; font-size: 15.5px; font-weight: 700; margin: 0; line-height: 1.45; }
.lp-news p { font-size: 13px; color: #64748b; line-height: 1.7; margin: 0; flex: 1; }
.lp-news-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 11.5px; color: #94a3b8; border-top: 1px dashed #e2e8f0; padding-top: 10px;
}
.lp-news-go { color: #4f46e5; font-weight: 600; }

.lp-empty {
  text-align: center; padding: 48px 20px; color: #94a3b8;
  background: #fff; border: 1px dashed #cbd5e1; border-radius: 18px;
}
.lp-empty i { font-size: 40px; display: block; margin-bottom: 10px; opacity: .55; }
.lp-empty p { font-size: 15px; font-weight: 600; color: #475569; margin: 0 0 4px; }
.lp-empty small { font-size: 12.5px; }

/* ── บทบาทผู้ใช้ ────────────────────────────────────────── */
.lp-role-wrap { display: grid; grid-template-columns: 1fr 1.1fr; gap: 40px; align-items: center; }
.lp-role-list { display: flex; flex-direction: column; gap: 10px; }
.lp-role {
  display: flex; align-items: center; gap: 13px;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 15px; padding: 14px 16px;
  transition: transform .18s, border-color .18s;
}
.lp-role:hover { transform: translateX(4px); border-color: #c7d2fe; }
.lp-role-ic {
  width: 42px; height: 42px; flex: 0 0 42px; border-radius: 13px;
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 19px;
}
.lp-role div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lp-role strong { font-family: 'Kanit', sans-serif; font-size: 14.5px; font-weight: 600; }
.lp-role span { font-size: 12.5px; color: #64748b; line-height: 1.6; }

/* ── แถบเรียกร้องปิดท้าย ────────────────────────────────── */
.lp-cta-band {
  background: linear-gradient(135deg, #4338ca, #6366f1 55%, #8b5cf6);
  color: #fff; padding: 58px 0; text-align: center;
}
.lp-cta-band h2 { font-family: 'Kanit', sans-serif; font-size: 26px; font-weight: 800; margin: 0 0 8px; }
.lp-cta-band p { font-size: 14.5px; opacity: .9; margin: 0 0 22px; }

/* ── ท้ายหน้า ───────────────────────────────────────────── */
.lp-foot { background: #0f172a; color: #cbd5e1; padding: 34px 0 26px; font-size: 13px; }
.lp-foot-in { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 24px; align-items: start; }
.lp-foot-org { font-family: 'Kanit', sans-serif; font-size: 16px; font-weight: 700; color: #fff; margin-bottom: 7px; }
.lp-foot-line { font-size: 12.5px; color: #94a3b8; line-height: 1.9; }
.lp-foot-links { display: flex; flex-direction: column; gap: 7px; }
.lp-foot-links a { color: #cbd5e1; text-decoration: none; font-size: 13px; }
.lp-foot-links a:hover { color: #a5b4fc; }
.lp-foot-dev { text-align: right; font-size: 12px; color: #94a3b8; display: flex; flex-direction: column; gap: 5px; }
.lp-foot-dev a { color: #a5b4fc; text-decoration: none; font-weight: 600; }
.lp-foot-dev a:hover { text-decoration: underline; }

/* ── ไล่สีของไอคอน (ใช้ร่วมกับ app.css) ─────────────────── */
.lp-body .g-indigo  { background: linear-gradient(135deg, #6366f1, #4f46e5); }
.lp-body .g-emerald { background: linear-gradient(135deg, #10b981, #059669); }
.lp-body .g-sky     { background: linear-gradient(135deg, #0ea5e9, #0284c7); }
.lp-body .g-rose    { background: linear-gradient(135deg, #f43f5e, #e11d48); }
.lp-body .g-amber   { background: linear-gradient(135deg, #f59e0b, #d97706); }
.lp-body .g-violet  { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }

/* ── จอเล็ก ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .lp-stat-grid { grid-template-columns: repeat(3, 1fr); }
  .lp-role-wrap { grid-template-columns: 1fr; gap: 26px; }
  .lp-foot-in { grid-template-columns: 1fr 1fr; }
  .lp-foot-dev { grid-column: 1 / -1; text-align: left; }
}
@media (max-width: 768px) {
  .lp-menu {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; gap: 2px; background: #fff; padding: 10px 16px 14px;
    border-bottom: 1px solid #e2e8f0; box-shadow: 0 12px 26px rgba(15, 23, 42, .1);
  }
  .lp-menu.is-open { display: flex; }
  .lp-menu a { padding: 11px 12px; font-size: 14.5px; }
  .lp-burger { display: block; }
  .lp-nav-cta .lp-btn { padding: 8px 12px; font-size: 12.5px; }
  .lp-nav-in { gap: 10px; }
  .lp-brand-txt small { display: none; }

  .lp-hero { padding: 52px 0 56px; }
  .lp-title { font-size: 28px; }
  .lp-sub { font-size: 14.5px; }
  .lp-btn-lg { padding: 12px 20px; font-size: 14px; width: 100%; }
  .lp-cta { flex-direction: column; }

  .lp-stat-grid { grid-template-columns: repeat(2, 1fr); margin-top: -30px; }
  .lp-stat { padding: 15px 10px; border-radius: 15px; }
  .lp-stat-n { font-size: 22px; }

  .lp-sec { padding: 46px 0; }
  .lp-sec-head h2, .lp-cta-band h2 { font-size: 22px; }
  .lp-foot-in { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .lp-stat-grid { grid-template-columns: repeat(2, 1fr); }
  .lp-title { font-size: 24px; }
}
