/* ============================================================
   100идей — Global Styles
   Mobile-first, CSS Custom Properties, BEM-like naming
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ---- Reset & Base ---------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Colors */
  --c-accent:       #E63946;
  --c-accent-dark:  #C1121F;
  --c-accent-bg:    #FFF1F2;
  --c-dark:         #1D1D1F;
  --c-dark-2:       #3A3A3C;
  --c-gray:         #6B7280;
  --c-gray-light:   #9CA3AF;
  --c-border:       #E5E7EB;
  --c-light:        #F9FAFB;
  --c-white:        #FFFFFF;

  /* Category colors */
  --cat-psychology: #9B59B6;
  --cat-technology: #3498DB;
  --cat-health:     #27AE60;
  --cat-career:     #E67E22;
  --cat-finance:    #16A085;
  --cat-travel:     #1ABC9C;
  --cat-science:    #2980B9;
  --cat-culture:    #E91E63;

  /* Typography */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Spacing scale */
  --sp-1: 4px;   --sp-2: 8px;   --sp-3: 12px;  --sp-4: 16px;
  --sp-5: 20px;  --sp-6: 24px;  --sp-8: 32px;  --sp-10: 40px;
  --sp-12: 48px; --sp-16: 64px; --sp-20: 80px;

  /* Layout */
  --container: 1200px;
  --px: 16px;

  /* Radii */
  --r-sm: 4px; --r-md: 8px; --r-lg: 12px; --r-xl: 16px; --r-full: 9999px;

  /* Shadows */
  --sh-sm: 0 1px 3px rgba(0,0,0,.08);
  --sh-md: 0 4px 16px rgba(0,0,0,.10);
  --sh-lg: 0 8px 32px rgba(0,0,0,.12);

  /* Transitions */
  --tr: .2s ease;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--c-dark);
  background: var(--c-white);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
button { font-family: var(--font); cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: var(--font); }

/* ---- Utility --------------------------------------------- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--px);
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap;
}

.text-accent { color: var(--c-accent); }

/* ---- Header / Navigation --------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--c-white);
  border-bottom: 1px solid var(--c-border);
  box-shadow: var(--sh-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  gap: var(--sp-4);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.5px;
  color: var(--c-dark);
  flex-shrink: 0;
}

.logo__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  background: var(--c-accent);
  color: var(--c-white);
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.logo:hover .logo__icon { background: var(--c-accent-dark); }

.main-nav { display: none; }

.main-nav__list {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
}

.main-nav__link {
  display: block;
  padding: var(--sp-2) var(--sp-3);
  font-size: 14px;
  font-weight: 500;
  color: var(--c-dark-2);
  border-radius: var(--r-md);
  transition: background var(--tr), color var(--tr);
}

.main-nav__link:hover,
.main-nav__link--active {
  background: var(--c-light);
  color: var(--c-accent);
}

.header-actions { display: flex; align-items: center; gap: var(--sp-2); }

.btn-search {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: var(--r-md);
  color: var(--c-gray);
  transition: background var(--tr), color var(--tr);
}

.btn-search:hover { background: var(--c-light); color: var(--c-dark); }

.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px; height: 36px;
  border-radius: var(--r-md);
  transition: background var(--tr);
}

.hamburger:hover { background: var(--c-light); }

.hamburger__line {
  display: block;
  width: 20px; height: 2px;
  background: var(--c-dark);
  border-radius: 2px;
  transition: transform var(--tr), opacity var(--tr);
}

.hamburger.is-open .hamburger__line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.is-open .hamburger__line:nth-child(2) { opacity: 0; }
.hamburger.is-open .hamburger__line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  position: fixed;
  inset: 60px 0 0 0;
  z-index: 99;
  background: var(--c-white);
  padding: var(--sp-4) var(--px);
  transform: translateX(100%);
  transition: transform .3s ease;
  overflow-y: auto;
  border-top: 1px solid var(--c-border);
}

.mobile-menu.is-open { transform: translateX(0); }

.mobile-menu__list { display: flex; flex-direction: column; gap: var(--sp-1); }

.mobile-menu__link {
  display: block;
  padding: var(--sp-3) var(--sp-4);
  font-size: 16px;
  font-weight: 500;
  color: var(--c-dark-2);
  border-radius: var(--r-md);
  transition: background var(--tr), color var(--tr);
}

.mobile-menu__link:hover { background: var(--c-light); color: var(--c-accent); }

/* ---- Footer ---------------------------------------------- */
.site-footer {
  background: var(--c-dark);
  color: var(--c-gray-light);
  margin-top: var(--sp-16);
}

