/*
Theme Name:  SMSOSUT Guide
Theme URI:   https://smsosut.com
Description: คู่มือกลางสโมสรนักศึกษาแพทย์ มทส. — child theme of Hello Elementor
Author:      SMSOSUT IT Team
Author URI:  https://smsosut.com
Template:    hello-elementor
Version:     1.0.0
Text Domain: smsosut-guide
*/

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Thai:wght@300;400;500;600;700&family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@20..48,400,0,0&display=swap');

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; }
body {
  font-family: 'IBM Plex Sans Thai', system-ui, -apple-system, sans-serif;
  color: #15241C;
  background: #fff;
  -webkit-font-smoothing: antialiased;
  margin: 0;
}
a { color: inherit; text-decoration: none; }
::selection { background: #bfe9d1; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #d7e3db; border-radius: 8px; border: 2px solid #fff; }
::-webkit-scrollbar-thumb:hover { background: #bcccc2; }

/* ── CSS Variables ── */
:root {
  --green:        #0e9d5a;
  --green-dark:   #0c814c;
  --green-light:  #e9f7ef;
  --border:       #E8EFEA;
  --text:         #12241b;
  --muted:        #67786e;
  --bg-soft:      #f8fbf9;
}

/* ── Site Header ── */
.smsosut-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 24px;
  background: rgba(255,255,255,0.88);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.smsosut-logo {
  display: flex;
  align-items: center;
  gap: 11px;
  cursor: pointer;
  text-decoration: none;
  flex-shrink: 0;
}
.smsosut-logo-icon {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(150deg, #13a866, #0c814c);
  box-shadow: 0 4px 12px rgba(14,157,90,0.32);
  flex-shrink: 0;
}
.smsosut-logo-icon::before,
.smsosut-logo-icon::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  background: #fff;
  border-radius: 2px;
  transform: translate(-50%, -50%);
}
.smsosut-logo-icon::before { width: 17px; height: 5px; }
.smsosut-logo-icon::after  { width: 5px; height: 17px; }
.smsosut-logo-text { line-height: 1.1; }
.smsosut-logo-title { font-size: 15.5px; font-weight: 700; letter-spacing: -0.01em; color: #13231b; }
.smsosut-logo-title span { color: #13a866; }
.smsosut-logo-sub { font-size: 11px; color: #7c8c83; font-weight: 500; margin-top: 1px; }

.smsosut-search-trigger {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 9px;
  width: 260px;
  max-width: 40vw;
  height: 38px;
  padding: 0 12px;
  border: 1px solid #E2EBE6;
  border-radius: 10px;
  background: #F7FAF8;
  color: #8a9991;
  cursor: pointer;
  font-size: 13.5px;
  font-family: inherit;
  transition: border-color .15s, background .15s;
}
.smsosut-search-trigger:hover { border-color: #bfe0cd; background: #fff; }
.smsosut-search-trigger .kbd { font-size: 11px; border: 1px solid #dde7e1; border-radius: 5px; padding: 1px 6px; background: #fff; color: #9aa89f; font-weight: 600; }

.smsosut-contact-btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 15px;
  border-radius: 10px;
  background: var(--green);
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  font-family: inherit;
  box-shadow: 0 4px 12px rgba(14,157,90,0.28);
  transition: background .15s;
  text-decoration: none;
}
.smsosut-contact-btn:hover { background: var(--green-dark); color: #fff; }

/* Mobile menu button */
.smsosut-mobile-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--bg-soft);
  cursor: pointer;
  flex-shrink: 0;
}

/* ── Doc Layout ── */
.smsosut-doc-layout {
  display: flex;
  align-items: flex-start;
  min-height: calc(100vh - 60px);
}

/* ── Sidebar ── */
.smsosut-sidebar {
  position: sticky;
  top: 60px;
  width: 280px;
  flex-shrink: 0;
  height: calc(100vh - 60px);
  overflow-y: auto;
  border-right: 1px solid var(--border);
  padding: 22px 16px 40px;
  background: #fcfdfc;
}
.smsosut-sidebar-group { margin-bottom: 20px; }
.smsosut-sidebar-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9aa89f;
  padding: 0 10px 7px;
  display: block;
}
.smsosut-nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 10px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 500;
  color: #46564d;
  cursor: pointer;
  margin-bottom: 2px;
  transition: background .12s, color .12s;
  text-decoration: none;
}
.smsosut-nav-item:hover { background: #eef7f1; color: #46564d; }
.smsosut-nav-item.current-menu-item,
.smsosut-nav-item.active {
  background: #e6f5ec;
  color: #0c814c;
  font-weight: 600;
}
.smsosut-nav-item .material-symbols-rounded { font-size: 19px; color: #9aa89f; flex-shrink: 0; }
.smsosut-nav-item.current-menu-item .material-symbols-rounded,
.smsosut-nav-item.active .material-symbols-rounded { color: #0c814c; }

/* ── Main Content ── */
.smsosut-content {
  flex: 1;
  min-width: 0;
  padding: 40px 52px 90px;
  max-width: 880px;
}

/* ── Breadcrumb ── */
.smsosut-breadcrumb {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: #9aa89f;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.smsosut-breadcrumb a { color: #9aa89f; transition: color .15s; }
.smsosut-breadcrumb a:hover { color: var(--green); }
.smsosut-breadcrumb .sep { font-size: 16px; font-family: 'Material Symbols Rounded'; }

/* ── Typography ── */
.smsosut-content h1 {
  margin: 0;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
}
.smsosut-content h2 {
  margin: 38px 0 0;
  font-size: 22px;
  font-weight: 700;
  color: #16271e;
  display: flex;
  align-items: center;
  gap: 6px;
}
.smsosut-content p { font-size: 15.5px; line-height: 1.75; color: #54655c; margin: 14px 0 0; }
.smsosut-content .lead { font-size: 17px; line-height: 1.7; }

/* ── Copy-link anchor ── */
.heading-anchor {
  display: inline-flex;
  align-items: center;
  opacity: 0;
  transition: opacity .15s;
  cursor: pointer;
  color: #b0c4b8;
  background: none;
  border: none;
  padding: 2px 4px;
  border-radius: 6px;
  font-family: 'Material Symbols Rounded';
  font-size: 18px;
  line-height: 1;
}
.heading-anchor:hover { color: var(--green); }
.smsosut-content h1:hover .heading-anchor,
.smsosut-content h2:hover .heading-anchor { opacity: 1; }

/* ── Callout boxes ── */
.callout {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 16px 18px;
  border-radius: 13px;
  margin-top: 18px;
}
.callout-green  { background: #eef7f1; border: 1px solid #d7ecdf; }
.callout-yellow { background: #fbf6ec; border: 1px solid #ecdeba; }
.callout-red    { background: #fdeef0; border: 1px solid #f3ced4; }
.callout-purple { background: linear-gradient(120deg,#efeafb,#f6f3fd); border: 1px solid #e0d8f5; }
.callout .icon  { font-family: 'Material Symbols Rounded'; font-size: 22px; flex-shrink: 0; margin-top: 1px; }
.callout-green  .icon { color: #0c814c; }
.callout-yellow .icon { color: #c4870c; }
.callout-red    .icon { color: #c24a6b; }
.callout-purple .icon { color: #6e55c2; }
.callout .callout-text { font-size: 14.5px; line-height: 1.65; }
.callout-green  .callout-text { color: #2f4d3e; }
.callout-yellow .callout-text { color: #6b5414; }
.callout-red    .callout-text { color: #7a2f40; }
.callout-purple .callout-text { color: #5b4f86; }

/* ── Step list ── */
.smsosut-steps { display: flex; flex-direction: column; gap: 0; margin-top: 18px; }
.smsosut-step  { display: flex; gap: 15px; }
.smsosut-step-track { display: flex; flex-direction: column; align-items: center; }
.smsosut-step-num {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px;
  flex-shrink: 0;
}
.smsosut-step-num.blue { background: #2f6fb0; }
.smsosut-step-line { width: 2px; flex: 1; background: #e0eae4; margin: 3px 0; }
.smsosut-step-body { padding-bottom: 18px; padding-top: 3px; }
.smsosut-step-body b { font-size: 15px; color: #16271e; }
.smsosut-step-body div { font-size: 14px; color: #67786e; margin-top: 2px; }

/* ── Table ── */
.smsosut-table { border: 1px solid #e6eee9; border-radius: 13px; overflow: hidden; margin-top: 14px; }
.smsosut-table .table-head { background: #f4f8f5; font-size: 13px; font-weight: 700; color: #5a6b62; }
.smsosut-table .table-row { font-size: 14px; border-top: 1px solid #eef2ef; color: #39483f; }
.smsosut-table .table-row:nth-child(even) { background: #fbfdfc; }
.smsosut-table .table-cell { padding: 11px 15px; }

/* ── Prev/Next nav ── */
.smsosut-page-nav {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid #eef2ef;
  padding-top: 20px;
  margin-top: 40px;
}
.smsosut-page-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border: 1px solid #e6eee9;
  border-radius: 13px;
  transition: border-color .15s;
  text-decoration: none;
}
.smsosut-page-nav a:hover { border-color: var(--green); }
.smsosut-page-nav .nav-label { font-size: 12px; color: #9aa89f; }
.smsosut-page-nav .nav-title { font-size: 15px; font-weight: 600; color: #16271e; }
.smsosut-page-nav .icon { font-family: 'Material Symbols Rounded'; font-size: 22px; color: var(--green); }

/* ── Copy toast ── */
.copy-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: #16271e;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  padding: 9px 18px;
  border-radius: 10px;
  opacity: 0;
  transition: opacity .2s, transform .2s;
  pointer-events: none;
  z-index: 200;
}
.copy-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Search overlay */
#smsosut-search-overlay { display: none; }
#smsosut-search-overlay.open { display: flex; }
mark { background: #bfe9d1; color: inherit; border-radius: 2px; padding: 0 1px; }

/* Sidebar backdrop (mobile) */
#smsosut-sidebar-backdrop { display: none; position: fixed; inset: 0; z-index: 30; background: rgba(18,36,27,0.36); backdrop-filter: blur(2px); }
#smsosut-sidebar-backdrop.open { display: block; }

/* ── Footer ── */
.smsosut-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  padding: 28px 24px;
  font-size: 13px;
  color: #8a9991;
}
.smsosut-footer-inner { max-width: 1160px; margin: 0 auto; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.smsosut-footer-brand { display: flex; align-items: center; gap: 9px; }
.smsosut-footer-icon { width: 26px; height: 26px; border-radius: 7px; background: linear-gradient(150deg, #13a866, #0c814c); flex-shrink: 0; }
.smsosut-footer-name { font-weight: 600; color: #5a6b62; }

/* ── Grid utilities ── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }

/* ── Card variants ── */
.card-base { border-radius: 14px; background: #fff; transition: border-color .15s, box-shadow .15s; }
.card-green:hover  { border-color: #13a866 !important; box-shadow: 0 8px 22px rgba(14,157,90,0.12) !important; }
.card-gold:hover   { border-color: #d8b14e !important; }
.card-blue:hover   { border-color: #5b95cf !important; }
.card-pink:hover   { border-color: #d07795 !important; }
.card-olive:hover  { border-color: #8aa83f !important; }
.card-purple:hover { border-color: #8a73d6 !important; }

/* ── Page transitions ── */
.smsosut-content > * { animation: fadeUp .18s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* ════════════════════════════
   RESPONSIVE
   ════════════════════════════ */
@media (max-width: 768px) {
  .smsosut-mobile-menu-btn { display: flex; }
  .smsosut-search-trigger { display: none; }
  .smsosut-contact-btn span.label { display: none; }

  .smsosut-sidebar {
    position: fixed !important;
    top: 0 !important;
    left: -300px;
    width: 280px !important;
    height: 100vh !important;
    z-index: 35;
    transition: left .25s cubic-bezier(.4,0,.2,1);
    box-shadow: 4px 0 24px rgba(0,0,0,0.12);
    padding-top: 70px !important;
  }
  .smsosut-sidebar.open { left: 0 !important; }

  .smsosut-content { padding: 24px 18px 80px; }
  .smsosut-content h1 { font-size: 26px !important; }

  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .grid-3 { grid-template-columns: 1fr; }
}
