/* Public website chrome: header, navigation, page hero, CTA band, footer, toast. */

/* Header */
.pub-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: var(--pub-z-header);
  transition: box-shadow var(--pub-transition);
}

/* Blur lives on a pseudo-element: backdrop-filter on the header itself would become the
   containing block of the fixed mobile menu and collapse it to the header height. */
.pub-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(10, 22, 40, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background-color var(--pub-transition);
}

.pub-header.is-scrolled {
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.pub-header.is-scrolled::before,
body.pub-nav-open .pub-header::before {
  background: rgba(10, 22, 40, 0.97);
}

.pub-header__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: var(--pub-header-height);
}

.pub-brand {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
}

.pub-brand img {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
}

.pub-nav {
  flex: 1 1 auto;
  min-width: 0;
}

.pub-nav__list {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pub-nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border: 0;
  background: none;
  color: var(--pub-text-soft);
  font-size: 0.875rem;
  font-weight: 400;
  white-space: nowrap;
  cursor: pointer;
  transition: color var(--pub-transition);
}

.pub-nav__link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--pub-blue), var(--pub-cyan));
  transform: translateX(-50%);
  transition: width var(--pub-transition);
}

.pub-nav__link:hover,
.pub-nav__link[aria-current="page"],
.pub-nav__link.is-current {
  color: var(--pub-white);
}

.pub-nav__link:hover::after,
.pub-nav__link[aria-current="page"]::after,
.pub-nav__link.is-current::after {
  width: 60%;
}

.pub-nav__mobile-only {
  display: none;
}

/* "Giải pháp" dropdown */
.pub-nav__dropdown {
  position: relative;
}

.pub-nav__chevron {
  width: 16px;
  height: 16px;
  transition: transform var(--pub-transition);
}

.pub-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: var(--pub-z-nav);
  padding-top: 8px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.pub-nav__dropdown.is-open .pub-dropdown {
  opacity: 1;
  visibility: visible;
}

.pub-nav__dropdown.is-open .pub-nav__chevron {
  transform: rotate(180deg);
}

@media (min-width: 1024px) {
  .pub-nav__dropdown:hover .pub-dropdown,
  .pub-nav__dropdown:focus-within .pub-dropdown {
    opacity: 1;
    visibility: visible;
  }

  .pub-nav__dropdown:hover .pub-nav__chevron {
    transform: rotate(180deg);
  }
}

.pub-dropdown__panel {
  width: 320px;
  padding: 16px;
  border: 1px solid var(--pub-navy-600);
  border-radius: 12px;
  background: var(--pub-navy-800);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
}

.pub-dropdown__item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
  transition: background-color var(--pub-transition);
}

.pub-dropdown__item + .pub-dropdown__item {
  margin-top: 4px;
}

.pub-dropdown__item:hover,
.pub-dropdown__item:focus-visible,
.pub-dropdown__item[aria-current="page"] {
  background: var(--pub-navy-700);
}

.pub-dropdown__icon {
  --icon-color: var(--pub-blue);
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--icon-color) 20%, transparent);
  color: var(--icon-color);
}

.pub-dropdown__icon svg {
  width: 20px;
  height: 20px;
}

.pub-dropdown__icon--cyan {
  --icon-color: var(--pub-cyan);
}

.pub-dropdown__icon--purple {
  --icon-color: var(--pub-purple);
}

.pub-dropdown__title {
  display: block;
  color: var(--pub-white);
  font-weight: 500;
}

.pub-dropdown__desc {
  display: block;
  color: var(--pub-text-muted);
  font-size: 0.875rem;
}

.pub-header__login {
  padding: 6px 12px;
  color: var(--pub-text-soft);
  font-size: 0.875rem;
  white-space: nowrap;
  transition: color var(--pub-transition);
}

.pub-header__login:hover {
  color: var(--pub-white);
}

