.ctp-thumbnail {
    display: inline-block;
    text-align: center;
    margin: 10px;
    position: relative; /* Enable absolute positioning for child elements */
    cursor: pointer;
    overflow: hidden; /* Prevent hover effects from exceeding the container */
}

.ctp-thumbnail img {
    border: 1px solid #fff;
    border-radius: 4px;
    transition: transform 0.3s ease, opacity 0.3s ease;
    cursor: pointer;
    display: block;
    width: 100%; /* Ensure image scales properly */
}

.ctp-thumbnail img:hover {
    transform: scale(1.05);
}

.ctp-thumbnail::before {
    content: ""; /* Empty content for the overlay */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0); /* Fully transparent by default */
    transition: background-color 0.3s ease; /* Smooth darkening effect */
    z-index: 1; /* Place the overlay above the image */
    pointer-events: none; /* Allow clicks to pass through the overlay */
}

.ctp-thumbnail:hover::before {
    background-color: rgba(0, 0, 0, 0.6); /* Dark overlay on hover */
}

.ctp-thumbnail::after {
    content: "Download Full Resolution"; /* Text to display on hover */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
    font-weight: bold;
    z-index: 2; /* Place the text above the overlay */
    opacity: 0; /* Hidden by default */
    transition: opacity 0.3s ease;
    pointer-events: none; /* Prevent interaction issues */
    font-family: 'Roboto', sans-serif; /* Apply Roboto font */
}

.ctp-thumbnail:hover::after {
    opacity: 1; /* Show text on hover */
}
