joomla-tab-element {
    background-color: black!important;
}

/* --- Targets the Contact Module by checking if it contains .contact-info --- */
.mod-custom.custom:has(.contact-info) {
    background-color: #111111 !important; /* Sleek dark theme background */
    padding: 1.5rem !important;
    border-radius: 6px !important;
    border-left: 4px solid #29a642 !important; /* Sheriff green left accent line */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25) !important;
}

/* Automatically hide empty spacer paragraphs ONLY inside this specific module */
.mod-custom.custom:has(.contact-info) p:not(:has(.contact-info)) {
    display: none !important;
}

/* Style the actual contact block containers ONLY inside this specific module */
.mod-custom.custom:has(.contact-info) p:has(.contact-info) {
    margin-top: 0 !important;
    margin-bottom: 1.25rem !important;
    padding-bottom: 1.25rem !important;
    border-bottom: 1px solid #222222 !important; /* Clean dark divider between sections */
    line-height: 1.6 !important;
}

/* Remove the border divider on the very last contact section */
.mod-custom.custom:has(.contact-info) p:has(.contact-info):last-of-type {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    border-bottom: none !important;
}

/* Format the bold contact titles */
.mod-custom.custom:has(.contact-info) p strong {
    display: block !important;
    font-size: 1.05rem !important;
    color: #29a642 !important; /* Brand green for the headings */
    margin-bottom: 0.2rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px !important;
}

/* Format the address and phone text */
.mod-custom.custom:has(.contact-info) .contact-info {
    font-size: 0.95rem !important;
    color: #dcdcdc !important; /* High contrast off-white for excellent legibility */
    font-weight: 400 !important;
}

/* Make phone numbers inside titles slightly brighter */
.mod-custom.custom:has(.contact-info) p strong .contact-info {
    color: #ffffff !important;
    font-weight: 700 !important;
}


/* --- Safe CSS Overrides for Joomla Cards on Dark Backgrounds --- */
.card {
    /* 1. Swap distracting light border for a highly subtle, semi-transparent dark grey */
    --card-border-color: rgba(255, 255, 255, 0.1) !important;
    
    /* 2. Lift cards off pure black background with a very dark charcoal surface color */
    --card-bg: #111111 !important;
    
    /* 3. Force highly legible text colors inside the cards */
    --card-color: #dcdcdc !important;
    --card-title-color: #ffffff !important;
    --card-subtitle-color: #a0a0a0 !important;
    
    /* 4. Tweak headers and footers to use a dark translucent tint */
    --card-cap-bg: rgba(255, 255, 255, 0.02) !important;
    
    /* 5. Smooth hover transition for a modern touch */
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out !important;
}

/* Elegant Hover Effect: Make the border illuminate slightly when hovered */
.card:hover {
    border-color: rgba(41, 166, 66, 0.4) !important; /* Subtle Sheriff green highlight on hover */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4) !important;
}

/* Ensure list items inside dark cards blend in cleanly without light borders */
.card > .list-group {
    border-color: rgba(255, 255, 255, 0.1) !important;
    background-color: transparent !important;
}

/* Fix text colors inside card headers and footers */
.card-header, .card-footer {
    color: #ffffff !important;
}
/* ========================================================================= */
/* GLOBAL BLOG FRAMEWORK CLEANUP                                            */
/* ========================================================================= */
.com-content-category-blog.blog {
    max-width: 1200px;
    margin: 0 auto;
    color: #e5e5e5 !important;
}

