/*
 * NPC Text Link Styling
 *
 * Job:
 * - Style only normal text links.
 * - Normal/visited/focus/hover color: #1A73E8.
 * - Hover/focus: underline only.
 *
 * Scope:
 * - Elementor Text Editor widgets.
 * - NPC blog article content using the .npc-blog-content class.
 *
 * Exclusions:
 * - Header and footer areas.
 * - Headings h1-h6.
 * - Buttons and button-style links.
 * - Images and image links.
 * - Captions.
 * - Loop Grid cards, product cards, Elementor post cards, WooCommerce product cards.
 */

/* -----------------------------
   Elementor Text Editor links
------------------------------ */
.elementor-widget-text-editor:not(.elementor-location-header *):not(.elementor-location-footer *):not(.elementor-widget-loop-grid *):not(.elementor-loop-container *):not(.e-loop-item *):not(.elementor-post *):not(.npc-product-card *):not(.product *) :where(p, li, td, th, dd) a:not(.elementor-button):not(.button):not([class*="button"]):not(:has(img)),
.elementor-widget-text-editor:not(.elementor-location-header *):not(.elementor-location-footer *):not(.elementor-widget-loop-grid *):not(.elementor-loop-container *):not(.e-loop-item *):not(.elementor-post *):not(.npc-product-card *):not(.product *) :where(p, li, td, th, dd) a:not(.elementor-button):not(.button):not([class*="button"]):not(:has(img)):visited,
.elementor-widget-text-editor:not(.elementor-location-header *):not(.elementor-location-footer *):not(.elementor-widget-loop-grid *):not(.elementor-loop-container *):not(.e-loop-item *):not(.elementor-post *):not(.npc-product-card *):not(.product *) :where(p, li, td, th, dd) a:not(.elementor-button):not(.button):not([class*="button"]):not(:has(img)) strong,
.elementor-widget-text-editor:not(.elementor-location-header *):not(.elementor-location-footer *):not(.elementor-widget-loop-grid *):not(.elementor-loop-container *):not(.e-loop-item *):not(.elementor-post *):not(.npc-product-card *):not(.product *) :where(p, li, td, th, dd) a:not(.elementor-button):not(.button):not([class*="button"]):not(:has(img)) b,
.elementor-widget-text-editor:not(.elementor-location-header *):not(.elementor-location-footer *):not(.elementor-widget-loop-grid *):not(.elementor-loop-container *):not(.e-loop-item *):not(.elementor-post *):not(.npc-product-card *):not(.product *) :where(p, li, td, th, dd) a:not(.elementor-button):not(.button):not([class*="button"]):not(:has(img)) span {
	color: #1A73E8 !important;
	text-decoration: underline !important;
    text-underline-offset: 3px !important;
    text-decoration-thickness: 1px !important;
}

.elementor-widget-text-editor:not(.elementor-location-header *):not(.elementor-location-footer *):not(.elementor-widget-loop-grid *):not(.elementor-loop-container *):not(.e-loop-item *):not(.elementor-post *):not(.npc-product-card *):not(.product *) :where(p, li, td, th, dd) a:not(.elementor-button):not(.button):not([class*="button"]):not(:has(img)):hover,
.elementor-widget-text-editor:not(.elementor-location-header *):not(.elementor-location-footer *):not(.elementor-widget-loop-grid *):not(.elementor-loop-container *):not(.e-loop-item *):not(.elementor-post *):not(.npc-product-card *):not(.product *) :where(p, li, td, th, dd) a:not(.elementor-button):not(.button):not([class*="button"]):not(:has(img)):focus,
.elementor-widget-text-editor:not(.elementor-location-header *):not(.elementor-location-footer *):not(.elementor-widget-loop-grid *):not(.elementor-loop-container *):not(.e-loop-item *):not(.elementor-post *):not(.npc-product-card *):not(.product *) :where(p, li, td, th, dd) a:not(.elementor-button):not(.button):not([class*="button"]):not(:has(img)):hover strong,
.elementor-widget-text-editor:not(.elementor-location-header *):not(.elementor-location-footer *):not(.elementor-widget-loop-grid *):not(.elementor-loop-container *):not(.e-loop-item *):not(.elementor-post *):not(.npc-product-card *):not(.product *) :where(p, li, td, th, dd) a:not(.elementor-button):not(.button):not([class*="button"]):not(:has(img)):hover b,
.elementor-widget-text-editor:not(.elementor-location-header *):not(.elementor-location-footer *):not(.elementor-widget-loop-grid *):not(.elementor-loop-container *):not(.e-loop-item *):not(.elementor-post *):not(.npc-product-card *):not(.product *) :where(p, li, td, th, dd) a:not(.elementor-button):not(.button):not([class*="button"]):not(:has(img)):hover span {
	color: #E30613 !important;
	text-decoration: underline !important;
}

