/*
Theme Name: WebCraft Masters Astra Child
Theme URI: https://webcraftmasters.eu/
Description: Astra child theme for WebCraft Masters. Adds a custom global single-post template matching the visual language used on the Products page.
Author: WebCraft Masters
Author URI: https://webcraftmasters.eu/
Template: astra
Version: 1.0.0
Text Domain: webcraft-astra-child
*/

/* ==========================================================================
   WebCraft Masters — global single-post design
   Scoped under .wcm-post-page so normal Astra/Elementor pages are untouched.
   ========================================================================== */

:root{
  --wcm-ink:#08111f;
  --wcm-paper:#f7f8fb;
  --wcm-paper2:#eef2f7;
  --wcm-blue:#3157ff;
  --wcm-cyan:#42d7ff;
  --wcm-lime:#c9ff4a;
  --wcm-muted:#667085;
  --wcm-line:#d8deea;
  --wcm-white:#fff;
  --wcm-dark:#07111f;
}

body.single-post{
  margin:0;
  background:var(--wcm-paper);
}

body.single-post #page,
body.single-post .site{
  margin:0;
  padding:0;
  max-width:none;
  background:transparent;
}

.wcm-post-page,
.wcm-post-page *{
  box-sizing:border-box;
}

.wcm-post-page{
  min-height:100vh;
  font-family:Inter,Arial,sans-serif;
  background:var(--wcm-paper);
  color:var(--wcm-ink);
  overflow:hidden;
}

.wcm-post-page a{
  color:inherit;
}

.wcm-shell{
  width:min(1180px,calc(100% - 48px));
  margin:0 auto;
}

/* Header copied from the Products page visual system */
.wcm-nav{
  position:sticky;
  top:0;
  z-index:999;
  background:rgba(247,248,251,.92);
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
  border-bottom:1px solid rgba(8,17,31,.08);
}

.admin-bar .wcm-nav{
  top:32px;
}

.wcm-navin{
  height:78px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:28px;
}

.wcm-brand{
  font-size:17px;
  font-weight:800;
  letter-spacing:-.04em;
  text-decoration:none;
  color:var(--wcm-ink);
  white-space:nowrap;
}

.wcm-menu{
  display:flex;
  align-items:center;
  gap:24px;
  font-size:13px;
  font-weight:650;
}

.wcm-menu a{
  text-decoration:none;
  color:var(--wcm-ink);
  opacity:.72;
  transition:opacity .2s ease;
}

.wcm-menu a:hover,
.wcm-menu a:focus{
  opacity:1;
}

.wcm-cta{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:13px 18px;
  border-radius:999px;
  background:var(--wcm-ink);
  color:#fff !important;
  text-decoration:none;
  font-size:13px;
  font-weight:760;
  white-space:nowrap;
}

/* Article hero */
.wcm-post-hero{
  position:relative;
  padding:88px 0 64px;
  background:var(--wcm-paper);
}

.wcm-post-hero:before{
  content:"";
  position:absolute;
  width:520px;
  height:520px;
  right:-100px;
  top:-190px;
  border-radius:50%;
  background:radial-gradient(circle,var(--wcm-cyan) 0%,rgba(66,215,255,.18) 38%,rgba(66,215,255,0) 72%);
  pointer-events:none;
}

.wcm-post-hero-inner{
  position:relative;
  max-width:920px;
}

.wcm-post-kicker{
  display:inline-flex;
  align-items:center;
  gap:10px;
  margin:0 0 24px;
  font-size:12px;
  font-weight:780;
  letter-spacing:.16em;
  text-transform:uppercase;
  color:var(--wcm-blue);
}

.wcm-post-kicker:before{
  content:"";
  width:34px;
  height:2px;
  background:var(--wcm-blue);
}

.wcm-post-title{
  max-width:1020px;
  margin:0;
  color:var(--wcm-ink);
  font-size:clamp(44px,5.4vw,76px);
  line-height:.98;
  letter-spacing:-.055em;
  font-weight:760;
}

.wcm-post-deck{
  max-width:780px;
  margin:24px 0 0;
  color:#4e596b;
  font-size:19px;
  line-height:1.65;
}

.wcm-post-meta{
  display:flex;
  flex-wrap:wrap;
  gap:10px 18px;
  align-items:center;
  margin-top:30px;
  color:var(--wcm-muted);
  font-size:13px;
}

.wcm-post-meta span{
  display:inline-flex;
  align-items:center;
  gap:8px;
}

.wcm-post-meta span + span:before{
  content:"";
  width:4px;
  height:4px;
  border-radius:50%;
  background:#b7c0cf;
  margin-right:10px;
}

