/**
 * Global Gradient Titles - Final Refined Version
 * Description: Applies Black-to-Dark-Blue gradient to news titles, 
 * but excludes/restores Banner, Footer, and Widgets to original colors.
 * Includes a "Brush Style" hover effect.
 */

/* PRE-REQUISITE: Ensure links can have absolute positioned children */
h1.entry-title a,
h2.entry-title a,
.post-title a,
.chamada-title a,
.widget-title a,
.section-title a,
.block-title a {
    position: relative;
    text-decoration: none !important;
    display: inline-block; /* Required for the brush underline to align properly */
}

/* 1. APPLY GRADIENT TO MAJOR NEWS TITLES */
h1.entry-title,
h2.entry-title,
h1.post-title,
h2.post-title,
h3.post-title,
h4.post-title,
h5.post-title,
h6.post-title,
.section-title,
.block-title,
.chamada-title a,
.page-title,
.archive-title {
    background: -webkit-linear-gradient(45deg, #000000, #001a4d) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    color: #001a4d !important;
    text-decoration: none !important;
}

/* 2. RESTORE BANNER (FORCE WHITE) */
#main-banner-section .post-title,
#main-banner-section .post-title a,
.main-banner-slider h2.post-title a,
.main-banner-trailing-posts h2.post-title a {
    background: none !important;
    -webkit-background-clip: initial !important;
    background-clip: initial !important;
    -webkit-text-fill-color: #fff !important;
    color: #fff !important;
}

/* 3. RESTORE FOOTER (FORCE WHITE) */
#colophon .widget-title,
#colophon .post-title,
#colophon .post-title a,
.site-footer .widget-title,
.site-footer .post-title a {
    background: none !important;
    -webkit-background-clip: initial !important;
    background-clip: initial !important;
    -webkit-text-fill-color: #fff !important;
    color: #fff !important;
}

/* 4. RESTORE ALL WIDGETS (SIDEBARS) */
.widget-title,
.secondary-sidebar .widget-title,
.secondary-left-sidebar .widget-title {
    background: none !important;
    -webkit-background-clip: initial !important;
    background-clip: initial !important;
    -webkit-text-fill-color: initial !important;
    color: var(--block-title-color, #000) !important;
}

/* 5. BRUSH-STYLE HOVER EFFECT (DARKER GREEN) */
h1.entry-title a::after,
h2.entry-title a::after,
.post-title a::after,
.chamada-title a::after,
.widget-title a::after,
.section-title a::after,
.block-title a::after {
    content: "";
    position: absolute;
    bottom: 2px;
    left: 0;
    width: 0;
    height: 7px; /* Thick brush stroke */
    background: #018057; /* Darker Green */
    z-index: -1;
    transition: width 0.3s ease-in-out;
    opacity: 0.8;
    
    /* Irregular "Brush" shape using border-radius and skew */
    border-radius: 20% 80% 30% 70% / 60% 30% 70% 40%;
    transform: rotate(-1.2deg);
}

h1.entry-title a:hover::after,
h2.entry-title a:hover::after,
.post-title a:hover::after,
.chamada-title a:hover::after,
.widget-title a:hover::after,
.section-title a:hover::after,
.block-title a:hover::after {
    width: 105%; /* Slightly overflow for extra brush feel */
}

/* Specific Hover for Gradient Titles (maintain gradient depth on hover) */
h1.entry-title a:hover,
h2.entry-title a:hover,
.post-title:not(#main-banner-section .post-title) a:hover,
.chamada-title a:hover {
    background: -webkit-linear-gradient(45deg, #001a4d, #000000) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}
