/* ==========================================================================
   Premium Services Section Styles (Home Page)
   ========================================================================== */
.nx-services-premium {
  position: relative;
  overflow: hidden;
  padding: 120px 0;
  background: var(--surface-bg, #0a0a0a);
  color: #fff;
}

.nx-sp-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  pointer-events: none;
}

.nx-sp-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.6;
  animation: orbFloat 20s infinite alternate ease-in-out;
}

.nx-sp-orb-1 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, #3b82f6, transparent 60%);
  top: -100px;
  left: -100px;
}

.nx-sp-orb-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #8b5cf6, transparent 60%);
  bottom: -200px;
  right: -100px;
  animation-delay: -5s;
}

.nx-sp-orb-3 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, #06b6d4, transparent 60%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: -10s;
}

.nx-sp-grid {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  mask-image: linear-gradient(to bottom, transparent, black, transparent);
  -webkit-mask-image: linear-gradient(to bottom, transparent, black, transparent);
}

@keyframes orbFloat {
  0% {
    transform: translate(0, 0) scale(1);
  }

  50% {
    transform: translate(20px, -30px) scale(1.1);
  }

  100% {
    transform: translate(-20px, 30px) scale(0.9);
  }
}

.nx-text-gradient {
  background: linear-gradient(to right, #60a5fa, #c084fc);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.nx-sp-header {
  text-align: center;
  margin-bottom: 80px;
  position: relative;
  z-index: 2;
}

.nx-sp-eyebrow {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  font-size: 14px;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.nx-sp-title {
  font-size: 3.5rem;
  line-height: 1.1;
  margin-bottom: 24px;
  font-weight: 800;
  letter-spacing: -1px;
}

.nx-sp-subtitle {
  font-size: 1.25rem;
  color: #94a3b8;
  max-width: 600px;
  margin: 0 auto;
}

.nx-sp-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: minmax(280px, auto);
  gap: 24px;
  perspective: 1500px;
}

.nx-bento-0 {
  grid-column: 1 / 3;
  grid-row: 1 / 3;
}

.nx-bento-1 {
  grid-column: 3 / 5;
  grid-row: 1 / 2;
}

.nx-bento-2 {
  grid-column: 3 / 4;
  grid-row: 2 / 3;
}

.nx-bento-3 {
  grid-column: 4 / 5;
  grid-row: 2 / 3;
}

@media (max-width: 992px) {
  .nx-sp-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .nx-bento-0 {
    grid-column: 1 / 3;
    grid-row: 1 / 3;
  }

  .nx-bento-1 {
    grid-column: 1 / 3;
    grid-row: 3 / 4;
  }

  .nx-bento-2 {
    grid-column: 1 / 2;
    grid-row: 4 / 5;
  }

  .nx-bento-3 {
    grid-column: 2 / 3;
    grid-row: 4 / 5;
  }
}

@media (max-width: 600px) {
  .nx-sp-cards {
    grid-template-columns: 1fr;
  }

  .nx-bento-0,
  .nx-bento-1,
  .nx-bento-2,
  .nx-bento-3 {
    grid-column: 1 / -1;
    grid-row: auto;
  }
}

.nx-sp-card {
  position: relative;
  opacity: 0;
  transform: translateY(40px);
  animation: cardEntrance 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  animation-delay: var(--anim-delay, 0s);
  border-radius: 24px;
  background: rgba(25, 25, 30, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 40px;
  text-align: left;
  transform-style: preserve-3d;
  transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94), border-color 0.3s;
  cursor: pointer;
}

@keyframes cardEntrance {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.nx-sp-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(800px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255, 255, 255, 0.06), transparent 40%);
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s;
}

.nx-sp-card:hover::before {
  opacity: 1;
}

.nx-sp-card:hover {
  border-color: rgba(96, 165, 250, 0.4);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.7), 0 0 40px rgba(96, 165, 250, 0.2);
}

.nx-sp-card-inner {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  pointer-events: none;
}

.nx-bento-0 .nx-sp-card-inner {
  justify-content: flex-end;
}

.nx-bento-1 .nx-sp-card-inner,
.nx-bento-2 .nx-sp-card-inner,
.nx-bento-3 .nx-sp-card-inner {
  justify-content: flex-start;
}

.nx-sp-content h3 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: #f8fafc;
  transform: translateZ(30px);
}

.nx-bento-2 .nx-sp-content h3,
.nx-bento-3 .nx-sp-content h3 {
  font-size: 1.25rem;
}

.nx-sp-content p {
  color: #cbd5e1;
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 24px;
  transform: translateZ(20px);
}

.nx-sp-explore-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #60a5fa;
  font-weight: 600;
  text-decoration: none;
  transform: translateZ(25px);
  transition: color 0.3s;
  pointer-events: auto;
}

.nx-sp-explore-link span {
  transition: transform 0.3s;
}

