/* สีและฟอนต์ของเว็บ อ้างอิงจากตราวิทยาลัย */
:root {
  --sk-maroon: #7a1418;
  --sk-maroon-dark: #540d11;
  --sk-gold: #f2b01e;
  --sk-gold-soft: #fbeecb;
  --sk-paper: #faf7f2;
  --sk-ink: #1f2230;
  --sk-muted: #666872;
  --sk-line: #e8e1d6;
}

/* ===== แถบบนและเมนู ใช้ทุกหน้า ===== */
.sk-topbar {
  background: var(--sk-maroon-dark);
  color: #f5e9e0;
  font-size: 14px;
  padding: 6px 0;
}
.sk-topbar a { color: inherit; text-decoration: none; }
.sk-topbar a:hover { color: var(--sk-gold); }
.sk-topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.sk-topbar-contact { display: flex; gap: 20px; white-space: nowrap; }

.sk-nav {
  background: #fff;
  border-bottom: 3px solid var(--sk-gold);
  box-shadow: 0 2px 10px rgba(31, 34, 48, .08);
  padding-top: 8px;
  padding-bottom: 8px;
}
.sk-nav .container-fluid { flex-wrap: nowrap; }
.sk-nav .navbar-brand { display: flex; align-items: center; gap: 12px; min-width: 0; white-space: normal; }
.sk-brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.sk-brand-text b { color: var(--sk-maroon); font-size: 18px; font-weight: 700; }
.sk-brand-text small { color: var(--sk-muted); font-size: 11px; letter-spacing: .04em; }
.sk-nav .nav-link { color: var(--sk-ink); font-size: 15px; font-weight: 500; white-space: nowrap; }
.sk-nav .nav-link:hover, .sk-nav .nav-link:focus { color: var(--sk-maroon); }
.sk-nav .dropdown-menu {
  border: 1px solid var(--sk-line);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(31, 34, 48, .14);
  max-height: 70vh;
  max-width: min(520px, 90vw);
  overflow-y: auto;
}
.sk-nav .dropdown-item { white-space: normal; padding-top: 7px; padding-bottom: 7px; }
.sk-nav .dropdown-item:hover { background: var(--sk-gold-soft); color: var(--sk-maroon-dark); }
.sk-nav .sk-login { color: var(--sk-maroon); font-weight: 600; white-space: nowrap; }

