/* ===========================================================
   Bukmekerlar.uz — Страница статей (site/maqolalar.html)
   =========================================================== */

/* ===== Background decoration ===== */
.articles-hero-bg {
  position: relative;
  height: 0;
  overflow: visible;
  pointer-events: none;
  background:
    radial-gradient(ellipse 900px 500px at 100% -20%, rgba(255,122,26,0.15), transparent),
    radial-gradient(ellipse 600px 400px at 0% 110%, rgba(91,141,239,0.1), transparent);
}
.articles-hero__glow {
  position: absolute;
  top: -180px; right: -100px;
  width: 560px; height: 560px;
  background: radial-gradient(circle, rgba(255,122,26,0.28) 0%, rgba(255,122,26,0) 70%);
  filter: blur(20px);
  pointer-events: none;
}

/* ===== Page layout: two-column grid ===== */
.page-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  align-items: start;
  padding-top: 52px;
  padding-bottom: 56px;
}

.page-main {
  display: flex;
  flex-direction: column;
  gap: 44px;
  min-width: 0;
}

/* ===== Hero SEO text (left column top) ===== */
.articles-hero-text { }

.articles-hero__title {
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.02em;
  margin: 12px 0 18px;
  line-height: 1.1;
}
.articles-hero__lead {
  color: var(--text-muted);
  font-size: 1.04rem;
  line-height: 1.75;
  max-width: 540px;
}
.articles-hero__lead strong { color: var(--text); font-weight: 600; }

/* .articles-sidebar layout moved to sidebar.css */

/* ===== Category tabs (kept for JS, hidden via HTML if not used) ===== */
.cat-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.cat-tab {
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font-display);
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.cat-tab:hover { color: var(--text); border-color: var(--border-strong); }
.cat-tab.is-active {
  color: #161200;
  background: var(--grad-primary);
  border-color: transparent;
  box-shadow: var(--shadow-glow);
}

/* ===== Posts grid ===== */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.post-card:hover { transform: translateY(-5px); border-color: var(--border-strong); box-shadow: var(--shadow-card); }

/* Featured post — must come AFTER .post-card to override display:flex */
.post-card--featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 260px 1fr;
}

.post-card__img {
  position: relative;
  background: linear-gradient(135deg, var(--g1), var(--g2));
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 9;
  min-height: 130px;
  flex-shrink: 0;
  overflow: hidden;
}
/* Featured card: image is the full-height left column, so let it stretch instead. */
.post-card--featured .post-card__img { aspect-ratio: auto; min-height: 100%; }
/* Any uploaded featured image fills the slot and is cropped to fit — never distorts. */
.post-card__img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.post-card__img-icon {
  width: 52px;
  height: 52px;
  color: rgba(255,255,255,0.35);
  stroke-width: 1.2;
}
.post-card--featured .post-card__img-icon { width: 64px; height: 64px; }

.post-card__badge {
  position: absolute;
  top: 14px;
  left: 14px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
}

.post-card__body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.post-card__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.post-cat {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
}
.post-cat--guide   { color: var(--orange-light); background: rgba(255,122,26,0.13); }
.post-cat--strategy{ color: var(--green);        background: rgba(46,213,115,0.12); }
.post-cat--review  { color: #FF5C7C;             background: rgba(255,92,124,0.12); }
.post-cat--analysis{ color: var(--blue);         background: rgba(91,141,239,0.13); }
.post-cat--basics  { color: var(--gold);         background: rgba(255,197,66,0.12); }

.post-card__date,
.post-card__time {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.74rem;
  color: var(--text-faint);
}

.post-card__title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
  margin: 0;
}
.post-card--featured .post-card__title { font-size: 1.2rem; }

.post-card__excerpt {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.6;
  flex: 1;
}

.post-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}
.post-card__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--orange-light);
  transition: gap .2s ease;
}
.post-card__link:hover { gap: 10px; }
.post-card__views {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.76rem;
  color: var(--text-faint);
}

/* ===== Pagination ===== */
.pagination {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
}
.pagination__btn {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: color .2s ease, border-color .2s ease;
}
.pagination__btn:hover:not(:disabled) { color: var(--text); border-color: var(--orange); }
.pagination__btn:disabled { opacity: 0.35; cursor: default; }
.pagination__page {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.88rem; font-weight: 600;
  color: var(--text-muted);
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.pagination__page:hover { color: var(--text); border-color: var(--border-strong); }
.pagination__page.is-active {
  background: var(--grad-primary);
  border-color: transparent;
  color: #161200;
  box-shadow: var(--shadow-glow);
}
.pagination__dots { color: var(--text-faint); font-size: 0.88rem; padding: 0 4px; }

/* Sidebar card styles moved to sidebar.css */

/* ===== SEO section (full-width, below layout) ===== */
.articles-seo { }

.seo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 44px;
}
.seo-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px 20px;
  transition: transform .2s ease, border-color .2s ease;
}
.seo-block:hover { transform: translateY(-4px); border-color: var(--border-strong); }
.seo-block__icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--c) 14%, transparent);
  color: var(--c);
  margin-bottom: 16px;
}
.seo-block h3 { font-size: 1rem; margin-bottom: 8px; }
.seo-block p { font-size: 0.875rem; color: var(--text-muted); line-height: 1.6; }

.seo-text-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 52px;
  padding-top: 48px;
  border-top: 1px solid var(--border);
}
.seo-text-col h3 {
  font-size: 1.05rem;
  margin-bottom: 14px;
  letter-spacing: -0.01em;
}
.seo-text-col p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 14px;
}
.seo-text-col p:last-child { margin-bottom: 0; }
.seo-text-col a { color: var(--orange-light); font-weight: 600; transition: color .2s ease; }
.seo-text-col a:hover { color: var(--orange); }

/* ===== Responsive ===== */
@media (max-width: 1080px) {
  .page-layout { grid-template-columns: 1fr 290px; gap: 28px; }
  .seo-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .page-layout {
    grid-template-columns: 1fr;
  }
  .articles-sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  .posts-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .articles-sidebar { grid-template-columns: 1fr; }
  .posts-grid { grid-template-columns: 1fr; }
  .post-card--featured { grid-template-columns: 1fr; }
  .post-card--featured .post-card__img { min-height: 160px; }
  .seo-text-block { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 560px) {
  .seo-grid { grid-template-columns: 1fr; }
}