.footer-top {
  display: grid;
  gap: var(--sp-8);
  padding: var(--sp-12) 0 var(--sp-8);
}

.footer-brand .logo { color: var(--c-white); }
.footer-brand .logo__icon { background: var(--c-accent); }

.footer-brand__desc {
  margin-top: var(--sp-3);
  font-size: 14px;
  line-height: 1.6;
  max-width: 280px;
}

.footer-col__title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--c-white);
  margin-bottom: var(--sp-4);
}

.footer-col__list { display: flex; flex-direction: column; gap: var(--sp-2); }

.footer-col__list a {
  font-size: 14px;
  color: var(--c-gray-light);
  transition: color var(--tr);
}

.footer-col__list a:hover { color: var(--c-white); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: var(--sp-5) 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  align-items: center;
  text-align: center;
  font-size: 13px;
}

.footer-bottom a { color: var(--c-gray-light); transition: color var(--tr); }
.footer-bottom a:hover { color: var(--c-white); }

/* ---- Buttons --------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-5);
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--r-md);
  transition: background var(--tr), color var(--tr), box-shadow var(--tr), transform var(--tr);
  cursor: pointer;
  line-height: 1.4;
  white-space: nowrap;
}

.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--c-accent);
  color: var(--c-white);
}
.btn--primary:hover { background: var(--c-accent-dark); box-shadow: 0 4px 12px rgba(230,57,70,.3); }

.btn--outline {
  background: transparent;
  color: var(--c-accent);
  border: 2px solid var(--c-accent);
}
.btn--outline:hover { background: var(--c-accent); color: var(--c-white); }

.btn--ghost {
  background: var(--c-light);
  color: var(--c-dark-2);
}
.btn--ghost:hover { background: var(--c-border); }

.btn--lg { padding: var(--sp-4) var(--sp-8); font-size: 16px; }
.btn--sm { padding: var(--sp-2) var(--sp-3); font-size: 13px; }

/* ---- Badges & Tags --------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--r-full);
  line-height: 1.5;
}

.badge--accent { background: var(--c-accent-bg); color: var(--c-accent); }
.badge--outline { background: transparent; border: 1px solid var(--c-border); color: var(--c-gray); }

.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  font-size: 13px;
  font-weight: 500;
  background: var(--c-light);
  color: var(--c-dark-2);
  border-radius: var(--r-full);
  border: 1px solid var(--c-border);
  transition: background var(--tr), color var(--tr), border-color var(--tr);
}

.tag:hover { background: var(--c-accent-bg); color: var(--c-accent); border-color: var(--c-accent); }

/* ---- Section Headers ------------------------------------- */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  margin-bottom: var(--sp-6);
}

.section-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--c-dark);
  line-height: 1.2;
}

.section-title--with-icon::before {
  content: attr(data-icon);
  margin-right: var(--sp-2);
}

.section-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--c-accent);
  white-space: nowrap;
  transition: opacity var(--tr);
}
.section-link:hover { opacity: .75; }

/* ---- Article Card ---------------------------------------- */
.article-card {
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--tr), transform var(--tr);
}

.article-card:hover {
  box-shadow: var(--sh-md);
  transform: translateY(-2px);
}

.article-card__img-wrap {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--c-light);
}

.article-card__img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}

.article-card:hover .article-card__img { transform: scale(1.04); }

.article-card__img-placeholder {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  background: linear-gradient(135deg, var(--c-light) 0%, var(--c-border) 100%);
}

.article-card__body {
  padding: var(--sp-4);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.article-card__category {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--c-accent);
}

.article-card__title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--c-dark);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card:hover .article-card__title { color: var(--c-accent); }

