/* ------------------------------------------------------------
   Style Index : CSS สำหรับหน้าหลัก (ผู้สมัคร)
   [NEW 21-11-2569] สร้างใหม่ — คัดเฉพาะ CSS ที่ใช้จริงในหน้าหลัก
   อ้างอิงจาก style.admin.css (เฉพาะส่วนที่เกี่ยวข้อง)
   ------------------------------------------------------------ */

/* ============================================================
   Widget Header Modern : Gradient + Icon Box
   ============================================================ */
.widget-header-modern {
  position: relative !important;
  color: #fff !important;
  overflow: hidden;
  padding: 15px 15px 15px 15px !important;
}
.widget-header-modern.widget-header-m1 {
  background: linear-gradient(105deg, #0a4d68 0%, #088395 45%, #05bfdb 100%) !important;
}
.widget-header-modern.widget-header-m4 {
  background: linear-gradient(105deg, #0d5a6d 0%, #0f7d84 45%, #34d399 100%) !important;
}

/* บังคับข้อความใน header เป็นสีขาว */
.widget-header-modern .widget-user-username,
.widget-header-modern .widget-user-desc,
.widget-header-modern h5,
.widget-header-modern h6 {
  color: #fff !important;
  text-shadow: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.widget-header-modern .widget-user-image {
  float: left;
  margin-right: 15px;
  margin-bottom: 5px;
}
.widget-header-modern .widget-user-image > img {
  width: 65px;
  height: auto;
  border-radius: 50%;
}
.widget-header-modern .widget-user-username,
.widget-header-modern .widget-user-desc {
  margin-left: 80px;
  padding-right: 130px;
}

/* Icon Box — position absolute (ลอยอยู่ขวา ไม่กระทบ layout) */
.widget-header-modern .header-icon-box {
  position: absolute;
  top: 50%;
  right: 24px;
  transform: translateY(-50%);
  width: 92px;
  height: 92px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  color: #fff;
  font-size: 52px;
  pointer-events: none;
  z-index: 2;
}

/* Icon Box : ขนาดเล็ก (สำหรับ header 2 บรรทัด) */
.widget-header-modern .header-icon-box-sm {
  width: 60px;
  height: 60px;
  font-size: 32px;
  right: 20px;
  border-radius: 12px;
}

/* Responsive : ซ่อน Icon Box บนจอเล็ก */
@media (max-width: 767px) {
  .widget-header-modern .header-icon-box { display: none; }
  .widget-header-modern .widget-user-image {
    float: none;
    margin-right: 0;
  }
  .widget-header-modern .widget-user-username,
  .widget-header-modern .widget-user-desc {
    margin-left: 0;
    padding-right: 0;
  }
}

/* ===== Header Modern : โลโก้ซ้าย + ข้อความขวา ===== */
.card .widget-header-modern {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) !important;
  column-gap: 15px !important;
  align-items: center !important;
}
.card .widget-header-modern .widget-user-image {
  float: none !important;
  grid-column: 1 !important;
  grid-row: 1 / span 2 !important;
  align-self: start !important;
  margin: 0 !important;
}
/* ถ้าห่อ div ไว้ ให้ลูกข้างในเข้าร่วม grid เหมือนไม่ได้ห่อ */
.card .widget-header-modern .widget-header-text {
  display: contents !important;
}
.card .widget-header-modern .widget-user-username,
.card .widget-header-modern .widget-user-desc {
  grid-column: 2 !important;
  margin-left: 0 !important;
  padding-right: 90px !important;
  min-width: 0;
}
.card .widget-header-modern .widget-user-username { align-self: end !important; }
.card .widget-header-modern .widget-user-desc     { align-self: start !important; }

/* ------------------------------------------------------------
   [NEW 22-11-2569] Header Eyebrow : ส่วนที่ X
   ------------------------------------------------------------ */
.widget-header-modern .widget-header-eyebrow {
  display: block;
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 2px;
  line-height: 1.2;
}

/* ------------------------------------------------------------
   [NEW 22-11-2569] Header Modern : เฉพาะ Card ที่ไม่มี widget-user-image
   ------------------------------------------------------------ */
.card .widget-header-modern.widget-header-no-image {
  grid-template-columns: minmax(0, 1fr) !important;
  column-gap: 0 !important;
}
.card .widget-header-modern.widget-header-no-image .widget-header-text {
  display: block !important;
  padding-left: 75px; /* เว้นที่ให้ icon box ด้านซ้าย */
  padding-right: 20px; /* กันข้อความชนขอบขวา */
}
.card .widget-header-modern.widget-header-no-image .widget-header-eyebrow {
  display: block;
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 2px;
  line-height: 1.2;
}
.card .widget-header-modern.widget-header-no-image .widget-user-username {
  grid-column: auto !important;
  margin-left: 0 !important;
  padding-right: 0 !important;
  min-width: 0;
  align-self: auto !important;
}
.card .widget-header-modern.widget-header-no-image .widget-user-desc {
  grid-column: auto !important;
  margin-left: 0 !important;
  padding-right: 0 !important;
  min-width: 0;
  align-self: auto !important;
}

/* [NEW 22-11-2569] ย้าย icon box ไปซ้ายมือ + บังคับแสดงผล (เฉพาะ Card ข้อมูลการศึกษา) */
.card .widget-header-modern.widget-header-no-image .header-icon-box {
  display: flex !important;            /* ← บังคับแสดง icon */
  align-items: center !important;
  justify-content: center !important;
  right: auto !important;
  left: 20px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  z-index: 3 !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* ------------------------------------------------------------
   [NEW 22-11-2569] Responsive : จอเล็ก icon ยังแสดง (ไม่ซ่อน)
   ------------------------------------------------------------ */
@media (max-width: 767px) {
  .card .widget-header-modern.widget-header-no-image .widget-header-text {
    padding-left: 65px;
    padding-right: 10px;
  }
  .card .widget-header-modern.widget-header-no-image .header-icon-box {
    display: flex !important;          /* ← บังคับแสดง icon บนมือถือ */
    align-items: center !important;
    justify-content: center !important;
    left: 12px !important;
    right: auto !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 52px !important;
    height: 52px !important;
    font-size: 28px !important;
    border-radius: 10px !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 3 !important;
  }
}

@media (max-width: 767px) {
  .card .widget-header-modern { column-gap: 12px !important; }
  .card .widget-header-modern .widget-user-image > img { width: 56px; }
  .card .widget-header-modern .widget-user-username,
  .card .widget-header-modern .widget-user-desc { padding-right: 0 !important; }
}

/* ============================================================
   Card Seamless
   ============================================================ */
.card-seamless {
  border-radius: 12px;
  overflow: hidden;
  border: 0;
}

/* ============================================================
   Section Body
   ============================================================ */
.section-body {
  padding: 12px;
  background: #fff;
}

/* ============================================================
   Card Row Modern : แนวนอน (IconBox ซ้าย - Text กลาง - ปุ่ม ขวา)
   ============================================================ */
.card-row-modern {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 22px;
  border-radius: 16px;
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  min-height: 92px;
}
.card-row-modern:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 26px rgba(0,0,0,0.18);
  color: #fff;
}
.card-row-modern .crm-icon {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: rgba(255,255,255,0.20);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: #fff;
  z-index: 2;
}
.card-row-modern .crm-body {
  flex: 1 1 auto;
  z-index: 2;
  min-width: 0;
}
.card-row-modern .crm-label {
  font-size: 0.82rem;
  opacity: 0.92;
  font-weight: 500;
  margin-bottom: 2px;
}
.card-row-modern .crm-title {
  font-size: 1.15rem;
  font-weight: bold;
  line-height: 1.25;
  margin-bottom: 2px;
}
.card-row-modern .crm-desc {
  font-size: 0.82rem;
  opacity: 0.88;
}
.card-row-modern .crm-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  color: #1f3a5f;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 8px 18px;
  border-radius: 22px;
  text-decoration: none;
  box-shadow: 0 3px 10px rgba(0,0,0,0.12);
  transition: all 0.15s ease;
  z-index: 2;
  white-space: nowrap;
}
.card-row-modern .crm-btn:hover {
  background: #f0f4f8;
  color: #1f3a5f;
  text-decoration: none;
  transform: translateX(2px);
}
/* วงกลมโปร่งแสงประดับ */
.card-row-modern::before,
.card-row-modern::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.10);
  pointer-events: none;
  z-index: 1;
}
.card-row-modern::before {
  width: 140px;
  height: 140px;
  right: -40px;
  top: -50px;
}
.card-row-modern::after {
  width: 90px;
  height: 90px;
  right: 60px;
  bottom: -50px;
  background: rgba(255,255,255,0.08);
}

