/* All Layout CSS Goes Here */

/*=============================================
    NAVBAR
=============================================*/
.nx-navbar {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: var(--z-header);
  padding: 20px 0;
  background: var(--overlay-blue-transparent);
  transition:
    background var(--transition),
    padding var(--transition),
    backdrop-filter var(--transition);
  transform: translateZ(0);
  will-change: background, backdrop-filter;
}

.nx-navbar.scrolled {
  background: var(--overlay-blue-deep);
  backdrop-filter: blur(10px);
}

/* Smooth border */
.nx-navbar::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--glass-soft);
  opacity: 0;
  transition: opacity var(--transition);
}

.nx-navbar.scrolled::after {
  opacity: 1;
}

/* Wrapper */
.nx-nav-wrapper {
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.nx-logo a {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
}

.nx-logo img {
  height: 50px;
  width: auto;
}


/* Menu */
.nx-nav-menu ul {
  display: flex;
  gap: 30px;
  margin: 0;
}

.nx-nav-menu a {
  font-weight: 500;
  position: relative;
  transition: color var(--transition);
}

/* Hover underline */
.nx-nav-menu a::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width var(--transition);
}

.nx-nav-menu a:hover::after {
  width: 100%;
}

.nx-nav-menu a.active {
  color: var(--primary);
}

.nx-nav-menu a.active::after {
  width: 100%;
}

/*=============================================
    SUBMENU
=============================================*/
.nx-has-submenu {
  position: relative;
}

/* Dropdown */
.nx-submenu {
  position: absolute;
  top: 120%;
  left: 0;
  min-width: 270px;
  background: var(--overlay-blue-deep);
  border: 1px solid var(--glass-soft);
  border-radius: var(--radius-md);
  padding: 10px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--transition);
  z-index: var(--z-menu);
  flex-direction: column;
}

.nx-menu-parent {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nx-menu-parent svg {
  width: 14px;
  height: 14px;
  transition: transform var(--transition);
}

.nx-has-submenu:hover .nx-menu-parent svg {
  transform: rotate(180deg);
}

/* Show */
.nx-has-submenu:hover .nx-submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Links */
.nx-has-submenu ul {
  gap: 10px;
}

.nx-submenu li {
  width: 100%;
}

.nx-submenu a {
  display: block;
  padding: 5px 20px;
  font-size: 15px;
  white-space: nowrap;
}

.nx-submenu a:hover {
  background: var(--bg-soft);
}

/* Disable underline in dropdown */
.nx-submenu a::after {
  display: none;
}

/* Right Side */
.nx-nav-right {
  align-items: center;
  gap: 20px;
}

/* Theme Toggle */
.nx-theme-toggle {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  padding: 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  display: none;
}

.nx-theme-toggle svg {
  width: 18px;
  height: 18px;
}

.nx-theme-toggle svg {
  transition: transform var(--transition);
}

.nx-theme-toggle:hover svg {
  transform: rotate(20deg);
}

/* CTA Button */
.nx-nav-menu .nx-btn-primary {
  display: none;
}

/* Mobile Toggle */
.nx-menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.nx-menu-toggle span {
  width: 25px;
  height: 2px;
  background: var(--text);
  margin: 4px 0;
}

/*=============================================
    SINGLE SERVICE: HERO
=============================================*/
.nx-service-hero {
  position: relative;
  padding:
    calc(var(--section-padding-lg) + 40px)
    0
    var(--section-padding-lg);
}

/* Content */
.nx-service-hero-content h1 {
  margin: 20px 0 24px;
  max-width: 12ch;
}

.nx-service-hero-content p {
  max-width: 55ch;
}

/* Buttons */
.nx-service-hero-buttons {
  display: flex;
  gap: 18px;
  margin-top: 35px;
}

/* Trust */
.nx-service-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 35px;
}

.nx-trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 14px;
}

.nx-trust-item svg {
  width: 18px;
  height: 18px;
  color: var(--secondary);
}

/* Visual */
.nx-service-hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Image */
.nx-service-hero-visual img {
  position: relative;
  z-index: 2;
  border-radius: var(--radius-xlg);
  box-shadow: var(--shadow-lg);
}

