/* ==========================================================================
   หน้าแรก — ส่วนรับสมัครนักเรียน ปีการศึกษา 2570 (สไตล์น่ารัก สมวัยเด็กประถม) v1.0 · 4 ธ.ค. 2569
   ปิดการเคลื่อนไหวทั้งหมดได้จากปุ่ม "เอฟเฟกต์เคลื่อนไหว: ปิด" ท้ายหน้า (html.fx-off)
   ========================================================================== */
.adm { --pk: #ff6fa8; --or: #ff9f1c; --yl: #ffd23f; --sky: #4cc9f0; --gr: #2ec27e; --pu: #9b5de5; --ink-k: #3b2a5a;
  position: relative; overflow: hidden; isolation: isolate; padding: clamp(64px, 8vw, 110px) 0 clamp(120px, 12vw, 150px);
  background: linear-gradient(180deg, #bfe9ff 0%, #e3f6ff 38%, #f3fff0 72%, #d9f7c9 100%); font-family: 'Mali', 'Kanit', sans-serif; color: var(--ink-k); }
.adm::after { content: ""; position: absolute; left: -5%; right: -5%; bottom: -60px; height: 160px; z-index: -1; border-radius: 50% 50% 0 0 / 100% 100% 0 0; background: linear-gradient(180deg, #8ee26b, #4fbf4a); box-shadow: inset 0 14px 0 rgba(255, 255, 255, .25); }
.adm-in { position: relative; z-index: 1; }
.adm h2, .adm h3, .adm h4 { font-family: 'Mali', 'Kanit', sans-serif; color: var(--ink-k); }

/* ---------- ท้องฟ้า: ดวงอาทิตย์ เมฆ รุ้ง ลูกโป่ง ดาว ---------- */
.adm-sky { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.adm-sun { position: absolute; top: 34px; right: 6%; width: 96px; height: 96px; border-radius: 50%; background: radial-gradient(circle, #fff6a8 0 40%, #ffd23f 41% 62%, transparent 63%);
  box-shadow: 0 0 60px 20px rgba(255, 210, 63, .45); animation: admSpin 18s linear infinite; }
.adm-sun::before { content: ""; position: absolute; inset: -22px; border-radius: 50%; background: repeating-conic-gradient(rgba(255, 196, 0, .75) 0 10deg, transparent 10deg 30deg);
  -webkit-mask: radial-gradient(circle, transparent 52%, #000 53%); mask: radial-gradient(circle, transparent 52%, #000 53%); }
@keyframes admSpin { to { transform: rotate(360deg); } }
.adm-cloud { position: absolute; width: 150px; height: 46px; border-radius: 50px; background: #fff; opacity: .95; filter: drop-shadow(0 8px 10px rgba(76, 201, 240, .25)); animation: admDrift 38s linear infinite; }
.adm-cloud::before, .adm-cloud::after { content: ""; position: absolute; background: #fff; border-radius: 50%; }
.adm-cloud::before { width: 64px; height: 64px; left: 22px; top: -32px; }
.adm-cloud::after { width: 84px; height: 84px; right: 18px; top: -46px; }
.adm-cloud.c1 { top: 70px; left: -12%; }
.adm-cloud.c2 { top: 180px; left: -30%; transform: scale(.7); animation-duration: 52s; animation-delay: -18s; }
.adm-cloud.c3 { top: 40%; left: -20%; transform: scale(.55); opacity: .8; animation-duration: 46s; animation-delay: -30s; }
@keyframes admDrift { to { translate: 135vw 0; } }
.adm-rainbow { position: absolute; left: -90px; top: 120px; width: 300px; height: 150px; border-radius: 300px 300px 0 0; opacity: .55;
  background: radial-gradient(circle at 50% 100%, transparent 0 46%, #9b5de5 46% 52%, #4cc9f0 52% 58%, #2ec27e 58% 64%, #ffd23f 64% 70%, #ff9f1c 70% 76%, #ff6fa8 76% 82%, transparent 82%); }
.adm-balloon { position: absolute; bottom: -120px; width: 46px; height: 58px; border-radius: 50% 50% 48% 48%; background: radial-gradient(circle at 32% 30%, rgba(255, 255, 255, .8) 0 10%, transparent 11%), var(--c);
  animation: admRise 16s linear infinite; }
.adm-balloon::after { content: ""; position: absolute; left: 50%; top: 100%; width: 1.5px; height: 60px; background: rgba(59, 42, 90, .35); }
.adm-balloon.b1 { --c: #ff6fa8; left: 4%; }
.adm-balloon.b2 { --c: #ffd23f; left: 93%; animation-delay: -6s; animation-duration: 19s; }
.adm-balloon.b3 { --c: #4cc9f0; left: 48%; animation-delay: -11s; animation-duration: 22s; width: 36px; height: 46px; }
@keyframes admRise { 0% { transform: translate(0, 0) rotate(-4deg); } 50% { transform: translate(18px, -60vh) rotate(5deg); } 100% { transform: translate(-10px, -130vh) rotate(-4deg); } }
.adm-star { position: absolute; font-size: 22px; color: #ffc300; text-shadow: 0 0 10px rgba(255, 195, 0, .7); animation: admTwinkle 2.6s ease-in-out infinite; }
.adm-star.s1 { top: 16%; left: 18%; } .adm-star.s2 { top: 26%; right: 20%; color: #ff6fa8; animation-delay: -.8s; }
.adm-star.s3 { top: 55%; left: 3%; font-size: 16px; animation-delay: -1.4s; } .adm-star.s4 { top: 62%; right: 3%; color: #9b5de5; animation-delay: -2s; }
@keyframes admTwinkle { 0%, 100% { transform: scale(.6) rotate(0); opacity: .4; } 50% { transform: scale(1.2) rotate(30deg); opacity: 1; } }

/* ---------- หัวเรื่อง ---------- */
.adm-head { text-align: center; max-width: 900px; margin: 0 auto 34px; }
.adm-badge { display: inline-block; padding: 6px 18px; border-radius: 999px; background: #fff; border: 3px dashed var(--gr); font-weight: 600; color: #1d7a4c; box-shadow: 0 6px 0 rgba(46, 194, 126, .25); }
.adm-title { margin: 18px 0 6px; font-size: clamp(2rem, 1.2rem + 4vw, 4rem); font-weight: 700; line-height: 1.2; }
.adm-title span { display: inline-block; }
.adm-title .w1 { color: var(--pk); text-shadow: 3px 3px 0 #fff, 6px 6px 0 rgba(255, 111, 168, .25); }
.adm-title .w2 { color: #e0459a; text-shadow: 3px 3px 0 #fff, 6px 6px 0 rgba(224, 69, 154, .25); }
.adm-title .w3 { display: block; color: var(--or); text-shadow: 3px 3px 0 #fff, 6px 6px 0 rgba(255, 159, 28, .3); }
.fx .adm-title.is-in .w1 { animation: admJelly .9s .2s both; } .fx .adm-title.is-in .w2 { animation: admJelly .9s .35s both; } .fx .adm-title.is-in .w3 { animation: admJelly .9s .5s both; }
@keyframes admJelly { 0% { transform: scale(.3); opacity: 0; } 40% { transform: scale(1.12, .9); opacity: 1; } 60% { transform: scale(.94, 1.06); } 80% { transform: scale(1.03, .98); } 100% { transform: none; } }
.adm-move { display: inline-flex; align-items: center; gap: 10px; margin: 8px 0 0; padding: 8px 22px; border-radius: 18px; font: 700 clamp(1.2rem, 1rem + 1vw, 1.7rem) 'Mali', sans-serif; color: #fff; background: linear-gradient(135deg, #ff9f1c, #ff6f3c); box-shadow: 0 8px 0 #d9541e, 0 18px 24px -12px rgba(217, 84, 30, .7); transform: rotate(-2deg); }
.adm-move span { display: inline-block; animation: admWiggle 1.6s ease-in-out infinite; }
.adm-move span:last-child { animation-delay: -.8s; }
@keyframes admWiggle { 0%, 100% { transform: rotate(-12deg); } 50% { transform: rotate(12deg) translateY(-3px); } }
.adm-slogan { margin: 22px auto 0; max-width: 46em; font-weight: 600; color: #1d7a4c; font-size: clamp(.98rem, .9rem + .3vw, 1.12rem); }

/* นับถอยหลัง */
.adm-count { margin: 22px auto 0; display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 12px; padding: 14px 20px; border-radius: 26px; background: rgba(255, 255, 255, .85); border: 3px solid #fff; box-shadow: 0 10px 30px -14px rgba(76, 201, 240, .9); }
.adm-count-lb { width: 100%; font-weight: 600; color: #6b4fa8; }
.adm-count-box { min-width: 78px; padding: 8px 10px; border-radius: 18px; background: linear-gradient(180deg, #fff, #f2e9ff); border: 2px solid #e2d3ff; box-shadow: 0 5px 0 #d4c1fb; }
.adm-count-box:nth-of-type(2) { background: linear-gradient(180deg, #fff, #e4f8ff); border-color: #bfeaff; box-shadow: 0 5px 0 #9fdcf7; }
.adm-count-box:nth-of-type(3) { background: linear-gradient(180deg, #fff, #ffeef6); border-color: #ffd0e5; box-shadow: 0 5px 0 #ffb3d4; }
.adm-count-box b { display: block; font: 700 2rem/1.1 'Mali', sans-serif; color: var(--ink-k); font-variant-numeric: tabular-nums; }
.adm-count-box small { font-weight: 600; color: #7a6a99; }
.adm-count.is-open .adm-count-lb { color: #1d7a4c; }
.adm-count.is-open { border-color: var(--gr); }
.adm-count .adm-open-msg { font: 700 1.25rem 'Mali', sans-serif; color: #1d7a4c; }
.fx .adm-count-box b.tick { animation: admTick .5s ease; }
@keyframes admTick { 40% { transform: translateY(-5px) scale(1.15); color: var(--pk); } }

/* ---------- ระดับชั้น ---------- */
.adm-levels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.adm-lv { position: relative; padding: 20px 20px 22px; border-radius: 32px; background: #fff; border: 4px solid var(--lc); box-shadow: 0 12px 0 var(--ls), 0 26px 40px -22px rgba(59, 42, 90, .4); transition: transform .35s cubic-bezier(.34, 1.56, .64, 1); }
.adm-lv:hover { transform: translateY(-6px) rotate(-.6deg); }
.lv-k { --lc: #7cc6ff; --ls: #4ea7ec; --lt: #e8f5ff; }
.lv-p { --lc: #7ddf9a; --ls: #3fb867; --lt: #eafbef; }
.adm-lv-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.adm-lv-ic { width: 70px; height: 70px; flex: 0 0 70px; border-radius: 24px; display: grid; place-items: center; font-size: 2.3rem; background: var(--lt); border: 3px solid var(--lc); }
.fx .adm-lv-ic { animation: admBounce 2.4s ease-in-out infinite; }
.lv-p .adm-lv-ic { animation-delay: -1.2s; }
@keyframes admBounce { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-8px) rotate(4deg); } }
.adm-lv-head h3 { font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem); font-weight: 700; }
.adm-age { margin: 2px 0 0; display: inline-block; padding: 2px 12px; border-radius: 999px; background: #fff4c2; color: #7a5600; font-weight: 600; font-size: .92rem; }
.adm-track { margin-top: 14px; padding: 14px; border-radius: 22px; background: var(--lt); }
.adm-track h4 { font-size: 1.08rem; font-weight: 700; margin: 0 0 10px; }
.adm-star-i { display: inline-block; animation: admTwinkle 2.4s ease-in-out infinite; }
.adm-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; counter-reset: s; }
.adm-steps li { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; padding: 10px 6px 12px; border-radius: 18px; background: #fff; border: 2px dashed var(--lc); }
.adm-steps li + li::before { content: "➜"; position: absolute; left: -12px; top: 22px; font-size: .9rem; color: var(--ls); }
.adm-steps i { font-style: normal; font-size: 1.6rem; line-height: 1.2; }
.adm-steps small { font-size: .78rem; line-height: 1.3; color: #6d5d8a; min-height: 2.6em; display: flex; align-items: center; }
.adm-steps b { font-size: .92rem; line-height: 1.3; color: var(--ink-k); }
.fx .adm-lv.is-in .adm-steps li { animation: admPop .6s cubic-bezier(.34, 1.56, .64, 1) both; }
.fx .adm-lv.is-in .adm-steps li:nth-child(2) { animation-delay: .12s; } .fx .adm-lv.is-in .adm-steps li:nth-child(3) { animation-delay: .24s; } .fx .adm-lv.is-in .adm-steps li:nth-child(4) { animation-delay: .36s; }
@keyframes admPop { 0% { transform: scale(.4); opacity: 0; } 100% { transform: none; opacity: 1; } }
.adm-steps li:hover i { animation: admWiggle .6s ease-in-out 2; }

/* ---------- สิทธิพิเศษ ---------- */
.adm-perks { margin-top: 26px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.adm-perk { position: relative; padding: 20px 22px; border-radius: 30px; background: #fff; border: 4px solid var(--pc); box-shadow: 0 10px 0 var(--ps); }
.pk-k { --pc: #ffb3d4; --ps: #ff8cbf; } .pk-p { --pc: #ffd98a; --ps: #f6b73c; }
.adm-perk h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 1.25rem; font-weight: 700; margin: 0 0 10px; }
.adm-perk h3 em { font-style: normal; font-size: .9rem; padding: 3px 12px; border-radius: 999px; color: #fff; background: linear-gradient(135deg, #ff6fa8, #e0459a); box-shadow: 0 4px 0 #b8327c; }
.fx .adm-perk h3 em { animation: admPulse 1.8s ease-in-out infinite; }
@keyframes admPulse { 50% { transform: scale(1.08); } }
.adm-perk ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.adm-perk li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 12px; border-radius: 16px; background: #fffaf0; font-family: 'Sarabun', sans-serif; font-size: 1rem; line-height: 1.5; color: #3a3350; transition: transform .25s, background .25s; }
.adm-perk li:hover { transform: translateX(6px); background: #fff1f7; }
.adm-perk li i { font-style: normal; font-size: 1.3rem; line-height: 1.2; }

/* ---------- ช่องทาง เอกสาร ติดต่อ ---------- */
.adm-info { margin-top: 26px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.adm-card { position: relative; padding: 20px 20px 22px; border-radius: 30px; background: rgba(255, 255, 255, .95); border: 4px solid #c8b6ff; box-shadow: 0 10px 0 #a58bf5; }
.adm-card:nth-child(2) { border-color: #9be7c4; box-shadow: 0 10px 0 #5cc995; }
.adm-card:nth-child(3) { border-color: #9fdcf7; box-shadow: 0 10px 0 #5ab9e6; }
.adm-card h3 { font-size: 1.2rem; font-weight: 700; margin: 0 0 12px; }
.adm-ch { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 10px; font-family: 'Sarabun', sans-serif; }
.adm-ch li { padding: 10px 14px; border-radius: 16px; background: #f5f0ff; }
.adm-ch b { display: block; font-family: 'Mali', sans-serif; color: var(--ink-k); }
.adm-ch span { font-size: .93rem; color: #5b4f75; }
.adm-poster-btn { display: block; width: 100%; padding: 0; border: 0; border-radius: 18px; overflow: hidden; background: #fff; cursor: zoom-in; box-shadow: 0 8px 18px -10px rgba(59, 42, 90, .6); }
.adm-poster-btn img { display: block; width: 100%; height: auto; transition: transform .6s ease; }
.adm-poster-btn:hover img { transform: scale(1.05); }
.adm-poster-btn span { display: block; padding: 8px 10px; font-weight: 600; font-size: .9rem; color: #fff; background: linear-gradient(135deg, #9b5de5, #6b3fd4); }
.adm-tip { margin: -6px 0 8px; font-size: .88rem; color: #1d7a4c; }
.adm-docs { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.adm-docs button { width: 100%; display: flex; align-items: flex-start; gap: 10px; text-align: left; padding: 8px 10px; border-radius: 14px; border: 2px solid #d6f5e6; background: #f4fdf8; font: 500 .93rem/1.45 'Sarabun', sans-serif; color: #2f3b36; cursor: pointer; transition: background .25s, border-color .25s, transform .2s; }
.adm-docs button::before { content: ""; flex: 0 0 22px; height: 22px; margin-top: 1px; border-radius: 8px; border: 2.5px solid #5cc995; background: #fff; transition: all .25s; }
.adm-docs button em { font-style: normal; margin-left: auto; white-space: nowrap; padding-left: 6px; color: #1d7a4c; font-weight: 600; }
.adm-docs button:hover { transform: translateX(3px); border-color: #9be7c4; }
.adm-docs button[aria-pressed="true"] { background: #dcfbe9; border-color: #5cc995; color: #1d5c3d; }
.adm-docs button[aria-pressed="true"]::before { content: "✓"; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: .9rem; background: #2ec27e; border-color: #2ec27e; animation: admPop .4s cubic-bezier(.34, 1.56, .64, 1); }
.adm-docbar { margin-top: 12px; height: 12px; border-radius: 999px; background: #eef3f0; overflow: hidden; }
.adm-docbar span { display: block; height: 100%; width: 0; border-radius: inherit; background: repeating-linear-gradient(45deg, #2ec27e 0 10px, #4fd896 10px 20px); transition: width .5s cubic-bezier(.34, 1.56, .64, 1); }
.adm-docdone { margin: 10px 0 0; font-weight: 700; color: #1d7a4c; text-align: center; }
.fx .adm-docdone:not([hidden]) { animation: admJelly .8s both; }
.adm-tel { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.adm-tel a { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 18px; text-decoration: none; background: #eef9ff; border: 2px solid #cbeefe; transition: transform .25s, background .25s; }
.adm-tel a:hover { transform: scale(1.03); background: #dff4ff; }
.adm-tel i { width: 42px; height: 42px; flex: 0 0 42px; border-radius: 14px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #4cc9f0, #2a8fd6); }
.fx .adm-tel a:hover i { animation: admRing .5s ease-in-out 2; }
@keyframes admRing { 25% { transform: rotate(-15deg); } 75% { transform: rotate(15deg); } }
.adm-tel b { display: block; font: 700 1.2rem 'Mali', sans-serif; color: var(--ink-k); }
.adm-tel small { color: #4f6b7d; font-family: 'Sarabun', sans-serif; }
.adm-note { margin: 12px 0 0; font-size: .86rem; color: #6d5d8a; }
.adm-kids { display: flex; justify-content: center; gap: 14px; margin-top: 12px; font-size: 2.6rem; }
.adm-kids span { display: inline-block; animation: admBounce 2s ease-in-out infinite; }
.adm-kids span + span { animation-delay: -1s; }

/* ---------- รถไฟวิ่ง ---------- */
.adm-train { position: absolute; left: 0; right: 0; bottom: 18px; height: 56px; z-index: 1; pointer-events: none; overflow: hidden; }
.adm-train::before { content: ""; position: absolute; left: 0; right: 0; bottom: 6px; height: 6px; background: repeating-linear-gradient(90deg, #8a5a2b 0 18px, transparent 18px 30px); opacity: .55; }
.adm-train-in { position: absolute; bottom: 10px; left: 0; display: inline-flex; gap: 2px; font-size: 40px; line-height: 1; white-space: nowrap; animation: admTrain 24s linear infinite; }
.adm-train-in i { font-style: normal; display: inline-block; animation: admChug .5s ease-in-out infinite alternate; }
.adm-train-in i:nth-child(2) { animation-delay: -.15s; } .adm-train-in i:nth-child(3) { animation-delay: -.3s; }
@keyframes admTrain { from { transform: translateX(calc(100vw + 40px)); } to { transform: translateX(-260px); } }
@keyframes admChug { to { transform: translateY(-3px); } }
/* รถไฟวิ่งจากขวาไปซ้าย ให้หัวรถจักร (หันซ้าย) นำขบวน */

/* ---------- เอฟเฟกต์ปรากฏ (ต่อยอด .rv ของหน้าแรก) ---------- */
.fx .adm-lv.rv:not(.is-in), .fx .adm-perk.rv:not(.is-in), .fx .adm-card.rv:not(.is-in) { transform: translateY(50px) scale(.9) rotate(-2deg); }
.fx .adm-badge.rv:not(.is-in), .fx .adm-move.rv:not(.is-in), .fx .adm-count.rv:not(.is-in) { transform: scale(.6); }
.fx .adm-title.rv:not(.is-in) { transform: none; }

/* ---------- จอเล็ก ---------- */
@media (max-width: 991px) {
  .adm-levels, .adm-perks { grid-template-columns: 1fr; }
  .adm-info { grid-template-columns: 1fr 1fr; }
  .adm-info .adm-card:last-child { grid-column: 1 / -1; }
}
@media (max-width: 767px) {
  .adm-sun { width: 64px; height: 64px; top: 18px; right: 4%; }
  .adm-rainbow { width: 200px; height: 100px; left: -70px; top: 60px; }
  .adm-info { grid-template-columns: 1fr; }
  .adm-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .adm-steps li + li::before { display: none; }
  .adm-lv, .adm-perk, .adm-card { border-radius: 24px; padding: 16px; }
  .adm-count-box { min-width: 70px; }
  .adm-count-box b { font-size: 1.6rem; }
  .adm-train-in { font-size: 30px; }
}

/* ปิดเอฟเฟกต์ (ปุ่มท้ายหน้า) → ทุกอย่างในส่วนรับสมัครหยุดนิ่ง แต่ยังเห็นครบ */
html.fx-off .adm *, html.fx-off .adm *::before, html.fx-off .adm *::after { animation: none !important; transition: none !important; }
html.fx-off .adm-train { display: none; }