.article-card__desc {
  font-size: 14px;
  color: var(--c-gray);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card__meta {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-top: auto;
  padding-top: var(--sp-3);
  border-top: 1px solid var(--c-border);
  font-size: 12px;
  color: var(--c-gray-light);
  flex-wrap: wrap;
}

.article-card__meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.article-card__rating { color: #F59E0B; font-weight: 600; }

/* Featured/large card variant */
.article-card--featured {
  flex-direction: row;
  gap: 0;
}

.article-card--featured .article-card__img-wrap {
  width: 45%;
  flex-shrink: 0;
  aspect-ratio: auto;
  min-height: 200px;
}

.article-card--featured .article-card__title { font-size: 18px; }

/* ---- Cards Grid ------------------------------------------ */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--sp-5);
}

.cards-grid--2 { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.cards-grid--3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

/* ---- Hero Section ---------------------------------------- */
.hero {
  background: linear-gradient(135deg, #1D1D1F 0%, #3A3A3C 50%, #1D1D1F 100%);
  color: var(--c-white);
  padding: var(--sp-16) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(230,57,70,.25) 0%, transparent 70%);
  pointer-events: none;
}

.hero__content { position: relative; z-index: 1; max-width: 700px; margin: 0 auto; }

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  background: rgba(230,57,70,.15);
  border: 1px solid rgba(230,57,70,.3);
  color: #FF8A92;
  padding: 5px 14px;
  border-radius: var(--r-full);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: var(--sp-5);
}

.hero__title {
  font-size: clamp(32px, 6vw, 56px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: var(--sp-5);
}

.hero__title span { color: var(--c-accent); }

.hero__desc {
  font-size: clamp(15px, 2vw, 18px);
  color: rgba(255,255,255,.7);
  line-height: 1.6;
  margin-bottom: var(--sp-8);
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-3);
}

/* ---- Stats Block ----------------------------------------- */
.stats-block {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--sp-4);
  background: var(--c-dark);
  color: var(--c-white);
  border-radius: var(--r-xl);
  padding: var(--sp-6);
  margin: var(--sp-8) 0;
}

.stat-item { text-align: center; }

.stat-item__num {
  font-size: 32px;
  font-weight: 800;
  color: var(--c-accent);
  line-height: 1;
  margin-bottom: var(--sp-1);
}

.stat-item__label {
  font-size: 13px;
  color: rgba(255,255,255,.6);
  font-weight: 500;
}

/* ---- Category Section (homepage) ------------------------- */
.categories-section { padding: var(--sp-10) 0; }

.category-block { margin-bottom: var(--sp-10); }

.category-block__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-5);
  gap: var(--sp-4);
}

.category-block__title {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 20px;
  font-weight: 800;
  color: var(--c-dark);
}

.category-block__icon {
  font-size: 22px;
  display: inline-flex;
}

.loading-placeholder {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--sp-5);
}

.skeleton {
  border-radius: var(--r-lg);
  background: linear-gradient(90deg, var(--c-light) 25%, var(--c-border) 50%, var(--c-light) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
}

@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton--card { height: 280px; }
.skeleton--text { height: 16px; margin-bottom: 8px; border-radius: 4px; }
.skeleton--title { height: 22px; width: 60%; }

/* ---- About section (homepage) ---------------------------- */
.about-section {
  background: var(--c-light);
  padding: var(--sp-12) 0;
  margin: var(--sp-8) 0;
}

.about-section__inner {
  display: grid;
  gap: var(--sp-8);
}

.about-section__title {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 800;
  line-height: 1.2;
  color: var(--c-dark);
}

.about-section__title span { color: var(--c-accent); }

.about-section__text {
  font-size: 15px;
  line-height: 1.7;
  color: var(--c-gray);
}

.features-grid {
  display: grid;
  gap: var(--sp-4);
  grid-template-columns: 1fr;
}

.feature-card {
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  display: flex;
  align-items: flex-start;
  gap: var(--sp-4);
}

.feature-card__icon {
  font-size: 28px;
  flex-shrink: 0;
  line-height: 1;
}

.feature-card__title {
  font-size: 15px;
  font-weight: 700;
  color: var(--c-dark);
  margin-bottom: var(--sp-1);
}

.feature-card__desc { font-size: 14px; color: var(--c-gray); line-height: 1.5; }

/* ---- Article Filters ------------------------------------- */
.filters-bar {
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: var(--sp-4);
  margin-bottom: var(--sp-6);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.filters-bar__search {
  position: relative;
}

.filters-bar__search-input {
  width: 100%;
  padding: var(--sp-3) var(--sp-4) var(--sp-3) 44px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  font-size: 15px;
  color: var(--c-dark);
  background: var(--c-light);
  transition: border-color var(--tr), box-shadow var(--tr);
  outline: none;
}

.filters-bar__search-input:focus {
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px rgba(230,57,70,.1);
  background: var(--c-white);
}

.filters-bar__search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--c-gray-light);
  pointer-events: none;
}

