* {
  box-sizing: border-box;
}
:root {
  --brand: #2a9d8f;
  --dark: #0b1520;
  --muted: #6b7280;
  /* approximate navbar height; adjust if your nav changes */
  --nav-height: 64px;
}
html,
body,
#root {
  height: 100%;
}
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial,
    sans-serif;
  background: #f6faf9;
  color: #0f172a;
}
a {
  color: inherit;
  text-decoration: none;
  font-size: 18px;
}
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 16px;
}

/* Page content spacing for non-home pages */
.page-content {
  margin-top: 20px;
  min-height: calc(100vh - var(--nav-height) - 200px);
}

/* ---------------- NAV ---------------- */
.nav {
  position: sticky;
  top: 0;
  background: white;
  z-index: 50;
  border-bottom: 1px solid #e5e7eb;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  text-decoration: none;
  color: inherit;
}
.brand img {
  max-height: 50px; /* keeps it within limit */
  width: auto; /* keeps proportions */
  height: auto; /* allow resizing */
  border-radius: 8px;
  max-width: 100%; /* prevents overflow */
}

.brand-text {
  font-size: 28px;
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.tag {
  font-size: 18px;
  color: #6b7280; /* subtle gray */
}

/* Hamburger */
.hamburger {
  font-size: 24px;
  background: none;
  border: none;
  cursor: pointer;
  display: none;
}

/* Menu */
.menu {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}
.menu a,
.menu-link {
  padding: 8px 14px;
  border-radius: 12px;
  transition: transform 0.15s ease, background 0.2s ease;
  text-decoration: none;
  color: #2e7d32;
}
.menu a:hover,
.menu-link:hover {
  background: #2e7d32;
  color: black;
  transform: translateY(-1px);
}
.menu a:active,
.menu-link:active {
  transform: translateY(1px);
}

/* Dropdown */
.dropdown {
  position: relative;
  display: inline-block;
  font-size: 20px;
}
.dropdown-content {
  display: none;
  flex-direction: column;
  background: white;
  border: 1px solid #ddd;
  padding: 8px;
  min-width: 220px;

  position: absolute;
  top: 100%;
  left: 0;
  z-index: 100;
}
.nested-dropdown {
  position: relative;
}
.dropdown.open .dropdown-content {
  display: flex;
}
.nested-content {
  display: none;
  position: absolute;
  left: 104%;
  top: 0;
  background: white;
  border: 1px solid #ddd;
  min-width: 220px;
  padding: 8px;
}
.nested-dropdown:hover .nested-content {
  display: block;
}
.parent-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.dropdown-content a {
  display: block;
  padding: 10px 14px;
  color: black;
}
.dropdown-content a:hover {
  background: #2e7d32;
}

/* Desktop hover */
@media (min-width: 769px) {
  .dropdown:hover .dropdown-content {
    display: block;
  }
}

/* Mobile styles */
@media (max-width: 768px) {
  .hamburger {
    display: block;
  }
  .menu {
    display: none;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    background: white;
    padding: 12px 0;
  }
  .menu.open {
    display: flex;
  }
  .dropdown {
    flex-direction: column;
    width: 100%;
  }
  .dropdown-content {
    display: flex !important;
    flex-direction: column;
    padding-left: 20px;
    position: static;
    box-shadow: none;
    border: none;
  }
  .dropdown:hover .dropdown-content {
    display: none;
  }
}

/* Overlay */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 40;
}

/* Sidebar menu for mobile */
@media (max-width: 768px) {
  .menu {
    position: fixed;
    top: 0;
    left: -260px;
    height: 100%;
    width: 240px;
    background: white;
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 0;
    gap: 0;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    transition: left 0.3s ease;
    z-index: 50;
  }
  .menu.open {
    left: 0;
  }
  .menu a,
  .menu-link {
    width: 100%;
    padding: 12px 16px;
    border-radius: 0;
    text-align: left;
  }
  .dropdown-content {
    display: flex !important;
    flex-direction: column;
    padding-left: 16px;
    border: none;
    box-shadow: none;
    width: 100%;
  }
  /* Ensure nested submenu opens below and aligned left on mobile */
  .nested-content {
    display: flex !important;
    flex-direction: column;
    position: static;
    padding-left: 32px;
    border: none;
    box-shadow: none;
    width: 100%;
  }
}

