/* ============================================
   Московский центр прикладного НЛП
   Энциклопедия НЛП на русскоязычном пространстве
   Домен: нлп.москва
   ============================================ */

:root {
  --nlp-deep: #1a1a3e;
  --nlp-blue: #2d3b8a;
  --nlp-accent: #c8963e;
  --nlp-gold: #d4a853;
  --nlp-gold-light: #f5e6c8;
  --nlp-bg: #fafaf8;
  --nlp-white: #ffffff;
  --nlp-text: #2c2c3a;
  --nlp-text-light: #6b6b7b;
  --nlp-border: #e0dcd0;
  --nlp-link: #2d3b8a;
  --nlp-link-hover: #1a1a3e;
  --nlp-heading: #1a1a3e;
  --nlp-surface: #f5f3ed;
  --nlp-green: #3d8b6e;
  --nlp-green-dark: #2d6b53;
  --nlp-red: #c0392b;
}

body {
  background: var(--nlp-bg);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', sans-serif;
  color: var(--nlp-text);
  line-height: 1.65;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

/* ===== WIKI PAGE WRAPPER ===== */
.wiki-page {
  background: var(--nlp-white);
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
  min-height: 100vh;
  overflow-x: hidden;
}

@media (min-width: 1200px) {
  .wiki-page {
    max-width: 1140px;
    margin: 0 auto;
  }
}

.wiki-content {
  padding: 1.5rem 2rem 3rem;
  max-width: 960px;
  margin: 0 auto;
}

/* ===== WIKI TABS — навигация ===== */
.wiki-tabs {
  display: flex;
  gap: 0;
  font-size: 0.82rem;
  padding: 0 1.5rem;
  background: linear-gradient(180deg, #f8f7f3 0%, #f0ede5 100%);
  border-bottom: 2px solid var(--nlp-accent);
  overflow-x: auto;
  overflow-y: hidden;
  flex-wrap: nowrap;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  scrollbar-color: #ccc transparent;
}

.wiki-tabs::-webkit-scrollbar {
  height: 4px;
}
.wiki-tabs::-webkit-scrollbar-track {
  background: transparent;
}
.wiki-tabs::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 2px;
}

.wiki-tab {
  padding: 0.55rem 1.3rem;
  color: var(--nlp-link);
  white-space: nowrap;
  cursor: default;
  position: relative;
  bottom: -2px;
  text-decoration: none;
  flex-shrink: 0;
  font-weight: 500;
  letter-spacing: 0.2px;
  border-radius: 6px 6px 0 0;
  transition: all 0.2s ease;
}

.wiki-tab.active {
  background: #fff;
  border: 2px solid var(--nlp-accent);
  border-bottom: 2px solid #fff;
  color: var(--nlp-heading);
  font-weight: 700;
}

.wiki-tab:not(.active) {
  background: #e8e4db;
  border: 1px solid var(--nlp-border);
  border-bottom: 2px solid var(--nlp-accent);
  color: #555;
}
.wiki-tab:not(.active):hover {
  background: #f0ede5;
  text-decoration: none;
  color: var(--nlp-link-hover);
}

/* ===== HEADINGS ===== */
.wiki-content h1 {
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: 2.1rem;
  font-weight: 700;
  border-bottom: 2px solid var(--nlp-accent);
  padding-bottom: 0.4rem;
  margin: 0.25rem 0 1rem;
  color: var(--nlp-heading);
  letter-spacing: -0.3px;
  line-height: 1.25;
}

.wiki-content h2 {
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: 1.55rem;
  font-weight: 700;
  border-bottom: 1px solid var(--nlp-border);
  padding-bottom: 0.2rem;
  margin: 2rem 0 0.75rem;
  color: var(--nlp-heading);
}

.wiki-content h3 {
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: 1.2rem;
  font-weight: 700;
  margin: 1.5rem 0 0.5rem;
  color: var(--nlp-heading);
}

.wiki-content h4 {
  font-size: 1rem;
  font-weight: 700;
  margin: 1.2rem 0 0.4rem;
}

.wiki-content p {
  margin: 0.5rem 0 1rem;
  font-size: 0.95rem;
}

.wiki-content ul, .wiki-content ol {
  margin: 0.3rem 0 1rem 1.6rem;
  padding: 0;
  font-size: 0.95rem;
}

.wiki-content li {
  margin-bottom: 0.3rem;
}

.wiki-content a {
  color: var(--nlp-link);
  text-decoration: none;
  transition: color 0.15s;
}
.wiki-content a:hover {
  color: var(--nlp-link-hover);
  text-decoration: underline;
}
.wiki-content a:visited {
  color: #4a5099;
}

/* ===== HATNOTE ===== */
.wiki-hatnote {
  font-style: italic;
  padding: 0.4rem 0;
  font-size: 0.875rem;
  color: #777;
  margin-bottom: 0.5rem;
}

/* ===== INFOBOX ===== */
.wiki-infobox {
  float: right;
  width: 280px;
  background: #fdfcf9;
  border: 1px solid var(--nlp-border);
  padding: 0.5em;
  margin: 0.5rem 0 1.5rem 1.5rem;
  font-size: 0.8rem;
  line-height: 1.5;
  clear: right;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.wiki-infobox .infobox-title {
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
  padding: 0.4em 0;
  background: linear-gradient(135deg, var(--nlp-blue) 0%, var(--nlp-deep) 100%);
  color: #fff;
  margin: -0.5em -0.5em 0.5em;
  border-radius: 4px 4px 0 0;
  letter-spacing: 0.3px;
}

.wiki-infobox .infobox-image {
  text-align: center;
  padding: 0.5em 0;
}

.wiki-infobox .infobox-image img {
  max-width: 100%;
  height: auto;
  border-radius: 3px;
}

.wiki-infobox table {
  width: 100%;
}

.wiki-infobox th {
  text-align: left;
  vertical-align: top;
  padding: 0.25em 0.4em;
  font-weight: 500;
  color: #888;
  width: 40%;
  white-space: nowrap;
  font-size: 0.78rem;
}

.wiki-infobox td {
  vertical-align: top;
  padding: 0.25em 0.4em;
  color: #333;
}

/* ===== TABLE OF CONTENTS ===== */
.wiki-toc {
  background: var(--nlp-surface);
  border: 1px solid var(--nlp-border);
  font-size: 0.875rem;
  padding: 0.7em 1.3em;
  margin: 1.2rem 0 1.5rem;
  display: inline-block;
  min-width: 290px;
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}

.wiki-toc .toc-title {
  font-weight: 700;
  text-align: center;
  margin-bottom: 0.4em;
  color: var(--nlp-heading);
  font-size: 0.95rem;
}

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

.wiki-toc > ul {
  margin-left: 0;
}

.wiki-toc ul ul {
  margin-left: 1.5em;
}

.wiki-toc .toc-number {
  color: var(--nlp-accent);
  font-weight: 600;
}

/* ===== QUOTE BOX ===== */
.wiki-quote {
  background: linear-gradient(135deg, #fdfaf3 0%, #faf6ec 100%);
  border-left: 4px solid var(--nlp-accent);
  padding: 0.9rem 1.4rem;
  margin: 1.2rem 0;
  font-size: 0.9rem;
  border-radius: 0 6px 6px 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

/* ===== WIKI TABLE ===== */
.wiki-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.875rem;
  border-radius: 4px;
  overflow: hidden;
}

.wiki-table th {
  background: var(--nlp-blue);
  color: #fff;
  text-align: left;
  padding: 0.55em 0.75em;
  border: none;
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.3px;
}

.wiki-table td {
  padding: 0.5em 0.75em;
  border: 1px solid var(--nlp-border);
  vertical-align: top;
}

.wiki-table tr:nth-child(even) td {
  background: #faf9f5;
}

/* ===== AMBOX ===== */
.wiki-ambox {
  display: flex;
  background: #fef9f0;
  border: 1px solid #e8c876;
  padding: 0.7rem 1.2rem;
  margin: 0.5rem 0 1rem;
  font-size: 0.875rem;
  align-items: flex-start;
  gap: 0.6rem;
  border-radius: 6px;
}

.wiki-ambox.ambox-green {
  background: #f2f8f6;
  border-color: #8cc9b8;
}

/* ===== NAVBOX ===== */
.wiki-navbox {
  border: 1px solid var(--nlp-border);
  font-size: 0.85rem;
  margin: 2rem 0 1rem;
  clear: both;
  border-radius: 6px;
  overflow: hidden;
}

.wiki-navbox .navbox-title {
  background: linear-gradient(135deg, var(--nlp-blue) 0%, var(--nlp-deep) 100%);
  color: #fff;
  text-align: center;
  padding: 0.4rem;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.wiki-navbox .navbox-body {
  padding: 0.6rem 1.1rem;
  background: #faf9f5;
}

/* ===== CATEGORIES ===== */
.wiki-categories {
  background: var(--nlp-surface);
  border: 1px solid var(--nlp-border);
  padding: 0.6rem 1.1rem;
  margin: 1.5rem 0;
  font-size: 0.85rem;
  border-radius: 6px;
}

/* ===== BUTTONS ===== */
.wiki-btn {
  display: inline-block;
  background: #f5f2ec;
  border: 1px solid var(--nlp-border);
  color: var(--nlp-link);
  font-weight: 600;
  padding: 0.5rem 1.2rem;
  font-size: 0.875rem;
  text-decoration: none;
  transition: all 0.2s ease;
  border-radius: 6px;
  cursor: pointer;
}
.wiki-btn:hover {
  background: #fff;
  text-decoration: none;
  color: var(--nlp-link-hover);
  border-color: var(--nlp-accent);
}

.wiki-btn-primary {
  background: linear-gradient(135deg, var(--nlp-accent) 0%, #b8862d 100%);
  border-color: var(--nlp-accent);
  color: #fff;
}
.wiki-btn-primary:hover {
  background: linear-gradient(135deg, #b8862d 0%, #9a6f20 100%);
  color: #fff;
}

/* ===== FORM ===== */
.wiki-form .form-control {
  border: 1px solid var(--nlp-border);
  border-radius: 6px;
  padding: 0.6rem 0.85rem;
  font-size: 0.9rem;
  background: #fffefb;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.wiki-form .form-control:focus {
  border-color: var(--nlp-accent);
  box-shadow: 0 0 0 3px rgba(200,150,62,0.12);
  outline: none;
}
.wiki-form label {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--nlp-heading);
  margin-bottom: 0.3rem;
}

/* ===== FOOTER ===== */
.wiki-footer {
  border-top: 2px solid var(--nlp-accent);
  padding: 1.5rem 2rem;
  font-size: 0.78rem;
  color: var(--nlp-text-light);
  max-width: 960px;
  margin: 0 auto;
  background: linear-gradient(0deg, #f8f7f3 0%, #fff 100%);
}

.wiki-footer a {
  color: var(--nlp-link);
}

.wiki-footer ul {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.5rem;
}

.wiki-footer li {
  margin-bottom: 0.25rem;
}

/* ===== TOAST ===== */
.custom-toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--nlp-deep);
  color: #fff;
  padding: 0.85rem 1.6rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  z-index: 9999;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  animation: slideUp 0.4s ease, fadeOut 0.4s ease 3.5s forwards;
  border-left: 3px solid var(--nlp-accent);
}
@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* ===== HERO SECTION (для главной) ===== */
.nlp-hero {
  background: linear-gradient(135deg, var(--nlp-deep) 0%, var(--nlp-blue) 50%, #1e2d6e 100%);
  color: #fff;
  padding: 3rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.nlp-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(200,150,62,0.15) 0%, transparent 70%);
  border-radius: 50%;
}

.nlp-hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(200,150,62,0.1) 0%, transparent 70%);
  border-radius: 50%;
}

.nlp-hero h1 {
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: 2.6rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: #fff;
  border: none;
  position: relative;
  z-index: 1;
}

.nlp-hero .hero-subtitle {
  font-size: 1.15rem;
  color: var(--nlp-gold-light);
  max-width: 700px;
  margin: 0 auto 1.5rem;
  position: relative;
  z-index: 1;
  line-height: 1.6;
}

.nlp-hero .hero-badges {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.nlp-hero .hero-badge {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 30px;
  padding: 0.4rem 1.2rem;
  font-size: 0.85rem;
  color: var(--nlp-gold-light);
  backdrop-filter: blur(4px);
}

/* ===== THREE PILLARS ===== */
.nlp-pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin: 1.5rem 0;
}

@media (max-width: 768px) {
  .nlp-pillars {
    grid-template-columns: 1fr;
  }
}

.nlp-pillar {
  background: #fff;
  border: 1px solid var(--nlp-border);
  border-radius: 10px;
  padding: 1.5rem;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.nlp-pillar:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.nlp-pillar .pillar-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.6rem;
}

.nlp-pillar .pillar-icon.business {
  background: #e8f0fe;
  color: var(--nlp-blue);
}

.nlp-pillar .pillar-icon.career {
  background: #fef7ed;
  color: var(--nlp-accent);
}

.nlp-pillar .pillar-icon.relationships {
  background: #f0e6f6;
  color: #6b3d8b;
}

.nlp-pillar h3 {
  font-family: 'Georgia', serif;
  font-size: 1.15rem;
  margin: 0 0 0.5rem;
  color: var(--nlp-heading);
}

.nlp-pillar p {
  font-size: 0.85rem;
  color: var(--nlp-text-light);
  margin: 0;
}

/* ===== STATS ROW ===== */
.nlp-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin: 1.5rem 0;
}

@media (max-width: 768px) {
  .nlp-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

.nlp-stat {
  text-align: center;
  padding: 1rem;
}

.nlp-stat .stat-number {
  font-family: 'Georgia', serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--nlp-accent);
  line-height: 1.2;
}

.nlp-stat .stat-label {
  font-size: 0.8rem;
  color: var(--nlp-text-light);
  margin-top: 0.25rem;
}

/* ===== FEATURE LIST ===== */
.nlp-feature-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}

