/**
 * Shared Posts Plugin Styles
 */

/* Main Grid Container */
.postgrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

/* Grid Format (Format 1) */
.block {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.photo {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.content {
    padding: 15px;
}

.content h3 {
    margin: 0 0 10px 0;
    font-size: 1.2em;
    color: #333;
}

.content h3 a {
    text-decoration: none;
    color: inherit;
}

.content h3 a:hover {
    color: #0073aa;
}

.content p {
    margin: 0 0 10px 0;
    color: #666;
    font-size: 0.9em;
    line-height: 1.5;
}

.content a {
    text-decoration: none;
    color: #0073aa;
}

.content a:hover {
    text-decoration: underline;
}

.content h5 {
    margin: 10px 0 0 0;
    font-size: 0.8em;
    color: #999;
}

/* List Format (Format 2) */
.list-item {
    display: flex;
    border-bottom: 1px solid #ddd;
    padding: 15px 0;
    align-items: center;
}

.list-item:last-child {
    border-bottom: none;
}

.list-photo {
    width: 120px;
    height: 80px;
    flex-shrink: 0;
    margin-right: 15px;
    overflow: hidden;
    border-radius: 4px;
}

.list-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.list-content {
    flex: 1;
}

.list-content h3 {
    margin: 0 0 5px 0;
    font-size: 1em;
    color: #333;
}

.list-content h3 a {
    text-decoration: none;
    color: inherit;
}

.list-content h3 a:hover {
    color: #0073aa;
}

.list-content p {
    margin: 0 0 5px 0;
    color: #666;
    font-size: 0.85em;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.list-content h5 {
    margin: 5px 0 0 0;
    font-size: 0.75em;
    color: #999;
}

/* Carousel Format (Format 3) */
.carousel-item {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.carousel-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.carousel-photo {
    width: 100%;
    height: 180px;
    overflow: hidden;
}

.carousel-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-content {
    padding: 12px;
}

.carousel-content h3 {
    margin: 0 0 8px 0;
    font-size: 1.1em;
    color: #333;
}

.carousel-content h3 a {
    text-decoration: none;
    color: inherit;
}

.carousel-content h3 a:hover {
    color: #0073aa;
}

.carousel-content p {
    margin: 0 0 8px 0;
    color: #666;
    font-size: 0.85em;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.carousel-content h5 {
    margin: 8px 0 0 0;
    font-size: 0.75em;
    color: #999;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .postgrid {
        grid-template-columns: 1fr;
    }
    
    .list-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .list-photo {
        width: 100%;
        height: 150px;
        margin-right: 0;
        margin-bottom: 10px;
    }
}
