/* nx-footer.css — Final polished version with desktop + mobile controls + AboutUs + Company */

/* ---------------------------------
   Palette variables
--------------------------------- */
:root {
  --nx-dark: #090e30;
  --nx-muted: #e6e7ee;
  --primary-purple: #7b52ff;
  --primary-indigo: #6b74e6;
  --nx-gap: 28px;
  --footer-height-mobile: 30vh;
}

/* ---------------------------------
   Reset & box-sizing
--------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  margin: 0;
}

#content {
  flex: 1;
}

/* ---------------------------------
   Footer base
--------------------------------- */
.nx-footer {
  display: flex;
  flex-direction: column;
  margin-top: auto;
  background: var(--nx-dark);
  color: var(--nx-muted);
  font-family: 'Inter', sans-serif;
  line-height: 1.4;
  padding: 32px 20px 16px;

  height: 30vh;   /* ✅ will not grow more than 30% of screen */
  overflow-y: hidden;   /* ✅ allows scroll inside footer if content is taller */
}

.nx-footer-container {
  max-width: 1400px; /* wider to fit 5 cols */
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr 0.8fr 1fr; /* Logo | Services | About Us | Company | Contact */
  gap: var(--nx-gap);
  align-items: start;
  width: 100%;
  position: relative; /* ✅ needed for full-height dividers */
}

.nx-footer-col {
  position: relative;
  min-width: 0;
  padding: 0 6px;
}

/* vertical dividers desktop only */
@media (min-width: 992px) {
  /* first divider (Logo → Services) */
  .nx-footer-col:first-child::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0; /* ✅ span full footer height */
    right: 50px;
    width: 1px;
    background: #ffffff; /* white divider */
  }

  /* other dividers (Services → AboutUs, AboutUs → Company, Company → Contact) */
  .nx-footer-col:nth-child(2)::after,
  .nx-footer-col:nth-child(3)::after,
  .nx-footer-col:nth-child(4)::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0; /* ✅ span full footer height */
    right: -20px;
    width: 1px;
    background: rgba(255, 255, 255, 0.08);
  }
}

/* ---------------------------------
   Logo controls
--------------------------------- */
.nx-logo-desktop {
  display: block;
}

.nx-logo-mobile {
  display: none;
}

.nx-logo-desktop-img {
  max-width: 240px; /* bigger desktop logo */
  height: auto;
  margin-top: -10px;
  margin-bottom: 10px;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.35));
  transition: transform .24s ease;
  margin-left: -30px; /* shift left */
}

.nx-logo-desktop-img:hover {
  transform: translateY(-4px);
}

.nx-logo-mobile-img {
  max-width: 1000px;
  margin-top: 6px;
  margin-bottom: 4px;
}

/* ---------------------------------
   About text
--------------------------------- */
.nx-footer-text {
  margin: 0;
  color: var(--nx-muted);
  line-height: 1.6;
  font-size: 14px;
  text-align: left;
  max-width: 220px;
  margin-left: -20px; /* align with logo */
}

.nx-text-desktop {
  display: block;
}

.nx-text-mobile {
  display: none;
}

@media (min-width: 992px) {
  .nx-footer-text {
    margin-top: -4px;
    max-width: 250px;
    text-align: left;
  }
}

/* ---------------------------------
   Headings
--------------------------------- */
.nx-footer h4 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
}

.nx-heading-desktop {
  display: block;
}

.nx-heading-mobile {
  display: none;
}

/* ---------------------------------
   Menu (Services, About Us, Company)
--------------------------------- */
.nx-footer-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nx-footer-menu li {
  margin-bottom: 8px;
}

/* Modern UI links */
.nx-footer-menu a {
  position: relative;
  display: inline-block;
  color: var(--nx-muted);
  text-decoration: none;
  font-size: 14px;
  transition: color .22s ease, transform .22s ease;
}

.nx-footer-menu a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0%;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-purple), var(--primary-indigo));
  transition: width .3s ease;
}

