/* ==========================================================================
   ATLANT BLOG: Премиальный дизайн по образцу atlantsnabcity.kz
   ========================================================================== */

.articles-page-wrapper {
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: 10px 0 40px;
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #163047;
  box-sizing: border-box;
}

.articles-shell {
  display: grid;
  gap: 22px;
}

/* ───────── 1. HERO SECTION ───────── */

.articles-hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  padding: 22px 26px;
  overflow: hidden;
  border: 1px solid rgba(0, 101, 145, 0.16);
  border-radius: 28px;
  background:
    radial-gradient(circle at 8% 18%, rgba(22, 179, 123, 0.14), rgba(22, 179, 123, 0) 34%),
    radial-gradient(circle at 92% 8%, rgba(0, 101, 145, 0.16), rgba(0, 101, 145, 0) 36%),
    linear-gradient(135deg, #f8fcff 0%, #eef7f5 100%);
  box-shadow: 0 16px 36px rgba(19, 53, 74, 0.08);
}

.articles-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.65;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(0, 101, 145, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 101, 145, 0.05) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(120deg, rgba(0,0,0,0.9), rgba(0,0,0,0.1));
}

.articles-hero::after {
  content: "";
  position: absolute;
  right: -70px;
  bottom: -110px;
  width: 230px;
  height: 230px;
  border-radius: 50%;
  border: 34px solid rgba(0, 101, 145, 0.07);
  pointer-events: none;
}

.articles-hero__content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(240px, 1fr) auto auto;
  gap: 18px;
  align-items: center;
}

.articles-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  color: #006591;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.articles-eyebrow::before {
  content: "";
  width: 30px;
  height: 2px;
  border-radius: 999px;
  background: #16b37b;
}

.articles-title {
  margin: 0;
  color: #163047;
  font-size: clamp(24px, 2.4vw, 34px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.articles-lead {
  margin: 0;
  color: #4a687a;
  font-size: 13.5px;
  line-height: 1.5;
}

.articles-hero__facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, auto));
  gap: 6px 8px;
  align-items: center;
  justify-content: flex-end;
}

.articles-hero__fact {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 4px 12px;
  border: 1px solid rgba(0, 101, 145, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #4a687a;
  font-size: 11.5px;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(19, 53, 74, 0.04);
}

.articles-hero__fact i {
  font-size: 12px;
  color: #006591;
}

.articles-hero__fact strong {
  color: #006591;
  font-size: 14px;
  font-weight: 900;
}

.articles-hero__fact--week {
  border-color: rgba(22, 179, 123, 0.32);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, #edfbf5 100%);
  color: #1a6f52;
}

.articles-hero__fact--week i,
.articles-hero__fact--week strong {
  color: #129466;
}

.articles-hero__fact--month {
  border-color: rgba(0, 101, 145, 0.24);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, #edf6fb 100%);
  color: #175479;
}

.articles-hero__fact--month i,
.articles-hero__fact--month strong {
  color: #006591;
}

.articles-hero__actions {
  display: flex;
  flex-direction: column;
  gap: 7px;
  justify-content: center;
}

.articles-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 12.5px;
  font-weight: 800;
  text-decoration: none !important;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
}

.articles-btn--wa {
  background: linear-gradient(135deg, #0f9f51 0%, #16b866 100%);
  color: #ffffff !important;
  box-shadow: 0 10px 22px rgba(15, 159, 81, 0.24);
}

.articles-btn--wa:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(15, 159, 81, 0.32);
}

.articles-btn--phone {
  background: #ffffff;
  border-color: rgba(0, 101, 145, 0.18);
  color: #163047 !important;
  box-shadow: 0 6px 16px rgba(19, 53, 74, 0.05);
}

.articles-btn--phone:hover {
  background: #f4fafc;
  color: #006591 !important;
  border-color: rgba(0, 101, 145, 0.3);
}

/* ───────── 2. TOPICBAR (ГОРИЗОНТАЛЬНЫЕ ТЕМЫ) ───────── */

.articles-topicbar {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 10px;
  scrollbar-width: thin;
  scrollbar-color: #d0e1ea transparent;
}

.articles-topicbar::-webkit-scrollbar {
  height: 4px;
}

.articles-topicbar::-webkit-scrollbar-thumb {
  background: #d0e1ea;
  border-radius: 999px;
}

