/* Base Styles */
body {
  margin: 0 auto;
  background-color: #94ee9b;
  overflow-x: hidden;
  font-family: "Comic Sans MS", cursive, sans-serif;
  font-size: 1rem;
}

/* Navigation Bar */
nav {
  margin: 0 auto;
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 0.75rem 2rem; /* smaller vertical padding */
  background-color: darkgreen;
  box-shadow: 0 0.125rem 0.375rem rgba(0, 0, 0, 0.3);
}

nav .logo {
  height: clamp(3rem, 5vw, 5rem);
  box-shadow: 0.125rem 0.125rem 0.3125rem rgba(0, 0, 0, 0.5);
}

nav ul {
  list-style: none;
  display: flex;
  gap: clamp(1.25rem, 2vw, 2.5rem); /* slightly bigger gap for readability */
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
  justify-content: center;
}

nav ul li a {
  color: #caf0a7;
  text-decoration: underline;
  font-size: clamp(1.1rem, 1.7vw, 1.4rem); /* slightly larger text */
  font-weight: 800;
  padding: 0.4rem 0.75rem;
  border-radius: 0.375rem;
  transition: background-color 0.3s ease, color 0.3s ease;
  text-shadow: 0.0625rem 0.0625rem 0.125rem rgba(0, 0, 0, 0.6);
}

nav ul li a:hover {
  color: #93c5fd;
  text-shadow: 0.0625rem 0.0625rem 0.125rem rgba(0, 0, 0, 0.8);
}

/* Welcome Section */
.welcome-section {
  text-align: center;
  padding: clamp(1.5rem, 3vw, 2.5rem) 1rem; /* reduced vertical padding */
}

.welcome-section h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  color: forestgreen;
  font-weight: 900;
  margin-bottom: 0.5rem; /* smaller gap */
}

.welcome-section p {
  font-size: clamp(1rem, 2.5vw, 1.5rem); /* slightly smaller text */
  color: darkslategray;
  margin-top: 0;
}

/* Features Section */
.features-section {
  display: flex;
  justify-content: center;
  gap: clamp(1.5rem, 3vw, 3rem);
  padding: clamp(1.5rem, 3vw, 2rem) 1rem;
  flex-wrap: wrap;
}

/* Feature Box */
.feature-box {
  width: 90%;
  max-width: clamp(18rem, 25vw, 22rem);
  aspect-ratio: 1 / 1;
  background-color: #caf0a7;
  border-radius: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
  padding: clamp(0.75rem, 2vw, 1rem);
}

.feature-box:hover {
  transform: translateY(-0.25rem);
  box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.2);
}

.feature-box h2 {
  font-size: clamp(1.25rem, 2vw, 2rem);
  color: forestgreen;
  margin: 0.5rem 0 0.25rem;
}

.feature-box p {
  font-size: clamp(0.9rem, 1.5vw, 1.25rem);
}

/* Images inside boxes */
.feature-box img {
  max-width: clamp(60%, 20vw, 80%);
  height: auto;
  margin: 0.5rem 0;
  object-fit: contain;
}

/* Responsive Adjustments */

/* Medium screens (tablets & small laptops) */
@media (max-width: 1024px) {
  nav {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
  }

  nav .logo {
    height: clamp(3rem, 6vw, 4rem);
  }
}

/* Small screens (phones) */
@media (max-width: 768px) {
  nav ul li a {
    font-size: clamp(1.1rem, 2vw, 1.3rem);
  }

  .welcome-section h1 {
    font-size: clamp(2rem, 4vw, 2.5rem);
  }

  .welcome-section p {
    font-size: clamp(1rem, 3vw, 1.4rem);
  }

  .features-section {
    gap: clamp(1rem, 3vw, 1.5rem);
    padding: clamp(1rem, 3vw, 1.5rem) 1rem;
  }

  .feature-box {
    max-width: 80vw;
    padding: clamp(0.5rem, 2vw, 0.75rem);
  }
}

/* Extra small screens */
@media (max-width: 480px) {
  .feature-box h2 {
    font-size: clamp(1rem, 4vw, 1.5rem);
  }

  .welcome-section h1 {
    font-size: clamp(1.5rem, 5vw, 2rem);
  }

  .welcome-section p {
    font-size: clamp(0.9rem, 3vw, 1.25rem);
  }
}

/* Large screens */
@media (min-width: 1900px) {
  .feature-box {
    max-width: 27rem;
    padding: 3rem;
  }

  .feature-box h2 {
    font-size: 3rem;
  }

  .feature-box img {
    max-width: 100%;
  }

  .welcome-section h1 {
    font-size: 4rem;
  }

  .welcome-section p {
    font-size: 2rem;
  }
}
