/* ========================================
   MEGA MENU STYLES
   ======================================== */

/* Navbar Industries item - position relative for dropdown */
.tf__main_menu .nav-item.has-megamenu {
  position: static;
}

/* Hide default dropdown */
.tf__main_menu .nav-item.has-megamenu .tf__dropdown {
  display: none;
}

/* ----------------------------------------
   Mega Menu Container
---------------------------------------- */
.tf__megamenu {
  display: none;
  position: absolute;
  top: 93%;
  left: 50%;
  transform: translateX(-50%);
  width: 860px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12), 0 4px 16px rgba(0, 0, 0, 0.06);
  padding: 32px 32px 28px 32px;
  z-index: 9999;
  border: 1px solid rgba(193, 211, 177, 0.4);
  margin-top: 10px;

  /* Entrance animation */
  opacity: 0;
  transform: translateX(-50%) translateY(-8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}

/* Arrow pointer */
.tf__megamenu::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 16px;
  background: #ffffff;
  border-left: 1px solid rgba(193, 211, 177, 0.4);
  border-top: 1px solid rgba(193, 211, 177, 0.4);
  transform: translateX(-50%) rotate(45deg);
}

/* Show on hover */
.tf__main_menu .nav-item.has-megamenu:hover .tf__megamenu,
.tf__main_menu .nav-item.has-megamenu:focus-within .tf__megamenu {
  display: block;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: all;
}

/* ----------------------------------------
   Mega Menu Header
---------------------------------------- */
.tf__megamenu__header {
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid #f0f4ec;
}

.tf__megamenu__header p {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8a9e7a;
}

/* ----------------------------------------
   Services Grid  —  3 columns × 3 rows
---------------------------------------- */
.tf__megamenu__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}

/* ----------------------------------------
   Single Service Card
---------------------------------------- */
.tf__megamenu__item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 14px;
  border-radius: 12px;
  text-decoration: none;
  transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
  cursor: pointer;
}

.tf__megamenu__item:hover {
  background: #f4f8f1;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(141, 180, 113, 0.15);
  text-decoration: none;
}

/* Icon box */
.tf__megamenu__icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  background: #eaf1e5;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s ease;
}

.tf__megamenu__item:hover .tf__megamenu__icon {
  background: #d6e9cc;
}

.tf__megamenu__icon i,
.tf__megamenu__icon svg {
  color: #4a8c5c;
  font-size: 18px;
}

/* Text */
.tf__megamenu__text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.tf__megamenu__title {
  font-size: 14px;
  font-weight: 700;
  color: #1a2e1a;
  line-height: 1.3;
  margin: 0;
}

.tf__megamenu__subtitle {
  font-size: 12px;
  color: #7a9070;
  margin: 0;
  line-height: 1.4;
}

/* ----------------------------------------
   Center CTA Button
---------------------------------------- */
.tf__megamenu__footer {
  display: flex;
  justify-content: center;
  padding-top: 6px;
  border-top: 1px solid #f0f4ec;
  padding-top: 20px;
}

.tf__megamenu__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #5a9e6f 0%, #3d7a52 100%);
  color: #ffffff !important;
  text-decoration: none;
  padding: 11px 32px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 16px rgba(61, 122, 82, 0.30);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.tf__megamenu__cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(61, 122, 82, 0.40);
  background: linear-gradient(135deg, #4d8f62 0%, #2f6640 100%);
  text-decoration: none;
  color: #ffffff !important;
}

.tf__megamenu__cta i {
  font-size: 13px;
}

/* ----------------------------------------
   Responsive — collapse on mobile
---------------------------------------- */
@media (max-width: 991px) {
  .tf__megamenu {
    position: static;
    width: 100%;
    transform: none;
    border-radius: 12px;
    margin-top: 6px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    padding: 20px 16px;
  }

  .tf__megamenu::before {
    display: none;
  }

  .tf__megamenu__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .tf__main_menu .nav-item.has-megamenu:hover .tf__megamenu {
    transform: none;
  }
}

@media (max-width: 480px) {
  .tf__megamenu__grid {
    grid-template-columns: 1fr;
  }
}
