/* =====================================================
   HERO — วิดีโอเต็มจอใต้แถบเมนู (เล่นอัตโนมัติ ปิดเสียง)
   ===================================================== */
.hero {
    /* กรอบสูงตามสัดส่วนรูปจริงเสมอ (--hero-ar ตั้งโดย main.js จากรูปแรก)
       → เห็นภาพเต็มใบทุกขนาดจอและทุกระดับซูม ไม่ถูกตัด/ไม่มีช่องว่างข้าง (จอเตี้ยก็แค่เลื่อนดู) */
    position: relative; width: 100%; height: auto; aspect-ratio: var(--hero-ar, 1910 / 823);
    overflow: hidden; background: #000;
}
@supports not (aspect-ratio: 1 / 1) {
    /* เบราว์เซอร์เก่า: ใช้แบบเดิม */
    .hero { height: calc(100vh - var(--header-h)); height: calc(100svh - var(--header-h)); min-height: 480px; max-height: none; }
}
.hero-bg {
    position: absolute; inset: 0; z-index: 0;
    background-size: cover; background-position: center;
}
/* สไลด์โชว์: ภาพเลื่อนไปทางขวา (รูปใหม่รอทางขวา เลื่อนเข้ามา / รูปเก่าเลื่อนออกทางซ้าย) + รูปที่แสดงอยู่ค่อย ๆ ซูมเข้า */
.hero-slider { position: absolute; inset: 0; z-index: 0; overflow: hidden; background: #000; }
.hero-slide {
    position: absolute; inset: 0; z-index: 0;
    transform: translateX(100%);
    transition: transform 1.1s cubic-bezier(.65, 0, .35, 1);
    will-change: transform;
}
.hero-slide.no-transition { transition: none; }
.hero-slide.wait-left  { transform: translateX(-100%); }               /* กดปุ่มย้อนกลับ: รูปใหม่รอทางซ้าย */
.hero-slide.is-active  { transform: translateX(0);    z-index: 2; }
.hero-slide.is-leaving { transform: translateX(-100%); z-index: 1; }
.hero-slide.is-leaving.to-right { transform: translateX(100%); }        /* กดปุ่มย้อนกลับ: รูปเก่าออกทางขวา */
.hero-slide-img {
    position: absolute; inset: 0;
    background-size: cover; background-position: center;
    transform: scale(1); transform-origin: center;
}
.hero-slide.is-active .hero-slide-img { animation: hero-zoom 8s linear forwards; }
.hero-slider.is-still .hero-slide.is-active .hero-slide-img { animation: none; }   /* ภาพนิ่ง: ไม่ซูม */
@keyframes hero-zoom { from { transform: scale(1); } to { transform: scale(1.08); } }
.hero-arrow {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
    width: 48px; height: 48px; border-radius: 50%; border: 0; padding: 0; cursor: pointer;
    background: rgba(255,255,255,.35); color: #fff;
    display: flex; align-items: center; justify-content: center;
    backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
    box-shadow: 0 2px 10px rgba(0,0,0,.25);
    transition: background .2s, transform .2s;
}
.hero-arrow svg { fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.hero-arrow:hover { background: var(--pink-400); transform: translateY(-50%) scale(1.06); }
.hero-arrow-prev { left: 20px; }
.hero-arrow-next { right: 20px; }
.hero-dots {
    position: absolute; left: 0; right: 0; bottom: 18px; z-index: 5;
    display: flex; justify-content: center; gap: 8px;
}
.hero-dot {
    width: 10px; height: 10px; border-radius: 50%; border: 0; padding: 0; cursor: pointer;
    background: rgba(255,255,255,.55); box-shadow: 0 1px 4px rgba(0,0,0,.3); transition: transform .2s, background .2s;
}
.hero-dot:hover { background: #fff; }
.hero-dot.is-active { background: var(--pink-400); transform: scale(1.25); }
@media (prefers-reduced-motion: reduce) {
    .hero-slide { transition: none; }
    .hero-slide.is-active .hero-slide-img { animation: none; }
}
/* เครื่องเล่น YouTube ขยายให้ครอบเต็มกรอบ hero (main.js คำนวณขนาด/ตำแหน่ง) */
.hero-video-frame { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; opacity: 0; transition: opacity .15s ease; }   /* ซ่อนเร็ว */
.hero-video-frame.is-playing { opacity: 1; transition-duration: .8s; }   /* โชว์ช้า ๆ นุ่ม ๆ */
.hero-shield { position: absolute; inset: 0; z-index: 2; background: transparent; }   /* บังเครื่องเล่นไว้ทั้งหมด */
.hero-video-frame iframe, .hero-video-frame #heroPlayer {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0;
    transform-origin: 0 0;   /* main.js สร้างเครื่องเล่นใหญ่อย่างน้อย 1920x1080 แล้วย่อ/จัดกึ่งกลางให้ครอบกรอบ เพื่อให้ได้สตรีม 1080p */
}

/* =====================================================
   แถบประกาศ / ข้อมูลด่วน
   ===================================================== */
.quick-stats { margin-top: 40px; position: relative; z-index: 5; }
.quick-stats-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
}
.stat-card {
    background: #fff; border-radius: var(--radius); padding: 22px 20px;
    box-shadow: var(--shadow-md); text-align: center; border-top: 4px solid var(--pink-400);
}
.stat-value { font-family: var(--font-head); font-size: 32px; font-weight: 700; color: var(--pink-600); line-height: 1.1; }
.stat-label { color: var(--ink-soft); font-size: 15px; margin-top: 4px; }

/* =====================================================
   เกี่ยวกับโรงเรียน
   ===================================================== */
.about-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 44px; align-items: center; }
.about-figure { position: relative; }
.about-figure img { border-radius: 20px; box-shadow: var(--shadow-md); aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.about-figure::before {
    content: ""; position: absolute; inset: 18px -18px -18px 18px; z-index: -1;
    border-radius: 20px; background: linear-gradient(135deg, var(--pink-200), var(--pink-100));
}
.about-text h2 { font-size: 32px; }
.about-text h2 span { color: var(--pink-600); }
.about-list { display: grid; gap: 14px; margin-top: 18px; }
.about-item { display: flex; gap: 14px; align-items: flex-start; }
.about-icon {
    flex: 0 0 44px; width: 44px; height: 44px; border-radius: 12px;
    background: var(--pink-100); color: var(--pink-600);
    display: grid; place-items: center; font-family: var(--font-head); font-weight: 700;
}
.about-item h4 { margin: 0 0 2px; font-size: 18px; }
.about-item p { margin: 0; color: var(--ink-soft); font-size: 15.5px; }

/* ===== สารต้อนรับ: ข้อความซ้าย + รูปโรงเรียนขวา (สไตล์สารจากผู้บริหาร) ===== */
.dmsg { display: grid; grid-template-columns: 1.25fr 1fr; gap: 56px; align-items: stretch; max-width: 1020px; margin: 0 auto; }   /* แคบกว่ากรอบเนื้อหาปกติ · รูปยืดสูงเท่าข้อความเสมอ */
.dmsg-quote { width: 78px; height: 58px; color: #c9d4e6; margin: 0 0 10px -2px; }   /* เครื่องหมายคำพูดเส้นขอบ (ตามต้นแบบ) */
.dmsg-title { margin: 0 0 16px; font-weight: 700; font-size: 30px; line-height: 1.35; color: var(--pink-700); }
.dmsg-sep { height: 1px; background: var(--line); margin-bottom: 22px; }
.dmsg-para { margin: 0 0 18px; color: var(--ink-soft); font-size: 16px; line-height: 1.9; }
.dmsg-sign { margin-top: 26px; text-align: right; line-height: 1.5; }
.dmsg-sign b { display: block; font-family: var(--font-head); font-weight: 700; font-size: 19px; color: var(--pink-600); }
.dmsg-sign span { font-size: 14.5px; color: var(--muted); }
.dmsg-photo { margin: 0; display: flex; }
.dmsg-photo img { width: 100%; height: 100%; min-height: 320px; object-fit: cover; border-radius: 22px; box-shadow: var(--shadow-md); display: block; }   /* สูงเท่าคอลัมน์ข้อความพอดี */
/* การ์ดคลิปแนะนำโรงเรียน — แสดงแทนรูป about.jpg เมื่อตั้งลิงก์ YouTube ไว้ (ยืดสูงเท่าบล็อกข้อความ เหมือนรูปเดิม) */
.dmsg:has(.dmsg-video) { grid-template-columns: 1fr 1.3fr; gap: 44px; max-width: none; }   /* กว้างเท่ากรอบเนื้อหาส่วนอื่น (container 1180px) · คอลัมน์คลิปกว้างกว่าข้อความ */
.dmsg-video { flex-direction: column; }
/* กรอบสูงเท่าบล็อกข้อความพอดี (ขอบบน-ล่างตรงกัน) · คลิปแสดงครบทั้งภาพ ส่วนที่เหลือเป็นขอบดำ (ปุ่ม YouTube ไม่ถูกตัด) */
.dmsg-video-frame { position: relative; flex: 1; width: 100%; min-height: 320px; background: #000; border-radius: 22px; overflow: hidden; box-shadow: var(--shadow-md); }
.dmsg-video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }

/* วิสัยทัศน์ / พันธกิจ / อัตลักษณ์: การ์ด 3 ใบใต้สาร */
.dmsg-vmi { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 44px; }
.dmsg-vmi-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 24px 24px 22px; box-shadow: var(--shadow-sm); }
.dmsg-vmi-card h4 { margin: 14px 0 6px; font-size: 18px; color: var(--ink); }
.dmsg-vmi-card p { margin: 0; color: var(--ink-soft); font-size: 14.5px; line-height: 1.7; }

/* ===== Putti Smart Center: ภาพรวมเว็บศูนย์กลางบริการดิจิทัล ===== */
.smartc {
    margin-top: 46px; display: grid; grid-template-columns: 1fr 1.15fr; gap: 34px; align-items: center;
    padding: 38px 40px; border-radius: 26px; border: 1px solid #e7e4f3;
    background: linear-gradient(115deg, #eef4ff 0%, #f7f4fd 45%, #fdeff6 100%);
    box-shadow: 0 10px 34px -18px rgba(90, 80, 160, .25);
}
.smartc-title { margin: 10px 0 12px; font-size: 34px; line-height: 1.2; color: #2b3a8f; }
.smartc-title span {
    background: linear-gradient(95deg, #4f7ae6 5%, #8a74e8 45%, #e0447a 90%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
    white-space: nowrap;   /* ชื่อโรงเรียนไม่ตัดกลางคำ — ยาวเกินค่อยขึ้นบรรทัดใหม่ทั้งคำ */
}
.smartc-desc { margin: 0; color: var(--ink-soft); font-size: 15.5px; line-height: 1.75; }
.smartc-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.smartc-chips span {
    display: inline-flex; align-items: center; gap: 7px; padding: 8px 15px; border-radius: 999px;
    background: rgba(255, 255, 255, .85); border: 1px solid #e3def0; font-family: var(--font-head); font-size: 13.5px; color: #4a4560;
}
.smartc-chips svg { width: 16px; height: 16px; fill: #6a7fe6; flex: none; }
.smartc-cta {
    display: inline-flex; align-items: center; gap: 9px; margin-top: 20px; padding: 13px 26px; border-radius: 999px;
    background: linear-gradient(100deg, #4f7ae6, #9a74e6 55%, #e56aa6); color: #fff;
    font-family: var(--font-head); font-weight: 600; font-size: 15.5px;
    box-shadow: 0 10px 22px -10px rgba(110, 100, 220, .55); transition: transform .15s, filter .15s;
}
.smartc-cta:hover { transform: translateY(-1px); filter: brightness(1.06); color: #fff; }
.smartc-cta svg { fill: currentColor; }
.smartc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.smartc-card {
    background: #fff; border: 1px solid #ece8f4; border-radius: 18px; padding: 20px 20px 18px;
    box-shadow: 0 2px 12px rgba(90, 80, 140, .06); transition: transform .15s, box-shadow .15s;
}
.smartc-card:hover { transform: translateY(-3px); box-shadow: 0 12px 26px -12px rgba(90, 80, 160, .3); }
.smartc-ic { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; margin-bottom: 12px; }
.smartc-ic svg { width: 24px; height: 24px; fill: #fff; }
.smartc-ic.is-blue   { background: linear-gradient(135deg, #5b8def, #3d63d1); }
.smartc-ic.is-violet { background: linear-gradient(135deg, #a98cf0, #7a5fe0); }
.smartc-ic.is-teal   { background: linear-gradient(135deg, #2fb9a6, #0e8a7b); }
.smartc-ic.is-pink   { background: linear-gradient(135deg, #f37bb0, #d9406f); }
.smartc-ic.is-indigo { background: linear-gradient(135deg, #8ea0f5, #5666d6); }
.smartc-ic.is-amber  { background: linear-gradient(135deg, #f6b352, #e08a1e); }
/* การ์ดระบบกดเข้าใช้งานได้ทั้งใบ + ลิงก์ "เข้าใช้งาน" ท้ายการ์ด */
a.smartc-card { display: block; color: inherit; }
.smartc-go { display: inline-flex; align-items: center; gap: 5px; margin-top: 11px; font-family: var(--font-head); font-weight: 600; font-size: 13px; color: #5666d6; }
.smartc-go svg { width: 14px; height: 14px; fill: currentColor; transition: transform .15s; }
.smartc-card:hover .smartc-go svg { transform: translateX(3px); }
.smartc-card h4 { margin: 0 0 5px; font-size: 16.5px; color: #2f2a4a; }
.smartc-card p { margin: 0; color: var(--ink-soft); font-size: 13.5px; line-height: 1.6; }

/* =====================================================
   ข่าวประชาสัมพันธ์
   ===================================================== */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.news-card {
    background: #fff; border-radius: var(--radius); overflow: hidden;
    box-shadow: var(--shadow-sm); border: 1px solid var(--line);
    display: flex; flex-direction: column; transition: transform .2s ease, box-shadow .2s ease;
}
.news-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.news-thumb { aspect-ratio: 16/9; background: linear-gradient(135deg, var(--pink-200), var(--pink-100)); position: relative; }
.news-thumb img { width: 100%; height: 100%; object-fit: cover; }
.news-badge {
    position: absolute; top: 12px; left: 12px; background: var(--pink-500); color: #fff;
    font-family: var(--font-head); font-size: 13px; padding: 3px 12px; border-radius: 999px;
}
.news-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.news-date { font-size: 13.5px; color: var(--muted); margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.news-date svg { width: 15px; height: 15px; fill: var(--pink-400); }
.news-title { font-size: 19px; margin-bottom: 8px; }
.news-title a { color: var(--ink); }
.news-title a:hover { color: var(--pink-600); }
.news-excerpt { color: var(--ink-soft); font-size: 15.5px; flex: 1; margin-bottom: 12px; }
.news-more { font-family: var(--font-head); font-weight: 500; font-size: 15px; }

/* =====================================================
   กิจกรรม
   ===================================================== */
.activity-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.activity-card {
    position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/5;
    background: linear-gradient(160deg, var(--pink-300), var(--pink-500)); box-shadow: var(--shadow-sm);
}
.activity-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.activity-card:hover img { transform: scale(1.06); }
.activity-caption {
    position: absolute; inset: auto 0 0 0; padding: 40px 18px 16px; color: #fff;
    background: linear-gradient(180deg, transparent, rgba(120,20,60,.85));
}
.activity-caption h4 { margin: 0; font-size: 18px; }
.activity-caption span { font-size: 13.5px; opacity: .9; }

/* =====================================================
   ระบบสารสนเทศ
   ===================================================== */
.systems-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.system-card {
    display: flex; gap: 16px; align-items: flex-start;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 22px; box-shadow: var(--shadow-sm); color: var(--ink);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.system-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--pink-300); color: var(--ink); }
.system-icon {
    flex: 0 0 52px; width: 52px; height: 52px; border-radius: 14px;
    background: linear-gradient(135deg, var(--pink-400), var(--pink-500)); display: grid; place-items: center;
}
.system-icon svg { width: 26px; height: 26px; fill: #fff; }
.system-card h4 { font-size: 18px; margin-bottom: 4px; }
.system-card p { margin: 0; color: var(--ink-soft); font-size: 15px; }

/* =====================================================
   ติดต่อ (แบนเนอร์ CTA)
   ===================================================== */
.cta {
    background: linear-gradient(120deg, var(--pink-500), var(--pink-400) 60%, var(--pink-300));
    color: #fff; padding: 56px 0; text-align: center;
}
.cta h2 { font-size: 30px; color: #fff; }
.cta p { opacity: .95; max-width: 640px; margin: 0 auto 22px; }


/* =====================================================
   หน้าติดต่อเรา (contact.php)
   ===================================================== */
.page-banner {   /* ลายกราฟิกชมพู (page-banner.jpg) + ชั้นชมพูโปร่งให้ตัวหนังสือขาวอ่านชัด */
    background-image:
        linear-gradient(120deg, rgba(239, 90, 136, .55), rgba(247, 115, 154, .38) 55%, rgba(239, 90, 136, .5)),
        url('../img/page-banner.jpg');
    background-size: cover; background-position: center;
    color: #fff; padding: 46px 0 40px; text-align: center;
    text-shadow: 0 2px 10px rgba(120, 20, 60, .35);
}
.page-banner h1 { margin: 0 0 6px; font-size: clamp(30px, 3.6vw, 42px); font-weight: 700; color: #fff; letter-spacing: .01em; }
.page-banner p  { margin: 0; opacity: .92; font-size: 15.5px; }

.contact-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 36px;
}
.contact-card {
    background: #fff; border-radius: 16px; padding: 24px 22px;
    box-shadow: 0 6px 22px rgba(120,20,60,.08); border: 1px solid var(--pink-100);
    text-align: center; transition: transform .2s, box-shadow .2s;
    display: flex; flex-direction: column; justify-content: center; align-items: center;   /* เนื้อหาอยู่กึ่งกลางแนวตั้งเมื่อการ์ดสูงเท่ากัน */
}
.contact-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(120,20,60,.14); }
.contact-icon {
    width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 12px; flex: 0 0 56px;
    background: var(--pink-100); color: var(--pink-600);
    display: flex; align-items: center; justify-content: center;
}
.contact-icon svg { fill: currentColor; width: 26px; height: 26px; }
.contact-card h3 { margin: 0 0 6px; font-size: 19px; font-weight: 700; color: #4a3542; }   /* เทาอมชมพูเข้ม ไม่ดำสนิท */
.contact-two .card-title { font-weight: 700; color: #4a3542; }   /* หัวข้อ แผนที่ / ส่งข้อความถึงโรงเรียน */
.contact-card p  { margin: 0; color: var(--ink-soft); line-height: 1.6; word-break: break-word; }
.contact-card a  { color: var(--pink-600); font-weight: 500; }

.contact-two { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.map-wrap { position: relative; width: 100%; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: var(--pink-50); }
.map-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map-link {
    display: inline-flex; align-items: center; gap: 8px; margin-top: 14px;
    padding: 10px 16px; border-radius: 999px; font-family: var(--font-head); font-size: 15px;
    background: var(--pink-50); color: var(--pink-600); border: 1px solid var(--pink-200);
    transition: background .2s, color .2s;
}
.map-link:hover { background: var(--pink-500); color: #fff; border-color: var(--pink-500); }
.map-link svg { fill: currentColor; }

.form-intro { margin: -6px 0 18px; color: var(--ink-soft); font-size: 15px; }
/* ฟอร์มติดต่อ: ช่องกรอกขนาดกะทัดรัด */
.contact-form .form-group { margin-bottom: 16px; }
.contact-form .form-group label { display: block; font-family: var(--font-head); font-weight: 600; font-size: 15px; color: #4a3542; margin-bottom: 6px; }
.contact-form .form-control { height: 46px; padding: 0 14px; font-size: 15.5px; border-radius: 10px; background: #fafafb; border-color: #e3dde6; }
.contact-form textarea.form-control { height: auto; min-height: 130px; padding: 10px 14px; }
.contact-form .form-control::placeholder { color: #a39ba8; }
.contact-form .form-control:focus { border-color: var(--pink-400); background-color: #fff; box-shadow: 0 0 0 3px rgba(247, 115, 154, .14); }   /* กรอบชมพูเรืองแสงเหมือนหน้า login */
.form-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-2col .form-group { margin-bottom: 16px; }
.btn-send {   /* ปุ่มส่งข้อความทรงแคปซูล ไล่เฉดชมพู */
    display: inline-flex; align-items: center; gap: 10px;
    padding: 14px 32px; border: 0; border-radius: 999px; cursor: pointer;
    font-family: var(--font-head); font-size: 17px; font-weight: 500; color: #fff;
    background: linear-gradient(135deg, var(--pink-700) 0%, var(--pink-500) 55%, var(--pink-400) 100%);
    box-shadow: 0 8px 20px rgba(217, 64, 111, .32);
    transition: transform .15s, box-shadow .15s, filter .15s;
}
.btn-send svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn-send:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(217, 64, 111, .4); filter: brightness(1.05); }
.btn-send:active { transform: translateY(0); box-shadow: 0 5px 14px rgba(217, 64, 111, .3); }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.alert ul { margin: 0; padding-left: 18px; }

@media (max-width: 960px) {
    .contact-grid { grid-template-columns: repeat(2, 1fr); }
    .contact-two  { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .contact-grid { grid-template-columns: 1fr; gap: 14px; }
    .contact-card { padding: 20px 18px; }
    .contact-icon { width: 50px; height: 50px; flex-basis: 50px; margin-bottom: 10px; }
    .contact-two { gap: 18px; }
    .form-2col { grid-template-columns: 1fr; gap: 0; }
    .contact-form .form-control { height: 44px; font-size: 15px; }
    .btn-send { width: 100%; justify-content: center; padding: 13px 20px; }   /* ปุ่มเต็มความกว้างบนมือถือ กดง่าย */
    .map-link { width: 100%; justify-content: center; }
    .page-banner { padding: 32px 0 28px; }
    .page-banner p { font-size: 14px; padding: 0 8px; }
}

/* ----- ไอคอนดินสอแบบเดียวกันทั่วเว็บไซต์ ----- */
svg.pen { fill: currentColor !important; stroke: none !important; }



/* =====================================================
   RESPONSIVE เฉพาะหน้าแรก (ต้องอยู่ท้าย home.css → โหลดหลังกฎ desktop ด้านบน)
   ===================================================== */
@media (max-width: 1024px) {
    .quick-stats-grid { grid-template-columns: repeat(2, 1fr); }
    .news-grid { grid-template-columns: repeat(2, 1fr); }
    .activity-grid { grid-template-columns: repeat(2, 1fr); }
    .systems-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 960px) {
    /* แท็บเล็ต/มือถือ: กรอบตามสัดส่วนรูปจริงอยู่แล้ว (กฎหลักด้านบน) — เหลือแค่ย่อปุ่มลูกศร */
    .hero-arrow { width: 38px; height: 38px; }
    .hero-arrow svg { width: 22px; height: 22px; }
    .hero-arrow-prev { left: 10px; }
    .hero-arrow-next { right: 10px; }
    .about-grid { grid-template-columns: 1fr; }
    .dmsg { grid-template-columns: 1fr; gap: 26px; }
    .dmsg-photo { order: -1; }   /* มือถือ: รูปโรงเรียนขึ้นก่อน แล้วค่อยข้อความ */
    .dmsg-photo.dmsg-video { order: 0; }   /* คลิปแนะนำ: ข้อความสารต้อนรับขึ้นก่อน แล้วค่อยคลิปด้านล่าง */
    .dmsg-photo img { height: auto; min-height: 0; aspect-ratio: 16 / 10; }
    .dmsg:has(.dmsg-video) { grid-template-columns: 1fr; gap: 26px; }
    .dmsg-video-frame { border-radius: 18px; flex: none; min-height: 0; aspect-ratio: 16 / 9; }   /* มือถือ: กรอบ 16:9 = คลิปพอดีเต็มกรอบ */
    .dmsg-quote { width: 62px; height: 46px; }
    .dmsg-title { font-size: 25px; }
    .dmsg-vmi { grid-template-columns: 1fr; gap: 12px; margin-top: 28px; }
    .smartc { grid-template-columns: 1fr; gap: 22px; padding: 24px 20px; margin-top: 30px; }
    .smartc-title { font-size: 28px; }
}
@media (max-width: 600px) {
    .quick-stats-grid, .news-grid, .activity-grid, .systems-grid { grid-template-columns: 1fr; }
    .smartc-grid { grid-template-columns: 1fr; }
    .smartc-cta { width: 100%; justify-content: center; }
    .activity-card { aspect-ratio: 16/10; }
}

/* =====================================================================
 * ศูนย์กลางบริการดิจิทัลโรงเรียนพุทธิโศภน (Putti Smart Center)
 *   หัวข้อ (ตัวเล็กอังกฤษ + หัวข้อใหญ่ + เส้นไล่สี) → การ์ดระบบ: ภาพหน้าจอด้านบน + ชื่อ + คำอธิบาย + ลิงก์เข้าใช้งาน
 * ===================================================================== */
.psc-head { text-align: center; max-width: 820px; margin: 0 auto 44px; }
.psc-eyebrow { display: block; font-family: var(--font-head); font-weight: 600; font-size: 14px; letter-spacing: .22em; text-transform: uppercase; color: #2f6fe4; }
.psc-title { margin: 12px 0 0; font-weight: 700; font-size: clamp(26px, 3.4vw, 40px); line-height: 1.3; color: #2a1747; }
.psc-bar { display: block; width: 88px; height: 5px; margin: 18px auto 0; border-radius: 99px; background: linear-gradient(90deg, #2f6fe4, #9cc0fb); }
.psc-desc { margin: 20px auto 0; max-width: 760px; color: var(--ink-soft); font-size: 15.5px; line-height: 1.8; }

.psc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.psc-card {
    --c1: #7c4ddb; --c2: #b394f2; --tint: #f3eefe;
    display: flex; flex-direction: column; overflow: hidden; color: inherit;
    background: #fff; border-radius: 20px; border-top: 5px solid var(--c1);
    box-shadow: 0 10px 30px -16px rgba(60, 40, 120, .28);
    transition: transform .2s, box-shadow .2s;
}
.psc-card:hover { transform: translateY(-5px); box-shadow: 0 20px 40px -18px rgba(60, 40, 120, .38); color: inherit; }
.psc-card.is-blue   { --c1: #3d63d1; --c2: #7fa3f2; --tint: #ecf2ff; }
.psc-card.is-teal   { --c1: #0e8a7b; --c2: #5ccdbd; --tint: #e7f7f4; }
.psc-card.is-violet { --c1: #7a5fe0; --c2: #b8a4f4; --tint: #f2eefe; }
.psc-card.is-indigo { --c1: #5666d6; --c2: #a2adf5; --tint: #eef0fd; }
.psc-card.is-pink   { --c1: #d9406f; --c2: #f59bbd; --tint: #fdeef4; }
.psc-card.is-amber  { --c1: #e08a1e; --c2: #f7c27a; --tint: #fdf3e5; }

/* ภาพหน้าจอ (รูปจริง หรือภาพจำลอง) */
.psc-shot { position: relative; aspect-ratio: 16 / 10; background: var(--tint); overflow: hidden; }
.psc-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; transition: transform .35s; }
.psc-card:hover .psc-shot img { transform: scale(1.03); }
.psc-badge {
    position: absolute; left: 16px; bottom: 14px; z-index: 2; display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%;
    background: #fff; box-shadow: 0 8px 20px -8px rgba(40, 30, 90, .45), 0 0 0 3px var(--c2);
}
.psc-badge img { width: 44px; height: 44px; object-fit: contain; display: block; }

/* ภาพจำลองหน้าจอระบบ (ใช้เมื่อยังไม่มีรูป assets/img/systems/<key>.jpg) */
.psc-shot:not(.has-img) {
    background:
        radial-gradient(circle at 1px 1px, rgba(255, 255, 255, .7) 1px, transparent 1.5px) 0 0 / 14px 14px,
        linear-gradient(140deg, var(--tint) 0%, #fff 55%, var(--tint) 100%);
}
.psc-mock {
    position: absolute; left: 50%; top: 18px; width: 78%; bottom: -16px; transform: translateX(-50%);
    background: #fff; border-radius: 12px 12px 0 0; overflow: hidden;
    box-shadow: 0 14px 30px -14px rgba(40, 30, 90, .35), 0 0 0 1px rgba(40, 30, 90, .05);
    font-family: var(--font-head); transition: transform .3s;
}
.psc-card:hover .psc-mock { transform: translateX(-50%) translateY(-5px); }
.psc-mock-top { display: flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-bottom: 1px solid #f0eef5; }
.psc-mock-top img { width: 15px; height: 15px; object-fit: contain; }
.psc-mock-top b { flex: 1; min-width: 0; font-size: 9.5px; font-weight: 600; color: #3a3350; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.psc-mock-top i { width: 13px; height: 13px; border-radius: 50%; background: #f1eff6; flex: none; }
.psc-mock-top i:last-child { width: 30px; border-radius: 99px; background: var(--tint); }
.psc-mock-hero {
    display: flex; align-items: center; justify-content: space-between; margin: 8px 9px 0; padding: 8px 10px; border-radius: 9px;
    background: linear-gradient(120deg, var(--c1), var(--c2));
}
.psc-mock-hero span { display: grid; gap: 4px; }
.psc-mock-hero span b { width: 70px; height: 7px; border-radius: 99px; background: rgba(255, 255, 255, .95); }
.psc-mock-hero span small { width: 46px; height: 5px; border-radius: 99px; background: rgba(255, 255, 255, .55); }
.psc-mock-hero em { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; background: rgba(255, 255, 255, .22); }
.psc-mock-hero svg { width: 13px; height: 13px; fill: #fff; }
.psc-mock-body { padding: 8px 9px; display: grid; gap: 6px; align-content: start; }
.psc-mock-body small { font-size: 7.5px; font-weight: 600; color: #8a8199; line-height: 1; }
/* เช็คเวลาเรียน: ตัวเลขสรุป + รายชื่อ */
.mb-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.mb-stats span { display: grid; gap: 4px; padding: 5px 6px; border-radius: 6px; background: #f7f7fa; border-top: 2px solid; }
.mb-stats b { height: 6px; width: 60%; border-radius: 99px; background: currentColor; opacity: .55; }
.mb-stats .ok   { color: #22a06b; } .mb-stats .late { color: #e69a2e; } .mb-stats .abs { color: #e0547e; }
.mb-row { display: flex; align-items: center; gap: 6px; height: 13px; }
.mb-row i { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.mb-row i.ok { background: #22a06b; } .mb-row i.late { background: #e69a2e; }
.mb-row b { flex: 1; height: 5px; border-radius: 99px; background: #eceaf2; }
.mb-row u { width: 22px; height: 8px; border-radius: 99px; background: var(--tint); }
/* การลา: ประเภทลา + ใบลา */
.psc-mb-leave { grid-template-columns: .9fr 1.1fr; gap: 7px; }
.mb-types { display: grid; gap: 4px; align-content: start; }
.mb-types span { display: flex; align-items: center; gap: 4px; height: 15px; padding: 0 5px; border-radius: 5px; border: 1px solid #ecebf2; }
.mb-types span.on { border-color: #e69a2e; background: #fff8ec; }
.mb-types i { width: 5px; height: 5px; border-radius: 50%; background: var(--d); flex: none; }
.mb-types b { flex: 1; height: 4px; border-radius: 99px; background: #e6e3ee; }
.mb-paper { display: grid; gap: 4px; padding: 6px; border: 1px solid #ecebf2; border-radius: 6px; }
.mb-paper b { width: 55%; height: 5px; justify-self: center; border-radius: 99px; background: #cfc9dc; }
.mb-paper u { height: 3px; border-radius: 99px; background: #edf0fb; border-bottom: 1px dotted #9db1e8; }
.mb-paper u.s { width: 60%; }
.mb-paper em { width: 36%; height: 7px; justify-self: end; border-radius: 99px; background: var(--c1); opacity: .75; }
/* แผนการสอน: ไฟล์ + สถานะ */
.mb-file { display: flex; align-items: center; gap: 6px; height: 19px; padding: 0 6px; border-radius: 6px; background: #faf9fc; border: 1px solid #f0eef5; }
.mb-file i { font-style: normal; font-size: 6.5px; font-weight: 700; color: #fff; background: #e5484d; padding: 2px 3px; border-radius: 3px; line-height: 1; }
.mb-file i.w { background: #2f6fd6; }
.mb-file b { flex: 1; height: 5px; border-radius: 99px; background: #e6e3ee; }
.mb-file em { font-style: normal; font-size: 7px; font-weight: 600; padding: 2px 5px; border-radius: 99px; line-height: 1.1; }
.mb-file em.ok { color: #157a4f; background: #def5ea; } .mb-file em.wait { color: #a86a0c; background: #fdf0d8; }
/* ตารางสอน: ตารางรายวัน + ช่องสอนแทนสีแดง */
.mb-tt { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; }
.mb-tt small { text-align: center; padding-bottom: 1px; }
.mb-tt span { height: 13px; border-radius: 3px; background: #f3f2f7; }
.mb-tt .c1 { background: #dfe6fb; } .mb-tt .c2 { background: #e5dcfa; } .mb-tt .c3 { background: #d7f1ea; }
.mb-tt .c4 { background: #fff; border: 1.5px dashed #e5484d; }   /* สอนแทน */

/* เนื้อหาใต้ภาพ */
.psc-body { flex: 1; display: flex; flex-direction: column; padding: 22px 26px 24px; }
.psc-body h3 { margin: 0 0 10px; font-weight: 700; font-size: 20px; line-height: 1.4; color: #2a1747; }
.psc-body p { margin: 0; color: var(--ink-soft); font-size: 15px; line-height: 1.8; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }   /* แสดง 3 บรรทัด แล้วตัดด้วย … */
.psc-go { margin-top: auto; padding-top: 18px; display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-head); font-weight: 600; font-size: 16px; color: var(--c1); }
.psc-go svg { width: 19px; height: 19px; fill: currentColor; transition: transform .15s; }
.psc-card:hover .psc-go svg { transform: translate(2px, -2px); }
.psc-go { text-decoration: underline; text-decoration-color: transparent; text-decoration-thickness: 2px; text-underline-offset: 5px; transition: text-decoration-color .15s; }
.psc-card:hover .psc-go, .psc-card:focus-visible .psc-go { text-decoration-color: currentColor; }   /* ชี้การ์ด → ขีดเส้นใต้คำ "เข้าใช้งานระบบ" */

/* ปุ่ม "ระบบสารสนเทศทั้งหมด" ใต้การ์ด → หน้าระบบสารสนเทศ */
.psc-more { margin-top: 40px; text-align: center; }
.psc-more-btn {
    display: inline-flex; align-items: center; gap: 10px; padding: 15px 32px; border-radius: 999px;
    background: linear-gradient(100deg, #2f6fe4, #5a8ef0 55%, #7c6be6); color: #fff;
    font-family: var(--font-head); font-weight: 600; font-size: 16.5px;
    box-shadow: 0 12px 26px -12px rgba(47, 111, 228, .6); transition: transform .15s, box-shadow .15s, filter .15s;
}
.psc-more-btn:hover { color: #fff; transform: translateY(-2px); filter: brightness(1.06); box-shadow: 0 16px 30px -12px rgba(47, 111, 228, .7); }
.psc-more-btn svg { width: 20px; height: 20px; fill: currentColor; flex: none; }
.psc-more-btn .arr { width: 18px; height: 18px; transition: transform .15s; }
.psc-more-btn:hover .arr { transform: translateX(3px); }

@media (max-width: 1024px) { .psc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; } }
.psc-title .nw, .psc-desc .nw { white-space: nowrap; }
.psc-title .nw { display: inline-block; }
@media (max-width: 640px) {
    .psc-head { margin-bottom: 26px; }
    .psc-eyebrow { font-size: 12px; letter-spacing: .16em; }
    .psc-title { font-size: 25px; line-height: 1.4; margin-top: 8px; }   /* "ศูนย์กลางบริการดิจิทัล" / "โรงเรียนพุทธิโศภน" ขึ้นบรรทัดตามวลี */
    .psc-bar { width: 64px; height: 4px; margin-top: 14px; }
    .psc-desc { font-size: 14.5px; line-height: 1.85; margin-top: 16px; text-align: center; }
    .psc-grid { grid-template-columns: 1fr; gap: 18px; }
    .psc-card { border-radius: 18px; border-top-width: 4px; }
    .psc-shot { aspect-ratio: 16 / 9; }   /* ภาพจำลองเตี้ยลง ไม่กินพื้นที่จอ */
    .psc-mock { top: 14px; width: 82%; }
    .psc-badge { width: 48px; height: 48px; left: 14px; bottom: 12px; }
    .psc-badge img { width: 36px; height: 36px; }
    .psc-more { margin-top: 26px; }
    .psc-more-btn { padding: 12px 24px; font-size: 15px; gap: 8px; }   /* มือถือ: ขนาดตามข้อความ จัดกลาง (ไม่เต็มความกว้าง) */
    .psc-more-btn svg { width: 18px; height: 18px; }
    .psc-body { padding: 16px 18px 18px; }
    .psc-body h3 { font-size: 18px; margin-bottom: 6px; }
    .psc-body p { font-size: 14px; }
    .psc-go { padding-top: 14px; font-size: 15px; }
}

/* =====================================================================
 * หน้าคู่มือการใช้งาน (manual.php) — กล่องแจ้ง "กำลังจัดทำ" + การ์ดคู่มือที่จะเผยแพร่
 * ===================================================================== */
.mnl-notice {
    display: flex; gap: 26px; align-items: flex-start; max-width: 900px; margin: 0 auto; padding: 34px 38px;
    border-radius: 24px; border: 1px solid #dbe6fb;
    background: linear-gradient(120deg, #eef4ff 0%, #f7f8ff 55%, #fff6ea 100%);
    box-shadow: 0 14px 34px -20px rgba(47, 111, 228, .35);
}
.mnl-notice-ic {
    flex: none; display: grid; place-items: center; width: 72px; height: 72px; border-radius: 22px;
    background: linear-gradient(135deg, #5a8ef0, #2f6fe4); box-shadow: 0 12px 24px -12px rgba(47, 111, 228, .7);
}
.mnl-notice-ic svg { width: 34px; height: 34px; fill: #fff; animation: mnl-tool 2.6s ease-in-out infinite; transform-origin: 70% 30%; }
@keyframes mnl-tool { 0%, 70%, 100% { transform: rotate(0); } 78% { transform: rotate(-14deg); } 88% { transform: rotate(10deg); } }
.mnl-chip {
    display: inline-flex; align-items: center; gap: 7px; padding: 5px 13px; border-radius: 99px;
    background: #fff4e0; border: 1px solid #fadba6; color: #b26a00;
    font-family: var(--font-head); font-weight: 600; font-size: 13px;
}
.mnl-chip i { width: 8px; height: 8px; border-radius: 50%; background: #f59e0b; animation: mnl-pulse 1.6s ease-in-out infinite; }
@keyframes mnl-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, .5); } 50% { box-shadow: 0 0 0 6px rgba(245, 158, 11, 0); } }
.mnl-notice-tx h2 { margin: 12px 0 10px; font-size: clamp(21px, 2.4vw, 26px); color: #1e2a5a; }
.mnl-notice-tx p { margin: 0; color: var(--ink-soft); font-size: 15.5px; line-height: 1.85; }
.mnl-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.mnl-btn {
    display: inline-flex; align-items: center; gap: 8px; padding: 11px 22px; border-radius: 999px;
    background: linear-gradient(100deg, #2f6fe4, #5a8ef0); color: #fff;
    font-family: var(--font-head); font-weight: 600; font-size: 15px;
    box-shadow: 0 10px 22px -12px rgba(47, 111, 228, .65); transition: transform .15s, filter .15s;
}
.mnl-btn:hover { color: #fff; transform: translateY(-2px); filter: brightness(1.06); }
.mnl-btn svg { width: 18px; height: 18px; fill: currentColor; }
.mnl-btn.is-light { background: #fff; color: #2f6fe4; border: 1px solid #cfdcf7; box-shadow: none; }
.mnl-btn.is-light:hover { color: #2f6fe4; background: #f3f7ff; }

.mnl-subhead { max-width: 900px; margin: 44px auto 16px; font-size: 18px; color: var(--ink); }
.mnl-grid { max-width: 900px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.mnl-card {
    --c1: #3d63d1; --c2: #7fa3f2; --tint: #ecf2ff;
    position: relative; display: flex; flex-direction: column; gap: 12px; padding: 20px 20px 18px;
    background: #fff; border: 1px solid var(--line); border-radius: 18px; color: inherit;
    box-shadow: var(--shadow-sm);
}
.mnl-card.is-teal   { --c1: #0e8a7b; --c2: #5ccdbd; --tint: #e7f7f4; }
.mnl-card.is-violet { --c1: #7a5fe0; --c2: #b8a4f4; --tint: #f2eefe; }
.mnl-card:not(.is-ready) { opacity: .92; }
.mnl-card.is-ready { transition: transform .2s, box-shadow .2s; }
.mnl-card.is-ready:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); color: inherit; }
.mnl-card-ic { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: linear-gradient(135deg, var(--c2), var(--c1)); }
.mnl-card-ic svg { width: 23px; height: 23px; fill: #fff; }
.mnl-card-tx h4 { margin: 0 0 4px; font-size: 16.5px; color: #2a1747; }
.mnl-card-tx p { margin: 0; color: var(--ink-soft); font-size: 14px; line-height: 1.65; }
.mnl-state {
    align-self: flex-start; margin-top: auto; padding: 4px 11px; border-radius: 99px;
    background: #f3f2f7; color: #8a8199; font-family: var(--font-head); font-weight: 600; font-size: 12.5px;
}
.mnl-card.is-ready .mnl-state { background: var(--tint); color: var(--c1); }

@media (max-width: 760px) {
    .mnl-notice { flex-direction: column; gap: 16px; padding: 26px 22px; }
    .mnl-notice-ic { width: 60px; height: 60px; border-radius: 18px; }
    .mnl-notice-ic svg { width: 28px; height: 28px; }
    .mnl-actions .mnl-btn { flex: 1 1 100%; justify-content: center; }
    .mnl-grid { grid-template-columns: 1fr; }
    .mnl-subhead { margin-top: 32px; }
}
@media (prefers-reduced-motion: reduce) { .mnl-notice-ic svg, .mnl-chip i { animation: none; } }
/* หน้าคู่มือ: ไม่มีแบนเนอร์ → จัดกล่องแจ้งไว้กลางพื้นที่ ไม่ชิดเมนูด้านบน */
.mnl-page { min-height: calc(100vh - 360px); display: flex; align-items: center; padding: 72px 0; }
.mnl-page > .container { width: min(1180px, 100% - 40px); }
@media (max-width: 760px) { .mnl-page { min-height: 0; padding: 40px 0 48px; } }
