/**
 * NSWSSK Purple & Gold Theme for Joomla 4 Cassiopeia Child Template
 * Nakornsrilumduanwittaya School (nswssk.ac.th)
 */

:root {
  --nsw-purple-950: #2b0936;
  --nsw-purple-900: #3d0e4d;
  --nsw-purple-800: #4a1259;
  --nsw-purple-700: #6d1b7b;
  --nsw-purple-600: #862496;
  --nsw-purple-100: #f3eaf7;
  --nsw-purple-50: #f8f5fb;
  --nsw-gold-500: #eab308;
  --nsw-gold-400: #facc15;
  --nsw-gold-300: #fde047;
  --nsw-gold-100: #fef9c3;
  --nsw-ink: #261b30;
  --nsw-muted: #645870;
  --nsw-border: rgba(109, 27, 123, 0.14);
  --nsw-shadow: 0 8px 24px rgba(59, 13, 73, 0.07);
  --nsw-shadow-hover: 0 12px 30px rgba(59, 13, 73, 0.13);
  --nsw-radius: 16px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
  background-color: var(--nsw-purple-50);
  color: var(--nsw-ink);
  font-family: "Noto Sans Thai", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
  scroll-behavior: smooth;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  font-family: "Prompt", "Noto Sans Thai", system-ui, sans-serif;
  color: var(--nsw-purple-900);
  font-weight: 600;
  line-height: 1.35;
}

