/* Витрина «Здоровье Сегодня». Единицы — rem, чтобы страница нормально работала внутри рамки (iframe). */
* { box-sizing: border-box; }
html { font-size: 16px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 1rem;
  margin: 0;
  padding: 0;
  background: #f5f6f8;
  color: #1a1a1a;
}

/* ===== Шапка ===== */
.site-topbar {
  background: #fff;
  border-bottom: 1px solid #e8e8e8;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-topbar-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0.7rem 1rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
}
.site-logo-mark {
  display: inline-block;
  background: #c0392b;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: 0.95rem;
  padding: 0.4rem 0.75rem;
  border-radius: 4px;
  text-decoration: none;
  flex-shrink: 0;
}
.site-logo-mark:hover { filter: brightness(1.07); }

.categories { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.categories button {
  padding: 0.4rem 0.7rem;
  border: 1px solid #e0e0e0;
  background: #fafafa;
  color: #333;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.85rem;
  white-space: nowrap;
}
.categories button.active { background: #c0392b; border-color: #c0392b; color: #fff; }

/* ===== Заглушка для ботов/прямого захода ===== */
.news-stub { max-width: 700px; margin: 3rem auto; padding: 0 1.25rem; text-align: center; }
.news-stub__title { font-size: 2rem; margin: 0 0 0.75rem; }
.news-stub__lead { color: #666; font-size: 1.05rem; }

/* ===== Лента тизеров ===== */
#teaserContainer {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  padding: 1rem 1.25rem 2rem;
  max-width: 1000px;
  margin: 0 auto;
}
.teaser {
  background: #fff;
  border-radius: 0.5rem;
  overflow: hidden;
  border: 1px solid #e5e5e5;
  box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.08);
  text-decoration: none;
  color: #111;
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.teaser:hover { transform: translateY(-0.2rem); box-shadow: 0 0.4rem 1rem rgba(0, 0, 0, 0.14); }

.teaser-media-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #ececec;
  flex-shrink: 0;
}
.teaser-media-wrap img,
.teaser-media-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.teaser .content { padding: 0.65rem 0.75rem 0.35rem; flex: 1; }
.teaser .content h3 { font-size: 0.95rem; font-weight: 600; margin: 0; line-height: 1.35; }

.teaser-meta {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0 0.75rem 0.65rem;
  margin-top: auto;
  font-size: 0.8rem;
  color: #8a8a8a;
}

/* ===== Скелетоны на время загрузки ===== */
.teaser.skeleton { pointer-events: none; }
.teaser.skeleton .teaser-media-wrap { background: #ddd; }
.teaser.skeleton .content h3 { background: #e5e5e5; height: 2.4rem; border-radius: 3px; }
.teaser.skeleton .teaser-meta__text { display: block; width: 7rem; height: 0.75rem; background: #eaeaea; border-radius: 3px; }
@keyframes sk { 0% { opacity: 0.6; } 50% { opacity: 1; } 100% { opacity: 0.6; } }
.teaser.skeleton { animation: sk 1.2s ease-in-out infinite; }

/* ===== Адаптив ===== */
@media (max-width: 1024px) { #teaserContainer { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { #teaserContainer { grid-template-columns: 1fr; gap: 0.75rem; } }