/* Responsive : จอเล็ก → ปุ่มเต็มความกว้าง + stack แนวตั้ง */
@media (max-width: 575px) {
  .card-row-modern.crm-btn-bottom-right {
    padding-bottom: 20px;
  }
  .card-row-modern.crm-btn-bottom-right .crm-btn {
    width: 100%;
    margin-left: 0;
    margin-top: 10px;
    justify-content: center;
  }
}

/* ---------- Modifier : ปรับขนาดตัวอักษร ---------- */
.card-row-modern .crm-label.crm-label-sm { font-size: 0.72rem; }
.card-row-modern .crm-label.crm-label-lg { font-size: 0.95rem; }

.card-row-modern .crm-title.crm-title-sm { font-size: 0.95rem; }
.card-row-modern .crm-title.crm-title-md { font-size: 1.15rem; }  /* default */
.card-row-modern .crm-title.crm-title-lg { font-size: 1.35rem; }
.card-row-modern .crm-title.crm-title-xl { font-size: 1.65rem; }
.card-row-modern .crm-title.crm-title-xxl { font-size: 2rem; }

.card-row-modern .crm-desc.crm-desc-sm { font-size: 0.72rem; }
.card-row-modern .crm-desc.crm-desc-lg { font-size: 0.95rem; }

/* Responsive : ลดขนาดลงบนจอเล็ก */
@media (max-width: 767px) {
  .card-row-modern .crm-title.crm-title-xl { font-size: 1.35rem; }
  .card-row-modern .crm-title.crm-title-xxl { font-size: 1.55rem; }
}

/* ---------- Modifier : Layout แนวตั้ง + ปุ่มล่างขวา ---------- */
.card-row-modern.crm-btn-bottom-right {
  flex-wrap: wrap;
  align-items: flex-start;
}
.card-row-modern.crm-btn-bottom-right .crm-icon {
  align-self: flex-start;
}
.card-row-modern.crm-btn-bottom-right .crm-body {
  flex: 1 1 auto;
}
.card-row-modern.crm-btn-bottom-right .crm-btn {
  flex: 0 0 auto;
  margin-top: 8px;
  margin-left: auto;
  align-self: flex-end;
}

/* ============================================================
   Card Row Modern : Gradient Presets (เฉพาะที่ใช้ในหน้าหลัก)
   ============================================================ */
