@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&family=Open+Sans:wght@400;500;600&family=Raleway:wght@400;500;600&display=swap");

/* Header */
.navbar {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 40px); /* Gives a small 20px gap on each side on mobile */
  max-width: 1285px;
  background-color: #4f6d3a;
  border-radius: 25px;
  z-index: 1000;
  box-sizing: border-box;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
}

.logo img {
  height: 45px;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 32px;
}

.nav-links a {
  text-decoration: none;
  font-family: "Raleway", sans-serif;
  font-weight: 600;
  font-size: 16px;
  color: #d4e8c2;
  padding: 8px 16px;
  border-radius: 20px;
  transition: all 0.3s ease;
}

.nav-links a.active,
.nav-links a:hover {
  background-color: #d4e8c2;
  color: #4f6d3a;
}

/* ============== Mobile Menu Toggle ============== */
.menu-toggle {
  display: none;
  cursor: pointer;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border-radius: 8px;
  transition: background-color 0.3s ease;
}

.menu-toggle:hover {
  background-color: rgba(212, 232, 194, 0.1);
}

.bar {
  width: 35px;
  height: 4px;
  background-color: #d4e8c2;
  border-radius: 3px;
  transition: 0.3s;
}

/* Animate bars into X when active */
.menu-toggle.active .bar:nth-child(1) {
  transform: rotate(45deg) translate(7px, 7px);
}
.menu-toggle.active .bar:nth-child(2) {
  opacity: 0;
}
.menu-toggle.active .bar:nth-child(3) {
  transform: rotate(-45deg) translate(8px, -8px);
}

/* ============== Hero Section ============== */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  margin: 0;
  padding: 0;
  display: block;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  margin: 0;
}

.hero-overlay {
  position: absolute;
  top: 65%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 470px;
  max-width: 1270px;
  background-color: rgba(138, 154, 91, 0.5);
  border-radius: 20px;
  backdrop-filter: blur(3.5px);
  -webkit-backdrop-filter: blur(3.5px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}

.hero-content h1 {
  color: #faf3e0;
  text-align: center;
  font-family: "Montserrat", sans-serif;
  font-size: 64px;
  font-style: normal;
  font-weight: 700;
  line-height: normal;
  font-size: clamp(1.8rem, 5vw, 3.5rem);
  margin-bottom: 1rem;
}

.hero-content p {
  color: #d4e8c2;
  text-align: center;
  font-family: "Open Sans";
  font-size: 32px;
  font-style: normal;
  font-weight: 700;
  line-height: normal;
  margin: 0 auto;
}

.hero-content .primary-btn {
  margin-top: 50px;
  padding: 12px 28px;
  background: #d4e8c2;
  border: none;
  border-radius: 8px;
  color: #4f6d3a;
  font-family: "Raleway", sans-serif;
  font-weight: 600;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  width: 270px;
  height: 70px;
}

.hero-content .primary-btn:hover {
  background-color: #8a9a5b;
  color: #faf3e0;
  transform: translateY(-2px);
}

/* Scroll to Top Button */
#scrollToTop {
  display: none;
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 9999;
  border: none;
  outline: none;
  background: #8a9a5b;
  color: #faf3e0;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  width: 55px;
  height: 55px;
  padding: 0;
  border-radius: 50%;
  transition:
    background 0.3s,
    transform 0.3s,
    opacity 0.3s;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

#scrollToTop i {
  font-size: 20px;
  transform: none !important;
  display: inline-block;
  line-height: 1;
}

#scrollToTop:hover {
  background-color: #8a9a5b;
  transform: translateY(-5px);
  color: #faf3e0;
}

/* RESPONSIVE VIEWS */
/* ========== TABLET VIEW ========== */
@media screen and (max-width: 1024px) {
  .navbar {
    width: 100% !important;
    left: 0 !important;
    top: 0 !important;
    transform: none !important;
    border-radius: 0 !important;
    position: fixed;
  }

  .menu-toggle {
    display: flex;
    z-index: 1001;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    height: 100vh;
    width: 280px;
    background-color: #4f6d3a;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
    transition: right 0.4s ease-in-out;
    box-shadow: -10px 0 20px rgba(0, 0, 0, 0.2);
  }

  .nav-links.active {
    right: 0;
  }

  .hero {
    position: relative;
    height: 100vh;
    overflow: hidden;
  }

  .hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .hero-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 600px;
    height: auto;
    padding: 40px 20px;
    margin-top: 60px; /* Account for fixed navbar */
  }

  .hero-content h1 {
    font-size: 42px !important;
  }

  .hero-content p {
    font-size: 22px !important;
  }
}

/* ========== MOBILE VIEW ========== */
@media screen and (max-width: 768px) {
  .hero {
    position: relative;
    height: 100vh;
    overflow: hidden;
  }

  .hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .hero-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 92%;
    max-width: 350px;
    height: auto;
    padding: 30px 15px;
    margin-top: 80px; /* Account for fixed navbar */
    background-color: rgba(79, 109, 58, 0.9);
  }

  .hero-content h1 {
    font-size: 28px !important;
    line-height: 1.2;
  }

  .hero-content p {
    font-size: 16px !important;
    line-height: 1.5;
  }

  .hero-content .primary-btn {
    width: 220px;
    height: 60px;
    font-size: 16px;
    margin-top: 30px;
  }

  /* --- SCROLL TO TOP BUTTON --- */
  #scrollToTop {
    display: flex; /* Force visibility for testing; usually toggled via JS */
    align-items: center;
    justify-content: center;
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
  }
}
