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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #fff;
}

/* Header */
.main-header {
  background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
  color: #fff;
  padding: 30px 20px;
  width: 100%;
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.header-left {
  flex-shrink: 0;
}

.header-icon {
  position: relative;
  width: 80px;
  height: 80px;
}

.icon-image {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fff;
}

.icon-badge {
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #e91e63;
  color: #fff;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.header-center {
  flex: 1;
  text-align: center;
}

.header-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.3;
}

.header-subtitle {
  font-size: 16px;
  opacity: 0.9;
}

.header-right {
  flex-shrink: 0;
}

.menu-toggle {
  background: none;
  border: 2px solid #fff;
  color: #fff;
  font-size: 24px;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.menu-toggle:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Main Container */
.main-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  background-color: #fff;
}

/* Introduction */
.intro-section {
  margin-bottom: 40px;
  font-size: 16px;
  line-height: 1.8;
  color: #333;
}

.intro-section p {
  margin-bottom: 15px;
}

/* Navigation Buttons */
.nav-buttons {
  display: flex;
  gap: 15px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.nav-btn {
  background-color: #0066cc;
  color: #fff;
  border: none;
  padding: 12px 30px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  flex: 1;
  min-width: 150px;
}

.nav-btn:hover {
  background-color: #0052a3;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 102, 204, 0.3);
}

.nav-btn.active {
  background-color: #004080;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Result Images */
.result-images {
  display: flex;
  gap: 20px;
  margin-bottom: 50px;
  justify-content: center;
}

.result-image {
  max-width: 100%;
  width: 400px;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Content Sections */
.content-section {
  display: none;
}

.content-section.active {
  display: block;
}

.section-title {
  font-size: 32px;
  font-weight: 700;
  color: #0066cc;
  margin-bottom: 30px;
  line-height: 1.3;
}

/* Table of Contents */
.table-of-contents {
  background-color: #f8f9fa;
  padding: 25px;
  border-radius: 8px;
  margin-bottom: 40px;
  border-left: 4px solid #0066cc;
}

.toc-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 15px;
  color: #000;
}

.toc-list {
  list-style: decimal;
  padding-left: 25px;
}

.toc-list li {
  margin-bottom: 10px;
}

.toc-link {
  color: #0066cc;
  text-decoration: none;
  font-size: 16px;
  transition: color 0.2s;
}

.toc-link:hover {
  color: #0052a3;
  text-decoration: underline;
}

/* Bot Cards */
.bot-card {
  background-color: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 25px;
  margin-bottom: 30px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.3s;
}

.bot-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.bot-name {
  font-size: 24px;
  font-weight: 700;
  color: #0066cc;
  margin-bottom: 15px;
}

.bot-button {
  display: inline-block;
  background-color: #0066cc;
  color: #fff;
  padding: 12px 25px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  margin-bottom: 20px;
  transition: all 0.3s;
  border: none;
  cursor: pointer;
  font-size: 16px;
}

.bot-button:hover {
  background-color: #0052a3;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 102, 204, 0.3);
}

.bot-card p {
  margin-bottom: 15px;
  font-size: 16px;
  line-height: 1.7;
  color: #333;
}

.bot-image-wrapper {
  margin: 20px 0;
  text-align: center;
}

.bot-image {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.bot-info {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #e0e0e0;
}

.bot-info h4 {
  font-size: 18px;
  font-weight: 700;
  margin: 20px 0 10px 0;
  color: #000;
}

.bot-info ul {
  margin: 10px 0;
  padding-left: 25px;
}

.bot-info li {
  margin-bottom: 8px;
  line-height: 1.6;
}

.bot-info p {
  margin: 10px 0;
}

/* Sites List */
.sites-list {
  list-style: none;
  padding: 0;
}

.sites-list li {
  margin-bottom: 15px;
  padding: 15px;
  background-color: #f8f9fa;
  border-left: 4px solid #0066cc;
  border-radius: 4px;
  line-height: 1.7;
}

.sites-list li strong {
  color: #0066cc;
}

/* FAQ Section */
.faq-item {
  margin-bottom: 30px;
  padding: 25px;
  background-color: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid #0066cc;
}

.faq-question {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 15px;
  color: #000;
}

.faq-answer {
  font-size: 16px;
  line-height: 1.7;
  color: #333;
}

/* Footer */
.main-footer {
  background-color: #2c2c2c;
  color: #fff;
  text-align: center;
  padding: 30px 20px;
  margin-top: 60px;
}

.main-footer p {
  font-size: 14px;
  opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 968px) {
  .header-content {
    flex-direction: column;
    text-align: center;
  }

  .header-title {
    font-size: 24px;
  }

  .header-subtitle {
    font-size: 14px;
  }

  .result-images {
    flex-direction: column;
    align-items: center;
  }

  .result-image {
    width: 100%;
    max-width: 500px;
  }

  .nav-buttons {
    flex-direction: column;
  }

  .nav-btn {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .main-header {
    padding: 20px 15px;
  }

  .header-title {
    font-size: 20px;
  }

  .header-icon {
    width: 60px;
    height: 60px;
  }

  .icon-badge {
    font-size: 10px;
    padding: 3px 8px;
  }

  .main-container {
    padding: 20px 15px;
  }

  .section-title {
    font-size: 24px;
  }

  .bot-name {
    font-size: 20px;
  }

  .bot-card {
    padding: 20px;
  }

  .table-of-contents {
    padding: 20px;
  }

  .toc-title {
    font-size: 18px;
  }

  .toc-link {
    font-size: 14px;
  }

  .intro-section {
    font-size: 15px;
  }

  .bot-card p,
  .faq-answer {
    font-size: 15px;
  }
}
/* Sidebar with Other Articles - адаптировано под blue header стиль (ar8) */
.articles-sidebar {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.other-articles {
    background: #ffffff;
    border: 2px solid #0066cc;
    border-radius: 12px;
    padding: 20px;
    max-width: 350px;
    margin: 0 auto 30px;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.15);
}

.sidebar-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #0066cc;
    padding-bottom: 12px;
    border-bottom: 2px solid #0066cc;
}

.article-preview {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e5e5;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}

.article-preview:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.article-preview:hover {
    background-color: #e6f2ff;
    border-radius: 8px;
    padding: 10px;
    margin-left: -10px;
    margin-right: -10px;
}

.article-thumbnail {
    flex-shrink: 0;
    width: 100px;
    height: 70px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #0066cc;
    background: #e6f2ff;
    position: relative;
}

.article-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.article-thumbnail img[src=""],
.article-thumbnail img:not([src]) {
    display: none;
}

.article-info {
    flex: 1;
    min-width: 0;
}

.article-title {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 6px;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-domain {
    font-size: 12px;
    color: #0066cc;
    font-weight: 400;
}

/* Mobile адаптивность для sidebar */
@media (max-width: 1023px) {
    .articles-sidebar {
        position: static;
        width: 100%;
        max-width: 100%;
        padding: 20px;
        margin-top: 30px;
    }
    
    .other-articles {
        max-width: 100%;
    }
    
    .article-preview {
        flex-wrap: nowrap;
    }
    
    .article-thumbnail {
        width: 80px;
        flex-shrink: 0;
        height: 60px;
    }
}

@media (min-width: 1024px) {
    .articles-sidebar {
        position: fixed;
        right: 20px;
        top: 100px;
        width: 350px;
        padding: 0;
    }
    
    main, .main-content, .article-wrapper, .article-content {
        margin-right: 390px;
    }
}

@media (max-width: 768px) {
  body {
    font-size: 14px;
  }
  
  .article-content {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
  }
  
  .article-content p {
    word-break: break-word;
    hyphens: auto;
  }
  
  .article-content h2,
  .article-content h3 {
    word-break: break-word;
    hyphens: auto;
  }
}


/* Cross-links block structure */
.other-articles .article-preview {
  display: block;
}

.other-articles .article-link {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  text-decoration: none;
  color: inherit;
  width: 100%;
}

.other-articles .article-description {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 6px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.other-articles .article-domain {
  display: block;
}
