﻿#seo-header.seo-header-shell {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 12px 0;
  background: rgba(241, 245, 249, 0.97);
  /* KhÃ´ng dÃ¹ng backdrop-filter á»Ÿ shell â€” sáº½ khiáº¿n drawer fixed bá»‹ gáº¯n vÃ o header (~72px) */
  transition: box-shadow 0.25s ease, background 0.25s ease;
}

#seo-header.seo-header-shell.is-drawer-open {
  z-index: 1000;
}

#seo-header.seo-header-shell.is-scrolled {
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.08);
}

.seo-header-spacer {
  height: 72px;
}

#seo-header .seo-pillnav {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  margin: 0;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.07);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  font-size: 0.88rem;
}

#seo-header .container {
  width: 100%;
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 16px;
  padding-right: 16px;
  box-sizing: border-box;
}

#seo-header .seo-pillnav-main {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 4px;
  min-width: 0;
  flex: 1 1 auto;
}

#seo-header .seo-pillnav-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

#seo-header .seo-pillnav-brand {
  display: inline-flex !important;
  align-items: center;
  gap: 0;
  padding: 4px !important;
  margin-right: 4px;
  border-radius: 999px !important;
  text-decoration: none !important;
  color: #0f172a !important;
  font-weight: 800;
  white-space: nowrap;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

#seo-header .seo-pillnav-brand-text {
  display: none !important;
}

#seo-header .seo-pillnav-brand img {
  border-radius: 10px;
  flex-shrink: 0;
}

#seo-header .seo-pillnav-brand:hover {
  background: #f8fafc !important;
  color: #0369a1 !important;
}

#seo-header .seo-pillnav-gap {
  flex: 1 1 12px;
  min-width: 8px;
}

#seo-header a.seo-pillnav-link {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  padding: 8px 14px !important;
  margin: 0 !important;
  border-radius: 999px !important;
  border: 1px solid #e2e8f0 !important;
  background: #f8fafc !important;
  color: #475569 !important;
  font-size: inherit !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  text-decoration: none !important;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

#seo-header a.seo-pillnav-link:hover,
#seo-header a.seo-pillnav-link:focus-visible {
  background: #e0f2fe !important;
  border-color: #7dd3fc !important;
  color: #0369a1 !important;
  transform: translateY(-1px);
}

#seo-header a.seo-pillnav-link.active {
  background: linear-gradient(135deg, #0369a1, #0284c7) !important;
  border-color: #0284c7 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(3, 105, 161, 0.28);
}

#seo-header button.seo-pillnav-link--listen {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  padding: 8px 12px !important;
  margin: 0 !important;
  border-radius: 999px !important;
  border: 1px solid #a7f3d0 !important;
  cursor: pointer;
  font: inherit;
  font-size: inherit !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  white-space: nowrap;
  flex-shrink: 0;
  gap: 5px;
  background: linear-gradient(180deg, #ecfdf5, #f0fdf4) !important;
  color: #047857 !important;
  box-shadow: 0 2px 10px rgba(5, 150, 105, 0.12);
}

#seo-header button.seo-pillnav-link--listen:hover,
#seo-header button.seo-pillnav-link--listen:focus-visible {
  border-color: #6ee7b7 !important;
  color: #065f46 !important;
  background: #d1fae5 !important;
}

#seo-header button.seo-pillnav-link--listen.is-playing {
  border-color: #34d399 !important;
  background: #a7f3d0 !important;
}

.seo-pillnav-drawer-listen {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 12px 14px 0;
  padding: 13px 18px;
  border-radius: 14px;
  border: 1px solid #a7f3d0;
  background: linear-gradient(180deg, #ecfdf5, #f0fdf4);
  color: #047857;
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
  font: inherit;
}

.seo-pillnav-drawer-listen.is-playing {
  background: #a7f3d0;
}

#seo-header a.seo-pillnav-link--cta {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  flex-shrink: 0;
  background: linear-gradient(120deg, #059669, #0284c7, #7c3aed, #059669) !important;
  background-size: 280% 280% !important;
  animation: seo-cta-gradient 4s ease infinite, seo-cta-glow 2.4s ease-in-out infinite;
  border-color: transparent !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 18px rgba(5, 150, 105, 0.35);
}

#seo-header a.seo-pillnav-link--cta:hover,
#seo-header a.seo-pillnav-link--cta:focus-visible {
  color: #ffffff !important;
  transform: translateY(-2px) scale(1.03);
  border-color: transparent !important;
  filter: brightness(1.06);
}

.seo-pillnav-cta-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 28%,
    rgba(255, 255, 255, 0.45) 46%,
    transparent 64%
  );
  transform: translateX(-130%);
  animation: seo-cta-shine 3.2s ease-in-out infinite;
  pointer-events: none;
}

.seo-pillnav-cta-label {
  position: relative;
  z-index: 1;
}

@keyframes seo-cta-gradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes seo-cta-glow {
  0%, 100% { box-shadow: 0 4px 18px rgba(5, 150, 105, 0.35); }
  50% { box-shadow: 0 6px 26px rgba(2, 132, 199, 0.48); }
}

