/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background: linear-gradient(to right, #e0f7fa, #f1f8e9);
  color: #333;
  scroll-behavior: smooth;
  overscroll-behavior: none;
  -webkit-overflow-scrolling: touch;
}

/* Home Section */
#home {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100vh;
  padding-top: 60px; /* base offset for navbar */
  text-align: center;
}

/* Glassmorphic Floating Navbar */
.navbar {
  position: fixed;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 800px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem 2rem;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: top 0.5s ease, opacity 0.5s ease;
  z-index: 1000;
}

.logo {
  height: 40px;
  margin-right: 1rem;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
}

.nav-links a {
  text-decoration: none;
  color: #333;
  font-weight: 600;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: #00796b;
}

/* Sections */
section {
  padding: 120px 20px;
  text-align: center;
}

.hero {
  background: url('../assets/hero-bg.jpg') center/cover no-repeat;
  color: white;
  padding-top: 180px;
}

/* Service Cards */
.card-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin-top: 2rem;
}

.service-card {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(8px);
  border-radius: 15px;
  padding: 1.5rem;
  width: 250px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.service-card:hover {
  transform: translateY(-5px);
}

.service-card h3 {
  margin-bottom: 0.5rem;
  color: #00796b;
}

/* Animations */
section {
  animation: fadeIn 1s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* CTA Footer */
.cta-footer {
  background: linear-gradient(to right, #e0f2f1, #fffde7);
  padding: 60px 20px;
  text-align: center;
}

.cta-footer h2 {
  font-size: 1.8rem;
  color: #00796b;
}

.cta-footer p {
  margin: 1rem 0;
  font-size: 1.1rem;
}

.cta-button {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  background-color: #00796b;
  color: white;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.cta-button:hover {
  background-color: #004d40;
}

/* Metrics */
.metrics {
  background: #e3f2fd;
  padding: 100px 20px;
  text-align: center;
}

.metrics h2 {
  margin-bottom: 2rem;
  color: #00796b;
}

.metrics-grid {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
}

.metric {
  font-size: 1.5rem;
  color: #333;
}

.metric .counter {
  font-size: 2.5rem;
  font-weight: bold;
  color: #00796b;
}

/* Parallax Section */
.parallax-section {
  background-image: var(--bg-image);
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  height: 100vh;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start; /* align to top, then offset below navbar */
  text-align: center;
  color: white;
  z-index: 1;
}

.parallax-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 0;
}

.parallax-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 0 20px;
  margin-top: 120px; /* ensures text sits below navbar on desktop */
}

.parallax-content h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.parallax-content p {
  font-size: 1.2rem;
}

/* Mobile Optimization */
@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0.8rem 1rem;
    border-radius: 20px;
    margin: 10px auto;
    width: 90%;
    top: 10px;
    left: 0;
    right: 0;
    transform: none;
  }

  .nav-links {
    flex-direction: column;
    gap: 1rem;
    padding: 0.5rem 0;
  }

  .nav-links a {
    font-size: 1rem;
  }

  .logo {
    margin-bottom: 0.5rem;
  }

  section {
    padding: 80px 15px;
  }

  .hero {
    padding-top: 140px;
    font-size: 1.2rem;
  }

  .card-container {
    flex-direction: column;
    align-items: center;
  }

  .parallax-content {
    margin-top: 280px; /* larger offset for mobile */
  }

  .parallax-content h1 {
    font-size: 2rem;
    line-height: 1.2;
    word-break: break-word;
    padding: 0 10px;
  }

  .parallax-content p {
    font-size: 1rem;
    padding: 0 10px;
  }

  #home.parallax-section {
    height: auto;
    min-height: 100vh;
  }

  .parallax-section {
    background-attachment: scroll; /* smoother on mobile */
  }
}

/* Optional: scroll padding for anchor links */
html {
  scroll-padding-top: 120px; /* ensures anchor links respect navbar height */
}