.articles-topicbar__item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border: 1px solid #dce8ef;
  border-radius: 999px;
  background: #ffffff;
  color: #3b5668;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none !important;
  transition: all 0.18s ease;
}

.articles-topicbar__item:hover {
  border-color: #006591;
  color: #006591;
  background: #f7fcfe;
}

.articles-topicbar__item.is-active {
  background: linear-gradient(135deg, #006591 0%, #16b37b 100%);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(0, 101, 145, 0.22);
}

.articles-topicbar__item span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1px 7px;
  border-radius: 999px;
  background: #edf4f8;
  color: #006591;
  font-size: 11px;
  font-weight: 800;
}

.articles-topicbar__item.is-active span {
  background: rgba(255, 255, 255, 0.24);
  color: #ffffff;
}

/* ───────── 3. ДВУХКОЛОНОЧНЫЙ МАКЕТ ───────── */

.articles-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.articles-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 90px;
}

.articles-sidebar__card {
  padding: 20px;
  border: 1px solid #dbe7ee;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(19, 53, 74, 0.05);
}

.articles-sidebar__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 14px;
  color: #163047;
  font-size: 15px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.articles-control-count {
  padding: 2px 8px;
  border-radius: 999px;
  background: #edf4f8;
  color: #006591;
  font-size: 12px;
  font-weight: 800;
}

.articles-sidebar__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  margin-bottom: 3px;
  border-radius: 12px;
  color: #476476;
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none !important;
  transition: all 0.15s ease;
}

.articles-sidebar__link:hover {
  background: #f4fafc;
  color: #006591;
}

.articles-sidebar__link.is-active {
  background: #eaf4f9;
  color: #006591;
  font-weight: 800;
}

.articles-sidebar__count {
  font-size: 12px;
  color: #7995a5;
}

.articles-sidebar__promo {
  padding: 22px;
  border: 1px solid rgba(0, 101, 145, 0.16);
  border-radius: 22px;
  background:
    radial-gradient(circle at 92% 8%, rgba(22, 179, 123, 0.15), rgba(22, 179, 123, 0) 34%),
    linear-gradient(135deg, #16374f 0%, #0d5475 100%);
  color: #ffffff;
  box-shadow: 0 18px 36px rgba(19, 53, 74, 0.12);
}

.articles-sidebar__promo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-bottom: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.15);
  color: #8ff0bf;
  font-size: 17px;
}

.articles-sidebar__promo-title {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 8px;
  line-height: 1.25;
}

.articles-sidebar__promo-text {
  font-size: 12.5px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 14px;
}

.articles-sidebar__promo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, #0f9f51 0%, #16b866 100%);
  color: #ffffff !important;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none !important;
  box-shadow: 0 10px 22px rgba(15, 159, 81, 0.3);
  transition: transform 0.18s ease;
}

.articles-sidebar__promo-btn:hover {
  transform: translateY(-2px);
}

/* ───────── 4. ПАНЕЛЬ УПРАВЛЕНИЯ (SEARCH & CONTROLS) ───────── */

.articles-controls {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
  padding: 12px 16px;
  border: 1px solid #dce8ef;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(19, 53, 74, 0.04);
}

.articles-controls__field {
  position: relative;
  display: flex;
  align-items: center;
  margin: 0;
}

.articles-controls__field--search i.fa-search {
  position: absolute;
  left: 14px;
  color: #8da4b3;
  font-size: 14px;
  pointer-events: none;
}

.articles-controls__input {
  width: 100%;
  height: 42px;
  padding: 0 38px 0 38px;
  border: 1px solid #dce8ef;
  border-radius: 999px;
  background: #f7fafc;
  color: #163047;
  font-size: 13.5px;
  font-family: inherit;
  outline: none;
  transition: all 0.2s ease;
}

.articles-controls__input:focus {
  background: #ffffff;
  border-color: #006591;
  box-shadow: 0 0 0 3px rgba(0, 101, 145, 0.12);
}

.articles-controls__clear {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #8da4b3;
  cursor: pointer;
  padding: 4px;
  font-size: 13px;
}

.articles-controls__clear:hover {
  color: #163047;
}

.articles-view-toggle {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border: 1px solid #dce8ef;
  border-radius: 999px;
  background: #f7fafc;
}

.articles-view-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #698495;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.15s ease;
}