/* Glow */
.nx-service-hero-glow {
  position: absolute;
  width: 350px;
  height: 350px;
  background: var(--secondary-glow-xl);
  filter: blur(120px);
  opacity: 0.25;
  border-radius: var(--radius-full);
  z-index: 1;
}

/*=============================================
    SINGLE SERVICE: OVERVIEW
=============================================*/
.nx-service-overview-image img {
  border-radius: var(--radius-xlg);
  box-shadow: var(--shadow-lg);
}

/* Content */
.nx-service-overview-content h2 {
  margin: 20px 0 24px;
}

.nx-service-overview-content p + p {
  margin-top: 18px;
}

/* Features */
.nx-service-overview-features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-top: 35px;
}

.nx-overview-feature {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nx-overview-feature svg {
  width: 20px;
  height: 20px;
  color: var(--secondary);
  flex-shrink: 0;
}

/*=============================================
    SINGLE SERVICE: BENEFITS
=============================================*/
.nx-service-benefits {
  position: relative;
}

/* grid */
.nx-benefits-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  margin-top: 70px;
}

/* Offset */
.nx-offset {
  margin-top: 50px;
}

/* Card */
.nx-benefit-card {
  position: relative;
  padding: 35px;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-xlg);
  transition: var(--transition);
  overflow: hidden;
}

/* Hover */
.nx-benefit-card:hover {
  transform: translateY(-8px);
  border-color: var(--border-blue);
  box-shadow: var(--shadow-secondary);
}

/* Icon */
.nx-benefit-icon {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  border-radius: var(--radius-full);
  background: var(--secondary-glow-sm);
  color: var(--secondary);
}

.nx-benefit-icon svg {
  width: 28px;
  height: 28px;
}

/* Title */
.nx-benefit-card h3 {
  margin-bottom: 18px;
}

/* Text */
.nx-benefit-card p {
  max-width: 100%;
}

/*=============================================
    SINGLE SERVICE: WHAT'S INCLUDED
=============================================*/
.nx-whats-included {
  position: relative;
}

/* Grid */
.nx-included-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 70px;
}

/* Card */
.nx-included-card {
  position: relative;
  padding: 35px;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-xlg);
  overflow: hidden;
  transition: var(--transition);
}

/* Hover */
.nx-included-card:hover {
  transform: translateY(-8px);
  border-color: var(--border-blue);
  box-shadow: var(--shadow-secondary);
}

/* Icon */
.nx-included-icon {
  width: 65px;
  height: 65px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  border-radius: var(--radius-full);
  background: var(--secondary-glow-sm);
  color: var(--secondary);
}

.nx-included-icon svg {
  width: 30px;
  height: 30px;
}

/* Ttitle */
.nx-included-card h3 {
  margin-bottom: 24px;
}

/* List */
.nx-included-card ul {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* List Item */
.nx-included-card li {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
}

/* Check Icon */
.nx-included-card li svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--secondary);
}

/*=============================================
    SINGLE SERVICE: FEATURED PROJECT
=============================================*/
.nx-featured-project {
  position: relative;
}

/* Box */
.nx-featured-project-box {
  margin-top: 70px;
}

/* Image */
.nx-featured-project-image {
  position: relative;
}

.nx-featured-project-image img {
  position: relative;
  z-index: 2;
  border-radius: var(--radius-xlg);
  box-shadow: var(--shadow-lg);
  transition: var(--transition-slow);
}

/* Hover */
.nx-featured-project-image:hover img {
  transform: translateY(-6px);
}

/* Glow */
.nx-featured-project-glow {
  position: absolute;
  width: 320px;
  height: 320px;
  background: var(--secondary-glow-xl);
  filter: blur(120px);
  opacity: 0.2;
  border-radius: var(--radius-full);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
}

/* Content */
.nx-featured-project-content h3 {
  margin: 18px 0 22px;
}

/* Tag */
.nx-project-tag {
  display: inline-flex;
  padding: 8px 16px;
  border-radius: 50px;
  background: var(--secondary-glow-sm);
  color: var(--secondary);
  font-size: 14px;
  font-weight: 500;
}

