/* RPK24 Quick Access + School Dashboard V1.7.28 (kept previous filename for drop-in replacement)
   Only styles these two homepage blocks. Original banner, introduction,
   Facebook/YouTube player, featured news and right sidebar remain unchanged.
   Stylesheet MUST load AFTER earlier v1723/v1724/v1725/v1726 CSS. */

/* Float the existing 6 real links over the boundary below the school banner. */
body.rpk-homepage main.rpk24-home-main { overflow: visible !important; }
body.rpk-homepage .rpk24-shortcuts-section.rpk24-floating-quick-v1727 {
  position: relative !important;
  z-index: 5 !important;
  display: block !important;
  width: min(calc(100% - 44px), 1450px) !important;
  margin: -8px auto 0 !important;
  padding: 0 !important;
  max-width: 1450px;
  box-sizing: border-box;
}
/* Heading remains accessible to screen readers; visual design follows reference. */
body.rpk-homepage .rpk24-floating-quick-v1727 .rpk24-quick-heading-v1725,
body.rpk-homepage .rpk24-floating-quick-v1727 > .rpk24-section-heading {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0,0,0,0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  padding: 0 !important;
  margin: -1px !important;
  border: 0 !important;
}
body.rpk-homepage .rpk24-floating-quick-v1727 .rpk24-shortcuts {
  position: relative;
  z-index: 1;
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0,1fr)) !important;
  align-items: stretch !important;
  gap: 0 !important;
  margin: 0 !important;
  padding: 12px 10px !important;
  background: rgba(255,255,255,.98) !important;
  border: 1px solid rgba(223,232,250,.98) !important;
  border-radius: 25px !important;
  box-shadow: 0 16px 38px rgba(16,48,109,.16), 0 3px 8px rgba(12,48,106,.05) !important;
  box-sizing: border-box !important;
}
body.rpk-homepage .rpk24-floating-quick-v1727 .rpk24-shortcut {
  position: relative !important;
  min-width: 0 !important;
  min-height: 70px !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 11px !important;
  padding: 9px 12px !important;
  margin: 0 !important;
  text-align: left !important;
  border: 0 !important;
  border-radius: 14px !important;
  background: transparent !important;
  box-shadow: none !important;
  text-decoration: none !important;
  transition: background .18s ease, transform .18s ease !important;
}
body.rpk-homepage .rpk24-floating-quick-v1727 .rpk24-shortcut:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 16px;
  right: 0;
  bottom: 16px;
  width: 1px;
  background: #dde6f5;
  pointer-events: none;
}
body.rpk-homepage .rpk24-floating-quick-v1727 .rpk24-shortcut:hover,
body.rpk-homepage .rpk24-floating-quick-v1727 .rpk24-shortcut:focus-visible {
  background: #edf5ff !important;
  transform: translateY(-2px);
}
body.rpk-homepage .rpk24-floating-quick-v1727 .rpk24-shortcut:focus-visible { outline: 3px solid #f3ba36 !important; outline-offset: -2px; }
body.rpk-homepage .rpk24-floating-quick-v1727 .rpk24-shortcut-icon {
  flex: 0 0 44px !important;
  width: 44px !important;
  height: 44px !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 13px !important;
  background: #e5f2ff !important;
  color: #137dd0 !important;
  box-shadow: none !important;
  font-size: 20px !important;
}
body.rpk-homepage .rpk24-floating-quick-v1727 .rpk24-shortcut:nth-child(2) .rpk24-shortcut-icon {background:#fff4cf !important;color:#d59409 !important;}
body.rpk-homepage .rpk24-floating-quick-v1727 .rpk24-shortcut:nth-child(3) .rpk24-shortcut-icon {background:#ede5ff !important;color:#8151dc !important;}
body.rpk-homepage .rpk24-floating-quick-v1727 .rpk24-shortcut:nth-child(4) .rpk24-shortcut-icon {background:#dff9ff !important;color:#079cc7 !important;}
body.rpk-homepage .rpk24-floating-quick-v1727 .rpk24-shortcut:nth-child(5) .rpk24-shortcut-icon {background:#ffe3f4 !important;color:#d73b9e !important;}
body.rpk-homepage .rpk24-floating-quick-v1727 .rpk24-shortcut:nth-child(6) .rpk24-shortcut-icon {background:#e5f8e4 !important;color:#32a547 !important;}
body.rpk-homepage .rpk24-floating-quick-v1727 .rpk24-shortcut-copy {
  flex: 0 1 auto !important;
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 1px !important;
  color: #163967 !important;
  line-height: 1.4 !important;
}
body.rpk-homepage .rpk24-floating-quick-v1727 .rpk24-shortcut-copy strong {
  font-family: 'Sarabun','Noto Sans Thai',Tahoma,sans-serif;
  font-size: clamp(11px, .97vw, 14px) !important;
  line-height: 1.45 !important;
  font-weight: 800 !important;
  color: #142f60 !important;
  text-align: left !important;
  white-space: normal !important;
}
body.rpk-homepage .rpk24-floating-quick-v1727 .rpk24-shortcut-copy small {
  font-family: 'Sarabun','Noto Sans Thai',Tahoma,sans-serif;
  font-size: clamp(9px,.76vw,11px) !important;
  color: #7c8da9 !important;
  font-weight: 400 !important;
  white-space: normal !important;
  text-align: left !important;
}
body.rpk-homepage .rpk24-floating-quick-v1727 .rpk24-shortcut-arrow { display: none !important; }

/* Dashboard becomes a row of four colorful SMART-HR-style statistic cards. */
body.rpk-homepage .rpk24-dashboard-slot-v1723 {
  position: relative;
  z-index: 1;
  display: block !important;
  box-sizing: border-box;
  width: min(calc(100% - 44px), 1450px) !important;
  max-width: 1450px !important;
  min-width: 0 !important;
  margin: 7px auto 28px !important;
  padding: 0 !important;
}
body.rpk-homepage .rpk24-dashboard-slot-v1723 .rpk-dash23 {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
body.rpk-homepage .rpk24-dashboard-slot-v1723 .rpk-dash23-head {
  display: none !important;
  margin: 0 0 12px !important;
  padding: 0 6px !important;
  align-items: center !important;
}
body.rpk-homepage .rpk24-dashboard-slot-v1723 .rpk-dash23-head h2 {
  font-size: clamp(18px,1.45vw,23px) !important;
  color: #103a82 !important;
}
body.rpk-homepage .rpk24-dashboard-slot-v1723 .rpk-dash23-kicker {font-size: 9px !important;margin-bottom: 3px !important;}
body.rpk-homepage .rpk24-dashboard-slot-v1723 .rpk-dash23-head p {font-size: 12px !important;margin-top: 2px !important;}
body.rpk-homepage .rpk24-dashboard-slot-v1723 .rpk-dash23-seal {display: none !important;}
body.rpk-homepage .rpk24-dashboard-slot-v1723 .rpk-dash23-grid {
  display: grid !important;
  grid-template-columns: repeat(4,minmax(0,1fr)) !important;
  gap: clamp(10px,1.1vw,17px) !important;
}
body.rpk-homepage .rpk24-dashboard-slot-v1723 .rpk-dash23-card {
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: stretch !important;
  min-height: 135px !important;
  padding: 21px 17px 17px 85px !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 22px !important;
  box-shadow: 0 9px 22px rgba(20,43,90,.15) !important;
  background: linear-gradient(125deg,#0D367B 0%,#2165C1 55%,#3A9FE4 100%) !important;
  overflow: hidden !important;
}
body.rpk-homepage .rpk24-dashboard-slot-v1723 .rpk-dash23-card:nth-child(2) {background:linear-gradient(125deg,#086965 0%,#0F9B94 60%,#37C6B6 100%) !important;}
body.rpk-homepage .rpk24-dashboard-slot-v1723 .rpk-dash23-card:nth-child(3) {background:linear-gradient(125deg,#B75A10 0%,#DD8721 55%,#EBAE2D 100%) !important;}
body.rpk-homepage .rpk24-dashboard-slot-v1723 .rpk-dash23-card:nth-child(4) {background:linear-gradient(125deg,#48318E 0%,#6F4DB5 56%,#9A7AD3 100%) !important;}
body.rpk-homepage .rpk24-dashboard-slot-v1723 .rpk-dash23-card::after {
  content:'';
  position:absolute !important;
  z-index: 0 !important;
  width:140px;
  height:140px;
  right:-62px;
  top:5px;
  border-radius:50%;
  border:0;
  background:rgba(255,255,255,.13);
  box-shadow:none;
}
body.rpk-homepage .rpk24-dashboard-slot-v1723 .rpk-dash23-card-top {
  position: absolute !important;
  left: 19px !important;
  top: 50% !important;
  transform: translateY(-50%);
  margin: 0 !important;
  z-index: 2;
}
body.rpk-homepage .rpk24-dashboard-slot-v1723 .rpk-dash23-icon {
  width: 52px !important;
  height: 52px !important;
  border-radius: 15px !important;
  display: grid !important;
  place-items: center !important;
  color: #fff !important;
  font-size: 23px !important;
  background: rgba(255,255,255,.17) !important;
  border: 1px solid rgba(255,255,255,.24) !important;
}
body.rpk-homepage .rpk24-dashboard-slot-v1723 .rpk-dash23-number {
  display: block !important;
  position: relative;
  margin: 0 0 3px !important;
  font-size: clamp(26px,2.6vw,38px) !important;
  color: #fff !important;
  font-weight: 900 !important;
  letter-spacing: -.6px !important;
  line-height: 1.2 !important;
  white-space: nowrap;
}
body.rpk-homepage .rpk24-dashboard-slot-v1723 .rpk-dash23-grades {font-size: clamp(22px,2.1vw,31px) !important;}
body.rpk-homepage .rpk24-dashboard-slot-v1723 .rpk-dash23-card h3 {
  font-size: clamp(11px,1vw,14px) !important;
  font-weight: 800 !important;
  color: #fff !important;
  margin: 0 !important;
  line-height: 1.35 !important;
}
body.rpk-homepage .rpk24-dashboard-slot-v1723 .rpk-dash23-card p {color:rgba(255,255,255,.90) !important;font-size:11px !important;margin:2px 0 0 !important;}
body.rpk-homepage .rpk24-dashboard-slot-v1723 .rpk-dash23-accent {display:none !important;}
body.rpk-homepage .rpk24-dashboard-slot-v1723 .rpk-dash23-decoration {display:none !important;}

@media (max-width: 1200px) {
  body.rpk-homepage .rpk24-floating-quick-v1727 .rpk24-shortcut {gap:7px !important;padding:9px 8px !important;}
  body.rpk-homepage .rpk24-floating-quick-v1727 .rpk24-shortcut-icon {flex-basis:37px !important;width:37px !important;height:37px !important;font-size:18px !important;}
  body.rpk-homepage .rpk24-dashboard-slot-v1723 .rpk-dash23-card {padding-left:69px !important;}
  body.rpk-homepage .rpk24-dashboard-slot-v1723 .rpk-dash23-card-top {left:14px !important;}
  body.rpk-homepage .rpk24-dashboard-slot-v1723 .rpk-dash23-icon {width:43px !important;height:43px !important;font-size:20px !important;}
}
@media (max-width: 980px) {
  body.rpk-homepage .rpk24-floating-quick-v1727 .rpk24-shortcuts {grid-template-columns:repeat(3,minmax(0,1fr)) !important;padding:10px !important;}
  body.rpk-homepage .rpk24-floating-quick-v1727 .rpk24-shortcut:nth-child(3)::after {display:none;}
  body.rpk-homepage .rpk24-floating-quick-v1727 .rpk24-shortcut:nth-child(n+4) {border-top:1px solid #e8eef8 !important;}
  body.rpk-homepage .rpk24-floating-quick-v1727 .rpk24-shortcut-copy strong {font-size:13px !important;}
  body.rpk-homepage .rpk24-dashboard-slot-v1723 .rpk-dash23-grid {grid-template-columns:repeat(2,minmax(0,1fr)) !important;}
  body.rpk-homepage .rpk24-dashboard-slot-v1723 .rpk-dash23-card {min-height:126px !important;}
}
@media (max-width: 620px) {
  body.rpk-homepage .rpk24-shortcuts-section.rpk24-floating-quick-v1727 {width:calc(100% - 22px) !important;margin-top:-2px !important;}
  body.rpk-homepage .rpk24-floating-quick-v1727 .rpk24-shortcuts {grid-template-columns:repeat(3,minmax(0,1fr)) !important;padding:9px 5px !important;border-radius:18px !important;}
  body.rpk-homepage .rpk24-floating-quick-v1727 .rpk24-shortcut {min-height:82px !important;flex-direction:column !important;gap:5px !important;padding:8px 3px !important;}
  body.rpk-homepage .rpk24-floating-quick-v1727 .rpk24-shortcut-icon {width:36px !important;height:36px !important;flex-basis:36px !important;font-size:17px !important;border-radius:10px !important;}
  body.rpk-homepage .rpk24-floating-quick-v1727 .rpk24-shortcut-copy {align-items:center !important;}
  body.rpk-homepage .rpk24-floating-quick-v1727 .rpk24-shortcut-copy strong {font-size:11px !important;text-align:center !important;}
  body.rpk-homepage .rpk24-floating-quick-v1727 .rpk24-shortcut-copy small {font-size:9px !important;text-align:center !important;}
  body.rpk-homepage .rpk24-floating-quick-v1727 .rpk24-shortcut:not(:last-child)::after {top:18px;bottom:18px;}
  body.rpk-homepage .rpk24-floating-quick-v1727 .rpk24-shortcut:nth-child(n+4)::after {display:block;}
  body.rpk-homepage .rpk24-floating-quick-v1727 .rpk24-shortcut:nth-child(3)::after,
  body.rpk-homepage .rpk24-floating-quick-v1727 .rpk24-shortcut:nth-child(6)::after {display:none;}
  body.rpk-homepage .rpk24-dashboard-slot-v1723 {width:calc(100% - 24px) !important;margin-top:7px !important;margin-bottom:22px !important;}
  body.rpk-homepage .rpk24-dashboard-slot-v1723 .rpk-dash23-head {margin-bottom:10px !important;padding:0 2px !important;}
  body.rpk-homepage .rpk24-dashboard-slot-v1723 .rpk-dash23-head h2 {font-size:18px !important;}
  body.rpk-homepage .rpk24-dashboard-slot-v1723 .rpk-dash23-head p {font-size:11px !important;}
  body.rpk-homepage .rpk24-dashboard-slot-v1723 .rpk-dash23-grid {grid-template-columns:repeat(2,minmax(0,1fr)) !important;gap:9px !important;}
  body.rpk-homepage .rpk24-dashboard-slot-v1723 .rpk-dash23-card {min-height:139px !important;padding:44px 10px 12px !important;border-radius:17px !important;justify-content:flex-end !important;}
  body.rpk-homepage .rpk24-dashboard-slot-v1723 .rpk-dash23-card-top {top:10px !important;left:11px !important;transform:none;}
  body.rpk-homepage .rpk24-dashboard-slot-v1723 .rpk-dash23-icon {width:31px !important;height:31px !important;border-radius:9px !important;font-size:15px !important;}
  body.rpk-homepage .rpk24-dashboard-slot-v1723 .rpk-dash23-number {font-size:clamp(25px,7vw,31px) !important;}
  body.rpk-homepage .rpk24-dashboard-slot-v1723 .rpk-dash23-grades {font-size:clamp(21px,5.9vw,25px) !important;}
  body.rpk-homepage .rpk24-dashboard-slot-v1723 .rpk-dash23-card h3 {font-size:12px !important;}
  body.rpk-homepage .rpk24-dashboard-slot-v1723 .rpk-dash23-card p {font-size:10px !important;}
}
@media (prefers-reduced-motion: reduce) {
  body.rpk-homepage .rpk24-floating-quick-v1727 .rpk24-shortcut {transition:none !important;transform:none !important;}
}
