/* --- Styles for Latest Posts Cards Plugin (Version 1.2.0) --- */

/* Defensive CSS: This wrapper class establishes a safe-zone for the plugin,
  preventing aggressive theme styles from breaking the layout.
*/
.lpc-plugin-wrapper {
    width: 100%;
    max-width: 100%;
    clear: both;
    float: none;
    margin: 2rem 0;
    box-sizing: border-box;
}

/* Using highly specific, unique class names to avoid conflicts. */
.lpc-plugin__container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}

.lpc-plugin__card {
    background-color: #ffffff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.lpc-plugin__card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.15);
}

.lpc-plugin__image-container {
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    position: relative;
    background-color: #f0f0f0;
}

.lpc-plugin__image-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lpc-plugin__placeholder-image {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    font-size: 1.2rem;
    height: 100%;
    position: absolute;
    top: 0;
    width: 100%;
}

.lpc-plugin__content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.lpc-plugin__title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 0.75rem 0;
    padding: 0;
    color: #333;
    line-height: 1.3;
}

.lpc-plugin__title a {
    text-decoration: none;
    color: inherit;
}

.lpc-plugin__title a:hover {
    color: #5a67d8;
}

.lpc-plugin__excerpt {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.6;
    margin: 0 0 1.5rem 0;
    padding: 0;
    flex-grow: 1;
}

/* Ensure paragraphs inside the excerpt don't have weird theme margins */
.lpc-plugin__excerpt p {
    margin: 0;
    padding: 0;
}

.lpc-plugin__read-more {
    display: inline-block;
    background-image: linear-gradient(45deg, #89f7fe 0%, #66a6ff 100%);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.lpc-plugin__read-more:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(102, 166, 255, 0.4);
}
