/* Базовая типографика и сетка (светлая, аккуратная тема) */
*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --bg-body: #f3f4f6;
    --bg-card: #ffffff;
    --bg-header: #0f172a;
    --bg-header-accent: #1d283a;
    --bg-footer: #0f172a;
    --text-main: #111827;
    --text-muted: #6b7280;
    --border-soft: #e5e7eb;
    --accent: #2563eb;
    --accent-soft: #dbeafe;
    --accent-strong: #1d4ed8;
    --radius-lg: 16px;
    --shadow-soft: 0 18px 35px rgba(15, 23, 42, 0.12);
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: radial-gradient(circle at top, #e5f0ff 0, #f3f4f6 48%, #e5e7eb 100%);
    color: var(--text-main);
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.5rem;
}

.site-header {
    background: linear-gradient(120deg, var(--bg-header) 0%, var(--bg-header-accent) 50%, #0f766e 100%);
    color: #e5e7eb;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.4);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.logo a {
    font-weight: 700;
    font-size: 1.2rem;
    color: #f9fafb;
}

.main-nav a {
    margin-left: 1rem;
    font-size: 0.95rem;
    color: #e5e7eb;
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    transition: background 0.15s ease, color 0.15s ease;
}

.main-nav a:hover {
    background: rgba(15, 23, 42, 0.4);
    color: #ffffff;
}

.site-main {
    padding: 2rem 0 3rem;
}

.site-footer {
    background: var(--bg-footer);
    border-top: 1px solid rgba(148, 163, 184, 0.4);
    padding: 1.5rem 0;
    font-size: 0.85rem;
    color: #9ca3af;
}

.site-footer .container {
    text-align: center;
}

h1, h2, h3, h4 {
    color: #0f172a;
    margin-top: 0;
}

.page-subtitle {
    color: var(--text-muted);
    margin-top: 0.25rem;
    margin-bottom: 1.5rem;
}

/* Каталог карточек */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
}

.card,
.blog-card {
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.3rem 1.3rem;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.card:hover,
.blog-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 22px 45px rgba(15, 23, 42, 0.18);
    border-color: #bfdbfe;
}

.card-title,
.blog-card-title {
    font-size: 1.05rem;
    margin: 0;
}

.card-title a,
.blog-card-title a {
    color: #111827;
}

.card-meta {
    font-size: 0.85rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.18rem 0.6rem;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-strong);
    font-size: 0.75rem;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.badge-secondary {
    background: #eef2ff;
    color: #4f46e5;
    border-color: rgba(129, 140, 248, 0.3);
}

.card-text,
.blog-card-preview {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.card-actions {
    margin-top: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Кнопки */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.05s ease, box-shadow 0.12s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #2563eb, #22c55e);
    color: #f9fafb;
    border-color: transparent;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.35);
}

.btn-outline {
    background: transparent;
    border-color: var(--border-soft);
    color: #111827;
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent-strong);
    background: #eff6ff;
}

/* Breadcrumbs */
.breadcrumb {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.breadcrumb a {
    color: #111827;
}

/* Страница провайдера */
.provider-details h1 {
    margin-bottom: 0.4rem;
}

.provider-meta {
    margin-bottom: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.provider-description {
    margin-top: 1.5rem;
    line-height: 1.6;
    color: #111827;
}

/* Блог */
.blog-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.blog-card-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.blog-post h1 {
    margin-bottom: 1rem;
}

.blog-post-content h2,
.blog-post-content h3 {
    margin-top: 1.4rem;
    margin-bottom: 0.5rem;
}

.blog-post-content p {
    line-height: 1.6;
    margin: 0.4rem 0;
    color: #111827;
}

.blog-post-content ul {
    padding-left: 1.2rem;
}

.blog-post-content li {
    margin: 0.2rem 0;
}

.blog-post-content a {
    color: var(--accent);
}

/* Адаптивность */
@media (max-width: 640px) {
    .site-header .container {
        flex-direction: column;
        align-items: flex-start;
    }

    .main-nav a {
        margin-left: 0;
        margin-right: 0.8rem;
    }
}
