/* Tooltip container */
.tooltip-keyword {
    position: relative;
    cursor: pointer;
    color: inherit; /* Make the keyword color the same as the rest of the article text */
    border-bottom: 2px dotted #3379b5; /* Adds a dotted line beneath the keyword */
}

/* Tooltip content */
.tooltip-content {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px;
    background-color: #333;
    color: white;
    border-radius: 5px;
    white-space: nowrap;
    display: none; /* Hide the tooltip by default */
    z-index: 9999;
    min-width: 200px; /* Optional: Set a minimum width for the tooltip */
}

/* Show the tooltip when hovering */
.tooltip-keyword.show-tooltip .tooltip-content {
    display: block;
}

/* Tooltip position adjustments for mobile */
@media (max-width: 768px) {
    .tooltip-content {
        min-width: 150px; /* Adjust width on mobile */
        font-size: 14px; /* Optional: Make font smaller on mobile */
    }

    /* Position the tooltip above the keyword on mobile for better visibility */
    .tooltip-keyword.show-tooltip .tooltip-content {
        top: -100%; /* Tooltip appears above the keyword */
    }
}
