/* ========================================
   components.css — Сквозные блоки
   trust-panel, seo-content, tag-links
   ======================================== */

/* Редакционная метастрока — byline */
.content-meta {
    padding: 0.625rem 0;
    border-top: 1px solid var(--border-light, #e5e7eb);
    margin-top: 0.5rem;
}
.content-meta__line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.375rem 0.625rem;
    font-size: 0.8125rem;
    line-height: 1.4;
    color: var(--text-muted, #9ca3af);
}
.content-meta__item {
    white-space: nowrap;
}
.content-meta__sep {
    color: var(--border-light, #d1d5db);
    user-select: none;
}
.content-meta__author {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--text-primary, #374151);
    text-decoration: none;
    font-weight: 500;
    white-space: nowrap;
}
.content-meta__author img {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
}
.content-meta__author:hover {
    color: var(--brand-primary, #0a6a94);
}

/* SEO-контент */
.seo-content {
    padding: 3rem 0;
    background: var(--bg-card, #fff);
}
.seo-content .container {
    max-width: 900px;
}
.seo-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-heading, #1f2937);
    margin-bottom: 1rem;
    margin-top: 2rem;
}
.seo-content h2:first-child {
    margin-top: 0;
}
.seo-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-heading, #1f2937);
    margin-bottom: 0.75rem;
    margin-top: 1.5rem;
}
.seo-content p {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-secondary, #4b5563);
    margin-bottom: 1rem;
}
.seo-content strong {
    color: var(--text-primary, #1f2937);
}
.seo-content ul, .seo-content ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
    color: var(--text-secondary, #4b5563);
}
.seo-content li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}
.seo-content a {
    color: var(--brand-primary, #0a6a94);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.seo-content a:hover {
    color: var(--brand-600, #085d82);
}

/* tag-links: видимость ссылок */
.tag-links__item,
.tag-links__item:visited {
    color: var(--text-primary, #1f2937) !important;
    background: #fff;
}
.tag-links__item:hover {
    color: #fff !important;
    background: var(--brand-primary, #0a6a94);
}
.tag-links__item--accent,
.tag-links__item--accent:visited {
    color: #fff !important;
}

/* Рейтинг МФО на главной */
.ratings-seo__top {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.ratings-seo__item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-light, #e5e7eb);
}
.ratings-seo__item:last-child {
    border-bottom: none;
}
.ratings-seo__rank {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--brand-primary, #0a6a94);
    color: #fff;
    font-weight: 700;
    font-size: 0.8125rem;
    flex-shrink: 0;
}
.ratings-seo__name {
    flex: 1;
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--text-primary, #1f2937);
}
.ratings-seo__rate {
    font-size: 0.875rem;
    color: var(--text-secondary, #6b7280);
    white-space: nowrap;
}

/* Полезные разделы на главной */
.useful-sections {
    padding: 3rem 0;
    background: var(--bg-page, #f8f9fa);
}
.useful-sections__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-top: 1.5rem;
}
.useful-card {
    display: block;
    padding: 1.5rem;
    background: var(--bg-card, #fff);
    border: 1px solid var(--border-light, #e5e7eb);
    border-radius: 12px;
    text-decoration: none;
    transition: box-shadow 0.2s, border-color 0.2s;
}
.useful-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-color: var(--brand-primary, #0a6a94);
}
.useful-card__title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary, #1f2937);
    margin: 0 0 0.5rem;
}
.useful-card__desc {
    font-size: 0.8125rem;
    line-height: 1.5;
    color: var(--text-secondary, #6b7280);
    margin: 0;
}

/* Динамический рейтинг МФО на главной */
.ratings-seo__top--dynamic {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.ratings-seo__loading,
.ratings-seo__error {
    padding: 1.5rem;
    text-align: center;
    color: var(--text-muted, #9ca3af);
    font-size: 0.875rem;
}
.home-rating__item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-light, #e5e7eb);
    text-decoration: none;
    color: inherit;
    transition: background 0.15s;
}
.home-rating__item:last-child {
    border-bottom: none;
}
.home-rating__item:hover {
    background: var(--bg-page, #f8f9fa);
}
.home-rating__rank {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--brand-primary, #0a6a94);
    color: #fff;
    font-weight: 700;
    font-size: 0.8125rem;
    flex-shrink: 0;
}
.home-rating__logo {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.home-rating__logo img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 6px;
    object-fit: contain;
}
.home-rating__info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}
.home-rating__name {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--text-primary, #1f2937);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.home-rating__stars {
    display: flex;
    align-items: center;
    gap: 0.125rem;
    font-size: 0.75rem;
}
.star--full { color: #f59e0b; }
.star--half { color: #f59e0b; opacity: 0.6; }
.star--empty { color: #d1d5db; }
.home-rating__score {
    font-size: 0.75rem;
    color: var(--text-muted, #6b7280);
    margin-left: 0.25rem;
}
.home-rating__conditions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.125rem;
    flex-shrink: 0;
}
.home-rating__param {
    font-size: 0.8125rem;
    color: var(--text-secondary, #6b7280);
    white-space: nowrap;
}
.home-rating__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.375rem 0.875rem;
    background: var(--brand-primary, #0a6a94);
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: 6px;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 0.15s;
}
.home-rating__item:hover .home-rating__cta {
    background: var(--brand-600, #085d82);
}

/* ========== Адаптив ========== */
@media (max-width: 992px) {
    .useful-sections__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 768px) {
    .content-meta__line {
        gap: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
    .content-meta__author img {
        width: 20px;
        height: 20px;
    }
    .useful-sections__grid {
        grid-template-columns: 1fr;
    }
    .home-rating__item {
        gap: 0.5rem;
        padding: 0.625rem 0.75rem;
    }
    .home-rating__conditions {
        display: none;
    }
    .home-rating__cta {
        padding: 0.3rem 0.625rem;
        font-size: 0.75rem;
    }
}
