/* Профиль автора — новый дизайн */

.nd-profile-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ─ Хидер профиля ─────────────────────────────── */
.nd-profile-hero {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.nd-profile-head {
  display: flex;
  align-items: flex-start;
  gap: 18px;
}

.nd-profile-avatar {
  flex: none;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  overflow: hidden;
  background: #EDF1F6;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nd-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nd-profile-info {
  flex: 1;
  min-width: 0;
}

.nd-profile-name-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.nd-profile-name {
  margin: 0;
  font: 500 28px/34px var(--nd-font);
}

.nd-profile-role {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--nd-accent-soft);
  color: var(--nd-accent);
  font-size: 13px;
}

.nd-profile-description {
  margin: 0;
  font-size: 15px;
  line-height: 22px;
  color: var(--nd-text-2);
  max-width: 72ch;
  text-wrap: pretty;
}

.nd-profile-meta {
  margin: 8px 0 12px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--nd-text-3);
}

.nd-profile-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nd-profile-region {
  height: 28px;
  padding: 0 12px 0 10px;
  border-radius: 999px;
  background: #EAF2FD;
  color: var(--nd-accent);
  font: 500 14px/1 var(--nd-font);
}

.nd-profile-actions {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ─ Культуры ──────────────────────────────────── */
.nd-profile-cultures {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 16px;
  border-top: 1px solid var(--nd-line);
}

.nd-profile-cultures-label {
  flex: none;
  font-size: 13px;
  color: var(--nd-text-3);
  white-space: nowrap;
}

.nd-profile-cultures-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.nd-culture-tag {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--nd-neutral);
  color: var(--nd-text);
  font: 500 14px/28px var(--nd-font);
  text-decoration: none;
  transition: background-color 0.15s;
}

.nd-culture-tag:hover {
  background: #E0E2E8;
}

/* ─ Статистика ────────────────────────────────── */
.nd-profile-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--nd-line);
}

.nd-profile-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 16px;
  background: #F7F8FA;
  border-radius: 12px;
}

.nd-profile-stat strong {
  font: 500 24px/28px var(--nd-font);
}

.nd-profile-stat span {
  font-size: 13px;
  color: var(--nd-text-3);
}

/* ─ Контакты ──────────────────────────────────── */
.nd-profile-contacts-section {
  margin-top: 0;
}

.nd-profile-contacts-section .nd-h2 {
  margin: 0 0 14px;
}

.nd-profile-contacts {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.nd-profile-contact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: #EEF1F5;
  color: #6B7280;
  cursor: pointer;
  transition: transform 0.15s, background-color 0.15s, color 0.15s;
  text-decoration: none;
}

.nd-profile-contact svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  stroke: none;
}

.nd-profile-contact:hover {
  transform: translateY(-1px);
  color: #fff;
}

