/* ==========================================================================
   Раздел «Аналитика и торговые планы» — тёмная тема, золотые акценты
   Токены из styles.css: --gold, --ink, --page-bg, --hero-gold,
   --t-headline-font, --t-text-font, .container
   ========================================================================== */

.articles-page { padding: 40px 0 90px; }

/* --- Шапка раздела --- */
.articles-hero { text-align: center; margin: 20px 0 34px; }
.articles-hero__title {
  font-family: var(--t-headline-font);
  font-size: clamp(28px, 5vw, 46px);
  line-height: 1.12;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0 0 12px;
}
.articles-hero__subtitle {
  font-family: var(--t-text-font);
  font-size: clamp(15px, 2.2vw, 19px);
  color: #b9b9b9;
  margin: 0;
}

/* --- Вкладки-рубрики --- */
.articles-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 40px;
}
.articles-tabs__tab {
  display: inline-flex;
  align-items: center;
  padding: 10px 24px;
  border: 1px solid rgba(222, 192, 104, 0.45);
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--t-text-font);
  font-size: 15px;
  transition: color 0.15s, background-color 0.15s, border-color 0.15s;
}
.articles-tabs__tab:hover { border-color: var(--gold); color: var(--gold); }
.articles-tabs__tab.is-active {
  background: var(--gold);
  border-color: var(--gold);
  color: #1a1a1a;
  font-weight: 700;
}

