body {
  scroll-behavior: smooth;
  color: #748D92;
  font-family: 'Roboto', sans-serif;
  overflow-x: hidden;
  background: #D3D9D4; /* Background color unchanged */
}

/* Helpers */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.card-surface {
  background: rgba(24, 38, 40, 0.5);
  border: 1px solid #57BA98;
  border-radius: 1rem;
  box-shadow: 0 0 15px rgba(24, 38, 40, 0.2);
}

.input-shell {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #57BA98;
  border-radius: 0.65rem;
  background: #182628;
  color: #65CCB8;
  font-family: 'Roboto', sans-serif;
  transition: box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.input-shell:focus-visible {
  outline: 2px solid #65CCB8;
  outline-offset: 2px;
  border-color: #65CCB8;
  box-shadow: 0 0 0 4px rgba(87, 186, 152, 0.25);
  background: #1e2f32;
}

.input-shell::placeholder {
  color: #65CCB8;
  opacity: 0.7;
}

.bg-D3D9D4 {
  background: #D3D9D4;
}

.bg-overlay-dark {
  background: rgba(24, 38, 40, 0.5);
}

h1, h2, h3, h4 {
  font-family: 'Orbitron', sans-serif;
  text-shadow: 0 0 10px rgba(24, 38, 40, 0.5); /* Adjusted to #182628 */
}

header {
  background: #182628; /* Darkest color for header */
  border-bottom: 2px solid #57BA98; /* Medium green for border */
  box-shadow: 0 2px 15px rgba(24, 38, 40, 0.3);
  position: sticky;
  top: 0;
  z-index: 50;
  transition: top 0.3s;
}

#home {
  position: relative;
  background: #182628; /* Darkest color for hero */
  padding: 6rem 2rem;
  text-align: center;
  overflow: hidden;
  border-radius: 1rem;
  box-shadow: 0 0 20px rgba(24, 38, 40, 0.2);
  margin: 2rem;
}

#home::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(24, 38, 40, 0.2) 1px, transparent 1px);
  background-size: 20px 20px;
  animation: particleShift 20s linear infinite;
  z-index: 0;
}

@keyframes particleShift {
  0% { background-position: 0 0; }
  100% { background-position: 100px 100px; }
}

/* Added classes to replace direct color usage in HTML */
.text-light-green {
  color: #65CCB8;
}

.text-medium-green {
  color: #57BA98;
}

.text-darkest-green {
  color: #3B945E;
}

.text-darkest {
  color: #182628;
}

.bg-darkest {
  background: #182628;
}

.text-light-surface {
  color: #D3D9D4;
}

.bg-light-surface {
  background: #D3D9D4;
}

.border-medium-green {
  border-color: #57BA98;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.25rem;
  border-radius: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}

.primary-cta {
  background: #182628;
  color: #65CCB8;
  border: 1px solid #57BA98;
  box-shadow: 0 0 12px rgba(87, 186, 152, 0.25);
}

.primary-cta:hover {
  background: #3B945E;
  color: #D3D9D4;
}

.secondary-cta {
  background: transparent;
  color: #65CCB8;
  border: 1px solid #57BA98;
}

.secondary-cta:hover {
  background: rgba(87, 186, 152, 0.18);
  color: #182628;
}

.cta-button:focus-visible,
.primary:focus-visible,
.secondary:focus-visible,
.hire-btn:focus-visible {
  outline: 2px solid #65CCB8;
  outline-offset: 3px;
  box-shadow: 0 0 0 6px rgba(87, 186, 152, 0.25);
}

/* Adjusted for spaced text */
.typing-text {
  display: inline-block;
  overflow: hidden;
  border-right: 3px solid #57BA98; /* Medium green for typing cursor */
  white-space: pre; /* Changed from nowrap to pre to preserve spaces */
  animation: typing 3s steps(40, end) forwards, blink 0.75s step-end infinite;
  position: relative;
  color: #65CCB8; /* Lightest green for text */
}

