/* Header + Footer chrome (site-wide until Elementor Pro Theme Builder) */

:root {
  --nf-max: 1220px;
  /* Figma tokens — keep in sync with home.css */
  --nf-brand: #760f26;
  --nf-brand-bright: #f42f4c;
  --nf-brand-secondary: #eb3345;
  --nf-cream: #fffaf3;
  --nf-cream-deep: #fff5e4;
  --nf-gold: #f6c82f;
  --nf-ink: #2b1311;
  --nf-muted: #645048;
  /* Overridden by Website Settings → Fonts (@font-face inline) when files are set */
  --nf-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --nf-serif: "NAF Passion Sans", "Georgia", "Times New Roman", serif;
}

.nf-header,
.nf-site-footer,
.nf-mobile-menu {
  font-family: var(--nf-sans);
}

/* Figma text/md/NAF — standard Medium (not Wide*) / 16 / 24 */
.nf-header__menu a,
.nf-header__lang,
.nf-header__lang-label,
.nf-mobile-menu__list a {
  font-family: var(--nf-nav, var(--nf-serif));
  font-weight: 500;
  font-size: 16px;
  line-height: 24px;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

.nf-header .nf-serif,
.nf-site-footer .nf-serif {
  font-family: var(--nf-serif);
}

/* Lottie loading overlay (Website Settings — site or homepage) */
.nf-loading {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: var(--nf-brand);
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.nf-loading.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.nf-loading__inner {
  width: min(90vw, 600px);
}

.nf-loading__lottie {
  width: 100%;
  aspect-ratio: 600 / 200;
}

html.nf-loading-active,
html.nf-loading-active body {
  overflow: hidden;
}

.nf-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: transparent;
  transition: transform 0.3s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.nf-header.is-hidden {
  transform: translateY(-100%);
}

.nf-header.is-solid {
  background: var(--nf-cream);
  box-shadow: 0 1px 0 rgb(0 0 0 / 6%);
}

.nf-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(100% - 2.5rem, var(--nf-max));
  margin: 0 auto;
  padding: 1rem 0;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .nf-header__bar {
    padding: 1.25rem 0;
  }
}

@media (min-width: 1024px) {
  .nf-header__bar {
    width: min(100% - 5rem, var(--nf-max));
  }
}

.nf-header__logo {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.nf-header__logo-img {
  display: block;
  width: 171px;
  min-width: 171px;
  height: auto;
  max-height: 56px;
  object-fit: contain;
}

@media (max-width: 767px) {
  .nf-header__logo-img {
    width: 140px;
    min-width: 140px;
    max-height: 46px;
  }
}

.nf-header__logo-img--color {
  display: none;
}

.nf-header.is-solid .nf-header__logo-img--white {
  display: none;
}

.nf-header.is-solid .nf-header__logo-img--color,
.nf-header__logo-img--color.is-force {
  display: block;
}

.nf-header:not(.is-solid) .nf-header__logo-img--white {
  display: block;
}

.nf-header__logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
}

.nf-header.is-solid .nf-header__logo-text {
  color: var(--nf-brand);
}

.nf-header__nav {
  display: none;
}

@media (min-width: 1024px) {
  .nf-header__nav {
    display: block;
  }
}

.nf-header__menu {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nf-header__menu > li {
  position: relative;
}

.nf-header__menu a {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 0.5rem;
  border-radius: 999px;
  font-size: 16px;
  line-height: 24px;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  color: rgb(255 245 228 / 90%);
  transition: color 0.2s;
}

.nf-header.is-solid .nf-header__menu a {
  color: rgb(118 15 38 / 90%);
}

.nf-header__menu a:hover {
  color: #fff;
}

.nf-header.is-solid .nf-header__menu a:hover {
  color: var(--nf-brand);
}

.nf-header__menu-chevron,
.nf-header__chevron {
  width: 0.875rem;
  height: 0.875rem;
  flex-shrink: 0;
  opacity: 0.7;
  object-fit: contain;
  display: block;
}

svg.nf-header__menu-chevron,
svg.nf-header__chevron {
  object-fit: unset;
}

.nf-header__menu .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 14rem;
  margin: 0;
  padding: 0.5rem 0;
  list-style: none;
  background: var(--nf-cream);
  box-shadow: 0 8px 24px rgb(0 0 0 / 12%);
  border-radius: 0.75rem;
  z-index: 20;
}

.nf-header__menu > li:hover > .sub-menu,
.nf-header__menu > li:focus-within > .sub-menu {
  display: block;
}

.nf-header__menu .sub-menu a {
  display: block;
  padding: 0.6rem 1rem;
  border-radius: 0;
  color: var(--nf-brand);
  white-space: normal;
}

.nf-header__lang-icon {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 999px;
  object-fit: cover;
}

.nf-header__burger-icon {
  width: 1.25rem;
  height: 1.25rem;
  object-fit: contain;
  display: block;
}

.nf-header__burger:has(.nf-header__burger-icon) {
  display: grid;
  place-content: center;
}

.nf-header__lang {
  display: none;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.5rem;
  border: 0;
  background: transparent;
  color: rgb(255 245 228 / 90%);
  font-size: 0.95rem;
  cursor: pointer;
  user-select: none;
}

.nf-header.is-solid .nf-header__lang {
  color: rgb(118 15 38 / 90%);
}

@media (min-width: 1024px) {
  .nf-header__lang {
    display: inline-flex;
  }
}

.nf-header__burger {
  display: grid;
  gap: 5px;
  width: 2.5rem;
  height: 2.5rem;
  place-content: center;
  border: 0;
  border-radius: 999px;
  background: rgb(255 255 255 / 10%);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 20%);
  cursor: pointer;
}

