:root {
      --primary: #0B3D91;
      --primary-dark: #072b68;
      --primary-soft: #eaf1ff;
      --cyan: #0891B2;
      --cyan-soft: #ecfeff;
      --ink: #172033;
      --muted: #64748b;
      --line: #dbe4ef;
      --surface: #ffffff;
      --background: #f6f8fc;
      --success: #0f766e;
      --shadow: 0 16px 40px rgba(15, 36, 72, 0.09);
      --radius: 18px;
    }

    * {
      box-sizing: border-box;
    }

    html {
      scroll-behavior: smooth;
    }

    body {
      margin: 0;
      color: var(--ink);
      background: var(--background);
      font-family: "Noto Sans Thai", "Leelawadee UI", Tahoma, Arial, sans-serif;
      line-height: 1.65;
      overflow-x: hidden;
    }

    body.drawer-lock {
      overflow: hidden;
    }

    img {
      display: block;
      max-width: 100%;
    }

    a {
      color: inherit;
      text-decoration: none;
    }

    button,
    input,
    select {
      font: inherit;
    }

    button {
      color: inherit;
    }

    .container {
      width: min(1180px, calc(100% - 36px));
      margin-inline: auto;
    }

    .topbar {
      color: #dbeafe;
      background: #071b3d;
      font-size: 13px;
    }

    .topbar-inner {
      min-height: 38px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 20px;
    }

    .topbar-welcome {
      margin: 0;
    }

    .topbar-contact {
      display: flex;
      align-items: center;
      gap: 18px;
    }

    .topbar-contact a {
      transition: color 0.2s ease;
    }

    .topbar-contact a:hover {
      color: #ffffff;
    }

    .header {
      position: relative;
      z-index: 50;
      background: rgba(255, 255, 255, 0.98);
      border-bottom: 1px solid var(--line);
      box-shadow: 0 7px 22px rgba(15, 36, 72, 0.04);
    }

    .header-inner {
      min-height: 78px;
      display: flex;
      align-items: center;
      gap: 22px;
    }

    .logo {
      min-width: 180px;
      display: inline-flex;
      align-items: center;
      gap: 10px;
      color: var(--primary);
      font-size: 18px;
      font-weight: 800;
      line-height: 1.2;
    }

    .logo img {
      width: 42px;
      height: 42px;
      object-fit: contain;
      border-radius: 10px;
    }

    .main-nav {
      flex: 1;
      align-self: stretch;
    }

    .nav-list {
      height: 100%;
      margin: 0;
      padding: 0;
      display: flex;
      align-items: stretch;
      justify-content: center;
      list-style: none;
    }

    .nav-item {
      position: static;
      display: flex;
      align-items: stretch;
    }

    .nav-link {
      position: relative;
      padding: 0 10px;
      display: inline-flex;
      align-items: center;
      color: #26354d;
      font-size: 13px;
      font-weight: 700;
      white-space: nowrap;
      transition: color 0.2s ease;
    }

    .nav-link::after {
      content: "";
      position: absolute;
      right: 10px;
      bottom: 17px;
      left: 10px;
      height: 2px;
      background: var(--cyan);
      transform: scaleX(0);
      transition: transform 0.2s ease;
    }

    .nav-link.has-arrow {
      padding-right: 21px;
    }

    .nav-link.has-arrow::before {
      content: "";
      position: absolute;
      right: 8px;
      top: 50%;
      width: 5px;
      height: 5px;
      margin-top: -4px;
      border-right: 1.5px solid currentColor;
      border-bottom: 1.5px solid currentColor;
      transform: rotate(45deg);
    }

    .nav-item:hover > .nav-link,
    .nav-item:focus-within > .nav-link {
      color: var(--primary);
    }

    .nav-item:hover > .nav-link::after,
    .nav-item:focus-within > .nav-link::after {
      transform: scaleX(1);
    }

    .dropdown-panel,
    .mega-menu {
      position: absolute;
      top: 100%;
      left: 50%;
      z-index: 70;
      width: min(920px, calc(100vw - 36px));
      padding: 22px;
      visibility: hidden;
      opacity: 0;
      background: #ffffff;
      border: 1px solid var(--line);
      border-radius: 0 0 18px 18px;
      box-shadow: 0 24px 45px rgba(15, 36, 72, 0.16);
      transform: translate(-50%, 8px);
      pointer-events: none;
      transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
    }

    .dropdown-panel {
      width: min(420px, calc(100vw - 36px));
    }

    .dropdown-panel::before,
    .mega-menu::before {
      content: "";
      position: absolute;
      right: 0;
      bottom: 100%;
      left: 0;
      height: 10px;
    }

    .nav-item:hover > .dropdown-panel,
    .nav-item:focus-within > .dropdown-panel,
    .nav-item:hover > .mega-menu,
    .nav-item:focus-within > .mega-menu {
      visibility: visible;
      opacity: 1;
      transform: translate(-50%, 0);
      pointer-events: auto;
    }

    .mega-wide {
      width: min(1080px, calc(100vw - 36px));
    }

    .dropdown-title,
    .mega-title {
      margin: 0 0 14px;
      color: var(--primary);
      font-size: 14px;
      font-weight: 800;
    }

    .dropdown-list {
      display: grid;
      gap: 7px;
    }

    .dropdown-list a {
      padding: 10px 12px;
      color: #334155;
      background: #f8fafc;
      border-radius: 9px;
      font-size: 13px;
      transition: color 0.2s ease, background 0.2s ease;
    }

    .dropdown-list a:hover {
      color: var(--primary);
      background: var(--primary-soft);
    }

    .dropdown-all,
    .mega-footer {
      margin-top: 15px;
      padding-top: 13px;
      display: block;
      color: var(--primary);
      border-top: 1px solid var(--line);
      font-size: 13px;
      font-weight: 800;
      text-align: right;
    }

    .mega-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 12px;
    }

    .mega-card {
      min-width: 0;
      padding: 12px;
      display: flex;
      align-items: flex-start;
      gap: 11px;
      background: #f8fafc;
      border: 1px solid #eef2f7;
      border-radius: 12px;
      transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    }

    .mega-card:hover {
      border-color: #b7c8e8;
      box-shadow: 0 10px 22px rgba(11, 61, 145, 0.09);
      transform: translateY(-2px);
    }

    .mega-card > img {
      width: 48px;
      height: 48px;
      flex: 0 0 48px;
      object-fit: cover;
      background: #ffffff;
      border: 1px solid var(--line);
      border-radius: 10px;
    }

    .mega-card-body {
      min-width: 0;
      display: block;
    }

    .mega-card-body strong {
      display: block;
      color: #172033;
      font-size: 13px;
      line-height: 1.4;
    }

    .mega-card-body small,
    .mega-card-body p {
      margin: 4px 0 0;
      display: block;
      color: var(--muted);
      font-size: 11px;
      line-height: 1.5;
    }

    .mega-card-body p {
      display: -webkit-box;
      overflow: hidden;
      -webkit-box-orient: vertical;
      -webkit-line-clamp: 2;
    }

    .mega-category-list {
      margin-bottom: 16px;
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }

    .mega-category-list a {
      padding: 7px 11px;
      color: var(--primary);
      background: var(--primary-soft);
      border-radius: 999px;
      font-size: 12px;
      font-weight: 700;
    }

    .header-btns {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 9px;
      white-space: nowrap;
    }

    .account-link {
      padding: 10px 15px;
      color: #ffffff;
      background: var(--primary);
      border-radius: 10px;
      font-size: 13px;
      font-weight: 800;
      box-shadow: 0 8px 18px rgba(11, 61, 145, 0.2);
      transition: background 0.2s ease, transform 0.2s ease;
    }

    .account-link:hover {
      background: var(--primary-dark);
      transform: translateY(-1px);
    }

    .hamburger {
      width: 43px;
      height: 43px;
      padding: 10px;
      display: none;
      align-items: center;
      justify-content: center;
      flex-direction: column;
      gap: 5px;
      background: #ffffff;
      border: 1px solid var(--line);
      border-radius: 10px;
      cursor: pointer;
    }

    .hamburger span {
      width: 20px;
      height: 2px;
      display: block;
      background: var(--primary);
      transition: transform 0.2s ease, opacity 0.2s ease;
    }

    .hamburger.active span:nth-child(1) {
      transform: translateY(7px) rotate(45deg);
    }

    .hamburger.active span:nth-child(2) {
      opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
      transform: translateY(-7px) rotate(-45deg);
    }

    .drawer-overlay {
      position: fixed;
      inset: 0;
      z-index: 90;
      visibility: hidden;
      opacity: 0;
      background: rgba(4, 15, 35, 0.58);
      backdrop-filter: blur(3px);
      transition: opacity 0.25s ease, visibility 0.25s ease;
    }

    .drawer-overlay.open {
      visibility: visible;
      opacity: 1;
    }

    .mobile-drawer {
      position: fixed;
      top: 0;
      right: 0;
      z-index: 100;
      width: min(390px, 90vw);
      height: 100dvh;
      overflow-y: auto;
      background: #ffffff;
      box-shadow: -24px 0 50px rgba(3, 20, 52, 0.2);
      transform: translateX(105%);
      transition: transform 0.28s ease;
    }

    .mobile-drawer.open {
      transform: translateX(0);
    }

    .drawer-head {
      min-height: 72px;
      padding: 14px 18px;
      display: flex;
      align-items: center;
      gap: 10px;
      color: #ffffff;
      background: var(--primary);
    }

    .drawer-head > a {
      padding: 8px 11px;
      background: rgba(255, 255, 255, 0.13);
      border: 1px solid rgba(255, 255, 255, 0.25);
      border-radius: 8px;
      font-size: 13px;
      font-weight: 700;
    }

    .drawer-close {
      width: 40px;
      height: 40px;
      margin-left: auto;
      color: #ffffff;
      background: transparent;
      border: 0;
      border-radius: 8px;
      font-size: 28px;
      line-height: 1;
      cursor: pointer;
    }

    .drawer-menu {
      padding: 13px 18px 30px;
    }

    .drawer-link,
    .drawer-toggle {
      width: 100%;
      min-height: 48px;
      padding: 11px 5px;
      display: flex;
      align-items: center;
      color: #26354d;
      background: transparent;
      border: 0;
      border-bottom: 1px solid #edf1f6;
      font-weight: 750;
      text-align: left;
      cursor: pointer;
    }

    .drawer-toggle {
      position: relative;
      padding-right: 30px;
    }

    .drawer-toggle::after {
      content: "+";
      position: absolute;
      right: 7px;
      color: var(--primary);
      font-size: 20px;
    }

    .drawer-toggle.active::after {
      content: "−";
    }

    .drawer-submenu {
      max-height: 0;
      overflow: hidden;
      background: #f8fafc;
      border-radius: 0 0 10px 10px;
      transition: max-height 0.28s ease;
    }

    .drawer-submenu.open {
      max-height: 620px;
    }

    .drawer-submenu a {
      padding: 9px 14px;
      display: block;
      color: #526178;
      border-bottom: 1px solid #edf1f6;
      font-size: 13px;
    }

    .category-page {
      min-height: 65vh;
    }

    .category-page .category-intro {
      position: relative;
      overflow: hidden;
      padding: 64px 0 58px;
      color: #ffffff;
      background:
        radial-gradient(circle at 82% 18%, rgba(8, 145, 178, 0.38), transparent 28%),
        linear-gradient(135deg, #061c42 0%, #0b3d91 62%, #086c91 100%);
    }

    .category-page .category-intro::before,
    .category-page .category-intro::after {
      content: "";
      position: absolute;
      border: 1px solid rgba(255, 255, 255, 0.12);
      border-radius: 50%;
    }

    .category-page .category-intro::before {
      width: 310px;
      height: 310px;
      top: -180px;
      left: 8%;
    }

    .category-page .category-intro::after {
      width: 420px;
      height: 420px;
      right: -150px;
      bottom: -320px;
    }

    .category-page .breadcrumb {
      position: relative;
      z-index: 1;
      margin-bottom: 18px;
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 9px;
      color: #bfdbfe;
      font-size: 13px;
    }

    .category-page .breadcrumb a:hover {
      color: #ffffff;
    }

    .category-page .category-kicker {
      position: relative;
      z-index: 1;
      margin: 0 0 10px;
      color: #a5f3fc;
      font-size: 13px;
      font-weight: 800;
      letter-spacing: 0.08em;
    }

    .category-page .category-title {
      position: relative;
      z-index: 1;
      max-width: 850px;
      margin: 0;
      font-size: clamp(34px, 5vw, 62px);
      line-height: 1.12;
      letter-spacing: -0.035em;
    }

    .category-page .category-description {
      position: relative;
      z-index: 1;
      max-width: 760px;
      margin: 18px 0 0;
      color: #dbeafe;
      font-size: 17px;
    }

    .category-page .category-highlights {
      position: relative;
      z-index: 1;
      margin-top: 27px;
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
    }

    .category-page .category-highlights span {
      padding: 8px 13px;
      color: #ecfeff;
      background: rgba(255, 255, 255, 0.1);
      border: 1px solid rgba(255, 255, 255, 0.18);
      border-radius: 999px;
      font-size: 13px;
      backdrop-filter: blur(6px);
    }

    .category-page .category-content {
      padding: 54px 0 76px;
    }

    .category-page .section-head {
      margin-bottom: 25px;
      display: flex;
      align-items: end;
      justify-content: space-between;
      gap: 20px;
    }

    .category-page .section-head h2 {
      margin: 0;
      color: #172033;
      font-size: clamp(25px, 3vw, 34px);
      line-height: 1.25;
    }

    .category-page .section-head p {
      max-width: 560px;
      margin: 7px 0 0;
      color: var(--muted);
    }

    .category-page .section-mark {
      flex: 0 0 auto;
      padding: 8px 12px;
      color: var(--primary);
      background: var(--primary-soft);
      border-radius: 999px;
      font-size: 13px;
      font-weight: 800;
    }

    .category-page .article-list {
      display: grid;
      gap: 22px;
    }

    .category-page .article-card {
      min-width: 0;
      overflow: hidden;
      display: grid;
      grid-template-columns: minmax(260px, 330px) minmax(0, 1fr);
      background: var(--surface);
      border: 1px solid var(--line);
      border-radius: var(--radius);
      box-shadow: 0 8px 25px rgba(15, 36, 72, 0.05);
      transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
    }

    .category-page .article-card:hover {
      border-color: #b9c9e4;
      box-shadow: var(--shadow);
      transform: translateY(-3px);
    }

    .category-page .article-cover {
      position: relative;
      min-height: 265px;
      overflow: hidden;
      background: #dce7f5;
    }

    .category-page .article-cover img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      transition: transform 0.35s ease;
    }

    .category-page .article-card:hover .article-cover img {
      transform: scale(1.035);
    }

    .category-page .cover-category {
      position: absolute;
      top: 16px;
      left: 16px;
      padding: 7px 11px;
      color: #ffffff;
      background: rgba(11, 61, 145, 0.92);
      border-radius: 999px;
      box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
      font-size: 12px;
      font-weight: 800;
    }

    .category-page .article-body {
      min-width: 0;
      padding: 25px 28px 23px;
      display: flex;
      flex-direction: column;
    }

    .category-page .article-label {
      margin-bottom: 8px;
      color: var(--cyan);
      font-size: 12px;
      font-weight: 850;
      letter-spacing: 0.04em;
    }

    .category-page .article-title {
      margin: 0;
      color: #172033;
      font-size: clamp(21px, 2.3vw, 27px);
      line-height: 1.35;
    }

    .category-page .article-title a {
      transition: color 0.2s ease;
    }

    .category-page .article-title a:hover {
      color: var(--primary);
    }

    .category-page .article-summary {
      margin: 12px 0 15px;
      display: -webkit-box;
      overflow: hidden;
      color: #536178;
      font-size: 15px;
      line-height: 1.75;
      -webkit-box-orient: vertical;
      -webkit-line-clamp: 3;
    }

    .category-page .article-meta {
      margin: 0 0 14px;
      padding: 0;
      display: flex;
      flex-wrap: wrap;
      gap: 7px 16px;
      color: #748197;
      list-style: none;
      font-size: 12px;
    }

    .category-page .article-meta li {
      position: relative;
    }

    .category-page .article-meta li:not(:last-child)::after {
      content: "";
      position: absolute;
      top: 50%;
      right: -9px;
      width: 3px;
      height: 3px;
      background: #a6b1c1;
      border-radius: 50%;
    }

    .category-page .article-tags {
      margin-bottom: 17px;
      padding: 10px 12px;
      color: #4d607c;
      background: #f7f9fc;
      border-left: 3px solid var(--cyan);
      border-radius: 7px;
      font-size: 12px;
      line-height: 1.6;
    }

    .category-page .article-actions {
      margin-top: auto;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
    }

    .category-page .read-more {
      padding: 10px 16px;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      color: #ffffff;
      background: var(--primary);
      border-radius: 10px;
      font-size: 13px;
      font-weight: 800;
      transition: background 0.2s ease, transform 0.2s ease;
    }

    .category-page .read-more::after {
      content: "→";
      font-size: 16px;
    }

    .category-page .read-more:hover {
      background: var(--primary-dark);
      transform: translateX(2px);
    }

    .category-page .reading-note {
      color: var(--success);
      font-size: 12px;
      font-weight: 700;
    }

    .category-page .pagination {
      margin-top: 38px;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-wrap: wrap;
      gap: 8px;
    }

    .category-page .pagination a {
      min-width: 42px;
      min-height: 42px;
      padding: 8px 12px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      color: #40506a;
      background: #ffffff;
      border: 1px solid var(--line);
      border-radius: 10px;
      font-size: 13px;
      font-weight: 750;
      transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
    }

    .category-page .pagination a:hover,
    .category-page .pagination a.active,
    .category-page .pagination a.current {
      color: #ffffff;
      background: var(--primary);
      border-color: var(--primary);
    }

    .category-page .editorial-note {
      margin-top: 44px;
      padding: 24px 26px;
      display: grid;
      grid-template-columns: auto minmax(0, 1fr);
      gap: 17px;
      color: #334155;
      background: var(--cyan-soft);
      border: 1px solid #bae6fd;
      border-radius: 16px;
    }

    .category-page .editorial-icon {
      width: 45px;
      height: 45px;
      display: grid;
      place-items: center;
      color: #ffffff;
      background: var(--cyan);
      border-radius: 12px;
      font-size: 20px;
      font-weight: 900;
    }

    .category-page .editorial-note h2 {
      margin: 0 0 4px;
      color: #164e63;
      font-size: 18px;
    }

    .category-page .editorial-note p {
      margin: 0;
      color: #496576;
      font-size: 14px;
    }

    .footer {
      color: #cbd5e1;
      background: #07162f;
    }

    .footer-grid {
      padding: 58px 0 42px;
      display: grid;
      grid-template-columns: 1.45fr 1fr 1fr 1.1fr;
      gap: 38px;
    }

    .footer .logo {
      color: #ffffff;
    }

    .footer-brand p {
      max-width: 410px;
      margin: 18px 0;
      color: #aebbd0;
      font-size: 14px;
    }

    .footer-social {
      display: flex;
      flex-wrap: wrap;
      gap: 9px;
    }

    .footer h3 {
      margin: 7px 0 17px;
      color: #ffffff;
      font-size: 16px;
    }

    .footer-links,
    .footer-contact {
      display: grid;
      gap: 10px;
      color: #aebbd0;
      font-size: 14px;
    }

    .footer-links a,
    .footer-contact a {
      transition: color 0.2s ease, transform 0.2s ease;
    }

    .footer-links a:hover,
    .footer-contact a:hover {
      color: #ffffff;
      transform: translateX(2px);
    }

    .footer-contact span {
      margin-top: 5px;
      color: #8291aa;
      font-size: 12px;
    }

    .footer-bottom {
      min-height: 66px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 20px;
      color: #8291aa;
      border-top: 1px solid rgba(255, 255, 255, 0.09);
      font-size: 12px;
    }

    @media (max-width: 1120px) {
      .main-nav {
        display: none;
      }

      .hamburger {
        display: flex;
      }

      .header-inner {
        justify-content: space-between;
      }

      .header-btns {
        margin-left: auto;
      }

      .footer-grid {
        grid-template-columns: 1.4fr 1fr 1fr;
      }

      .footer-brand {
        grid-column: 1 / -1;
      }
    }

    @media (max-width: 820px) {
      .topbar-inner {
        padding: 8px 0;
        align-items: flex-start;
        flex-direction: column;
        gap: 3px;
      }

      .topbar-contact {
        gap: 12px;
        flex-wrap: wrap;
      }

      .category-page .category-intro {
        padding: 48px 0;
      }

      .category-page .section-head {
        align-items: flex-start;
        flex-direction: column;
      }

      .category-page .article-card {
        grid-template-columns: 1fr;
      }

      .category-page .article-cover {
        min-height: 230px;
        aspect-ratio: 16 / 9;
      }

      .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .footer-brand {
        grid-column: 1 / -1;
      }
    }

    @media (max-width: 560px) {
      .container {
        width: min(100% - 24px, 1180px);
      }

      .topbar {
        font-size: 11px;
      }

      .header-inner {
        min-height: 68px;
        gap: 10px;
      }

      .logo {
        min-width: 0;
        font-size: 15px;
      }

      .logo img {
        width: 37px;
        height: 37px;
      }

      .header-btns {
        gap: 6px;
      }

      .account-link {
        padding: 9px 10px;
        font-size: 11px;
      }

      .hamburger {
        width: 40px;
        height: 40px;
      }

      .category-page .category-intro {
        padding: 41px 0;
      }

      .category-page .category-title {
        font-size: 35px;
      }

      .category-page .category-description {
        font-size: 15px;
      }

      .category-page .category-content {
        padding: 39px 0 58px;
      }

      .category-page .article-body {
        padding: 20px 18px;
      }

      .category-page .article-summary {
        -webkit-line-clamp: 4;
      }

      .category-page .article-meta {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
      }

      .category-page .article-meta li:not(:last-child)::after {
        display: none;
      }

      .category-page .article-actions {
        align-items: flex-start;
        flex-direction: column;
      }

      .category-page .editorial-note {
        grid-template-columns: 1fr;
      }

      .footer-grid {
        padding-top: 42px;
        grid-template-columns: 1fr;
        gap: 27px;
      }

      .footer-brand {
        grid-column: auto;
      }

      .footer-bottom {
        padding: 18px 0;
        align-items: flex-start;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
      }
    }