.research-papers-list {
    list-style: none;
    /* Removes default bullet points */
    padding: 0;
    margin: 0 auto;
    /* Center the list */
    display: flex;
    /* Arranges items in a row */
    flex-wrap: wrap;
    /* Allows items to wrap to the next line on smaller screens */
    gap: 25px;
    /* Space between the paper items */
    justify-content: center;
    /* Centers the items if there's extra space */
    max-width: 1200px;
    /* Max width for the entire list container */
}

.paper-item {
    background-color: #fff;
    border-radius: 12px;
    /* More rounded for modern look */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.05);
    /* Enhanced shadow */
    overflow: hidden;
    /* Ensures content stays within rounded corners */
    width: 100%;
    /* Default to full width for small screens */
    max-width: 800px;
    /* Max width for each item on larger screens (adjust as needed) */

    /* --- THESE ARE THE CRITICAL PROPERTIES FOR SIDE-BY-SIDE --- */
    display: flex;
    flex-direction: row;
    /* Image and content side-by-side by default */
    align-items: stretch;
    /* Ensures items stretch to the full height of the card */

    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.paper-item:hover {
    transform: translateY(-8px);
    /* Enhanced lift effect */
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15), 0 6px 15px rgba(0, 0, 0, 0.1);
    /* More prominent shadow on hover */
}

.paper-item img {
    /* Adjust image sizing for side-by-side layout */
    width: 50%;
    /* Image takes about 35% of the card's width */
    min-width: 120px;
    /* Ensure image doesn't get too small */
    height: auto;
    /* Maintain aspect ratio */
    object-fit: cover;
    /* Ensures image covers the area without distortion */

    /* Correct border radii for horizontal layout */
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
    /* Round bottom-left for horizontal card */
    border-top-right-radius: 0;
    /* Remove top-right radius */
    border-bottom-right-radius: 0;
    /* Remove bottom-right radius */
}

.paper-content {
    padding: 20px;
    flex-grow: 1;
    /* Allows content to take up the remaining space */
    display: flex;
    flex-direction: column;
    /* Stack title, description, and link vertically within the content area */
    justify-content: space-between;
    /* Distributes space between elements */
}

.paper-content h3 {
    margin-top: 0;
    margin-bottom: 8px;
    /* Slightly less margin */
    color: #d11d2e;
    /* A deeper indigo for titles (Material Design primary color) */
    font-size: 1.25em;
    /* Slightly larger title */
}

.paper-content p {
    margin-bottom: 15px;
    color: #555;
    font-size: 0.9em;
    /* Slightly smaller description font */
    line-height: 1.5;
}

.paper-content a {
    display: inline-block;
    background-color: #8C1515;
    /* Match title color for button */
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    /* Slightly less rounded button */
    text-decoration: none;
    font-weight: 500;
    /* Medium font weight */
    align-self: flex-start;
    /* Align link to the start */
    transition: background-color 0.2s ease;
}

.paper-content a:hover {
    background-color: #303f9f;
    /* Darker shade on hover */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    /* Subtle shadow on hover */
}

/* Responsive Adjustments: Stack vertically on very small screens */
@media (max-width: 600px) {
    .paper-item {
        flex-direction: column;
        /* Stack image and content vertically */
        max-width: 350px;
        /* Adjust max width for single column layout */
    }

    .paper-item img {
        width: 100%;
        /* Image takes full width when stacked */
        height: 180px;
        /* Fixed height for consistency when stacked */
        /* Adjust border-radius for stacked layout */
        border-top-left-radius: 8px;
        border-top-right-radius: 8px;
        border-bottom-left-radius: 0;
        /* Remove bottom-left radius when stacked */
        border-bottom-right-radius: 0;
        /* Remove bottom-right radius when stacked */
    }

    .paper-content {
        padding: 15px;
        /* Slightly less padding when stacked */
    }

    .paper-content h3 {
        font-size: 1.15em;
    }

    .paper-content p {
        font-size: 0.85em;
    }
}