/*
Theme Name: Producer Guru
Theme URI: https://producer.guru
Author: Producer Guru
Author URI: https://producer.guru
Description: Блоговый портал producer.guru — структура в духе vc.ru: горизонтальные вкладки рубрик под шапкой, лента карточек, левое меню разделов, правая колонка с лентой комментариев и виджетами. Адаптивен, на мобильных выглядит как приложение.
Version: 1.5.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: producer-guru
*/

/* ==========================================================================
   0. CSS-переменные (дизайн-токены)
   ========================================================================== */
:root {
  --clr-bg: #eef1f6;
  --clr-surface: #ffffff;
  --clr-surface-alt: #f6f8fb;
  --clr-text: #16181d;
  --clr-text-muted: #6b7280;
  --clr-border: #e5e8ee;
  --clr-accent: #2688eb;
  --clr-accent-hover: #1b74d1;
  --clr-link: #16181d;
  --radius-md: 14px;
  --radius-sm: 8px;
  --shadow-card: 0 1px 2px rgba(20, 22, 30, .04), 0 8px 24px rgba(20, 22, 30, .04);
  --container: 1340px;
  --sidebar-w: 200px;
  --comments-w: 280px;
  --tabbar-h: 58px;
  --hubs-h: 46px;
  --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-main);
  background: var(--clr-bg);
  color: var(--clr-text);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--clr-link); text-decoration: none; }
a:hover { color: var(--clr-accent); }

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

ul { list-style: none; margin: 0; padding: 0; }

button { font-family: inherit; cursor: pointer; }

.screen-reader-text { position: absolute; left: -9999px; }

/* ==========================================================================
   1. Layout
   ========================================================================== */
.site { min-height: 100vh; background: var(--clr-bg); }

/* Полоска прогресса чтения статьи — над шапкой, растёт по мере скролла */
.reading-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px;
  z-index: 100; pointer-events: none;
}
.reading-progress__bar {
  height: 100%; width: 0%; background: var(--clr-accent);
  transition: width .12s linear;
}

.site-header {
  background: var(--clr-surface);
  border-bottom: 1px solid var(--clr-border);
  position: sticky;
  top: 0;
  z-index: 40;
}

