:root {
  /* Colors */
  --bg-dark: #0b0b0b;
  --bg-card: #141414;
  --text-main: #e0e0e0;
  --text-muted: #888888;
  --accent: #FFD700;
  /* Gold/Amber */
  --accent-dim: rgba(255, 215, 0, 0.1);
  --border-light: rgba(255, 255, 255, 0.08);

  /* Typography */
  --font-heading: 'inter', sans-serif;
  /* Fallback to lowercase locally if needed, usually 'Inter' */
  --font-body: 'inter', sans-serif;

  /* Spacing */
  --container-width: 1400px;
  --section-padding: 120px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  margin-bottom: 0;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-body);
  overflow-x: hidden;
  width: 100%;
  -webkit-font-smoothing: antialiased;
  margin-bottom: 0;
}

a {
  text-decoration: none;
  color: inherit;
  transition: 0.3s;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

/* Override for logo images - prevent them from expanding to full width */
.logo img,
.mobile-logo img,
.footer-logo img {
  height: 45px !important;
  max-height: 45px !important;
  width: auto !important;
  max-width: 120px !important;
  object-fit: contain;
  display: inline-block;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
}

/* --- UTILITIES --- */


.reveal-text {
  opacity: 0;
  transform: translateY(30px);
  transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-text.visible {
  opacity: 1;
  transform: translateY(0);
}

.section-heading {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 2rem;
  letter-spacing: -0.02em;
}

.text-accent {
  color: var(--accent);
}

/* --- LOADER --- */
#loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-dark);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.loader-line {
  width: 0;
  height: 2px;
  background: var(--accent);
  margin-top: 20px;
  animation: loadLine 2s ease-in-out forwards;
}

@keyframes loadLine {
  0% {
    width: 0;
  }

  100% {
    width: 200px;
  }
}

.fade-out {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

/* --- HEADER --- */
header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  padding: 24px 0;
  transition: 0.4s ease;
}

header.scrolled {
  background: rgba(11, 11, 11, 0.9);
  backdrop-filter: blur(10px);
  padding: 16px 0;
  border-bottom: 1px solid var(--border-light);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.05em;
  color: #fff;
  z-index: 101;
}

.nav-links {
  display: flex;
  gap: 40px;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  position: relative;
  opacity: 0.8;
}

.nav-links a:hover {
  opacity: 1;
  color: var(--accent);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.nav-links a:hover::after {
  width: 100%;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  z-index: 102;
}

.hamburger span {
  width: 24px;
  height: 2px;
  background: #fff;
  transition: 0.3s;
}

/* --- HERO --- */
.hero {
  height: 100vh;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('../assets/images/main hero image.jpeg');
  background-size: cover;
  background-position: center;
  z-index: -1;
  transform: scale(1.1);
  /* Parallax handled in JS or simple CSS scale */
  transition: transform 0.2s linear;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(11, 11, 11, 1));
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 100%;
}

.hero h1 {
  font-size: clamp(3rem, 6vw, 6rem);
  font-weight: 800;
  line-height: 1.05;
  margin-bottom: 24px;
  letter-spacing: -0.03em;
}

.hero p {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  color: #ccc;
  margin-bottom: 40px;
  max-width: 600px;
  line-height: 1.6;
}

.btn-group {
  display: flex;
  gap: 20px;
}

.btn {
  padding: 16px 32px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--accent);
  color: #000;
}

.btn-primary:hover {
  background: #fff;
  transform: translateY(-2px);
}

.btn-outline {
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  background: transparent;
}

.btn-outline:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

/* --- INTRO --- */
.intro-section {
  padding: var(--section-padding) 0;
  position: relative;
}

/* --- PARTNERS SCROLL --- */
.partners-section {
  padding: 60px 0;
  background: #0f0f0f;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  overflow: hidden;
}