/* --- Сетка карточек: 2 в ряд на ПК --- */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.article-card {
  background: #232323;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.article-card:hover { transform: translateY(-4px); border-color: rgba(222, 192, 104, 0.45); }
.article-card__link { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: inherit; }

.article-card__media { position: relative; aspect-ratio: 16 / 9; background: #2c2c2c; overflow: hidden; }
.article-card__img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s ease; }
.article-card:hover .article-card__img { transform: scale(1.03); }

.article-card__badge {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 6px 14px;
  border-radius: 999px;
  font-family: var(--t-text-font);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.article-card__badge--review    { background: #2d9cdb; color: #fff; }
.article-card__badge--plan      { background: var(--gold); color: #1a1a1a; }
.article-card__badge--education { background: #9b6bff; color: #fff; }

/* значок «видео» на превью */
.article-card__play {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.62);
  border: 2px solid rgba(255, 255, 255, 0.85);
}
.article-card__play::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 54%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 8px 0 8px 14px;
  border-color: transparent transparent transparent #fff;
}

.article-card__body { padding: 20px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.article-card__date { font-family: var(--t-text-font); font-size: 13px; font-weight: 700; color: var(--gold); letter-spacing: 0.5px; margin: 0 0 10px; }
.article-card__title { font-family: var(--t-headline-font); font-size: clamp(19px, 2.4vw, 24px); line-height: 1.25; color: var(--ink); margin: 0 0 12px; }
.article-card__excerpt {
  font-size: 15px;
  line-height: 1.55;
  color: #b8b8b8;
  margin: 0 0 18px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.article-card__more { margin-top: auto; color: var(--gold); font-weight: 700; font-size: 14px; }

/* Карточка рубрики «Аналитика» — светлая (везде: /blog, главная, «Ещё по теме»), остальные рубрики без изменений */
.article-card--light { background: #ffffff; border-color: rgba(0, 0, 0, 0.08); }
.article-card--light:hover { border-color: rgba(150, 115, 31, 0.5); }
.article-card--light .article-card__media { background: #f0efe9; }
.article-card--light .article-card__date,
.article-card--light .article-card__more { color: #96731f; }
.article-card--light .article-card__title { color: #1c1c1c; }
.article-card--light .article-card__excerpt { color: #5c5c5c; }

/* --- Пагинация --- */
.articles-pager { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 46px; }
.articles-pager__link {
  min-width: 42px;
  height: 42px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.articles-pager__link:hover,
.articles-pager__link.is-active { background: var(--gold); border-color: var(--gold); color: #1a1a1a; }

.articles-empty { text-align: center; color: #9a9a9a; padding: 60px 0; font-size: 16px; }

/* ==========================================================================
   Страница торгового дня
   ========================================================================== */
.article-page { padding: 24px 0 90px; }
.article-page__wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Хлебные крошки */
.article-page__crumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13px; color: #8a8a8a; margin: 6px 0 22px; }
.article-page__crumbs a { color: #a9a9a9; text-decoration: none; }
.article-page__crumbs a:hover { color: var(--gold); }
.article-page__crumbs .is-current { color: #cfcfcf; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Заголовок дня */
.article-page__head { margin: 0 0 30px; }
.article-page__cat {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 999px;
  font-family: var(--t-text-font);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 14px;
}
.article-page__cat--review    { background: #2d9cdb; color: #fff; }
.article-page__cat--plan      { background: var(--gold); color: #1a1a1a; }
.article-page__cat--education { background: #9b6bff; color: #fff; }

.article-page__title { font-family: var(--t-headline-font); font-size: clamp(26px, 4.5vw, 42px); line-height: 1.18; color: var(--ink); margin: 0 0 10px; }
.article-page__subtitle { font-size: clamp(16px, 2.4vw, 20px); color: #c4c4c4; margin: 0 0 16px; }

.article-page__tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; }
.article-page__tag {
  padding: 5px 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  font-size: 13px;
  color: #cfcfcf;
  background: rgba(255, 255, 255, 0.03);
}

/* Блок-секция */
.article-block { margin: 0 0 34px; }
.article-block__title {
  font-family: var(--t-headline-font);
  font-size: clamp(20px, 3vw, 26px);
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
}
.article-block__ico { font-size: 0.9em; }
.article-block__date { color: var(--gold); font-weight: 700; font-size: 14px; margin: 0 0 14px; }

/* Утренний обзор — сворачиваемый */
.morning {
  background: #1f1f1f;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  overflow: hidden;
}
.morning__summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 20px;
  font-family: var(--t-headline-font);
  font-size: 16px;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.morning__summary::-webkit-details-marker { display: none; }
.morning__summary::after { content: "▾"; color: var(--gold); transition: transform 0.2s; }
.morning[open] .morning__summary::after { transform: rotate(180deg); }
.morning__body { padding: 4px 20px 22px; font-size: 16px; line-height: 1.75; color: #e2e2e2; overflow-wrap: anywhere; }
.morning__body p { margin: 0 0 15px; }
.morning__body a { color: var(--gold); text-decoration: underline; }
.morning__body b, .morning__body strong { color: #fff; }
.morning-addition { margin-top: 20px; padding-top: 16px; border-top: 1px dashed rgba(255, 255, 255, 0.18); }
.morning-addition__time { margin: 0 0 8px !important; color: var(--gold); font-weight: 700; font-size: 14px; }
.morning-addition figure { margin: 12px 0; }
.morning-addition img { max-width: 100%; height: auto; border-radius: 10px; }

/* Все плееры сразу, 3 в ряд (планшет — 2, телефон — 1) */
.video-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 20px; }
.video-grid--1 { grid-template-columns: minmax(0, 1fr); }
.video-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.video-grid__label {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  margin: 0 0 8px; font-family: var(--t-headline-font); font-size: 17px; font-weight: 700; color: var(--ink);
}
.video-grid__label a { font-size: 13px; font-weight: 400; color: #9a9a9a; text-decoration: none; white-space: nowrap; }
.video-grid__label a:hover { color: var(--gold); }
.video-grid__label--rutube span  { color: #A97BFF; }
.video-grid__label--vk span      { color: #4DA3FF; }
.video-grid__label--youtube span { color: #FF4D4D; }

/* Блок «Статьи» на главной (после FAQ) */
.home-articles { padding: 20px 0 70px; }
.home-articles__container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.home-articles .socials__action { margin-top: 40px; margin-bottom: 0; }

/* Видео + сайдбар */
.video-layout { display: grid; grid-template-columns: 1fr 260px; gap: 22px; align-items: start; }
.video-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #000; display: block; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-frame--link img { width: 100%; height: 100%; object-fit: cover; }
.video-frame__play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 74px; height: 74px; border-radius: 50%;
  background: rgba(255, 0, 0, 0.88);
}
.video-frame__play::after {
  content: ""; position: absolute; top: 50%; left: 54%; transform: translate(-50%, -50%);
  border-style: solid; border-width: 13px 0 13px 22px; border-color: transparent transparent transparent #fff;
}

.video-layout__aside { background: #1f1f1f; border: 1px solid rgba(255, 255, 255, 0.07); border-radius: 14px; padding: 18px; }
.video-meta { list-style: none; padding: 0; margin: 0 0 14px; }
.video-meta li { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.06); font-size: 14px; }
.video-meta li:last-child { border-bottom: 0; }
.video-meta span { color: #9a9a9a; }
.video-meta b { color: var(--ink); }
.video-watch {
  display: block; text-align: center; padding: 11px 16px; border-radius: 10px;
  background: var(--hero-gold); color: #1a1a1a; font-family: var(--t-headline-font); font-weight: 700;
  text-decoration: none; transition: filter 0.15s;
}
.video-watch:hover { filter: brightness(1.05); }

/* Что разбираю в видео */
.video-points { margin: 0 0 34px; }
.video-points__title { font-family: var(--t-headline-font); font-size: 18px; color: var(--ink); margin: 0 0 12px; }
.video-points__list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.video-points__list li { position: relative; padding-left: 30px; font-size: 15px; line-height: 1.5; color: #d9d9d9; }
.video-points__list li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  width: 20px; height: 20px; border-radius: 5px;
  background: rgba(222, 192, 104, 0.18); color: var(--gold);
  display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700;
}

/* Доп. текст / обучающая статья */
.article-page__content { font-size: 16px; line-height: 1.75; color: #e2e2e2; overflow-wrap: anywhere; }
.article-page__content p { margin: 0 0 16px; }
.article-page__content h2,
.article-page__content h3 { color: var(--ink); font-family: var(--t-headline-font); line-height: 1.25; margin: 28px 0 12px; }
.article-page__content a { color: var(--gold); text-decoration: underline; }
.article-page__content img { max-width: 100%; height: auto; border-radius: 10px; margin: 16px 0; }
.article-page__content ul,
.article-page__content ol { padding-left: 22px; margin: 0 0 16px; }
.article-page__content li { margin: 0 0 6px; }
.article-page__content blockquote { margin: 16px 0; padding: 8px 18px; border-left: 3px solid var(--gold); color: #cfcfcf; }

/* Полоса «Смотреть и подписаться» */
.subscribe-strip {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
  background: #1f1f1f; border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px; padding: 18px 20px; margin: 0 0 34px;
}
.subscribe-strip__label { font-family: var(--t-headline-font); color: var(--ink); font-size: 15px; }
.subscribe-strip__btns { display: flex; flex-wrap: wrap; gap: 10px; }
.subscribe-btn {
  display: inline-flex; align-items: center; padding: 10px 18px; border-radius: 10px;
  font-family: var(--t-headline-font); font-weight: 700; font-size: 14px; text-decoration: none;
  background: #333; color: #fff; transition: filter 0.15s, transform 0.15s;
}
.subscribe-btn:hover { filter: brightness(1.1); transform: translateY(-1px); }
.subscribe-btn::before { content: ""; width: 18px; height: 18px; margin-right: 8px; flex-shrink: 0; background: no-repeat center / contain; }
.subscribe-btn--youtube  { background: #FF0000; }
.subscribe-btn--youtube::before  { background-image: url('../images/icon-youtube.svg'); }
.subscribe-btn--rutube   { background: #6C2BD9; }
.subscribe-btn--rutube::before   { background-image: url('../images/icon-rutube.svg'); }
.subscribe-btn--vk       { background: #0077FF; }
.subscribe-btn--vk::before       { background-image: url('../images/icon-vk.svg'); width: 22px; }
.subscribe-btn--dzen     { background: #000; border: 1px solid #3a3a3a; }
.subscribe-btn--dzen::before     { background-image: url('../images/icon-dzen.svg'); }
.subscribe-btn--telegram { background: #229ED9; }
.subscribe-btn--telegram::before { display: none; }
.subscribe-btn--max      { background: #0a0a0a; border: 1px solid #444; }
.subscribe-btn--max::before      { display: none; }
.subscribe-btn--course   { background: var(--hero-gold); color: #1a1a1a; }
.subscribe-btn--course::before   { background-image: url('../images/play.svg'); }

/* Подписка: только MAX и Telegram — две большие кнопки в один ряд (и на телефоне) */
.subscribe-strip { flex-direction: column; align-items: stretch; }
.subscribe-strip__btns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.subscribe-strip__btns--1 { grid-template-columns: minmax(0, 1fr); }
.subscribe-strip .subscribe-btn { justify-content: center; min-height: 58px; padding: 14px 16px; font-size: 18px; border-radius: 12px; }
.subscribe-strip .subscribe-btn--max { background: linear-gradient(135deg, #3f8cff 0%, #7b3fe4 100%); border: 0; }
.subscribe-strip .subscribe-btn--telegram { background: #229ED9; }

/* Черновик статьи «Аналитики» (виден только вошедшему в админку) */
.article-preview-banner {
  background: var(--hero-gold); color: #1a1a1a; font-family: var(--t-headline-font); font-weight: 700;
  font-size: 14px; padding: 12px 18px; border-radius: 10px; margin: 0 0 20px;
}

/* Обложка статьи «Аналитики» */
.article-page__cover { margin: 0 0 28px; }
.article-page__cover img { width: 100%; height: auto; border-radius: 14px; display: block; }

/* Таблицы во вставленном тексте статьи */
.article-page__content table { width: 100%; border-collapse: collapse; margin: 16px 0; display: block; overflow-x: auto; }
.article-page__content th,
.article-page__content td { border: 1px solid rgba(255, 255, 255, 0.12); padding: 8px 12px; text-align: left; }
.article-page__content th { color: var(--ink); }
.article-page__content h4 { color: var(--ink); font-family: var(--t-headline-font); line-height: 1.25; font-size: 16px; margin: 22px 0 10px; }

/* Ещё по теме */
.article-related { margin: 40px 0 0; }
.article-related__title { font-family: var(--t-headline-font); font-size: clamp(20px, 3vw, 26px); color: var(--ink); margin: 0 0 20px; }
.articles-grid--related { grid-template-columns: repeat(3, 1fr); gap: 20px; }
.articles-grid--related .article-card__title { font-size: 18px; }

.article-page__nav--bottom { margin: 40px 0 0; }
.article-page__back { color: var(--gold); text-decoration: none; font-size: 15px; }
.article-page__back:hover { text-decoration: underline; }

/* ==========================================================================
   Страница статьи рубрики «Аналитика» — светлый фон (только эта рубрика).
   Торговые планы и видеоуроки остаются тёмными, тут ничего не меняется.
   ========================================================================== */
.article-page--light { background: #f7f6f2; }
.article-page--light .article-page__crumbs { color: #9a9a9a; }
.article-page--light .article-page__crumbs a { color: #6e6e6e; }
.article-page--light .article-page__crumbs a:hover { color: #96731f; }
.article-page--light .article-page__crumbs .is-current { color: #3a3a3a; }

.article-page--light .article-page__title,
.article-page--light .article-block__title,
.article-page--light .subscribe-strip__label,
.article-page--light .article-related__title,
.article-page--light .article-page__content h2,
.article-page--light .article-page__content h3,
.article-page--light .article-page__content h4,
.article-page--light .article-page__content th { color: #1c1c1c; }

.article-page--light .article-page__subtitle { color: #5a5a5a; }

.article-page--light .article-page__tag {
  border-color: rgba(0, 0, 0, 0.14);
  color: #444;
  background: rgba(0, 0, 0, 0.03);
}

.article-page--light .article-page__content { color: #2b2b2b; }
.article-page--light .article-page__content a { color: #96731f; }
.article-page--light .article-page__content blockquote { color: #4a4a4a; border-left-color: #96731f; }
.article-page--light .article-page__content th,
.article-page--light .article-page__content td { border-color: rgba(0, 0, 0, 0.12); }

.article-page--light .subscribe-strip { background: #efeee7; border-color: rgba(0, 0, 0, 0.08); }

.article-page--light .article-page__back { color: #96731f; }

/* --- Адаптив --- */
@media (max-width: 900px) {
  .video-layout { grid-template-columns: 1fr; }
  .video-grid:not(.video-grid--1) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .articles-grid--related { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .articles-grid,
  .articles-grid--related,
  .video-grid,
  .video-grid:not(.video-grid--1) { grid-template-columns: 1fr; }
  .articles-page { padding: 24px 0 60px; }
  .article-page { padding: 18px 0 60px; }
  .subscribe-strip { padding: 16px; }
  .subscribe-strip .subscribe-btn { min-height: 52px; font-size: 16px; padding: 12px 10px; }
}