.nx-sp-card:hover .nx-sp-explore-link {
  color: #93c5fd;
}

.nx-sp-card:hover .nx-sp-explore-link span {
  transform: translateX(4px);
}

.nx-sp-icon-wrapper {
  width: 60px;
  height: 60px;
  margin-bottom: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  transform: translateZ(40px);
}

.nx-bento-0 .nx-sp-icon-wrapper {
  width: 80px;
  height: 80px;
  border-radius: 20px;
}

.nx-bento-0 .nx-sp-icon-wrapper svg {
  width: 40px;
  height: 40px;
}

.nx-sp-icon-glow {
  position: absolute;
  width: 100%;
  height: 100%;
  background: inherit;
  filter: blur(15px);
  opacity: 0;
  transition: opacity 0.3s;
}

.nx-sp-card:hover .nx-sp-icon-glow {
  opacity: 1;
}

.nx-sp-icon-wrapper svg {
  width: 28px;
  height: 28px;
  color: #3b82f6;
  position: relative;
  z-index: 2;
}

.nx-sp-action-wrapper {
  text-align: center;
  margin-top: 80px;
}

.nx-sp-main-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 18px 48px;
  font-size: 1.125rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(to right, #2563eb, #7c3aed);
  border-radius: 50px;
  text-decoration: none;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
}

.nx-sp-main-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: transform 0.6s;
}

.nx-sp-main-btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 20px 40px -10px rgba(124, 58, 237, 0.6);
}

.nx-sp-main-btn:hover::before {
  transform: translateX(200%);
}

.nx-sp-main-btn-text {
  position: relative;
  z-index: 2;
}

/* ==========================================================================
   Services Landing Page Grid Animation
   ========================================================================== */
.nx-services-grid-page {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 40px;
  padding: 40px 0;
}

.nx-sv-card {
  position: relative;
  background: var(--surface);
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  overflow: hidden;
  border: 1px solid var(--border);
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 0.6s forwards;
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.nx-sv-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.nx-sv-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.nx-sv-card:hover::before {
  transform: scaleX(1);
}

.nx-sv-card h3 {
  font-size: 1.5rem;
  margin: 16px 0;
  position: relative;
  z-index: 2;
}

.nx-sv-card p {
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 24px;
  position: relative;
  z-index: 2;
}

.nx-sv-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #3b82f6;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.95rem;
  position: relative;
  z-index: 2;
}

.nx-sv-card-cta svg {
  width: 18px;
  height: 18px;
  transition: transform 0.3s;
}

.nx-sv-card:hover .nx-sv-card-cta svg {
  transform: translateX(4px);
}

.nx-sv-card-accent {
  position: absolute;
  right: -20px;
  bottom: -20px;
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  transition: transform 0.6s ease;
}

.nx-sv-card:hover .nx-sv-card-accent {
  transform: scale(2);
}

/* ==========================================================================
   Service Detail Page Styles
   ========================================================================== */
.nx-sd-hero {
  position: relative;
  padding: 100px 0 60px;
  background: var(--surface-bg, #f8fafc);
  overflow: hidden;
  text-align: center;
}

.nx-sd-bg-shapes {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
}

.nx-sd-shape {
  position: absolute;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  animation: sdMorph 8s infinite alternate ease-in-out;
}

.nx-sd-shape-1 {
  width: 400px;
  height: 400px;
  top: -100px;
  left: -100px;
}

.nx-sd-shape-2 {
  width: 300px;
  height: 300px;
  bottom: -50px;
  right: -50px;
  animation-duration: 12s;
}

@keyframes sdMorph {
  0% {
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    transform: rotate(0deg);
  }

  100% {
    border-radius: 40% 60% 30% 70% / 60% 40% 70% 30%;
    transform: rotate(15deg);
  }
}

.nx-sd-content {
  display: flex;
  flex-direction: column;
  gap: 60px;
  padding: 60px 0;
}

.nx-sd-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.nx-sd-row:nth-child(even) .nx-sd-text {
  order: 2;
}

.nx-sd-row:nth-child(even) .nx-sd-visual {
  order: 1;
}

.nx-sd-visual {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
}

.nx-sd-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s;
}

.nx-sd-row:hover .nx-sd-visual img {
  transform: scale(1.05);
}

.nx-sd-text h3 {
  font-size: 2rem;
  margin-bottom: 20px;
  position: relative;
  display: inline-block;
}

.nx-sd-text h3::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 40px;
  height: 3px;
  background: #3b82f6;
  border-radius: 2px;
}

.nx-sd-text p {
  color: var(--text-muted);
  line-height: 1.8;
  font-size: 1.1rem;
}

@media (max-width: 768px) {
  .nx-sd-row {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .nx-sd-row:nth-child(even) .nx-sd-text,
  .nx-sd-row:nth-child(even) .nx-sd-visual {
    order: unset;
  }
}