.public-template-fonts,
body {
  --font-body: "IBM Plex Sans Thai", -apple-system, BlinkMacSystemFont, "Segoe UI", Tahoma, sans-serif;
  --font-heading: "Anuphan", "IBM Plex Sans Thai", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  font-family: var(--font-body);
}

:where(.home-template,.content-template,.search-template,.detail-template,.register-template,.login-template,.contact-template) {
  font-family: var(--font-body);
}

:where(.home-template,.content-template,.search-template,.detail-template,.register-template,.login-template,.contact-template) :where(button,input,select,textarea) {
  font-family: inherit;
}

:where(.home-template,.content-template,.search-template,.detail-template,.register-template,.login-template,.contact-template) :where(h1,h2,.home-section__title,.content-titleband h1,.content-body h2,.search-filter h3,.detail-title,.detail-section-title,.detail-related h2,.register-band h1,.register-section h2,.login-hero h1,.login-card h2,.contact-hero h1,.contact-card h2) {
  font-family: var(--font-heading);
}

.public-header {
  position: relative;
  z-index: 40;
  background: #fff;
  border-bottom: 1px solid #e7ebf1;
  color: #1a2433;
  font-family: var(--font-body);
}

.public-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 40px;
  padding-right: 40px;
}

.public-header__inner {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.public-header a,
.public-footer a {
  color: inherit;
  text-decoration: none;
}

.public-header nav {
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.public-header nav:after {
  content: none;
}

.public-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.public-brand img {
  width: auto;
  height: 44px;
  display: block;
}

.public-brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.public-brand__text span:first-child {
  color: #1d2b44;
  font-size: 14px;
  font-weight: 700;
}

.public-brand__text span:last-child {
  color: #8a96a8;
  font-size: 11.5px;
}

.public-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  color: #3b4860;
  font-size: 14.5px;
  font-weight: 500;
  white-space: nowrap;
}

.public-nav a {
  display: inline-flex;
  align-items: center;
  padding: 0;
  background: transparent;
  color: inherit;
  font-size: inherit;
  line-height: 1.35;
}

.public-nav a:hover,
.public-nav a.active {
  color: #4c57a9;
}

.public-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.public-header .public-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 9px 16px;
  border: 1px solid #cdd8e6;
  border-radius: 8px;
  background: #fff;
  color: #4c57a9;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
}

.public-header .public-btn--primary {
  border-color: #4c57a9;
  background: #4c57a9;
  color: #fff;
}

.public-footer {
  position: relative;
  overflow: hidden;
  background: linear-gradient(120deg, #3f4895, #333c7e);
  color: #9fb1c9;
  padding: 48px 40px 28px;
  font-family: var(--font-body);
}

.public-footer:before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 150% at 8% -40%, rgba(255,255,255,.14) 0%, rgba(255,255,255,0) 44%),
    radial-gradient(80% 120% at 104% 150%, rgba(170,186,255,.20) 0%, rgba(170,186,255,0) 54%);
  pointer-events: none;
}

.public-footer__inner {
  position: relative;
  max-width: 1120px;
  margin: 0 auto;
}

.public-footer__top {
  display: flex;
  justify-content: space-between;
  gap: 48px;
  flex-wrap: wrap;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}

.public-footer__brand {
  max-width: 440px;
}

.public-footer__logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.public-footer__mark {
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 10px;
  background: #fff;
}

.public-footer__mark img {
  max-width: 100%;
  max-height: 100%;
}

.public-footer__title,
.public-footer__heading {
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 700;
}

.public-footer__title {
  font-size: 15px;
}

.public-footer p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.7;
}

.public-footer__menus {
  display: flex;
  gap: 64px;
}

.public-footer__heading {
  margin-bottom: 14px;
  font-size: 13px;
  letter-spacing: .03em;
}

.public-footer__links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13.5px;
}

.public-footer__copy {
  padding-top: 22px;
  color: #6f83a0;
  font-size: 12.5px;
}

@media (max-width: 1024px) {
  .public-shell {
    padding-left: 24px;
    padding-right: 24px;
  }

  .public-header__inner {
    align-items: flex-start;
    flex-direction: column;
    padding-top: 16px;
    padding-bottom: 16px;
  }

  .public-nav {
    width: 100%;
    flex-wrap: wrap;
    gap: 14px 22px;
  }

  .public-actions {
    width: 100%;
  }
}

@media (max-width: 760px) {
  .public-header__inner,
  .public-nav,
  .public-actions,
  .public-footer__top,
  .public-footer__menus {
    flex-direction: column;
    align-items: stretch;
  }

  .public-nav {
    align-items: flex-start;
  }

  .public-brand__text {
    display: none;
  }

  .public-footer {
    padding-left: 24px;
    padding-right: 24px;
  }
}
