/* =====================================================================
   EduCare Hub — ธีมหน้าแรก (หน้าสาธารณะ ก่อนเข้าสู่ระบบ)
   ใช้ภาษาการออกแบบชุดเดียวกับหน้าในระบบ: พื้นครีมอุ่น · การ์ดโค้ง · ไอคอนสติกเกอร์
   โหลดเฉพาะ body.page-home (ดู includes/header.php) จึงไม่กระทบหน้าเข้าสู่ระบบ
   ===================================================================== */

body.page-home {
  --lu-cream: #fbf7f1;
  --lu-ink:   #1c2925;
  --lu-muted: #7c8a84;
  --lu-green: #167052;
  --lu-line:  #efe7dc;

  --lu-mint:   #d9f0e4;  --lu-mint-i:   #126b4f;
  --lu-peach:  #ffe3cd;  --lu-peach-i:  #c9621f;
  --lu-lilac:  #e4e0fd;  --lu-lilac-i:  #5b49c9;
  --lu-butter: #ffeeb8;  --lu-butter-i: #a5750a;

  background:
    radial-gradient(circle at 100% -4%, rgba(255, 214, 176, .5), transparent 24rem),
    radial-gradient(circle at 0% 10%, rgba(190, 232, 212, .48), transparent 22rem),
    var(--lu-cream);
}