.filters-bar__row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  align-items: center;
}

.filters-bar__select {
  padding: var(--sp-2) var(--sp-3);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  font-size: 13px;
  font-weight: 500;
  color: var(--c-dark);
  background: var(--c-light);
  cursor: pointer;
  outline: none;
  transition: border-color var(--tr);
}

.filters-bar__select:focus { border-color: var(--c-accent); }

.filters-bar__count {
  margin-left: auto;
  font-size: 13px;
  color: var(--c-gray);
}

/* ---- Pagination ------------------------------------------ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-1);
  margin-top: var(--sp-8);
}

.pagination__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 var(--sp-3);
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--r-md);
  border: 1px solid var(--c-border);
  color: var(--c-dark);
  background: var(--c-white);
  cursor: pointer;
  transition: all var(--tr);
}

.pagination__btn:hover { border-color: var(--c-accent); color: var(--c-accent); }
.pagination__btn--active {
  background: var(--c-accent);
  border-color: var(--c-accent);
  color: var(--c-white);
}
.pagination__btn:disabled { opacity: .4; cursor: default; }
.pagination__dots { color: var(--c-gray-light); padding: 0 var(--sp-1); }

/* ---- Category Cards -------------------------------------- */
.category-card {
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--r-xl);
  padding: var(--sp-6);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  transition: box-shadow var(--tr), transform var(--tr);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.category-card:hover {
  box-shadow: var(--sh-md);
  transform: translateY(-3px);
}

.category-card__icon-wrap {
  width: 56px; height: 56px;
  border-radius: var(--r-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

.category-card__name {
  font-size: 18px;
  font-weight: 700;
  color: var(--c-dark);
}

.category-card__desc {
  font-size: 14px;
  color: var(--c-gray);
  line-height: 1.55;
  flex: 1;
}

.category-card__stats {
  display: flex;
  gap: var(--sp-4);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--c-border);
}

.category-card__stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.category-card__stat-num {
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
}

.category-card__stat-label {
  font-size: 11px;
  color: var(--c-gray-light);
  text-transform: uppercase;
  letter-spacing: .05em;
}

/* ---- Article Page ---------------------------------------- */
.article-layout {
  display: grid;
  gap: var(--sp-8);
  padding: var(--sp-8) 0 var(--sp-12);
}

.article-main {}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 13px;
  color: var(--c-gray);
  margin-bottom: var(--sp-5);
  flex-wrap: wrap;
}

.breadcrumbs a { color: var(--c-gray); transition: color var(--tr); }
.breadcrumbs a:hover { color: var(--c-accent); }
.breadcrumbs__sep { color: var(--c-border); }
.breadcrumbs__current { color: var(--c-dark); }

.article-header { margin-bottom: var(--sp-6); }

.article-header__category {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--c-accent);
  margin-bottom: var(--sp-3);
}

.article-header__title {
  font-size: clamp(24px, 4vw, 38px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.02em;
  color: var(--c-dark);
  margin-bottom: var(--sp-4);
}

.article-header__desc {
  font-size: 18px;
  line-height: 1.6;
  color: var(--c-gray);
  margin-bottom: var(--sp-5);
}

.article-meta {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--c-gray);
  padding: var(--sp-4) 0;
  border-top: 1px solid var(--c-border);
  border-bottom: 1px solid var(--c-border);
  margin-bottom: var(--sp-6);
}

.article-meta__author {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-weight: 600;
  color: var(--c-dark);
}