.articles-view-btn:hover {
  color: #006591;
}

.articles-view-btn.is-active {
  background: #ffffff;
  color: #006591;
  box-shadow: 0 4px 10px rgba(19, 53, 74, 0.08);
}

.articles-controls__field--sort {
  position: relative;
}

.articles-controls__field--sort i {
  position: absolute;
  left: 12px;
  color: #8da4b3;
  font-size: 13px;
  pointer-events: none;
}

.articles-controls__select {
  height: 42px;
  padding: 0 28px 0 32px;
  border: 1px solid #dce8ef;
  border-radius: 999px;
  background: #f7fafc;
  color: #385365;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  outline: none;
  cursor: pointer;
}

.articles-controls__status {
  grid-column: 1 / -1;
  font-size: 12px;
  color: #728c9c;
  font-weight: 700;
  display: none;
}

/* ───────── 5. СЕТКА СТАТЕЙ И КАРТОЧКИ (ARTICLES GRID) ───────── */

.articles-grid {
  display: grid;
  gap: 18px;
  align-items: stretch;
}

/* Режим: Сетка по умолчанию (3 колонки) */
.articles-grid.is-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Режим: Крупные карточки (2 колонки) */
.articles-grid.is-cards {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Режим: Списком (1 колонка) */
.articles-grid.is-list {
  grid-template-columns: 1fr;
}

.articles-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  overflow: hidden;
  border: 1px solid #dce8ef;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(19, 53, 74, 0.06);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.articles-card:hover {
  transform: translateY(-3px);
  border-color: rgba(0, 101, 145, 0.25);
  box-shadow: 0 22px 42px rgba(19, 53, 74, 0.12);
}

.articles-card__media {
  position: relative;
  height: 195px;
  overflow: hidden;
  background: #edf4f8;
}

.articles-grid.is-cards .articles-card__media {
  height: 250px;
}

.articles-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.articles-card:hover .articles-card__media img {
  transform: scale(1.05);
}

.articles-card__body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  padding: 18px 20px 20px;
}

.articles-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
}

.articles-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eaf4f9;
  color: #006591;
  font-size: 11.5px;
  font-weight: 800;
  line-height: 1;
}

.articles-pill--muted {
  background: #f2f7fa;
  color: #637f8f;
  font-weight: 700;
}

.articles-pill i {
  font-size: 11px;
}

.articles-card__title {
  margin: 0 0 10px;
  color: #163047;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.articles-grid.is-cards .articles-card__title {
  font-size: 20px;
}

.articles-card__title a {
  color: #163047;
  text-decoration: none !important;
  transition: color 0.18s ease;
}

.articles-card:hover .articles-card__title a {
  color: #006591;
}

.articles-card__excerpt {
  margin: 0 0 16px;
  color: #516e7f;
  font-size: 13.5px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.articles-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid #edf4f8;
}

.articles-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #006591;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none !important;
}

.articles-card__cta i {
  transition: transform 0.2s ease;
}

.articles-card:hover .articles-card__cta i {
  transform: translateX(4px);
}

.articles-card__viewed {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #849ca9;
  font-size: 11.5px;
  font-weight: 700;
}

.articles-card__link {
  position: absolute;
  inset: 0;
  z-index: 2;
}

/* Стили для режима списка (is-list) */
.articles-grid.is-list .articles-card {
  flex-direction: row;
}

.articles-grid.is-list .articles-card__media {
  width: 260px;
  min-width: 260px;
  height: auto;
}

/* ───────── 6. CTA КОНСУЛЬТАЦИЯ ───────── */

