/*
Theme Name: Nexta Child
Description: Child theme for Nexta website.
Author: Your Name
Template: hello-elementor
Version: 1.0
*/

/* ---------------------------------
   Fonts
--------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&family=Poppins:wght@500;600;700&display=swap');

/* ---------------------------------
   Variables
--------------------------------- */
:root {
  --primary-blue: #1A73E8;
  --text-dark: #111827;
  --muted: #6B7280;
  --nav-height: 72px;

  /* Footer height dynamically set via JS */
  --nx-footer-height: 0px;
}

/* ---------------------------------
   Base
--------------------------------- */
html,
body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', sans-serif;
  color: var(--text-dark);
  background: #fff;
  scroll-behavior: smooth;
  height: 100%; /* ✅ ensures flexbox layout works */
  display: flex;
  flex-direction: column;
}

/* ---------------------------------
   Content wrapper
--------------------------------- */
#nxContentWrapper,
#content,
.site,
.site-content,
.site-main,
.elementor,
.elementor-location-content,
.content-area,
.entry-content {
  display: block;
  width: 100%;
  box-sizing: border-box;

  /* ✅ Fill screen minus header + footer */
  min-height: calc(100vh - var(--nav-height) - var(--nx-footer-height));
  padding-top: var(--nav-height); /* reserve space for header */
}

/* ---------------------------------
   Footer
--------------------------------- */
footer,
.nx-footer {
  margin-top: auto;
  flex-shrink: 0;
  padding-bottom: 0; /* ✅ no extra gap below */
}

/* ---------------------------------
   Header
--------------------------------- */
#nxHeader {
  position: fixed;   /* ✅ fixed so it never disappears */
  top: 0;
  left: 0;
  width: 100%;
  z-index: 9999;
  background: #fff;
  transition: background 280ms ease, box-shadow 280ms ease, padding 200ms ease;
}

/* Shrink effect when scrolling */
#nxHeader.shrink {
  box-shadow: 0 8px 28px rgba(2,6,23,0.06);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.98),
    rgba(255, 255, 255, 0.95)
  );
}

/* ---------------------------------
   Header (desktop padding fix)
--------------------------------- */
@media (min-width: 992px) {
  #nxHeader .nx-container {
    padding-top: 8px !important;
    padding-bottom: 0px !important;
    height: auto !important;
  }
}
/* ================================
   ABOUT PAGE FIX ONLY
   Prevent content being buried under header
   ================================ */
body.page-about #nxContentWrapper {
  padding-top: var(--nav-height) !important; /* reserve space for fixed header */
}

body.page-about .site,
body.page-about .site-content,
body.page-about .site-main,
body.page-about .elementor,
body.page-about .elementor-location-content,
body.page-about .content-area,
body.page-about .entry-content {
  padding-top: 0 !important; /* reset Elementor duplication */
  margin-top: 0 !important;
}

/* ======================================================
   ✅ FIX: REMOVE GAP BELOW FIXED HEADER (About Page)
   ====================================================== */


/* === Privacy / header overlap fix (paste at end of nexta-child/style.css) ===
   Uses the existing --nx-header-height variable set on <html>.
   Ensures header stays on top and privacy page content sits *below* header.
*/

/* 1) Make header sticky and above everything (higher than the 99999 value shown) */
#nxHeader.nx-header,
header.nx-header,
.nx-header {
  position: fixed;        /* keep header fixed at top */
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 200000 !important; /* higher than privacy inline override */
  will-change: transform;
}

/* 2) Reset the privacy page z-index (override earlier inline rules) and add safe top padding */
html body.page-template-page-privacy .nx-privacy-page,
html body.privacy-policy .nx-privacy-page,
#nx-privacy {
  position: relative !important;
  z-index: 1 !important; /* ensure content is below header */
  box-sizing: border-box !important;
  padding-top: calc(var(--nx-header-height, 92px) + 12px) !important;
  padding-bottom: calc(var(--nx-footer-height, 220px) + 24px) !important;
}

/* 3) Ensure the main content area (site-main / #main) also respects header height */
#main.site-main,
main.site-main,
.site-main {
  padding-top: calc(var(--nx-header-height, 92px) + 12px) !important;
  box-sizing: border-box;
}

/* 4) If WordPress admin bar is present, add extra offset */
html.admin-bar #main.site-main,
html.admin-bar body.page-template-page-privacy .nx-privacy-page {
  padding-top: calc(var(--nx-header-height, 92px) + 48px) !important;
}

/* 5) Protect footer positioning (avoid sticky/footer transform collisions) */
.nx-footer,
footer.nx-footer {
  position: relative !important;
  z-index: 1100 !important;
  transform: none !important;
  bottom: auto !important;
}

/* 6) Small-screen tweak (if header height smaller on mobile) */
@media (max-width: 720px) {
  html body.page-template-page-privacy .nx-privacy-page,
  html body.privacy-policy .nx-privacy-page {
    padding-top: calc(var(--nx-header-height, 72px) + 10px) !important;
  }
}
/* === Privacy title offset so heading is visible under fixed header ===
   Paste this after the previous header/privacy fixes.
*/

.nx-privacy-header {
  /* push the privacy block down so it sits clearly below the fixed header */
  margin-top: calc(var(--nx-header-height, 92px) + 12px) !important;
  padding-top: 0 !important;
  position: relative;
  z-index: 1;
}

/* ensure the H1 won't get hidden when navigating by anchor or internal links */
.nx-privacy-title,
.nx-privacy-header h1 {
  scroll-margin-top: calc(var(--nx-header-height, 92px) + 20px);
  display: block;
}

/* admin-bar extra spacing */
html.admin-bar .nx-privacy-header {
  margin-top: calc(var(--nx-header-height, 92px) + 48px) !important;
}

