/* ═══════════════════════════════════════════
   СМИ62 — Mintlify-inspired Design
   Справочник Молодого Исследователя
   ═══════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --brand: #18E299;
  --brand-deep: #0fa76e;
  --brand-light: #d4fae8;
  --black: #0d0d0d;
  --gray-700: #333333;
  --gray-500: #666666;
  --gray-400: #888888;
  --gray-200: #e5e5e5;
  --gray-100: #f5f5f5;
  --gray-50: #fafafa;
  --white: #ffffff;
  --border: rgba(0,0,0,0.05);
  --border-md: rgba(0,0,0,0.08);
  --shadow-card: rgba(0,0,0,0.03) 0px 2px 4px;
  --shadow-btn: rgba(0,0,0,0.06) 0px 1px 2px;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 9999px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--gray-700);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--black); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--brand-deep); }

img { max-width: 100%; height: auto; display: block; }

/* --- Typography --- */
h1, h2, h3, h4 { color: var(--black); }

h1 {
  font-size: 2.75rem;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -1.1px;
  margin-bottom: 1.25rem;
}

h2 {
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.5px;
  margin-bottom: 0.75rem;
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.2px;
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1.25rem;
  line-height: 1.7;
}

/* --- Layout --- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container--narrow {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --- Header --- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  max-width: 100%;
  padding: 0 3rem;
}

.nav__logo {
  font-size: 1rem;
  font-weight: 600;
  color: var(--black);
  letter-spacing: -0.2px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav__logo-badge {
  background: var(--brand-light);
  color: var(--brand-deep);
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  letter-spacing: 0.3px;
}

.nav__links {
  display: flex;
  gap: 1.75rem;
  list-style: none;
}

.nav__links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-500);
  transition: color 0.15s ease;
}

.nav__links a:hover,
.nav__links a.active {
  color: var(--black);
}

/* --- Hero --- */
.hero {
  padding: 5rem 3rem 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  background: var(--black);
  color: var(--white);
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(24,226,153,0.2) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 50%, rgba(24,226,153,0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 0%, rgba(24,226,153,0.08) 0%, transparent 60%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--brand), transparent);
}

.hero h1 {
  position: relative;
  max-width: 700px;
  margin: 0 auto 1.25rem;
  color: var(--white);
}

.hero p {
  font-size: 1.125rem;
  color: rgba(255,255,255,0.6);
  max-width: 520px;
  margin: 0 auto 2rem;
}

.hero__cta {
  display: inline-flex;
  gap: 0.75rem;
  position: relative;
}

.hero .btn--secondary {
  color: var(--white);
  border-color: rgba(255,255,255,0.2);
  background: transparent;
}

.hero .btn--secondary:hover {
  border-color: rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.05);
  color: var(--white);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 500;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}

.btn--primary {
  background: var(--black);
  color: var(--white);
  box-shadow: var(--shadow-btn);
}

.btn--primary:hover {
  opacity: 0.88;
  color: var(--white);
}

.btn--secondary {
  background: var(--white);
  color: var(--black);
  border: 1px solid var(--border-md);
}

.btn--secondary:hover {
  border-color: var(--gray-200);
  background: var(--gray-50);
  color: var(--black);
}

.btn--green {
  background: var(--brand);
  color: var(--black);
  font-weight: 600;
}

.btn--green:hover {
  background: #15cc8a;
  color: var(--black);
}

/* --- Section --- */
.section {
  padding: 3.5rem 0;
}

.section--border {
  border-top: 1px solid var(--border);
}

.section__header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section__header p {
  color: var(--gray-500);
  max-width: 500px;
  margin: 0 auto;
}

.section__label {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--brand-deep);
  background: var(--brand-light);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  margin-bottom: 1rem;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

/* --- Cards Grid --- */
.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: all 0.2s ease;
}

.card:hover {
  border-color: var(--gray-200);
  box-shadow: var(--shadow-card);
}

