/* Header & Dynamic Menu Styles - Editable CSS File */
/* Access via: http://localhost:3000/css/header.css */
/* This file controls the styling for the header navigation and dynamic menu items (like Agriculture, News, etc.) */

/* ===== Dynamic Menu Container ===== */
.dynamic-menu-container {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  justify-content: flex-end;
  /* ⭐ Add your custom styles here */
}

/* ===== Dynamic Menu Item Wrapper ===== */
.dynamic-menu-item-wrapper {
  position: relative;
  /* ⭐ Add your custom styles here */
}

/* ===== Dynamic Menu Button (for items with dropdowns like Agriculture) ===== */
.dynamic-menu-button {
  position: relative !important;
  padding: 0.5rem 1rem !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  transition: all 0.3s ease !important;
  border-radius: 0.5rem !important;
  display: flex !important;
  align-items: center !important;
  gap: 0.25rem !important;
  transform: scale(1) !important;
  /* ⭐ Change these to customize menu button appearance */
  color: #374151; /* Default text color */
  background: transparent; /* Default background */
}

.dynamic-menu-button:hover {
  transform: scale(1.05) !important;
  /* ⭐ Add hover styles here */
}

/* Dynamic Menu Icon (emoji/icon next to menu text) */
.dynamic-menu-icon {
  transition: all 0.3s ease !important;
  /* ⭐ Change icon size, color, etc. */
  font-size: 1rem;
}

.dynamic-menu-icon:hover {
  transform: scale(1.1) rotate(3deg) !important;
}

/* Dynamic Menu Text (the menu item name like "Agriculture") */
.dynamic-menu-text {
  position: relative !important;
  z-index: 10 !important;
  display: inline-block !important;
  transition: transform 0.3s ease !important;
  /* ⭐ Change font size, weight, color, etc. */
  font-size: 0.875rem;
  font-weight: 500;
}

.dynamic-menu-text:hover {
  transform: translateX(0.125rem) !important;
}

/* Dynamic Menu Chevron (dropdown arrow) */
.dynamic-menu-chevron {
  transition: all 0.3s ease !important;
  /* ⭐ Change arrow size, color, etc. */
  font-size: 0.75rem;
}

/* ===== Dynamic Menu Link (for items without dropdowns) ===== */
.dynamic-menu-link {
  position: relative !important;
  padding: 0.5rem 1rem !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  transition: all 0.3s ease !important;
  border-radius: 0.5rem !important;
  display: inline-flex !important;
  align-items: center !important;
  transform: scale(1) !important;
  /* ⭐ Change these to customize menu link appearance */
  color: #374151; /* Default text color */
  background: transparent; /* Default background */
}

.dynamic-menu-link:hover {
  transform: scale(1.05) !important;
  /* ⭐ Add hover styles here */
}

.dynamic-menu-link-icon {
  margin-right: 0.25rem !important;
  transition: all 0.3s ease !important;
  /* ⭐ Change icon size, color, etc. */
  font-size: 1rem;
}

.dynamic-menu-link-icon:hover {
  transform: scale(1.1) rotate(3deg) !important;
}

.dynamic-menu-link-text {
  position: relative !important;
  z-index: 10 !important;
  display: inline-block !important;
  transition: transform 0.3s ease !important;
  /* ⭐ Change font size, weight, color, etc. */
  font-size: 0.875rem;
  font-weight: 500;
}

.dynamic-menu-link-text:hover {
  transform: translateX(0.125rem) !important;
}

/* ===== Dynamic Menu Dropdown (the dropdown panel that appears on hover) ===== */
/* Background is set from Homepage Settings (Dropdown & sub-menu panels) via inline style — do not override with !important */
.dynamic-menu-dropdown {
  position: absolute !important;
  top: 100% !important;
  left: 0 !important;
  margin-top: 0.5rem !important;
  width: 16rem !important;
  border-radius: 0.75rem !important;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
  border: 1px solid !important;
  z-index: 50 !important;
  overflow: hidden !important;
  max-height: 80vh !important;
  overflow-y: auto !important;
  animation: slideDown 0.3s ease-out, fadeIn 0.3s ease-out !important;
}

