/* ==========================================================
   Mawaqeeti Blog v2 (Aligned with Site Style)
   - One CSS for all blog pages
   - Light-first, supports body.theme-dark
   ========================================================== */

:root{
  --mq-container: 1120px;
  --mq-radius: 16px;
  --mq-gap: 14px;

  /* Fallbacks if your global variables exist they will override naturally */
  --mq-bg: #f8fafc;
  --mq-surface: #ffffff;
  --mq-surface-2: #f1f5f9;
  --mq-text: #0f172a;
  --mq-muted: rgba(15, 23, 42, .70);
  --mq-border: rgba(15, 23, 42, .10);
  --mq-shadow: 0 16px 45px rgba(2, 6, 23, .08);

  --mq-accent: #38bdf8;
  --mq-accent-soft: rgba(56, 189, 248, .16);
}

body.theme-dark{
  --mq-bg: #020617;
  --mq-surface: rgba(255,255,255,.06);
  --mq-surface-2: rgba(255,255,255,.08);
  --mq-text: rgba(255,255,255,.92);
  --mq-muted: rgba(255,255,255,.70);
  --mq-border: rgba(255,255,255,.10);
  --mq-shadow: 0 18px 55px rgba(0,0,0,.45);

  --mq-accent: #38bdf8;
  --mq-accent-soft: rgba(56, 189, 248, .14);
}

/* ===== Base wrapper ===== */
.mq-blog{
  background: transparent;
  color: var(--mq-text);
}

.mq-blog .mq-container{
  width: 100%;
  max-width: var(--mq-container);
  margin-inline: auto;
  padding: 18px 14px 40px;
}

/* ===== Hero ===== */
.mq-blog-hero{
  background: linear-gradient(180deg, var(--mq-surface), var(--mq-surface-2));
  border: 1px solid var(--mq-border);
  border-radius: calc(var(--mq-radius) + 4px);
  box-shadow: var(--mq-shadow);
  padding: 18px;
}

.mq-blog-hero-inner{
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 900px){
  .mq-blog-hero-inner{
    grid-template-columns: 1fr auto;
    align-items: center;
  }
}

.mq-breadcrumb{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 14px;
  color: var(--mq-muted);
  margin-bottom: 8px;
}

.mq-breadcrumb a{
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dashed transparent;
}

.mq-breadcrumb a:hover{
  color: var(--mq-text);
  border-bottom-color: var(--mq-border);
}

/* Breadcrumb separators (RTL-safe) */
.mq-breadcrumb{
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 14px;
  color: var(--mq-muted);
}

.mq-breadcrumb a{
  color: inherit;
  text-decoration: none;
}

.mq-breadcrumb a:hover{
  color: var(--mq-text);
}

.mq-breadcrumb-sep{
  opacity: .6;
}

.mq-breadcrumb-current{
  color: var(--mq-text);
  font-weight: 500;
  cursor: default;
}



.mq-title{
  font-size: clamp(22px, 2.1vw, 34px);
  line-height: 1.25;
  margin: 0;
}

.mq-subtitle{
  margin: 8px 0 0;
  color: var(--mq-muted);
  line-height: 1.7;
}

/* ===== Stats pills ===== */
.mq-stats{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-start;
}

@media (min-width: 900px){
  .mq-stats{
    justify-content: flex-end;
  }
}

.mq-pill{
  background: var(--mq-surface);
  border: 1px solid var(--mq-border);
  border-radius: 999px;
  padding: 10px 12px;
  min-width: 150px;
}

.mq-pill .k{
  font-size: 12px;
  color: var(--mq-muted);
}

.mq-pill .v{
  font-size: 18px;
  font-weight: 700;
  margin-top: 2px;
}

/* ===== Toolbar ===== */
.mq-toolbar{
  margin-top: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.mq-input{
  flex: 1;
  min-width: 220px;
  background: var(--mq-surface);
  border: 1px solid var(--mq-border);
  border-radius: 12px;
  padding: 11px 12px;
  color: var(--mq-text);
  outline: none;
}

.mq-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid var(--mq-border);
  background: var(--mq-surface);
  color: var(--mq-text);
  text-decoration: none;
  cursor: pointer;
}

.mq-btn:hover{
  border-color: rgba(56,189,248,.35);
  box-shadow: 0 10px 30px rgba(2,6,23,.06);
}

.mq-btn-primary{
  background: linear-gradient(180deg, rgba(56,189,248,.25), rgba(56,189,248,.10));
  border-color: rgba(56,189,248,.35);
}