.article-meta__avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--c-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--c-white);
  flex-shrink: 0;
}

.article-meta__sep { color: var(--c-border); }

.article-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #F59E0B;
  font-weight: 600;
}

.article-cover {
  margin-bottom: var(--sp-6);
  border-radius: var(--r-xl);
  overflow: hidden;
  aspect-ratio: 16/9;
  background: var(--c-light);
}

.article-cover__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-content {
  font-size: 17px;
  line-height: 1.75;
  color: var(--c-dark-2);
}

.article-content h2 {
  font-size: clamp(20px, 3vw, 26px);
  font-weight: 800;
  color: var(--c-dark);
  margin: var(--sp-10) 0 var(--sp-4);
  line-height: 1.25;
}

.article-content h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--c-dark);
  margin: var(--sp-8) 0 var(--sp-3);
}

.article-content p { margin-bottom: var(--sp-5); }

.article-content ul, .article-content ol {
  margin: var(--sp-5) 0;
  padding-left: var(--sp-6);
}

.article-content ul { list-style: disc; }
.article-content ol { list-style: decimal; }

.article-content li { margin-bottom: var(--sp-2); }

.article-content strong { font-weight: 700; color: var(--c-dark); }

.article-content a {
  color: var(--c-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-content blockquote {
  border-left: 4px solid var(--c-accent);
  padding: var(--sp-4) var(--sp-5);
  background: var(--c-accent-bg);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  margin: var(--sp-6) 0;
  font-style: italic;
  color: var(--c-dark-2);
}

.article-content .highlight-box {
  background: var(--c-light);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: var(--sp-5) var(--sp-6);
  margin: var(--sp-6) 0;
}

.article-content .highlight-box__title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--c-accent);
  margin-bottom: var(--sp-3);
}

.article-content .tip {
  display: flex;
  gap: var(--sp-3);
  background: #FFFBEB;
  border: 1px solid #FCD34D;
  border-radius: var(--r-lg);
  padding: var(--sp-4) var(--sp-5);
  margin: var(--sp-5) 0;
}

.article-content .tip__icon { font-size: 20px; flex-shrink: 0; }
.article-content .tip__text { font-size: 15px; }

.article-footer {
  margin-top: var(--sp-8);
  padding-top: var(--sp-6);
  border-top: 1px solid var(--c-border);
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-bottom: var(--sp-6);
}

.article-tags__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--c-gray);
  display: flex;
  align-items: center;
  margin-right: var(--sp-1);
}

.share-block { margin-bottom: var(--sp-8); }

.share-block__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--c-gray);
  margin-bottom: var(--sp-3);
}

.share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--r-md);
  font-size: 13px;
  font-weight: 600;
  color: var(--c-white);
  transition: opacity var(--tr);
}

.share-btn:hover { opacity: .85; }
.share-btn--vk { background: #4C6EA6; }
.share-btn--tg { background: #26A5E4; }
.share-btn--tw { background: #1D9BF0; }
.share-btn--copy { background: var(--c-gray); }

.author-block {
  background: var(--c-light);
  border: 1px solid var(--c-border);
  border-radius: var(--r-xl);
  padding: var(--sp-6);
  display: flex;
  gap: var(--sp-5);
  margin-bottom: var(--sp-8);
}

.author-block__avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--c-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 800;
  color: var(--c-white);
  flex-shrink: 0;
}

.author-block__name {
  font-size: 16px;
  font-weight: 700;
  color: var(--c-dark);
  margin-bottom: 2px;
}

.author-block__role {
  font-size: 13px;
  color: var(--c-accent);
  font-weight: 500;
  margin-bottom: var(--sp-2);
}

.author-block__bio { font-size: 14px; color: var(--c-gray); line-height: 1.6; }

/* ---- Sidebar --------------------------------------------- */
.article-sidebar {}

.sidebar-widget {
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--r-xl);
  padding: var(--sp-5);
  margin-bottom: var(--sp-5);
}

.sidebar-widget__title {
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--c-dark);
  margin-bottom: var(--sp-4);
}

.sidebar-articles { display: flex; flex-direction: column; gap: var(--sp-4); }

