:root {
  --primary-color: #2476da; /* A professional blue */
  --secondary-color: #dfd42e; /* A yellow accent */
  --dark-color: #222;
  --light-color: #f4f4f4;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}

body,
html {
  font-family: "Poppins", sans-serif;
  line-height: 1.6;
  /* New animated gradient background */
  background: linear-gradient(
    135deg,
    var(--primary-color),
    #0f3460,
    #16213e,
    var(--secondary-color)
  );
  background-size: 400% 400%;
  animation: gradientAnimation 20s ease infinite;
  color: #fff; /* Default text is now white */
}

@keyframes gradientAnimation {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* --- NEW: Preloader Styles --- */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #111; /* Dark background to match the theme */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.75s ease, visibility 0.75s ease;
}

.preloader.loaded {
  opacity: 0;
  visibility: hidden;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--secondary-color); /* Use accent color */
  border-radius: 50%;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
/* --- End of Preloader Styles --- */

h1,
h2,
h3 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h2 {
  font-size: 2.5rem;
  text-align: center;
}

section {
  padding: 5rem 2rem;
  position: relative; /* Needed for any potential pseudo-elements */
}

/* --- Header & Navigation --- */
header {
  background: transparent;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  transition: background-color 0.4s ease, backdrop-filter 0.4s ease,
    box-shadow 0.4s ease;
}

header.scrolled {
  background: rgba(22, 33, 62, 0.85); /* A dark blue from your gradient */
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.logo img {
  max-height: 50px;
  width: auto;
  object-fit: contain;
  transition: transform 0.3s ease-in-out;
}

.logo img:hover {
  transform: scale(1.05);
}

nav ul.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;

  margin: 0;
  padding: 0;
}

nav ul.nav-links li {
  position: relative;
}

nav a {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  text-transform: uppercase;
  transition: color 0.3s;
  padding-bottom: 6px;
}

header.scrolled nav a {
  color: #fff;
}

nav a:hover {
  color: var(--secondary-color);
}

nav ul.nav-links a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: var(--secondary-color);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.4s ease;
}

nav ul.nav-links a.active::after,
nav ul.nav-links a:hover::after {
  transform: scaleX(1);
}

header.scrolled nav ul.nav-links a.active,
header.scrolled nav a:hover {
  color: var(--secondary-color);
}

.hamburger {
  display: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
}

header.scrolled .hamburger {
  color: #fff;
}

/* --- Hero Section --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
  text-align: center;
  padding: 80px 1rem 1rem 1rem;
  overflow: hidden;
}

.video-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.video-background video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  z-index: -1;
}

.hero-content {
  max-width: 800px;
  z-index: 2;
}

.hero-content h1 {
  font-size: 3.5rem;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
  opacity: 0;
  animation: fadeUpAndIn 0.8s ease-out 0.5s forwards;
}

.hero-content p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
  opacity: 0;
  animation: fadeUpAndIn 0.8s ease-out 1s forwards;
}

/* --- Animation Keyframes --- */
@keyframes fadeUpAndIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Glow Button Styles --- */
.glow-on-hover {
  width: 140px;
  height: 50px;
  border: none;
  outline: none;
  color: #fff;
  background: #111;
  cursor: pointer;
  position: relative;
  letter-spacing: 0.15rem;
  z-index: 0;
  border-radius: 10px;
  font-weight: bold;
  opacity: 0;
  animation: fadeUpAndIn 0.8s ease-out 1.5s forwards;
}

.glow-on-hover:before {
  content: "";
  background: linear-gradient(
    45deg,
    var(--primary-color),
    var(--secondary-color),
    var(--primary-color),
    var(--secondary-color),
    var(--primary-color),
    var(--secondary-color)
  );
  position: absolute;
  top: -2px;
  left: -2px;
  background-size: 400%;
  z-index: -1;
  filter: blur(5px);
  width: calc(100% + 4px);
  height: calc(100% + 4px);
  animation: glowing 20s linear infinite;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  border-radius: 10px;
}

.glow-on-hover:hover:before {
  opacity: 1;
}

.glow-on-hover:after {
  z-index: -1;
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  background: #111;
  left: 0;
  top: 0;
  border-radius: 10px;
}

@keyframes glowing {
  0% {
    background-position: 0 0;
  }
  50% {
    background-position: 400% 0;
  }
  100% {
    background-position: 0 0;
  }
}

/* --- Clients Section --- */
#clients {
  padding: 4rem 0;
}

.client-scroller {
  max-width: 1200px;
  margin: 0 auto;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(
    to right,
    transparent,
    black 20%,
    black 80%,
    transparent
  );
  mask-image: linear-gradient(
    to right,
    transparent,
    black 20%,
    black 80%,
    transparent
  );
}

.client-logos-track {
  display: flex;
  gap: 3rem;
  width: fit-content;
  animation: scroll 30s linear infinite;
}