/* Page Header Alignment */
.com-content-category-blog.blog > .page-header h1 {
    color: #29a642 !important; /* Sheriff Brand Green */
    font-weight: 700;
    font-size: 2.2rem;
    border-bottom: 2px solid rgba(41, 166, 66, 0.2);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

/* Category Coroner Button Layout */
.category-desc.clearfix {
    margin-bottom: 2rem;
}
.category-desc .btn-default {
    background-color: #1a1a1a !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
    font-weight: 600;
    transition: all 0.2s ease-in-out;
}
.category-desc .btn-default:hover {
    background-color: #29a642 !important;
    border-color: #29a642 !important;
}

/* ========================================================================= */
/* LEADING ARTICLE: "LATEST NEWS" FEATURE MODIFICATION                      */
/* ========================================================================= */
.items-leading {
    margin-bottom: 3rem !important;
}

.items-leading .blog-item {
    background-color: #111111 !important;
    border: 1px solid rgba(41, 166, 66, 0.3) !important;
    border-top: 5px solid #29a642 !important; /* Standout Top Green Border */
    border-radius: 6px;
    padding: 2rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: row;
    gap: 2rem;
    align-items: center;
    position: relative;
}

/* Adjust Images inside the Featured Section */
.items-leading .item-image {
    flex: 0 0 40%;
    max-width: 450px;
    margin: 0 !important;
}
.items-leading .item-image img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Context Frame Setup */
.items-leading .item-content {
    flex: 1;
}
.items-leading .item-content h2 a {
    color: #ffffff !important;
    font-size: 1.8rem !important;
    font-weight: 700;
    text-decoration: none;
}
.items-leading .item-content h2 a:hover {
    color: #29a642 !important;
}

/* ========================================================================= */
/* SECONDARY CONTENT GRID (MASONRY RESTRUCTURE)                             */
/* ========================================================================= */
.masonry-2 {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1.5rem !important;
    margin-bottom: 3rem;
}

.masonry-2 .blog-item {
    background-color: #111111 !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 6px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transition: transform 0.2s ease-in-out, border-color 0.2s ease-in-out;
}
.masonry-2 .blog-item:hover {
    transform: translateY(-3px);
    border-color: rgba(41, 166, 66, 0.25) !important;
}

/* Grid Images Configuration */
.masonry-2 .item-image {
    width: 100% !important;
    float: none !important;
    margin: 0 0 1.25rem 0 !important;
}
.masonry-2 .item-image img {
    width: 100%;
    height: 220px;
    object-fit: cover; /* Crops cleanly to prevent misalignment */
    border-radius: 4px;
}

/* Content Layout Alignment inside Sub-Cards */
.masonry-2 .item-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
}
.masonry-2 .item-content h2 a {
    color: #ffffff !important;
    font-size: 1.25rem !important;
    font-weight: 700;
    line-height: 1.4;
    text-decoration: none;
}
.masonry-2 .item-content h2 a:hover {
    color: #29a642 !important;
}

/* Shared Micro Typography (Dates, Captions, Readmores) */
.article-info {
    font-size: 0.85rem;
    margin-bottom: 1rem;
}
.article-info-term {
    display: none; /* Strips unneeded "Details" text tag label */
}
.published {
    color: #a0a0a0 !important;
}
.published i, .published span {
    color: #29a642 !important;
    margin-right: 4px;
}

figcaption.caption {
    display: none; /* Cleaner presentation without overlapping native image labels */
}

/* Button Custom Styles */
.btn-secondary {
    background-color: transparent !important;
    border: 1px solid #29a642 !important;
    color: #29a642 !important;
    font-weight: 700 !important;
    padding: 0.4rem 1.25rem !important;
    border-radius: 4px !important;
    transition: all 0.2s ease-in-out !important;
}
.btn-secondary:hover {
    background-color: #29a642 !important;
    color: #ffffff !important;
}

/* ========================================================================= */
/* JOOMLA NATIVE PAGINATION BEAUTIFICATION                                  */
/* ========================================================================= */
.com-content-category-blog__navigation {
    border-top: 1px solid rgba(255,255,255,0.08);
    margin-top: 2rem;
    padding-top: 1.5rem;
}
.pagination .page-item .page-link {
    background-color: #111111 !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #cccccc !important;
    padding: 0.5rem 0.9rem;
    transition: all 0.2s ease-in-out;
}
.pagination .page-item.active .page-link {
    background-color: #29a642 !important;
    border-color: #29a642 !important;
    color: #ffffff !important;
}
.pagination .page-item:not(.active):not(.disabled) .page-link:hover {
    background-color: #1a1a1a !important;
    color: #ffffff !important;
    border-color: rgba(41, 166, 66, 0.4) !important;
}
.pagination .page-item.disabled .page-link {
    background-color: #0c0c0c !important;
    opacity: 0.3;
}

/* ========================================================================= */
/* RESPONSIVE DESIGN ADJUSTMENTS                                            */
/* ========================================================================= */
@media (max-width: 992px) {
    .items-leading .blog-item {
        flex-direction: column;
        align-items: flex-start;
        padding-top: 2.5rem;
    }
    .items-leading .item-image {
        max-width: 100%;
        width: 100% !important;
    }
    .masonry-2 {
        grid-template-columns: 1fr !important; /* Stack columns down on mobile tablets */
    }
}

/* ========================================================================= */
/* ARTICLE PAGE CONTAINER & TYPOGRAPHY STYLE                                 */
/* ========================================================================= */
.com-content-article.item-page {
    color: #e5e5e5 !important;
    line-height: 1.7;
}

