:root {
  --color-bg-dark: #000000;
  --color-bg-card: #0a0a0a;
  --color-primary: #ffffff;
  --color-primary-hover: #d4d4d4;
  --color-accent: #a855f7;
  /* Electric Purple */
  --color-text-main: #ffffff;
  --color-text-muted: #a3a3a3;
  --color-border: #262626;
  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
  --max-width: 1200px;
  --header-width: 1400px;
  /* Wider header */
  --header-height: 80px;
}

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

body {
  font-family: var(--font-main);
  background-color: var(--color-bg-dark);
  color: var(--color-text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease;
}

ul {
  list-style: none;
}

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

/* Utilities */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  background-color: var(--color-primary);
  color: #000;
  font-weight: 600;
  border-radius: 6px;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  text-align: center;
}

.btn:hover {
  background-color: var(--color-primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}

.btn-outline {
  background-color: transparent;
  border: 1px solid var(--color-primary);
  color: var(--color-primary);
}

.btn-outline:hover {
  background-color: var(--color-primary);
  color: #000;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  background: linear-gradient(to right, #ffffff, #666666);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient {
  background: linear-gradient(to right, #ffffff, var(--color-accent));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Layout */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 1000;
  transition: background-color 0.3s ease, backdrop-filter 0.3s ease;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background-color: #000000;
  /* Solid black at start */
}

header .container {
  max-width: var(--header-width);
  padding: 0 10px;
  /* Minimized padding to maximize separation */
}

header.scrolled {
  background-color: rgba(0, 0, 0, 0.2);
  /* Ultra transparent */
  backdrop-filter: blur(50px);
  /* Maximum frost effect */
  -webkit-backdrop-filter: blur(50px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: 5rem;
  /* Enforce massive safe zone between Logo and Links */
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 0;
  flex-shrink: 0;
  /* Prevent logo from shrinking */
}

.logo span {
  display: none;
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
  margin-left: auto;
  /* Hard push to the right */
}

.nav-links a {
  font-weight: 500;
  font-size: 0.95rem;
  color: #e2e8f0;
  /* Lighter text for better contrast */
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  background: var(--color-accent);
  color: white;
  /* Ensure readability */
  border: none;
  border-radius: 6px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(168, 85, 247, 0.3);
}

.btn-sm:hover {
  background: #9333ea;
  box-shadow: 0 6px 12px rgba(168, 85, 247, 0.5);
  transform: translateY(-2px);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-accent);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
}

header .btn {
  background-color: var(--color-accent);
  color: #fff;
  padding: 0.5rem 1.25rem;
  /* Explicitly smaller for header if not using btn-sm, but I am. Let's force it here too just in case */
  font-size: 0.9rem;
}

header .btn:hover {
  background-color: #9333ea;
  box-shadow: 0 4px 12px rgba(168, 85, 247, 0.4);
}

/* Hero Section */
.hero {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding-top: var(--header-height);
}

/* Light Mode Sections */
.bg-light {
  background-color: #f8fafc;
  color: #0f172a;
}

.bg-light .section-title {
  background: linear-gradient(to right, #0f172a, #64748b);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.bg-light p {
  color: #475569;
}

.bg-light .card {
  background-color: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.bg-light .card h3 {
  color: #0f172a;
}

.bg-light .card:hover {
  transform: translateY(-5px);
  border-color: var(--color-accent);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.bg-light .card-icon {
  background-color: rgba(168, 85, 247, 0.1);
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  opacity: 0.85;
  /* Much more visible */
  filter: none;
  /* Removed grayscale for realism */
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.2), var(--color-bg-dark));
  /* Lighter overlay */
  z-index: -1;
}

.hero-content {
  max-width: 800px;
  padding: 0 20px;
  /* fade in animation */
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 1s ease forwards 0.5s;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  line-height: 1.1;
}

.hero p {
  font-size: 1.25rem;
  color: var(--color-text-muted);
  margin-bottom: 2rem;
}

/* Trust Indicators / Carousel */
.trust-bar {
  padding: 2rem 0;
  background-color: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  overflow: hidden;
}

.trust-content {
  display: none;
}

.logo-slider {
  overflow: hidden;
  position: relative;
  width: 100%;
}

.logo-slider:before,
.logo-slider:after {
  position: absolute;
  top: 0;
  width: 100px;
  height: 100%;
  content: "";
  z-index: 2;
  pointer-events: none;
}

.logo-slider:before {
  left: 0;
  background: linear-gradient(to right, white, transparent);
}

.logo-slider:after {
  right: 0;
  background: linear-gradient(to left, white, transparent);
}

.logo-track {
  display: flex;
  align-items: center;
  width: max-content;
  /* Force track to accommodate all items on one line */
  gap: 4rem;
  /* Consistent spacing */
  animation: scroll 60s linear infinite;
  /* Slower, smoother scroll */
  padding: 0 2rem;
  /* Initial padding */
}

.logo-track:hover {
  animation-play-state: paused;
}

.partner-logo {
  height: 60px;
  /* specific height */
  width: auto;
  object-fit: contain;
  /* Full color original */
  filter: none;
  opacity: 1;
  transition: transform 0.3s ease;
  flex-shrink: 0;
  /* Prevent logos from squishing */
}

.partner-logo:hover {
  transform: scale(1.1);
}

@keyframes scroll {
  from {
    transform: translateX(0);
  }

  to {
    /* Move half the width (since we duplicated the logos) */
    transform: translateX(-50%);
  }
}

/* Services Grid - Symmetric for 5 items */
.services-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin-top: 3rem;
}

.services-grid .card {
  flex: 1 1 300px;
  /* Grow, shrink, basis */
  max-width: 350px;
  min-height: 280px;
  /* Force symmetry */
  display: flex;
  flex-direction: column;
  background: rgba(15, 23, 42, 0.6);
  /* Dark semi-transparent slate */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

.services-grid .card h3 {
  color: #f1f5f9;
  margin-bottom: 0.5rem;
}

.services-grid .card p {
  color: #94a3b8;
}

.services-grid .card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
  border-color: var(--color-accent);
  background: rgba(15, 23, 42, 0.85);
}

/* Dynamic background shape on hover */
.services-grid .card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.05), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.services-grid .card:hover::before {
  opacity: 1;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 4rem;
  align-items: center;
}

/* Cards */
.card {
  background-color: var(--color-bg-card);
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid var(--color-border);
  transition: transform 0.3s ease, border-color 0.3s ease;
  height: 100%;
}

.card:hover {
  transform: translateY(-5px);
  border-color: var(--color-accent);
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.1);
}

