/* ============================================================
   VIRALIS — blog (index + single post). Loaded by pages/blog and pages/blog-post.
   Uses the brand tokens from viralis-base.css.
   ============================================================ */
body{ background:var(--ivory); color:var(--black); font-family:var(--font-body); line-height:1.6; -webkit-font-smoothing:antialiased; }
.display{ font-family:var(--font-display); font-weight:500; letter-spacing:-.01em; line-height:1.12; }
html[lang="ar"] .display, body.font-arabic .display{ font-family:var(--font-arabic); font-weight:700; letter-spacing:0; line-height:1.4; }
.eyebrow{ font-size:.85rem; color:var(--gold-deep); font-weight:500; }

/* ---- intro (same treatment as the shop page) ---- */
.intro{ position:relative; overflow:hidden; background:var(--black); color:var(--ivory); padding-block:clamp(3rem,7vw,5rem); }
.intro__bg{ position:absolute; inset:0; background-position:100% 50%; background-size:cover; background-repeat:no-repeat; }
.intro__scrim{ position:absolute; inset:0; background:linear-gradient(90deg, var(--black) 0%, rgba(10,10,13,.88) 40%, rgba(10,10,13,.3) 100%); }
html[dir="rtl"] .intro__bg, html[dir="rtl"] .intro__scrim{ transform:scaleX(-1); }
.intro .container{ position:relative; }
.breadcrumb{ font-size:.82rem; opacity:.75; margin-bottom:1rem; display:flex; flex-wrap:wrap; gap:.4rem; }
.breadcrumb a:hover{ color:var(--gold); }
.intro__heading{ font-size:clamp(2.1rem,4.5vw,3.2rem); margin-bottom:.7rem; }
.intro__desc{ color:var(--stone); max-width:52ch; font-size:1.02rem; }

/* ---- tabs ---- */
.blog{ padding-block:clamp(2.5rem,5vw,4rem) clamp(3.5rem,7vw,5.5rem); }
.tabs{ display:flex; flex-wrap:wrap; gap:.6rem; margin-bottom:2rem; }
.tab{ font-size:.9rem; border:1px solid var(--line-on-light); background:#fff; border-radius:999px; padding:.5rem 1.2rem; transition:background .2s, color .2s, border-color .2s; }
.tab:hover{ border-color:var(--gold-deep); }
.tab.is-active{ background:var(--black); color:var(--ivory); border-color:var(--black); }

/* ---- shared meta line ---- */
.post-meta{ display:flex; flex-wrap:wrap; align-items:center; gap:.35rem .6rem; font-size:.8rem; color:var(--gray); }
.post-meta__cat{ color:var(--gold-deep); font-weight:600; }
.post-meta__dot{ width:3px; height:3px; border-radius:50%; background:currentColor; opacity:.6; }

/* ---- featured post ---- */
.featured{ display:grid; grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr); gap:clamp(1.5rem,4vw,3.5rem); align-items:center; margin-bottom:clamp(2.5rem,5vw,3.5rem); }
.featured__media{ position:relative; display:block; aspect-ratio:16/10; border-radius:4px; overflow:hidden; background:var(--black); }
.featured__media img{ width:100%; height:100%; object-fit:cover; transition:transform .9s var(--ease); }
.featured:hover .featured__media img{ transform:scale(1.03); }
.featured__media::after{ content:''; position:absolute; inset:14px; border:1px solid rgba(200,167,114,.45); pointer-events:none; }
.featured__label{ display:inline-block; font-size:.72rem; letter-spacing:.04em; background:var(--black); color:var(--gold); padding:.25rem .8rem; border-radius:999px; margin-bottom:1rem; }
.featured__title{ font-size:clamp(1.7rem,3vw,2.4rem); margin-block:.7rem .8rem; }
.featured__title a:hover{ color:var(--gold-deep); }
.featured__excerpt{ color:rgba(10,10,13,.75); max-width:46ch; margin-bottom:1.3rem; }