.nlp-feature-list li {
  padding: 0.4rem 0 0.4rem 1.8rem;
  position: relative;
  margin-bottom: 0.3rem;
  font-size: 0.95rem;
}

.nlp-feature-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65rem;
  width: 8px;
  height: 8px;
  background: var(--nlp-accent);
  border-radius: 50%;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .wiki-infobox {
    float: none;
    width: 100%;
    margin: 1rem 0;
  }
  .wiki-references {
    column-count: 1;
  }
  .wiki-content {
    padding: 1rem;
  }
  .wiki-footer ul {
    flex-direction: column;
    gap: 0.25rem;
  }
  .nlp-hero h1 {
    font-size: 1.8rem;
  }
  .nlp-hero {
    padding: 2rem 1rem;
  }
}

@media (min-width: 1200px) {
  .wiki-page {
    max-width: 1140px;
    margin: 0 auto;
  }
}

/* ===== SPECIALIST CARDS ===== */
.nlp-specialists-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin: 1.5rem 0;
}

@media (max-width: 992px) {
  .nlp-specialists-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .nlp-specialists-grid {
    grid-template-columns: 1fr;
  }
}

.nlp-specialist-card {
  background: #fff;
  border: 1px solid var(--nlp-border);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.nlp-specialist-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.1);
}

.nlp-specialist-card .spec-photo {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  display: block;
  background: #f0ede7;
}

.nlp-specialist-card .spec-info {
  padding: 1rem 1.1rem;
}

.nlp-specialist-card .spec-name {
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--nlp-heading);
  margin: 0 0 0.2rem;
}

.nlp-specialist-card .spec-title {
  font-size: 0.78rem;
  color: var(--nlp-accent);
  font-weight: 600;
  margin: 0 0 0.5rem;
  letter-spacing: 0.2px;
}

.nlp-specialist-card .spec-methods {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}

.nlp-specialist-card .spec-method-tag {
  font-size: 0.68rem;
  padding: 0.15rem 0.55rem;
  border-radius: 20px;
  font-weight: 500;
  white-space: nowrap;
}

.nlp-specialist-card .spec-method-tag.primary {
  background: var(--nlp-blue);
  color: #fff;
}

.nlp-specialist-card .spec-method-tag.secondary {
  background: #f0ede7;
  color: #555;
}

.nlp-specialist-card .spec-desc {
  font-size: 0.8rem;
  color: var(--nlp-text-light);
  margin: 0;
  line-height: 1.45;
}

html { scroll-behavior: smooth; }