/* Featured image */
.wcm-featured{
  width:min(1180px,calc(100% - 48px));
  margin:0 auto 0;
}

.wcm-featured img{
  display:block;
  width:100%;
  max-height:620px;
  object-fit:cover;
  border-radius:30px;
  box-shadow:0 28px 70px rgba(22,46,86,.16);
}

/* Main article */
.wcm-article-wrap{
  padding:72px 0 105px;
  background:#fff;
  border-top:1px solid var(--wcm-line);
}

.wcm-article-grid{
  width:min(1180px,calc(100% - 48px));
  margin:0 auto;
  display:grid;
  grid-template-columns:minmax(0,780px) minmax(220px,1fr);
  gap:76px;
  align-items:start;
  justify-content:center;
}

.wcm-article{
  min-width:0;
  color:#344054;
  font-size:18px;
  line-height:1.78;
}

.wcm-article > *:first-child{
  margin-top:0 !important;
}

.wcm-article p{
  margin:0 0 1.35em;
}

.wcm-article h2,
.wcm-article h3,
.wcm-article h4{
  color:var(--wcm-ink);
  font-weight:760;
  letter-spacing:-.035em;
  scroll-margin-top:110px;
}

.wcm-article h2{
  margin:2.05em 0 .7em;
  font-size:34px;
  line-height:1.15;
}

.wcm-article h3{
  margin:1.75em 0 .6em;
  font-size:25px;
  line-height:1.25;
}

.wcm-article h4{
  margin:1.55em 0 .55em;
  font-size:20px;
  line-height:1.3;
}

.wcm-article a{
  color:var(--wcm-blue);
  text-decoration-thickness:1px;
  text-underline-offset:3px;
}

.wcm-article a:hover{
  text-decoration-thickness:2px;
}

.wcm-article strong{
  color:#182230;
}

.wcm-article ul,
.wcm-article ol{
  margin:0 0 1.5em 1.25em;
  padding:0;
}

.wcm-article li{
  margin:.45em 0;
  padding-left:.25em;
}

.wcm-article blockquote{
  margin:2em 0;
  padding:22px 26px;
  border:1px solid #dfe5ef;
  border-left:4px solid var(--wcm-blue);
  border-radius:0 16px 16px 0;
  background:#f8faff;
  color:#41506a;
}

.wcm-article pre{
  overflow:auto;
  margin:2em 0;
  padding:22px;
  border-radius:16px;
  background:#07111f;
  color:#dce5f3;
  font-size:14px;
  line-height:1.65;
}

.wcm-article code{
  padding:.12em .35em;
  border-radius:5px;
  background:#eef2f7;
  color:#172b4d;
  font-size:.9em;
}

.wcm-article pre code{
  padding:0;
  background:transparent;
  color:inherit;
}

.wcm-article img{
  max-width:100%;
  height:auto;
  border-radius:18px;
}

.wcm-article figure{
  margin:2em 0;
}

.wcm-article figcaption{
  margin-top:10px;
  color:var(--wcm-muted);
  font-size:13px;
  text-align:center;
}

.wcm-article table{
  width:100%;
  margin:2em 0;
  border-collapse:collapse;
  border:1px solid var(--wcm-line);
  background:#fff;
  font-size:15px;
}

.wcm-article th,
.wcm-article td{
  padding:13px 15px;
  border:1px solid var(--wcm-line);
  text-align:left;
  vertical-align:top;
}

.wcm-article th{
  background:#f3f6fa;
  color:var(--wcm-ink);
}

/* Gutenberg buttons */
.wcm-article .wp-block-button__link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:12px;
  background:var(--wcm-blue);
  color:#fff;
  padding:14px 19px;
  text-decoration:none;
  font-size:14px;
  font-weight:760;
}

/* Sidebar / TOC */
.wcm-article-aside{
  position:sticky;
  top:110px;
  padding:22px;
  border:1px solid #e1e6ef;
  border-radius:20px;
  background:#f8fafc;
}

.admin-bar .wcm-article-aside{
  top:142px;
}

.wcm-article-aside-title{
  margin:0 0 14px;
  color:var(--wcm-ink);
  font-size:12px;
  font-weight:800;
  letter-spacing:.14em;
  text-transform:uppercase;
}

.wcm-toc{
  display:grid;
  gap:7px;
}

.wcm-toc a{
  display:block;
  padding:6px 0;
  color:#5f6b7d;
  text-decoration:none;
  font-size:13px;
  line-height:1.4;
}

.wcm-toc a:hover{
  color:var(--wcm-blue);
}

