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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: #f8f9fa;
  color: #212529;
  line-height: 1.6;
  font-size: 16px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  background: #ffffff;
  min-height: 100vh;
}

/* Source Header */
.source-header {
  background: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
  padding: 12px 20px;
}

.source-info {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 14px;
  color: #6c757d;
  flex-wrap: wrap;
}

.source-date {
  font-weight: 500;
}

.source-id {
  color: #495057;
  font-family: monospace;
}

.source-label {
  background: #e9ecef;
  padding: 4px 10px;
  border-radius: 4px;
  font-weight: 500;
  color: #495057;
}

/* Article Wrapper */
.article-wrapper {
  padding: 30px 40px;
}

/* Article Title */
.article-title {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.3;
  color: #212529;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid #dee2e6;
}

/* Article Content */
.article-content {
  font-size: 17px;
  line-height: 1.8;
  color: #212529;
}

.article-content p {
  margin-bottom: 20px;
  text-align: justify;
}

.section-title {
  font-size: 26px;
  font-weight: 700;
  margin: 40px 0 25px 0;
  color: #212529;
  padding-bottom: 10px;
  border-bottom: 2px solid #dee2e6;
}

.article-link {
  color: #0066cc;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.article-link:hover {
  border-bottom-color: #0066cc;
  text-decoration: none;
}

/* Bot Cards */
.bot-card {
  background: #ffffff;
  border: 1px solid #dee2e6;
  border-left: 4px solid #0066cc;
  padding: 25px;
  margin: 30px 0;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.bot-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 15px;
  color: #212529;
}

.bot-link {
  margin: 10px 0;
  font-size: 15px;
}

.bot-summary {
  background: #e7f3ff;
  padding: 15px;
  border-radius: 6px;
  border-left: 3px solid #0066cc;
  margin: 15px 0;
  font-style: italic;
}

.bot-image-wrapper {
  margin: 20px 0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.bot-image {
  width: 100%;
  height: auto;
  display: block;
  max-height: 450px;
  object-fit: cover;
}

.bot-card p {
  margin-bottom: 15px;
}

.bot-card p:last-child {
  margin-bottom: 0;
}

/* Process List */
.process-list {
  margin: 25px 0;
}

.process-item {
  background: #f8f9fa;
  padding: 20px;
  margin-bottom: 15px;
  border-left: 4px solid #0066cc;
  border-radius: 6px;
  line-height: 1.7;
}

.process-item:last-child {
  margin-bottom: 0;
}

.process-item strong {
  color: #0066cc;
  display: block;
  margin-bottom: 8px;
  font-size: 18px;
}

/* Article Source */
.article-source {
  margin-top: 40px;
  padding-top: 25px;
  border-top: 2px solid #dee2e6;
  font-size: 15px;
  color: #6c757d;
}

/* Mobile Responsive */
@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;
  }
  .article-wrapper {
    padding: 20px 20px;
  }

  .article-title {
    font-size: 24px;
    margin-bottom: 20px;
  }

  .section-title {
    font-size: 22px;
    margin: 30px 0 20px 0;
  }

  .article-content {
    font-size: 16px;
  }

  .bot-card {
    padding: 20px 15px;
    margin: 25px 0;
  }

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

  .source-info {
    font-size: 13px;
    gap: 10px;
  }

  .process-item {
    padding: 15px;
  }

  .process-item strong {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .article-title {
    font-size: 20px;
  }

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

  .article-content {
    font-size: 15px;
  }

  .bot-card {
    padding: 15px;
  }

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

  .source-header {
    padding: 10px 15px;
  }

  .article-wrapper {
    padding: 15px;
  }
}
/* Sidebar with Other Articles - адаптировано под source header стиль (ar6) */
.articles-sidebar {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.other-articles {
    background: #ffffff;
    border: 2px solid #dee2e6;
    border-radius: 4px;
    padding: 20px;
    max-width: 350px;
    margin: 0 auto 30px;
}

.sidebar-title {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 16px;
    color: #212529;
    padding-bottom: 10px;
    border-bottom: 2px solid #dee2e6;
}

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

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

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

.article-thumbnail {
    flex-shrink: 0;
    width: 100px;
    height: 70px;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #dee2e6;
    background: #f8f9fa;
    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: #212529;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-domain {
    font-size: 12px;
    color: #6c757d;
    font-weight: 400;
    font-family: monospace;
}

/* 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;
        gap: 10px;
    }
    
    .article-thumbnail {
        width: 80px;
        height: 60px;
        flex-shrink: 0;
    }
    
    .article-title {
        font-size: 13px;
        -webkit-line-clamp: 3;
        word-break: break-word;
        hyphens: auto;
    }
    
    .article-domain {
        font-size: 11px;
    }
}

@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;
    }
}


/* 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;
}