.card__icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.card__icon--green { background: var(--brand-light); }
.card__icon--blue { background: #dbeafe; }
.card__icon--purple { background: #ede9fe; }
.card__icon--orange { background: #ffedd5; }

.card__title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--black);
  margin-bottom: 0.375rem;
}

.card__text {
  font-size: 0.875rem;
  color: var(--gray-500);
  line-height: 1.5;
}

/* --- Blog Grid --- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.blog-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all 0.2s ease;
  text-decoration: none;
  color: inherit;
  display: block;
}

.blog-card:hover {
  border-color: var(--gray-200);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  color: inherit;
}

.blog-card__img {
  height: 180px;
  background: var(--gray-50);
  overflow: hidden;
}

.blog-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-card__body {
  padding: 1.25rem;
}

.blog-card__tag {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--brand-deep);
  background: var(--brand-light);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  margin-bottom: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.blog-card__title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--black);
  margin-bottom: 0.375rem;
  line-height: 1.4;
}

.blog-card__excerpt {
  font-size: 0.8125rem;
  color: var(--gray-500);
  line-height: 1.5;
}

.blog-card__meta {
  font-size: 0.75rem;
  color: var(--gray-400);
  margin-top: 0.75rem;
  padding-top: 0.625rem;
  border-top: 1px solid var(--border);
}

/* --- Article --- */
.article {
  padding: 3rem 0;
}

.article__header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.article__header h1 {
  font-size: 2.25rem;
  max-width: 650px;
  margin: 0 auto 0.75rem;
}

.article__meta {
  font-size: 0.8125rem;
  color: var(--gray-400);
}

.article__content {
  font-size: 1.0625rem;
  line-height: 1.8;
}

.article__content h2 {
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.article__content h3 {
  margin-top: 1.75rem;
}

.article__content p {
  color: var(--gray-700);
}

.article__content a {
  color: var(--brand-deep);
  text-decoration: underline;
  text-decoration-color: var(--brand-light);
  text-underline-offset: 2px;
}

.article__content a:hover {
  text-decoration-color: var(--brand-deep);
}

.article__content ul,
.article__content ol {
  margin: 1rem 0 1.5rem 1.5rem;
  color: var(--gray-700);
}

.article__content li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

.article__content blockquote {
  border-left: 3px solid var(--brand);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  background: var(--brand-light);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.article__content blockquote p {
  color: var(--black);
  margin-bottom: 0;
}

.article__content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9375rem;
}

.article__content th {
  background: var(--gray-50);
  font-weight: 600;
  text-align: left;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--border);
  color: var(--black);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.article__content td {
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--border);
}

/* --- CTA Block --- */
.cta-block {
  background: var(--black);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  text-align: center;
  margin: 2.5rem 0;
}

.cta-block h3 {
  color: var(--white);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.3px;
  margin-bottom: 0.5rem;
}

.cta-block p {
  color: rgba(255,255,255,0.6);
  margin-bottom: 1.25rem;
  font-size: 0.9375rem;
}

.cta-block .btn--green {
  font-size: 0.9375rem;
}

/* --- Breadcrumbs --- */
.breadcrumbs {
  font-size: 0.8125rem;
  color: var(--gray-400);
  margin-bottom: 1.5rem;
}

.breadcrumbs a { color: var(--gray-500); }
.breadcrumbs a:hover { color: var(--brand-deep); }
.breadcrumbs span { margin: 0 0.375rem; }

/* --- Footer --- */
.footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0 1.5rem;
  color: var(--gray-500);
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer__brand {
  font-size: 1rem;
  font-weight: 600;
  color: var(--black);
  margin-bottom: 0.5rem;
}

.footer__desc {
  font-size: 0.8125rem;
  line-height: 1.5;
  max-width: 280px;
}

.footer h4 {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--black);
  margin-bottom: 0.75rem;
}

.footer ul { list-style: none; }

.footer ul li { margin-bottom: 0.375rem; }

.footer ul a {
  font-size: 0.8125rem;
  color: var(--gray-500);
}

.footer ul a:hover { color: var(--black); }

.footer__bottom {
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  font-size: 0.75rem;
  color: var(--gray-400);
}

/* --- Section list (for category pages) --- */
.section-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.section-list__item {
  display: flex;
  gap: 1.25rem;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
}

.section-list__item:hover {
  border-color: var(--gray-200);
  box-shadow: var(--shadow-card);
  color: inherit;
}

.section-list__num {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--brand);
  min-width: 2rem;
}

.section-list__title {
  font-weight: 600;
  color: var(--black);
  margin-bottom: 0.25rem;
}

.section-list__desc {
  font-size: 0.8125rem;
  color: var(--gray-500);
}

/* --- Responsive --- */
/* --- Smooth transitions everywhere --- */
.card, .blog-card, .section-list__item, .btn {
  transition: all 0.2s ease;
}

/* --- Selection color --- */
::selection {
  background: var(--brand-light);
  color: var(--black);
}

/* --- Better link underlines in articles --- */
.article__content a {
  text-decoration-thickness: 1px;
}

/* --- Responsive --- */
@media (max-width: 480px) {
  .cards { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.75rem; letter-spacing: -0.7px; }
  .hero p { font-size: 1rem; }
  .hero__cta { flex-direction: column; width: 100%; }
  .hero__cta .btn { justify-content: center; }
  .footer__grid { grid-template-columns: 1fr; }
  .cta-block { padding: 1.75rem 1.25rem; }
  .cta-block h3 { font-size: 1.25rem; }
}

@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  .hero { padding: 3rem 0 2rem; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .blog-grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .nav__links { display: none; }
  .article__header h1 { font-size: 1.75rem; }
  .article__content { font-size: 1rem; }
  .section-list__item { flex-direction: column; gap: 0.5rem; }
}

@media (max-width: 1024px) and (min-width: 769px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
}