.articles-consult {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 28px;
  padding: 26px 30px;
  border: 1px solid rgba(0, 101, 145, 0.16);
  border-radius: 24px;
  background:
    radial-gradient(circle at 8% 20%, rgba(22, 179, 123, 0.12), rgba(22, 179, 123, 0) 36%),
    linear-gradient(135deg, #ffffff 0%, #f4f9fc 100%);
  box-shadow: 0 16px 34px rgba(19, 53, 74, 0.06);
}

.articles-consult__info h2 {
  margin: 0 0 8px;
  color: #163047;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
}

.articles-consult__info p {
  margin: 0;
  color: #516e7f;
  font-size: 14px;
  line-height: 1.55;
  max-width: 620px;
}

.articles-consult .articles-btn {
  min-height: 46px;
  padding: 0 24px;
  font-size: 14px;
  flex-shrink: 0;
}

/* ───────── 7. ПАГИНАЦИЯ И ПУСТОЙ БЛОК ───────── */

.articles-pagination-wrapper {
  margin-top: 28px;
  display: flex;
  justify-content: center;
}

.articles-empty {
  padding: 40px 20px;
  text-align: center;
  border: 1px solid #dce8ef;
  border-radius: 24px;
  background: #ffffff;
  color: #516e7f;
}

.articles-empty p {
  font-size: 15px;
  margin-bottom: 16px;
}

/* ───────── 8. СТИЛИ ДЕТАЛЬНЫХ СТАТЕЙ: ТАБЛИЦЫ, FAQ И СПИСКИ ───────── */

.detail-content table,
.articles-card__body table,
.articles-page-wrapper table,
.content-default table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 14px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #dce8ef;
  box-shadow: 0 10px 24px rgba(19, 53, 74, 0.04);
}

.detail-content th,
.articles-page-wrapper th,
.content-default th {
  background: #f0f6fa;
  color: #163047;
  font-weight: 800;
  padding: 14px 16px;
  text-align: left;
  border-bottom: 2px solid #dce8ef;
}

.detail-content td,
.articles-page-wrapper td,
.content-default td {
  padding: 12px 16px;
  border-bottom: 1px solid #edf4f8;
  color: #496576;
}

.detail-content tr:nth-child(even) td,
.articles-page-wrapper tr:nth-child(even) td,
.content-default tr:nth-child(even) td {
  background: #f9fbfd;
}

/* FAQ аккордеоны */
.detail-content details,
.articles-page-wrapper details,
.content-default details {
  margin: 12px 0;
  border: 1px solid #dce8ef;
  border-radius: 16px;
  background: #ffffff;
  padding: 16px 20px;
  transition: all 0.2s ease;
}

.detail-content details[open],
.articles-page-wrapper details[open],
.content-default details[open] {
  background: #f8fcff;
  border-color: #006591;
  box-shadow: 0 10px 24px rgba(0, 101, 145, 0.08);
}

.detail-content summary,
.articles-page-wrapper summary,
.content-default summary {
  font-size: 16px;
  font-weight: 800;
  color: #163047;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.detail-content summary::-webkit-details-marker,
.articles-page-wrapper summary::-webkit-details-marker,
.content-default summary::-webkit-details-marker {
  display: none;
}

.detail-content summary::after,
.articles-page-wrapper summary::after,
.content-default summary::after {
  content: "▾";
  font-size: 20px;
  color: #006591;
  transition: transform 0.2s ease;
}

.detail-content details[open] summary::after,
.articles-page-wrapper details[open] summary::after,
.content-default details[open] summary::after {
  transform: rotate(180deg);
}

.detail-content details p,
.articles-page-wrapper details p,
.content-default details p {
  margin-top: 12px;
  margin-bottom: 0;
  color: #516e7f;
  font-size: 14.5px;
  line-height: 1.6;
}

/* ───────── 9. АДАПТИВНОСТЬ (RESPONSIVE) ───────── */

@media (max-width: 1199px) {
  .articles-hero__content {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .articles-hero__facts {
    justify-content: flex-start;
  }
  .articles-hero__actions {
    flex-direction: row;
    justify-content: flex-start;
  }
  .articles-grid.is-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 991px) {
  .articles-layout {
    grid-template-columns: 1fr;
  }
  .articles-sidebar {
    position: static;
  }
  .articles-grid.is-list .articles-card {
    flex-direction: column;
  }
  .articles-grid.is-list .articles-card__media {
    width: 100%;
    height: 200px;
  }
  .articles-consult {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 680px) {
  .articles-page-wrapper {
    padding-top: 4px;
  }
  .articles-hero {
    padding: 18px 16px;
    border-radius: 20px;
  }
  .articles-hero__facts {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .articles-hero__actions {
    flex-direction: column;
    width: 100%;
  }
  .articles-hero__actions .articles-btn {
    width: 100%;
  }
  .articles-controls {
    grid-template-columns: 1fr;
  }
  .articles-grid.is-grid,
  .articles-grid.is-cards {
    grid-template-columns: 1fr;
  }
  .articles-card__media {
    height: 180px;
  }
}