/* Stats */
.nx-project-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  margin: 35px 0;
}

/* Single Stat */
.nx-project-stat h4 {
  margin-bottom: 6px;
  font-size: 28px;
  color: var(--secondary);
}

.nx-project-stat span {
  color: var(--text-muted);
  font-size: 14px;
}

/*=============================================
    SINGLE BLOG: READING PROGRESS
=============================================*/
.nx-reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 4px;
  z-index: var(--z-tooltip);
  background: var(--gradient-primary);
  box-shadow: 0 0 15px var(--primary-glow);
  transition: width .1s linear;
}

/*=============================================
    SINGLE BLOG: HERO
=============================================*/
.nx-blog-hero {
  padding-top: 180px;
  padding-bottom: 80px;
  text-align: center;
}

.nx-blog-hero-content {
  max-width: 900px;
  margin: 0 auto;
}

.nx-blog-hero-content h1 {
  margin: 20px 0;
}

.nx-blog-hero-content p {
  margin: 0 auto 30px;
}

/* Meta */
.nx-blog-hero-meta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 24px;
}

.nx-blog-hero-meta span {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 14px;
}

.nx-blog-hero-meta svg {
  width: 16px;
  height: 16px;
}

/*=============================================
    SINGLE BLOG: FEATURE IMAGE
=============================================*/
.nx-blog-featured-image img {
  width: 100%;
  border-radius: var(--radius-xlg);
  aspect-ratio: 16 / 9;
  object-fit: cover;
  box-shadow: var(--shadow-lg);
}

/*=============================================
    SINGLE BLOG: TABLE OF CONTENTS
=============================================*/
.nx-toc {
  position: sticky;
  top: 120px;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--bg-glass);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.nx-toc h4 {
  margin-bottom: 20px;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nx-toc h4 svg {
  width: 18px;
  height: 18px;

  color: var(--secondary);
}

/* Progress */
.nx-toc-progress {
  width: 100%;
  height: 4px;
  margin-bottom: 20px;
  border-radius: 999px;
  background: var(--bg-soft);
  overflow: hidden;
}

.nx-toc-progress::before {
  content: "";
  display: block;
  width: 45%;
  height: 100%;
  background: var(--gradient-primary);
  border-radius: inherit;
}

/* List */
.nx-toc ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Links */
.nx-toc a {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 14px;
  transition: var(--transition);
}

.nx-toc a:hover {
  color: var(--text);
  background: var(--bg-soft);
  transform: translateX(4px);
}

/* Active */
.nx-toc a.active {
  color: var(--secondary);
  background: var(--secondary-glow-sm);
  border: 1px solid var(--border-blue);
}

/*=============================================
    SINGLE BLOG: CONTENT
=============================================*/
.nx-blog-content {
  max-width: 850px;
}

.nx-blog-content h2 {
  margin: 50px 0 20px;
}

.nx-blog-content h3 {
  margin: 35px 0 15px;
}

.nx-blog-content p {
  margin-bottom: 20px;
  max-width: none;
}

.nx-blog-content ul,
.nx-blog-content ol {
  margin-bottom: 24px;
  padding-left: 20px;
}

.nx-blog-content li {
  margin-bottom: 10px;
}

.nx-blog-content blockquote {
  padding: 24px;
  margin: 30px 0;
  border-left: 4px solid var(--primary);
  background: var(--bg-glass);
  border-radius: var(--radius-md);
}

/*=============================================
    SINGLE BLOG: AUTHOR BOX
=============================================*/
.nx-author-box {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 32px;
  border-radius: var(--radius-xlg);
  background: var(--bg-glass);
  border: 1px solid var(--border);
}

.nx-author-avatar img {
  width: 90px;
  height: 90px;
  object-fit: cover;
  border-radius: var(--radius-full);
  border: 2px solid var(--border-blue);
}

.nx-author-label {
  color: var(--secondary);
  font-size: 14px;
}

.nx-author-content h3 {
  margin: 8px 0 12px;
}

.nx-related-articles {
  position: relative;
}

.nx-related-articles::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 120px;
  height: 1px;
  transform: translateX(-50%);
  background: var(--border-blue);
}

