/*
 * Hand-designed blog (index + post pages) — not based on the Quad template.
 * Brand language: Figtree, #0D0E10 headings, #676879 body, purple accents
 * (#433CE7 / #5C3EF4), lavender #F0E9FF.
 */

.cmk-blog{font-family:"Figtree",sans-serif;}

/* ── Page hero band ── */
.cmk-blog-hero{
  background:linear-gradient(180deg,#F0E9FF 0%,#F7F4FF 60%,#fff 100%);
  padding:150px 0 56px;
  text-align:center;
}
.cmk-blog-pill{
  display:inline-block;
  padding:6px 16px;
  border-radius:999px;
  background:#fff;
  color:#433CE7;
  font-size:13px;
  font-weight:700;
  letter-spacing:.06em;
  text-transform:uppercase;
  box-shadow:0 2px 10px rgba(67,60,231,.12);
}
.cmk-blog-hero h1{
  margin:18px 0 12px;
  color:#0D0E10;
  font-size:clamp(30px,4.5vw,46px);
  font-weight:700;
  letter-spacing:-.02em;
  line-height:1.15;
}
.cmk-blog-hero p{
  margin:0 auto;
  max-width:560px;
  color:#676879;
  font-size:17px;
  line-height:1.65;
}

/* ── Card grid ── */
.cmk-blog-list{padding:36px 0 90px;}
.cmk-blog-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(320px,1fr));
  gap:28px;
}
.cmk-blog-card{
  display:flex;
  flex-direction:column;
  background:#fff;
  border:1px solid rgba(86,95,118,.12);
  border-radius:14px;
  overflow:hidden;
  text-decoration:none;
  transition:transform .3s ease,box-shadow .3s ease,border-color .3s ease;
}
.cmk-blog-card:hover{
  transform:translateY(-4px);
  box-shadow:0 18px 44px rgba(13,14,16,.1);
  border-color:transparent;
}
.cmk-blog-card-media{
  aspect-ratio:16/9;
  overflow:hidden;
  background:linear-gradient(135deg,#E9E0FF 0%,#F0E9FF 55%,#DCEBFF 100%);
  display:flex;
  align-items:center;
  justify-content:center;
}
.cmk-blog-card-media img{
  width:100%;
  height:100%;
  object-fit:cover;
  transition:transform .5s ease;
}
.cmk-blog-card:hover .cmk-blog-card-media img{transform:scale(1.04);}
.cmk-blog-card-media span{
  color:#433CE7;
  font-size:44px;
  font-weight:700;
  opacity:.5;
}
.cmk-blog-card-body{
  display:flex;
  flex-direction:column;
  flex:1;
  padding:22px 24px 24px;
}
.cmk-blog-meta{
  color:#8b90a0;
  font-size:13px;
  font-weight:600;
  letter-spacing:.04em;
  text-transform:uppercase;
}
.cmk-blog-meta b{color:#433CE7;font-weight:700;}
.cmk-blog-card-body h2{
  margin:10px 0 8px;
  color:#0D0E10;
  font-size:20px;
  font-weight:700;
  line-height:1.35;
  transition:color .3s ease;
}
.cmk-blog-card:hover .cmk-blog-card-body h2{color:#433CE7;}
.cmk-blog-card-body p{
  margin:0 0 16px;
  color:#676879;
  font-size:15px;
  line-height:1.65;
  display:-webkit-box;
  -webkit-line-clamp:3;
  -webkit-box-orient:vertical;
  overflow:hidden;
}
.cmk-blog-more{
  margin-top:auto;
  color:#433CE7;
  font-size:14px;
  font-weight:700;
}
.cmk-blog-more i{font-size:12px;margin-left:6px;transition:transform .3s ease;}
.cmk-blog-card:hover .cmk-blog-more i{transform:translateX(4px);}

/* Featured (first) card: full-width horizontal on desktop */
@media (min-width:768px){
  .cmk-blog-card.is-featured{
    grid-column:1/-1;
    flex-direction:row;
  }
  .cmk-blog-card.is-featured .cmk-blog-card-media{
    flex:0 0 52%;
    aspect-ratio:auto;
    min-height:300px;
  }
  .cmk-blog-card.is-featured .cmk-blog-card-body{
    justify-content:center;
    padding:36px 40px;
  }
  .cmk-blog-card.is-featured h2{font-size:27px;}
  .cmk-blog-card.is-featured p{-webkit-line-clamp:4;font-size:16px;}
}

.cmk-blog-empty{
  text-align:center;
  color:#676879;
  font-size:16px;
  padding:40px 0;
}

/* ── Post page ── */
.cmk-post{padding:150px 0 40px;}
.cmk-post-wrap{max-width:760px;margin:0 auto;}
.cmk-post-back{
  display:inline-flex;
  align-items:center;
  gap:8px;
  color:#676879;
  font-size:14px;
  font-weight:600;
  text-decoration:none;
  transition:color .3s ease;
}
.cmk-post-back:hover{color:#433CE7;}
.cmk-post-wrap>.cmk-blog-meta{display:block;margin:26px 0 0;}
.cmk-post-wrap h1{
  margin:12px 0 26px;
  color:#0D0E10;
  font-size:clamp(28px,4vw,40px);
  font-weight:700;
  letter-spacing:-.02em;
  line-height:1.2;
}
.cmk-post-image{
  border-radius:14px;
  overflow:hidden;
  margin-bottom:36px;
}
.cmk-post-image img{width:100%;height:auto;display:block;}

/* ── Two-column layout: article + sticky sidebar ── */
.cmk-post-layout{
  display:grid;
  grid-template-columns:minmax(0,1fr) 330px;
  gap:60px;
  max-width:1160px;
  margin:0 auto;
  align-items:start;
}
/* Inside the grid the article column fills its track, no longer centred. */
.cmk-post-layout .cmk-post-wrap{max-width:none;margin:0;}
.cmk-post-layout .cmk-post-cta{margin:56px 0 0;}

.cmk-post-side{
  position:sticky;
  top:110px;
  display:flex;
  flex-direction:column;
  gap:22px;
}

/* Sidebar cards */
.cmk-side-card{
  background:#fff;
  border:1px solid rgba(86,95,118,.14);
  border-radius:16px;
  padding:24px;
}
.cmk-side-title{
  margin:0 0 16px;
  color:#0D0E10;
  font-size:15px;
  font-weight:700;
  letter-spacing:.02em;
  text-transform:uppercase;
}

.cmk-side-posts{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:16px;}
.cmk-side-post{display:flex;gap:14px;align-items:center;text-decoration:none;}
.cmk-side-thumb{
  flex:0 0 60px;
  width:60px;height:60px;
  border-radius:10px;
  overflow:hidden;
  background:linear-gradient(135deg,#F0E9FF,#F7F4FF);
}
.cmk-side-thumb img{width:100%;height:100%;object-fit:cover;display:block;}
.cmk-side-thumb-fallback{
  display:flex;align-items:center;justify-content:center;
  width:100%;height:100%;color:#8b7ff0;font-size:18px;
}
.cmk-side-post-text{display:flex;flex-direction:column;gap:4px;min-width:0;}
.cmk-side-post-title{
  color:#0D0E10;
  font-size:14.5px;
  font-weight:600;
  line-height:1.35;
  transition:color .25s ease;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;
}
.cmk-side-post:hover .cmk-side-post-title{color:#433CE7;}
.cmk-side-post-date{color:#8b90a0;font-size:12.5px;}

/* Compact CTA card */
.cmk-side-cta{
  background:linear-gradient(135deg,#433CE7 0%,#5C3EF4 100%);
  border-radius:16px;
  padding:26px 24px;
  text-align:center;
}
.cmk-side-cta h2{color:#fff;font-size:19px;font-weight:700;margin:0 0 8px;}
.cmk-side-cta p{color:rgba(255,255,255,.85);font-size:14px;line-height:1.5;margin:0 0 18px;}
.cmk-side-cta a{
  display:inline-flex;align-items:center;gap:8px;
  padding:12px 22px;border-radius:8px;
  background:#fff;color:#433CE7;
  font-size:14.5px;font-weight:700;text-decoration:none;
  transition:transform .3s ease,box-shadow .3s ease;
}
.cmk-side-cta a:hover{transform:translateY(-2px);box-shadow:0 10px 24px rgba(13,14,16,.2);}

/* Social row */
.cmk-side-social{list-style:none;margin:0;padding:0;display:flex;gap:12px;}
.cmk-side-social a{
  display:flex;align-items:center;justify-content:center;
  width:42px;height:42px;border-radius:10px;
  background:#F7F4FF;color:#433CE7;font-size:16px;
  text-decoration:none;
  transition:background .25s ease,color .25s ease,transform .25s ease;
}
.cmk-side-social a:hover{background:#433CE7;color:#fff;transform:translateY(-2px);}

@media (max-width:991px){
  .cmk-post-layout{grid-template-columns:1fr;gap:48px;max-width:760px;}
  .cmk-post-side{position:static;top:auto;}
}

/* Article typography */
.cmk-prose{color:#3a3f4c;font-size:17px;line-height:1.8;}
.cmk-prose p{margin:0 0 18px;}
.cmk-prose h2,.cmk-prose h3,.cmk-prose h4{
  color:#0D0E10;
  font-weight:700;
  line-height:1.3;
  margin:34px 0 14px;
}
.cmk-prose h2{font-size:26px;}
.cmk-prose h3{font-size:21px;}
.cmk-prose h4{font-size:18px;}
.cmk-prose a{color:#433CE7;text-decoration:underline;text-underline-offset:3px;}
.cmk-prose a:hover{color:#332dbb;}
.cmk-prose img{max-width:100%;height:auto;border-radius:10px;margin:8px 0;}
.cmk-prose iframe{max-width:100%;border-radius:10px;}
.cmk-prose figure{margin:24px 0;}
.cmk-prose figcaption{color:#8b90a0;font-size:13px;margin-top:8px;text-align:center;}
.cmk-prose ul,.cmk-prose ol{margin:0 0 18px;padding-left:24px;}
.cmk-prose li{margin-bottom:8px;}
.cmk-prose blockquote{
  margin:26px 0;
  padding:18px 24px;
  border-left:4px solid #433CE7;
  background:#F7F4FF;
  border-radius:0 10px 10px 0;
  color:#0D0E10;
  font-weight:500;
}
.cmk-prose hr{border:none;border-top:1px solid rgba(86,95,118,.15);margin:32px 0;}

/* Imported WordPress content: responsive embeds, self-hosted video, tables */
.cmk-prose .cmk-embed{
  position:relative;
  margin:26px 0;
  padding-top:56.25%;
  border-radius:10px;
  overflow:hidden;
  background:#0D0E10;
}
.cmk-prose .cmk-embed iframe{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  border:0;
}
.cmk-prose video{
  width:100%;
  height:auto;
  display:block;
  border-radius:10px;
  background:#0D0E10;
}
.cmk-prose .wp-block-table,
.cmk-prose figure:has(> table){overflow-x:auto;margin:26px 0;}
.cmk-prose table{
  width:100%;
  border-collapse:collapse;
  font-size:15px;
  line-height:1.6;
}
.cmk-prose th,
.cmk-prose td{
  border:1px solid rgba(86,95,118,.18);
  padding:10px 14px;
  text-align:left;
  vertical-align:top;
}
.cmk-prose thead th,
.cmk-prose tr:first-child td{background:#F7F4FF;font-weight:700;color:#0D0E10;}
.cmk-prose tbody tr:nth-child(even) td{background:#FBFAFE;}
/* WordPress alignment classes used by imported figures */
.cmk-prose .aligncenter{margin-inline:auto;text-align:center;}
.cmk-prose .alignright{margin-left:auto;text-align:right;}
.cmk-prose .wp-element-caption,
.cmk-prose .wp-block-image figcaption{
  color:#8b90a0;
  font-size:13px;
  margin-top:8px;
  text-align:center;
}

/* Post-footer CTA */
.cmk-post-cta{
  margin:56px 0 90px;
  padding:34px 38px;
  border-radius:16px;
  background:linear-gradient(135deg,#433CE7 0%,#5C3EF4 100%);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  flex-wrap:wrap;
}
.cmk-post-cta h3{color:#fff;font-size:22px;font-weight:700;margin:0 0 6px;}
.cmk-post-cta p{color:rgba(255,255,255,.85);font-size:15px;margin:0;}
.cmk-post-cta a{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:13px 24px;
  border-radius:8px;
  background:#fff;
  color:#433CE7;
  font-size:15px;
  font-weight:700;
  text-decoration:none;
  transition:transform .3s ease,box-shadow .3s ease;
  white-space:nowrap;
}
.cmk-post-cta a:hover{transform:translateY(-2px);box-shadow:0 10px 24px rgba(13,14,16,.18);}

@media (max-width:767px){
  .cmk-blog-hero{padding-top:120px;}
  .cmk-post{padding-top:120px;}
  .cmk-post-cta{padding:26px;}
}

/* ── Loading skeletons ── */
.cmk-skeleton .cmk-blog-card-media{background:linear-gradient(135deg,#F0E9FF,#F7F4FF);}
.cmk-skeleton-line{
  display:block;
  height:13px;
  border-radius:6px;
  margin:10px 0;
  background:linear-gradient(90deg,#EDEAF8 25%,#F7F5FD 50%,#EDEAF8 75%);
  background-size:200% 100%;
  animation:cmk-shimmer 1.4s ease-in-out infinite;
}
.cmk-post-image.cmk-skeleton{
  background:linear-gradient(90deg,#EDEAF8 25%,#F7F5FD 50%,#EDEAF8 75%);
  background-size:200% 100%;
  animation:cmk-shimmer 1.4s ease-in-out infinite;
}
@keyframes cmk-shimmer{from{background-position:200% 0;}to{background-position:-200% 0;}}