.sidebar-article {
  display: flex;
  gap: var(--sp-3);
  text-decoration: none;
  color: inherit;
}

.sidebar-article__img {
  width: 72px; height: 56px;
  border-radius: var(--r-md);
  object-fit: cover;
  background: var(--c-light);
  flex-shrink: 0;
}

.sidebar-article__img-placeholder {
  width: 72px; height: 56px;
  border-radius: var(--r-md);
  background: var(--c-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.sidebar-article__title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--c-dark);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sidebar-article:hover .sidebar-article__title { color: var(--c-accent); }
.sidebar-article__date { font-size: 11px; color: var(--c-gray-light); margin-top: 4px; }

/* ---- Page Header ----------------------------------------- */
.page-header {
  background: var(--c-dark);
  color: var(--c-white);
  padding: var(--sp-10) 0;
}

.page-header__title {
  font-size: clamp(26px, 5vw, 42px);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: var(--sp-3);
}

.page-header__desc {
  font-size: 16px;
  color: rgba(255,255,255,.65);
  max-width: 540px;
}

/* ---- FAQ Accordion --------------------------------------- */
.faq-list { display: flex; flex-direction: column; gap: var(--sp-2); }

.faq-item {
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  text-align: left;
  font-size: 15px;
  font-weight: 600;
  color: var(--c-dark);
  background: var(--c-white);
  transition: background var(--tr);
  cursor: pointer;
}

.faq-question:hover { background: var(--c-light); }
.faq-item.is-open .faq-question { background: var(--c-light); }

.faq-icon {
  flex-shrink: 0;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--c-border);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  transition: transform var(--tr), background var(--tr);
  color: var(--c-gray);
}

.faq-item.is-open .faq-icon {
  transform: rotate(45deg);
  background: var(--c-accent);
  color: var(--c-white);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease, padding .35s ease;
  padding: 0 var(--sp-5);
  font-size: 15px;
  line-height: 1.7;
  color: var(--c-gray);
}

.faq-item.is-open .faq-answer {
  max-height: 600px;
  padding: 0 var(--sp-5) var(--sp-4);
}

/* ---- Contact Form ---------------------------------------- */
.contact-layout {
  display: grid;
  gap: var(--sp-8);
  padding: var(--sp-8) 0 var(--sp-12);
}

.contact-info { display: flex; flex-direction: column; gap: var(--sp-4); }

.contact-card {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-4);
  background: var(--c-light);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
}

.contact-card__icon {
  font-size: 24px;
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  background: var(--c-white);
  border-radius: var(--r-md);
  flex-shrink: 0;
}

.contact-card__label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--c-accent);
  margin-bottom: 4px;
}

.contact-card__value { font-size: 15px; font-weight: 500; color: var(--c-dark); }

.form-group { margin-bottom: var(--sp-4); }

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--c-dark);
  margin-bottom: var(--sp-2);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  font-size: 15px;
  color: var(--c-dark);
  background: var(--c-white);
  transition: border-color var(--tr), box-shadow var(--tr);
  outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px rgba(230,57,70,.1);
}

.form-textarea { min-height: 140px; resize: vertical; }

.form-error {
  display: none;
  font-size: 12px;
  color: var(--c-accent);
  margin-top: 4px;
}

.form-group.has-error .form-input,
.form-group.has-error .form-textarea { border-color: var(--c-accent); }
.form-group.has-error .form-error { display: block; }

.form-success {
  display: none;
  background: #ECFDF5;
  border: 1px solid #6EE7B7;
  border-radius: var(--r-lg);
  padding: var(--sp-4) var(--sp-5);
  color: #065F46;
  font-weight: 500;
  margin-top: var(--sp-4);
}

.form-success.is-visible { display: flex; align-items: center; gap: var(--sp-3); }

/* ---- Page sections --------------------------------------- */
.page-section { padding: var(--sp-10) 0; }
.page-section + .page-section { padding-top: 0; }

.prose {
  font-size: 16px;
  line-height: 1.75;
  color: var(--c-dark-2);
}

.prose h2 {
  font-size: 22px; font-weight: 800; color: var(--c-dark);
  margin: var(--sp-8) 0 var(--sp-4);
}

