/* =======================================
   Color Palette
======================================= */
:root {
  --green-primary: hsl(142, 76%, 36%);
  --green-light: hsl(142, 70%, 45%);
  --green-accent: hsl(142, 70%, 30%);
  --white: #ffffff;
  --text-dark: hsl(222, 47%, 11%);
  --gray: hsl(215, 16%, 46%);
  --radius: 12px;
}

/* =======================================
   Global Styles
======================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  background-color: var(--white);
  color: var(--text-dark);
}

/* =======================================
   Navbar
======================================= */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--green-primary);
  color: var(--white);
  padding: 15px 10%;
  position: sticky;
  top: 0;
  z-index: 1000;
  flex-wrap: wrap;
  position: relative; /* needed for absolute toggle */
}

.logo {
  font-size: 1.6rem;
  font-weight: bold;
  white-space: nowrap;
}

/* Nav Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-links a {
  color: var(--white);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

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

/* Hamburger Menu Button */
.nav-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  width: 25px;
  height: 20px;
  justify-content: space-between;

  /* keep it top-right */
  position: absolute;
  top: 50%;
  right: 10%;
  transform: translateY(-50%);
  z-index: 1001; /* above nav-links */
}

.nav-toggle span {
  display: block;
  height: 3px;
  width: 100%;
  background: var(--white);
  border-radius: 3px;
}

/* =======================================
   Hero Section
======================================= */
.hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 60px 10%;
  flex-wrap: wrap;
  gap: 30px;
  background-image: url('images/image1.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1;
}

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

.hero-content h1 {
  font-size: 2.5rem;
  color: var(--white);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-content p {
  margin: 15px 0 30px;
  color: var(--white);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.download-buttons .btn {
  margin-right: 15px;
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: var(--radius);
  background: var(--green-primary);
  color: var(--white);
  text-decoration: none;
  transition: all 0.3s ease;
}

.btn:hover {
  background: var(--green-light);
  transform: scale(1.05);
}

/* Hero Image */
.hero-image {
  position: relative;
  z-index: 4;
  margin-left: -300px;
}

.hero-image img {
  width: 300px;
  max-width: 100%;
  border-radius: var(--radius);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.4s ease;
}

.hero-image img:hover {
  transform: scale(1.03);
}

/* =======================================
   Features Section
======================================= */
.features {
  text-align: center;
  padding: 60px 10%;
  background: #f6fef7;
}

.features h2 {
  color: var(--green-primary);
  margin-bottom: 40px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
}

.feature-card {
  background: var(--white);
  padding: 25px;
  border-radius: var(--radius);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  transition: transform 0.5s, background 0.5s, box-shadow 0.5s, opacity 0.5s;
  opacity: 1;
  transform: translateY(0);
}

.feature-card.highlight {
  background: var(--green-light);
  color: var(--white);
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

/* =======================================
   About Section
======================================= */
.about {
  padding: 60px 10%;
  text-align: center;
  transition: transform 0.5s, opacity 0.5s;
}

.about.highlight {
  transform: translateY(-10px);
  opacity: 1;
}

/* =======================================
   Global Scroll Animations
======================================= */
.feature-card,
.about,
.download {
  opacity: 1;
  transform: translateY(50px);
  transition: transform 0.6s ease-out, opacity 0.6s ease-out;
}

.feature-card.highlight,
.about.highlight,
.download.highlight {
  opacity: 1;
  transform: translateY(0);
}

/* Optional: stagger feature cards */
.feature-grid .feature-card:nth-child(1) { transition-delay: 0.1s; }
.feature-grid .feature-card:nth-child(2) { transition-delay: 0.2s; }
.feature-grid .feature-card:nth-child(3) { transition-delay: 0.3s; }
.feature-grid .feature-card:nth-child(4) { transition-delay: 0.4s; }

/* =======================================
   Download Section
======================================= */
.download {
  text-align: center;
  background: var(--green-primary);
  color: var(--white);
  padding: 70px 10% 120px; /* extra bottom padding to avoid footer overlap */
  transition: transform 0.5s, opacity 0.5s;
  position: relative;
  z-index: 1;
}

.download.highlight {
  transform: translateY(-10px);
  opacity: 1;
}

.download .btn {
  background: var(--white);
  color: var(--green-primary);
  font-weight: bold;
}

.download .btn:hover {
  background: #d9fdd3;
}

/* =======================================
   Footer
======================================= */
.footer {
  background: var(--green-accent);
  color: var(--white);
  text-align: center;
  padding: 25px 10%;
  font-size: 0.9rem;
  line-height: 1.4;
  position: relative;
  z-index: 2;
}

/* =======================================
   Responsive Adjustments
======================================= */
@media (max-width: 768px) {
  .hero { flex-direction: column; text-align: center; padding: 30px 2%; }
  .hero-content { max-width: 100%; }
  .hero-image { margin-left: 0; }
  .hero-image img { width: 90vw; max-width: 350px; }
  .hero-content h1 { font-size: 2rem; }

  /* Navbar adjustments */
  .nav-links {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    display: none;
    margin-top: 50px; /* push dropdown below header */
  }
  .nav-links.active { display: flex; flex-direction: column; gap: 15px; }
  .nav-toggle { display: flex; }
}

@media (max-width: 480px) {
  .hero { padding: 20px 5%; gap: 10px; }
  .hero-image img { width: 95vw; max-width: 180px; }
  .hero-content h1 { font-size: 1.3rem; }
  .download-buttons .btn { margin-right: 8px; padding: 10px 16px; font-size: 0.95rem; }
  .logo { font-size: 1.2rem; }
  .nav-links a { font-size: 0.85rem; padding: 6px 10px; }
  .footer { padding: 25px 0%; font-size: 0.75rem; line-height: 1.4; }
}

@media (max-width: 375px) {
  .logo { font-size: 1.1rem; }
  .nav-links a { font-size: 0.8rem; padding: 5px 8px; }
  .navbar { padding: 8px 3%; }
  .footer { padding: 25px 3%; font-size: 0.75rem; line-height: 1.4; }
}