a {
  color: var(--nsw-purple-700);
  text-decoration: none;
  transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

a:hover,
a:focus-visible {
  color: var(--nsw-purple-900);
}

.nsw-container {
  width: 100%;
  max-width: 1320px;
  margin-inline: auto;
  padding-inline: 1rem;
}

/* =========================================================
   HEADER: BRAND BAR + NAVIGATION BAR
   ========================================================= */
.nsw-header {
  background: transparent;
  box-shadow: 0 6px 24px rgba(43, 9, 54, 0.18);
  position: relative;
  z-index: 1020;
}

.nsw-header.nsw-sticky-header {
  position: sticky;
  top: 0;
}

.nsw-topbar {
  background: var(--nsw-purple-950);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.85rem;
  padding: 0.35rem 1rem;
  border-bottom: 1px solid rgba(250, 204, 21, 0.22);
}

.nsw-brand-bar {
  background: linear-gradient(135deg, #3b0b48 0%, #5c166b 55%, #6d1b7b 100%);
  color: #ffffff;
  padding-block: 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nsw-brand-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nsw-brand-link {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  color: #ffffff;
  min-width: 0;
}

.nsw-brand-link:hover,
.nsw-brand-link:focus-visible {
  color: var(--nsw-gold-300);
}

.nsw-logo-badge {
  width: 58px;
  height: 58px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #ffffff;
  padding: 3px;
  box-shadow: 0 0 0 2px var(--nsw-gold-400), 0 6px 16px rgba(0, 0, 0, 0.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.nsw-logo-badge--sm {
  width: 48px;
  height: 48px;
}

.nsw-brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
  display: block;
}

.nsw-brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.nsw-school-name {
  font-family: "Prompt", "Noto Sans Thai", sans-serif;
  font-size: clamp(1.05rem, 2.2vw, 1.45rem);
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.01em;
  line-height: 1.25;
}

.nsw-school-motto {
  font-size: clamp(0.76rem, 1.3vw, 0.9rem);
  color: var(--nsw-gold-300);
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nsw-brand-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}

.nsw-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.48rem 0.95rem;
  border-radius: 999px;
  font-family: "Prompt", "Noto Sans Thai", sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}

.nsw-action-btn--gold {
  background: linear-gradient(135deg, #facc15 0%, #eab308 100%);
  color: #2b0936;
  box-shadow: 0 4px 12px rgba(250, 204, 21, 0.28);
}

.nsw-action-btn--gold:hover,
.nsw-action-btn--gold:focus-visible {
  background: linear-gradient(135deg, #fde047 0%, #facc15 100%);
  color: #2b0936;
  transform: translateY(-1px);
}

.nsw-action-btn--ghost {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.nsw-action-btn--ghost:hover,
.nsw-action-btn--ghost:focus-visible {
  background: rgba(255, 255, 255, 0.22);
  color: var(--nsw-gold-300);
  border-color: var(--nsw-gold-400);
}

.nsw-mobile-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(250, 204, 21, 0.5);
  border-radius: 10px;
  padding: 0.45rem 0.65rem;
  color: #ffffff;
  cursor: pointer;
}

.nsw-hamburger-line {
  width: 20px;
  height: 2px;
  background: var(--nsw-gold-400);
  border-radius: 2px;
  display: block;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nsw-mobile-toggle-label {
  font-family: "Prompt", "Noto Sans Thai", sans-serif;
  font-size: 0.7rem;
  line-height: 1;
  color: #ffffff;
  margin-top: 2px;
}

/* Navigation Bar */
.nsw-nav-bar {
  background: var(--nsw-purple-950);
  border-bottom: 3px solid var(--nsw-gold-400);
}

.nsw-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-block: 0.35rem;
  flex-wrap: wrap;
}

.nsw-main-nav,
.nsw-sub-nav {
  margin: 0 !important;
  padding: 0 !important;
  width: auto !important;
  max-width: 100%;
}

.nsw-main-nav {
  flex: 1 1 auto;
}

.nsw-sub-nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 0 0 auto;
}

/* Fix Cassiopeia metismenu wrapping & arrow drop */
.nsw-header .mod-menu_dropdown-metismenu {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0 !important;
  padding: 0 !important;
}

.nsw-header .mod-menu_dropdown-metismenu > li.metismenu-item {
  position: relative;
  display: inline-flex !important;
  align-items: center;
  margin: 0 !important;
  padding: 0 !important;
}

.nsw-header .mod-menu_dropdown-metismenu > li.metismenu-item > a,
.nsw-header .mod-menu_dropdown-metismenu > li.metismenu-item > span {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 0.85rem;
  color: rgba(255, 255, 255, 0.94) !important;
  font-family: "Prompt", "Noto Sans Thai", sans-serif;
  font-size: 0.92rem;
  font-weight: 500;
  border-radius: 8px;
  white-space: nowrap;
  text-decoration: none;
}

.nsw-header .mod-menu_dropdown-metismenu > li.metismenu-item > a:hover,
.nsw-header .mod-menu_dropdown-metismenu > li.metismenu-item > a:focus-visible {
  background: rgba(250, 204, 21, 0.14);
  color: var(--nsw-gold-300) !important;
}

.nsw-header .mod-menu_dropdown-metismenu > li.current.active > a {
  background: var(--nsw-gold-400);
  color: var(--nsw-purple-950) !important;
  font-weight: 600;
}

.nsw-header .mod-menu_dropdown-metismenu > li.metismenu-item > button.mm-toggler {
  position: static !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-left: -0.35rem;
  margin-right: 0.25rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--nsw-gold-300) !important;
  border-radius: 6px;
  cursor: pointer;
}

.nsw-header .mod-menu_dropdown-metismenu > li.metismenu-item > button.mm-toggler::before {
  border-color: var(--nsw-gold-300);
}

.nsw-header .mod-menu_dropdown-metismenu ul.mm-collapse {
  background: #ffffff;
  border: 1px solid var(--nsw-border);
  border-top: 3px solid var(--nsw-gold-400);
  border-radius: 12px;
  box-shadow: 0 14px 32px rgba(43, 9, 54, 0.22);
  padding: 0.45rem;
  min-width: 220px;
  z-index: 1050;
}

.nsw-header .mod-menu_dropdown-metismenu ul.mm-collapse li a {
  display: block;
  padding: 0.5rem 0.85rem;
  color: var(--nsw-ink) !important;
  border-radius: 8px;
  font-size: 0.9rem;
}

.nsw-header .mod-menu_dropdown-metismenu ul.mm-collapse li a:hover {
  background: var(--nsw-purple-50);
  color: var(--nsw-purple-700) !important;
}

/* Search Bar Polish */
.nsw-search-wrap {
  margin: 0 !important;
}

.nsw-search-wrap .mod-finder {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: nowrap;
}

.nsw-search-wrap label.finder {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.nsw-search-wrap .awesomplete {
  display: flex;
  align-items: center;
}

.nsw-search-wrap .js-finder-search-query.form-control {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(250, 204, 21, 0.45);
  border-radius: 999px;
  color: #ffffff;
  font-size: 0.88rem;
  padding: 0.38rem 0.95rem;
  min-width: 190px;
  max-width: 230px;
  height: 36px;
}

.nsw-search-wrap .js-finder-search-query.form-control::placeholder {
  color: rgba(255, 255, 255, 0.72);
}

.nsw-search-wrap .js-finder-search-query.form-control:focus {
  background: #ffffff;
  color: var(--nsw-ink);
  border-color: var(--nsw-gold-400);
  box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.28);
}

.nsw-search-wrap .mod-finder__advanced-link {
  color: var(--nsw-gold-300);
  font-size: 0.78rem;
  white-space: nowrap;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
}

.nsw-search-wrap .mod-finder__advanced-link:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

/* =========================================================
   MAIN GRID & LAYOUT CONTAINERS
   ========================================================= */
.nsw-site-grid {
  max-width: 1320px;
  margin-inline: auto;
  padding: 1.5rem 1rem 2.5rem;
  gap: 1.5rem;
}

.nsw-site-grid > .grid-child {
  min-width: 0;
  max-width: 100%;
}

.container-component,
.container-sidebar-right,
.container-sidebar-left {
  min-width: 0;
  max-width: 100%;
}

/* Breadcrumbs */
.mod-breadcrumbs__wrapper {
  margin-bottom: 1rem;
}

.mod-breadcrumbs.breadcrumb {
  background: #ffffff;
  border: 1px solid var(--nsw-border);
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(59, 13, 73, 0.04);
  margin-bottom: 0;
  font-size: 0.88rem;
}

/* =========================================================
   CARDS & MODULES (MAIN-TOP, MAIN-BOTTOM, SIDEBAR)
   ========================================================= */
.nsw-theme .card {
  background: #ffffff;
  border: 1px solid var(--nsw-border);
  border-radius: var(--nsw-radius);
  box-shadow: var(--nsw-shadow);
  overflow: hidden;
  margin-bottom: 1.35rem;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.nsw-theme .card:hover {
  box-shadow: var(--nsw-shadow-hover);
}

.nsw-theme .card > .card-header,
.nsw-theme .card > h3.card-header {
  background: linear-gradient(135deg, #531363 0%, #6d1b7b 100%);
  color: #ffffff;
  font-family: "Prompt", "Noto Sans Thai", sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  padding: 0.85rem 1.25rem;
  border-bottom: 3px solid var(--nsw-gold-400);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.nsw-theme .card > .card-header::before,
.nsw-theme .card > h3.card-header::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--nsw-gold-400);
  flex-shrink: 0;
}

.nsw-theme .card-body {
  padding: 1.25rem;
  min-width: 0;
  overflow-wrap: break-word;
}

/* Hero Banner Module (main-top custom card without header) */
.main-top.card:not(:has(> .card-header)) .card-body {
  padding: 0;
}

.main-top.card h1:empty,
.main-top.card p:empty {
  display: none;
}

.main-top.card:not(:has(> .card-header)) img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0;
}

/* Stats module (no-card in sidebar-right) -> style like matching card */
.sidebar-right.no-card {
  background: #ffffff;
  border: 1px solid var(--nsw-border);
  border-radius: var(--nsw-radius);
  box-shadow: var(--nsw-shadow);
  overflow: hidden;
  margin-bottom: 1.35rem;
}

.sidebar-right.no-card > h3 {
  background: linear-gradient(135deg, #531363 0%, #6d1b7b 100%);
  color: #ffffff;
  font-family: "Prompt", "Noto Sans Thai", sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  padding: 0.85rem 1.25rem;
  border-bottom: 3px solid var(--nsw-gold-400);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.sidebar-right.no-card > h3::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--nsw-gold-400);
  flex-shrink: 0;
}

.sidebar-right.no-card .mod-stats {
  padding: 0.65rem 1rem 1rem;
  margin: 0;
}

.sidebar-right.no-card .mod-stats .list-group-item {
  border: 0;
  border-bottom: 1px dashed var(--nsw-border);
  padding: 0.6rem 0.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.92rem;
}

.sidebar-right.no-card .mod-stats .list-group-item:last-child {
  border-bottom: 0;
}

.sidebar-right.no-card .mod-stats .badge {
  background-color: var(--nsw-purple-700) !important;
  color: #ffffff;
  font-weight: 600;
  padding: 0.38rem 0.7rem;
}

/* E-Service, ITA & Articles Category Links inside Cards */
.mod-articlescategory.category-module {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mod-articlescategory.category-module li {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--nsw-purple-100);
  border-radius: 8px;
  transition: background-color 0.16s ease, padding-left 0.16s ease;
}

.mod-articlescategory.category-module li:last-child {
  border-bottom: 0;
}

.mod-articlescategory.category-module li:hover {
  background: var(--nsw-purple-50);
  padding-left: 1rem;
}

.sidebar-right .mod-custom a:not(:has(img)),
#mod-custom145 a:not(:has(img)) {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.7rem;
  margin-block: 0.2rem;
  border-radius: 8px;
  background: var(--nsw-purple-50);
  border: 1px solid rgba(109, 27, 123, 0.14);
  color: var(--nsw-purple-800);
  font-weight: 500;
  font-size: 0.9rem;
}

.sidebar-right .mod-custom a:not(:has(img)):hover,
#mod-custom145 a:not(:has(img)):hover {
  background: var(--nsw-purple-700);
  color: #ffffff;
  border-color: var(--nsw-purple-700);
  transform: translateX(3px);
}

/* =========================================================
   FEATURED ARTICLES / BLOG CONTENT
   ========================================================= */
.blog-featured .page-header {
  margin-bottom: 1.25rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--nsw-purple-100);
}

