:root {
  --primary: #0ea5e9;
  --primary-dark: #0284c7;
  --secondary: #3b82f6;
  --accent: #8b5cf6;
  --accent-light: #c4b5fd;

  --bg-dark: #0f172a;
  --bg-darker: #020617;
  --bg-card: rgba(30, 41, 59, 0.7);
  --bg-card-solid: #1e293b;

  --text-main: #f8fafc;
  --text-muted: #cbd5e1;

  --glass: rgba(15, 23, 42, 0.7);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);

  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-darker);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  line-height: 1.2;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

/* Utilities */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: 8rem 0;
}

.text-center {
  text-align: center;
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 2.5rem;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  font-family: 'Inter', sans-serif;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  box-shadow: 0 4px 20px rgba(14, 165, 233, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(14, 165, 233, 0.6);
}

.btn-outline {
  background: transparent;
  color: white;
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--primary);
  transform: translateY(-2px);
}

/* ==========================================
   ADVANCED MEGA-MENU HEADER
   ========================================== */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1.5rem 0;
  transition: all var(--transition);
  background: transparent;
}

header.scrolled {
  padding: 1rem 0;
  background: rgba(2, 6, 23, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--glass-border);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: 'Outfit', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  z-index: 1001;
}

.logo span {
  color: var(--primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

/* Dropdown Wrapper */
.nav-item {
  position: relative;
  padding: 1rem 0;
}

.nav-link {
  font-weight: 500;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  cursor: pointer;
}

.nav-link i {
  font-size: 0.8rem;
  transition: transform var(--transition);
}

.nav-item:hover .nav-link i {
  transform: rotate(180deg);
  color: var(--primary);
}

.nav-item:hover .nav-link {
  color: var(--primary);
}

/* Mega Menu Container */
.mega-menu {
  position: absolute;
  top: 100%;
  left: -200px;
  /* Offset to center under item roughly */
  width: 800px;
  background: var(--bg-card-solid);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--transition);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 2rem;
  gap: 2rem;
  pointer-events: none;
}

.nav-item:hover .mega-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

/* Adjust position for specific menus to prevent off-screen */
.mega-menu-right {
  right: -50px;
  left: auto;
}

.mega-column h3 {
  color: var(--text-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 0.5rem;
}

.mega-column ul li {
  margin-bottom: 0.75rem;
}

.mega-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.5rem;
  border-radius: 8px;
  transition: all var(--transition);
}

.mega-link-icon {
  width: 32px;
  height: 32px;
  background: rgba(14, 165, 233, 0.1);
  color: var(--primary);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mega-link:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--primary);
  transform: translateX(4px);
}

.mobile-menu-btn {
  display: none;
  font-size: 1.5rem;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  z-index: 1001;
}

/* ==========================================
   HERO SLIDER
   ========================================== */
.hero-slider-section {
  position: relative;
  height: 100vh;
  min-height: 800px;
  overflow: hidden;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  display: flex;
  align-items: center;
}

.slide.active {
  opacity: 1;
  z-index: 1;
}

.slide-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.slide-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(2, 6, 23, 0.9) 0%, rgba(2, 6, 23, 0.4) 100%);
  z-index: -1;
}

.slide-content {
  max-width: 800px;
  transform: translateY(30px);
  opacity: 0;
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.3s;
}

.slide.active .slide-content {
  transform: translateY(0);
  opacity: 1;
}

.slide h1 {
  font-size: clamp(3rem, 5vw, 5rem);
  margin-bottom: 1.5rem;
}

.slide p {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  max-width: 600px;
}

.slide-btns {
  display: flex;
  gap: 1rem;
}

.slider-controls {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 1rem;
  z-index: 10;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all var(--transition);
}

.dot.active {
  background: var(--primary);
  transform: scale(1.2);
}

/* ==========================================
   STATS COUNTER SECTION
   ========================================== */
.stats-section {
  background: var(--bg-card-solid);
  border-top: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
  padding: 4rem 0;
  position: relative;
  z-index: 10;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
}

.stat-box h3 {
  font-size: 3.5rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
  font-family: 'Inter', sans-serif;
}

