/* ==========================================================================
   Nano Generators public site — header, contact panel, footer
   Shared by every public page (including older Tailwind pages), so every
   selector is namespaced under #public-site-header / .ng-*.
   ========================================================================== */

:root {
  --ng-green: #009847;
  --ng-green-dark: #007a39;
  --ng-navy: #2b4266;
  --ng-navy-deep: #152a40;
  --ng-ink: #1f1f1f;
  --ng-text: #616161;
  --ng-surface: #f7f7f7;
  --ng-surface-2: #eeeeee;
  --ng-line: rgb(0 0 0 / 8%);
  --ng-font: "Space Grotesk", "Segoe UI", Arial, sans-serif;
  --ng-header-h: 86px;
}

#public-site-header,
#public-site-header *,
.ng-offcanvas,
.ng-offcanvas *,
.ng-footer,
.ng-footer * { box-sizing: border-box; }

/* ---------- Header ---------- */

#public-site-header {
  position: relative;
  z-index: 50;
  font-family: var(--ng-font);
}

.ng-header {
  position: relative;
  z-index: 50;
  border-bottom: 1px solid rgb(255 255 255 / 14%);
  background: var(--ng-navy-deep);
  color: #fff;
  transition: background .3s ease, box-shadow .3s ease, transform .3s ease;
}

#public-site-header.is-overlay .ng-header {
  position: absolute;
  inset: 0 0 auto;
  background: linear-gradient(180deg, rgb(0 0 0 / 55%), rgb(0 0 0 / 0%));
}

#public-site-header .ng-header.is-stuck {
  position: fixed;
  inset: 0 0 auto;
  background: rgb(31 31 31 / 92%);
  box-shadow: 0 10px 30px rgb(0 0 0 / 18%);
  animation: ng-header-drop .35s ease;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

@keyframes ng-header-drop {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}

.ng-header-inner {
  display: flex;
  width: 100%;
  min-height: var(--ng-header-h);
  align-items: center;
  gap: 28px;
  padding: 0 48px;
}

.ng-brand {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 12px;
  padding-right: 28px;
  border-right: 1px solid rgb(255 255 255 / 18%);
  color: #fff;
  text-decoration: none;
  align-self: stretch;
}

.ng-brand img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
  padding: 4px;
}

.ng-brand-text strong {
  display: block;
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: .01em;
  line-height: 1.1;
}

.ng-brand-text small {
  display: block;
  margin-top: 3px;
  color: rgb(255 255 255 / 72%);
  font-size: .62rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.ng-nav {
  display: flex;
  flex: 1 1 auto;
  justify-content: center;
}

.ng-menu {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ng-menu > li { position: relative; }

.ng-menu > li > a,
.ng-menu > li > button {
  display: inline-flex;
  min-height: var(--ng-header-h);
  align-items: center;
  gap: 6px;
  border: 0;
  padding: 0 14px;
  background: none;
  color: #fff;
  cursor: pointer;
  font: 500 1rem/1 var(--ng-font);
  text-decoration: none;
  white-space: nowrap;
  transition: color .2s ease;
}

.ng-menu > li > a:hover,
.ng-menu > li > button:hover,
.ng-menu > li:focus-within > button,
.ng-menu > li > a.is-active,
.ng-menu > li > button.is-active { color: #fff; font-weight: 700; }

.ng-menu > li > a.is-active::after,
.ng-menu > li > button.is-active::after {
  position: absolute;
  right: 14px;
  bottom: 22px;
  left: 14px;
  height: 2px;
  background: var(--ng-green);
  content: "";
}

.ng-caret {
  width: 10px;
  height: 10px;
  transition: transform .2s ease;
}

.ng-menu > .ng-has-sub:hover > a .ng-caret,
.ng-menu > .ng-has-sub:focus-within > a .ng-caret,
.ng-has-sub:hover > button .ng-caret,
.ng-has-sub:focus-within > button .ng-caret { transform: rotate(180deg); }

.ng-submenu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 260px;
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--ng-navy);
  box-shadow: 0 18px 40px rgb(0 0 0 / 25%);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
}

.ng-has-sub:hover > .ng-submenu,
.ng-has-sub:focus-within > .ng-submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.ng-submenu li { position: relative; border-bottom: 1px solid rgb(255 255 255 / 10%); }
.ng-submenu li:last-child { border-bottom: 0; }

.ng-submenu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 20px;
  color: #fff;
  font-size: .95rem;
  font-weight: 500;
  text-decoration: none;
  transition: background .2s ease, padding .2s ease;
}

.ng-submenu a:hover,
.ng-submenu a:focus-visible { background: rgb(255 255 255 / 8%); padding-left: 24px; }

