/* General Styles for the Random Sidebar Links */
.random-sidebar-links-widget .random-sidebar-links {
    display: flex;
    flex-direction: column;
    align-items: center !important; /* Center align the links */
    padding: 0;
    margin: 0;
}

/* Styles for Each Sidebar Link Item (div) */
.random-sidebar-links-widget .random-sidebar-links .sidebar-link-item {
    min-width: 238px;
    max-width: 238px;
    padding: 8px !important;
    margin-bottom: 6px !important;
    border: 1px solid rgb(0, 102, 204);
    background-color: white;
    box-shadow: 0px 0px 0px #0000 !important;
    border-radius: 5px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative; /* Needed to ensure hover effects on entire div */
}

/* Hover Effect for Sidebar Link Items (applies to whole div) */
.random-sidebar-links-widget .random-sidebar-links .sidebar-link-item:hover {
    transform: scale(1.07); /* Slight zoom-in effect */
    box-shadow: 0px 0px 10px #0002; /* Subtle shadow */
}

/* Styles for Anchor Tags (Link Text) */
.random-sidebar-links-widget .random-sidebar-links .sidebar-link-item a {
    display: block; /* Block-level for better alignment */
    white-space: nowrap; /* Prevent text wrapping */
    font-size: 16px !important; /* Larger font size for prominence */
    font-family: Arial, Helvetica, sans-serif; /* Clean font */
    font-weight: 700; /* Bold text */
    line-height: 1.5; /* Better readability */
    letter-spacing: 0px; /* Normal spacing */
    font-style: normal; /* No italics */
    text-align: center; /* Center-align text */
    margin: 0px;
    color: rgb(0, 102, 204); /* Blue text color */
    text-decoration: none; /* Remove underlines */
    position: relative; /* For positioning the border */
    transition: color 0.2s ease, border-color 0.2s ease;
}

/* Hover Effect for Links (when the whole div is hovered) */
.random-sidebar-links-widget .random-sidebar-links .sidebar-link-item:hover a {
    color: #0056b3; /* Darker blue on hover */
    border-color: #0056b3; /* Match the text color */
}

/* Styles for Span Text (Secondary Info inside <a> tag) */
.random-sidebar-links-widget .random-sidebar-links .sidebar-link-item a span.custom-link-text {
    display: block; /* Block-level for proper alignment */
    font-size: 14px; /* Slightly smaller text */
    line-height: 24px; /* Balanced line height */
    margin-top: 4px; /* Space between the link text and span */
    text-align: left; /* Center align text */
    color: #555; /* Subtle gray color */
    position: relative; /* Positioning for border */
    padding-left: 8%;
}

/* Hover Effect for Custom Link Text when the whole sidebar-link-item is hovered */
.random-sidebar-links-widget .random-sidebar-links .sidebar-link-item:hover a span.custom-link-text {
    color: #333; /* Darker color on hover */
}

/* Adding the border just before the span text */
.random-sidebar-links-widget .random-sidebar-links .sidebar-link-item a span.custom-link-text::before {
    content: "";
    position: absolute;
    top: -5px;
    left: 50%; /* Position the border in the center */
    width: 85%; /* Make the border 70% of the width */
    transform: translateX(-50%); /* Adjust the border to be centered properly */
    border-bottom: 1px solid #ddd; /* The color of the border */
}

/* Styles for the <span> element that acts as a border */
.random-sidebar-links-widget .random-sidebar-links .li-border {
    display: block;
    width: 80%;
    border-bottom: 1px solid #ddd; /* Border after each item */
    margin-bottom: 6px; /* Space between the link item and border */
}

/* Responsive Adjustments for li-border */

/* For screens smaller than 768px (Tablets and smaller) */
@media (max-width: 768px) {
    .random-sidebar-links-widget .random-sidebar-links .li-border {
        width: 90%; /* Increase width for smaller screens */
        margin-bottom: 8px; /* Adjust spacing */
    }

    .random-sidebar-links-widget .random-sidebar-links .sidebar-link-item {
        min-width: 90%;
        max-width: 90%;
        margin-bottom: 10px;
    }

    .random-sidebar-links-widget .random-sidebar-links .sidebar-link-item a {
        font-size: 14px;
    }
}

/* For screens smaller than 480px (Mobile devices) */
@media (max-width: 480px) {
    .random-sidebar-links-widget .random-sidebar-links .li-border {
        width: 90%; /* Full width on mobile */
        margin-bottom: 10px; /* Adjust spacing */
    }

    .random-sidebar-links-widget .random-sidebar-links .sidebar-link-item {
        min-width: 90%; /* Full width on mobile */
        max-width: 90%;
        padding: 12px; /* Increase padding for better touch experience */
    }

    .random-sidebar-links-widget .random-sidebar-links .sidebar-link-item a {
        font-size: 13px;
    }

    .random-sidebar-links-widget .random-sidebar-links .sidebar-link-item a span.custom-link-text {
        font-size: 12px; /* Adjust text size for mobile */
    }
}

/* Custom Icon Styling */
.random-sidebar-links-widget .random-sidebar-links .sidebar-link-item a img.custom-icon {
    width: 20px; /* Set consistent icon size */
    height: 20px;
    margin-left: 4px;
    position: absolute;
    right: 10px; /* Align to the far right */
    top: 75%;
    transform: translateY(-50%); /* Adjust alignment to the middle */
}

/* Hover effect for icons */
.random-sidebar-links-widget .random-sidebar-links .sidebar-link-item:hover a img.custom-icon {
    /*filter: brightness(0.8); *//* Darken the icon slightly on hover */
}
