/* Header / nav - chrome partial */
.site-header {
  position: sticky;
  top: 0;
  z-index: 70;
  overflow: visible;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: var(--header-bg);
  border-bottom: 1px solid var(--line, var(--color-border));
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 4.25rem;
  justify-content: space-between;
  position: relative;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  margin-left: auto;
  flex-shrink: 0;
  min-width: 0;
}
.brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
.brand-logo {
  height: 40px;
  width: auto;
  display: block;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 0;
  min-width: 0;
}
.nav-list {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-list > li {
  position: relative;
}
.nav-list > li > a,
.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 0.35rem;
  border: 0;
  border-radius: 0;
  background: transparent !important;
  color: var(--ink, var(--color-text));
  font-family: inherit;
  font-weight: 600;
  font-size: 0.98rem;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: color 0.15s ease;
}
.nav-list > li > a::after,
.nav-link::after {
  content: "";
  position: absolute;
  left: 0.35rem;
  right: 0.35rem;
  bottom: 0.15rem;
  height: 2px;
  border-radius: 2px;
  background: var(--accent, var(--color-brand));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}
.nav-list > li > a:hover,
.nav-link:hover,
.nav-list > li > a.is-active,
.nav-link.is-active,
.has-sub.is-open > .nav-sub-toggle {
  color: var(--accent, var(--color-brand));
}
.nav-list > li > a:hover::after,
.nav-link:hover::after,
.nav-list > li > a.is-active::after,
.nav-link.is-active::after,
.has-sub.is-open > .nav-sub-toggle::after {
  transform: scaleX(1);
}
.nav-sub-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 0;
  background: transparent;
  color: var(--ink, var(--color-text));
  cursor: pointer;
  padding: 0.55rem 0.35rem;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.98rem;
  line-height: 1.2;
  white-space: nowrap;
  transition: color 0.15s ease;
}
.nav-sub-toggle .nav-sub-text {
  pointer-events: none;
}
.nav-caret {
  display: inline-block;
  width: 0.36rem;
  height: 0.36rem;
  margin-top: -1px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.18s ease;
  opacity: 0.55;
}
.has-sub.is-open > .nav-sub-toggle .nav-caret,
.has-sub:hover > .nav-sub-toggle .nav-caret {
  transform: rotate(225deg);
  opacity: 1;
}
.nav-sub {
  position: absolute;
  top: calc(100% + 0.4rem);
  left: 0;
  z-index: 80;
  display: none;
  width: min(32rem, calc(100vw - 1.5rem));
  padding: 0.9rem;
  border-radius: 12px;
  background: #fffaf3;
  border: 1px solid var(--line, var(--color-border));
  box-shadow: 0 12px 32px rgba(26, 23, 20, 0.12);
}
[data-theme="dark"] .nav-sub {
  background: #1f1a14;
  border-color: rgba(255, 247, 235, 0.14);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.5);
}
.has-sub.is-open > .nav-sub {
  display: block;
}
.nav-sub-inner {
  margin: 0;
  padding: 0;
  width: auto;
}
.nav-sub-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.25rem 0.75rem;
}
.nav-sub-label {
  margin: 0 0 0.3rem;
  padding: 0 0.35rem 0.3rem;
  border-bottom: 1px solid var(--line, var(--color-border));
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent, var(--color-brand));
  font-weight: 700;
}
.nav-sub-col {
  display: grid;
  gap: 0;
  align-content: start;
}
.nav-sub-col a {
  display: block;
  padding: 0.4rem 0.35rem;
  border-radius: 6px;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--ink, var(--color-text));
  line-height: 1.35;
  transition: color 0.12s ease, background 0.12s ease;
}
.nav-sub-col a:hover {
  color: var(--accent, var(--color-brand));
  background: rgba(232, 93, 4, 0.08);
}
.nav-sub-col a.is-active {
  color: var(--accent, var(--color-brand));
  font-weight: 600;
}
.nav-sub-all {
  display: flex;
  margin-top: 0.65rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--line, var(--color-border));
  font-weight: 700;
  font-size: 0.86rem;
  color: var(--accent, var(--color-brand));
}
.nav-sub-all:hover {
  text-decoration: underline;
}
.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.85rem;
  flex-shrink: 0;
  text-align: right;
}
.header-phone {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.1rem;
  color: var(--muted, var(--color-text-secondary));
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s ease;
}
.header-phone:hover {
  color: var(--accent, var(--color-brand));
}
.header-phone .ic-phone {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  color: var(--accent, var(--color-brand));
}
.site-header .theme-toggle {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  border: none;
  background: var(--color-bg-subtle, #f5f5f5);
  color: var(--color-text-secondary, #555);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.site-header .theme-toggle:hover {
  border-color: var(--accent, var(--color-brand));
  color: var(--accent, var(--color-brand));
  background: rgba(232, 93, 4, 0.06);
}
.site-header .theme-toggle .i-sun {
  display: none;
}
.site-header .theme-toggle .i-moon {
  display: block;
}
[data-theme="dark"] .site-header .theme-toggle .i-sun {
  display: block;
}
[data-theme="dark"] .site-header .theme-toggle .i-moon {
  display: none;
}
.nav-cta--mobile {
  display: none;
}
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.2rem;
  height: 2.2rem;
  border: 1px solid var(--line, var(--color-border));
  border-radius: 999px;
  background: transparent;
  padding: 0;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 14px;
  height: 1.5px;
  margin-inline: auto;
  background: var(--ink, var(--color-text));
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}
@media (min-width: 901px) {
  .has-sub:hover > .nav-sub,
  .has-sub:focus-within > .nav-sub,
  .has-sub.is-open > .nav-sub {
    display: block;
  }
  .header-inner {
    position: static;
  }
  .nav-list > li.has-sub {
    position: static;
  }
  .nav-sub {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: min(var(--layout-max, 1200px), calc(100vw - 2rem));
    margin-top: 0;
  }
  .nav-sub::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 100%;
    height: 0.5rem;
  }
}
@media (max-width: 1100px) and (min-width: 901px) {
  .header-phone span {
    display: none;
  }
  .nav-list > li > a,
  .nav-link {
    padding: 0.45rem 0.5rem;
    font-size: 0.88rem;
  }
}
@media (max-width: 900px) {
  .brand {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
  }
  .header-right {
    gap: 0.5rem;
  }
  .nav-toggle {
    display: flex;
  }
  .header-phone,
  .header-actions .btn-nav-zalo {
    display: none;
  }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    flex: none;
    margin: 0;
    padding: 0.75rem 1.1rem 1.1rem;
    gap: 0.65rem;
    background: var(--nav-bg, var(--header-bg));
    border-bottom: 0.5px solid var(--line, var(--color-border));
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.08);
    z-index: 55;
  }
  .site-nav.is-open {
    display: flex;
  }
  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0.05rem;
    width: 100%;
  }
  .nav-list > li > a,
  .nav-link {
    width: 100%;
    justify-content: space-between;
    padding: 0.75rem 0.15rem;
    font-size: 1rem;
    border-bottom: 1px solid var(--line, var(--color-border));
  }
  .nav-list > li > a::after,
  .nav-link::after {
    height: 1px;
  }
  .nav-list > li:last-child > a {
    border-bottom: 0;
  }
  .nav-list > li.has-sub {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    border-bottom: 1px solid var(--line, var(--color-border));
  }
  .nav-list > li.has-sub > .nav-sub-toggle {
    flex: 1;
    width: 100%;
    justify-content: space-between;
    padding: 0.75rem 0.15rem;
    font-size: 1rem;
    border-bottom: 0;
  }
  .nav-list > li.has-sub > .nav-sub {
    flex-basis: 100%;
  }
  .nav-sub {
    position: static;
    width: auto;
    margin: 0.15rem 0 0.35rem;
    padding: 0.7rem 0.55rem;
    box-shadow: none;
    border-radius: 10px;
  }
  [data-theme="dark"] .nav-sub {
    background: rgba(255, 247, 235, 0.04);
  }
  .nav-sub-grid {
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }
  .nav-cta--mobile {
    display: grid;
    gap: 0.5rem;
    width: 100%;
    padding-top: 0.35rem;
  }
  .nav-cta--mobile .btn {
    width: 100%;
    justify-content: center;
  }
}

