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

html {
  scroll-behavior: smooth;
  overflow-x: hidden; /* Newly added to resolve mobile scrolling issue */
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: #333;
  background: #fff;
  line-height: 1.6;
  overflow-x: hidden;   /* Newly added to fix mobile scrolling to the right issue */
}

/* Header / Navigation */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  z-index: 1000;
  transition: all 0.3s ease;
}

header.scrolled {
  box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

nav {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

.logo {
  height: 50px;
  width: auto;
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.05);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 40px;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.3px;
  transition: color 0.3s ease;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: #002e5f;
  transition: width 0.3s ease;
}

.nav-links a:hover {
  color: #002e5f;
}

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

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
  z-index: 1001;
  position: relative;
}

.menu-toggle span {
  width: 25px;
  height: 3px;
  background: #333;
  border-radius: 3px;
  transition: all 0.3s ease;
}

/* Hero Section */
.hero {
  position: relative;
  color: #fff;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
}

.hero-background img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.4) 100%);
  z-index: -1;
}

.hero-content {
  max-width: 900px;
  padding: 0 40px;
  z-index: 1;
}

.hero-subtitle {
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 20px;
  opacity: 0.9;
}

.hero h1 {
  font-size: clamp(1.8rem, 3.5vw, 4.5rem); /* was: 4.5rem */
  font-weight: 300;
  line-height: 1.2;
  margin-bottom: 30px;
  letter-spacing: -1px;
}

.hero-description {
  font-size: clamp(0.95rem, 1.2vw, 1.3rem); /* was: 1.3rem */
  line-height: 1.8;
  margin-bottom: 40px;
  opacity: 0.95;
  max-width: min(700px, 58vmin); /* was: 700px — 58vmin keeps text inside sphere on smaller screens (sphere diameter ≈ 72vmin) */
  margin-left: auto;
  margin-right: auto;
}

.cta-button {
  display: inline-block;
  padding: 16px 40px;
  background: #002e5f;	/* This is RGB(0,46,95) in hex and used to be #1abc9c; */
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  border-radius: 4px;
  transition: all 0.3s ease;
  border: 2px solid #002e5f;	/* This was changed from #1abc9c; */
}

/* Particle Animation Styles */
#particleCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  background: #f9f9f9; /* was #f0f4f8 */
}

#hero-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 2rem;
  pointer-events: none;
  color: #002e5f;
  transform: translateY(8vh); /* shift text down relative to sphere center */
}

.hero-subtitle {
  font-size: clamp(12px, 1.4vw, 18px); /* was: 18px */
  font-weight: 400;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 20px;
  opacity: 0.9;
}

.cta-button {
  display: inline-block;
  padding: clamp(8px, 1.2vh, 16px) clamp(20px, 3vw, 40px);
  background: #002e5f;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: clamp(12px, 1.1vw, 16px);
  border-radius: 4px;
  transition: all 0.3s ease;
  border: 2px solid #002e5f;
  margin-top: 1rem; /* was: 2rem */
  transform: translateY(-2vh); /* pull button up relative to text block */
  opacity: 1; /* was: opacity: 0; animation: fadeUp 1s 1.2s forwards — restore those two lines to get the original fade-in effect */
  pointer-events: auto;
}

.cta-button:hover {
  background: transparent;
  border-color: #002e5f; /* was: #c9a84c (gold) */
  color: #002e5f; /* was: #c9a84c (gold) */
}

#scroll-hint {
  position: fixed;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  opacity: 1; /* was: opacity: 0; animation: fadeIn 1s 2s forwards — restore to get delayed fade-in */
  pointer-events: none;
}

#scroll-hint span {
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #002e5f;
}

.scroll-line {
  width: 0.5px;
  height: 48px;
  background: linear-gradient(to bottom, #002e5f, transparent);
  animation: scrollPulse 2s 2s infinite;
}

#scroll-spacer {
  height: 600vh;
  position: relative;
  z-index: 1;
}

#logo-end-overlay {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100vw;
  text-align: center;
  z-index: 1;
  opacity: 0;
  pointer-events: none;
  color: #002e5f;
}

#logo-end-overlay h1 {
  font-size: clamp(1.8rem, 3.5vw, 4.5rem); /* was: 4.5rem */
  font-weight: 300;
  line-height: 1.2;
  letter-spacing: -1px;
  margin: 0;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes scrollPulse {
  0%, 100% {
    opacity: 0.3;
  }
  50% {
    opacity: 1;
  }
}

/* Shared styles */
.section-subtitle {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #002e5f;
  font-weight: 600;
  margin-bottom: 15px;
}