.nx-footer-menu a:hover {
  color: #fff;
  transform: translateX(3px);
  text-shadow: 0 0 6px rgba(123, 82, 255, 0.5);
}

.nx-footer-menu a:hover::after {
  width: 100%;
}

/* ---------------------------------
   Contact
--------------------------------- */
.nx-footer-contact {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nx-footer-contact li {
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--nx-muted);
  line-height: 1.5;
}

.nx-contact-desktop {
  display: block;
}

.nx-contact-mobile {
  display: none;
}

.nx-footer-contact a {
  color: var(--nx-muted);
  text-decoration: none;
}

.nx-footer-contact a:hover {
  color: #fff;
}

/* ---------------------------------
   Socials
--------------------------------- */
.nx-footer-social {
  display: flex;
  gap: 14px;
  margin-top: 16px;
  align-items: center;
 z-index: 21; 
}

.nx-social-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-grid;
  place-items: center;
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(6px);
  transition: transform .28s ease, box-shadow .28s ease, background .28s ease;
}

.nx-social-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.nx-social-btn:hover {
  transform: translateY(-6px) scale(1.06);
  background: linear-gradient(135deg, var(--primary-purple), var(--primary-indigo));
  box-shadow: 0 8px 30px rgba(123, 82, 255, 0.28);
}

/* ---------------------------------
   Bottom bar
--------------------------------- */
.nx-footer-bottom {
  margin-top: -30px;
  padding-top: 0px;
  border-top: 0px solid rgba(255, 255, 255, 0.06);
  text-align: center;
  color: #b8bbd0;
  font-size: 13px;
  line-height: 0;
position: relative;  /* ✅ create stacking context */
  z-index: 20;         /* ✅ lift above grid/dividers */
}
.nx-footer-bottom .privacy-policy a {
  color: #fff; /* white */
  text-decoration: none;
  font-weight: 500;
  display: inline-block;
  margin-bottom: 6px;
}

.nx-footer-bottom .privacy-policy a:hover {
  text-decoration: underline;
}

.nx-footer-bottom .copyright {
  color: #b8bbd0; /* muted gray */
  font-size: 13px;
  line-height: 1.4;
}

/* ---------------------------------
   Desktop height control
--------------------------------- */
@media (min-width: 992px) {
  .nx-footer {
    height: 40vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }

  .nx-aboutus-desktop,
  .nx-company-desktop {
    display: block;
  }
}

/* ---------------------------------
   Mobile compact
--------------------------------- */
@media (max-width: 991px) {
  .nx-footer {
    padding: 12px;
    height: var(--footer-height-mobile);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: left;
  }

  .nx-footer-container {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    align-items: start;
  }

  /* hide desktop-only */
  .nx-logo-desktop,
  .nx-text-desktop,
  .nx-heading-desktop,
  .nx-contact-desktop,
  .nx-aboutus-desktop,
  .nx-company-desktop {
    display: none;
  }

  /* show mobile-specific */
  .nx-logo-mobile,
  .nx-text-mobile,
  .nx-heading-mobile,
  .nx-contact-mobile {
    display: block;
  }

  /* logo tweaks */
  .nx-logo-mobile-img {
    margin-top: 4px;
    margin-bottom: 4px;
  }

  .nx-footer-text {
    font-size: 11px;
    line-height: 1.25;
    max-width: 160px;
    margin-top: 2px;
  }

  /* heading size */
  .nx-footer h4 {
    font-size: 12px;
    margin-bottom: 6px;
  }

  /* contact size */
  .nx-footer-contact li {
    font-size: 11px;
    line-height: 1.25;
  }

  /* social smaller */
  .nx-social-btn {
    width: 30px;
    height: 30px;
    border-radius: 8px;
  }

  .nx-social-btn svg {
    width: 13px;
    height: 13px;
  }

  /* bottom bar smaller */
  .nx-footer-bottom {
    font-size: 10px;
    margin-top: 6px;
    padding-top: 8px;
  }
}