.ng-submenu .ng-submenu {
  top: 0;
  left: 100%;
}

.ng-submenu .ng-caret { transform: rotate(-90deg); }
.ng-submenu .ng-has-sub:hover > a .ng-caret { transform: rotate(-90deg); }

.ng-header-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
}

.ng-icon-btn {
  display: inline-grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  transition: background .2s ease;
}

.ng-icon-btn:hover,
.ng-icon-btn:focus-visible { background: rgb(255 255 255 / 12%); }

.ng-icon-btn svg { width: 26px; height: 26px; }

.ng-hamburger { display: none; }

/* ---------- Mobile menu ---------- */

.ng-mobile-menu {
  display: none;
  max-height: calc(100vh - var(--ng-header-h));
  overflow-y: auto;
  border-top: 1px solid rgb(255 255 255 / 12%);
  background: var(--ng-navy-deep);
}

.ng-mobile-menu.is-open { display: block; }

.ng-mobile-menu a,
.ng-mobile-menu summary {
  display: block;
  padding: 14px 24px;
  border-bottom: 1px solid rgb(255 255 255 / 8%);
  color: #fff;
  cursor: pointer;
  font: 500 1rem/1.3 var(--ng-font);
  list-style: none;
  text-decoration: none;
}

.ng-mobile-menu summary::-webkit-details-marker { display: none; }
.ng-mobile-menu summary::after { float: right; content: "+"; }
.ng-mobile-menu details[open] > summary::after { content: "−"; }
.ng-mobile-menu details a,
.ng-mobile-menu details summary { padding-left: 40px; background: rgb(255 255 255 / 3%); }
.ng-mobile-menu details details a { padding-left: 56px; color: rgb(255 255 255 / 82%); }
.ng-mobile-menu > details > summary { padding-left: 24px; background: none; }

/* ---------- Off-canvas contact panel ---------- */

.ng-offcanvas-backdrop {
  position: fixed;
  z-index: 90;
  inset: 0;
  background: rgb(0 0 0 / 55%);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility .3s;
}

.ng-offcanvas {
  position: fixed;
  z-index: 100;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  width: min(420px, 100%);
  flex-direction: column;
  gap: 26px;
  overflow-y: auto;
  padding: 40px;
  background: #fff;
  color: var(--ng-ink);
  font-family: var(--ng-font);
  transform: translateX(100%);
  transition: transform .35s ease;
}

body.ng-offcanvas-open .ng-offcanvas { transform: translateX(0); }
body.ng-offcanvas-open .ng-offcanvas-backdrop { opacity: 1; visibility: visible; }
body.ng-offcanvas-open { overflow: hidden; }

.ng-offcanvas-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ng-offcanvas-top img { width: 64px; height: 64px; object-fit: contain; }

.ng-offcanvas-close {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 0;
  background: var(--ng-green);
  color: #fff;
  cursor: pointer;
}

.ng-offcanvas-close svg { width: 20px; height: 20px; }

.ng-offcanvas p { margin: 0; color: var(--ng-text); line-height: 1.6; }

.ng-offcanvas h4 {
  margin: 0 0 14px;
  color: var(--ng-ink);
  font-size: 1.35rem;
  font-weight: 600;
}

.ng-offcanvas-list { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }

.ng-offcanvas-list li { display: flex; gap: 12px; color: var(--ng-text); line-height: 1.5; }

.ng-offcanvas-list svg { width: 20px; height: 20px; flex: 0 0 auto; margin-top: 2px; color: var(--ng-green); }

.ng-offcanvas-list a { color: var(--ng-ink); text-decoration: none; }
.ng-offcanvas-list a:hover { color: var(--ng-green); }

.ng-offcanvas-actions { display: grid; gap: 10px; margin-top: auto; }

/* ---------- Buttons (shared) ---------- */

.ng-btn {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid var(--ng-green);
  padding: 12px 30px;
  background: var(--ng-green);
  color: #fff;
  cursor: pointer;
  font: 600 1rem/1 var(--ng-font);
  text-decoration: none;
  transition: background .25s ease, color .25s ease, border-color .25s ease;
}

