/* =========================================================
   article.css — Discover Karabakh (Purple System)
   For the provided EJS/HTML (no markup changes)
   ========================================================= */

/* page spacing */
.aGrid{ padding: 18px 0 64px; }

/* ---------------------------------------------------------
   Back link
   --------------------------------------------------------- */
.aGrid a[href="/explore/articles"]{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(90,46,145,.14);
  background: rgba(255,255,255,.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: rgba(90,46,145,.98);
  font-weight: 950;
  letter-spacing: -.01em;
  box-shadow: 0 14px 44px rgba(24,12,40,.10);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}

.aGrid a[href="/explore/articles"]:hover{
  transform: translateY(-1px);
  border-color: rgba(90,46,145,.22);
  background: rgba(90,46,145,.06);
  box-shadow: 0 18px 60px rgba(24,12,40,.14);
}

/* ---------------------------------------------------------
   Cover image frame (your wrapper uses inline border-radius)
   --------------------------------------------------------- */
.aGrid > .container > div[style*="border-radius: 24px"]{
  background:
    radial-gradient(820px 380px at 18% 0%, rgba(47,209,255,.10), rgba(47,209,255,0) 55%),
    linear-gradient(135deg, rgba(90,46,145,.10), rgba(123,67,196,.06));
  border-color: rgba(90,46,145,.16) !important;
  box-shadow: 0 28px 90px rgba(24,12,40,.18);
}

/* add a cinematic overlay without changing markup */
.aGrid > .container > div[style*="border-radius: 24px"] > div{
  position: relative;
  overflow: hidden;
}

.aGrid > .container > div[style*="border-radius: 24px"] > div::after{
  content:"";
  position:absolute;
  inset:0;
  background:
    radial-gradient(900px 520px at 18% 22%, rgba(123,67,196,.22), rgba(123,67,196,0) 60%),
    linear-gradient(180deg, rgba(15,11,28,.00) 55%, rgba(15,11,28,.34) 100%);
  pointer-events:none;
}

/* =====================================
   ARTICLE META ROW
   ===================================== */

.aMetaWrap{
  margin-top: 18px;
}

/* row */
.aMeta{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
  margin-bottom: 10px;
}

/* base pill */
.pill{
  display:inline-flex;
  align-items:center;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;

  border: 1px solid rgba(17,12,26,.10);
  background: rgba(255,255,255,.85);
  color: rgba(15,11,28,.92);

  box-shadow: 0 10px 26px rgba(24,12,40,.06);
}

/* category (brand purple soft) */
.pill--soft{
  background: rgba(90,46,145,.10);
  border-color: rgba(90,46,145,.20);
  color: rgba(90,46,145,.98);
}

/* read time (cyan accent) */
.pill--rate{
  background: rgba(47,209,255,.10);
  border-color: rgba(47,209,255,.20);
  color: rgba(9,77,89,.95);
}

/* date */
.aMeta__date{
  font-size: 13.5px;
  font-weight: 800;
  color: rgba(15,11,28,.60);
  letter-spacing: .01em;
  position: relative;
  padding-left: 12px;
}

/* subtle separator dot */
.aMeta__date::before{
  content:"";
  position:absolute;
  left:0;
  top:50%;
  transform: translateY(-50%);
  width:4px;
  height:4px;
  border-radius:999px;
  background: rgba(15,11,28,.30);
}

/* kicker */
.aGrid div[style*="opacity:.8; margin-bottom: 6px;"]{
  display:inline-flex;
  align-items:center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(90,46,145,.14);
  background: rgba(255,255,255,.70);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: rgba(90,46,145,.95) !important;
  font-weight: 950;
  letter-spacing: .10em;
  text-transform: uppercase;
  font-size: 11px;
}

/* ---------------------------------------------------------
   Article typography (targets the inline H1/P)
   --------------------------------------------------------- */
.aGrid h1{
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1.06;
  letter-spacing: -.04em;
  font-weight: 950;
  color: rgba(15,11,28,.96);
}

.aGrid p[style*="opacity:.85;"]{
  font-size: 16px;
  line-height: 1.8;
  color: rgba(15,11,28,.72) !important;
  max-width: 78ch;
}

/* lead paragraph blocks */
.aGrid p[style*="font-size: 1.05rem"]{
  font-size: 17px !important;
  line-height: 1.85 !important;
  color: rgba(15,11,28,.82) !important;
}

/* ---------------------------------------------------------
   Content sections + headings
   --------------------------------------------------------- */
.aGrid section h2{
  margin: 18px 0 10px !important;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -.02em;
  font-weight: 950;
  color: rgba(15,11,28,.94);
}

.aGrid section p{
  color: rgba(15,11,28,.78);
}

.aGrid section p[style*="line-height:1.65"]{
  font-size: 15.4px;
  line-height: 1.85 !important;
  color: rgba(15,11,28,.76) !important;
}

/* lists */
.aGrid ul{
  margin: 8px 0 0 !important;
  padding-left: 18px !important;
}

.aGrid li{
  color: rgba(15,11,28,.76);
  line-height: 1.7;
}

/* ---------------------------------------------------------
   Callouts + checklists (your inline style has border/padding)
   We'll elevate them to purple-glass cards
   --------------------------------------------------------- */
.aGrid section[style*="border:1px solid rgba(15,23,42,.10); border-radius:18px; padding:14px;"]{
  border: 1px solid rgba(90,46,145,.16) !important;
  border-radius: 20px !important;

  background:
    radial-gradient(820px 380px at 18% 0%, rgba(47,209,255,.10), rgba(47,209,255,0) 55%),
    linear-gradient(135deg, rgba(90,46,145,.08), rgba(123,67,196,.04)),
    rgba(255,255,255,.74) !important;

  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  box-shadow: 0 18px 60px rgba(24,12,40,.10);
}

.aGrid section[style*="border:1px solid rgba(15,23,42,.10); border-radius:18px; padding:14px;"] > div:first-child{
  font-weight: 950 !important;
  letter-spacing: -.01em;
  color: rgba(15,11,28,.94);
}

/* ---------- Related articles ---------- */
.aRelated{
  margin-top: 24px;
}

.aRelated h3{
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 950;
  letter-spacing: -.01em;
  color: var(--dk-ink);
}

/* card row */
.aCards{
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 14px;
}

/* related card */
.aCard{
  text-decoration:none;
  border-radius: 20px;
  overflow:hidden;

  background:
    radial-gradient(520px 240px at 18% 0%, rgba(47,209,255,.08), rgba(47,209,255,0) 55%),
    rgba(255,255,255,.88);

  border: 1px solid rgba(17,12,26,.10);
  backdrop-filter: blur(12px);
  box-shadow: 0 18px 60px rgba(24,12,40,.10);

  display:grid;
  grid-template-rows: 140px 1fr;

  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.aCard:hover{
  transform: translateY(-2px);
  border-color: rgba(90,46,145,.18);
  box-shadow: 0 28px 90px rgba(24,12,40,.14);
}

.aCard__img{
  position: relative;
  background: #0b1220;
  overflow:hidden;
}
.aCard__img img{
  width:100%;
  height:100%;
  object-fit: cover;
  display:block;
  transform: scale(1.03);
  filter: saturate(1.06) contrast(1.04);
  transition: transform .35s ease, filter .35s ease;
}
.aCard:hover .aCard__img img{
  transform: scale(1.08);
  filter: saturate(1.12) contrast(1.06);
}
.aCard__img::after{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:
    radial-gradient(720px 420px at 18% 18%, rgba(123,67,196,.18), rgba(123,67,196,0) 60%),
    linear-gradient(180deg, rgba(15,11,28,.06) 55%, rgba(15,11,28,.28) 100%);
}

.aCard__b{
  padding: 14px 14px 16px;
  display:flex;
  flex-direction: column;
  gap: 10px;
  min-height: 120px;
}

.aCard__t{
  margin:0;
  font-size: 15.6px;
  line-height: 1.25;
  letter-spacing: -.02em;
  font-weight: 950;
  color: var(--dk-ink);

  /* keep card height stable */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow:hidden;
}

.aCard__cta{
  margin-top: auto;
  display:inline-flex;
  align-items:center;
  gap: 10px;
  font-weight: 950;
  color: rgba(90,46,145,.98);
  width: fit-content;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(90,46,145,.10);
  border: 1px solid rgba(90,46,145,.16);
  transition: transform .16s ease, background .16s ease, border-color .16s ease;
}

.aCard:hover .aCard__cta{
  transform: translateY(-1px);
  background: rgba(90,46,145,.14);
  border-color: rgba(90,46,145,.22);
}

/* ---------- Generic content improvements ---------- */
.aGrid img{
  max-width:100%;
  display:block;
}

/* nicer selection */
::selection{
  background: rgba(90,46,145,.18);
}
/* ---------------------------------------------------------
   Responsive
   --------------------------------------------------------- */
@media (max-width: 980px){
  .aGrid{ padding: 14px 0 54px; }

  .aGrid h1{
    font-size: clamp(30px, 6vw, 44px);
  }

  .aGrid .aCards{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px){
  .aGrid .aCards{
    grid-template-columns: 1fr;
  }

  .aGrid > .container > div[style*="border-radius: 24px"]{
    box-shadow: 0 22px 70px rgba(24,12,40,.16);
  }
}