.section-title {
  font-size: 3rem;
  font-weight: 300;
  color: #333;
  line-height: 1.3;
  margin-bottom: 20px;
}

.section-description {
  font-size: 1.2rem;
  color: #666;
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.8;
}

/* Services Section */
.services {
  padding: 120px 40px;
  background: #f9f9f9;
  position: relative;
  z-index: 1;
}

.services .section-header {
  max-width: 1200px;
  margin: 0 auto 80px;
  text-align: center;
}

.services-grid {
  max-width: 1250px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 40px;
}

.service-card {
  background: #fff;
  padding: 50px 40px;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  transition: all 0.3s ease;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.service-card h3 {
  font-size: 1.8rem;
  font-weight: 600;
  color: #333;
  line-height: 1.2;
  margin-bottom: 20px;
  min-height: 3.8rem;
}

.service-card p {
  font-size: 1.05rem;
  color: #666;
  line-height: 1.8;
}

/* Team Section */
.team {
  padding: 40px 40px 80px;      /* 120px was changed to 60px and the last element was added later */
  background: #f9f9f9;
  position: relative;
  z-index: 1;
}

.team .section-header {
  max-width: 1200px;
  margin: 0 auto 40px;
  text-align: center;
}

.stats-bar {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  background: transparent; /* was: #3a3a3a */
  border: 1px solid #002e5f;
  border-radius: 8px;
  padding: 50px 40px;
}

.stat-item {
  text-align: center;
  color: #002e5f; /* was: #fff */
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stat-number {
  font-size: 3rem;
  font-weight: 300;
  line-height: 1;
}

.stat-label {
  font-size: 0.95rem;
  color: rgba(0,46,95,0.7); /* was: rgba(255,255,255,0.8) */
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Contact Section */
.contact-section {
  min-height: 100vh;
  padding: 140px 40px 80px;
  background: linear-gradient(rgba(0,0,0,0.45), rgba(0,0,0,0.45)), url('../images/background.jpg') center/cover no-repeat fixed; /* was: linear-gradient(135deg, #f9f9f9 0%, #fff 100%) */
  color: #fff;
}

.contact-container {
  max-width: 1200px;
  margin: 0 auto;
}

.contact-header {
  text-align: center;
  margin-bottom: 60px;
}

.contact-header .section-subtitle {
  color: rgba(255,255,255,0.75); /* was: inherited #002e5f from .section-subtitle */
}

.contact-header h1 {
  font-size: 3.5rem;
  font-weight: 300;
  color: #fff; /* was: #333 */
  margin-bottom: 20px;
}

.contact-header p {
  font-size: 1.2rem;
  color: rgba(255,255,255,0.85); /* was: #666 */
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.8;
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 60px;
  align-items: start;
}

/* Contact Info */
.contact-info {
  background: #fff;
  padding: 50px 50px 0px;  /* This used to be just 50px */
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.contact-info h2 {
  font-size: 2rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 30px;
}

.contact-info p {
  font-size: 1.05rem;
  color: #666;
  line-height: 1.8;
  margin-bottom: 30px;
}

.info-item {
  margin-bottom: 25px;
}

.info-item h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
}

.info-item p {
  font-size: 1rem;
  color: #666;
  margin-bottom: 0;
}

/* Contact Form */
.contact-form-wrapper {
  background: #fff;
  padding: 50px;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.contact-form-wrapper h2 {
  font-size: 2rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 30px;
}

form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

label {
  font-size: 0.95rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
}

input, textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: 6px;
  border: 2px solid #e0e0e0;
  background: #fafafa;
  color: #333;
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.3s ease;
}

input:focus, textarea:focus {
  outline: none;
  border-color: #002e5f;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(0,46,95,0.1);
}

textarea {
  resize: vertical;
  min-height: 150px;
}

button {
  padding: 16px 40px;
  background: #002e5f;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0,46,95,0.3);
}

button:hover {
  background: #003d7a;
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(0,46,95,0.4);
}

button:active {
  transform: translateY(0);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Success message */
.success-message {
  display: none;
  padding: 20px;
  background: rgba(26,188,156,0.1);
  border: 2px solid #1abc9c;
  border-radius: 6px;
  margin-top: 20px;
  color: #16a085;
  font-weight: 600;
  text-align: center;
}

.success-message.show {
  display: block;
  animation: slideIn 0.5s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Loading spinner */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
  margin-left: 8px;
  vertical-align: middle;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Footer */
footer {
  background: rgba(0,46,95,1);  /* Originally had #1a1a1a which is rgb(26,26,26); Could consider: #2d2d2d; or #3a3a3a; or #444444 */
  color: #fff;
  padding: 20px 40px 10px;  /* was: 40px 40px 20px */
  position: relative; /* New */
  z-index: 1; /* New */
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 20px;  /* was: 40px */
  margin-bottom: 6px;  /* was: 10px */
}

.footer-logo {
  height: 35px;  /* was: 50px */
  width: auto;
  margin-bottom: 8px;  /* was: 20px */
  filter: brightness(0) invert(1);	/* This line makes it black/white */
}

.footer-about p {
  color: #ccc;
  line-height: 1.4;  /* was: 1.8 */
  margin-bottom: 8px;  /* was: 20px */
}

.footer-section h4 {
  font-size: 1.1rem;
  margin-bottom: 8px;  /* was: 20px */
  font-weight: 600;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 4px;  /* was: 12px */
}

.footer-links a {
  color: #ccc;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: #ffffff;	/* Changed from #002e5f */
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 8px;  /* was: 15px, originally 30px */
  border-top: 1px solid #999; /* Previously #333; */
  text-align: center;
  color: #999;
  font-size: 0.9rem;
}

.footer-bottom a:hover {
  color: #ffffff;	/* Changed from #002e5f */
}

/* Contact page footer override */
footer.footer-light {
  background: rgba(255,255,255,0.98);
  color: #002e5f;
}

footer.footer-light .footer-about p,
footer.footer-light .footer-links a,
footer.footer-light .footer-bottom {
  color: #002e5f;
}

footer.footer-light .footer-bottom {
  border-top-color: #002e5f;
}

footer.footer-light .footer-section h4 {
  color: #002e5f;
}

footer.footer-light .footer-logo {
  filter: none;
}

.footer-legal-link {    /* This has been newly added to not have inline formatting in each of the htmls but have it formatted through stles.css */
  color: #999;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-bottom .footer-legal-link:hover {  /* Added so the legal information and privacy notice links don't highlight */
  color: #999;
}

.footer-bottom .footer-legal-link:visited {
  color: #999;
}

/* Legal/Privacy Section */
.legal-page .content-section,
.privacy-page .content-section {
  min-height: 100vh;
  padding: 140px 40px 80px;
  background: #f9f9f9;
}

.legal-page .content-container,
.privacy-page .content-container {
  max-width: 900px;
  margin: 0 auto;
  background: #fff;
  padding: 60px;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  margin-bottom: 40px;
}

.legal-page .content-container h1,
.privacy-page .content-container h1 {
  font-size: 3rem;
  font-weight: 300;
  color: #002e5f;	/* Changed from #333 to blue */
  margin-bottom: 15px;
}

.legal-page .content-body h2,
.privacy-page .content-body h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #002e5f;
  margin-top: 35px;
  margin-bottom: 15px;
}

.legal-page .content-body p,
.privacy-page .content-body p {
  font-size: 1.05rem;
  color: #555;
  line-height: 1.8;
  margin-bottom: 20px;
}

.legal-page .content-body ul,
.privacy-page .content-body ul {
  margin-left: 30px;
  margin-bottom: 20px;
}

.legal-page .content-body li,
.privacy-page .content-body li {
  font-size: 1.05rem;
  color: #555;
  line-height: 1.8;
  margin-bottom: 10px;
}

.privacy-page .last-updated {
  font-size: 0.95rem;
  color: #666;
  font-style: italic;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  nav {
    padding: 0 20px;
    height: 70px;
  }
  
  .logo {
    height: 40px;
  }
  
  .menu-toggle {
    display: flex;
  }
  
  .nav-links {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    flex-direction: column;
    padding: 30px;
    gap: 25px;
    transform: translateY(-100%);
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
  }
  
  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
  }
  
  .hero {
    height: auto;
    min-height: 100vh;
    padding: 120px 20px 60px;
  }
  
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    font-size: 14px;
  }
  
  .hero-description {
    font-size: 1.1rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .services {
    padding: 80px 20px;
  }
  
  .services-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .contact-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .stats-bar {
    grid-template-columns: repeat(1, 1fr);    /* Added to help mobile view of banner in Teams section */
    gap: 30px;
    padding: 35px 25px;
  }  
}

@media (max-width: 768px) and (orientation: landscape) {
  .hero {
    height: auto;
    min-height: 100svh;
    padding: 80px 20px 40px;
  }
  
  .hero h1 {
    font-size: 1.8rem;
  }
  
  .hero-description {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 2rem;
  }
  
  .service-card {
    padding: 35px 25px;
  }
}

@media (max-width: 768px) {
  .contact-section {
    background-image: linear-gradient(rgba(0,0,0,0.45), rgba(0,0,0,0.45)), url('../images/background-mobile.jpg');
  }
}