/* ==============================================
   CSS Variables (Root Colors)
   ============================================== */
:root {
  --color-bg-dark: #111827;
  --color-bg-darker: #000000;
  --color-bg-gray-dark: #1f2937;
  --color-bg-gray-medium: #374151;
  --color-bg-soft-blue-gray: #32475c;

  --color-text-light: #e5e7eb;
  --color-text-lighter-gray: #d1d5db;
  --color-text-orange-light: #fbbf24;
  --color-text-white: #ffffff;
  --color-text-dark: #111827;

  --color-accent-orange: #f97316;
  --color-accent-orange-light: #fb923c;
  --color-accent-orange-strong: #ea580c;

  --shadow-orange-light: rgba(249, 115, 22, 0.7);
  --shadow-orange-strong: rgba(251, 146, 60, 0.9);

  --aurora-orange: rgba(249, 115, 22, 0.6);
  --aurora-purple: rgba(139, 92, 246, 0.4);
  --aurora-blue: rgba(59, 130, 246, 0.3);
}

/* ==============================================
   Global Styles
   ============================================== */
html {
  scroll-behavior: smooth;
  box-sizing: border-box;
}

*, *::before, *::after {
  box-sizing: inherit;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--color-bg-dark);
  color: var(--color-text-light);
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
}

/* ==============================================
   Background Layers
   ============================================== */
#tsparticles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.aurora-gradient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
  background:
    radial-gradient(circle at 30% 50%, var(--aurora-orange), transparent 60%),
    radial-gradient(circle at 70% 50%, var(--aurora-purple), transparent 60%),
    radial-gradient(circle at 50% 75%, var(--aurora-blue), transparent 60%);
  animation: auroraMove 1s ease-in-out infinite;
  mix-blend-mode: screen;
}

@keyframes auroraMove {
  0%, 100% {
    background-position: 30% 50%, 70% 50%, 50% 75%;
  }
  50% {
    background-position: 40% 60%, 60% 45%, 55% 80%;
  }
}

/* ==============================================
   Hero Section
   ============================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 2rem 1.5rem;
  z-index: 1;
}

.hero-content {
  position: relative;
  max-width: 720px;
  z-index: 2;
}

.hero-content h1 {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: var(--color-accent-orange);
  text-shadow: 0 0 6px var(--aurora-orange);
}

.hero-content p {
  font-size: 1.25rem;
  margin-bottom: 1.75rem;
  color: var(--color-text-lighter-gray);
}

.hero-content a {
  background-color: var(--color-accent-orange);
  color: var(--color-text-dark);
  font-weight: 700;
  padding: 0.75rem 2.25rem;
  border-radius: 9999px;
  text-decoration: none;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 0 10px var(--shadow-orange-light);
  display: inline-block;
}

.hero-content a:hover,
.hero-content a:focus {
  background-color: var(--color-accent-orange-light);
  box-shadow: 0 0 15px var(--shadow-orange-strong);
  outline: none;
}

/* ==============================================
   Services Section
   ============================================== */
.services-section {
  padding: 5rem 1.5rem;
  background-color: var(--color-bg-dark);
  text-align: center;
  z-index: 2;
  position: relative;
}

.services-section h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 2.5rem;
  color: var(--color-accent-orange);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}

.service-card {
  background-color: var(--color-bg-gray-medium);
  padding: 1.5rem;
  border-radius: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  margin-bottom: 2rem;
  color: var(--color-text-orange-light);
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
}

.service-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.service-card p {
  color: var(--color-text-lighter-gray);
}

/* Testimonials Section */
#testimonials {
  background-color: var(--color-bg-soft-blue-gray);
  opacity: 80%;
  padding: 4rem 2rem;
  text-align: center;
  position: relative;
  min-height: 180px; /* increase if needed */
  max-width: 80vw;
  margin-left: auto;
  margin-right: auto;
}

.testimonials-container {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  min-height: 100px;        /* ensures container always has some height */
}

.testimonial {
  position: absolute;       /* stack them */
  top: 50%;                 /* center vertically in container */
  left: 50%;                /* center horizontally if needed */
  transform: translate(-50%, -50%);
  width: 100%;
  max-width: 700px;         /* limit text width */
  opacity: 0;
  transition: opacity 2s ease-in-out;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 1rem;
  box-sizing: border-box;
}

.testimonial.active {
  opacity: 1;
  z-index: 2;               /* bring active testimonial on top */
}

.testimonial p {
  font-size: 1.25rem;
  font-style: italic;
  margin-bottom: 1rem;
  color: var(--color-text-light);
}

.testimonial h4 {
  font-weight: bold;
  font-size: 1rem;
  color: var(--color-accent-orange);
  margin-top: 0.5rem;
}

