/* header */
/* ============================================================
   DETAIL INSPECTIONS - SITE HEADER
   nsx-* prefix for all custom classes
   ============================================================ */

/* --- Header shell (full-width background) --- */
.nsx-site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(135deg, var(--color-secondary), var(--color-primary));
  color: var(--color-text-inverse);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
  width: 100%;
}

/* --- Inner flex row --- */
.nsx-header-inner {
  gap: 1rem;
  min-height: 64px;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

/* --- Logo link: no underline, no extra styling --- */
.nsx-logo-link {
  text-decoration: none;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

/* --- Desktop nav: takes up flexible middle space --- */
.nsx-desktop-nav {
  display: none;
  align-items: center;
  justify-content: center;
}

@media (min-width: 1024px) {
  .nsx-desktop-nav {
    display: flex;
  }

  .nsx-header-inner {
    min-height: 72px;
  }
}

/* --- Right-side actions group --- */
.nsx-header-actions {
  gap: 0.75rem;
  flex-shrink: 0;
}

/* --- Phone link (quiet inline style) --- */
.nsx-phone-link {
  display: none;
  gap: 0.4rem;
  color: var(--color-text-inverse);
  text-decoration: none;
  opacity: 0.88;
  white-space: nowrap;
  transition: opacity 0.2s ease;
}

.nsx-phone-link:focus-visible {
  outline: 2px solid var(--color-text-inverse);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (min-width: 480px) {
  .nsx-phone-link {
    display: flex;
  }
}

/* --- Phone icon sizing --- */
.nsx-phone-icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

/* --- CTA button spacing tweak --- */
.nsx-cta-btn {
  white-space: nowrap;
  flex-shrink: 0;
}

/* --- Hamburger button --- */
.nsx-hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0;
  background: transparent;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  cursor: pointer;
  color: var(--color-text-inverse);
  flex-shrink: 0;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.nsx-hamburger:focus-visible {
  outline: 2px solid var(--color-text-inverse);
  outline-offset: 3px;
}

@media (min-width: 1024px) {
  .nsx-hamburger {
    display: none;
  }
}

/* Hamburger bars */
.nsx-hamburger-bar {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
  transform-origin: center;
}

/* Animated state when open */
.nsx-site-header.nsx-drawer-open .nsx-hamburger-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nsx-site-header.nsx-drawer-open .nsx-hamburger-bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nsx-site-header.nsx-drawer-open .nsx-hamburger-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* --- Drawer overlay --- */
.nsx-drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 998;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.nsx-drawer-overlay.nsx-overlay-visible {
  display: block;
}

.nsx-drawer-overlay.nsx-overlay-active {
  opacity: 1;
}

/* --- Mobile drawer panel --- */
.nsx-mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: min(320px, 90vw);
  background: linear-gradient(180deg, var(--color-secondary), var(--color-primary));
  color: var(--color-text-inverse);
  z-index: 999;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  overscroll-behavior: contain;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.4);
}

.nsx-mobile-drawer.nsx-drawer-open {
  transform: translateX(0);
}

/* Focus outline inside drawer */
.nsx-mobile-drawer:focus-visible {
  outline: none;
}

/* --- Drawer header row --- */
.nsx-drawer-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
}

/* --- Drawer close button --- */
.nsx-drawer-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  cursor: pointer;
  color: var(--color-text-inverse);
  flex-shrink: 0;
  transition: background 0.2s ease;
}

.nsx-drawer-close:focus-visible {
  outline: 2px solid var(--color-text-inverse);
  outline-offset: 3px;
}

/* --- Drawer nav area --- */
.nsx-drawer-nav {
  flex: 1;
  padding: 1rem 0;
}

