/**
 * D40 Hot Plausible - Frontend Styles
 */

.d40-hot-articles-widget {
    --d40-title-color: #1a1a1a;
    --d40-subtitle-color: #e53935;
    --d40-accent-color: #e53935;
    --d40-date-color: #999999;
    --d40-hover-color: #e53935;
    --d40-title-font-family: inherit;
    --d40-title-font-size: 24px;
    --d40-title-font-weight: 600;
    --d40-article-title-font-family: inherit;
    --d40-article-title-font-size: 14px;
    --d40-featured-title-font-size: 18px;
    --d40-article-title-font-weight: 400;
    --d40-date-font-size: 12px;
    --d40-image-border-radius: 0px;
    --d40-featured-image-border-radius: 0px;
    --d40-featured-image-height: 200px;
    --d40-thumbnail-size: 70px;
    
    font-family: inherit;
    line-height: 1.5;
}

.d40-hot-header {
    margin-bottom: 20px;
    position: relative;
    padding-left: 15px;
}

.d40-hot-accent-line {
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background-color: var(--d40-accent-color);
}

.d40-hot-title {
    margin: 0 0 5px 0;
    padding: 0;
    font-family: var(--d40-title-font-family);
    font-size: var(--d40-title-font-size);
    font-weight: var(--d40-title-font-weight);
    color: var(--d40-title-color);
    line-height: 1.2;
}

.d40-hot-subtitle {
    display: block;
    font-family: var(--d40-article-title-font-family);
    font-size: var(--d40-article-title-font-size);
    font-weight: 400;
    color: var(--d40-subtitle-color);
}

.d40-hot-featured {
    margin-bottom: 20px;
}

.d40-hot-featured-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease;
}

.d40-hot-featured-link:hover {
    transform: scale(1.01);
}

.d40-hot-featured-link:hover .d40-hot-featured-title {
    color: var(--d40-hover-color);
}

.d40-hot-featured-image {
    width: 100%;
    height: var(--d40-featured-image-height);
    overflow: hidden;
    margin-bottom: 12px;
    border-radius: var(--d40-featured-image-border-radius);
}

.d40-hot-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.d40-hot-featured-title {
    margin: 0;
    padding: 0;
    font-family: var(--d40-title-font-family);
    font-size: var(--d40-featured-title-font-size) !important;
    font-weight: var(--d40-title-font-weight);
    color: var(--d40-title-color);
    line-height: 1.3;
    transition: color 0.2s ease;
}

.d40-hot-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.d40-hot-item {
    margin-bottom: 15px;
    padding-bottom: 15px;
}

.d40-hot-list.d40-show-divider .d40-hot-item {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.d40-hot-list.d40-show-divider .d40-hot-item:last-child {
    border-bottom: none;
}

.d40-hot-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
}

.d40-hot-item-link {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease;
}

.d40-hot-item-link:hover {
    transform: scale(1.01);
}

.d40-hot-item-link:hover .d40-hot-item-title {
    color: var(--d40-hover-color);
}

.d40-hot-item-image {
    flex-shrink: 0;
    width: var(--d40-thumbnail-size) !important;
    height: var(--d40-thumbnail-size) !important;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: var(--d40-image-border-radius);
}

.d40-hot-item-image img {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: cover !important;
    object-position: center;
    display: block;
}

.d40-hot-item-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.d40-hot-item-title {
    display: block;
    font-family: var(--d40-article-title-font-family);
    font-size: var(--d40-article-title-font-size);
    font-weight: var(--d40-article-title-font-weight);
    color: var(--d40-title-color);
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    transition: color 0.2s ease;
}

.d40-hot-item-date {
    display: block;
    font-family: var(--d40-article-title-font-family);
    font-size: var(--d40-date-font-size);
    font-weight: 400;
    color: var(--d40-date-color);
    line-height: 1.3;
}

@media (max-width: 480px) {
    .d40-hot-articles-widget {
        --d40-thumbnail-size: 60px;
    }
    
    .d40-hot-item-link {
        gap: 10px;
    }
    
    .d40-hot-featured-image {
        height: 150px;
    }
}