/* ---------- หัวเว็บ ---------- */
body.page-home .topbar { background: #104c3a; }
body.page-home .site-header {
  background: rgba(251, 247, 241, .88);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 0; box-shadow: none;
}
@supports not ((backdrop-filter: blur(2px)) or (-webkit-backdrop-filter: blur(2px))) {
  body.page-home .site-header { background: var(--lu-cream); }
}
body.page-home .brand b { color: var(--lu-ink); }
body.page-home .brand span { color: var(--lu-muted); }

/* ---------- ฮีโร่ ---------- */
body.page-home .hero { padding: 10px 0 0; }
body.page-home .hero .container { padding-left: 16px; padding-right: 16px; }
body.page-home .land-hero {
  position: relative; overflow: hidden; isolation: isolate; color: #fff;
  border-radius: 34px; padding: 54px 44% 54px 48px; min-height: 400px;
  display: flex; flex-direction: column; justify-content: center;
  background: linear-gradient(135deg, #0f5a44 0%, #17795a 48%, #2aa87c 100%);
  box-shadow: 0 26px 60px rgba(20, 92, 69, .28);
}
/* วงกลมตกแต่งจาง ๆ ให้ดูมีมิติ */
body.page-home .land-hero::before {
  content: ''; position: absolute; z-index: -1; right: -70px; top: -110px;
  width: 300px; height: 300px; border-radius: 50%; border: 54px solid rgba(255, 255, 255, .06);
}
body.page-home .land-hero::after {
  content: ''; position: absolute; z-index: -1; left: -60px; bottom: -90px;
  width: 210px; height: 210px; border-radius: 50%; background: rgba(255, 255, 255, .05);
}
body.page-home .land-eyebrow {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
  font-size: .8rem; font-weight: 600; padding: 7px 15px; border-radius: 999px;
  background: rgba(255, 255, 255, .15); border: 1px solid rgba(255, 255, 255, .22); margin-bottom: 18px;
}
body.page-home .land-hero h1 {
  color: #fff; font-size: clamp(2.4rem, 5.2vw, 4rem); line-height: 1.1; margin: 0 0 14px; letter-spacing: -.5px;
}
body.page-home .land-hero p {
  color: rgba(255, 255, 255, .86); font-size: 1.03rem; line-height: 1.7; margin: 0 0 26px; max-width: 30em;
}
body.page-home .land-cta { display: flex; gap: 11px; flex-wrap: wrap; }
body.page-home .land-cta .btn { min-height: 50px; padding: 13px 26px; border-radius: 15px; font-size: .98rem; font-weight: 700; }
body.page-home .land-cta .btn-primary { background: #fff; color: #12674e; border: 0; box-shadow: 0 10px 26px rgba(0, 0, 0, .16); }
body.page-home .land-cta .btn-primary:hover { background: #f2fbf7; transform: translateY(-1px); }
body.page-home .land-cta .btn-ghost {
  background: rgba(255, 255, 255, .14); color: #fff; border: 1px solid rgba(255, 255, 255, .3);
}
body.page-home .land-cta .btn-ghost:hover { background: rgba(255, 255, 255, .24); }
body.page-home .land-art {
  position: absolute; right: 1%; bottom: 0; width: min(46%, 520px); height: 88%;
  object-fit: contain; object-position: right bottom; pointer-events: none; z-index: -1;
}

/* ---------- หัวข้อหมวด ---------- */
body.page-home .land-sec { margin: 46px 0 16px; text-align: center; }
body.page-home .land-sec .lb {
  display: inline-block; font-size: .76rem; font-weight: 700; letter-spacing: 1px;
  color: var(--lu-green); background: var(--lu-mint); border-radius: 999px; padding: 5px 14px; margin-bottom: 10px;
}
body.page-home .land-sec h2 { margin: 0; font-size: clamp(1.5rem, 3.2vw, 2.05rem); color: var(--lu-ink); }
body.page-home .land-sec p { color: var(--lu-muted); margin: 8px auto 0; max-width: 34em; font-size: .95rem; line-height: 1.7; }

/* ---------- การ์ดความสามารถ ---------- */
body.page-home .land-feats {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 22px;
}
body.page-home .land-feat {
  background: #fff; border: 1px solid var(--lu-line); border-radius: 24px; padding: 22px 20px;
  box-shadow: 0 8px 24px rgba(31, 75, 60, .06); transition: .18s ease;
}
body.page-home .land-feat:hover { transform: translateY(-3px); box-shadow: 0 18px 38px rgba(31, 75, 60, .12); }
body.page-home .land-feat .ic {
  width: 52px; height: 52px; border-radius: 17px; display: grid; place-items: center;
  font-size: 1.6rem; margin-bottom: 14px; transform: rotate(-6deg);
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .05);
}
body.page-home .land-feat b { display: block; font-size: 1.04rem; color: var(--lu-ink); margin-bottom: 4px; }
body.page-home .land-feat small { color: var(--lu-muted); font-size: .84rem; line-height: 1.6; }
body.page-home .land-feat:nth-child(1) .ic { background: var(--lu-mint);   color: var(--lu-mint-i); }
body.page-home .land-feat:nth-child(2) .ic { background: var(--lu-peach);  color: var(--lu-peach-i); }
body.page-home .land-feat:nth-child(3) .ic { background: var(--lu-lilac);  color: var(--lu-lilac-i); }
body.page-home .land-feat:nth-child(4) .ic { background: var(--lu-butter); color: var(--lu-butter-i); }

/* ---------- ไทล์ตัวเลข ---------- */
body.page-home .land-stats {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 16px;
}
body.page-home .land-stat {
  position: relative; overflow: hidden; border-radius: 24px; padding: 22px 20px;
  border: 1px solid var(--lu-line); background: #fff; box-shadow: 0 8px 24px rgba(31, 75, 60, .06);
}
body.page-home .land-stat b { display: block; font-size: 2.4rem; font-weight: 700; line-height: 1.1; color: var(--lu-ink); }
body.page-home .land-stat span { display: block; font-size: .86rem; color: var(--lu-muted); margin-top: 4px; }
/* ไอคอนสติกเกอร์มุมขวาบน — ทรงเดียวกับที่ใช้ในหน้าหลังบ้าน */
body.page-home .land-stat i {
  position: absolute; right: 14px; top: 14px; width: 44px; height: 44px; border-radius: 14px;
  font-style: normal; display: grid; place-items: center; font-size: 1.3rem;
  transform: rotate(-6deg); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .05);
}
body.page-home .land-stat:nth-child(1) { background: #edf9f2; border-color: #cdeadb; }
body.page-home .land-stat:nth-child(1) i { background: var(--lu-mint); }
body.page-home .land-stat:nth-child(2) { background: #fff4ea; border-color: #ffdfc4; }
body.page-home .land-stat:nth-child(2) i { background: var(--lu-peach); }
body.page-home .land-stat:nth-child(3) { background: #f2f0ff; border-color: #ded8fb; }
body.page-home .land-stat:nth-child(3) i { background: var(--lu-lilac); }
body.page-home .land-stat:nth-child(4) { background: #fff8e4; border-color: #ffe6a8; }
body.page-home .land-stat:nth-child(4) i { background: var(--lu-butter); }

/* ---------- แถบชวนเข้าสู่ระบบท้ายหน้า ---------- */
body.page-home .land-foot {
  margin: 46px 0 10px; border-radius: 28px; padding: 34px 32px; text-align: center;
  background: linear-gradient(135deg, #17795a, #2aa87c); color: #fff;
  box-shadow: 0 18px 44px rgba(20, 92, 69, .24);
}
body.page-home .land-foot h3 { color: #fff; margin: 0 0 6px; font-size: 1.45rem }
body.page-home .land-foot p { color: rgba(255, 255, 255, .84); margin: 0 0 18px; font-size: .93rem }
body.page-home .land-foot .btn {
  background: #fff; color: #12674e; border: 0; min-height: 48px; padding: 12px 30px;
  border-radius: 14px; font-weight: 700;
}

body.page-home .site-footer { color: var(--lu-muted); }

/* ---------- จอกลาง ---------- */
@media (max-width: 980px) {
  body.page-home .land-hero { padding: 44px 38% 44px 34px; min-height: 340px; border-radius: 28px; }
  body.page-home .land-feats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.page-home .land-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- เมนูบนมือถือ ----------
   หน้าแรกมีลิงก์แค่ 2 อัน และ "หน้าแรก" ก็คือหน้าที่ยืนอยู่แล้ว
   จึงไม่ต้องใช้ปุ่มแฮมเบอร์เกอร์ — โชว์ปุ่มเข้าสู่ระบบไว้บนหัวเลย สะอาดกว่า */
@media (max-width: 760px) {
  body.page-home .burger { display: none !important; }
  body.page-home .nav {
    display: flex !important; position: static; width: auto; padding: 0; gap: 0;
    background: none; border: 0; box-shadow: none; border-radius: 0;
  }
  body.page-home .nav > a:not(.btn) { display: none; }   /* ซ่อน "หน้าแรก" */
  body.page-home .nav > a.btn {
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--lu-green); color: #fff; border: 0; border-radius: 13px;
    padding: 10px 18px; min-height: 42px; font-size: .88rem; font-weight: 700;
    box-shadow: 0 6px 16px rgba(20, 92, 69, .24);
  }
  body.page-home .nav > a.btn:hover { background: #12674e; }
}

/* ---------- มือถือ ---------- */
@media (max-width: 700px) {
  body.page-home .hero .container { padding-left: 14px; padding-right: 14px; }
  body.page-home .land-hero {
    padding: 34px 22px 210px; min-height: 0; border-radius: 26px; text-align: left;
  }
  body.page-home .land-hero h1 { font-size: 2.1rem }
  body.page-home .land-hero p { font-size: .93rem; margin-bottom: 20px }
  body.page-home .land-cta { gap: 9px }
  body.page-home .land-cta .btn { flex: 1 1 auto; justify-content: center; min-height: 46px; padding: 12px 18px }
  /* ย้ายภาพการ์ตูนลงล่าง ให้ตัวหนังสือเต็มความกว้าง */
  body.page-home .land-art { width: 74%; height: 200px; right: 50%; transform: translateX(50%); bottom: 6px }
  body.page-home .land-sec { margin: 34px 0 12px }
  body.page-home .land-feat { padding: 18px 16px; border-radius: 20px }
  body.page-home .land-feat .ic { width: 46px; height: 46px; border-radius: 15px; font-size: 1.4rem; margin-bottom: 10px }
  body.page-home .land-stat { padding: 18px 16px; border-radius: 20px }
  body.page-home .land-stat b { font-size: 2rem }
  body.page-home .land-foot { padding: 28px 20px; border-radius: 24px; margin-top: 34px }
}

@media (max-width: 420px) {
  body.page-home .land-feats { grid-template-columns: 1fr }
}