.pub-header__actions {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.pub-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--pub-border-strong);
  border-radius: 12px;
  background: transparent;
  color: var(--pub-text-soft);
  font-size: 1.15rem;
  cursor: pointer;
  transition: border-color var(--pub-transition), color var(--pub-transition);
}

.pub-icon-btn:hover {
  border-color: var(--pub-cyan);
  color: var(--pub-cyan);
}

.pub-nav-toggle {
  display: none;
}

.pub-main {
  min-height: 60vh;
  overflow-x: clip;
}

/* Page hero (inner pages) */
.pub-page-hero {
  position: relative;
  overflow: hidden;
  padding: calc(var(--pub-header-height) + clamp(56px, 8vw, 96px)) 0 clamp(48px, 7vw, 80px);
  background: var(--pub-gradient-section);
  text-align: center;
  isolation: isolate;
}

.pub-page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: var(--page-hero-photo, none);
  background-position: center;
  background-size: cover;
  opacity: 0.12;
}

.pub-page-hero::after {
  content: "";
  position: absolute;
  inset: auto -20% -60% -20%;
  z-index: -1;
  height: 120%;
  background:
    radial-gradient(closest-side, rgba(59, 130, 246, 0.22), transparent 70%) 20% 30% / 60% 60% no-repeat,
    radial-gradient(closest-side, rgba(139, 92, 246, 0.18), transparent 70%) 80% 20% / 50% 50% no-repeat;
  pointer-events: none;
}

.pub-page-hero__title {
  max-width: 900px;
  margin: 0 auto;
  font-size: clamp(2rem, 4.6vw, 3.5rem);
  font-weight: 800;
  text-shadow: 0 0 80px rgba(59, 130, 246, 0.3);
}

.pub-page-hero__subtitle {
  max-width: 720px;
  margin: 18px auto 0;
  color: var(--pub-text-soft);
  font-size: clamp(1rem, 1.6vw, 1.2rem);
}

.pub-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0 0 20px;
  padding: 0;
  color: var(--pub-text-muted);
  font-size: 0.875rem;
  list-style: none;
}

.pub-breadcrumb li + li::before {
  content: "/";
  margin-right: 8px;
  color: var(--pub-text-faint);
}

.pub-breadcrumb a:hover {
  color: var(--pub-cyan);
}

.pub-breadcrumb [aria-current="page"] {
  color: var(--pub-text-soft);
}

/* Footer (original: border-t navy-700, py-12, 4-column grid with a two-column brand) */
.pub-footer {
  padding: 48px 0;
  border-top: 1px solid var(--pub-navy-700);
  background: var(--pub-navy-900);
}

.pub-footer__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
  margin-bottom: 32px;
}

.pub-footer__brand-col {
  grid-column: span 2;
}

.pub-footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.pub-footer__brand img {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
}

.pub-footer__brand span {
  color: var(--pub-white);
  font-family: var(--pub-font-heading);
  font-size: 1.25rem;
  font-weight: 700;
}

.pub-footer__intro {
  color: var(--pub-text-muted);
}

.pub-footer__company {
  max-width: 384px;
  margin-top: 16px;
  color: var(--pub-white);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.pub-footer__company-meta {
  margin-top: 4px;
  color: var(--pub-text-faint);
  font-size: 0.875rem;
  font-style: normal;
}

.pub-footer__title {
  margin-bottom: 16px;
  color: var(--pub-white);
  font-size: 1rem;
  font-weight: 600;
}

.pub-footer__list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pub-footer__list a {
  color: var(--pub-text-muted);
  transition: color 0.15s ease;
}

.pub-footer__list a:hover {
  color: var(--pub-cyan);
}

.pub-footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 32px;
  border-top: 1px solid var(--pub-navy-700);
}

.pub-footer__copyright {
  color: var(--pub-text-faint);
  font-size: 0.875rem;
}

.pub-footer__legal {
  display: flex;
  gap: 24px;
}