/* ---------------------------------
   Accessibility focus
--------------------------------- */
.nx-footer a:focus {
  outline: 3px solid rgba(123, 82, 255, 0.12);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- Mobile Footer Fix (3-column, not stacked) ---------- */
@media (max-width: 991px) {
  .nx-footer {
    padding: 12px 10px;
  }

  .nx-footer-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    align-items: start;
  }

  /* Logo smaller & aligned */
  .nx-logo-mobile-img {
    max-width: 100px;
    margin: 0 auto 6px;
    display: block;
    margin-top: 35px;
  }

  .nx-text-mobile {
    font-size: 14px;
    line-height: 1.4;
    text-align: center;
    margin: 0 auto;
    max-width: 160px;
  }

  /* Menus compact */
  .nx-footer h4 {
    font-size: 12px;
    margin-bottom: 6px;
    margin-top: 35px;
  }

  .nx-footer-menu li {
    margin-bottom: 4px;
    opacity: 0;
    transform: translateY(6px);
    animation: fadeInUp .4s ease forwards;
  }

  .nx-footer-menu li:nth-child(1) { animation-delay: .1s; }
  .nx-footer-menu li:nth-child(2) { animation-delay: .2s; }
  .nx-footer-menu li:nth-child(3) { animation-delay: .3s; }
  .nx-footer-menu li:nth-child(4) { animation-delay: .4s; }
  .nx-footer-menu li:nth-child(5) { animation-delay: .5s; }

  /* Contact smaller */
  .nx-footer-contact li {
    font-size: 11px;
    line-height: 1.3;
  }

  /* Social icons left */
  .nx-footer-social {
    grid-column: span 3;
    justify-content: flex-start;
    margin-top: 10px;
    margin: -5px -10px;
    margin-left: 0px;
  }

  /* Copyright full width at bottom */
  .nx-footer-bottom {
    grid-column: span 3;
    text-align: center;
    font-size: 10px;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
  }
}

/* ---------------------------------
   EXTRA: Mobile-only Services submenu smaller
--------------------------------- */
@media (max-width: 991px) {
  .nx-footer-col:nth-child(2) .nx-footer-menu a {
    font-size: 11px; /* smaller text just for Services submenu */
    line-height: 1.3;
  }

  .nx-footer-col:nth-child(2) .nx-footer-menu li {
    margin-bottom: 3px; /* tighter spacing */
  }
}

/* ---------------------------------
   Keyframes for fade-in animations
--------------------------------- */
@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* ===== Recommended: allow both privacy and socials to be on-top & clickable ===== */

/* Make the bottom bar itself non-blocking so it won't intercept clicks
   (visual children will still accept pointer events). */
.nx-footer-bottom {
  /* keep visual lift if you want (negative margin) but don't block clicks */
  pointer-events: none;
  position: relative; /* keep stacking context controlled */
  z-index: auto;      /* let children control stacking */
}

/* Restore pointer events for the text we want clickable and keep it visually above */
.nx-footer-bottom .privacy-policy,
.nx-footer-bottom .copyright {
  pointer-events: auto;      /* clickable again */
  position: relative;
  z-index: 30;               /* sits above footer content without covering socials */
  display: inline-block;     /* avoid full-width layer */
}

/* Ensure social icons are above the footer background and clickable */
.nx-footer-social {
  position: relative;
  z-index: 31;       /* higher than privacy children */
  pointer-events: auto;
}
/* Footer bottom fix — stacked layout preserved */
.nx-footer-bottom {
  pointer-events: none;   /* don't block socials */
  position: relative;
  z-index: auto;
}

.nx-footer-bottom .privacy-policy,
.nx-footer-bottom .copyright {
  pointer-events: auto;   /* clickable again */
  position: relative;
  z-index: 30;
  display: block;         /* 🔑 forces them to stack vertically */
  margin-bottom: 4px;     /* space between them */
  text-align: center;     /* center align like before */
}