.card-icon {
  width: 50px;
  height: 50px;
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--color-primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

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

.card p {
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

/* Sections */
section {
  padding: 5rem 0;
}

/* Reusable Background Pattern (Dots/Grid) */
.bg-check {
  background-color: transparent;
  /* Ensure base color is dark if needed, or transparent if overlaying */
  background-image: radial-gradient(#334155 1px, transparent 1px);
  background-size: 40px 40px;
  position: relative;
}

/* New Dark Section Background for "Why Us" */
.bg-dark-alt {
  background: linear-gradient(to bottom right, #0f172a, #1e293b);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

/* Floating WhatsApp Button */
.whatsapp-float {
  position: fixed;
  bottom: 40px;
  right: 40px;
  background-color: #25d366;
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  text-align: center;
  font-size: 30px;
  box-shadow: 2px 2px 3px #999;
  z-index: 1001;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  animation: pulse-green 2s infinite;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  background-color: #1fe05b;
}

@keyframes pulse-green {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
  }

  70% {
    box-shadow: 0 0 0 10px rgba(37, 211, 102, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

/* Footer */
footer {
  background-color: #0a0a0a;
  /* Slightly darker than card */
  padding: 4rem 0 2rem;
  border-top: 1px solid var(--color-border);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-col h4 {
  color: #fff;
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

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

.footer-col ul li a {
  color: var(--color-text-muted);
}

.footer-col ul li a:hover {
  color: var(--color-primary);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

/* Animations */
@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.5rem;
  }

  .mobile-menu-btn {
    display: block;
    z-index: 1002;
    position: fixed !important;
    /* Fixed relative to viewport/header */
    left: 20px !important;
    top: 20px !important;
    /* Approx half of header height typically, adjust if needed */
    /* If header height is var(--header-height), let's calculate center or use fixed header logic */
    top: calc(var(--header-height) / 2) !important;
    transform: translateY(-50%) !important;
    margin: 0 !important;
    right: auto !important;
  }

  /* Center the logo absolutely in mobile */
  .logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    width: auto;
    display: flex;
    justify-content: center;
  }

  .logo img {
    height: 40px !important;
    width: auto !important;
    max-width: none;
  }

  header .container nav {
    position: static;
    justify-content: center;
  }

  header .container {
    padding: 0 15px;
    position: static;
  }

  .nav-links {
    /* Fixed Sidebar Styles */
    display: flex;
    /* Always display for transition logic, we use transform to hide */
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background: rgba(10, 10, 10, 0.95);
    /* More opaque for better readability */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    flex-direction: column;
    padding: 6rem 2rem 2rem 2rem;
    /* Initial padding top to clear header */
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1001;
    /* Above header (1000) so it feels like a drawer, but below hamburger */
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
    align-items: flex-start;
    /* Align links to left */
  }

  .nav-links.active {
    transform: translateX(0);
  }

  /* Adjust links inside sidebar */
  .nav-links a {
    font-size: 1.2rem;
    width: 100%;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .nav-links .btn {
    margin-top: 1rem;
    width: 100%;
    text-align: center;
  }

  .grid-2 {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  /* Footer adjustments for mobile */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

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

  .footer-col .logo {
    justify-content: center;
    margin-bottom: 4rem !important;
    /* Increased spacing */
    display: block !important;
  }

  .footer-col p {
    margin-top: 3rem !important;
    /* Much more spacing from logo */
    padding: 0 1rem;
    clear: both;
    /* Ensure it doesn't float beside logo */
  }
}

/* Projects / Portfolio Page */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
  padding: 2rem 0;
}

.project-card {
  position: relative;
  background-color: var(--color-bg-card);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  transition: all 0.3s ease;
  aspect-ratio: 4 / 3;
  cursor: pointer;
  display: block;
}

.project-card:hover {
  transform: translateY(-5px);
  border-color: var(--color-accent);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.project-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.project-card:hover .project-image {
  transform: scale(1.1);
}

.project-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 2rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
  z-index: 1;
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.3s ease;
}

.project-card:hover .project-overlay {
  transform: translateY(0);
  opacity: 1;
}

.project-category {
  display: inline-block;
  padding: 4px 12px;
  background-color: var(--color-accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 20px;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.project-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.25rem;
}

.project-location {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}