.stat-box p {
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ==========================================
   PILLAR GRID (SERVICES)
   ========================================== */
.pillar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 4rem;
}

.pillar-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 3rem 2rem;
  text-align: center;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.pillar-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: scaleX(0);
  transition: transform var(--transition);
  transform-origin: left;
}

.pillar-card:hover {
  transform: translateY(-10px);
  background: var(--bg-card-solid);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.pillar-card:hover::before {
  transform: scaleX(1);
}

.pillar-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 2rem;
  background: rgba(14, 165, 233, 0.1);
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  transition: all var(--transition);
}

.pillar-card:hover .pillar-icon {
  background: var(--primary);
  color: white;
  transform: rotateY(180deg);
}

.pillar-card h3 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.pillar-card p {
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.pillar-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  text-align: left;
}

.pillar-links a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-main);
  padding: 0.75rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  transition: all var(--transition);
}

.pillar-links a:hover {
  background: rgba(14, 165, 233, 0.1);
  color: var(--primary);
  padding-left: 1rem;
}

/* ==========================================
   INDUSTRIES SECTION
   ========================================== */
.industry-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 4rem;
}

.industry-card {
  position: relative;
  height: 350px;
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  border: 1px solid var(--glass-border);
}

.ind-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  transition: transform 0.5s;
}

.ind-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ind-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(2, 6, 23, 1) 0%, rgba(2, 6, 23, 0.2) 100%);
  z-index: -1;
  transition: opacity var(--transition);
}

.industry-card:hover .ind-bg {
  transform: scale(1.1);
}

.industry-card:hover .ind-overlay {
  opacity: 0.8;
}

.ind-content {
  padding: 2.5rem;
  width: 100%;
}

.ind-content i {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

.ind-content h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.ind-content p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

/* ==========================================
   SUBPAGE HEADER (Services/Industries)
   ========================================== */
.page-hero {
  padding: 12rem 0 6rem;
  position: relative;
  border-bottom: 1px solid var(--glass-border);
}

.page-hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  opacity: 0.3;
}

.page-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--bg-darker), transparent);
  z-index: -1;
}

/* Detailed Layouts */
.content-sidebar-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 4rem;
}

.rich-text h2 {
  margin: 2rem 0 1rem;
  font-size: 2rem;
}

.rich-text p {
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  color: var(--text-muted);
}

.rich-text ul {
  margin-bottom: 2rem;
  padding-left: 1.5rem;
}

.rich-text li {
  margin-bottom: 0.75rem;
  position: relative;
  color: var(--text-muted);
}

.rich-text li::before {
  content: '✓';
  position: absolute;
  left: -1.5rem;
  color: var(--primary);
  font-weight: bold;
}

/* Sidebar */
.sidebar-widget {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  padding: 2rem;
  border-radius: 16px;
  margin-bottom: 2rem;
}

.sidebar-widget h3 {
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 0.5rem;
}

.sidebar-list li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  color: var(--text-muted);
  border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
}

.sidebar-list li a:hover {
  color: var(--primary);
  padding-left: 0.5rem;
}

/* ==========================================
   FOOTER
   ========================================== */
footer {
  background: var(--bg-darker);
  padding: 6rem 0 2rem;
  border-top: 1px solid var(--glass-border);
}

.footer-top {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 4rem;
  margin-bottom: 4rem;
  padding-bottom: 4rem;
  border-bottom: 1px solid var(--glass-border);
}

.newsletter-form {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.newsletter-form input {
  flex: 1;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  color: white;
}

.newsletter-form button {
  padding: 1rem 1.5rem;
  border-radius: 8px;
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.footer-nav h4 {
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

.footer-nav ul li {
  margin-bottom: 0.75rem;
}

.footer-nav a {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.footer-nav a:hover {
  color: var(--primary);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-links a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
}

.social-links a:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-3px);
}

/* Responsive */
@media (max-width: 1024px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .industry-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .nav-links {
    display: none;
  }

  .mobile-menu-btn {
    display: block;
  }

  .content-sidebar-grid {
    grid-template-columns: 1fr;
  }

  .footer-top {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .industry-grid {
    grid-template-columns: 1fr;
  }

  .footer-nav {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .slide h1 {
    font-size: 2.5rem;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}