.crm-gradient-success   { background: linear-gradient(135deg, #48c768 0%, #1e7e34 100%); }
.crm-gradient-maroon    { background: linear-gradient(135deg, #e3407e 0%, #a81548 100%); }
.crm-gradient-lightblue { background: linear-gradient(135deg, #5ba4cc 0%, #307095 100%); }
.crm-gradient-olive     { background: linear-gradient(135deg, #5bc08f 0%, #2c7a52 100%); }
.crm-gradient-pink      { background: linear-gradient(135deg, #ed5da5 0%, #c92777 100%); }
.crm-gradient-teal      { background: linear-gradient(135deg, #63d9d9 0%, #25a3a3 100%); }

/* ---------- ปุ่ม : ปรับสีตัวอักษรตาม gradient ที่พื้นสว่าง ---------- */
.crm-gradient-maroon .crm-btn { color: #6a1030; }
.crm-gradient-pink .crm-btn { color: #6a1030; }

/* ----------------------------------------------------------------
   [NEW 21-11-2569] Mode Card Select : Card ตัวเลือกแบบ Q&A (ครบทุกสี)
   ---------------------------------------------------------------- */
.mode-card-select {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 80px;
  padding: 12px 14px;
  border: 1px solid #dce6e8;
  border-radius: 16px;
  background: #fbfdfd;
  color: #536e75;
  cursor: pointer;
  transition: .2s;
}

.mode-card-select:hover {
  transform: translateY(-2px);
  border-color: #9dcfc8;
  box-shadow: 0 9px 20px #315b6610;
}

.mode-card-select.active {
  border-color: #20a78f;
  background: linear-gradient(135deg, #f5fcfa, #e4f6f2);
  box-shadow: 0 0 0 2px #20a78f18;
}

/* Icon ด้านซ้าย */
.mode-card-select-icon {
  width: 43px;
  height: 43px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: #edf4f5;
  color: #6f858c;
  font-size: 20px;
  transition: .2s;
}

.mode-card-select.active .mode-card-select-icon {
  background: linear-gradient(135deg, #0d8d82, #2ab99d);
  color: #fff;
}

/* Body (หัวข้อ + คำอธิบาย) */
.mode-card-select-body {
  flex: 1;
  min-width: 0;
}

.mode-card-select-title {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: #315861;
  line-height: 1.35;
}

.mode-card-select.active .mode-card-select-title {
  color: #147e72;
}

.mode-card-select-desc {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: #81959b;
  line-height: 1.4;
}

/* เครื่องหมายถูกมุมขวาบน */
.mode-card-select-check {
  position: absolute;
  right: 10px;
  top: 10px;
  width: 20px;
  height: 20px;
  display: none;
  place-items: center;
  border-radius: 50%;
  background: #18a884;
  color: #fff;
  font-size: 11px;
}

.mode-card-select.active .mode-card-select-check {
  display: grid;
}

/* ซ่อน Input Radio ที่อยู่ภายใน Mode Card */
.mode-card-select input[type="radio"] {
  display: none !important;
}

/* ----------------------------------------------------------------
   Mode Card Select : Variant Colors (5 สี)
   ---------------------------------------------------------------- */

/* ---------- Variant 1 : Primary (น้ำเงิน) ---------- */
.mode-card-select-primary.active {
  border-color: #3b82f6;
  background: linear-gradient(135deg, #f5f9ff, #e6effd);
  box-shadow: 0 0 0 2px #3b82f618;
}
.mode-card-select-primary.active .mode-card-select-icon {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: #fff;
}
.mode-card-select-primary.active .mode-card-select-title {
  color: #1d4ed8;
}
.mode-card-select-primary.active .mode-card-select-check {
  background: #2563eb;
}

/* ---------- Variant 2 : Success (เขียว) ---------- */
.mode-card-select-success.active {
  border-color: #22c55e;
  background: linear-gradient(135deg, #f3fdf6, #e3f7ea);
  box-shadow: 0 0 0 2px #22c55e18;
}
.mode-card-select-success.active .mode-card-select-icon {
  background: linear-gradient(135deg, #16a34a, #22c55e);
  color: #fff;
}
.mode-card-select-success.active .mode-card-select-title {
  color: #15803d;
}
.mode-card-select-success.active .mode-card-select-check {
  background: #16a34a;
}

/* ---------- Variant 3 : Warning (เหลืองทอง) ---------- */
.mode-card-select-warning.active {
  border-color: #f59e0b;
  background: linear-gradient(135deg, #fffdf5, #fdf3e0);
  box-shadow: 0 0 0 2px #f59e0b18;
}
.mode-card-select-warning.active .mode-card-select-icon {
  background: linear-gradient(135deg, #d97706, #f59e0b);
  color: #fff;
}
.mode-card-select-warning.active .mode-card-select-title {
  color: #b45309;
}
.mode-card-select-warning.active .mode-card-select-check {
  background: #d97706;
}

/* ---------- Variant 4 : Danger (แดง) ---------- */
.mode-card-select-danger.active {
  border-color: #ef4444;
  background: linear-gradient(135deg, #fef6f6, #fce8e8);
  box-shadow: 0 0 0 2px #ef444418;
}
.mode-card-select-danger.active .mode-card-select-icon {
  background: linear-gradient(135deg, #dc2626, #ef4444);
  color: #fff;
}
.mode-card-select-danger.active .mode-card-select-title {
  color: #b91c1c;
}
.mode-card-select-danger.active .mode-card-select-check {
  background: #dc2626;
}

/* ---------- Variant 5 : Purple (ม่วง) ---------- */
.mode-card-select-purple.active {
  border-color: #8b5cf6;
  background: linear-gradient(135deg, #faf7ff, #f0e8fe);
  box-shadow: 0 0 0 2px #8b5cf618;
}
.mode-card-select-purple.active .mode-card-select-icon {
  background: linear-gradient(135deg, #7c3aed, #8b5cf6);
  color: #fff;
}
.mode-card-select-purple.active .mode-card-select-title {
  color: #6d28d9;
}
.mode-card-select-purple.active .mode-card-select-check {
  background: #7c3aed;
}

/* ----------------------------------------------------------------
   Mode Card Select : Responsive จอเล็ก
   ---------------------------------------------------------------- */
@media (max-width: 575px) {
  .mode-card-select {
    min-height: 72px;
    padding: 10px 12px;
    gap: 10px;
  }
  .mode-card-select-icon {
    width: 38px;
    height: 38px;
    font-size: 18px;
  }
  .mode-card-select-title {
    font-size: 16px;
  }
  .mode-card-select-desc {
    font-size: 13px;
  }
}

/* ----------------------------------------------------------------
   Mode Card Select : สถานะ Disabled / Full / Waiting
   ---------------------------------------------------------------- */

/* สถานะ Disabled (ใช้ได้กับทุก Variant) */
.mode-card-select.disabled,
.mode-card-select.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
  filter: grayscale(20%);
}
.mode-card-select.disabled:hover,
.mode-card-select.is-disabled:hover {
  transform: none;
  box-shadow: none;
}

/* สถานะ เต็ม (Full) — บังคับใช้ Danger Variant */
.mode-card-select.mode-card-select-full {
  border-color: #ef4444 !important;
  background: linear-gradient(135deg, #fef6f6, #fce8e8) !important;
}
.mode-card-select.mode-card-select-full .mode-card-select-icon {
  background: linear-gradient(135deg, #dc2626, #ef4444) !important;
  color: #fff !important;
}
.mode-card-select.mode-card-select-full .mode-card-select-title {
  color: #b91c1c !important;
}
.mode-card-select.mode-card-select-full .mode-card-select-check {
  background: #dc2626 !important;
  display: none !important;
}

/* สถานะ รอคิว (Waiting) — บังคับใช้ Warning Variant */
.mode-card-select.mode-card-select-waiting {
  border-color: #f59e0b !important;
  background: linear-gradient(135deg, #fffdf5, #fdf3e0) !important;
}
.mode-card-select.mode-card-select-waiting .mode-card-select-icon {
  background: linear-gradient(135deg, #d97706, #f59e0b) !important;
  color: #fff !important;
}
.mode-card-select.mode-card-select-waiting .mode-card-select-title {
  color: #b45309 !important;
}
.mode-card-select.mode-card-select-waiting .mode-card-select-check {
  background: #d97706 !important;
  display: none !important;
}

/* ปรับ Layout : รองรับ Desc หลายบรรทัด */
.mode-card-select .mode-card-select-desc {
  white-space: normal;
  line-height: 1.5;
}
.mode-card-select .mode-card-select-desc br {
  content: "";
  display: block;
  margin-bottom: 2px;
}

/* ----------------------------------------------------------------
   Mode Card Select : ปรับขนาดสำหรับฟอร์มข้อมูล (กะทัดรัด)
   ---------------------------------------------------------------- */
label.mode-card-select {
  padding: 16px 18px;
  min-height: 100px;
  gap: 14px;
}
label.mode-card-select .mode-card-select-icon {
  width: 56px;
  height: 56px;
  font-size: 26px;
  border-radius: 14px;
}
label.mode-card-select .mode-card-select-title {
  font-size: 16px;
  line-height: 1.4;
}
label.mode-card-select .mode-card-select-desc {
  font-size: 13px;
  line-height: 1.6;
  margin-top: 4px;
}
label.mode-card-select .mode-card-select-check {
  width: 24px;
  height: 24px;
  font-size: 13px;
  right: 12px;
  top: 12px;
}

/* บังคับใช้ Variant Success (เขียว) เมื่อ active */
label.mode-card-select.active {
  border-color: #22c55e !important;
  background: linear-gradient(135deg, #f3fdf6, #e3f7ea) !important;
  box-shadow: 0 0 0 2px #22c55e18 !important;
}
label.mode-card-select.active .mode-card-select-icon {
  background: linear-gradient(135deg, #16a34a, #22c55e) !important;
  color: #fff !important;
}
label.mode-card-select.active .mode-card-select-title {
  color: #15803d !important;
}
label.mode-card-select.active .mode-card-select-check {
  background: #16a34a !important;
}

/* Responsive : จอเล็ก */
@media (max-width: 767px) {
  label.mode-card-select {
    padding: 12px 14px;
    min-height: 86px;
    gap: 12px;
  }
  label.mode-card-select .mode-card-select-icon {
    width: 48px;
    height: 48px;
    font-size: 22px;
  }
  label.mode-card-select .mode-card-select-title {
    font-size: 15px;
  }
  label.mode-card-select .mode-card-select-desc {
    font-size: 12px;
  }
}

/* ----------------------------------------------------------------
   Teacher Card Select : การ์ดขนาดกะทัดรัด (ใช้ .mode-card-select)
   ---------------------------------------------------------------- */
label.mode-card-select.mode-card-select-teacher {
  padding: 12px 16px;
  min-height: 72px;
}
label.mode-card-select.mode-card-select-teacher .mode-card-select-icon {
  width: 48px;
  height: 48px;
  font-size: 22px;
  border-radius: 12px;
  background: #edf4f5;
  color: #6f858c;
}
label.mode-card-select.mode-card-select-teacher.active .mode-card-select-icon {
  background: linear-gradient(135deg, #16a34a, #22c55e);
  color: #fff;
}
label.mode-card-select.mode-card-select-teacher .mode-card-select-title {
  font-size: 16px;
  line-height: 1.3;
}

/* ตอนล็อกจางลง */
.mode-card-group[data-locked="1"] .mode-card-select { opacity: 0.75; cursor: not-allowed; }

/* [NEW 21-11-2569] Mode Card Select ขนาดกะทัดรัด — ปรับให้ข้อความไม่ล้น */
label.mode-card-select.mode-card-select-teacher {
  padding: 10px 14px;
  min-height: 64px;
  gap: 10px;
}
label.mode-card-select.mode-card-select-teacher .mode-card-select-icon {
  width: 42px;
  height: 42px;
  font-size: 20px;
}
label.mode-card-select.mode-card-select-teacher .mode-card-select-title {
  font-size: 16px;
  line-height: 1.3;
}
label.mode-card-select.mode-card-select-teacher .mode-card-select-desc {
  font-size: 13px;
  line-height: 1.3;
  margin-top: 2px;
}
/* ------------------------------------------------------------
   [NEW 21-11-2569] Input Form Modern
   [FIX 21-11-2569] ปรับ text-align ให้จัดกึ่งกลาง, ลบ border, ปรับเงาให้คมชัด
   ------------------------------------------------------------ */

.input-form-modern {
  margin: 10px 0 0;
}

/* Card หลัก — [FIX 21-11-2569] ใช้เงาน้ำหนักและความฟุ้งแบบ Bootstrap .shadow */
.input-form-modern .input-form-card {
  padding: 18px 20px 20px;
  border-radius: 18px;
  border: 0;
  /* ใช้สูตรของ Bootstrap .shadow แต่ปรับ opacity เป็น .12 ให้พอดีกับสีพื้นหลัง */
  box-shadow: 0 1px 2px rgba(0,0,0,.04),
              0 4px 4px rgba(70,80,125,.09);
  background: linear-gradient(135deg,#e8f0fe 0%,#f3f8ff 100%);
}

/* Title */
.input-form-modern .input-form-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 0 14px;
  gap: 10px;
  text-align: left;
}
.input-form-modern .input-form-title h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 750;
  letter-spacing: -.2px;
  color: #263c59;
}
.input-form-modern .input-form-title h2 i {
  margin-right: 6px;
  opacity: .85;
}
.input-form-modern .input-form-title p {
  margin: 2px 0 0;
  font-size: 14px;
  color: #78899b;
}
.input-form-modern .input-form-badge {
  padding: 5px 12px;
  border-radius: 9px;
  background: rgba(255,255,255,.68);
  box-shadow: 0 3px 10px rgba(78,99,137,.08);
  font-size: 15px;
  font-weight: 700;
  color: #168a78;
  white-space: nowrap;
}

/* Group — [FIX] ลบ border, จัดกึ่งกลาง content, ปรับเงาให้คมชัด */
.input-form-modern .pin-group {
  padding: 14px 16px;
  margin-bottom: 0px;
  border-radius: 14px;
  background: rgba(255,255,255,.94);
  border: 0;
  box-shadow: 0 1px 2px rgba(0,0,0,.04),
              0 4px 12px rgba(70,80,125,.08);
  transition: box-shadow .18s;
  text-align: center; /* จัด input/select กึ่งกลาง */
}
.input-form-modern .pin-group:last-child { margin-bottom: 0px; }
.input-form-modern .pin-group:hover {
  box-shadow: 0 1px 2px rgba(0,0,0,.05),
              0 8px 20px rgba(70,80,125,.12);
}

/* Header ใน group — [FIX] บังคับให้ชิดซ้ายตามปกติ */
.input-form-modern .pin-group-header {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 10px;
  text-align: left; 
}
.input-form-modern .pin-group-icon {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 16px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.24),
              0 3px 8px rgba(43,74,82,.12);
  background: linear-gradient(145deg,#22bc91,#0c9d78);
}
.input-form-modern .pin-group-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #29464e;
  line-height: 1.4;
}
.input-form-modern .pin-group-header small {
  display: block;
  margin-top: 2px;
  font-size: 14px;
  color: #84969b;
}

/* Inputs row */
.input-form-modern .pin-inputs-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
}

/* Input box */
.input-form-modern .pin-input-box,
.input-form-modern .pin-input-full {
  text-align: center;
  font-size: 28px;
  font-weight: 700;
  color: #263c59;
  background: #fff;
  /* [FIX 21-11-2569] เปลี่ยนสี Border ให้เข้มขึ้น (เทาอมฟ้า) */
  border: 1px solid #b9c6d4;
  border-radius: 10px;
  height: 48px;
  padding: 0 6px;
  /* [FIX 21-11-2569] เพิ่มเงาด้านใน (Inset) เพื่อให้ดูเป็นหลุมชัดเจน */
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.06);
  transition: border-color .15s, box-shadow .15s;
}

/* โฟกัส: เปลี่ยนสีตาม Variant และเพิ่ม Glow */
.input-form-modern .pin-input-box:focus,
.input-form-modern .pin-input-full:focus {
  outline: none;
  border-color: var(--theme-primary, #2879c8);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.06), 
              0 0 0 3px var(--theme-ring, rgba(40,121,200,.15));
}

/* Separator */
.input-form-modern .pin-separator {
  font-size: 20px;
  font-weight: 700;
  color: #87999e;
  user-select: none;
}

/* Select */
.input-form-modern .pin-select {
  width: 100%;
  height: 48px;
  font-size: 16px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 10px;
  /* [FIX 21-11-2569] ปรับ Border ให้เข้มขึ้นเหมือน input */
  border: 1px solid #b9c6d4;
  background: #fff;
  color: #263c59;
  /* [FIX 21-11-2569] เพิ่มเงาด้านใน */
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.06);
  transition: border-color .15s, box-shadow .15s;
}
.input-form-modern .pin-select:focus {
  outline: none;
  border-color: var(--theme-primary, #2879c8);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.06), 
              0 0 0 3px var(--theme-ring, rgba(40,121,200,.15));
}

/* ---------------- Color variants ---------------- */

/* 1. Teal (default — โทน news-attachments ต้นฉบับ) */
.input-form-teal .input-form-card     { background: linear-gradient(135deg,#f0eafe 0%,#edf6ff 100%); }
.input-form-teal .pin-group-icon      { background: linear-gradient(145deg,#22bc91,#0c9d78); }
.input-form-teal .input-form-badge    { color: #168a78; }
.input-form-teal                     { --theme-primary:#168a78; --theme-ring:rgba(22,138,120,.15); }

/* 2. Blue */
.input-form-blue .input-form-card     { background: linear-gradient(135deg,#e8f0fe 0%,#f3f8ff 100%); }
.input-form-blue .pin-group-icon      { background: linear-gradient(145deg,#45a7e8,#2879c8); }
.input-form-blue .input-form-badge    { color: #2879c8; }
.input-form-blue                     { --theme-primary:#2879c8; --theme-ring:rgba(40,121,200,.15); }

/* 3. Purple */
.input-form-purple .input-form-card   { background: linear-gradient(135deg,#f3e8ff 0%,#faf3ff 100%); }
.input-form-purple .pin-group-icon    { background: linear-gradient(145deg,#a678e8,#8050c8); }
.input-form-purple .input-form-badge  { color: #8a5cdc; }
.input-form-purple                   { --theme-primary:#8a5cdc; --theme-ring:rgba(138,92,220,.15); }

/* 4. Green */
.input-form-green .input-form-card    { background: linear-gradient(135deg,#e8f8ee 0%,#f3fdf7 100%); }
.input-form-green .pin-group-icon     { background: linear-gradient(145deg,#34c97a,#189a4d); }
.input-form-green .input-form-badge   { color: #22a55a; }
.input-form-green                    { --theme-primary:#22a55a; --theme-ring:rgba(34,165,90,.15); }

/* Responsive */
@media (max-width: 575px) {
  .input-form-modern .input-form-card { padding: 14px; }
  .input-form-modern .pin-inputs-row  { gap: 4px; }
  .input-form-modern .pin-input-box   { font-size: 22px; height: 42px; }
  .input-form-modern .pin-separator   { font-size: 16px; }
  .input-form-modern .pin-input-full,
  .input-form-modern .pin-select      { width: 100% !important; }
}
/* ------------------------------------------------------------
   [NEW 22-11-2569] Grade Heading : ส่วนผลการเรียน
   ------------------------------------------------------------ */
.grade-heading {
  margin-bottom: 14px;
  padding-top: 18px;
  margin-top: 8px;
  border-top: 1px dashed #dee2e6;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.grade-heading > div {
  flex: 1 1 auto;
  min-width: 0;
}
.grade-heading b {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: #263c59;
  line-height: 1.35;
  margin-bottom: 3px;
}
.grade-heading p {
  font-size: 13px;
  color: #78899b;
  line-height: 1.5;
  margin: 0;
}

/* ป้าย "คะแนนเต็ม 4.00" (สีเขียวอ่อน + ขอบมน) */
.badge-grade-max {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border-radius: 8px;
  background: linear-gradient(135deg, #e8f8ee 0%, #d1f2dd 100%);
  color: #15803d;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(21, 128, 61, 0.08);
  line-height: 1.2;
  flex: 0 0 auto;
}

/* Responsive : จอเล็ก grade-heading stack แนวตั้ง */
@media (max-width: 575px) {
  .grade-heading {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px;
  }
  .grade-heading .badge-grade-max {
    align-self: flex-start;
  }
}
/* ------------------------------------------------------------
   [NEW 22-11-2569] Identity Summary : กล่องเอกสารยืนยันตัวตน
   ------------------------------------------------------------ */
.identity-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, #f3fbf7 0%, #e6f6ee 100%);
  border: 1px solid #cfeadd;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.identity-summary > div {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}
.identity-summary > div > span {
  font-size: 13px;
  color: #5b7a6a;
  font-weight: 500;
}
.identity-summary > div > b {
  font-size: 15px;
  color: #1c4738;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.identity-summary .badge-verified {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border-radius: 8px;
  background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.25);
  line-height: 1.2;
}
@media (max-width: 575px) {
  .identity-summary {
    flex-direction: column;
    align-items: flex-start;
  }
}
/* ------------------------------------------------------------
   [NEW 22-11-2569] Mode Card Select : Disabled (toggle class ผ่าน JS)
   ใช้แทน CSS :has() เพื่อรองรับเบราว์เซอร์เก่า
   ------------------------------------------------------------ */
label.mode-card-select.disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
  filter: grayscale(20%);
}
label.mode-card-select.disabled:hover {
  transform: none;
  box-shadow: none;
}
/* ------------------------------------------------------------
   [NEW 22-11-2569] Plan Rank Badge : แสดงหมายเลขอันดับบน Mode Card Select
   ใช้ร่วมกับ .mode-card-select (Variant Success)
   ------------------------------------------------------------ */
.mode-card-select .plan-rank-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  min-width: 26px;
  height: 26px;
  padding: 0 6px;
  display: none;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #16a34a, #22c55e);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 26px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(22, 163, 74, 0.35);
  z-index: 3;
}

/* แสดง badge เฉพาะเมื่อการ์ด active (ถูกเลือก) */
.mode-card-select.active .plan-rank-badge {
  display: grid;
}

/* [NEW 22-11-2569] ซ่อน check เมื่อมีการแสดง plan-rank-badge (ใช้ class จาก JS) */
.mode-card-select.has-rank .mode-card-select-check {
  display: none !important;
}
/* ------------------------------------------------------------
   [NEW 22-11-2569] Selected Summary Box Modern : กล่องสรุปผลการเลือกแผน
   ------------------------------------------------------------ */
.selected-summary-box-modern {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border: 1px dashed #86efac; /* ขอบเส้นประสีเขียวอ่อน */
  min-height: 64px;
  transition: .2s;
}
.selected-summary-box-modern:hover {
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.15);
  border-style: solid;
}

.selected-summary-box-modern .summary-rank-badge {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #16a34a, #22c55e);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(22, 163, 74, 0.3);
}

.selected-summary-box-modern .summary-content {
  flex: 1 1 auto;
  min-width: 0;
}

.selected-summary-box-modern .summary-label {
  font-size: 11px;
  color: #15803d;
  font-weight: 600;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.selected-summary-box-modern .summary-value {
  font-size: 13px;
  color: #1f2937;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ปุ่มล้างตัวเลือก */
.btn-clear-plan {
  border-radius: 8px;
  font-weight: 600;
  padding: 6px 14px;
  font-size: 13px;
}

/* Responsive : จอเล็ก */
@media (max-width: 767px) {
  .selected-summary-box-modern {
    padding: 8px 10px;
    gap: 8px;
    min-height: 56px;
  }
  .selected-summary-box-modern .summary-rank-badge {
    width: 24px;
    height: 24px;
    font-size: 12px;
  }
  .selected-summary-box-modern .summary-value {
    font-size: 12px;
  }
}
/* ============================================================
   [NEW 26-11-2569] Information Page Components
   ปรับจาก admission.css เพื่อให้เข้ากับ AdminLTE + BS4
   ใช้ scope .info-* ไม่ชนกับของเดิม
   ============================================================ */

/* ---------- 1. Info Alert (จาก .admission-news-alert) ---------- */
.info-alert {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, #fff8e1 0%, #fef3c7 100%);
  border: 1px solid #fde68a;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.info-alert > span:first-child {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 11px;
  background: #f59e0b;
  color: #fff;
  display: grid;
  place-items: center;
}
.info-alert > span:first-child svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.info-alert > div {
  flex: 1 1 auto;
  min-width: 0;
}
.info-alert > div b {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #92400e;
  margin-bottom: 2px;
}
.info-alert > div p {
  font-size: 12px;
  color: #a16207;
  margin: 0;
  line-height: 1.5;
}
.info-alert > a {
  padding: 8px 14px;
  border-radius: 10px;
  background: #f59e0b;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: .2s;
}
.info-alert > a:hover {
  background: #d97706;
  color: #fff;
  text-decoration: none;
}

/* ---------- 2. Info Stats (จาก .news-overview) ---------- */
.info-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 0 0 18px;
}
.info-stat {
  padding: 16px;
  border-radius: 18px;
  background: #ffffffd6;
  box-shadow: 0 13px 28px #36546312;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid #ffffff;
  transition: transform .2s, box-shadow .2s;
}
.info-stat:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px #3654631c;
}
.info-stat > span {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 13px;
  background: #dff5f0;
  color: #148a77;
  display: grid;
  place-items: center;
}
.info-stat > span svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.info-stat > div {
  min-width: 0;
}
.info-stat b {
  display: block;
  font-size: 1.4rem;
  font-weight: 700;
  color: #15313a;
  line-height: 1.1;
}
.info-stat p {
  font-size: 12px;
  color: #82949a;
  margin: 3px 0 0;
  line-height: 1.3;
}
@media(max-width:1050px) {
  .info-stats { grid-template-columns: repeat(2, 1fr); }
}
@media(max-width:520px) {
  .info-stats { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------
   [FIX 27-11-2569] Info Headline Slider (Fade Effect)
   ------------------------------------------------------------ */
.info-headline-slider {
  position: relative;
  width: 100%;
  height: 320px;
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 20px;
  box-shadow: 0 16px 36px #36546324;
}
.info-headline {
  position: absolute;
  inset: 0;
  display: block;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease-in-out, visibility 0.8s;
  text-decoration: none;
  z-index: 1;
}
.info-headline.active {
  opacity: 1;
  visibility: visible;
  z-index: 2;
}
.info-headline > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 10s linear; /* Zoom เล็กน้อยเมื่อ active */
}
.info-headline.active > img {
  transform: scale(1.05);
}
.info-headline-overlay {
  position: absolute;
  inset: 0;
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: linear-gradient(180deg, rgba(5,45,55,0) 0%, rgba(5,45,55,.55) 40%, rgba(5,45,55,.92) 100%);
  color: #fff;
}
/* [FIX 14-11-2569] ปรับป้ายใน Headline ให้เหมือน .badge-tab.active */
.info-headline-overlay > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  padding: 6px 14px;
  border-radius: 10px;
  /* Gradient สีเขียวเหมือน .badge-tab.active */
  background: linear-gradient(135deg, #15803d 0%, #0dbd65 100%);
  color: #ffffff;
  font-size: 13px;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
  /*box-shadow: 0 4px 10px rgba(24, 119, 242, 0.3); เงาเหมือน Tabs */
  box-shadow: 0 4px 10px rgba(12, 100, 63, 0.3); /* เงาเหมือน Tabs */
  line-height: 1.2;
  white-space: nowrap;
  margin-bottom: 10px;
  text-transform: none; /* ปิด Uppercase ถ้าไม่ต้องการ */
  letter-spacing: normal;
}
.info-headline-overlay h2 {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 8px;
  color: #fff;
}
.info-headline-overlay p {
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255,255,255,.85);
  margin: 0 0 12px;
}
.info-headline-overlay > div {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 13px;
}
.info-headline-overlay > div b {
  color: #fff;
  font-weight: 600;
}
.info-headline-overlay > div small {
  color: rgba(255,255,255,.7);
  font-size: 13px;
}
.info-headline > i {
  position: absolute;
  right: 20px;
  bottom: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  color: #15313a;
  display: grid;
  place-items: center;
  font-style: normal;
  z-index: 3;
}
.info-headline > i svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
@media(max-width:767px) {
  .info-headline {
    height: 240px;
    max-height: 240px;
    min-height: 200px;
  }
  .info-headline-overlay { padding: 18px 20px; }
  .info-headline-overlay h2 { font-size: 1.15rem; }
  .info-headline-overlay p { font-size: 12px; }
}

/* ------------------------------------------------------------
   [FIX 27-11-2569] Progress Ring + Countdown (มุมขวาล่าง)
   ------------------------------------------------------------ */
.hl-progress {
  position: absolute;
  right: 20px;
  bottom: 20px;
  width: 40px;
  height: 40px;
  z-index: 5;
  pointer-events: none;
}
.hl-progress svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg); /* ให้เริ่มวิ่งจากด้านบน */
}
.hl-progress-bg {
  fill: none;
  stroke: rgba(255,255,255,0.3);
  stroke-width: 3;
}
.hl-progress-bar {
  fill: none;
  stroke: #ffffff; /* สีเขียว */
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 106.81;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.1s linear;
}
.hl-progress-text {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff; /* สีตัวเลข */
  text-shadow: 0 1px 3px rgba(0,0,0,0.6); /* เพิ่มเงาให้อ่านง่าย */
}
@media(max-width: 767px) {
  .hl-progress {
    right: 15px;
    bottom: 15px;
    width: 32px;
    height: 32px;
  }
  .hl-progress-text {
    font-size: 10px;
  }
}

/* ปุ่มเลื่อนซ้าย/ขวา */
.hl-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s;
  opacity: 0; /* ซ่อนไว้ก่อน */
}
.info-headline-slider:hover .hl-nav {
  opacity: 1; /* แสดงเมื่อ Hover */
}
.hl-nav:hover {
  background: rgba(255, 255, 255, 0.4);
  transform: translateY(-50%) scale(1.1);
}
.hl-prev { left: 20px; }
.hl-next { right: 20px; }

@media(max-width: 767px) {
  .info-headline-slider { height: 240px; }
  .info-headline-overlay { padding: 18px 20px; }
  .hl-nav { display: none; } /* ซ่อนปุ่มบนมือถือ */
}

/* ------------------------------------------------------------
   [FIX 27-11-2569] Info Toolbar : ปรับ Grid 4 คอลัมน์ + ปุ่มค้นหา (สีน้ำเงิน)
   ------------------------------------------------------------ */
.info-toolbar {
  display: grid;
  grid-template-columns: 1fr auto 180px 180px;
  gap: 10px;
  margin-bottom: 14px;
  align-items: center;
}
.info-search-label {
  position: relative;
  display: block;
  margin: 0;
}
.info-toolbar input,
.info-toolbar select {
  width: 100%;
  height: 42px;
  padding: 0 14px;
  border: 1px solid #dce6e8;
  border-radius: 11px;
  background: #fff;
  font-size: 0.9rem;
  color: #15313a;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.info-toolbar input:focus,
.info-toolbar select:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* ------------------------------------------------------------
   [FIX 27-11-2569] ปุ่มค้นหา : Gradient น้ำเงิน + ฟอนต์คมชัด
   ------------------------------------------------------------ */
.btn-info-search {
  height: 42px;
  padding: 0 24px;
  border-radius: 10px;
  /* ไล่เฉดสีน้ำเงินให้เหมือนปุ่ม Facebook */
  background: linear-gradient(135deg, #1877F2 0%, #0d5bbd 100%);
  border: none;
  color: #ffffff;
  font-size: 15px;
  /* ปรับฟอนต์ให้คมชัด ไม่เบลอ */
  font-weight: 500; 
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
  
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all .2s ease;
  white-space: nowrap;
  box-shadow: 0 4px 10px rgba(24, 119, 242, 0.3);
}
.btn-info-search:hover {
  background: linear-gradient(135deg, #0d5bbd 0%, #08458c 100%); /* เข้มขึ้นเมื่อ Hover */
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(24, 119, 242, 0.4);
}
.btn-info-search i {
  color: #ffffff;
  font-size: 16px;
}

/* Responsive */
@media(max-width:767px) {
  .info-toolbar {
    grid-template-columns: 1fr 1fr;
  }
  .info-search-label {
    grid-column: 1 / -1;
  }
  .btn-info-search {
    grid-column: 1 / -1;
    width: 100%;
  }
}

/* ------------------------------------------------------------
   [FIX 27-11-2569] Tabs : Gradient น้ำเงิน + ฟอนต์คมชัด
   ------------------------------------------------------------ */
.info-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding-bottom: 4px;
}
.info-tabs > button {
  padding: 8px 18px;
  border-radius: 10px;
  background: #f1f5f9;
  border: none;
  color: #475569;
  font-size: 14px;
  /* ปรับฟอนต์ให้คมชัด */
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  cursor: pointer;
  transition: all .2s ease;
}
.info-tabs > button:hover {
  background: #e2e8f0;
  color: #1e293b;
  transform: translateY(-1px);
}
.info-tabs > button.active {
  /* ปุ่มที่ถูกเลือกเป็น Gradient น้ำเงิน */
  background: linear-gradient(135deg, #1877F2 0%, #0d5bbd 100%);
  color: #ffffff;
  font-weight: 500;
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
  box-shadow: 0 4px 10px rgba(24, 119, 242, 0.3);
}
.info-tabs > button.active:hover {
  background: linear-gradient(135deg, #0d5bbd 0%, #08458c 100%);
}

/* ---------- 6. Info News Card Grid (จาก .all-news-card) ---------- */
.info-news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
.info-news-card {
  display: block;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 8px 20px #36546312;
  text-decoration: none;
  color: inherit;
  transition: transform .22s, box-shadow .22s;
}
.info-news-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 28px #3654631f;
  text-decoration: none;
  color: inherit;
}
.info-news-image {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #eef3f5;
}
.info-news-image > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s;
}
.info-news-card:hover .info-news-image > img {
  transform: scale(1.04);
}
.info-news-image > span {
  position: absolute;
  left: 10px;
  top: 10px;
  padding: 4px 9px;
  border-radius: 7px;
  background: #0a7d6c;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
}
.info-news-image > i {
  position: absolute;
  right: 10px;
  top: 10px;
  padding: 4px 8px;
  border-radius: 7px;
  background: #f59e0b;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  font-style: normal;
}
.info-news-copy {
  padding: 14px 16px 16px;
}
.info-news-flags {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.info-news-flags > em {
  padding: 3px 8px;
  border-radius: 6px;
  background: #dcfce7;
  color: #15803d;
  font-size: 11px;
  font-weight: 700;
  font-style: normal;
}
.info-news-flags > small {
  padding: 3px 8px;
  border-radius: 6px;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 11px;
  font-weight: 600;
}
.info-news-copy h3 {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;
  color: #15313a;
  margin: 0 0 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.info-news-copy p {
  font-size: 13px;
  line-height: 1.55;
  color: #6b7f86;
  margin: 0 0 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.info-news-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 12px;
  color: #8b9aa0;
  padding-top: 10px;
  border-top: 1px solid #eef2f4;
  flex-wrap: wrap;
}
.info-news-meta > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #8b9aa0;
  font-size: 11px;
}
.info-news-meta > span i {
  font-size: 12px;
  color: #a4b4ba;
}
.info-news-meta > span svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}
.info-news-meta > b {
  margin-left: auto;
  color: #0a7d6c;
  font-weight: 600;
}
@media(max-width:1050px) {
  .info-news-grid { grid-template-columns: repeat(2, 1fr); }
}
@media(max-width:600px) {
  .info-news-grid { grid-template-columns: 1fr; }
}

/* ---------- 7. Info Empty State (SVG ใหม่) ---------- */
.info-empty {
  display: none;
  text-align: center;
  padding: 50px 20px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px dashed #cbd5e1;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
  margin-bottom: 20px;
}
.info-empty.show {
  display: block;
  animation: fadeIn 0.4s ease-in-out;
}

/* ปรับแต่ง SVG ใหม่ */
.info-empty > svg {
  width: 140px;
  height: 140px;
  margin: 0 auto 20px;
  display: block;
  /* เพิ่ม animation ลอยขึ้นลงเบาๆ */
  animation: floatEmpty 3s ease-in-out infinite;
}

.info-empty > b {
  display: block;
  font-size: 18px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 6px;
}

.info-empty > p {
  font-size: 14px;
  color: #94A3B8;
  margin: 0;
  line-height: 1.5;
}

/* Animation */
@keyframes floatEmpty {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- 8. Info Pagination (จาก .news-pagination) ---------- */
.info-pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  margin: 8px 0 20px;
}
.info-pagination > a,
.info-pagination > span,
.info-pagination > button {
  display: inline-grid;
  place-items: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid #dce6e8;
  background: #fff;
  color: #5b7076;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: .15s;
}
.info-pagination > a:hover,
.info-pagination > button:hover {
  background: #e5f2f0;
  border-color: #36bba5;
  color: #108875;
  text-decoration: none;
}
.info-pagination > .active,
.info-pagination > .active:hover {
  background: #0a7d6c;
  border-color: #0a7d6c;
  color: #fff;
  cursor: default;
}
.info-pagination > .disabled,
.info-pagination > .disabled:hover {
  background: #f5f7f8;
  color: #b8c6cb;
  cursor: not-allowed;
}

/* ---------- 9. Info Channels (จาก .news-official-channels) ---------- */
/* ------------------------------------------------------------
   [FIX 27-11-2569] Info Channels : ปรับ Gradient + ไม่มีขอบ + เพิ่มเงา
   ------------------------------------------------------------ */
.info-channels {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 24px;
  border-radius: 16px;
  /* ไล่เฉดสีฟ้าอ่อนไปขาว */
  background: linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 50%, #ffffff 100%);
  border: none; /* ลบเส้นขอบออก */
  box-shadow: 0 10px 25px rgba(54, 84, 99, 0.08), 0 4px 10px rgba(0, 0, 0, 0.03); /* เพิ่มเงาแบบนุ่มนวล */
  margin-bottom: 20px;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
}

/* เพิ่มลูกเล่นพื้นหลัง (วงกลมจางๆ) ให้ดูมีมิติ */
.info-channels::before {
  content: "";
  position: absolute;
  top: -50px;
  right: -50px;
  width: 150px;
  height: 150px;
  background: rgba(14, 165, 233, 0.1);
  border-radius: 50%;
  pointer-events: none;
}
.info-channels::after {
  content: "";
  position: absolute;
  bottom: -30px;
  left: 20%;
  width: 100px;
  height: 100px;
  background: rgba(14, 165, 233, 0.05);
  border-radius: 50%;
  pointer-events: none;
}

.info-channels .channel-text {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1 1 auto;
  min-width: 250px;
  position: relative;
  z-index: 1;
}
.info-channels .channel-icon {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 20px;
  box-shadow: 0 4px 10px rgba(2, 132, 199, 0.25);
}
.info-channels .channel-text b {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: #0c4a6e;
  margin-bottom: 2px;
}
.info-channels .channel-text p {
  font-size: 12px;
  color: #0369a1;
  margin: 0;
  line-height: 1.5;
}
.info-channel-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

/* ปุ่ม Channels */
.btn-channel {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: all .2s;
  /* border: 1px solid transparent; */
}
.btn-channel:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* ปุ่มเว็บไซต์ */
.btn-channel-web {
  background: #ffffff;
  border-color: #bae6fd;
  color: #0369a1;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.btn-channel-web:hover {
  background: #f0f9ff;
  color: #0284c7;
}

/* ปุ่ม Facebook */
.btn-channel-fb {
  background: #1877F2;
  color: #fff;
  border-color: #1877F2;
  box-shadow: 0 2px 5px rgba(24, 119, 242, 0.2);
}
.btn-channel-fb:hover {
  background: #166fe5;
  color: #fff;
}

/* ปุ่ม LINE */
.btn-channel-line {
  background: #00B900;
  color: #fff;
  border-color: #00B900;
  box-shadow: 0 2px 5px rgba(0, 185, 0, 0.2);
}
.btn-channel-line:hover {
  background: #00a300;
  color: #fff;
}

@media(max-width:767px) {
  .info-channels {
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
  }
  .info-channel-links {
    justify-content: center;
    margin-top: 10px;
  }
}

/* ------------------------------------------------------------
   [FIX 26-11-2569] Info News No-Image : แสดง Logo โรงเรียนกลางการ์ด
   ------------------------------------------------------------ */
.info-news-noimg {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f8fafc 0%, #e2eaee 100%);
}
.info-news-noimg > img {
  width: 100px !important;       /* ขนาดโลโก้ใหญ่ขึ้นให้พอดี */
  height: auto !important;
  max-height: 100px;
  object-fit: contain !important;
  opacity: 0.85;                /* ลดความจางลง ให้เห็นชัดเจน */
  filter: grayscale(20%);       /* ใส่ฟิลเตอร์เทาเล็กน้อยให้ดูกลมกลืน */
}

/* ------------------------------------------------------------
   [FIX 26-11-2569] Card Seamless + Body Padding
   ------------------------------------------------------------ */
.card.card-seamless .card-body {
  padding: 20px 22px;
}
@media (max-width: 767px) {
  .card.card-seamless .card-body {
    padding: 14px 16px;
  }
}

/* ปรับ Info Alert ให้ margin-bottom พอดี */
.card.card-seamless .card-body > .info-alert {
  margin-top: 0;
}

/* ------------------------------------------------------------
   [FIX 27-11-2569] Related News Section Title
   ------------------------------------------------------------ */
.section-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 14px;
  margin-top: 10px;
}
.section-title h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #15313a;
  margin: 0 0 4px 0;
}
.section-title p {
  font-size: 0.85rem;
  color: #82949a;
  margin: 0;
}
.section-title .tag {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 8px;
  background: #dcfce7; /* พื้นหลังสีเขียวอ่อน */
  color: #15803d;      /* ตัวอักษรสีเขียวเข้ม */
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}
.section-title .tag:hover {
  background: #bbf7d0;
  color: #166534;
  transform: translateY(-1px);
}
/* ------------------------------------------------------------
   [FIX 27-11-2569] Badges บนการ์ดข่าว (แบบปุ่ม Tabs)
   ------------------------------------------------------------ */
.info-news-badges {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px; /* [FIX 14-11-2569] เพิ่ม right เพื่อให้พื้นที่เต็มความกว้างของรูป */
  display: flex;
  justify-content: space-between; /* [FIX 14-11-2569] ดันป้ายซ้าย-ขวาให้แยกกัน */
  gap: 8px;
  align-items: center;
  z-index: 2;
}

/* สไตล์พื้นฐานของป้าย (เหมือนปุ่ม Tabs) */
.badge-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 400; /* ใช้ 600 เพื่อให้อ่านง่ายแต่ไม่เบลอ */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.2;
  white-space: nowrap;
}

/* ป้ายหมวดหมู่ (Active) : Gradient น้ำเงิน */
.badge-tab.active {
  background: linear-gradient(135deg, #15803d 0%, #0dbd65 100%);
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
  box-shadow: 0 4px 10px rgba(24, 119, 242, 0.3);
}

/* ป้ายสำคัญ (Pin) : Gradient สีทอง/ส้ม */
.badge-tab.badge-pin {
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
  box-shadow: 0 4px 10px rgba(245, 158, 11, 0.3);
}