.blog-featured .page-header h1 {
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  color: var(--nsw-purple-900);
  margin: 0;
  position: relative;
  display: inline-block;
  padding-bottom: 0.45rem;
}

.blog-featured .page-header h1::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.62rem;
  width: 72px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--nsw-purple-700), var(--nsw-gold-400));
}

.blog-featured .blog-item {
  background: #ffffff;
  border: 1px solid var(--nsw-border);
  border-radius: var(--nsw-radius);
  box-shadow: var(--nsw-shadow);
  padding: 1.4rem 1.5rem;
  margin-bottom: 1.35rem;
  min-width: 0;
}

.blog-featured .items-leading .blog-item {
  border-top: 4px solid var(--nsw-purple-700);
}

.blog-featured .item-title {
  font-size: 1.28rem;
  margin-bottom: 0.65rem;
}

.blog-featured .item-title a {
  color: var(--nsw-purple-900);
}

.blog-featured .item-title a:hover {
  color: var(--nsw-purple-600);
}

.article-info {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.65rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--nsw-purple-100);
}

.article-info dd {
  margin: 0;
  background: var(--nsw-purple-50);
  color: var(--nsw-muted);
  border: 1px solid var(--nsw-purple-100);
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
  font-size: 0.82rem;
}

/* Pagination */
.pagination .page-item .page-link {
  color: var(--nsw-purple-800);
  border-color: var(--nsw-border);
  border-radius: 10px;
  margin-inline: 2px;
  padding: 0.45rem 0.82rem;
}