.nd-profile-contact-telegram:hover { background: #2AABEE; }
.nd-profile-contact-whatsapp:hover { background: #25D366; }
.nd-profile-contact-vk:hover { background: #0077FF; }
.nd-profile-contact-ok:hover { background: #EE8208; }
.nd-profile-contact-max_messenger:hover { background: #7B5CFA; }
.nd-profile-contact:not(.nd-profile-contact-telegram):not(.nd-profile-contact-whatsapp):not(.nd-profile-contact-vk):not(.nd-profile-contact-ok):not(.nd-profile-contact-max_messenger):hover { background: var(--nd-primary, #2E7D32); }

/* ─ Вкладки ───────────────────────────────────── */
/* Стиль как .nd-acc-tabs (кабинет): тёмная плашка, подчёркивание активной */
body.nd .nd-profile-tabs-section {
  position: sticky;
  top: 72px;
  z-index: 20;
  background: var(--nd-dark-header, #1B1F24);
  border: 1px solid var(--nd-dark-line, #2A2F36);
  border-radius: var(--nd-radius-card, 10px);
  padding: 0 16px;
}

.nd-profile-tabs {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

body.nd a.nd-profile-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 48px;
  padding: 0;
  background: transparent;
  color: #C2C8CF;
  font: 500 16px/1 var(--nd-font);
  text-decoration: none;
  transition: color .15s;
}

body.nd a.nd-profile-tab::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: transparent;
  transition: background .15s;
}

body.nd a.nd-profile-tab:hover {
  color: #E0E6EC;
}

body.nd a.nd-profile-tab--active {
  color: #fff;
}

body.nd a.nd-profile-tab--active::before {
  background: var(--nd-accent);
}

.nd-profile-tab-count {
  color: #8A929B;
  font: 500 14px/1 var(--nd-font);
}

.nd-profile-tab--active .nd-profile-tab-count {
  color: #C2C8CF;
}

/* ─ Описание под спойлером ─ */
.nd-profile-description.is-clamped {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow: hidden;
}

body.nd .nd-profile-more {
  margin-top: 4px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--nd-accent);
  font: 500 14px/20px var(--nd-font);
  cursor: pointer;
}

/* ─ Содержимое ─────────────────────────────────── */
.nd-profile-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.nd-profile-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nd-profile-items--products {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 768px) {
  .nd-profile-items--products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .nd-profile-items--products {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.nd-profile-empty {
  margin: 0;
  padding: 24px;
  text-align: center;
  color: var(--nd-text-3);
  background: #F7F8FA;
  border-radius: var(--nd-radius-card);
}

.nd-profile-about-text {
  margin: 0;
  font-size: 15px;
  line-height: 22px;
  color: var(--nd-text);
}

.nd-profile-pagination {
  margin-top: 8px;
}

/* ─ Адаптив ────────────────────────────────────── */
@media (max-width: 1000px) {
  .nd-profile-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nd-profile-tabs {
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .nd-profile-tabs::-webkit-scrollbar {
    display: none;
  }

  .nd-profile-tab {
    flex: none;
    white-space: nowrap;
  }
}

@media (max-width: 700px) {
  .nd-profile-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .nd-profile-actions {
    width: 100%;
  }

  .nd-profile-actions .nd-btn {
    flex: 1;
    min-width: 0;
  }

  .nd-profile-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nd-profile-cultures {
    flex-direction: column;
    align-items: flex-start;
  }

  .nd-profile-cultures-label {
    flex: 1 0 100%;
  }

  .nd-profile-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .nd-profile-tabs {
    overflow-x: auto;
    scrollbar-width: none;
    gap: 4px;
  }

  .nd-profile-tabs::-webkit-scrollbar {
    display: none;
  }

  .nd-profile-tab {
    flex: none;
    white-space: nowrap;
    padding: 0 14px;
    height: 40px;
    font-size: 14px;
  }
}

@media (max-width: 400px) {
  .nd-profile-avatar {
    width: 72px;
    height: 72px;
  }

  .nd-profile-head {
    gap: 12px;
  }

  .nd-profile-name {
    font-size: 22px;
    line-height: 28px;
  }

  .nd-profile-meta {
    font-size: 12px;
    gap: 6px;
  }

  .nd-profile-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .nd-profile-stat {
    padding: 12px 12px;
  }

  .nd-profile-stat strong {
    font-size: 20px;
    line-height: 24px;
  }

  .nd-profile-tab {
    padding: 0 12px;
    height: 36px;
    font-size: 13px;
  }

  .nd-profile-actions {
    flex-direction: column;
  }

  .nd-profile-actions .nd-btn {
    width: 100%;
  }
}

body.nd a.nd-profile-tab { text-decoration: none; }

/* «Об авторе»: сетка полей — new-design/Profile Page.dc.html. */
.nd-profile-about-grid { margin: 14px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 24px; }
.nd-profile-about-row { padding-bottom: 8px; border-bottom: 1px solid #F0F1F3; min-width: 0; }
.nd-profile-about-row dt { font-size: 13px; color: #808080; }
.nd-profile-about-row dd { margin: 2px 0 0; font-size: 15px; line-height: 21px; }
@media (max-width: 700px) { .nd-profile-about-grid { grid-template-columns: minmax(0, 1fr); } }
