/* สไตล์พื้นฐานของเว็บไซต์สหกรณ์ออมทรัพย์สาธารณสุขมหาสารคาม จำกัด */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #F4F6F5; }
img { max-width: 100%; }
a { color: #0E4A3B; text-decoration: none; }
a:hover { color: #8A6418; text-decoration: underline; }
:focus-visible { outline: 3px solid #D9B45A; outline-offset: 2px; }

.skip-link { position: absolute; left: -9999px; top: 0; background: #0E4A3B; color: #FFFFFF; padding: 10px 16px; z-index: 10; }
.skip-link:focus { left: 12px; top: 12px; }

/* แถบประกาศวิ่ง */
@keyframes coopTicker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.coop-ticker-track { animation: coopTicker 40s linear infinite; }
.coop-ticker-track:hover { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) { .coop-ticker-track { animation: none; } }

/* มือถือ */
@media (max-width: 640px) {
  .site-name { font-size: 20px !important; }
  .util-extra { display: none; }
  h1 { font-size: 26px !important; }
}

/* สไลด์ข่าวหน้าแรก */
.news-slider { position: relative; }
.ns-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.ns-track::-webkit-scrollbar { display: none; }
.ns-track:focus-visible { outline-offset: -3px; }
.ns-slide { flex: 0 0 100%; min-width: 0; scroll-snap-align: start; scroll-snap-stop: always; display: flex; flex-direction: column; }
.ns-media { display: block; aspect-ratio: 2 / 1; background: #0E4A3B; overflow: hidden; }
.ns-media img { width: 100%; height: 100%; object-fit: contain; display: block; background: #E3EBE8; }
.ns-noimg { display: flex; height: 100%; align-items: center; justify-content: center; padding: 24px; text-align: center; color: #F2CF7E; font-family: 'Noto Serif Thai', serif; font-size: 26px; font-weight: 700; line-height: 1.4; }
.ns-controls { display: flex; align-items: center; gap: 10px; padding: 0 28px 22px; flex-wrap: wrap; }
.ns-btn { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid #C9D6D0; background: #FFFFFF; color: #0E4A3B; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.ns-btn:hover { background: #E6F0EC; border-color: #0E4A3B; }
.ns-dots { display: flex; gap: 2px; flex: 1; justify-content: center; }
.ns-dot { width: 28px; height: 44px; border: 0; background: transparent; cursor: pointer; padding: 0; position: relative; }
.ns-dot::after { content: ''; position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 999px; background: #C9D6D0; transition: width .2s, margin .2s, background .2s; }
.ns-dot[aria-selected="true"]::after { width: 24px; margin-left: -12px; background: #0E4A3B; }
.ns-pause .i-play, .news-slider.is-paused .ns-pause .i-pause { display: none; }
.news-slider.is-paused .ns-pause .i-play { display: block; }
@media (max-width: 640px) { .ns-controls { padding: 0 16px 16px; } .ns-noimg { font-size: 20px; } }