/* Dropdown Top Border (decorative gradient line) */
.dynamic-menu-dropdown-top-border {
  height: 0.25rem !important;
  background: linear-gradient(to right, #3b82f6, #2563eb, #1d4ed8) !important;
  /* ⭐ Change gradient colors here */
}

/* Dropdown Content Container */
.dynamic-menu-dropdown-content {
  padding: 0.5rem 0 !important;
  /* ⭐ Add padding, spacing, etc. */
}

/* Dropdown Bottom Border (decorative line) */
.dynamic-menu-dropdown-bottom-border {
  height: 1px !important;
  background: linear-gradient(to right, transparent, #e5e7eb, transparent) !important;
  /* ⭐ Change gradient colors here */
}

/* ===== Dynamic Menu Subitem (individual items in dropdown like "Horticulture", "Livestock Management") ===== */
.dynamic-menu-subitem {
  position: relative !important;
  display: block !important;
  padding: 0.75rem 1.25rem !important;
  font-size: 0.875rem !important;
  transition: all 0.2s ease !important;
  /* ⭐ Change subitem padding, font size, etc. */
  color: #1f2937; /* Default text color */
  border-bottom: 1px solid rgba(229, 231, 235, 0.1) !important;
}

.dynamic-menu-subitem:last-child {
  border-bottom: none !important;
}

.dynamic-menu-subitem:hover {
  /* ⭐ Add hover styles here */
  background: linear-gradient(to right, rgba(59, 130, 246, 0.05), transparent) !important;
  color: #1e40af !important;
}

/* Subitem Hover Background */
.dynamic-menu-subitem-hover-bg {
  position: absolute !important;
  inset: 0 !important;
  opacity: 0 !important;
  transition: opacity 0.2s ease !important;
  background: linear-gradient(to right, rgba(59, 130, 246, 0.05), transparent) !important;
}

.dynamic-menu-subitem:hover .dynamic-menu-subitem-hover-bg {
  opacity: 1 !important;
}

/* Subitem Indicator Line (left border that appears on hover) */
.dynamic-menu-subitem-indicator {
  position: absolute !important;
  left: 0 !important;
  top: 0 !important;
  bottom: 0 !important;
  width: 0.25rem !important;
  background: linear-gradient(to bottom, #3b82f6, #2563eb) !important;
  transform: scaleY(0) !important;
  transition: transform 0.2s ease !important;
  transform-origin: center !important;
}

.dynamic-menu-subitem:hover .dynamic-menu-subitem-indicator {
  transform: scaleY(1) !important;
}

/* Subitem Content Container */
.dynamic-menu-subitem-content {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  gap: 0.75rem !important;
  /* ⭐ Change spacing, alignment, etc. */
}

/* Subitem Icon */
.dynamic-menu-subitem-icon {
  font-size: 1.125rem !important;
  transition: all 0.2s ease !important;
  /* ⭐ Change icon size, color, etc. */
  color: #1f2937;
}

.dynamic-menu-subitem:hover .dynamic-menu-subitem-icon {
  transform: scale(1.1) rotate(3deg) !important;
  color: #1e40af !important;
}

/* Subitem Text */
.dynamic-menu-subitem-text {
  font-weight: 500 !important;
  transition: all 0.2s ease !important;
  /* ⭐ Change font size, weight, color, etc. */
  font-size: 0.875rem;
  color: #1f2937;
}

.dynamic-menu-subitem:hover .dynamic-menu-subitem-text {
  transform: translateX(0.25rem) !important;
  color: #1e40af !important;
}

/* Subitem Arrow (chevron right) */
.dynamic-menu-subitem-arrow {
  margin-left: auto !important;
  font-size: 0.75rem !important;
  opacity: 0 !important;
  transition: all 0.2s ease !important;
  color: #3b82f6 !important;
}

.dynamic-menu-subitem:hover .dynamic-menu-subitem-arrow {
  opacity: 1 !important;
  transform: translateX(0.25rem) !important;
}

/* ===== Animations ===== */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ===== Example: Customize Agriculture Menu Item ===== */
/* 
 * To customize a specific menu item, you can use attribute selectors:
 * 
 * .dynamic-menu-button[data-menu-slug="agriculture"] {
 *   background: #10b981 !important;
 *   color: white !important;
 * }
 * 
 * .dynamic-menu-subitem[data-submenu-slug="horticulture"] {
 *   background: #f0fdf4 !important;
 * }
 */

/* ===== Responsive Styles ===== */
@media (max-width: 768px) {
  .dynamic-menu-container {
    display: none !important; /* Hidden on mobile - shown in mobile menu */
  }
}