.partners-wrapper {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.scrolling-track {
  display: flex;
  width: 100%;
  overflow: hidden;
  position: relative;
}

.slide-group {
  display: flex;
  align-items: center;
  gap: 60px;
  /* Space between logos */
  padding-right: 60px;
  flex-shrink: 0;
  /* Prevent shrinking */
}

/* Left to Right (Reverse of usual marquee which is R->L, wait. 
   User asked: "one form left to right, another one right to left" 
*/

/* Line 1: Left -> Right */
.scroll-left .slide-group {
  animation: scrollLeftToRight 40s linear infinite;
}

/* Line 2: Right -> Left */
.scroll-right .slide-group {
  animation: scrollRightToLeft 40s linear infinite;
}

.scrolling-track:hover .slide-group {
  animation-play-state: paused;
}

/* Logo Item Wrapper */
.logo-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-width: 140px;
  transition: all 0.3s ease;
}

.logo-item img {
  height: 60px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
  filter: grayscale(100%) brightness(0.8);
  transition: 0.3s;
  opacity: 0.7;
}

.logo-item p {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  margin: 0;
  font-weight: 500;
  transition: 0.3s;
  white-space: nowrap;
}

.logo-item:hover img {
  filter: grayscale(0%) brightness(1);
  opacity: 1;
  transform: scale(1.1);
}

.logo-item:hover p {
  color: var(--accent);
}

/* Legacy support for direct img children */
.slide-group img:not(.logo-item img) {
  height: 60px;
  width: auto;
  object-fit: contain;
  filter: grayscale(100%) brightness(0.8);
  transition: 0.3s;
  opacity: 0.7;
}

.slide-group img:not(.logo-item img):hover {
  filter: grayscale(0%) brightness(1);
  opacity: 1;
  transform: scale(1.1);
}

@keyframes scrollRightToLeft {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-100%);
  }
}

@keyframes scrollLeftToRight {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(0);
  }
}

.intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.intro-text h2 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  font-weight: 700;
}

.intro-text p {
  color: var(--text-muted);
  line-height: 1.8;
  font-size: 1.1rem;
  margin-bottom: 20px;
}

.intro-image {
  position: relative;
  height: 500px;
  background: #222;
  /* Fallback */
  overflow: hidden;
  border-radius: 4px;
}

.intro-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1s ease;
}

.intro-image:hover img {
  transform: scale(1.05);
}


/* ===========================
   SECTION STYLING
=========================== */
.product-partners {
  background: #0b0b0b;
  padding: 80px 5%;
}

/* GRID */
.partners-grid {
  max-width: 900px;
  margin: auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

/* FORCE 4 PER ROW */
.partner-wrapper {
  flex: 0 0 25%;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 50px;
}

/* LOGO BOX */
.partner-item {
  width: 180px;
  height: 110px;
  background: #111;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: .4s ease;
}

.partner-item img {
  max-width: 120px;
  max-height: 60px;
  object-fit: contain;
  filter: grayscale(100%);
  transition: .4s ease;
}

/* NAME BELOW BOX */
.partner-name {
  margin-top: 12px;
  font-size: 14px;
  color: #cfcfcf;
  text-align: center;
}

/* HOVER */
.partner-wrapper:hover .partner-item {
  transform: translateY(-6px);
  background: #1a1a1a;
}

.partner-wrapper:hover img {
  filter: grayscale(0%);
  transform: scale(1.05);
}

.partner-wrapper:hover .partner-name {
  color: #fff;
}

/* MOBILE */
@media(max-width:768px) {
  .partner-wrapper {
    flex: 0 0 50%;
  }
}



/* --- PROCESS --- */
.process-section {
  padding: var(--section-padding) 0;
  background: #0f0f0f;
  overflow: hidden;
  /* For horizontal scroll simulation */
}

.process-heading {
  text-align: center;
  margin-bottom: 80px;
}

.process-steps {
  display: flex;
  gap: 40px;
  overflow-x: auto;
  padding-bottom: 40px;
  scrollbar-width: none;
  /* Hide scrollbar Firefox */
}

.process-steps::-webkit-scrollbar {
  display: none;
}

.step-card {
  min-width: 300px;
  padding: 40px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  position: relative;
  transition: 0.3s;
}

.step-card:hover {
  border-color: var(--accent);
  transform: translateY(-10px);
}

.step-num {
  font-size: 3rem;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.05);
  position: absolute;
  top: 20px;
  right: 20px;
}

