:root {
  --bg: #f3f6f8;
  --surface: #ffffff;
  --surface-soft: #f8fafb;
  --text: #17212b;
  --muted: #667483;
  --line: #dfe7eb;
  --primary: #0d766e;
  --primary-dark: #075e58;
  --primary-soft: #e8f7f5;
  --success: #198754;
  --success-soft: #eaf8f0;
  --warning: #b36a00;
  --warning-soft: #fff5e5;
  --shadow: 0 12px 32px rgba(31, 49, 57, .07);
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 11px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(
      circle at 90% 0,
      rgba(13, 118, 110, .08),
      transparent 22rem
    ),
    var(--bg);
  color: var(--text);
  font-family:
    Inter,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 15px;
  line-height: 1.65;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.container {
  width: min(calc(100% - 32px), var(--container));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: relative;
  z-index: 20;
  border-bottom: 1px solid rgba(223, 231, 235, .9);
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(14px);
}

.header-inner {
  display: flex;
  min-height: 72px;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 11px;
}

.brand-logo {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
}

.logo-img {
  display: block;
  width: 40px;
  height: 40px;
}

.brand-name {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.04em;
  white-space: nowrap;
}

.brand-name span {
  color: var(--primary);
}

/* Header navigation */
.header-nav {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
}

.header-nav-link {
  position: relative;
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  padding: 0 2px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
  transition:
    color .18s ease,
    background-color .18s ease;
}

.header-nav-link::after {
  position: absolute;
  right: 2px;
  bottom: 4px;
  left: 2px;
  height: 2px;
  border-radius: 999px;
  background: var(--primary);
  content: "";
  opacity: 0;
  transform: scaleX(.45);
  transform-origin: center;
  transition:
    opacity .18s ease,
    transform .18s ease;
}

.header-nav-link:hover,
.header-nav-link:focus-visible,
.header-nav-link.is-active {
  color: var(--primary-dark);
}

.header-nav-link:hover::after,
.header-nav-link:focus-visible::after,
.header-nav-link.is-active::after {
  opacity: 1;
  transform: scaleX(1);
}

.header-nav-link:focus-visible {
  border-radius: 5px;
  outline: 3px solid rgba(13, 118, 110, .14);
  outline-offset: 3px;
}

/* Header search */
.search-bar {
  position: relative;
  width: min(100%, 650px);
  margin-left: auto;
}

.search-bar svg {
  position: absolute;
  top: 50%;
  left: 17px;
  width: 19px;
  height: 19px;
  transform: translateY(-50%);
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.8;
  stroke-linecap: round;
  pointer-events: none;
}

.search-bar input {
  width: 100%;
  height: 46px;
  padding: 0 110px 0 48px;
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: none;
  background: var(--surface-soft);
  color: var(--text);
  transition:
    border-color .2s ease,
    box-shadow .2s ease,
    background .2s ease;
}

.search-bar input:focus {
  border-color: #6dc8c0;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(13, 118, 110, .1);
}

.search-bar button {
  position: absolute;
  top: 5px;
  right: 5px;
  height: 36px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  transition:
    background-color .18s ease,
    transform .18s ease;
}

.search-bar button:hover {
  background: var(--primary-dark);
}

.search-bar button:active {
  transform: translateY(1px);
}

.search-bar button:focus-visible {
  outline: 3px solid rgba(13, 118, 110, .18);
  outline-offset: 2px;
}

/* Khi trang chủ không hiển thị form tìm kiếm trên header */
.header-inner > .header-nav:last-child {
  margin-left: auto;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 22px 0 14px;
  color: var(--muted);
  font-size: 13px;
}

.breadcrumb a:hover {
  color: var(--primary);
}

.breadcrumb strong {
  color: #3c4c57;
  font-weight: 600;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  background: #fff;
}

.footer-inner {
  display: flex;
  min-height: 120px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-inner strong {
  font-size: 18px;
}

.footer-inner p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  color: var(--muted);
  font-size: 13px;
}

/* Toast */
.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 60;
  padding: 11px 15px;
  border-radius: 10px;
  background: #17212b;
  color: #fff;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: .2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Tablet */
@media (max-width: 960px) {
  .header-inner {
    gap: 17px;
  }

  .brand-name {
    font-size: 18px;
  }

  .header-nav-link {
    font-size: 12px;
  }

  .search-bar input {
    padding-right: 98px;
    font-size: 13px;
  }

  .search-bar button {
    padding: 0 14px;
  }
}

/* Mobile */
@media (max-width: 720px) {
  .header-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px 14px;
    min-height: auto;
    padding: 11px 0 13px;
  }

  .brand {
    min-width: 0;
  }

  .brand-name {
    overflow: hidden;
    font-size: 18px;
    text-overflow: ellipsis;
  }

  .header-nav {
    justify-self: end;
  }

  .header-nav-link {
    min-height: 36px;
    padding: 0;
    font-size: 12px;
  }

  .header-nav-link::after {
    bottom: 1px;
  }

  .search-bar {
    grid-column: 1 / -1;
    width: 100%;
    margin-left: 0;
  }

  .footer-inner {
    display: block;
    padding: 28px 0;
  }

  .footer-links {
    margin-top: 15px;
  }
}

/* Small mobile */
@media (max-width: 480px) {
  .container {
    width: min(calc(100% - 22px), var(--container));
  }

  .header-inner {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .header-nav {
    justify-self: center;
  }

  .brand-name {
    font-size: 18px;
  }

  .search-bar {
    width: 100%;
  }

  .search-bar input {
    padding-right: 92px;
    font-size: 13px;
  }

  .search-bar button {
    padding: 0 14px;
  }
}