.wcm-toc a[data-level="3"]{
  padding-left:14px;
  font-size:12px;
}

.wcm-aside-cta{
  margin-top:20px;
  padding-top:18px;
  border-top:1px solid var(--wcm-line);
}

.wcm-aside-cta p{
  margin:0 0 12px;
  color:#667085;
  font-size:12px;
  line-height:1.55;
}

.wcm-aside-cta a{
  display:inline-flex;
  padding:10px 13px;
  border-radius:10px;
  background:var(--wcm-ink);
  color:#fff;
  text-decoration:none;
  font-size:12px;
  font-weight:760;
}

/* Article footer CTA */
.wcm-post-cta{
  padding:84px 0;
  background:linear-gradient(115deg,#3157ff,#6a4dff 65%,#8b5dff);
  color:#fff;
}

.wcm-post-cta-grid{
  width:min(1180px,calc(100% - 48px));
  margin:0 auto;
  display:grid;
  grid-template-columns:1fr auto;
  gap:34px;
  align-items:end;
}

.wcm-post-cta h2{
  max-width:780px;
  margin:0;
  color:#fff;
  font-size:clamp(38px,4vw,60px);
  line-height:.98;
  letter-spacing:-.05em;
}

.wcm-post-cta p{
  max-width:650px;
  margin:18px 0 0;
  color:#dfe5ff;
  font-size:17px;
  line-height:1.6;
}

.wcm-post-cta .wcm-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:15px 20px;
  border:1px solid #fff;
  border-radius:12px;
  background:#fff;
  color:var(--wcm-ink);
  text-decoration:none;
  font-size:13px;
  font-weight:760;
}

/* Footer copied from the Products page visual system */
.wcm-footer{
  padding:60px 0 34px;
  background:var(--wcm-dark);
  color:#fff;
}

.wcm-footgrid{
  display:grid;
  grid-template-columns:1.2fr 1fr 1fr;
  gap:42px;
  align-items:start;
}

.wcm-footer .wcm-brand{
  color:#fff;
}

.wcm-footcol h4{
  margin:0 0 14px;
  color:#aab6c8;
  font-size:13px;
  text-transform:uppercase;
  letter-spacing:.12em;
}

.wcm-footcol p,
.wcm-footcol a{
  color:#d9e0ea;
  font-size:13px;
  line-height:1.8;
  text-decoration:none;
}

.wcm-footlegal{
  display:flex;
  justify-content:space-between;
  gap:24px;
  flex-wrap:wrap;
  margin-top:34px;
  padding-top:24px;
  border-top:1px solid rgba(255,255,255,.1);
}

.wcm-footlegal small{
  color:#91a0b7;
  line-height:1.7;
}

/* Prevent legacy theme extras from leaking into our custom single template */
.wcm-post-page .comments-area,
.wcm-post-page .post-navigation,
.wcm-post-page .entry-meta,
.wcm-post-page .entry-header,
.wcm-post-page .ast-single-post-order{
  display:none !important;
}

@media(max-width:980px){
  .wcm-menu{
    display:none;
  }

  .wcm-article-grid{
    grid-template-columns:1fr;
    gap:38px;
  }

  .wcm-article-aside{
    position:static;
    order:-1;
  }

  .wcm-post-cta-grid,
  .wcm-footgrid{
    grid-template-columns:1fr;
  }
}

@media(max-width:782px){
  .admin-bar .wcm-nav{
    top:46px;
  }
}

@media(max-width:600px){
  .wcm-shell,
  .wcm-featured,
  .wcm-article-grid,
  .wcm-post-cta-grid{
    width:min(100% - 28px,1180px);
  }

  .wcm-navin{
    height:66px;
  }

  .wcm-brand{
    font-size:15px;
  }

  .wcm-cta{
    padding:10px 13px;
    font-size:12px;
  }

  .wcm-post-hero{
    padding:60px 0 46px;
  }

  .wcm-post-title{
    font-size:42px;
  }

  .wcm-post-deck{
    font-size:17px;
  }

  .wcm-post-meta{
    gap:8px 12px;
  }

  .wcm-post-meta span + span:before{
    display:none;
  }

  .wcm-featured img{
    border-radius:20px;
  }

  .wcm-article-wrap{
    padding:50px 0 76px;
  }

  .wcm-article{
    font-size:17px;
    line-height:1.72;
  }

  .wcm-article h2{
    font-size:29px;
  }

  .wcm-article h3{
    font-size:23px;
  }

  .wcm-post-cta{
    padding:66px 0;
  }

  .wcm-footer{
    padding-top:50px;
  }
}