.hub-tabs {
  background: var(--clr-surface);
  border-bottom: 1px solid var(--clr-border);
}
.hub-tabs__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
  height: var(--hubs-h);
  align-items: center;
}
.hub-tabs__inner::-webkit-scrollbar { display: none; }
.hub-tabs__link {
  flex: none;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--clr-text-muted);
  white-space: nowrap;
}
.hub-tabs__link:hover { color: var(--clr-text); background: var(--clr-surface-alt); }
.hub-tabs__link.is-active { color: #fff; background: var(--clr-accent); }

/* Гамбургер-кнопка и выпадающий список — видны только на мобильных (см. медиа-запрос ниже) */
.hub-tabs__toggle {
  display: none; width: 100%; align-items: center; gap: 10px;
  padding: 11px 16px; background: transparent; border: none;
  font-size: 14px; font-weight: 600; color: var(--clr-text); text-align: left;
}
.hub-tabs__toggle-icon { width: 18px; height: 18px; flex: none; color: var(--clr-text-muted); }
.hub-tabs__toggle-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hub-tabs__toggle-chevron { width: 14px; height: 14px; flex: none; color: var(--clr-text-muted); transition: transform .15s ease; }
.hub-tabs__toggle.is-open .hub-tabs__toggle-chevron { transform: rotate(180deg); }

.hub-tabs__dropdown {
  display: none;
  flex-direction: column;
  gap: 2px;
  padding: 4px 12px 12px;
}
.hub-tabs__dropdown.is-open { display: flex; }
.hub-tabs__dropdown .hub-tabs__link {
  display: block; width: 100%; text-align: left; border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.site-header__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-branding { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.site-branding .site-title { font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.site-branding .site-title a { color: var(--clr-text); }
.site-branding .site-description { font-size: 12px; color: var(--clr-text-muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.main-nav ul { display: flex; gap: 20px; align-items: center; }
.main-nav a { font-size: 14px; font-weight: 500; color: var(--clr-text-muted); }
.main-nav a:hover { color: var(--clr-accent); }
.main-nav .nav-cta a { color: var(--clr-text); font-weight: 600; }

/* ==========================================================================
   1b. Колокольчик уведомлений
   ========================================================================== */
.notif-bell { position: relative; }
.notif-bell__toggle {
  position: relative; background: none; border: none; width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; color: var(--clr-text-muted);
}
.notif-bell__toggle:hover { background: var(--clr-surface-alt); color: var(--clr-text); }
.notif-bell__icon { width: 20px; height: 20px; }
.notif-bell__badge {
  position: absolute; top: 1px; right: 1px; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 999px; background: var(--clr-accent); color: #fff; font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; line-height: 1;
}

.notif-bell__dropdown {
  display: none; position: absolute; right: -8px; top: 44px; width: 340px; max-height: 440px;
  overflow-y: auto; background: var(--clr-surface); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card); z-index: 70;
}
.notif-bell__dropdown.is-open { display: block; }
.notif-bell__header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border-bottom: 1px solid var(--clr-border);
  font-size: 13px; font-weight: 700; position: sticky; top: 0; background: var(--clr-surface);
}
.notif-bell__mark-all { background: none; border: none; font-size: 12px; font-weight: 600; color: var(--clr-accent); padding: 0; }
.notif-bell__list { display: flex; flex-direction: column; }
.notif-bell__item {
  display: flex; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--clr-border);
  font-size: 13px; color: var(--clr-text);
}
.notif-bell__item:last-child { border-bottom: none; }
.notif-bell__item.is-unread { background: var(--clr-surface-alt); }
.notif-bell__item-icon { flex: none; font-size: 16px; line-height: 1.4; }
.notif-bell__item-body { flex: 1; min-width: 0; }
.notif-bell__item-message { line-height: 1.4; }
.notif-bell__item-time { display: block; font-size: 11px; color: var(--clr-text-muted); margin-top: 3px; }
.notif-bell__empty { padding: 24px; text-align: center; font-size: 13px; color: var(--clr-text-muted); margin: 0; }

@media (max-width: 480px) {
  .notif-bell__dropdown { position: fixed; right: 8px; left: 8px; top: 60px; width: auto; }
}

.site-content {
  max-width: var(--container);
  margin: 0 auto;
  padding: 24px;
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr) var(--comments-w);
  gap: 24px;
  align-items: start;
  transition: grid-template-columns .15s ease;
}

@media (max-width: 1080px) {
  .site-content { grid-template-columns: var(--sidebar-w) minmax(0, 1fr); }
  .comments-rail { display: none; }
}

/* На узких экранах левая колонка не "тащится" в поток — прячется,
   а вместо неё внизу появляется нижняя панель (mobile-tabbar),
   поэтому меню никогда не мешает контенту, а не просто исчезает. */
@media (max-width: 720px) {
  .site-content { grid-template-columns: 1fr; padding: 12px; gap: 12px; }
  .primary-nav-wrap { display: none; }
  body { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }
}

/* ==========================================================================
   2. Левое меню (десктоп)
   ========================================================================== */
.primary-nav-wrap { min-width: 0; }
.primary-nav { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 4px; }
.primary-nav__items { display: flex; flex-direction: column; gap: 2px; }

.primary-nav__link {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500; color: var(--clr-text);
  white-space: nowrap;
}
.primary-nav__link:hover { background: var(--clr-surface); color: var(--clr-text); }
.primary-nav__link.is-active { background: var(--clr-surface); font-weight: 700; }

.primary-nav__icon {
  width: 19px; height: 19px; flex: none;
  display: flex; align-items: center; justify-content: center;
  color: var(--clr-text-muted);
}
.primary-nav__link.is-active .primary-nav__icon { color: var(--clr-accent); }
.primary-nav__icon--dot { font-size: 8px; opacity: .5; }
.primary-nav__label { overflow: hidden; text-overflow: ellipsis; }

.primary-nav__bookmarks {
  margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--clr-border);
  display: flex; flex-direction: column; gap: 2px;
}

.primary-nav__footer {
  margin-top: 20px; display: flex; flex-direction: column; gap: 4px;
}
.primary-nav__footer a { font-size: 12px; color: var(--clr-text-muted); padding: 4px 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ==========================================================================
   3. Лента / карточки постов
   ========================================================================== */
.post-feed { display: flex; flex-direction: column; gap: 10px; }

.post-card {
  background: var(--clr-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 16px 20px;
  position: relative;
}

.post-card__layout { display: flex; gap: 14px; align-items: flex-start; }
.post-card__body { flex: 1; min-width: 0; }

.post-card__meta {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--clr-text-muted); margin-bottom: 10px;
}
.post-card__avatar { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
.post-card__author { color: var(--clr-text); font-weight: 600; }
.post-card__topic {
  margin-left: auto; background: var(--clr-surface-alt);
  border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 600;
}

.post-card__title { font-size: 18px; font-weight: 700; margin: 0 0 6px; letter-spacing: -.01em; line-height: 1.35; }
.post-card__title a { color: var(--clr-text); }

.post-card__main { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 12px; }
.post-card__text { flex: 1; min-width: 0; }

.post-card__thumb-compact {
  flex: none; width: 148px; height: 100px;
  border-radius: var(--radius-sm); overflow: hidden; background: #111;
}
.post-card__thumb-compact img { width: 100%; height: 100%; object-fit: cover; display: block; }

.post-card__thumb {
  position: relative; border-radius: var(--radius-sm); overflow: hidden;
  margin-bottom: 14px; aspect-ratio: 16/9; background: #111;
}
.post-card__thumb img { width: 100%; height: 100%; object-fit: cover; }

.post-card__excerpt { color: #3a3d45; font-size: 14px; line-height: 1.55; margin: 0; }

.post-card__footer { display: flex; align-items: center; gap: 16px; font-size: 13px; color: var(--clr-text-muted); }
.post-card__footer button { background: none; border: none; display: flex; align-items: center; gap: 5px; color: inherit; font-size: 13px; padding: 0; }
.post-card__footer button:hover { color: var(--clr-accent); }
.post-card__footer .is-bookmarked { color: var(--clr-accent); }

/* Блок голосования (вертикальный, как у vc.ru) */
.vote-control {
  flex: none; width: 38px;
  display: flex; flex-direction: column; align-items: center; gap: 0;
}
.vote-control__btn {
  width: 32px; height: 26px; border: none; background: transparent;
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  color: var(--clr-text-muted);
}
.vote-control__btn:hover { background: var(--clr-surface-alt); color: var(--clr-text); }
.vote-control__btn--up.is-active { color: var(--clr-accent); }
.vote-control__btn--down.is-active { color: #e0322a; }
.vote-control__icon { width: 18px; height: 18px; }
.vote-control__score { font-size: 14px; font-weight: 700; color: var(--clr-text); padding: 1px 0; }

/* ==========================================================================
   4. Правая колонка (виджеты, в т.ч. лента комментариев)
   ========================================================================== */
.comments-rail { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 16px; }
.comments-rail__widget { background: var(--clr-surface); border-radius: var(--radius-md); box-shadow: var(--shadow-card); padding: 18px 20px; }
.comments-rail__widget h2 { font-size: 15px; margin: 0 0 12px; }
.comments-rail__item { padding: 10px 0; border-bottom: 1px solid var(--clr-border); font-size: 13px; }
.comments-rail__item:first-child { padding-top: 0; }
.comments-rail__item:last-child { border-bottom: none; padding-bottom: 0; }
.comments-rail__author { display: flex; align-items: center; gap: 8px; font-weight: 600; margin-bottom: 4px; }
.comments-rail__author img { width: 20px; height: 20px; border-radius: 50%; }
.comments-rail__excerpt { color: var(--clr-text); display: block; }
.comments-rail__source { display: block; color: var(--clr-text-muted); margin-top: 4px; }
.comments-rail__empty { background: var(--clr-surface); border-radius: var(--radius-md); box-shadow: var(--shadow-card); padding: 18px 20px; font-size: 13px; color: var(--clr-text-muted); }

/* ==========================================================================
   5. Пагинация
   ========================================================================== */
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 20px; }
.pagination a, .pagination span {
  min-width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm); background: var(--clr-surface); font-size: 13px; font-weight: 600;
}
.pagination .current { background: var(--clr-text); color: #fff; }

/* ==========================================================================
   6. Одиночная запись
   ========================================================================== */
.single-post__back { display: inline-block; font-size: 13px; font-weight: 600; color: var(--clr-text-muted); margin-bottom: 12px; }
.single-post__back:hover { color: var(--clr-accent); }

.single-post { background: var(--clr-surface); border-radius: var(--radius-md); box-shadow: var(--shadow-card); padding: 28px; }
.single-post__layout { display: flex; gap: 18px; align-items: flex-start; }
.single-post__body { flex: 1; min-width: 0; }
.single-post__title { font-size: 28px; line-height: 1.3; margin: 0 0 16px; }
.single-post__content { font-size: 17px; line-height: 1.75; }
.single-post__content img { border-radius: var(--radius-sm); margin: 18px 0; }
.single-post__content iframe { border-radius: var(--radius-sm); }

/* ==========================================================================
   6b. Кнопки «Поделиться»
   ========================================================================== */
.share-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 22px 0 4px; }
.share-bar__label { font-size: 13px; font-weight: 600; color: var(--clr-text-muted); }

.share-bar__btn {
  border: none; display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%; color: #fff;
}
.share-bar__btn-text { font-size: 11px; font-weight: 800; letter-spacing: -.02em; }
.share-bar__btn--vk { background: #0077ff; }
.share-bar__btn--vk:hover { background: #0066dd; color: #fff; }
.share-bar__btn--tg { background: #229ed9; }
.share-bar__btn--tg:hover { background: #1c89bd; color: #fff; }
.share-bar__btn--wa { background: #25d366; }
.share-bar__btn--wa:hover { background: #20bd5a; color: #fff; }

.share-bar__btn--copy {
  width: auto; height: 36px; padding: 0 16px; gap: 7px; border-radius: 999px;
  background: var(--clr-surface-alt); color: var(--clr-text-muted); font-size: 13px; font-weight: 600;
}
.share-bar__btn--copy:hover { background: var(--clr-border); color: var(--clr-text); }
.share-bar__btn--copy.is-copied { background: #e6f6ea; color: #1c7a35; }
.share-bar__copy-icon { width: 16px; height: 16px; flex: none; }

/* ==========================================================================
   6b. Страница автора
   ========================================================================== */
.author-card__top { display: flex; align-items: flex-start; gap: 18px; }
.author-card__avatar { width: 84px; height: 84px; border-radius: 50%; flex: none; }
.author-card__info { flex: 1; min-width: 0; }
.author-card__name { font-size: 24px; margin: 0 0 8px; }
.author-card__stats { display: flex; gap: 16px; font-size: 14px; color: var(--clr-text-muted); margin-bottom: 10px; }
.author-card__stats strong { color: var(--clr-text); }
.author-card__bio { font-size: 15px; line-height: 1.6; color: #3a3d45; margin: 0 0 8px; }
.author-card__site { font-size: 13px; color: var(--clr-accent); }

.btn-subscribe {
  flex: none; background: var(--clr-accent); color: #fff; border: none;
  padding: 10px 20px; border-radius: 999px; font-weight: 700; font-size: 14px;
}
.btn-subscribe:hover { background: var(--clr-accent-hover); color: #fff; }
.btn-subscribe.is-subscribed { background: var(--clr-surface-alt); color: var(--clr-text); }

@media (max-width: 560px) {
  .author-card__top { flex-wrap: wrap; }
  .btn-subscribe { width: 100%; text-align: center; }
}

/* ==========================================================================
   7. Прочее
   ========================================================================== */
.badge { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; background: var(--clr-surface-alt); font-size: 12px; font-weight: 600; }
.empty-state { background: var(--clr-surface); border-radius: var(--radius-md); padding: 50px 24px; text-align: center; color: var(--clr-text-muted); }

.subs-authors { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.subs-authors__item {
  display: flex; align-items: center; gap: 8px;
  background: var(--clr-surface); border-radius: 999px; padding: 6px 14px 6px 6px;
  box-shadow: var(--shadow-card); font-size: 13px; font-weight: 600; color: var(--clr-text);
}
.subs-authors__item img { width: 28px; height: 28px; border-radius: 50%; }

/* ==========================================================================
   7b. Похожие статьи
   ========================================================================== */
.related-posts { margin-top: 16px; background: var(--clr-surface); border-radius: var(--radius-md); box-shadow: var(--shadow-card); padding: 20px; }
.related-posts__title { font-size: 16px; margin: 0 0 14px; }
.related-posts__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.related-card { display: flex; gap: 10px; align-items: flex-start; border-radius: var(--radius-sm); }
.related-card:hover .related-card__title { color: var(--clr-accent); }
.related-card__thumb {
  flex: none; width: 88px; height: 62px; border-radius: var(--radius-sm);
  overflow: hidden; background: var(--clr-surface-alt); display: block;
}
.related-card__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.related-card__thumb--empty { background: linear-gradient(135deg, var(--clr-surface-alt), var(--clr-border)); }
.related-card__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.related-card__title { font-size: 13.5px; font-weight: 600; color: var(--clr-text); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.related-card__date { font-size: 12px; color: var(--clr-text-muted); }

@media (max-width: 560px) {
  .related-posts__grid { grid-template-columns: 1fr; }
}

.site-footer { border-top: 1px solid var(--clr-border); padding: 24px; text-align: center; font-size: 13px; color: var(--clr-text-muted); }
.site-footer a { color: var(--clr-text-muted); }

/* ==========================================================================
   7b. Формы (регистрация, добавление статьи)
   ========================================================================== */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--clr-accent); color: #fff; border: none;
  padding: 11px 22px; border-radius: 999px; font-weight: 700; font-size: 14px;
  cursor: pointer;
}
.btn-primary:hover { background: var(--clr-accent-hover); color: #fff; }
.btn-primary--ghost { background: var(--clr-surface-alt); color: var(--clr-text); margin-left: 8px; }
.btn-primary--ghost:hover { background: var(--clr-border); color: var(--clr-text); }

.auth-form,
.publish-form { display: flex; flex-direction: column; gap: 16px; margin-top: 16px; }
.auth-form label,
.publish-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--clr-text-muted); }
.auth-form input,
.publish-form input[type="text"],
.publish-form input[type="url"],
.publish-form input[type="password"],
.publish-form select,
.publish-form textarea {
  padding: 11px 14px; border: 1px solid var(--clr-border); border-radius: var(--radius-sm);
  font-size: 14px; font-family: inherit; color: var(--clr-text);
}
.publish-form textarea { resize: vertical; }
.publish-form input[type="file"] { font-size: 13px; }

.profile-form__password {
  border: 1px solid var(--clr-border); border-radius: var(--radius-sm);
  padding: 14px 16px; margin: 4px 0; display: flex; flex-direction: column; gap: 12px;
}
.profile-form__password legend { font-size: 13px; font-weight: 700; padding: 0 6px; color: var(--clr-text-muted); }

.form-notice { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 14px; margin: 16px 0; }
.form-notice p { margin: 4px 0; }
.form-notice--success { background: #e6f6ea; color: #1c7a35; }
.form-notice--error { background: #fdecec; color: #c62828; }

.my-posts-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.my-posts-list li { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.my-posts-list__status {
  flex: none; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px;
  background: var(--clr-surface-alt); color: var(--clr-text-muted); text-transform: uppercase;
}
.my-posts-list__status--publish { background: #e6f6ea; color: #1c7a35; }
.my-posts-list__status--pending { background: #fff6e0; color: #9a6b00; }
.my-posts-list__status--draft { background: var(--clr-surface-alt); color: var(--clr-text-muted); }

/* ==========================================================================
   7c. Личный кабинет
   ========================================================================== */
.dashboard { display: flex; flex-direction: column; gap: 16px; }

.dashboard__hero {
  position: relative; border-radius: var(--radius-md); overflow: hidden;
  background: var(--clr-surface); box-shadow: var(--shadow-card);
}
.dashboard__cover {
  height: 120px;
  background: linear-gradient(135deg, var(--clr-accent), #8a4fff 75%);
}
.dashboard__identity {
  display: flex; align-items: flex-end; gap: 16px;
  padding: 0 24px 20px; margin-top: -40px;
}
.dashboard__avatar {
  width: 88px; height: 88px; border-radius: 50%;
  border: 4px solid var(--clr-surface); box-shadow: 0 2px 8px rgba(0,0,0,.15);
  flex: none; background: var(--clr-surface); object-fit: cover;
}
.dashboard__meta { padding-top: 44px; min-width: 0; }
.dashboard__name { font-size: 22px; margin: 0 0 4px; }
.dashboard__bio { font-size: 14px; color: var(--clr-text-muted); margin: 0 0 8px; max-width: 560px; }
.dashboard__social { display: flex; gap: 14px; flex-wrap: wrap; }
.dashboard__social a { font-size: 13px; font-weight: 600; color: var(--clr-text-muted); }
.dashboard__social a:hover { color: var(--clr-accent); }

.dashboard__stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.dashboard__stat {
  background: var(--clr-surface); border-radius: var(--radius-sm); box-shadow: var(--shadow-card);
  padding: 14px 8px; text-align: center;
}
.dashboard__stat-num { display: block; font-size: 20px; font-weight: 800; color: var(--clr-text); }
.dashboard__stat-label { font-size: 11.5px; color: var(--clr-text-muted); }

.dashboard__tabs {
  display: flex; gap: 4px; background: var(--clr-surface); border-radius: 999px;
  padding: 4px; box-shadow: var(--shadow-card); width: fit-content; max-width: 100%; overflow-x: auto;
}
.dashboard__tab {
  border: none; background: transparent; padding: 9px 18px; border-radius: 999px;
  font-size: 13.5px; font-weight: 600; color: var(--clr-text-muted); white-space: nowrap;
}
.dashboard__tab.is-active { background: var(--clr-accent); color: #fff; }

.dashboard__panel { background: var(--clr-surface); border-radius: var(--radius-md); box-shadow: var(--shadow-card); padding: 20px; }
.dashboard__panel .post-feed,
.dashboard__panel .empty-state { background: transparent; box-shadow: none; padding: 0; }
.dashboard__panel .empty-state { padding: 30px; background: var(--clr-surface-alt); border-radius: var(--radius-sm); }

@media (max-width: 720px) {
  .dashboard__stats { grid-template-columns: repeat(3, 1fr); }
  .dashboard__identity { flex-direction: column; align-items: flex-start; margin-top: -32px; padding: 0 16px 16px; }
  .dashboard__avatar { width: 72px; height: 72px; }
  .dashboard__meta { padding-top: 0; }
  .dashboard__panel { padding: 16px; }
}

/* ==========================================================================
   8. Мобильная нижняя панель (app-like)
   ========================================================================== */
.mobile-tabbar {
  display: none;
}

@media (max-width: 720px) {
  .mobile-tabbar {
    display: flex;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 50;
    background: var(--clr-surface);
    border-top: 1px solid var(--clr-border);
    padding: 4px 4px calc(4px + env(safe-area-inset-bottom));
    height: var(--tabbar-h);
    overflow-x: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
    gap: 2px;
  }
  .mobile-tabbar::-webkit-scrollbar { display: none; }

  .mobile-tabbar .primary-nav__link {
    flex: 1 0 auto;
    flex-direction: column;
    gap: 3px;
    padding: 6px 10px;
    border-radius: 10px;
    min-width: 60px;
  }
  .mobile-tabbar .primary-nav__icon { width: 21px; height: 21px; }
  .mobile-tabbar .primary-nav__label { font-size: 10.5px; max-width: 68px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
  .mobile-tabbar .primary-nav__link.is-active { background: transparent; }
  .mobile-tabbar .primary-nav__link.is-active .primary-nav__label { color: var(--clr-accent); font-weight: 700; }
}

/* ==========================================================================
   9. Адаптация верхней шапки на мобильных
   ========================================================================== */
@media (max-width: 720px) {
  .site-header__inner { padding: 12px 16px; gap: 12px; }
  .site-branding .site-description { display: none; }
  .main-nav ul { gap: 12px; }
  .main-nav a { font-size: 13px; }
  .main-nav__secondary { display: none; }
  .hub-tabs__inner { display: none; }
  .hub-tabs__toggle { display: flex; }

  .site-content { padding-top: 12px; }
  .post-card { padding: 14px 16px; border-radius: var(--radius-sm); }
  .post-card__title { font-size: 16px; }
  .post-card__excerpt { display: none; } /* на телефоне оставляем только заголовок + обложку — компактнее */
  .post-card__thumb-compact { width: 84px; height: 68px; }
  .post-card__main { gap: 10px; margin-bottom: 8px; }
  .single-post { padding: 18px; border-radius: var(--radius-sm); }
  .single-post__title { font-size: 22px; }
  .vote-control { width: 32px; }
  .vote-control__btn { width: 28px; }
  .post-card__layout,
  .single-post__layout { gap: 10px; }
}