.prose p { margin-bottom: var(--sp-4); }
.prose strong { color: var(--c-dark); font-weight: 700; }

.prose ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  margin-bottom: var(--sp-4);
}

.prose ul li {
  display: flex;
  align-items: baseline;
  gap: var(--sp-2);
}

.prose ul li::before {
  content: '→';
  color: var(--c-accent);
  font-weight: 700;
  flex-shrink: 0;
}

/* ---- Team grid ------------------------------------------- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--sp-5);
}

.team-card {
  text-align: center;
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--r-xl);
  padding: var(--sp-6);
}

.team-card__avatar {
  width: 80px; height: 80px;
  border-radius: 50%;
  margin: 0 auto var(--sp-4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 800;
  color: var(--c-white);
}

.team-card__name { font-size: 16px; font-weight: 700; color: var(--c-dark); }
.team-card__role { font-size: 13px; color: var(--c-accent); font-weight: 500; margin-top: 4px; }

/* ---- Cookie Banner --------------------------------------- */
.cookie-banner {
  position: fixed;
  bottom: var(--sp-4);
  left: var(--px);
  right: var(--px);
  z-index: 200;
  background: var(--c-dark);
  color: var(--c-white);
  border-radius: var(--r-xl);
  padding: var(--sp-4) var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  box-shadow: var(--sh-lg);
  max-width: 540px;
  margin: 0 auto;
  transform: translateY(120%);
  transition: transform .4s ease;
}

.cookie-banner.is-visible { transform: translateY(0); }
.cookie-banner__text { font-size: 14px; color: rgba(255,255,255,.8); line-height: 1.5; }
.cookie-banner__text a { color: var(--c-accent); }

.cookie-banner__actions { display: flex; gap: var(--sp-2); flex-wrap: wrap; }

/* ---- Loading / Error states ------------------------------ */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-4);
  padding: var(--sp-12);
  color: var(--c-gray);
}

.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--c-border);
  border-top-color: var(--c-accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.error-state {
  text-align: center;
  padding: var(--sp-10);
  color: var(--c-gray);
}

.error-state__icon { font-size: 48px; margin-bottom: var(--sp-4); }
.error-state__title { font-size: 18px; font-weight: 700; color: var(--c-dark); margin-bottom: var(--sp-2); }

/* ---- Related articles ------------------------------------ */
.related-section { margin-top: var(--sp-10); }

.related-section__title {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: var(--sp-5);
}

/* ---- Privacy / Cookie pages ------------------------------ */
.legal-content {
  max-width: 760px;
  padding: var(--sp-8) 0 var(--sp-16);
}

.legal-content h2 {
  font-size: 20px;
  font-weight: 800;
  margin: var(--sp-8) 0 var(--sp-3);
}

.legal-content p, .legal-content li {
  font-size: 15px;
  line-height: 1.75;
  color: var(--c-dark-2);
  margin-bottom: var(--sp-3);
}

.legal-content ul { list-style: disc; padding-left: var(--sp-5); }
.legal-content li { margin-bottom: var(--sp-2); }

.legal-date {
  font-size: 13px;
  color: var(--c-gray);
  margin-bottom: var(--sp-8);
}

/* ============================================================
   RESPONSIVE — Tablet (≥ 640px)
   ============================================================ */
@media (min-width: 640px) {
  :root { --px: 24px; }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-section__inner {
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
  }

  .contact-layout {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

  .filters-bar {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
  }

  .filters-bar__search { flex: 1; min-width: 200px; }

  .article-card--featured .article-card__img-wrap {
    width: 40%;
  }
}

/* ============================================================
   RESPONSIVE — Desktop (≥ 768px)
   ============================================================ */
@media (min-width: 768px) {
  :root { --px: 32px; }

  .main-nav { display: flex; }
  .hamburger { display: none; }

  .article-layout {
    grid-template-columns: 1fr 300px;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-top {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }

  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
  }
}

/* ============================================================
   RESPONSIVE — Large (≥ 1024px)
   ============================================================ */
@media (min-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .article-layout {
    grid-template-columns: 1fr 320px;
    gap: var(--sp-10);
  }

  .contact-layout {
    grid-template-columns: 1fr 1.5fr;
  }
}