.pagination .page-item.active .page-link {
  background: linear-gradient(135deg, #6d1b7b 0%, #4a1259 100%);
  border-color: var(--nsw-purple-800);
  color: #ffffff;
  font-weight: 600;
}

.pagination .page-item .page-link:hover {
  background: var(--nsw-purple-100);
  color: var(--nsw-purple-900);
}

/* =========================================================
   RESPONSIVE MEDIA & EMBEDS (ZERO HORIZONTAL OVERFLOW)
   ========================================================= */
.nsw-theme img {
  max-width: 100% !important;
  height: auto !important;
  border-radius: 10px;
}

.nsw-theme .nsw-brand-logo-img {
  border-radius: 50% !important;
}

.nsw-theme iframe {
  max-width: 100% !important;
  border-radius: 12px;
  border: 1px solid var(--nsw-border);
  background: #fafafa;
}

.nsw-iframe-wrap {
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  border-radius: 12px;
  margin-block: 0.75rem;
}

.nsw-iframe-wrap--16x9 {
  aspect-ratio: 16 / 9;
}

.nsw-iframe-wrap--doc {
  aspect-ratio: 4 / 3;
  min-height: 360px;
}

.nsw-iframe-wrap > iframe {
  width: 100% !important;
  height: 100% !important;
  border: 0;
  display: block;
}

.nsw-theme table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
}