@keyframes typing {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes blink {
  from, to { border-color: transparent; }
  50% { border-color: #57BA98; }
}

.typing-text .char {
  display: inline-block;
  transition: all 0.2s ease;
  position: relative;
  z-index: 1;
}

.typing-text .char:hover {
  color: #3B945E; /* Darkest green for hover text */
  background: #D3D9D4; /* Background unchanged, highlight with light color */
  border-radius: 3px;
  transform: scale(1.1);
  text-shadow: 0 0 5px rgba(24, 38, 40, 0.7);
}

/* New rule to override typing-text color in freelancer-listing section */
.freelancer-listing .typing-text {
  color: #000000; /* Black for the heading */
}

.search-bar {
  background: #182628; /* Darkest color */
  padding: 1.5rem 2rem;
  margin: 2rem;
  border-radius: 1rem;
  box-shadow: 0 0 15px rgba(24, 38, 40, 0.2);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.search-bar input[type="text"] {
  background: #182628; /* Darkest color */
  color: #65CCB8; /* Lightest green */
  padding: 0.75rem 1rem;
  border: 1px solid #57BA98; /* Medium green */
  border-radius: 0.5rem;
  width: 100%;
  max-width: 400px;
  font-family: 'Roboto', sans-serif;
  transition: box-shadow 0.3s ease, background 0.3s ease;
}

.search-bar input[type="text"]::placeholder {
  color: #65CCB8;
  opacity: 0.7;
}

.search-bar input[type="text"]:focus,
.search-bar input[type="text"]:hover {
  box-shadow: 0 0 10px rgba(24, 38, 40, 0.4);
  background: #3B945E; /* Darkest green */
  outline: none;
}

.search-bar select {
  background: #182628; /* Darkest color */
  color: #65CCB8; /* Lightest green */
  padding: 0.75rem 1rem;
  border: 1px solid #57BA98; /* Medium green */
  border-radius: 0.5rem;
  width: 100%;
  max-width: 200px;
  font-family: 'Roboto', sans-serif;
  transition: box-shadow 0.3s ease, background 0.3s ease;
  appearance: none;
  background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%2357BA98%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E');
  background-repeat: no-repeat;
  background-position: right 0.7rem top 50%;
  background-size: 0.65rem auto;
}

.search-bar select:focus,
.search-bar select:hover {
  box-shadow: 0 0 10px rgba(24, 38, 40, 0.4);
  background: #3B945E; /* Darkest green */
  outline: none;
}

.search-bar button {
  background: #182628; /* Darkest color */
  color: #65CCB8; /* Lightest green */
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 0.5rem;
  font-family: 'Orbitron', sans-serif;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
  transition: background 0.3s ease;
}

.search-bar button:hover {
  background: #3B945E; /* Darkest green */
}

.image-gallery {
  background: #D3D9D4; /* Background unchanged */
  border: 2px dashed #57BA98; /* Medium green */
  padding: 2rem;
  margin: 2rem;
  border-radius: 1rem;
}

.image-gallery h3 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: #182628; /* Darkest color */
}

/* Hire Button Style */
.hire-btn {
  background: #57BA98; /* Medium green */
  color: #182628; /* Darkest color for contrast */
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 0.5rem;
  font-family: 'Orbitron', sans-serif;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
  margin-top: 0.5rem;
}

.hire-btn:hover {
  background: #3B945E; /* Darkest green */
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(24, 38, 40, 0.3);
}

.image-card {
  background: rgba(24, 38, 40, 0.5); /* Adjusted to #182628 alpha */
  border: 1px solid #57BA98; /* Medium green */
  border-radius: 1rem;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 200px;
  position: relative;
}

.image-card:hover {
  transform: translateY(-10px) rotateX(10deg) rotateY(10deg);
  box-shadow: 0 0 20px rgba(24, 38, 40, 0.5);
}

.image-card i {
  font-size: 4rem;
  color: #182628; /* Darkest color for icons */
  margin-bottom: 1rem;
  transition: color 0.3s ease;
}

.image-card:hover i {
  color: #65CCB8; /* Lightest green */
}

.image-card span {
  margin-top: 0.5rem;
  font-size: 1rem;
  color: #182628; /* Darkest color */
  font-family: 'Orbitron', sans-serif;
  text-shadow: 0 0 5px rgba(24, 38, 40, 0.3);
}

.image-card .icon {
  width: 1.5rem;
  height: 1.5rem;
  background: linear-gradient(45deg, #57BA98, #3B945E); /* Medium to darkest green */
  border-radius: 0.25rem;
  position: absolute;
  top: -0.75rem;
  left: 50%;
  transform: translateX(-50%);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(24, 38, 40, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(24, 38, 40, 0); }
  100% { box-shadow: 0 0 0 0 rgba(24, 38, 40, 0); }
}

.features {
  background: #182628; /* Darkest color */
  padding: 4rem 2rem;
  margin: 2rem;
  border-radius: 1rem;
  box-shadow: 0 0 15px rgba(24, 38, 40, 0.2);
}

.feature-card {
  background: rgba(24, 38, 40, 0.5); /* Adjusted to #182628 alpha */
  border: 1px solid #57BA98; /* Medium green */
  border-radius: 1rem;
  padding: 2rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: center;
}

.feature-card:hover {
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(24, 38, 40, 0.4);
}

.cta {
  background: #182628; /* Darkest color */
  padding: 3rem 2rem;
  margin: 2rem;
  border-radius: 1.5rem;
  box-shadow: 0 0 20px rgba(24, 38, 40, 0.2);
}

.contact {
  background: #D3D9D4; /* Background unchanged */
  padding: 4rem 2rem;
  margin: 2rem;
  border: 2px solid #57BA98; /* Medium green */
  border-radius: 1rem;
}

.contact-card, .team-card {
  background: #182628; /* Darkest color for cards as per image */
  border: 1px solid #57BA98; /* Medium green */
  border-radius: 1rem;
  padding: 1.5rem;
  text-align: center;
  color: #65CCB8; /* Lightest green */
}

.contact-form {
  max-width: 500px;
  margin: 2rem auto;
  background: linear-gradient(135deg, #182628, #3B945E); /* Darkest to darkest green */
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 0 10px rgba(24, 38, 40, 0.3);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.75rem;
  margin-bottom: 1rem;
  border: 1px solid #57BA98; /* Medium green */
  border-radius: 0.5rem;
  background: #182628; /* Darkest color */
  color: #65CCB8; /* Lightest green */
  font-family: 'Roboto', sans-serif;
  transition: box-shadow 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  box-shadow: 0 0 5px #3B945E; /* Darkest green */
}

.contact-form button.submit-btn {
  background: #182628; /* Darkest color */
  color: #65CCB8; /* Lightest green */
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 0.5rem;
  font-family: 'Orbitron', sans-serif;
  transition: background 0.3s ease;
  width: 100%;
  position: relative;
  overflow: hidden;
}

.contact-form button.submit-btn:hover {
  background: #3B945E; /* Darkest green */
}

.contact-form button.submit-btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, #182628, #3B945E, transparent);
  animation: shine 3s infinite;
}

@keyframes shine {
  0% { left: -100%; }
  50% { left: 100%; }
  100% { left: 100%; }
}

.testimonials {
  background: #182628; /* Darkest color */
  padding: 4rem 2rem;
  margin: 2rem;
  border-radius: 1rem;
}

.testimonial-card {
  background: rgba(24, 38, 40, 0.5); /* Adjusted to #182628 alpha */
  border: 1px solid #3B945E; /* Darkest green */
  border-radius: 1rem;
  padding: 1.5rem;
  text-align: center;
  color: #65CCB8; /* Lightest green */
}

.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 100;
}

.toast {
  background: #182628;
  color: #D3D9D4;
  border: 1px solid #57BA98;
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  min-width: 240px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.toast.error {
  border-color: #f87171;
  color: #ffecec;
}

footer {
  background: linear-gradient(135deg, #182628, #3B945E); /* Darkest to darkest green */
  padding: 3rem 2rem;
  border-top: 2px solid #57BA98; /* Medium green */
}

footer a:hover {
  color: #65CCB8; /* Lightest green */
}

button.primary {
  background: #182628; /* Darkest color */
  color: #65CCB8; /* Lightest green */
  position: relative;
  overflow: hidden;
}

button.primary:hover {
  background: #3B945E; /* Darkest green */
}

button.secondary {
  background: #D3D9D4; /* Background unchanged */
  color: #182628; /* Darkest color */
  position: relative;
  overflow: hidden;
}

button.secondary:hover {
  background: #57BA98; /* Medium green */
}

/* Refined Animated Slider Styles */
.view-toggle {
  position: relative;
  display: inline-block;
  font-family: 'Orbitron', sans-serif;
}

.view-toggle input[type="radio"] {
  display: none;
}

.toggle-slider {
  display: flex;
  background: #182628;
  border: 1px solid #57BA98;
  border-radius: 2rem;
  overflow: hidden;
  width: 260px; /* Increased to fully accommodate "Freelancer View" */
  height: 30px;
  position: relative;
}

.toggle-label {
  flex: 1;
  padding: 0.25rem 0.5rem; /* Further reduced padding for tighter fit */
  color: #65CCB8;
  font-size: 0.8rem; /* Reduced font size to fit longer text */
  cursor: pointer;
  text-align: center;
  line-height: 1.2rem;
  transition: color 0.3s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  white-space: nowrap;
}

.toggle-label:hover {
  color: #3B945E;
}

.toggle-button {
  position: absolute;
  width: 50%;
  height: 100%;
  background: #57BA98;
  border-radius: 2rem;
  transition: transform 0.3s ease;
  left: 0;
  top: 0;
  z-index: 0;
  box-shadow: 0 0 5px rgba(24, 38, 40, 0.3);
}

#freelancerView:checked ~ .toggle-slider .toggle-button {
  transform: translateX(100%);
}

.toggle-label {
  position: relative;
  z-index: 1;
}

.typing-text::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #182628, #3B945E, #182628); /* Darkest to darkest green */
  z-index: -1;
  transition: width 0.3s ease, left 0.3s ease;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
