/* 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: #f5f5f5;
  color: #1a1a1a;
  line-height: 1.6;
  font-size: 16px;
}

/* Header */
.main-header {
  background: #2c2c2c;
  color: #ffffff;
  padding: 12px 20px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

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

.header-left {
  display: flex;
  align-items: center;
  gap: 15px;
}

.menu-toggle {
  background: none;
  border: none;
  color: #ffffff;
  font-size: 20px;
  cursor: pointer;
  padding: 5px;
}

.logo {
  font-weight: 600;
  font-size: 18px;
  color: #0066cc;
}

.search-icon {
  background: none;
  border: none;
  color: #ffffff;
  font-size: 18px;
  cursor: pointer;
  padding: 5px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-profile {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #4a4a4a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.dropdown-arrow {
  background: none;
  border: none;
  color: #ffffff;
  font-size: 12px;
  cursor: pointer;
  padding: 5px;
}

/* Main Container */
.main-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 20px;
}

.article-wrapper {
  background: #ffffff;
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Author Section */
.author-section {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 25px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e5e5e5;
}

.author-left {
  display: flex;
  align-items: flex-start;
  gap: 15px;
}

.author-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.author-info {
  flex: 1;
}

.author-name {
  font-weight: 600;
  font-size: 16px;
  color: #1a1a1a;
  margin-bottom: 2px;
}

.author-blog {
  font-size: 14px;
  color: #666;
  margin-bottom: 5px;
}

.article-date {
  font-size: 14px;
  color: #999;
}

.author-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-btn {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  padding: 5px 10px;
  color: #666;
}

.subscribe-btn {
  background: #0066cc;
  color: #ffffff;
  border: none;
  padding: 8px 20px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}

.subscribe-btn:hover {
  background: #0052a3;
}

.subscribe-btn.subscribed {
  background: #28a745;
}

/* Article Title */
.article-title {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 25px;
  color: #1a1a1a;
}

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

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

.article-content h2 {
  font-size: 26px;
  font-weight: 700;
  margin: 40px 0 20px 0;
  color: #1a1a1a;
}

.section-title {
  font-size: 26px;
  font-weight: 700;
  margin: 40px 0 20px 0;
  color: #1a1a1a;
}

/* Bot Cards */
.bot-card {
  margin: 30px 0;
  padding: 25px;
  background-color: #f9f9f9;
  border-left: 4px solid #0066cc;
  border-radius: 4px;
}

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

.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 #e5e5e5;
}

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

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

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

.bot-card li {
  margin-bottom: 8px;
}

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

.faq-question {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
  color: #1a1a1a;
}

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

/* Footer */
.main-footer {
  background: #2c2c2c;
  color: #ffffff;
  padding: 40px 20px 20px;
  margin-top: 40px;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  margin-bottom: 30px;
}

.footer-section h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 15px;
  color: #0066cc;
}

.footer-section ul {
  list-style: none;
}

.footer-section li {
  margin-bottom: 8px;
}

.footer-section a {
  color: #ccc;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}

.footer-section a:hover {
  color: #0066cc;
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 20px;
  border-top: 1px solid #444;
  text-align: center;
  font-size: 14px;
  color: #999;
}

/* Responsive Design */
@media (max-width: 968px) {
  .article-title {
    font-size: 26px;
  }

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

  .bot-card {
    padding: 20px;
  }

  .author-section {
    flex-direction: column;
    gap: 15px;
  }

  .author-right {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 15px;
  }

  .main-container {
    padding: 15px;
  }

  .article-wrapper {
    padding: 20px;
  }

  .article-title {
    font-size: 22px;
  }

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

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

  .bot-card {
    padding: 15px;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}
/* Sidebar with Other Articles - адаптировано под SMART-LAB стиль (ar10) */
.articles-sidebar {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.other-articles {
    background: #ffffff;
    border: 1px solid #2c2c2c;
    border-radius: 8px;
    padding: 20px;
    max-width: 350px;
    margin: 0 auto 30px;
    box-shadow: 0 2px 8px rgba(44, 44, 44, 0.1);
}

.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: #f5f5f5;
    border-radius: 6px;
    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 #e5e5e5;
    background: #f5f5f5;
    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: #1a1a1a;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-domain {
    font-size: 12px;
    color: #666;
    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;
}