.client-scroller:hover .client-logos-track {
  animation-play-state: paused;
}

.client-logos-track img {
  height: 80px;
  max-width: none;
  opacity: 0.7;
  transition: opacity 0.3s;
}

.client-logos-track img:hover {
  opacity: 1;
}

@keyframes scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(calc(-1 * ((150px * 5) + (3rem * 5))));
  }
}

/* --- Services Section --- */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.service-card {
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  padding-bottom: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  border-radius: 15px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  text-align: left;
  transition: transform 0.3s, box-shadow 0.3s;
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.service-card img {
  width: 100%;
  border-top-left-radius: 15px;
  border-top-right-radius: 15px;
  height: 240px;
  object-fit: cover;
}

.service-card h3,
.service-card p {
  padding: 0 1.5rem;
}

.service-card h3 {
  margin-top: 1.5rem;
}

.service-card p {
  flex-grow: 1;
}

.service-card .container {
  padding: 1.5rem;
}

.container .button {
  display: block;
  width: 100%;
  padding: 0.7rem;
  color: #fff;
  text-transform: uppercase;
  font-size: 1rem;
  text-decoration: none;
  letter-spacing: 0.15rem;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
  z-index: 1;
  text-align: center;
  box-sizing: border-box;
  border-radius: 10px;
}
.container .button::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.2);
  z-index: -2;
}
.container .button::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 100%;
  background-color: var(--secondary-color);
  transition: all 0.3s;
  z-index: -1;
}
.container .button:hover::before {
  width: 100%;
}

/* --- Why Choose Us Section --- */
#why-choose-us {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 0;
  min-height: 400px;
}

.why-us-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.why-us-content {
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  padding: 4rem;
}
.why-us-content h2 {
  text-align: left;
}
.why-us-content ul {
  list-style: none;
  margin-top: 1.5rem;
}
.why-us-content li {
  margin-bottom: 1rem;
}
.why-us-content i {
  color: var(--secondary-color);
  margin-right: 0.5rem;
}

/* --- Testimonials Section --- */
.section__container {
  width: 100%;
  max-width: 1200px;
  margin: auto;
  padding: 1rem;
  text-align: center;
}

.testimonials .header {
  margin-bottom: 2rem;
}
.testimonials .header h2 {
  color: #fff;
}

.testimonials__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 2rem;
}

.card {
  padding: 2rem;
  display: grid;
  gap: 1rem;
  background-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  border-radius: 15px;
  box-shadow: 5px 5px 30px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: transform 0.3s ease;
}
.card:hover {
  transform: translateY(-5px);
}
.card i {
  font-size: 2.5rem;
  color: gold;
}
.card hr {
  width: 40px;
  margin: auto;
  border: 1px solid rgba(255, 255, 255, 0.3);
}
.card img {
  width: 60px;
  height: 60px;
  margin: auto;
  border-radius: 50%;
  border: 2px solid var(--primary-color);
}
.card .name {
  font-weight: 600;
  color: #fff;
}

/* --- Footer --- */
footer {
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  color: #fff;
  padding: 4rem 2rem 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}
.footer-col h3 {
  margin-bottom: 1.5rem;
}
.footer-col.logo {
  color: #fff;
}
.footer-col ul {
  list-style: none;
}
.footer-col a {
  color: #ccc;
  text-decoration: none;
  transition: color 0.3s;
}
.footer-col a:hover {
  color: var(--secondary-color);
}
.footer-col li,
.footer-col p {
  margin-bottom: 0.8rem;
}
.footer-col i {
  margin-right: 0.5rem;
}
.social-icons a {
  color: #fff;
  font-size: 1.2rem;
  margin-right: 1rem;
}
.footer-bottom {
  text-align: center;
  padding: 1.5rem 0;
  margin-top: 2rem;
  border-top: 1px solid #444;
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
  h2 {
    font-size: 2rem;
  }
  .hero-content h1 {
    font-size: 2.5rem;
  }
  nav ul.nav-links {
    position: fixed;
    top: 88px;
    right: -100%;
    width: 100%;
    height: auto;
    background-color: rgba(22, 33, 62, 0.95); /* Dark blue, semi-transparent */
    backdrop-filter: blur(10px);
    font-weight: bold;
    flex-direction: column;
    align-items: center;
    padding: 2rem 0;
    transition: right 0.3s ease-in-out;
  }
  nav ul.nav-links.active {
    right: 0;
  }
  nav ul.nav-links li {
    margin-bottom: 1rem;
  }
  header nav ul.nav-links a {
    color: #fff;
  }

  .hamburger {
    display: block;
  }
  #why-choose-us {
    grid-template-columns: 1fr;
  }
  .testimonials__grid {
    grid-template-columns: 1fr;
  }
}