/* ===== Grid cards ===== */
.mq-grid{
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--mq-gap);
}

@media (min-width: 650px){
  .mq-grid{ grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1020px){
  .mq-grid{ grid-template-columns: 1fr 1fr 1fr; }
}

.mq-card{
  background: var(--mq-surface);
  border: 1px solid var(--mq-border);
  border-radius: var(--mq-radius);
  padding: 14px;
  box-shadow: 0 12px 36px rgba(2,6,23,.06);
}

.mq-card-title{
  margin: 0;
  font-size: 17px;
  line-height: 1.45;
}

.mq-card-title a{
  color: var(--mq-text);
  text-decoration: none;
}

.mq-card-title a:hover{
  color: var(--mq-accent);
}

.mq-card-meta{
  margin-top: 8px;
  font-size: 13px;
  color: var(--mq-muted);
}

.mq-card-excerpt{
  margin-top: 10px;
  color: var(--mq-muted);
  line-height: 1.7;
}

.mq-card-actions{
  margin-top: 12px;
  display: flex;
  justify-content: flex-start;
}

/* ===== Empty state ===== */
.mq-empty{
  margin-top: 14px;
  background: var(--mq-surface);
  border: 1px dashed var(--mq-border);
  border-radius: var(--mq-radius);
  padding: 18px;
  color: var(--mq-muted);
}

/* ===== Article page ===== */
.mq-article{
  margin-top: 14px;
  background: var(--mq-surface);
  border: 1px solid var(--mq-border);
  border-radius: calc(var(--mq-radius) + 4px);
  box-shadow: var(--mq-shadow);
  padding: 18px;
}

.mq-article .content{
  line-height: 1.85;
  color: var(--mq-text);
}

.mq-article .content p{ margin: 0 0 12px; }
.mq-article .content h2,
.mq-article .content h3{
  margin: 18px 0 10px;
}

.mq-article .content a{
  color: var(--mq-accent);
}

/* Pagination (keep Laravel default markup readable) */
.mq-pagination{
  margin-top: 16px;
}
/* ===== Category Chips ===== */
.mq-chips{
  margin-top: 12px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.mq-chip{
  display: inline-flex;
  align-items: center;
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid var(--mq-border);
  background: var(--mq-surface);
  color: var(--mq-text);
  text-decoration: none;
  font-size: 13px;
}

.mq-chip:hover{
  border-color: rgba(56,189,248,.35);
  box-shadow: 0 10px 30px rgba(2,6,23,.06);
}

.mq-chip.is-active{
  border-color: rgba(56,189,248,.35);
  background: linear-gradient(180deg, rgba(56,189,248,.22), rgba(56,189,248,.10));
}

/* ===== Featured Post ===== */
.mq-featured{
  margin-top: 14px;
  background: linear-gradient(180deg, var(--mq-surface), var(--mq-surface-2));
  border: 1px solid var(--mq-border);
  border-radius: calc(var(--mq-radius) + 6px);
  box-shadow: var(--mq-shadow);
  padding: 18px;
}

.mq-featured-badge{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(56,189,248,.35);
  background: var(--mq-accent-soft);
  color: var(--mq-text);
  font-size: 12px;
  margin-bottom: 10px;
}

.mq-featured-title{
  margin: 0;
  font-size: clamp(18px, 1.7vw, 26px);
  line-height: 1.35;
}

.mq-featured-title a{
  color: var(--mq-text);
  text-decoration: none;
}

.mq-featured-title a:hover{
  color: var(--mq-accent);
}

.mq-featured-excerpt{
  margin-top: 10px;
  color: var(--mq-muted);
  line-height: 1.8;
  max-width: 70ch;
}

.mq-featured-actions{
  margin-top: 12px;
}

/* =========================
   Blog Post Cover (Show)
   ========================= */

.mq-cover-box{
  min-width: 260px;
  padding: 12px;
}

.mq-cover-img{
  width: 100%;
  height: 220px;          /* ارتفاع ثابت */
  object-fit: cover;      /* قص احترافي */
  border-radius: 14px;
  border: 1px solid var(--mq-border);
  display: block;
}

/* Placeholder */
.mq-cover-placeholder{
  width: 100%;
  height: 220px;
  border-radius: 14px;
  border: 1px dashed var(--mq-border);
  background: var(--mq-surface-2);
}

/* شاشات كبيرة */
@media (min-width: 1024px){
  .mq-cover-img,
  .mq-cover-placeholder{
    height: 260px;
  }
}