.step-icon {
  font-size: 2rem;
  color: var(--accent);
  margin-bottom: 20px;
}

.step-card h3 {
  margin-bottom: 15px;
  font-size: 1.3rem;
}

.step-card p {
  color: var(--text-muted);
  line-height: 1.6;
}

/* --- SERVICES --- */
.services-section {
  padding: var(--section-padding) 0;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
}

.service-item {
  padding: 50px 40px;
  background: var(--bg-card);
  border-left: 1px solid transparent;
  transition: 0.4s;
}

.service-item:hover {
  border-left: 2px solid var(--accent);
  background: linear-gradient(90deg, #1a1a1a 0%, #141414 100%);
}

.service-item h3 {
  font-size: 1.5rem;
  margin-bottom: 15px;
}

.service-item p {
  color: var(--text-muted);
  line-height: 1.7;
}

/* --- PROJECTS --- */
.projects-section {
  padding: var(--section-padding) 0;
}

.project-row {
  display: flex;
  /* Changed from grid to flex for alternating layout */
  min-height: 500px;
  margin-bottom: 60px;
}

.project-row:nth-child(even) {
  flex-direction: row-reverse;
}

.project-img {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.project-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease;
}

.project-row:hover .project-img img {
  transform: scale(1.05);
}

.project-info {
  flex: 1;
  background: #111;
  padding: 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1px solid var(--border-light);
}

.project-cat {
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 16px;
}

.project-info h3 {
  font-size: 2.2rem;
  margin-bottom: 20px;
}

.project-info p {
  color: var(--text-muted);
  margin-bottom: 30px;
  max-width: 400px;
}

.view-case {
  font-weight: 600;
  border-bottom: 1px solid var(--accent);
  display: inline-block;
  padding-bottom: 5px;
}

/* --- TRUST/STATS --- */
.stats-section {
  padding: 80px 0;
  background: #181818;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  text-align: center;
}

.stat-num {
  font-size: 3.5rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 10px;
  display: block;
}

.stat-label {
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}

/* --- CTA --- */
.cta-section {
  padding: 160px 0;
  text-align: center;
  background: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8)), url('../assets/images/solution_1.jpg');
  background-size: cover;
  background-attachment: fixed;
  position: relative;
}

.cta-content h2 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: 30px;
}

/* --- INSTAGRAM SECTION --- */
.instagram-section {
  padding: 100px 0;
  background: #111;
  border-bottom: 1px solid var(--border-light);
}

.instagram-layout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.instagram-left {
  flex: 1;
  text-align: left;
}

.instagram-right {
  flex: 1;
  display: flex;
  justify-content: center;
}

.instagram-header {
  text-align: left;
  margin-bottom: 30px;
}

@media (max-width: 900px) {
  .instagram-layout {
    flex-direction: column;
    text-align: center;
  }

  .instagram-left {
    text-align: center;
    margin-bottom: 40px;
  }

  .instagram-header {
    text-align: center;
    margin-bottom: 20px;
  }
}

.insta-icon {
  margin-bottom: 20px;
  color: var(--accent);
}

.instagram-header h2 {
  font-size: 2rem;
  margin-bottom: 10px;
}

.instagram-header p {
  color: var(--text-muted);
}

.instagram-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  margin-bottom: 50px;
}

.insta-item {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  display: block;
}

.insta-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.insta-item:hover img {
  transform: scale(1.1);
}

.insta-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: 0.3s;
}

.insta-item:hover .insta-overlay {
  opacity: 1;
}

.insta-overlay span {
  color: #fff;
  font-weight: 600;
  border: 1px solid #fff;
  padding: 8px 16px;
  font-size: 0.9rem;
}

.instagram-footer {
  text-align: center;
}

/* --- FOOTER --- */
.footer {
  padding: 100px 0 40px;
  background: #050505;
  font-size: 0.9rem;
  color: #777;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 60px;
  margin-bottom: 80px;
}

.footer h4 {
  color: #fff;
  margin-bottom: 24px;
  font-size: 1.1rem;
}

.footer a {
  display: block;
  margin-bottom: 12px;
}

.footer a:hover {
  color: #fff;
}

