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;
}