.nf-header.is-solid .nf-header__burger {
  background: rgb(118 15 38 / 10%);
  box-shadow: inset 0 0 0 1px rgb(118 15 38 / 20%);
}

.nf-header__burger span {
  display: block;
  width: 1.1rem;
  height: 2px;
  background: #fff5e4;
}

.nf-header.is-solid .nf-header__burger span {
  background: var(--nf-brand);
}

@media (min-width: 1024px) {
  .nf-header__burger {
    display: none;
  }
}

/* Mobile / tablet overlay (≤1023px) — mở từ phải, đóng chạy ngược về phải */
.nf-mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: var(--nf-brand);
  color: #fff5e4;
  padding: 1rem 1.25rem;
  overflow: auto;
  transform: translateX(100%);
  visibility: hidden;
  pointer-events: none;
  /* Đóng: đợi transform xong mới ẩn visibility (tránh kiểu display:none) */
  transition:
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 0.35s;
}

.nf-mobile-menu.is-open {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
  /* Mở: hiện ngay rồi slide vào */
  transition:
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 0s;
}

/* Giữ display để animate được khi đóng (UA [hidden] = display:none) */
.nf-mobile-menu[hidden] {
  display: block !important;
}

.nf-mobile-menu.is-closing {
  pointer-events: none;
}

/* Logo trắng trong menu */
.nf-mobile-menu .nf-header__logo-img--white.is-force {
  display: block;
}

.nf-mobile-menu .nf-header__logo-img--color {
  display: none !important;
}

.nf-mobile-menu .nf-header__logo-text {
  color: #fff5e4;
}

.nf-mobile-menu__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nf-mobile-menu__close {
  display: grid;
  place-content: center;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgb(255 255 255 / 10%);
  color: #fff;
  font-size: 1.5rem;
  line-height: 0;
  cursor: pointer;
}

.nf-mobile-menu__close-icon,
.nf-mobile-menu__close-x {
  display: block;
  margin: 0;
  padding: 0;
  line-height: 1;
}

.nf-mobile-menu__close-icon {
  width: 1.25rem;
  height: 1.25rem;
  object-fit: contain;
}

.nf-mobile-menu__list {
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.nf-mobile-menu__list a {
  display: block;
  padding: 1rem 0;
  border-bottom: 1px solid rgb(255 255 255 / 10%);
  font-size: 1.75rem;
  text-decoration: none;
  color: inherit;
}

/* Footer */
.nf-site-footer {
  background: var(--nf-brand);
  color: #fff5e4;
  padding: 2rem 0 1.5rem;
}

@media (min-width: 768px) {
  .nf-site-footer {
    padding: 2.5rem 0 1.5rem;
  }
}

.nf-site-footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  width: min(100% - 2.5rem, var(--nf-max));
  margin: 0 auto;
  box-sizing: border-box;
}

@media (min-width: 1024px) {
  .nf-site-footer__grid {
    grid-template-columns: auto 1fr;
    gap: 5rem;
    width: min(100% - 5rem, var(--nf-max));
  }
}

.nf-site-footer__logo {
  display: block;
  height: 3.5rem;
  width: auto;
}

@media (min-width: 768px) {
  .nf-site-footer__logo {
    height: 4rem;
  }
}

.nf-site-footer__logo-text {
  margin: 0;
  font-family: var(--nf-display);
  font-weight: 500;
  font-size: 1.5rem;
  color: #fff5e4;
}

/* Lovable footer company = font-serif Regular (400), không dùng Medium/nav */
.nf-site-footer__company {
  margin: 1.5rem 0 0;
  font-family: var(--nf-serif);
  font-weight: 400;
  font-size: 1.125rem;
  line-height: 1.3;
  color: #fff5e4;
  -webkit-font-smoothing: antialiased;
}

@media (min-width: 1024px) {
  .nf-site-footer__company {
    white-space: nowrap;
  }
}

