
/* =========================================================
   KHAGAN BLOG / ARTICLE
   Existing site visual language: black / white / warm gray,
   strong typography, wide imagery, restrained gold accent.
   ========================================================= */

:root{
  --kb-black:#090909;
  --kb-white:#fff;
  --kb-paper:#f5f5f1;
  --kb-soft:#ecece7;
  --kb-line:#d9d9d3;
  --kb-text:#171717;
  --kb-muted:#6b6b67;
  --kb-accent:#f0b400;
  --kb-max:1180px;
}

body{
  background:var(--kb-white);
  color:var(--kb-text);
}

.blog-shell{
  width:min(calc(100% - 40px), var(--kb-max));
  margin:0 auto;
}

.kb-header{
  background:#000;
  color:#fff;
  position:sticky;
  top:0;
  z-index:1000;
  border-bottom:1px solid rgba(255,255,255,.12);
}

.kb-header-inner{
  min-height:86px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:28px;
}

.kb-brand{
  display:flex;
  align-items:center;
  color:#fff;
  text-decoration:none;
  min-width:160px;
}

.kb-brand img{
  display:block;
  width:auto;
  height:42px;
  max-width:190px;
  object-fit:contain;
}

.kb-brand-fallback{
  display:none;
  font-weight:800;
  font-size:28px;
  letter-spacing:.04em;
}

.kb-nav{
  display:flex;
  align-items:center;
  gap:25px;
}

.kb-nav a{
  position:relative;
  color:#fff;
  text-decoration:none;
  font-size:13px;
  letter-spacing:.07em;
  text-transform:uppercase;
  padding:10px 0;
  white-space:nowrap;
}

.kb-nav a:hover,
.kb-nav a.active{
  color:#fff;
}

.kb-nav a.active::after,
.kb-nav a:hover::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:3px;
  height:2px;
  background:var(--kb-accent);
}

.kb-actions{
  display:flex;
  align-items:center;
  gap:12px;
}

.kb-lang{
  border:1px solid #555;
  background:#111;
  color:#fff;
  min-height:40px;
  padding:0 10px;
}

.kb-menu-btn{
  display:none;
  width:44px;
  height:44px;
  border:0;
  background:transparent;
  color:#fff;
  font-size:30px;
  line-height:1;
  cursor:pointer;
}

/* BLOG HERO */
.blog-hero{
  background:var(--kb-paper);
  border-bottom:1px solid var(--kb-line);
  padding:74px 0 64px;
}

.blog-kicker,
.article-kicker{
  margin:0 0 18px;
  color:var(--kb-muted);
  font-size:12px;
  font-weight:700;
  letter-spacing:.22em;
  text-transform:uppercase;
}

.blog-hero h1{
  margin:0;
  max-width:920px;
  font-size:clamp(46px,7vw,94px);
  line-height:.93;
  letter-spacing:-.055em;
  color:#080808;
}

.blog-hero p{
  max-width:680px;
  margin:28px 0 0;
  color:#555;
  font-size:18px;
  line-height:1.75;
}

/* FEATURE */
.feature-story{
  padding:56px 0 70px;
}

.feature-card{
  display:grid;
  grid-template-columns:minmax(0,1.55fr) minmax(320px,.85fr);
  min-height:560px;
  background:#0b0b0b;
}

.feature-media,
.card-media,
.article-hero-media,
.related-media{
  position:relative;
  overflow:hidden;
  background:#d7d5cf;
}

.feature-media{
  min-height:560px;
}