@media (max-width: 768px) {
  /* Section sizing stays reasonable on phones */
  #testimonials {
    padding: 3rem 1rem;     /* a little tighter on the sides */
    min-height: 230px;      /* slightly taller than desktop */
  }

  /* Center the active testimonial without changing widths */
  .testimonials-container {
    display: flex;
    justify-content: center;  /* vertical centering */
    align-items: center;       /* horizontal centering */
    min-height: 253px;
    position: relative;        /* keep stacking context for non-actives */
  }

  /* Leave non-active testimonials as-is (absolute + opacity 0) */
  /* Only override the active one so it participates in flex centering */
  .testimonial.active {
    position: static;          /* no absolute on mobile for the visible one */
    transform: none;           /* remove translate */
    top: auto;
    left: auto;
  }

  /* Typography tweaks only (no width changes) */
  .testimonial {
    font-size: 1.1rem;
    line-height: 1.5;
  }

  .testimonial p {
    font-size: 1.1rem;
  }

  .testimonial h4 {
    font-size: 0.95rem;
  }
}

/* ==============================================
   Contact Section
   ============================================== */
#contact {
  background-color: var(--color-accent-orange-strong);
  color: var(--color-text-white);
  padding: 5rem 1.5rem;
  text-align: center;
  z-index: 2;
  position: relative;
}

#contact h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

#contact p {
  margin-bottom: 1.5rem;
}

#contact a {
  background-color: var(--color-bg-dark);
  color: var(--color-accent-orange);
  font-weight: 700;
  padding: 0.75rem 2.25rem;
  border-radius: 9999px;
  text-decoration: none;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 0 10px var(--shadow-orange-light);
  display: inline-block;
}

#contact a:hover,
#contact a:focus {
  background-color: var(--color-bg-gray-dark);
  box-shadow: 0 0 15px var(--shadow-orange-strong);
  outline: none;
}

/* ==============================================
   Footer
   ============================================== */
footer {
  background-color: var(--color-bg-darker);
  color: var(--color-text-white);
  padding: 1.5rem;
  text-align: center;
  font-size: 0.875rem;
  z-index: 2;
  position: relative;
}

/* Layout Container */
.container {
  width: 100%;
  max-width: 80vw;
  margin-left: auto;
  margin-right: auto;
  padding-left: 2rem;
  padding-right: 2rem;
}

.logo-img {
  height: 50px;          
  width: auto;           
  display: inline-block; 
  margin: 0;
}

/* Responsive padding for smaller screens */
@media (max-width: 768px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* Navbar base */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: rgba(17, 24, 39, 0.7); /* semi-transparent dark */
  backdrop-filter: saturate(180%) blur(10px);
  box-shadow: 0 2px 12px rgb(0 0 0 / 0.7);
  z-index: 20;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* Change navbar background on scroll */
.navbar.scrolled {
  background-color: rgba(17, 24, 39, 0.95);
  box-shadow: 0 2px 18px rgb(0 0 0 / 0.85);
}

/* Container inside navbar */
.navbar-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.navbar .logo {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--color-accent-orange);
  font-weight: 700;
  font-size: 1.5rem;
  text-decoration: none;
  letter-spacing: 1.1px;
  user-select: none;
}

/* Nav links */
.nav-links {
  display: flex;
  list-style: none;
  gap: 2.5rem;
  margin: 0;
  padding: 0;
}

/* Nav link styling */
.nav-links a {
  color: var(--color-text-light);
  text-decoration: none;
  font-weight: 600;
  position: relative;
  padding: 4px 0;
  transition: color 0.3s ease;
  user-select: none;
}

/* Underline animation on hover */
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0%;
  background-color: var(--color-accent-orange);
  transition: width 0.3s ease;
  border-radius: 2px;
}

.nav-links a:hover::after,
.nav-links a:focus::after {
  width: 100%;
}

.nav-links a:hover,
.nav-links a:focus {
  color: var(--color-accent-orange-light);
  outline: none;
}

/* Hamburger menu button */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 2.25rem;
  color: var(--color-accent-orange);
  cursor: pointer;
  user-select: none;
}

/* Responsive for mobile */
@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 70px; /* moved down */
    right: 0;
    width: 220px;
    max-height: 300px;
    overflow-y: auto;
    background: linear-gradient(180deg, var(--color-bg-darker) 0%, #22272f 100%);
    flex-direction: column;
    gap: 1.5rem;
    padding: 1.5rem 2rem;
    border-radius: 0 0 12px 0;
    box-shadow: -4px 0 20px rgba(249, 115, 22, 0.5);
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    z-index: 30;
  }

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

  .menu-toggle {
    display: block;
    position: relative;
    z-index: 40; /* ensures toggle is above menu */
  }
}