/* /var/www/html/css/articles.css */

/* DevOps Articles */
.articles {
  padding: 100px 0;
  background: white;
}

.articles h2 {
  text-align: center;
  font-size: 2.8em;
  margin-bottom: 60px;
  color: #1a1a1a;
  position: relative;
  font-weight: 700;
}

.articles h2::after {
  content: '';
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 5px;
  background: linear-gradient(90deg, #2962ff, #00b0ff);
  border-radius: 3px;
}

.articles-slider {
  display: flex;
  align-items: center;
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.slider-btn {
  background: #f0f4f8;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  font-size: 1.5em;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2962ff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  flex-shrink: 0;
}

.slider-btn:hover {
  background: #2962ff;
  color: white;
  transform: scale(1.1);
}

.articles-container {
  display: flex;
  gap: 20px;
  overflow-x: hidden;
  scroll-behavior: smooth;
  flex-grow: 1;
  padding: 10px 0;
  scrollbar-width: none;
}

.articles-container::-webkit-scrollbar {
  display: none;
}

.article-card {
  min-width: 280px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  flex-shrink: 0;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}

.article-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.article-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.article-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;

  /* FIX: одинаковая “высота карточки” независимо от длины текста */
  min-height: 118px;
}

.article-content h3 {
  font-size: 1.25em;
  color: #2962ff;
  margin: 0;
  line-height: 1.4;

  /* FIX: ограничиваем заголовок 2 строками */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.article-content p {
  font-size: 0.95em;
  color: #555;
  margin: 0;
  line-height: 1.6;

  /* FIX: ограничиваем описание 3 строками */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}
