/* Title Underline Color Styles */
/* These styles specifically target title underlines to use #2196F3 (blue) color */
/* Excludes header, images, icons, and other non-text elements */

/* Only target text elements with underlines - titles, headings, and text spans */
h1:not([class*="header"]):not([class*="Header"]),
h2:not([class*="header"]):not([class*="Header"]),
h3:not([class*="header"]):not([class*="Header"]),
h4:not([class*="header"]):not([class*="Header"]),
h5:not([class*="header"]):not([class*="Header"]),
h6:not([class*="header"]):not([class*="Header"]),
.title:not([class*="header"]):not([class*="Header"]),
.heading:not([class*="header"]):not([class*="Header"]) {
  text-decoration-color: #2196F3 !important;
}

/* Border-bottom underlines for titles only */
h1:not([class*="header"]):not([class*="Header"])[style*="border-bottom"],
h2:not([class*="header"]):not([class*="Header"])[style*="border-bottom"],
h3:not([class*="header"]):not([class*="Header"])[style*="border-bottom"],
h4:not([class*="header"]):not([class*="Header"])[style*="border-bottom"],
h5:not([class*="header"]):not([class*="Header"])[style*="border-bottom"],
h6:not([class*="header"]):not([class*="Header"])[style*="border-bottom"],
.title:not([class*="header"]):not([class*="Header"])[style*="border-bottom"],
.heading:not([class*="header"]):not([class*="Header"])[style*="border-bottom"] {
  border-bottom-color: #2196F3 !important;
}

/* Pseudo-element underlines for titles (like About section) */
h1:not([class*="header"]):not([class*="Header"])::before,
h2:not([class*="header"]):not([class*="Header"])::before,
h3:not([class*="header"]):not([class*="Header"])::before,
h4:not([class*="header"]):not([class*="Header"])::before,
h5:not([class*="header"]):not([class*="Header"])::before,
h6:not([class*="header"]):not([class*="Header"])::before,
.title:not([class*="header"]):not([class*="Header"])::before,
.heading:not([class*="header"]):not([class*="Header"])::before {
  background-color: #2196F3 !important;
}

/* Specific title underline classes */
.title-underline:not([class*="header"]):not([class*="Header"]),
.heading-underline:not([class*="header"]):not([class*="Header"]) {
  position: relative;
}

.title-underline:not([class*="header"]):not([class*="Header"])::before,
.heading-underline:not([class*="header"]):not([class*="Header"])::before {
  content: "";
  height: 8px;
  background-color: #2196F3 !important;
  width: 90%;
  position: absolute;
  bottom: 4px;
  left: 0;
  z-index: 0;
}

/* RTL support for title underlines */
[dir="rtl"] .title-underline:not([class*="header"]):not([class*="Header"])::before,
[dir="rtl"] .heading-underline:not([class*="header"]):not([class*="Header"])::before {
  right: 0;
  left: auto;
}

/* Explicitly exclude non-text elements */
img,
svg,
[class*="icon"],
[class*="Icon"],
[class*="social"],
[class*="Social"],
[class*="image"],
[class*="Image"],
[class*="gradient"],
[class*="Gradient"] {
  /* These elements are excluded from underline color changes */
}

/* Ensure header elements are explicitly excluded */
.MuiAppBar-root,
.MuiPaper-root,
[class*="header"],
[class*="Header"],
[id*="header"],
[id*="Header"],
nav,
Nav {
  /* Header and navigation elements keep their original underline colors */
}