.copyright {
  border-top: 1px solid #1a1a1a;
  padding-top: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

/* --- MOBILE MENU (SIDE DRAWER) --- */
.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: 0.3s ease;
  backdrop-filter: blur(2px);
}

.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-menu-content {
  position: fixed;
  top: 0;
  right: 0;
  width: 75%;
  max-width: 400px;
  height: 100%;
  background: #1a1a1a;
  padding: 30px;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  z-index: 9999;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
}

.mobile-menu-overlay.active .mobile-menu-content {
  transform: translateX(0);
}

.mobile-menu-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 60px;
}

.mobile-logo {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.05em;
  color: #fff;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 20px;
  text-align: left;
  width: 100%;
}

.mobile-nav a {
  font-size: 1.1rem;
  font-weight: 500;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 15px;
  opacity: 0;
  transform: translateX(20px);
  transition: 0.3s;
  width: 100%;
  display: block;
}

/* Stagger Animation */
.mobile-menu-overlay.active .mobile-nav a {
  animation: revealItem 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.mobile-menu-overlay.active .mobile-nav a:nth-child(1) {
  animation-delay: 0.1s;
}

.mobile-menu-overlay.active .mobile-nav a:nth-child(2) {
  animation-delay: 0.15s;
}

.mobile-menu-overlay.active .mobile-nav a:nth-child(3) {
  animation-delay: 0.2s;
}

.mobile-menu-overlay.active .mobile-nav a:nth-child(4) {
  animation-delay: 0.25s;
}

.mobile-menu-overlay.active .mobile-nav a:nth-child(5) {
  animation-delay: 0.3s;
}

.mobile-menu-overlay.active .mobile-nav a:nth-child(6) {
  animation-delay: 0.35s;
}

@keyframes revealItem {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.close-menu {
  position: static;
  /* Reset absolute positioning */
  background: none;
  border: none;
  color: #fff;
  font-size: 1.8rem;
  cursor: pointer;
  padding: 0;
  margin: 0;
}

.mobile-menu-footer {
  margin-top: auto;
  width: 100%;
}

/* --- RESPONSIVE FIXES --- */
@media (max-width: 900px) {
  .nav-links {
    display: none;
  }

  .hamburger {
    display: flex;
  }



  /* Glass Header Mobile */
  header {
    background: rgba(11, 11, 11, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 16px 0;
  }

  /* FORCE LOGO SIZE ON MOBILE */
  header .logo img {
    height: 35px !important;
    width: auto !important;
    max-width: 120px;
  }

  /* Reduce Section Padding Globally for Mobile */
  :root {
    --section-padding: 60px;
  }

  .hero h1 {
    font-size: clamp(2.5rem, 8vw, 3.5rem);
    /* Smaller min and max for mobile */
    line-height: 1.1;
  }

  .intro-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .intro-image {
    height: 300px;
  }

  /* Fix 1: Project Cards Vertical Spacing */
  .project-row,
  .project-row:nth-child(even) {
    flex-direction: column;
    margin-bottom: 64px;
    /* Fix: Increased Margin */
  }

  .project-img {
    height: 300px;
  }

  .project-info {
    padding: 40px 30px;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }

  /* Fix 2: Process Carousel Peek */
  .process-steps {
    padding-right: 40px;
    /* Peek effect space */
  }

  .step-card {
    min-width: 85vw;
    /* Fix: Proportional Width */
    margin-right: 20px;
    /* Space between cards */
  }

  /* Simplified Mobile Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  /* Hide Quick Links (Col 2) and Connect Links (Col 3) on mobile */
  .footer-grid>div:nth-child(2),
  .footer-grid>div:nth-child(3) {
    display: none;
  }

  .footer p {
    max-width: 100%;
    margin: 0 auto 20px auto;
  }

  /* Fix 3: Footer Link Spacing (if links exist in visible cols) */
  .footer li,
  .footer .footer-grid a {
    margin-bottom: 16px;
    /* Fix: Improved tap target */
    display: block;
  }

  .copyright {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }

  .hero h1 {
    font-size: 2.5rem;
    word-break: break-word;
  }

  /* Hamburger Animation */
  .hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
  }

  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
  }
}