/* ---------------- HERO ---------------- */
.hero {
  display: block;
  padding: 0;
  margin-top: 0;
  position: relative;
  z-index: 1;
}
/* Ensure slider fills viewport below nav */
.hero > div {
  height: calc(100vh - var(--nav-height)) !important;
  width: 100%;
}
@media (max-width: 768px) {
  /* On small screens, let the hero height be driven by slide heights to avoid jump */
  .hero > div {
    height: auto !important;
  }
}
.hero video,
.hero img {
  width: 100%;
  border-radius: 0;
  box-shadow: none;
}

/* ---------------- CARDS ---------------- */
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
@media (min-width: 768px) {
  .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.08);
}
.card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}
.card .body {
  padding: 12px 14px;
  font-weight: 600;
}

/* ---------------- FOOTER ---------------- */
.footer {
  margin-top: 50px;
  margin-bottom: 0;
  background: #504f4d;
  border-top: 2px solid #2e7d32;
  color: white;
  font-family: 'Poppins', sans-serif;
  padding: 20px;
  font-size: 16px;
  position: relative;
  z-index: 10;
}

/* Footer with large margin for HeroSection pages */
.footer.hero-footer {
  margin-top: 23040px;
}
.footer-container {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 30px;
  color: white;
}
.footer h4 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
  position: relative;
  color: white;
}
.footer h4::after {
  content: '';
  display: block;
  width: 40px;
  height: 2px;
  background: #2e7d32;
  margin-top: 6px;
  border-radius: 2px;
}
.footer ul {
  /* fixed */
  padding: 0;
}
.footer ul li {
  margin-bottom: 4px;
  color: white;
  font-size: 1rem;
}
.footer ul li a {
  text-decoration: none;
  color: white;
  font-size: 1rem;
  transition: color 0.2s ease, padding-left 0.2s ease;
}
.footer ul li a:hover {
  color: #2e7d32;
  padding-left: 3px;
}
.footer-brand {
  margin-top: 2px;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
  display: inline-block;
}
.dis {
  margin-top: 2px;
}
.footer-left small {
  color: white;
  font-size: 15px;
}
.footer-socials {
  display: flex;
  gap: 4px;
  margin-top: 12px;
  margin-left: -5px;
}
.footer-socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: #e6f4ed;
  color: black;
  border-radius: 50%;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.footer-socials a:hover {
  transform: translateY(-3px);
  background: #2e7d32;
  color: #fff;
}

/* Responsive footer */
@media (max-width: 992px) {
  .footer-container {
    grid-template-columns: repeat(3, 1fr);
    padding-left: 15px;
  }
}
@media (max-width: 600px) {
  .footer-container {
    grid-template-columns: repeat(2, 1fr);
    padding-left: 15px;
  }
}
@media (max-width: 400px) {
  .footer-container {
    grid-template-columns: 1fr;
    padding-left: 15px;
  }
  .footer.hero-footer {
    margin-top: 40px !important; /* reduced gap on very small devices */
  }
}

/* Reduce excessive footer gap on small devices for hero home page */
@media (max-width: 768px) {
  .footer.hero-footer {
    margin-top: 48px !important;
  }
}

/* ---------------- CURSOR ---------------- */
.cursor-effect {
  width: 20px;
  height: 20px;
  border: 2px solid var(--brand);
  border-radius: 50%;
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: none;
  transition: transform 0.04s ease, opacity 0.3s;
}
.cursor-effect.hidden {
  opacity: 0;
}