/* Category Title (Media Relations) */
.com-content-article.item-page > .page-header:first-of-type h1 {
    color: #29a642 !important; /* Sheriff Brand Green */
    font-weight: 700;
    font-size: 1.4rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

/* Core Article Title */
.com-content-article.item-page > .page-header:nth-of-type(2) h2 {
    color: #ffffff !important;
    font-weight: 700;
    font-size: 2.2rem;
    line-height: 1.3;
    margin-top: 0;
    margin-bottom: 1rem;
}

/* Published Date Meta Text */
.com-content-article .article-info {
    font-size: 0.9rem;
    color: #a0a0a0 !important;
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 1rem;
}
.com-content-article .article-info-term {
    display: none; /* Hide the generic "Details" text label */
}
.com-content-article .published span {
    color: #29a642 !important;
    margin-right: 4px;
}

/* Body Paragraph Styling */
.com-content-article__body p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

/* Inline Bullet Point Warnings */
.com-content-article__body ul {
    background-color: rgba(220, 53, 69, 0.05);
    border-left: 4px solid #dc3545; /* Red Warning Border */
    padding: 1.25rem 1.25rem 1.25rem 2.5rem;
    border-radius: 0 6px 6px 0;
    margin: 2rem 0;
    list-style-type: square;
}
.com-content-article__body ul li {
    font-size: 1rem;
}

/* Inline Safety Numbered Lists */
.com-content-article__body p:has(+ p:始于"1)") {
    font-weight: 700;
    color: #29a642 !important;
    font-size: 1.2rem;
    margin-top: 2rem;
}

/* ========================================================================= */
/* AUTOMATIC NATIVE PDF LINK TO PREMIUM CTA BUTTON BLOCK                     */
/* ========================================================================= */
.com-content-article__links.content-links {
    margin: 1.5rem 0 2.5rem 0;
    padding: 0;
}
.com-content-article__links .content-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}
.com-content-article__link.content-links-a a {
    display: inline-flex;
    align-items: center;
    background-color: #29a642 !important; /* Green Button Fill */
    color: #ffffff !important;
    font-weight: 700;
    font-size: 1.05rem;
    text-decoration: none !important;
    padding: 0.75rem 1.75rem;
    border-radius: 50px; /* Pill Shape */
    box-shadow: 0 4px 15px rgba(41, 166, 66, 0.3);
    transition: all 0.2s ease-in-out;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Inject a PDF File Icon Natively Ahead of the Text Link */
/* Inject a PDF File Icon Natively Ahead of the Text Link */
.com-content-article__link.content-links-a a::before {
    content: "\f1c1" !important; /* FontAwesome PDF icon code */
    font-family: "Font Awesome 5 Free", "Font Awesome 6 Free", "FontAwesome", sans-serif !important;
    font-weight: 900 !important;  /* CRITICAL: Solid icons won't display without font-weight: 900 */
    margin-right: 10px;
    font-size: 1.2rem;
    display: inline-block;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
}

/* Replace long raw ugly path names cleanly with actionable text */
.com-content-article__link.content-links-a a {
    font-size: 0px !important; /* Hide long link filename text safely */
}
.com-content-article__link.content-links-a a::after {
    content: "Download Official PDF Release"; /* Clean Title Replacement */
    font-size: 1.05rem !important;
}

/* Interactive Hover States for PDF block Button */
.com-content-article__link.content-links-a a:hover {
    background-color: #ffffff !important;
    color: #111111 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.2);
}

/* ========================================================================= */
/* GRAPHICS, MEDIA, AND IMAGE CAPTION HANDLING                               */
/* ========================================================================= */
/* Main Intro Featured Image (Float Left Setup) */
.com-content-article .item-image {
    float: left;
    margin: 0 2rem 1.5rem 0 !important;
    max-width: 450px;
    width: 100%;
}
.com-content-article .item-image img {
    width: 100%;
    height: auto;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Full-width content image frames inside the body text layout */
.com-content-article__body figure.image {
    display: block;
    margin: 2.5rem auto !important;
    text-align: center;
    max-width: 100%;
    width: 100%;
}
.com-content-article__body figure.image img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Universal Image Caption Custom Styling */
figcaption, .caption {
    font-size: 0.9rem;
    color: #a0a0a0 !important;
    font-style: italic;
    margin-top: 0.5rem;
    text-align: center;
}

/* Clearfix utility to fix float styling cutoffs */
.com-content-article__body::after {
    content: "";
    display: table;
    clear: both;
}

/* ========================================================================= */
/* MOBILE SMARTPHONE RESPONSIVE MEDIA STYLES                                  */
/* ========================================================================= */
@media (max-width: 768px) {
    .com-content-article.item-page > .page-header :nth-of-type(2) h2 {
        font-size: 1.75rem !important;
    }
    .com-content-article .item-image {
        float: none !important;
        margin: 0 0 1.5rem 0 !important;
        max-width: 100%;
    }
    .com-content-article__link.content-links-a a {
        display: flex;
        justify-content: center;
        width: 100%;
    }
}