@keyframes seo-cta-shine {
  0%, 55% { transform: translateX(-130%); }
  100% { transform: translateX(130%); }
}

@media (prefers-reduced-motion: reduce) {
  #seo-header a.seo-pillnav-link--cta,
  .seo-pillnav-drawer-cta,
  .seo-pillnav-cta-shine {
    animation: none !important;
  }
}

/* Mobile: sidebar drawer */
#seo-header .seo-pillnav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-left: 4px;
  padding: 0;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
  color: #0f172a;
  font-size: 1.25rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s ease, border-color 0.2s ease;
}

#seo-header .seo-pillnav-toggle:hover,
#seo-header .seo-pillnav-toggle:focus-visible {
  background: #e0f2fe;
  border-color: #7dd3fc;
  color: #0369a1;
}

.seo-pillnav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10040;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 0.28s ease;
  pointer-events: none;
}

.seo-pillnav-backdrop:not([hidden]) {
  pointer-events: auto;
}

.seo-pillnav-backdrop:not([hidden]) {
  opacity: 1;
}

.seo-pillnav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 10050;
  width: min(300px, 88vw);
  height: 100%;
  max-height: 100dvh;
  padding: 0 0 24px;
  background: #ffffff;
  box-shadow: -12px 0 40px rgba(15, 23, 42, 0.14);
  transform: translateX(105%);
  transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.seo-pillnav-drawer.is-open {
  transform: translateX(0);
}

.seo-pillnav-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 18px 14px;
  border-bottom: 1px solid #e2e8f0;
}

.seo-pillnav-drawer-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
}

.seo-pillnav-drawer-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: #f1f5f9;
  color: #475569;
  font-size: 1.1rem;
  cursor: pointer;
}

.seo-pillnav-drawer-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.seo-pillnav-drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  overflow-y: auto;
  flex: 1;
}

.seo-pillnav-drawer-link {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  color: #334155;
  transition: background 0.2s ease, color 0.2s ease;
}

.seo-pillnav-drawer-link:hover,
.seo-pillnav-drawer-link:focus-visible {
  background: #f1f5f9;
  color: #0369a1;
}

.seo-pillnav-drawer-link.active {
  background: linear-gradient(135deg, #e0f2fe, #dbeafe);
  color: #0369a1;
}

.seo-pillnav-drawer-cta {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 8px 14px 0;
  padding: 14px 18px;
  border-radius: 14px;
  text-decoration: none;
  font-weight: 800;
  font-size: 1rem;
  color: #fff !important;
  background: linear-gradient(120deg, #059669, #0284c7, #7c3aed, #059669);
  background-size: 280% 280%;
  animation: seo-cta-gradient 4s ease infinite, seo-cta-glow 2.4s ease-in-out infinite;
  box-shadow: 0 6px 20px rgba(5, 150, 105, 0.35);
}

body.seo-nav-open {
  overflow: hidden;
}

@media (max-width: 991px) {
  .seo-header-spacer {
    height: 64px;
  }

  #seo-header .seo-pillnav {
    border-radius: 20px;
    padding: 8px 10px 8px 12px;
    gap: 8px;
  }

  #seo-header .seo-pillnav-main {
    display: none;
  }

  #seo-header .seo-pillnav-gap {
    display: none;
  }

  #seo-header .seo-pillnav-brand {
    margin-right: auto;
    min-width: 0;
  }

  #seo-header .seo-pillnav-brand-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 42vw;
  }

  #seo-header a.seo-pillnav-link--cta {
    padding: 8px 12px !important;
    font-size: 0.82rem !important;
  }

  #seo-header .seo-pillnav-toggle {
    display: inline-flex;
  }
}

@media (min-width: 992px) and (max-width: 1366px) {
  #seo-header .seo-pillnav {
    gap: 4px;
    padding: 7px 10px;
    font-size: 0.82rem;
  }

  #seo-header a.seo-pillnav-link,
  #seo-header button.seo-pillnav-link--listen {
    padding: 7px 10px !important;
  }

  #seo-header .seo-pillnav-brand {
    padding: 4px 8px 4px 4px !important;
    margin-right: 0;
  }

  #seo-header .seo-pillnav-listen-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  #seo-header button.seo-pillnav-link--listen {
    padding: 7px 9px !important;
  }
}

@media (min-width: 992px) and (max-width: 1180px) {
  #seo-header .seo-pillnav-brand-text {
    max-width: 7.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

#seo-pillnav-drawer[aria-hidden="true"],
.seo-pillnav-backdrop[hidden] {
  pointer-events: none;
}

.seo-skip-link {
  position: absolute;
  top: -48px;
  left: 12px;
  z-index: 10001;
  padding: 10px 16px;
  border-radius: 8px;
  background: #0369a1;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.seo-skip-link:focus {
  top: 12px;
}

.seo-ui-icon {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}

/* Subpages: fixed nav + content below spacer */
body.has-seo-pillnav .wrap {
  padding-top: 8px;
}