/* Theme transition overlay */
.theme-transition-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}
.theme-transition-overlay.is-visible {
  opacity: 1;
  transition: opacity 0.22s ease-out;
}
.theme-transition-overlay .celestial-icon {
  position: absolute;
  top: 0;
  left: 0;
  width: 120px;
  height: 120px;
  margin: -60px 0 0 -60px;
  will-change: left, top;
}
.theme-transition-overlay .celestial-icon-inner {
  width: 100%;
  height: 100%;
  animation: celestial-scale 1.9s ease-in-out forwards;
}
.theme-transition-overlay .celestial-icon svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 20px rgba(255, 240, 200, 0.7));
  overflow: visible;
}
.theme-transition-overlay .sun-rays-svg {
  transform-box: fill-box;
  transform-origin: center;
  animation: sun-rays-spin 9s linear infinite;
}
.theme-transition-overlay .sky-layer {
  position: absolute;
  inset: 0;
  opacity: 1;
  animation: sky-fade 1.9s ease-in forwards;
}
.theme-transition-overlay .celestial-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
  animation: glow-altitude 1.9s ease-in-out forwards;
}
.theme-transition-overlay .celestial-rays {
  position: absolute;
  inset: 0;
  opacity: 0;
  animation: rays-fade 0.8s 0.3s ease-out forwards;
}
.theme-transition-overlay .celestial-ray {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2px;
  height: 0;
  transform-origin: bottom center;
  border-radius: 1px;
  animation: ray-shoot 0.6s 0.38s ease-out forwards;
}
.theme-transition-overlay .celestial-star {
  position: absolute;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 4px rgba(255, 255, 255, 0.8);
  opacity: 0;
  animation-name: star-twinkle;
  animation-iteration-count: infinite;
  animation-timing-function: ease-in-out;
}
.theme-transition-overlay .celestial-cloud {
  position: absolute;
  left: -30%;
  width: 240px;
  height: 70px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0.4) 45%, transparent 70%);
  filter: blur(8px);
  opacity: 0;
  animation-name: cloud-drift;
  animation-timing-function: ease-in-out;
  animation-fill-mode: forwards;
}
@keyframes celestial-scale {
  0% { transform: scale(0.75); }
  50% { transform: scale(1.15); }
  100% { transform: scale(0.75); }
}
@keyframes glow-altitude {
  0% { transform: translate(-50%, -50%) scale(0.3); opacity: 0; }
  15% { opacity: 0.35; }
  50% { transform: translate(-50%, -50%) scale(1.6); opacity: 0.6; }
  85% { opacity: 0.3; }
  100% { transform: translate(-50%, -50%) scale(0.5); opacity: 0; }
}
@keyframes sky-fade {
  0% { opacity: 1; }
  55% { opacity: 0.5; }
  100% { opacity: 0; }
}
@keyframes sun-rays-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
@keyframes star-twinkle {
  0% { opacity: 0; transform: scale(0.5); }
  50% { opacity: 1; transform: scale(1); }
  100% { opacity: 0.4; transform: scale(0.8); }
}
@keyframes cloud-drift {
  0% { transform: translateX(0); opacity: 0; }
  25% { opacity: 0.9; }
  75% { opacity: 0.9; }
  100% { transform: translateX(160%); opacity: 0; }
}
@keyframes rays-fade {
  0% { opacity: 0; }
  30% { opacity: 1; }
  100% { opacity: 0; }
}
@keyframes ray-shoot {
  0% { height: 0; opacity: 0.8; }
  60% { height: 60px; opacity: 0.6; }
  100% { height: 80px; opacity: 0; }
}