.pub-footer__legal a {
  color: var(--pub-text-faint);
  font-size: 0.875rem;
  transition: color 0.15s ease;
}

.pub-footer__legal a:hover {
  color: var(--pub-text-soft);
}
.footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.footer-social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--pub-border-strong);
  border-radius: 12px;
  background: var(--pub-navy-800);
  color: var(--pub-text-soft);
  transition: border-color var(--pub-transition), color var(--pub-transition), transform var(--pub-transition);
}

.footer-social-btn svg {
  width: 20px;
  height: 20px;
}

a.footer-social-btn:hover {
  border-color: var(--pub-cyan);
  color: var(--pub-cyan);
  transform: translateY(-2px);
}

.footer-social-btn.is-pending {
  opacity: 0.4;
}

/* Toast (shared Itv.toast) on the dark theme */
.itv-toast-host {
  position: fixed;
  top: calc(var(--pub-header-height) + 12px);
  right: 16px;
  z-index: var(--pub-z-toast);
}

.itv-toast-host .itv-toast {
  border-color: var(--pub-navy-600);
  background: var(--pub-navy-800);
  color: var(--pub-text);
  box-shadow: var(--pub-shadow-card);
}

.itv-toast-host .itv-toast__body {
  color: var(--pub-text);
}

.itv-toast-host .itv-toast__close {
  color: var(--pub-text-muted);
}

.itv-toast-host .itv-toast__close:hover,
.itv-toast-host .itv-toast__close:focus-visible {
  background: var(--pub-navy-700);
  color: var(--pub-white);
}

/* Responsive */
@media (max-width: 1180px) {
  .pub-nav__link {
    padding: 6px 9px;
  }

  .pub-header__inner {
    gap: 12px;
  }
}

@media (max-width: 1023px) {
  .pub-nav-toggle {
    display: inline-flex;
  }

  .pub-header__cta,
  .pub-header__login {
    display: none;
  }

  .pub-nav__mobile-only {
    display: block;
  }

  .pub-nav {
    position: fixed;
    inset: var(--pub-header-height) 0 0;
    z-index: var(--pub-z-nav);
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 24px var(--pub-gutter) 40px;
    overflow-y: auto;
    background: var(--pub-navy-900);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity var(--pub-transition), transform var(--pub-transition), visibility 0s linear 0.3s;
  }

  .pub-nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity var(--pub-transition), transform var(--pub-transition);
  }

  .pub-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }

  .pub-nav__link {
    display: flex;
    justify-content: space-between;
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 1rem;
    text-align: left;
  }

  .pub-nav__link::after {
    display: none;
  }

  .pub-nav__link[aria-current="page"],
  .pub-nav__link.is-current,
  .pub-nav__link:hover {
    background: var(--pub-navy-800);
    color: var(--pub-white);
  }

  .pub-dropdown {
    position: static;
    display: none;
    padding: 0 0 0 16px;
    opacity: 1;
    visibility: visible;
  }

  .pub-nav__dropdown.is-open .pub-dropdown {
    display: block;
  }

  .pub-dropdown__panel {
    width: auto;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
  }

  .pub-dropdown__item {
    padding: 8px 16px;
  }

  .pub-dropdown__item + .pub-dropdown__item {
    margin-top: 0;
  }

  .pub-dropdown__icon,
  .pub-dropdown__desc {
    display: none;
  }

  .pub-dropdown__title {
    color: var(--pub-text-muted);
    font-weight: 400;
  }

  .pub-dropdown__item:hover .pub-dropdown__title {
    color: var(--pub-white);
  }

  body.pub-nav-open {
    overflow: hidden;
  }
}

@media (max-width: 767px) {
  .pub-footer__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .pub-footer__brand-col {
    grid-column: auto;
  }
}

@media (max-width: 639px) {
  .pub-footer__bottom {
    flex-direction: column;
  }
}