/* Site Kit for Yandex - Addon Styles */

/* Post Cards — shared styles */
.skfy-post-card,
.skfy-reading-now-card {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: 180px;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none !important;
    background-size: cover;
    background-position: center;
    background-color: #333;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skfy-post-card:hover,
.skfy-reading-now-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.skfy-post-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(transparent 40%, rgba(0,0,0,0.85));
    z-index: 1;
}

.skfy-post-card-content {
    position: relative;
    z-index: 2;
    padding: 16px;
    width: 100%;
}

.skfy-post-card-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: calc(1.4em * 2);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 6px;
    text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

.skfy-post-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    font-size: 12px;
    color: rgba(255,255,255,0.85);
}

.skfy-post-card-meta .skfy-post-visits {
    font-weight: 600;
    color: #fff;
}

.skfy-post-card-meta .skfy-post-comments {
    color: rgba(255,255,255,0.75);
}

.skfy-post-card-meta .skfy-post-date {
    color: rgba(255,255,255,0.7);
}

/* Popular by Category */
.skfy-popular-by-category {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin: 20px 0;
}

.skfy-category-block {
    flex: 1 1 280px;
    border-radius: 8px;
    padding: 0;
    box-shadow: none;
    background: transparent;
    display: flex;
    flex-direction: column;
}

.skfy-category-title {
    font-size: 18px;
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e0e0e0;
    height: calc(1.4em * 2 + 8px);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    box-sizing: content-box;
}

.skfy-category-title a {
    color: inherit;
    text-decoration: none;
}

.skfy-category-title a:hover {
    text-decoration: underline;
}

.skfy-category-posts {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.skfy-post-card {
    flex-shrink: 0;
}

.skfy-post-card-featured {
    min-height: 240px;
    width: 100%;
}

.skfy-post-row {
    display: flex;
    gap: 12px;
    flex: 1;
}

.skfy-post-card-half {
    flex: 1 1 50%;
    min-width: 0;
    min-height: 180px;
}

/* Mobile & tablet: stack posts vertically */
@media (max-width: 1024px) {
    .skfy-post-row {
        flex-direction: column;
    }

    .skfy-post-card-half {
        flex: 1 1 100%;
    }
}

.skfy-visits {
    font-weight: 600;
    color: #0073aa;
}

.skfy-comments {
    color: #666;
}

/* Reading Now */
.skfy-reading-now {
    margin: 20px 0;
}

.skfy-reading-now-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e0e0e0;
}

.skfy-reading-now-title {
    font-size: 18px;
    margin: 0;
}

.skfy-reading-now-footnote {
    font-size: 12px;
    color: #999;
    font-style: italic;
    flex-shrink: 0;
}

.skfy-reading-now-posts {
    display: flex;
    gap: 12px;
}

.skfy-reading-now-card {
    flex: 1;
    min-width: 0;
    min-height: 200px;
}

@media (max-width: 768px) {
    .skfy-reading-now-posts {
        flex-direction: column;
    }
}

/* Loading / placeholder */
.skfy-addon-loading {
    color: #888;
    font-style: italic;
    padding: 12px 0;
}

/* Last Comments */
.skfy-last-comments {
    background: #fafafa;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.skfy-last-comments-title {
    font-size: 18px;
    margin: 0 0 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e0e0e0;
}

.skfy-last-comments-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 16px;
}

@media (max-width: 768px) {
    .skfy-last-comments-list {
        flex-direction: column;
    }
}

.skfy-last-comments-item {
    flex: 1 1 0;
    min-width: 0;
    background: #fff;
    border-radius: 8px;
    padding: 14px;
    border: 1px solid #eee;
}

.skfy-last-comments-item:last-child {
    margin-bottom: 0;
    padding-bottom: 14px;
    border-bottom: 1px solid #eee;
}

.skfy-last-comments-avatar-wrap {
    flex-shrink: 0;
}

.skfy-last-comments-avatar {
    border-radius: 50%;
    width: 40px;
    height: 40px;
}

.skfy-last-comments-body {
    flex: 1;
    min-width: 0;
}

.skfy-last-comments-author {
    font-weight: 600;
    font-size: 13px;
    color: #333;
    display: block;
    margin-bottom: 2px;
}

.skfy-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 1px 6px;
    border-radius: 3px;
    margin-left: 6px;
    vertical-align: middle;
}

.skfy-badge-author {
    background: #e3f2fd;
    color: #1565c0;
}

.skfy-badge-reader {
    background: #f3e5f5;
    color: #7b1fa2;
}

.skfy-last-comments-text {
    font-size: 13px;
    color: #555;
    margin: 0 0 4px;
    line-height: 1.5;
}

.skfy-last-comments-post {
    font-size: 12px;
    color: #0073aa;
    text-decoration: none;
}

.skfy-last-comments-post:hover {
    text-decoration: underline;
}