/* -----------------------------
   Blog article Post Content links
------------------------------ */
.npc-blog-content:not(.elementor-location-header *):not(.elementor-location-footer *):not(.elementor-widget-loop-grid *):not(.elementor-loop-container *):not(.e-loop-item *):not(.elementor-post *):not(.npc-product-card *):not(.product *) :where(p, li, td, th, dd) a:not(.elementor-button):not(.button):not([class*="button"]):not(:has(img)),
.npc-blog-content:not(.elementor-location-header *):not(.elementor-location-footer *):not(.elementor-widget-loop-grid *):not(.elementor-loop-container *):not(.e-loop-item *):not(.elementor-post *):not(.npc-product-card *):not(.product *) :where(p, li, td, th, dd) a:not(.elementor-button):not(.button):not([class*="button"]):not(:has(img)):visited,
.npc-blog-content:not(.elementor-location-header *):not(.elementor-location-footer *):not(.elementor-widget-loop-grid *):not(.elementor-loop-container *):not(.e-loop-item *):not(.elementor-post *):not(.npc-product-card *):not(.product *) :where(p, li, td, th, dd) a:not(.elementor-button):not(.button):not([class*="button"]):not(:has(img)) strong,
.npc-blog-content:not(.elementor-location-header *):not(.elementor-location-footer *):not(.elementor-widget-loop-grid *):not(.elementor-loop-container *):not(.e-loop-item *):not(.elementor-post *):not(.npc-product-card *):not(.product *) :where(p, li, td, th, dd) a:not(.elementor-button):not(.button):not([class*="button"]):not(:has(img)) b,
.npc-blog-content:not(.elementor-location-header *):not(.elementor-location-footer *):not(.elementor-widget-loop-grid *):not(.elementor-loop-container *):not(.e-loop-item *):not(.elementor-post *):not(.npc-product-card *):not(.product *) :where(p, li, td, th, dd) a:not(.elementor-button):not(.button):not([class*="button"]):not(:has(img)) span {
	color: #1A73E8 !important;
	text-decoration: underline !important;
    text-underline-offset: 3px !important;
    text-decoration-thickness: 1px !important;
}

.npc-blog-content:not(.elementor-location-header *):not(.elementor-location-footer *):not(.elementor-widget-loop-grid *):not(.elementor-loop-container *):not(.e-loop-item *):not(.elementor-post *):not(.npc-product-card *):not(.product *) :where(p, li, td, th, dd) a:not(.elementor-button):not(.button):not([class*="button"]):not(:has(img)):hover,
.npc-blog-content:not(.elementor-location-header *):not(.elementor-location-footer *):not(.elementor-widget-loop-grid *):not(.elementor-loop-container *):not(.e-loop-item *):not(.elementor-post *):not(.npc-product-card *):not(.product *) :where(p, li, td, th, dd) a:not(.elementor-button):not(.button):not([class*="button"]):not(:has(img)):focus,
.npc-blog-content:not(.elementor-location-header *):not(.elementor-location-footer *):not(.elementor-widget-loop-grid *):not(.elementor-loop-container *):not(.e-loop-item *):not(.elementor-post *):not(.npc-product-card *):not(.product *) :where(p, li, td, th, dd) a:not(.elementor-button):not(.button):not([class*="button"]):not(:has(img)):hover strong,
.npc-blog-content:not(.elementor-location-header *):not(.elementor-location-footer *):not(.elementor-widget-loop-grid *):not(.elementor-loop-container *):not(.e-loop-item *):not(.elementor-post *):not(.npc-product-card *):not(.product *) :where(p, li, td, th, dd) a:not(.elementor-button):not(.button):not([class*="button"]):not(:has(img)):hover b,
.npc-blog-content:not(.elementor-location-header *):not(.elementor-location-footer *):not(.elementor-widget-loop-grid *):not(.elementor-loop-container *):not(.e-loop-item *):not(.elementor-post *):not(.npc-product-card *):not(.product *) :where(p, li, td, th, dd) a:not(.elementor-button):not(.button):not([class*="button"]):not(:has(img)):hover span {
    color: #E30613 !important;
	text-decoration: underline !important;
}


/* -----------------------------
   Fake text-link styling

   Usage:
   - Add class npc-fake-link to the Text Editor widget used only for the
     fake "Learn More" text.
   - Or wrap only the words in an inline span:
     <span class="npc-fake-link">Learn More</span>

   Result:
   - Normal state matches NPC text links: blue, underline.
   - Hover/focus state matches NPC text links: NPC red, underline.
   - Color changes only when the mouse is over the fake-link text itself,
     not when hovering the whole clickable card.
------------------------------ */
.npc-fake-link,
.npc-fake-link :where(p, span, strong, b),
.elementor-widget.npc-fake-link :where(p, span, strong, b) {
	color: #1A73E8 !important;
	text-decoration: underline !important;
	text-underline-offset: 3px !important;
	text-decoration-thickness: 1px !important;
	transition: color 0.3s ease, text-decoration-color 0.3s ease;
}

/*
 * When npc-fake-link is added to the Elementor widget, make the inner text
 * shrink to the text width. This avoids the hover color changing across the
 * whole widget row.
 */
.elementor-widget.npc-fake-link :where(p, span) {
	display: inline-block;
	cursor: pointer;
}

/* Inline use: <span class="npc-fake-link">Learn More</span> */
.npc-fake-link:not(.elementor-widget):hover,
.npc-fake-link:not(.elementor-widget):focus,
.npc-fake-link:not(.elementor-widget):hover :where(p, span, strong, b),
.npc-fake-link:not(.elementor-widget):focus :where(p, span, strong, b),

/* Elementor widget use: class npc-fake-link on the Text Editor widget */
.elementor-widget.npc-fake-link :where(p, span):hover,
.elementor-widget.npc-fake-link :where(p, span):focus,
.elementor-widget.npc-fake-link :where(p, span):hover :where(strong, b),
.elementor-widget.npc-fake-link :where(p, span):focus :where(strong, b) {
	color: #E30613 !important;
	text-decoration: underline !important;
	text-underline-offset: 3px !important;
	text-decoration-thickness: 1px !important;
}

/* -----------------------------
   Safety: never style heading links
------------------------------ */
:where(h1, h2, h3, h4, h5, h6) a,
:where(h1, h2, h3, h4, h5, h6) a:hover,
:where(h1, h2, h3, h4, h5, h6) a:focus,
:where(h1, h2, h3, h4, h5, h6) a:visited {
	text-decoration: inherit;
}