/* --- Drawer phone link --- */
.nsx-drawer-phone {
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.nsx-drawer-phone a {
  gap: 0.5rem;
  color: var(--color-text-inverse);
  text-decoration: none;
  opacity: 0.88;
}

.nsx-drawer-phone a:focus-visible {
  outline: 2px solid var(--color-text-inverse);
  outline-offset: 3px;
  border-radius: 4px;
}

/* --- Drawer CTA --- */
.nsx-drawer-cta {
  padding: 1rem 1.25rem 1.5rem;
  flex-shrink: 0;
}

/* ============================================================
   VERY SMALL SCREENS (360px target)
   Ensure no overflow: logo + CTA + hamburger only
   ============================================================ */
@media (max-width: 479px) {
  .nsx-header-actions {
    gap: 0.5rem;
  }

  .nsx-cta-btn {
    font-size: 0.8rem;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
}
/* footer */
/* =============================================
   NSX FOOTER - Detail Inspections
   ============================================= */

.nsx-footer {
  background: linear-gradient(
    135deg,
    var(--color-secondary) 0%,
    var(--color-primary) 100%
  );
  color: var(--color-text-inverse);
  padding-top: clamp(2.5rem, 6vw, 4rem);
  padding-bottom: 0;
  width: 100%;
}

/* ---- Responsive grid override ----
   ns-grid-cols-4 stacks to 1 col on mobile;
   we bump to 2 cols at mid-screen, then 4 at lg. */
.nsx-footer-grid {
  padding-bottom: clamp(2rem, 5vw, 3.5rem);
}

@media (min-width: 640px) and (max-width: 1023px) {
  .nsx-footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---- Logo link ---- */
.nsx-footer-logo-link {
  display: inline-block;
  margin-bottom: 0;
  line-height: 0;
}

.nsx-footer-logo-link:focus-visible {
  outline: 2px solid var(--color-text-inverse);
  outline-offset: 4px;
  border-radius: 2px;
}

/* ---- Brand tagline / service area ---- */
.nsx-footer-tagline {
  color: var(--color-text-inverse);
  opacity: 0.78;
  line-height: 1.65;
  margin-bottom: 0;
}

.nsx-footer-service-area {
  color: var(--color-text-inverse);
  opacity: 0.78;
  margin-bottom: 0;
}

.nsx-footer-label {
  font-weight: 600;
  opacity: 1;
}

/* ---- Column wrapper ---- */
.nsx-footer-col {
  display: flex;
  flex-direction: column;
}

/* ---- Section headings ---- */
.nsx-footer-heading {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-inverse);
  margin-top: 0;
  margin-bottom: 1.1rem;
  opacity: 0.55;
}

/* ---- Contact list ---- */
.nsx-footer-contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.nsx-footer-contact-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--color-text-inverse);
}

.nsx-footer-contact-icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  opacity: 0.6;
  color: var(--color-text-inverse);
}

.nsx-footer-contact-link {
  color: var(--color-text-inverse);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.01em;
  transition: opacity 0.2s ease;
}

.nsx-footer-contact-link:focus-visible {
  outline: 2px solid var(--color-text-inverse);
  outline-offset: 3px;
  border-radius: 2px;
}

.nsx-footer-contact-text {
  font-size: 0.9375rem;
  opacity: 0.78;
}

/* ---- Hours list ---- */
.nsx-footer-hours-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.nsx-footer-hours-item {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.nsx-footer-hours-day {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text-inverse);
  opacity: 0.65;
  letter-spacing: 0.03em;
}

.nsx-footer-hours-time {
  font-size: 0.9375rem;
  color: var(--color-text-inverse);
}

/* ---- Divider ---- */
.nsx-footer-divider {
  height: 1px;
  background: var(--color-text-inverse);
  opacity: 0.12;
  margin-bottom: 1.25rem;
}

/* ---- Bottom bar ---- */
.nsx-footer-bottom {
  padding-bottom: clamp(1rem, 3vw, 1.5rem);
  gap: 0.75rem;
}

.nsx-footer-copyright {
  color: var(--color-text-inverse);
  opacity: 0.55;
  margin: 0;
  font-size: 0.8125rem;
}

/* ---- Legal nav (platform fills this) ---- */
.nsx-footer-legal-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1.25rem;
}

/*
  The platform populates .nsx-footer-legal-nav with the
  legal menu. These rules nudge its links to match the footer
  palette without overriding the platform's own link styling
  - kept minimal intentionally.
*/
.nsx-footer-legal-nav a {
  color: var(--color-text-inverse);
  font-size: 0.8125rem;
  opacity: 0.55;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.nsx-footer-legal-nav a:focus-visible {
  outline: 2px solid var(--color-text-inverse);
  outline-offset: 3px;
  border-radius: 2px;
  opacity: 1;
}
