/* =====================================================
   FOOTER
   ===================================================== */
.site-footer { background: #3a1f2b; color: #f5e6ec; padding-top: 56px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.3fr; gap: 40px; padding-bottom: 40px; }
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.footer-logo { width: 56px; height: 56px; border-radius: 50%; background: #fff; padding: 2px; }
.footer-brand-th { font-family: var(--font-head); font-size: 20px; font-weight: 600; color: #fff; }
.footer-brand-en { font-size: 13px; opacity: .8; }
.footer-motto { color: var(--pink-200); font-family: var(--font-head); font-size: 15.5px; margin-bottom: 6px; }
.footer-tagline { font-size: 14.5px; opacity: .8; }
.footer-heading {
    color: #fff; font-size: 18px; margin-bottom: 14px; position: relative; padding-bottom: 8px;
}
.footer-heading::after { content: ""; position: absolute; left: 0; bottom: 0; width: 36px; height: 3px; border-radius: 3px; background: var(--pink-400); }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: #f5e6ec; opacity: .85; font-size: 15.5px; }
.footer-links a:hover { color: var(--pink-200); opacity: 1; }
.footer-contact li { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 10px; font-size: 15.5px; }
.footer-contact svg { width: 20px; height: 20px; fill: var(--pink-300); flex: 0 0 20px; margin-top: 3px; }
.footer-contact a { color: #f5e6ec; }
.footer-contact a:hover { color: var(--pink-200); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 16px 0; font-size: 14px; }
.footer-bottom-inner { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; opacity: .8; }

/* ---------- ปุ่มกลับขึ้นบน ---------- */
.back-to-top {   /* ปุ่มกลับขึ้นบน: วงกลมเทาโปร่ง ลูกศรขาว (แบบเรียบ) */
    position: fixed; right: 22px; bottom: 22px; width: 46px; height: 46px; border-radius: 50%;
    background: rgba(90, 90, 90, .45); color: #fff; display: grid; place-items: center;
    box-shadow: none; opacity: 0; visibility: hidden; transform: translateY(10px);
    transition: .25s ease; z-index: 90;
}
.back-to-top:hover { background: rgba(60, 60, 60, .65); color: #fff; }
.back-to-top.show { opacity: 1; visibility: visible; transform: none; }
.back-to-top svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }


/* มือถือ: ปรัชญาโรงเรียนอยู่บรรทัดเดียว เต็มความกว้างของคอลัมน์พอดี (วัดจากคอลัมน์จริง ไม่รวมแถบเลื่อน) */
@media (max-width: 640px) {
    .footer-about { container-type: inline-size; min-width: 0; }
    .footer-motto { white-space: nowrap; font-size: clamp(12px, calc(100cqw / 26.6), 15.5px); }   /* iPhone ทั่วไป ≈ 13–14px · ไม่ต่ำกว่า 12px */
}
/* คอลัมน์แคบเกินกว่าจะอยู่บรรทัดเดียวที่ 12px (จอเล็กมาก/ซูมมาก) → ตัดบรรทัดตามปกติ ไม่ล้นจอ */
@container (max-width: 320px) {
    .footer-motto { white-space: normal; font-size: 13.5px; line-height: 1.5; }
}
.footer-motto, .footer-tagline { overflow-wrap: anywhere; }