.nf-site-footer__contact {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  font-family: var(--nf-sans);
  font-size: 0.875rem;
  line-height: 1.45;
  color: rgb(255 245 228 / 85%);
}

.nf-site-footer__contact-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.nf-site-footer__contact-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  margin-top: 0.15rem;
  color: #fff5e4;
}

.nf-site-footer__contact a {
  color: inherit;
  text-decoration: none;
}

.nf-site-footer__contact a:hover {
  color: #fff;
}

.nf-site-footer__cols {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

/* Desktop only — tablet/mobile: 1 cột */
@media (min-width: 1024px) {
  .nf-site-footer__cols {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }
}

.nf-site-footer__label {
  margin: 0;
  font-family: var(--nf-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  white-space: nowrap;
  color: rgb(255 245 228 / 60%);
}

.nf-site-footer__label--social {
  margin-top: 2.5rem;
}

.nf-site-footer__links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}

.nf-site-footer__links a {
  display: block;
  margin: 0;
  font-family: var(--nf-sans);
  font-size: 0.875rem;
  color: rgb(255 245 228 / 85%);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.nf-site-footer__links a:hover {
  color: #fff;
}

.nf-site-footer__pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
  padding: 0.625rem 1rem;
  border: 1px solid rgb(255 255 255 / 20%);
  border-radius: 999px;
  background: rgb(255 255 255 / 5%);
  color: #fff5e4;
  font-family: var(--nf-sans);
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  transition: background 0.2s ease;
}

.nf-site-footer__pill:hover,
.nf-site-footer__icon:hover,
.nf-site-footer__social a:hover {
  background: rgb(255 255 255 / 10%);
  color: #fff;
}

.nf-site-footer__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-top: 1.25rem;
}

.nf-site-footer__actions .nf-site-footer__pill {
  margin-top: 0;
}

.nf-site-footer__icon,
.nf-site-footer__social a {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid rgb(255 255 255 / 20%);
  border-radius: 999px;
  background: rgb(255 255 255 / 5%);
  color: #fff5e4;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.nf-site-footer__action-img {
  width: 1.125rem;
  height: 1.125rem;
  object-fit: contain;
  display: block;
}

.nf-site-footer__social {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.25rem;
}

.nf-site-footer__social a {
  border: 0;
  background: rgb(255 255 255 / 10%);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 15%);
}

.nf-site-footer__social a:hover {
  background: rgb(255 255 255 / 18%);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 25%);
}

.nf-site-footer__social-img {
  width: 1rem;
  height: 1rem;
  object-fit: contain;
}

/* Footer CF7 / contact modal */
.nf-footer-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  box-sizing: border-box;
}

.nf-footer-modal[hidden] {
  display: none;
}

.nf-footer-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgb(40 8 16 / 72%);
  backdrop-filter: blur(2px);
}

.nf-footer-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 28rem);
  max-height: min(88vh, 40rem);
  overflow: auto;
  padding: 1.25rem 1.35rem 1.5rem;
  border-radius: 1rem;
  background: #fffaf3;
  color: #3a121c;
  box-shadow: 0 24px 64px rgb(0 0 0 / 35%);
}

.nf-footer-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.nf-footer-modal__title {
  margin: 0;
  font-family: var(--nf-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgb(118 15 38 / 75%);
}

.nf-footer-modal__close {
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgb(118 15 38 / 8%);
  color: #760f26;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.nf-footer-modal__close:hover {
  background: rgb(118 15 38 / 16%);
}

.nf-footer-modal__body {
  font-family: var(--nf-sans);
  font-size: 0.9375rem;
}

html.nf-footer-modal-open {
  overflow: hidden;
}

.nf-site-footer__bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  width: min(100% - 2.5rem, var(--nf-max));
  margin: 3.5rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgb(255 255 255 / 10%);
  font-family: var(--nf-sans);
  font-size: 0.75rem;
  color: rgb(255 245 228 / 60%);
  text-align: center;
  box-sizing: border-box;
}

@media (min-width: 1024px) {
  .nf-site-footer__bottom {
    flex-direction: row;
    justify-content: space-between;
    width: min(100% - 5rem, var(--nf-max));
    text-align: left;
  }
}

.nf-site-footer__bottom p {
  margin: 0;
}

.nf-site-footer__bottom a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.nf-site-footer__bottom a:hover {
  color: #fff5e4;
}

.nf-site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: center;
}

.nf-backtop {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 40;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--nf-brand);
  color: #fff5e4;
  box-shadow: 0 8px 24px rgb(0 0 0 / 20%);
  cursor: pointer;
  line-height: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(0.5rem);
  transition: opacity 0.25s, transform 0.25s;
}

.nf-backtop svg {
  display: block;
}

.nf-backtop.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

body.admin-bar .nf-header {
  top: 32px;
}

@media screen and (max-width: 782px) {
  body.admin-bar .nf-header {
    top: 46px;
  }
}