.feature-media::before,
.card-media::before,
.article-hero-media::before,
.related-media::before{
  content:"";
  position:absolute;
  inset:0;
  background:
    linear-gradient(135deg, rgba(0,0,0,.06), rgba(0,0,0,.28)),
    linear-gradient(25deg, #b8b7b0 0%, #e3e1d9 48%, #8e8f89 100%);
}

.feature-media::after{
  content:"KHAGAN / JOURNAL";
  position:absolute;
  left:30px;
  bottom:26px;
  color:rgba(255,255,255,.9);
  font-size:12px;
  font-weight:700;
  letter-spacing:.22em;
}

.feature-content{
  padding:48px 42px;
  color:#fff;
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
}

.meta{
  display:flex;
  flex-wrap:wrap;
  gap:8px 14px;
  align-items:center;
  color:#777;
  font-size:12px;
  font-weight:700;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.feature-content .meta{
  color:#aaa;
}

.meta .dot::before{
  content:"•";
  margin-right:14px;
  color:var(--kb-accent);
}

.feature-content h2{
  margin:20px 0 18px;
  font-size:clamp(34px,4vw,55px);
  line-height:1.02;
  letter-spacing:-.035em;
}

.feature-content p{
  color:#c9c9c9;
  font-size:16px;
  line-height:1.7;
  margin:0 0 30px;
}

.read-link{
  display:inline-flex;
  align-items:center;
  gap:12px;
  width:max-content;
  color:inherit;
  text-decoration:none;
  font-size:12px;
  font-weight:800;
  letter-spacing:.13em;
  text-transform:uppercase;
}

.read-link::after{
  content:"→";
  font-size:20px;
  transition:transform .2s ease;
}

.read-link:hover::after{
  transform:translateX(5px);
}

/* FILTER */
.blog-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:22px;
  padding:0 0 28px;
  border-bottom:1px solid var(--kb-line);
}

.blog-toolbar h2{
  margin:0;
  font-size:28px;
  letter-spacing:-.02em;
}

.blog-filters{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.filter-btn{
  border:1px solid var(--kb-line);
  background:#fff;
  color:#222;
  border-radius:999px;
  padding:9px 14px;
  font:inherit;
  font-size:12px;
  cursor:pointer;
}

.filter-btn:hover,
.filter-btn.active{
  background:#0b0b0b;
  border-color:#0b0b0b;
  color:#fff;
}

/* GRID */
.blog-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:44px 24px;
  padding:38px 0 76px;
}

.blog-card{
  min-width:0;
}

.blog-card[hidden]{
  display:none;
}

.card-media{
  height:0;
  padding-bottom:72%;
  margin-bottom:20px;
}

.card-media::after,
.related-media::after{
  position:absolute;
  left:18px;
  top:18px;
  content:attr(data-label);
  background:rgba(0,0,0,.82);
  color:#fff;
  padding:7px 9px;
  font-size:10px;
  font-weight:800;
  letter-spacing:.12em;
  text-transform:uppercase;
}

.blog-card:nth-child(2n) .card-media::before{
  background:
    linear-gradient(140deg,rgba(0,0,0,.04),rgba(0,0,0,.2)),
    linear-gradient(35deg,#c9c0b2,#757a76);
}

.blog-card:nth-child(3n) .card-media::before{
  background:
    linear-gradient(160deg,rgba(0,0,0,.04),rgba(0,0,0,.25)),
    linear-gradient(25deg,#8f9797,#dedbd0);
}

.blog-card h3{
  margin:13px 0 12px;
  font-size:24px;
  line-height:1.18;
  letter-spacing:-.025em;
}

.blog-card h3 a{
  color:#111;
  text-decoration:none;
}

.blog-card h3 a:hover{
  text-decoration:underline;
  text-decoration-thickness:1px;
  text-underline-offset:4px;
}

.blog-card p{
  margin:0 0 18px;
  color:#666;
  line-height:1.65;
  font-size:14px;
}

/* EDITORIAL STRIP */
.editorial-strip{
  background:#0a0a0a;
  color:#fff;
  padding:62px 0;
}

.editorial-inner{
  display:grid;
  grid-template-columns:.7fr 1.3fr;
  gap:60px;
  align-items:end;
}

.editorial-index{
  font-size:14px;
  color:#888;
  letter-spacing:.16em;
}

.editorial-inner h2{
  margin:0;
  max-width:760px;
  font-size:clamp(34px,5vw,64px);
  line-height:1;
  letter-spacing:-.04em;
}

.editorial-inner p{
  color:#aaa;
  max-width:640px;
  line-height:1.7;
}

/* ARTICLE */
.article-header{
  padding:68px 0 42px;
}

.article-breadcrumb{
  display:flex;
  gap:9px;
  flex-wrap:wrap;
  color:#777;
  font-size:12px;
  margin-bottom:46px;
}

.article-breadcrumb a{
  color:#555;
  text-decoration:none;
}

.article-breadcrumb a:hover{
  color:#000;
}

.article-header h1{
  max-width:1040px;
  margin:14px 0 24px;
  font-size:clamp(44px,7vw,88px);
  line-height:.98;
  letter-spacing:-.055em;
}

.article-lead{
  max-width:780px;
  margin:0;
  font-size:20px;
  color:#555;
  line-height:1.7;
}

.article-hero-media{
  height:min(66vw,720px);
  max-height:720px;
}

.article-hero-media::after{
  content:"KHAGAN / FIELD NOTES";
  position:absolute;
  left:30px;
  bottom:26px;
  color:#fff;
  font-size:11px;
  font-weight:800;
  letter-spacing:.18em;
}

.article-layout{
  display:grid;
  grid-template-columns:140px minmax(0,760px) 1fr;
  gap:38px;
  align-items:start;
  padding:64px 0 90px;
}

.share-rail{
  position:sticky;
  top:120px;
}

.share-label{
  display:block;
  color:#888;
  font-size:10px;
  font-weight:800;
  letter-spacing:.18em;
  text-transform:uppercase;
  margin-bottom:12px;
}

.share-links{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:8px;
}

.share-links button{
  border:1px solid var(--kb-line);
  background:#fff;
  min-width:88px;
  padding:9px 10px;
  cursor:pointer;
  font-size:11px;
  text-align:left;
}

.share-links button:hover{
  background:#111;
  color:#fff;
  border-color:#111;
}

.article-body{
  min-width:0;
}

.article-body > p{
  font-size:17px;
  line-height:1.9;
  color:#333;
  margin:0 0 28px;
}

.article-body .dropcap::first-letter{
  float:left;
  font-size:72px;
  line-height:.8;
  font-weight:800;
  margin:11px 10px 0 0;
  color:#111;
}

.article-body h2{
  margin:56px 0 20px;
  font-size:36px;
  line-height:1.1;
  letter-spacing:-.03em;
}

.pullquote{
  margin:48px 0;
  padding:36px 0;
  border-top:2px solid #111;
  border-bottom:1px solid var(--kb-line);
  font-size:31px;
  font-weight:700;
  line-height:1.25;
  letter-spacing:-.025em;
}

.article-inline-media{
  margin:44px 0;
  min-height:430px;
  background:
    linear-gradient(135deg,rgba(0,0,0,.08),rgba(0,0,0,.25)),
    linear-gradient(35deg,#8b8f8e,#d8d4c9);
  position:relative;
}

.article-inline-media span{
  position:absolute;
  left:20px;
  bottom:18px;
  color:#fff;
  font-size:10px;
  letter-spacing:.18em;
  font-weight:800;
}

.fact-box{
  background:var(--kb-paper);
  margin:42px 0;
  padding:30px;
  border-left:4px solid var(--kb-accent);
}

.fact-box h3{
  margin:0 0 14px;
  font-size:18px;
}

.fact-box ul{
  margin:0;
  padding-left:19px;
}

.fact-box li{
  margin:8px 0;
  line-height:1.55;
}

.article-aside{
  color:#777;
  font-size:12px;
  line-height:1.65;
  border-top:1px solid var(--kb-line);
  padding-top:14px;
}

/* RELATED */
.related{
  background:var(--kb-paper);
  padding:70px 0 80px;
  border-top:1px solid var(--kb-line);
}

.related-head{
  display:flex;
  justify-content:space-between;
  align-items:end;
  gap:20px;
  margin-bottom:28px;
}

.related-head h2{
  margin:0;
  font-size:34px;
  letter-spacing:-.03em;
}

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

.related-media{
  height:210px;
  margin-bottom:16px;
}

.related-card h3{
  margin:10px 0 0;
  font-size:21px;
  line-height:1.2;
}

.related-card a{
  color:#111;
  text-decoration:none;
}

/* FOOTER */
.kb-footer{
  background:#0a0a0a;
  color:#d8d8d8;
  padding:54px 0 22px;
}

.footer-grid{
  display:grid;
  grid-template-columns:1.15fr .8fr .8fr;
  gap:52px;
}

.footer-brand{
  color:#fff;
  font-size:28px;
  font-weight:800;
  letter-spacing:.04em;
}

.footer-copy{
  max-width:440px;
  color:#9a9a9a;
  line-height:1.7;
  font-size:13px;
}

.kb-footer h4{
  color:#fff;
  margin:0 0 15px;
  font-size:12px;
  letter-spacing:.14em;
  text-transform:uppercase;
}

.kb-footer a{
  color:#bdbdbd;
  text-decoration:none;
}

.kb-footer a:hover{
  color:#fff;
}

.footer-list{
  list-style:none;
  padding:0;
  margin:0;
}

.footer-list li{
  margin:8px 0;
}

.footer-bottom{
  border-top:1px solid #242424;
  margin-top:42px;
  padding-top:20px;
  display:flex;
  justify-content:space-between;
  gap:20px;
  color:#777;
  font-size:11px;
}

/* Scroll to top */
#scrollTopBtn{
  position:fixed;
  right:18px;
  bottom:20px;
  width:46px;
  height:46px;
  padding:0;
  border:0;
  border-radius:50%;
  background:#000;
  color:#fff;
  display:none;
  align-items:center;
  justify-content:center;
  font-size:20px;
  line-height:1;
  z-index:9999;
  cursor:pointer;
  box-shadow:0 4px 14px rgba(0,0,0,.18);
}

/* RESPONSIVE */
@media (max-width:980px){
  .kb-nav{
    position:fixed;
    top:86px;
    left:0;
    right:0;
    background:#000;
    display:none;
    padding:22px;
    border-top:1px solid #252525;
    flex-direction:column;
    align-items:flex-start;
    gap:5px;
  }

  .kb-nav.show{
    display:flex;
  }

  .kb-menu-btn{
    display:block;
  }

  .feature-card{
    grid-template-columns:1fr;
  }

  .feature-media{
    min-height:470px;
  }

  .blog-grid,
  .related-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .article-layout{
    grid-template-columns:1fr;
    max-width:760px;
    margin:0 auto;
  }

  .share-rail{
    position:static;
  }

  .share-links{
    flex-direction:row;
    flex-wrap:wrap;
  }

  .article-aside{
    display:none;
  }

  .editorial-inner{
    grid-template-columns:1fr;
    gap:18px;
  }
}

@media (max-width:650px){
  .blog-shell{
    width:min(calc(100% - 30px), var(--kb-max));
  }

  .kb-header-inner{
    min-height:76px;
  }

  .kb-nav{
    top:76px;
  }

  .kb-brand img{
    height:34px;
    max-width:160px;
  }

  .kb-actions{
    gap:7px;
  }

  .kb-lang{
    min-height:38px;
  }

  .blog-hero{
    padding:54px 0 45px;
  }

  .blog-hero h1{
    font-size:49px;
  }

  .feature-story{
    padding:30px 0 50px;
  }

  .feature-media{
    min-height:330px;
  }

  .feature-content{
    padding:30px 24px 34px;
  }

  .feature-content h2{
    font-size:35px;
  }

  .blog-toolbar{
    align-items:flex-start;
    flex-direction:column;
  }

  .blog-filters{
    justify-content:flex-start;
    width:100%;
    overflow-x:auto;
    flex-wrap:nowrap;
    padding-bottom:6px;
  }

  .filter-btn{
    white-space:nowrap;
  }

  .blog-grid,
  .related-grid{
    grid-template-columns:1fr;
  }

  .blog-grid{
    gap:38px;
  }

  .card-media{
    padding-bottom:66%;
  }

  .article-header{
    padding:44px 0 30px;
  }

  .article-breadcrumb{
    margin-bottom:30px;
  }

  .article-header h1{
    font-size:47px;
  }

  .article-lead{
    font-size:17px;
  }

  .article-hero-media{
    height:62vw;
    min-height:300px;
  }

  .article-layout{
    padding:44px 0 65px;
  }

  .article-body > p{
    font-size:16px;
    line-height:1.8;
  }

  .article-body h2{
    font-size:30px;
  }

  .pullquote{
    font-size:25px;
    padding:28px 0;
  }

  .article-inline-media{
    min-height:300px;
  }

  .footer-grid{
    grid-template-columns:1fr;
    gap:34px;
  }

  .footer-bottom{
    flex-direction:column;
  }

  #scrollTopBtn{
    width:44px;
    height:44px;
    right:14px;
    bottom:18px;
  }
}

/* =========================================================
   BLOG CARD — REAL IMAGE FIX
   Keeps the existing 72% card ratio, but places real images
   above the old placeholder gradient.
========================================================= */

.card-media{
  display:block;
  width:100%;
  position:relative;
  overflow:hidden;
}

/* Real image fills the existing placeholder box */
.card-media img{
  position:absolute;
  inset:0;
  z-index:1;
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  opacity:1 !important;
  visibility:visible !important;
  filter:none !important;
  transition:transform .4s ease;
}

/* Old gray placeholder must stay behind a real image */
.card-media::before{
  z-index:0;
}

/* Keep the category label above the image */
.card-media::after{
  z-index:2;
}

/* Modern browsers: completely remove placeholder gradient when an image exists */
.card-media:has(img)::before{
  display:none;
  content:none;
}

.blog-card:hover .card-media img{
  transform:scale(1.03);
}