/* =========================================================
   FOOTER & BACK TO TOP
   ========================================================= */
.nsw-footer {
  background: linear-gradient(180deg, #330a3f 0%, #23062c 100%);
  color: rgba(255, 255, 255, 0.88);
  border-top: 4px solid var(--nsw-gold-400);
  padding-top: 2.5rem;
  padding-bottom: 4.5rem; /* Safe margin above Tawk.to floating bubble */
  margin-top: 1.5rem;
}

.nsw-footer a {
  color: var(--nsw-gold-300);
}

.nsw-footer a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.nsw-footer-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.nsw-footer-brand-head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.85rem;
}

.nsw-footer-title {
  color: #ffffff;
  font-size: 1.15rem;
  margin: 0 0 0.2rem;
}

.nsw-footer-motto {
  color: var(--nsw-gold-300);
  font-size: 0.86rem;
  margin: 0;
}

.nsw-footer-address {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.78);
  margin: 0;
}

.nsw-footer-heading {
  color: var(--nsw-gold-400);
  font-size: 1rem;
  margin-bottom: 0.85rem;
}

.nsw-footer-links,
.nsw-footer-contact {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.9rem;
}

.nsw-footer-links li,
.nsw-footer-contact li {
  margin-bottom: 0.45rem;
}

.nsw-footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-top: 1.1rem;
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.72);
}

.nsw-footer-colors-tag {
  background: rgba(250, 204, 21, 0.14);
  color: var(--nsw-gold-300);
  border: 1px solid rgba(250, 204, 21, 0.35);
  border-radius: 999px;
  padding: 0.18rem 0.75rem;
  font-size: 0.78rem;
}

/* Place Back-to-top on bottom-left so it never collides with Tawk.to on bottom-right */
.nsw-back-top {
  position: fixed !important;
  left: 1.25rem !important;
  right: auto !important;
  bottom: 1.25rem !important;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--nsw-purple-700), var(--nsw-purple-900));
  color: var(--nsw-gold-400) !important;
  border: 2px solid var(--nsw-gold-400);
  box-shadow: 0 6px 18px rgba(43, 9, 54, 0.32);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 1030;
}

.nsw-back-top:hover {
  background: var(--nsw-gold-400);
  color: var(--nsw-purple-950) !important;
  transform: translateY(-2px);
}

/* =========================================================
   RESPONSIVE BREAKPOINTS (MOBILE & TABLET)
   ========================================================= */
@media (max-width: 991.98px) {
  .nsw-action-btn {
    display: none;
  }

  .nsw-mobile-toggle {
    display: inline-flex;
  }

  .nsw-nav-bar {
    display: none;
  }

  .nsw-nav-bar.is-open {
    display: block;
    animation: nswSlideDown 0.2s ease-out;
  }

  .nsw-nav-inner {
    flex-direction: column;
    align-items: stretch;
    padding-block: 0.75rem;
  }

  .nsw-header .mod-menu_dropdown-metismenu {
    flex-direction: column;
    align-items: stretch;
  }

  .nsw-header .mod-menu_dropdown-metismenu > li.metismenu-item {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .nsw-header .mod-menu_dropdown-metismenu > li.metismenu-item > a {
    flex: 1 1 auto;
    white-space: normal;
  }

  .nsw-header .mod-menu_dropdown-metismenu ul.mm-collapse {
    width: 100%;
    position: static !important;
    box-shadow: none;
    margin-bottom: 0.4rem;
  }

  .nsw-sub-nav {
    width: 100% !important;
    padding-top: 0.5rem !important;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }

  .nsw-search-wrap,
  .nsw-search-wrap .mod-finder,
  .nsw-search-wrap .awesomplete,
  .nsw-search-wrap .js-finder-search-query.form-control {
    width: 100%;
    max-width: 100%;
  }

  .nsw-footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

@media (max-width: 575.98px) {
  .nsw-logo-badge {
    width: 46px;
    height: 46px;
  }

  .nsw-school-motto {
    display: none;
  }

  .blog-featured .blog-item {
    padding: 1rem;
  }

  .nsw-theme .card-body {
    padding: 1rem;
  }
}

@keyframes nswSlideDown {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
