/* =======================================================
   blog.css — Leti Blog sahifasi uchun uslublar
   ======================================================= */

/* ===== CATEGORY CHIPS (sticky) ===== */
.bl-feed { padding: 72px 0 96px; background: #fff; }

.bl-cats {
  position: sticky;
  top: 72px;
  z-index: 20;
  margin: 0 -24px 40px;
  padding: 14px 24px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border, #eae5f0);
}
.bl-cats__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 1200px;
  margin: 0 auto;
}

.bl-chip {
  padding: 9px 18px;
  background: #fff;
  border: 1.5px solid var(--border, #eae5f0);
  border-radius: var(--radius-full, 100px);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-secondary, #4a4358);
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition, .22s);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.bl-chip:hover {
  border-color: var(--brand, #8B0F3E);
  color: var(--brand, #8B0F3E);
}
.bl-chip--active {
  background: var(--brand, #8B0F3E);
  border-color: var(--brand, #8B0F3E);
  color: #fff;
}
.bl-chip__count {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  background: rgba(139, 15, 62, 0.08);
  color: var(--brand, #8B0F3E);
  border-radius: var(--radius-full, 100px);
  min-width: 22px;
  text-align: center;
  transition: all var(--transition, .22s);
}
.bl-chip:hover .bl-chip__count {
  background: rgba(139, 15, 62, 0.15);
}
.bl-chip--active .bl-chip__count {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

/* ===== LAYOUT (featured + grid) ===== */
.bl-layout {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.bl-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* ===== CARD ===== */
.bl-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--border, #eae5f0);
  border-radius: var(--radius-lg, 20px);
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  transition: all var(--transition, .22s);
}
.bl-card:hover {
  transform: translateY(-4px);
  border-color: rgba(139, 15, 62, 0.25);
  box-shadow: var(--shadow-md, 0 8px 32px rgba(139, 15, 62, 0.12));
}
.bl-card[hidden] { display: none; }

.bl-card__cover {
  position: relative;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: flex-end;
  padding: 16px;
  overflow: hidden;
}
.bl-card__cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.35));
  pointer-events: none;
}
.bl-card__cover--1 { background: linear-gradient(135deg, #8B0F3E, #b8145a); }
.bl-card__cover--2 { background: linear-gradient(135deg, #4F46E5, #7C3AED); }
.bl-card__cover--3 { background: linear-gradient(135deg, #EA580C, #F59E0B); }
.bl-card__cover--4 { background: linear-gradient(135deg, #0EA5E9, #0284C7); }
.bl-card__cover--5 { background: linear-gradient(135deg, #10B981, #059669); }
.bl-card__cover--6 { background: linear-gradient(135deg, #6b0c30, #1A0A14); }

.bl-card__cat {
  position: relative;
  z-index: 1;
  padding: 5px 12px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--brand, #8B0F3E);
  border-radius: var(--radius-full, 100px);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.bl-card__body {
  padding: 22px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.bl-card__title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary, #0F0A14);
  letter-spacing: -0.01em;
  line-height: 1.35;
  margin: 0;
}
.bl-card__excerpt {
  font-size: 14px;
  color: var(--text-secondary, #4A4358);
  line-height: 1.55;
  margin: 0;
}
.bl-card__meta {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 12.5px;
  color: var(--text-muted, #8B8096);
  margin-top: auto;
  padding-top: 8px;
  font-weight: 500;
}
.bl-card__sep { opacity: 0.5; }

/* ===== FEATURED CARD (large) ===== */
.bl-card--featured {
  flex-direction: row;
  align-items: stretch;
}
.bl-card--featured .bl-card__cover {
  aspect-ratio: auto;
  width: 54%;
  min-height: 340px;
  flex-shrink: 0;
}
.bl-card--featured .bl-card__body {
  padding: 40px 44px;
  justify-content: center;
  gap: 14px;
}
.bl-card--featured .bl-card__title {
  font-size: 28px;
  line-height: 1.2;
}
.bl-card--featured .bl-card__excerpt {
  font-size: 15.5px;
  line-height: 1.65;
}
.bl-card--featured .bl-card__meta {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border, #eae5f0);
  font-size: 13px;
}

/* ===== LOAD MORE ===== */
.bl-loadmore {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

/* ===== EMPTY STATE ===== */
.bl-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 24px;
  background: var(--bg-light, #F8F5FA);
  border-radius: var(--radius-lg, 20px);
  border: 1px dashed var(--border-dark, #C8C0D4);
}
.bl-empty__icon {
  font-size: 40px;
  margin-bottom: 12px;
}
.bl-empty h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.bl-empty p {
  color: var(--text-secondary);
  font-size: 14.5px;
  max-width: 380px;
  margin: 0 auto;
}

/* ===== POPULAR SECTION ===== */
.bl-popular {
  padding: 96px 0;
  background: var(--bg-light, #F8F5FA);
}
.bl-popular__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 40px;
}
.bl-pop {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 22px 24px;
  background: #fff;
  border: 1px solid var(--border, #eae5f0);
  border-radius: var(--radius-lg, 20px);
  text-decoration: none;
  color: inherit;
  transition: all var(--transition, .22s);
}
.bl-pop:hover {
  transform: translateY(-2px);
  border-color: var(--brand, #8B0F3E);
  box-shadow: 0 8px 24px rgba(139, 15, 62, 0.1);
}
.bl-pop__rank {
  flex-shrink: 0;
  font-size: 28px;
  font-weight: 800;
  color: var(--brand, #8B0F3E);
  letter-spacing: -0.02em;
  line-height: 1;
  opacity: 0.6;
}
.bl-pop__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.bl-pop__cat {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--brand, #8B0F3E);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.bl-pop h3 {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.4;
  margin: 0;
}
.bl-pop__meta {
  font-size: 12.5px;
  color: var(--text-muted, #8B8096);
  font-weight: 500;
}

/* ===== SUBSCRIBE ===== */
.bl-subscribe {
  padding: 100px 0;
  background: #fff;
}
.bl-subscribe__inner {
  position: relative;
  background: linear-gradient(135deg, #8B0F3E 0%, #6b0c30 100%);
  color: #fff;
  padding: 64px 56px;
  border-radius: var(--radius-xl, 28px);
  overflow: hidden;
  text-align: center;
}
.bl-subscribe__shape {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  pointer-events: none;
}
.bl-subscribe__shape--1 {
  width: 260px; height: 260px;
  top: -80px; right: -60px;
}
.bl-subscribe__shape--2 {
  width: 180px; height: 180px;
  bottom: -60px; left: -40px;
}
.bl-subscribe__content {
  position: relative;
  z-index: 2;
  max-width: 600px;
  margin: 0 auto;
}
.bl-subscribe__content h2 {
  font-size: clamp(26px, 3.2vw, 36px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 14px 0 14px;
  color: #fff;
}
.bl-subscribe__content p {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.6;
  margin-bottom: 28px;
}
.bl-subscribe__form {
  display: flex;
  gap: 10px;
  max-width: 460px;
  margin: 0 auto 18px;
  flex-wrap: wrap;
}
.bl-subscribe__ctas {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 0 auto 18px;
}
.bl-subscribe__input {
  flex: 1;
  min-width: 200px;
  padding: 12px 20px;
  border-radius: var(--radius-full, 100px);
  border: 2px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 14.5px;
  font-family: inherit;
  outline: none;
  transition: all var(--transition, .22s);
}
.bl-subscribe__input::placeholder { color: rgba(255, 255, 255, 0.55); }
.bl-subscribe__input:focus {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.15);
}
.bl-subscribe__perks {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 6px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
}

/* =======================================================
   RESPONSIVE
   ======================================================= */
@media (max-width: 1024px) {
  .bl-grid { grid-template-columns: repeat(2, 1fr); }
  .bl-card--featured { flex-direction: column; }
  .bl-card--featured .bl-card__cover {
    width: 100%;
    min-height: 240px;
    aspect-ratio: 16 / 9;
  }
  .bl-card--featured .bl-card__body { padding: 28px 28px 30px; }
  .bl-card--featured .bl-card__title { font-size: 24px; }
  .bl-popular__grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .bl-feed { padding: 48px 0 72px; }
  .bl-popular { padding: 64px 0; }
  .bl-subscribe { padding: 64px 0; }
  .bl-subscribe__inner { padding: 44px 24px; border-radius: var(--radius-lg, 20px); }

  /* Horizontal scroll chips on mobile */
  .bl-cats {
    top: 60px;
    margin: 0 -24px 28px;
    padding: 12px 0;
  }
  .bl-cats__inner {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0 24px;
    gap: 8px;
  }
  .bl-cats__inner::-webkit-scrollbar { display: none; }
  .bl-chip { padding: 8px 14px; font-size: 13px; }

  .bl-grid { grid-template-columns: 1fr; gap: 18px; }
  .bl-card__cover { aspect-ratio: 16 / 10; }
  .bl-card--featured .bl-card__title { font-size: 21px; }
  .bl-card--featured .bl-card__body { padding: 22px 22px 24px; }

  .bl-pop { padding: 18px 20px; gap: 14px; }
  .bl-pop__rank { font-size: 22px; }
  .bl-pop h3 { font-size: 14.5px; }

  .bl-subscribe__form { flex-direction: column; }
  .bl-subscribe__input { width: 100%; }
  .bl-subscribe__form .btn { width: 100%; }
  .bl-subscribe__ctas { flex-direction: column; }
  .bl-subscribe__ctas .btn { width: 100%; }
  .bl-subscribe__perks { gap: 10px; font-size: 12.5px; }
}