/* ---- post cards ---- */
.post-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(min(300px,100%),1fr)); gap:clamp(1.2rem,2.5vw,2rem); }
.post-card{ position:relative; display:flex; flex-direction:column; }
.post-card__media{ display:block; aspect-ratio:4/3; border-radius:4px; overflow:hidden; background:var(--black); margin-bottom:1rem; }
.post-card__media img{ width:100%; height:100%; object-fit:cover; transition:transform .9s var(--ease); }
.post-card:hover .post-card__media img{ transform:scale(1.04); }
.post-card__title{ font-family:var(--font-display); font-weight:500; font-size:1.22rem; line-height:1.3; margin-block:.5rem .5rem; }
html[lang="ar"] .post-card__title{ font-family:var(--font-arabic); font-weight:700; }
/* the title link stretches over the whole card */
.post-card__title a::after{ content:''; position:absolute; inset:0; }
.post-card:hover .post-card__title{ color:var(--gold-deep); }
.post-card__excerpt{ font-size:.92rem; color:rgba(10,10,13,.72); margin-bottom:.9rem; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
.read-link{ display:inline-flex; align-items:center; gap:.4rem; font-size:.88rem; font-weight:600; border-bottom:1px solid var(--gold-deep); padding-bottom:2px; align-self:flex-start; margin-top:auto; }
.read-link:hover{ color:var(--gold-deep); }
html[dir="rtl"] .read-link__arrow{ transform:scaleX(-1); display:inline-block; }
.empty{ text-align:center; padding-block:3rem; opacity:.7; }

/* ============================================================
   SINGLE POST
   ============================================================ */
.article-head{ padding-block:clamp(2rem,4vw,3rem) clamp(1.5rem,3vw,2.2rem); }
.article-head .breadcrumb{ opacity:.7; }
.article-head .breadcrumb a:hover{ color:var(--gold-deep); }
.article-head__inner{ max-width:820px; }
.article-title{ font-size:clamp(2rem,4.4vw,3.2rem); margin-block:.9rem 1rem; }
.article-lede{ font-size:clamp(1.05rem,1.5vw,1.2rem); color:rgba(10,10,13,.75); max-width:56ch; margin-bottom:1.2rem; }
.article-hero{ position:relative; aspect-ratio:16/8; border-radius:4px; overflow:hidden; background:var(--black); }
.article-hero img{ width:100%; height:100%; object-fit:cover; }
.article-hero::after{ content:''; position:absolute; inset:14px; border:1px solid rgba(200,167,114,.45); pointer-events:none; }

.article{ padding-block:clamp(2.5rem,5vw,4rem); }
.article__body{ max-width:68ch; margin-inline:auto; font-size:1.06rem; color:rgba(10,10,13,.86); }
.article__body p{ margin-bottom:1.3rem; }
.article__body h2{ font-family:var(--font-display); font-weight:600; font-size:clamp(1.35rem,2.2vw,1.65rem); color:var(--black); margin-block:2.2rem .8rem; line-height:1.3; }
html[lang="ar"] .article__body h2{ font-family:var(--font-arabic); font-weight:700; }
.article__body blockquote{
  margin-block:2rem; padding:.3rem 0 .3rem 1.4rem; border-inline-start:2px solid var(--gold);
  font-family:var(--font-display); font-size:clamp(1.2rem,2vw,1.45rem); line-height:1.45; color:var(--black);
}
html[dir="rtl"] .article__body blockquote{ padding:.3rem 1.4rem .3rem 0; }
html[lang="ar"] .article__body blockquote{ font-family:var(--font-arabic); font-weight:600; }
.placeholder-note{ max-width:68ch; margin:1.6rem auto 0; font-size:.78rem; color:var(--gray); font-style:italic; }

/* "shop the routine" box */
.shop-box{ max-width:68ch; margin:2.6rem auto 0; display:flex; align-items:center; gap:1.1rem; background:var(--stone); border-radius:4px; padding:1rem 1.2rem; }
.shop-box__img{ width:64px; aspect-ratio:4/5; object-fit:cover; border-radius:3px; flex-shrink:0; background:var(--black); }
.shop-box__text{ flex:1; min-width:0; }
.shop-box__label{ font-size:.75rem; color:var(--gold-deep); font-weight:600; margin-bottom:.15rem; }
.shop-box__name{ font-family:var(--font-display); font-weight:500; font-size:1.08rem; line-height:1.3; }
html[lang="ar"] .shop-box__name{ font-family:var(--font-arabic); font-weight:700; }
.shop-box__btn{ flex-shrink:0; background:var(--black); color:var(--ivory); border-radius:2px; padding:.7rem 1.2rem; font-size:.88rem; font-weight:500; transition:background .25s, color .25s; }
.shop-box__btn:hover{ background:var(--gold); color:var(--black); }

.related-posts{ padding-block:clamp(2.5rem,5vw,4rem) clamp(3.5rem,7vw,5rem); border-top:1px solid var(--line-on-light); }
.related-posts__head{ display:flex; align-items:flex-end; justify-content:space-between; gap:1rem; margin-bottom:2rem; }
.related-posts__head .display{ font-size:clamp(1.6rem,3vw,2.2rem); margin-top:.4rem; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width:880px){
  .featured{ grid-template-columns:1fr; }
}
@media (max-width:600px){
  .intro{ padding-block:2.4rem 2.2rem; }
  .intro__scrim{ background:linear-gradient(90deg, rgba(10,10,13,.92) 0%, rgba(10,10,13,.72) 100%); }
  .intro__heading{ font-size:2rem; }
  .intro__desc{ font-size:.95rem; }
  .blog{ padding-block:1.6rem 3rem; }

  /* tabs: one swipeable row */
  .tabs{ flex-wrap:nowrap; overflow-x:auto; scrollbar-width:none; margin-inline:calc(var(--pad) * -1); padding-inline:var(--pad); margin-bottom:1.4rem; }
  .tabs::-webkit-scrollbar{ display:none; }
  .tab{ flex-shrink:0; }

  .featured{ gap:1.1rem; }
  .featured__media::after, .article-hero::after{ inset:10px; }
  .post-grid{ gap:1.8rem; }

  .article-head{ padding-block:1.4rem 1.2rem; }
  .article-title{ font-size:1.9rem; }
  .article-hero{ aspect-ratio:4/3; }
  .article{ padding-block:2.2rem 2.6rem; }
  .article__body{ font-size:1rem; }
  .shop-box{ flex-wrap:wrap; }
  .shop-box__btn{ width:100%; text-align:center; }
  .related-posts__head{ margin-bottom:1.4rem; }
}