/* ===== ส่วนท้าย ใช้ทุกหน้า ===== */
.sk-footer { background: var(--sk-maroon-dark); color: #f5e9e0; margin-top: 48px; }
.sk-footer a { color: inherit; text-decoration: none; }
.sk-footer a:hover { color: var(--sk-gold); }
.sk-footer-main { padding: 48px 0 32px; border-bottom: 1px solid rgba(255, 255, 255, .16); }
.sk-footer-brand { display: flex; gap: 20px; align-items: center; }
.sk-footer-brand h3 { color: #fff; font-size: 24px; font-weight: 700; margin: 0; }
.sk-footer-brand p { margin: 2px 0 0; font-size: 14px; letter-spacing: .04em; }
.sk-footer-contact { list-style: none; margin: 0; padding: 0; }
.sk-footer-contact li { display: flex; gap: 10px; margin-bottom: 8px; }
.sk-footer-links { padding: 32px 0 16px; font-size: 14px; }
.sk-footer-links h4 { color: var(--sk-gold); font-size: 16px; font-weight: 700; margin-bottom: 12px; }
.sk-footer-links ul { list-style: none; margin: 0 0 20px; padding: 0; }
.sk-footer-links li { margin-bottom: 6px; }
.sk-footer-copy {
  background: #2a0709;
  color: #d9c9c2;
  font-size: 13px;
  padding: 14px 0;
  text-align: center;
}

/* ===== หน้าแรก ===== */
.sk-home { background: var(--sk-paper); color: var(--sk-ink); }
.sk-home img { max-width: 100%; }
.sk-home .sk-footer { margin-top: 0; }
.sk-section { padding: 56px 0; scroll-margin-top: 72px; }
.sk-section-white { background: #fff; border-top: 1px solid var(--sk-line); border-bottom: 1px solid var(--sk-line); }

.sk-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 24px;
}
.sk-head h2 {
  border-left: 6px solid var(--sk-gold);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
  padding-left: 14px;
}
.sk-more { color: var(--sk-maroon); font-weight: 600; text-decoration: none; white-space: nowrap; }
.sk-more:hover { color: var(--sk-maroon-dark); text-decoration: underline; }

/* แบนเนอร์หลักต้องเห็นครบทั้งภาพ จึงไม่วางสิ่งใดทับ */
.sk-hero .carousel-indicators { margin-bottom: 8px; }

.sk-quick { background: #fff; border-bottom: 1px solid var(--sk-line); }
.sk-quick-grid { display: grid; grid-template-columns: repeat(5, 1fr); }
.sk-quick a {
  align-items: center;
  border-left: 1px solid var(--sk-line);
  color: var(--sk-ink);
  display: flex;
  font-weight: 600;
  gap: 12px;
  line-height: 1.35;
  min-height: 92px;
  padding: 16px;
  text-decoration: none;
  transition: background .15s ease, color .15s ease;
}
.sk-quick a:last-child { border-right: 1px solid var(--sk-line); }
.sk-quick a:hover { background: var(--sk-maroon); color: #fff; }
.sk-quick i { color: var(--sk-maroon); font-size: 28px; line-height: 1; }
.sk-quick a:hover i { color: var(--sk-gold); }

.sk-banner { border-radius: 10px; display: block; overflow: hidden; }
.sk-banner img { display: block; width: 100%; }

/* ข่าวเด่นซ้าย รายการข่าวขวา */
.sk-news { display: grid; gap: 24px; grid-template-columns: 7fr 5fr; }
.sk-news-lead {
  background: #fff;
  border: 1px solid var(--sk-line);
  border-radius: 10px;
  color: inherit;
  display: block;
  overflow: hidden;
  text-decoration: none;
}
.sk-news-lead img { aspect-ratio: 16 / 10; display: block; object-fit: cover; width: 100%; }
.sk-news-lead div { padding: 20px 24px 24px; }
.sk-news-lead h3 { font-size: 22px; font-weight: 700; line-height: 1.4; margin-bottom: 8px; }
.sk-news-lead p { color: var(--sk-muted); margin-bottom: 8px; }
.sk-news-lead:hover h3 { color: var(--sk-maroon); }

.sk-list { display: flex; flex-direction: column; gap: 12px; }
.sk-item {
  background: #fff;
  border: 1px solid var(--sk-line);
  border-radius: 10px;
  color: inherit;
  display: grid;
  gap: 14px;
  grid-template-columns: 128px 1fr;
  overflow: hidden;
  padding-right: 14px;
  text-decoration: none;
}
.sk-item img { aspect-ratio: 4 / 3; display: block; height: 100%; object-fit: cover; width: 100%; }
.sk-item img.sk-nocover, .sk-card img.sk-nocover, .sk-news-lead img.sk-nocover { background: var(--sk-paper); object-fit: contain; padding: 12px; }
.sk-item div { align-self: center; padding: 8px 0; }
.sk-item h3 {
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  display: -webkit-box;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
  margin: 0 0 4px;
  overflow: hidden;
}
.sk-item:hover h3 { color: var(--sk-maroon); }
.sk-date { color: var(--sk-muted); font-size: 13px; }

/* จดหมายข่าวเป็นภาพแนวตั้ง จึงแสดงจากด้านบนของภาพ */
.sk-cards { display: grid; gap: 24px; grid-template-columns: repeat(3, 1fr); }
.sk-card {
  background: #fff;
  border: 1px solid var(--sk-line);
  border-radius: 10px;
  color: inherit;
  display: block;
  overflow: hidden;
  text-decoration: none;
}
.sk-card img { aspect-ratio: 4 / 3; display: block; object-fit: cover; object-position: top; width: 100%; }
.sk-card div { padding: 14px 16px 16px; }
.sk-card h3 { font-size: 16px; font-weight: 600; line-height: 1.45; margin-bottom: 4px; }
.sk-card:hover h3 { color: var(--sk-maroon); }

.sk-about { background: var(--sk-maroon); color: #fff; padding: 56px 0; }
.sk-about-grid { align-items: center; display: grid; gap: 40px; grid-template-columns: 300px 1fr; }
.sk-director { text-align: center; }
.sk-director img { border: 4px solid var(--sk-gold); border-radius: 10px; max-height: 340px; width: auto; }
.sk-director h2 { color: var(--sk-gold); font-size: 18px; font-weight: 700; margin: 0 0 14px; }
.sk-director-name { font-size: 18px; font-weight: 700; margin: 14px 0 2px; }
.sk-director-role { color: #f5e0d8; font-size: 14px; }
.sk-about h2.sk-about-title { font-size: 28px; font-weight: 700; margin-bottom: 16px; }
.sk-video { background: #000; border-radius: 10px; overflow: hidden; }

/* กล่องหลักสูตรอยู่ช่องแรก อีก 7 ช่องเป็นสาขา รวม 8 ช่องเต็มตารางพอดี */
.sk-program { display: grid; gap: 12px; grid-template-columns: repeat(4, 1fr); margin-bottom: 32px; }
.sk-program:last-child { margin-bottom: 0; }
.sk-program-intro {
  background: var(--sk-maroon);
  border-radius: 10px;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 18px;
}
.sk-program-intro h3 { font-size: 26px; font-weight: 700; margin: 0; }
.sk-program-intro b { color: var(--sk-gold); font-size: 15px; margin-bottom: 8px; }
.sk-program-intro p { font-size: 13px; line-height: 1.5; margin: 0; }
.sk-major { aspect-ratio: 4 / 3; border-radius: 10px; margin: 0; overflow: hidden; position: relative; }
.sk-major img { display: block; height: 100%; object-fit: cover; width: 100%; }
.sk-major figcaption {
  background: linear-gradient(to top, rgba(31, 12, 12, .9), rgba(31, 12, 12, 0));
  bottom: 0;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  left: 0;
  line-height: 1.35;
  padding: 32px 12px 10px;
  position: absolute;
  right: 0;
}

.sk-motto {
  background: var(--sk-maroon-dark);
  color: #fff;
  font-size: 26px;
  font-weight: 700;
  padding: 32px 16px;
  text-align: center;
}
.sk-motto span { color: var(--sk-gold); }

.sk-services { display: grid; gap: 32px; grid-template-columns: 7fr 5fr; }
.sk-service-links { display: grid; gap: 10px; grid-template-columns: repeat(2, 1fr); margin-bottom: 24px; }
.sk-service-links a {
  align-items: center;
  background: #fff;
  border: 1px solid var(--sk-line);
  border-radius: 8px;
  color: var(--sk-ink);
  display: flex;
  font-size: 15px;
  font-weight: 500;
  gap: 10px;
  padding: 12px 14px;
  text-decoration: none;
}
.sk-service-links a:hover { border-color: var(--sk-maroon); color: var(--sk-maroon); }
.sk-service-links i { color: var(--sk-maroon); }
.sk-fb { background: #fff; border: 1px solid var(--sk-line); border-radius: 10px; min-height: 300px; overflow: hidden; }

.sk-videos { display: grid; gap: 20px; grid-template-columns: repeat(3, 1fr); }

/* ===== หน้าเนื้อหา ===== */
.sk-page { background: var(--sk-paper); color: var(--sk-ink); }
.sk-pagehead { background: var(--sk-maroon); color: #fff; padding: 28px 0 32px; }
.sk-pagehead h1 { font-size: 30px; font-weight: 700; line-height: 1.3; margin: 0; }
.sk-crumb {
  align-items: center;
  color: #f0d9d0;
  display: flex;
  flex-wrap: wrap;
  font-size: 14px;
  gap: 6px;
  margin-bottom: 10px;
}
.sk-crumb a { color: inherit; text-decoration: none; }
.sk-crumb a:hover { color: var(--sk-gold); }
.sk-crumb i { font-size: 11px; }

.sk-layout {
  display: grid;
  gap: 32px;
  grid-template-columns: 280px minmax(0, 1fr);
  padding-bottom: 16px;
  padding-top: 32px;
}
.sk-subnav {
  background: #fff;
  border: 1px solid var(--sk-line);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: sticky;
  top: 96px;
}
.sk-subnav a {
  border-bottom: 1px solid var(--sk-line);
  border-left: 4px solid transparent;
  color: var(--sk-ink);
  font-size: 15px;
  line-height: 1.4;
  padding: 11px 14px;
  text-decoration: none;
}
.sk-subnav a:last-child { border-bottom: 0; }
.sk-subnav a:hover { background: var(--sk-gold-soft); }
.sk-subnav a.sk-subnav-main { font-weight: 700; }
.sk-subnav a.active { background: var(--sk-maroon); border-left-color: var(--sk-gold); color: #fff; font-weight: 600; }

.sk-leader {
  align-items: center;
  background: #fff;
  border: 1px solid var(--sk-line);
  border-radius: 10px;
  display: flex;
  gap: 24px;
  margin-bottom: 28px;
  padding: 20px;
}
.sk-leader .sk-photo { border-radius: 8px; flex: 0 0 150px; width: 150px; }
.sk-leader h2 { color: var(--sk-maroon); font-size: 24px; font-weight: 700; margin-bottom: 6px; }
.sk-leader-role { color: var(--sk-muted); }

.sk-prose { font-size: 16px; line-height: 1.8; margin-bottom: 8px; }
.sk-prose img { border-radius: 8px; height: auto; max-width: 100%; }
.sk-prose h1, .sk-prose h2, .sk-prose h3, .sk-prose h4 { color: var(--sk-maroon); font-size: 22px; font-weight: 700; margin: 8px 0 12px; }
.sk-prose ol, .sk-prose ul { margin-bottom: 12px; padding-left: 24px; }
.sk-prose li { margin-bottom: 6px; }
.sk-prose li::marker { color: var(--sk-maroon); font-weight: 700; }
.sk-prose table { max-width: 100%; }
.sk-doc { background: #fff; border: 1px solid var(--sk-line); border-radius: 8px; display: block; height: 80vh; width: 100%; }
.sk-btn {
  background: var(--sk-maroon);
  border-radius: 8px;
  color: #fff;
  display: inline-block;
  font-weight: 600;
  padding: 10px 20px;
  text-decoration: none;
}
.sk-btn:hover { background: var(--sk-maroon-dark); color: #fff; }

.sk-people { margin-top: 32px; }
.sk-people h2 {
  border-left: 6px solid var(--sk-gold);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 16px;
  padding-left: 12px;
}
.sk-people-grid { display: grid; gap: 16px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.sk-person { background: #fff; border: 1px solid var(--sk-line); border-radius: 10px; overflow: hidden; }
.sk-photo {
  aspect-ratio: 3 / 4;
  background: #fff;
  display: block;
  object-fit: cover;
  object-position: top;
  width: 100%;
}
.sk-photo-empty { align-items: center; background: var(--sk-paper); color: #cfc6b8; display: flex; font-size: 72px; justify-content: center; }
.sk-leader .sk-photo-empty { font-size: 64px; }
.sk-person > div { padding: 10px 12px 12px; }
.sk-person h3 { font-size: 15px; font-weight: 600; line-height: 1.4; margin-bottom: 2px; }
.sk-person-role { color: var(--sk-muted); font-size: 13px; line-height: 1.4; }
.sk-empty { background: #fff; border: 1px dashed var(--sk-line); border-radius: 10px; color: var(--sk-muted); padding: 32px; text-align: center; }

/* ===== รายการข่าว ===== */
.sk-tabs { background: #fff; border-bottom: 1px solid var(--sk-line); }
.sk-tabs .container { display: flex; gap: 4px; overflow-x: auto; }
.sk-tabs a {
  border-bottom: 3px solid transparent;
  color: var(--sk-ink);
  font-weight: 500;
  padding: 14px 16px 11px;
  text-decoration: none;
  white-space: nowrap;
}
.sk-tabs a:hover { color: var(--sk-maroon); }
.sk-tabs a.active { border-bottom-color: var(--sk-gold); color: var(--sk-maroon); font-weight: 700; }

.sk-newslist { padding-top: 32px; }
.sk-newsgrid { display: grid; gap: 20px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sk-newscard {
  background: #fff;
  border: 1px solid var(--sk-line);
  border-radius: 10px;
  color: inherit;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  text-decoration: none;
}
.sk-newscard img { aspect-ratio: 16 / 10; display: block; object-fit: cover; width: 100%; }
.sk-newscard img.sk-nocover { background: var(--sk-paper); object-fit: contain; padding: 36px; }
.sk-newscard > div { display: flex; flex: 1; flex-direction: column; padding: 14px 16px 16px; }
.sk-newscard h2 {
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  display: -webkit-box;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 6px;
  overflow: hidden;
}
.sk-newscard p {
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: var(--sk-muted);
  display: -webkit-box;
  font-size: 14px;
  line-height: 1.55;
  margin-bottom: 10px;
  overflow: hidden;
}
.sk-newscard .sk-date { margin-top: auto; }
.sk-newscard:hover h2 { color: var(--sk-maroon); }

/* ข่าวแรกกว้าง 2 ช่อง รวมอีก 19 ข่าวเต็มตาราง 3 คอลัมน์พอดี */
.sk-newscard:first-child { display: grid; grid-column: span 2; grid-template-columns: 3fr 2fr; }
.sk-newscard:first-child img { aspect-ratio: auto; height: 100%; min-height: 260px; }
.sk-newscard:first-child > div { justify-content: center; padding: 20px 24px; }
.sk-newscard:first-child h2 { font-size: 20px; font-weight: 700; -webkit-line-clamp: 4; }
.sk-newscard:first-child p { -webkit-line-clamp: 4; }
.sk-newscard:first-child .sk-date { margin-top: 0; }

.sk-pagination { gap: 4px; margin: 32px 0 0; }
.sk-pagination .page-link { border-color: var(--sk-line); border-radius: 6px; color: var(--sk-maroon); }
.sk-pagination .page-link:hover { background: var(--sk-gold-soft); border-color: var(--sk-gold); color: var(--sk-maroon-dark); }
.sk-pagination .page-item.active .page-link { background: var(--sk-maroon); border-color: var(--sk-maroon); color: #fff; }
.sk-pagination .page-item.disabled .page-link { background: none; border-color: transparent; color: var(--sk-muted); }

@media (max-width: 991.98px) {
  .sk-topbar-welcome { display: none; }
  .sk-topbar-inner { justify-content: center; }
  .sk-quick-grid { grid-template-columns: repeat(2, 1fr); }
  .sk-quick a { border: 0; border-bottom: 1px solid var(--sk-line); min-height: 76px; }
  .sk-quick a:nth-child(odd) { border-right: 1px solid var(--sk-line); }
  .sk-quick a:last-child { border-right: 0; grid-column: 1 / -1; }
  .sk-news, .sk-services, .sk-about-grid { grid-template-columns: 1fr; }
  .sk-cards, .sk-videos { grid-template-columns: repeat(2, 1fr); }
  .sk-program { grid-template-columns: repeat(2, 1fr); }
  .sk-program { grid-auto-rows: 1fr; }
  .sk-layout { gap: 20px; grid-template-columns: minmax(0, 1fr); }
  .sk-subnav { background: none; border: 0; flex-direction: row; flex-wrap: wrap; gap: 8px; overflow: visible; position: static; }
  .sk-subnav a, .sk-subnav a:last-child { background: #fff; border: 1px solid var(--sk-line); border-radius: 999px; font-size: 14px; padding: 6px 14px; }
  .sk-subnav a.active, .sk-subnav a.active:last-child { background: var(--sk-maroon); border-color: var(--sk-maroon); color: #fff; }
  .sk-people-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sk-newsgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sk-major { aspect-ratio: auto; min-height: 150px; }
}

/* จอกว้างปานกลางซ่อนไอคอนเมนูเพื่อให้ชื่อวิทยาลัยอยู่บรรทัดเดียว */
@media (min-width: 1200px) {
  .sk-nav .navbar-brand { flex-shrink: 0; white-space: nowrap; }
}
@media (min-width: 1200px) and (max-width: 1319.98px) {
  .sk-nav .navbar-nav .nav-link i { display: none; }
  .sk-nav .nav-link { font-size: 14px; }
}

/* เมนูเปิดบนจอเล็กต้องขึ้นบรรทัดใหม่ แต่โลโก้กับปุ่มเมนูอยู่แถวเดียวกัน */
@media (max-width: 1199.98px) {
  .sk-nav .container-fluid { flex-wrap: wrap; }
  .sk-nav .navbar-brand { flex: 1 1 0; }
  .sk-nav .navbar-collapse { max-height: calc(100vh - 90px); overflow-y: auto; }
}

@media (max-width: 575.98px) {
  .sk-section, .sk-about { padding: 40px 0; }
  .sk-head h2 { font-size: 23px; }
  .sk-topbar-contact { font-size: 13px; gap: 14px; }
  .sk-cards, .sk-videos, .sk-service-links { grid-template-columns: 1fr; }
  .sk-item { grid-template-columns: 104px 1fr; }
  .sk-news-lead h3 { font-size: 19px; }
  .sk-news-lead div { padding: 16px; }
  .sk-motto { font-size: 20px; }
  .sk-footer-brand { flex-direction: column; text-align: center; }
  .sk-pagehead h1 { font-size: 24px; }
  .sk-newsgrid { grid-template-columns: minmax(0, 1fr); }
  .sk-newscard:first-child { display: flex; grid-column: auto; }
  .sk-newscard:first-child img { aspect-ratio: 16 / 10; height: auto; min-height: 0; }
  .sk-newscard:first-child > div { padding: 14px 16px 16px; }
  .sk-newscard:first-child h2 { font-size: 17px; }
  .sk-leader { flex-direction: column; text-align: center; }
  .sk-people-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sk-nav .navbar-brand { gap: 8px; margin-right: 8px; }
  .sk-nav .navbar-brand img { height: 42px; width: 42px; }
  .sk-brand-text b { font-size: 16px; }
  .sk-brand-text small { display: none; }
  .sk-nav .navbar-toggler { padding: 2px 8px; }
}
