/**
 * Special fix for active menu links
 * Uses very high specificity to ensure it overrides other styles
 */

/* Direct targeting of active menu links in the mega menu */
#menuOverlay a.tw-block.tw-text-gray-600.is-active[aria-current="page"],
#menuOverlay a.tw-block.tw-text-gray-600.is-active,
#menuOverlay a.tw-block.tw-text-gray-600[aria-current="page"],
#menuOverlay .tw-ml-3.tw-space-y-2 li a.tw-block.tw-text-gray-600.is-active,
#menuOverlay .tw-ml-3.tw-space-y-2 li a.tw-block.tw-text-gray-600[aria-current="page"] {
  text-decoration: underline !important;
  text-decoration-line: underline !important;
  text-underline-offset: 0.15em !important;
  text-decoration-thickness: 1px !important;
  text-decoration-color: currentColor !important;
  -webkit-text-decoration: underline !important;
  -webkit-text-decoration-line: underline !important;
  -webkit-text-underline-offset: 0.15em !important;
  -webkit-text-decoration-thickness: 1px !important;
}

/* We're NOT applying underline to all parent categories - only target parent of active items */
/* Instead, let the JavaScript handle this dynamically */

/* Parent category - ONLY when it contains an active item */
#menuOverlay li:has(> ul > li > a.is-active) > a.tw-font-bold.tw-text-md.tw-uppercase.tw-mb-3,
#menuOverlay li:has(> ul > li > a[aria-current="page"]) > a.tw-font-bold.tw-text-md.tw-uppercase.tw-mb-3 {
  text-decoration: underline !important;
  text-decoration-line: underline !important;
  text-underline-offset: 0.15em !important;
  text-decoration-thickness: 1px !important;
}

/* Special case for ΠΟΛΙΤΙΣΜΌΣ when viewing subcategories */
body.path-news.path-politismos #menuOverlay a[href="/news/politismos"].tw-font-bold.tw-text-md.tw-uppercase {
  text-decoration: underline !important;
  text-decoration-line: underline !important;
  text-underline-offset: 0.15em !important;
  text-decoration-thickness: 1px !important;
}

/* Inline style override to guarantee application */
#menuOverlay li a.is-active,
#menuOverlay li a[aria-current="page"] {
  text-decoration: underline !important;
}
