/* ===== БАЗА ===== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    background: #f5f7fa;
    color: #1f2937;
    line-height: 1.6;
}

/* ===== ШАПКА ===== */
.site-header {
    text-align: center;
    padding: 40px 16px;
    background: linear-gradient(135deg, #6d28d9, #0891b2);
    color: #fff;
}

.site-header h1 {
    font-size: 2rem;
    margin-bottom: 8px;
}

.site-header p {
    opacity: 0.9;
    font-size: 0.95rem;
}

/* ===== КОНТЕЙНЕР ===== */
.container {
    max-width: 820px;
    margin: 0 auto;
    padding: 24px 16px 64px;
}

/* ===== ЛЕНТА ===== */
.feed {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

/* ===== КАРТОЧКА ===== */
.card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.07);
    animation: fadeIn 0.4s ease both;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.11);
}

/* Резервируем место под картинку — не будет "скачков" layout */
.card img {
    display: block;
    width: 100%;
    height: 220px;
    object-fit: cover;
    background: #e5e7eb;
}

.card__body {
    padding: 18px 20px 22px;
}

.card__title {
    font-size: 1.25rem;
    margin-bottom: 8px;
    color: #111827;
}

.card__text {
    font-size: 0.95rem;
    color: #4b5563;
    margin-bottom: 12px;
}

.card__link {
    font-size: 0.9rem;
    font-weight: 600;
    color: #6d28d9;
    text-decoration: none;
}

.card__link:hover {
    text-decoration: underline;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ===== ЗАГРУЗЧИК ===== */
.loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 28px;
    color: #6b7280;
}

.loader.is-hidden {
    display: none;
}

.spinner {
    width: 38px;
    height: 38px;
    border: 4px solid #e5e7eb;
    border-top-color: #6d28d9;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== СЕНТИНЕЛ ===== */
#sentinel {
    height: 1px;
}

/* ===== КНОПКА НАВЕРХ ===== */
.scroll-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: #6d28d9;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: opacity 0.3s ease;
}

.scroll-top.is-hidden {
    opacity: 0;
    pointer-events: none;
}

/* ===== ПОДВАЛ ===== */
.site-footer {
    text-align: center;
    padding: 24px;
    color: #9ca3af;
    font-size: 0.9rem;
    border-top: 1px solid #e5e7eb;
}