/*=============================================
    FOOTER
=============================================*/
.nx-footer {
  background: var(--bg);
  padding: 60px 0 30px;
  border-top: 1px solid var(--border);
  box-shadow: 0 -10px 50px var(--secondary-glow-sm);
  position: fixed;
  bottom: 0;
  width: 100%;
}

/* Brand */
.nx-footer-brand img {
  width: 150px;
  margin-bottom: 15px;
}

.nx-footer p {
  font-size: var(--fs-small);
}

/* Headings */
.nx-footer h4 {
  margin-bottom: 15px;
}

/* Links */
.nx-footer ul li {
  margin-bottom: 8px;
}

.nx-footer ul li a {
  color: var(--text-muted);
  transition: var(--transition);
  font-size: var(--fs-small);
}

.nx-footer ul li a:hover {
  color: var(--secondary);
}

/* Contact */
.nx-footer-contact li a {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nx-footer-contact li a:hover {
  color: var(--text) !important;
}

.nx-footer-contact svg {
  width: 18px;
  height: 18px;
  color: var(--secondary);
  flex-shrink: 0;
}

.nx-footer-contact li a:hover svg {
  color: var(--primary);
  transform: translateX(2px);
}

/* Social */
.nx-footer-social {
  margin-top: 30px;
  gap: 15px;
}

.nx-social {
  width: 40px;
  height: 40px;
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  color: var(--text-light);
  transition: var(--transition);
  position: relative;
}

.nx-social:hover {
  background: var(--gradient-primary);
  transform: translateY(-4px);
  box-shadow: 0 10px 25px var(--border-blue);
  color: var(--text);
}

.nx-social:nth-child(1):hover { background: #1877F2; } /* Facebook */
.nx-social:nth-child(2):hover { background: #E4405F; } /* Instagram */
.nx-social:nth-child(3):hover { background: #0B1C2C; } /* X */
.nx-social:nth-child(4):hover { background: #0A66C2; } /* LinkedIn */

/* Tooltip Base */
.nx-social {
  position: relative;
}

/* Tooltip Text */
.nx-social::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 120%; /* above icon */
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--bg-dark);
  color: var(--text-light);
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 6px;
  box-shadow: 0 5px 20px var(--secondary-glow-md);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}

/* Tooltip Arrow */
.nx-social::before {
  content: "";
  position: absolute;
  bottom: 105%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  border-width: 6px;
  border-style: solid;
  border-color: var(--bg-dark) transparent transparent transparent;
  opacity: 0;
  transition: var(--transition);
}

/* Show on hover */
.nx-social:hover::after,
.nx-social:hover::before {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Footer Mini CTA */
.nx-footer-cta {
  margin-top: 30px;
}

.nx-footer-cta p {
  margin-bottom: 10px;
}

/* WhatsApp Button */
.nx-footer-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--whatsapp-button);
  color: var(--text);
  padding: 10px 18px;
  border-radius: 50px;
  font-size: 14px;
  transition: var(--transition);
}

.nx-footer-whatsapp:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px var(--whatsapp-glow);
}

.nx-footer-whatsapp {
  animation: whatsappPulse 2.5s infinite;
}

/* Bottom */
.nx-footer-bottom {
  margin-top: 30px;
  border-top: 1px solid var(--border);
  padding-top: 15px;
}

.nx-footer-bottom p {
  font-size: 13px;
  max-width: 100%;
}

/*=============================================
    404 PAGE
=============================================*/
.nx-error-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.nx-error-page::before {
  content: "";
  position: absolute;
  width: 500px;
  height: 500px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--secondary-glow-lg);
  opacity: 0.25;
  filter: blur(180px);
  pointer-events: none;
}

.nx-error-content {
  max-width: 700px;
  margin: 0 auto;
}

.nx-error-code {
  display: block;
  font-size: clamp(100px, 15vw, 220px);
  font-weight: 800;
  line-height: 1;
  color: var(--404-color);
  margin-bottom: 20px;
}

.nx-error-content h1 {
  margin-bottom: 20px;
}

.nx-error-content p {
  max-width: 600px;
  margin: 0 auto 32px;
}

.nx-error-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}