.ng-btn:hover,
.ng-btn:focus-visible { border-color: var(--ng-navy); background: var(--ng-navy); color: #fff; }

.ng-btn svg { width: 18px; height: 18px; transition: transform .25s ease; }
.ng-btn:hover svg { transform: translateX(4px); }

.ng-btn--outline { background: transparent; color: var(--ng-green); }
.ng-btn--outline:hover { color: #fff; }
.ng-btn--light { border-color: #fff; background: #fff; color: var(--ng-navy); }
.ng-btn--light:hover { border-color: var(--ng-green); background: var(--ng-green); }

/* ---------- Footer ---------- */

.ng-footer {
  background: var(--ng-navy);
  color: rgb(255 255 255 / 80%);
  font-family: var(--ng-font);
}

.ng-footer-grid {
  display: grid;
  width: min(1290px, calc(100% - 48px));
  grid-template-columns: 1.3fr 1fr 1fr 1.1fr;
  gap: 40px;
  margin: 0 auto;
  padding: 80px 0 60px;
}

.ng-footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
}

.ng-footer-logo img { width: 58px; height: 58px; border-radius: 10px; background: #fff; object-fit: contain; padding: 5px; }
.ng-footer-logo strong { display: block; font-size: 1.3rem; font-weight: 700; }
.ng-footer-logo small { display: block; margin-top: 2px; color: rgb(255 255 255 / 65%); font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; }

.ng-footer p { margin: 24px 0 0; line-height: 1.7; }

.ng-footer h5 {
  margin: 0 0 24px;
  color: #fff;
  font-size: 1.45rem;
  font-weight: 600;
}

.ng-footer-links { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }

.ng-footer-links a,
.ng-footer-contact a {
  color: rgb(255 255 255 / 80%);
  font-weight: 500;
  text-decoration: none;
  transition: color .2s ease, padding .2s ease;
}

.ng-footer-links a:hover { padding-left: 4px; color: #fff; }
.ng-footer-contact a:hover { color: #fff; }

.ng-footer-contact { display: grid; gap: 10px; line-height: 1.6; }
.ng-footer-contact address { font-style: normal; }
.ng-footer-contact .ng-strong { color: #fff; }

.ng-footer-social { display: flex; gap: 12px; margin-top: 24px; }

.ng-footer-social a {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  background: rgb(255 255 255 / 10%);
  color: #fff;
  transition: background .2s ease;
}

.ng-footer-social a:hover { background: var(--ng-green); }
.ng-footer-social svg { width: 18px; height: 18px; }

.ng-footer-cta { margin-top: 14px; }
.ng-footer-cta p { margin: 0 0 22px; }

.ng-footer-bottom {
  border-top: 1px solid rgb(255 255 255 / 12%);
  padding: 22px 0;
}

.ng-footer-bottom-inner {
  display: flex;
  width: min(1290px, calc(100% - 48px));
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  margin: 0 auto;
  font-size: .9rem;
}

.ng-footer-bottom a { color: rgb(255 255 255 / 80%); text-decoration: none; }
.ng-footer-bottom a:hover { color: #fff; }

.ng-back-to-top {
  position: fixed;
  z-index: 60;
  right: 30px;
  bottom: 30px;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--ng-green);
  box-shadow: 0 10px 25px rgb(0 152 71 / 35%);
  color: #fff;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity .3s ease, transform .3s ease, visibility .3s;
}

.ng-back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.ng-back-to-top svg { width: 20px; height: 20px; }

.ng-whatsapp-float {
  position: fixed;
  z-index: 60;
  bottom: 30px;
  left: 30px;
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 50%;
  background: #25d366;
  box-shadow: 0 10px 25px rgb(37 211 102 / 35%);
  color: #fff;
}

.ng-whatsapp-float svg { width: 28px; height: 28px; }

/* ---------- Responsive ---------- */

@media (max-width: 1199px) {
  .ng-header-inner { gap: 16px; padding: 0 24px; }
  .ng-brand { padding-right: 18px; }
  .ng-menu > li > a,
  .ng-menu > li > button { padding: 0 10px; font-size: .95rem; }
  .ng-footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 991px) {
  :root { --ng-header-h: 74px; }
  .ng-nav { display: none; }
  .ng-hamburger { display: inline-grid; }
  .ng-header-actions { margin-left: auto; }
  .ng-brand { border-right: 0; padding-right: 0; }
}

@media (max-width: 575px) {
  .ng-header-inner { padding: 0 16px; }
  .ng-brand img { width: 42px; height: 42px; }
  .ng-brand-text strong { font-size: 1rem; }
  .ng-brand-text small { font-size: .55rem; }
  .ng-icon-btn { width: 42px; height: 42px; }
  .ng-offcanvas { padding: 28px 22px; }
  .ng-footer-grid { grid-template-columns: 1fr; gap: 34px; padding: 60px 0 40px; }
  .ng-back-to-top { right: 16px; bottom: 16px; }
  .ng-whatsapp-float { bottom: 16px; left: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  #public-site-header *,
  .ng-offcanvas,
  .ng-back-to-top { animation: none !important; transition: none !important; }
}
