/*
Theme Name: Blocksy — Premium Editorial
Template: blocksy
Description: Child theme of Blocksy that redesigns the single-post (article) template for a clean, modern, premium editorial look. Adds reading time, breadcrumb, share links and related articles, and hides category labels site-wide. Does not modify post content, URLs, slugs or SEO metadata.
Author: Plus TV
Version: 1.0.2
Text Domain: blocksy-premium-editorial
*/

/* =========================================================================
   Blocksy — Premium Editorial child theme
   All rules are scoped to the blog/article experience so the rest of the
   site (built with Elementor) is left untouched.
   ========================================================================= */

:root{
  --ptv-ink:#141416;
  --ptv-ink-soft:#4b4e57;
  --ptv-ink-faint:#8a8d97;
  --ptv-line:#e9e9ec;
  --ptv-bg-soft:#f7f7f9;
  --ptv-brand:#e0202c;
  --ptv-brand-dark:#b3161f;
  --ptv-radius:16px;
  --ptv-maxw-article:720px;
  --ptv-maxw-wide:1040px;
}

/* -------------------------------------------------------------------------
   1) Hide category labels everywhere they can appear (archive/blog cards,
      any theme meta) — the taxonomy assignment itself is untouched, this is
      purely a visual removal of the badge/link.
   ------------------------------------------------------------------------- */
.entry-meta .category,
.entry-meta .cats-links,
.entry-taxonomies,
.premium-blog-post-categories,
.elementor-post-info__item--type-terms,
span.posted-in,
.ct-meta-element.category,
.meta-categories { display:none !important; }

/* Blog listing cards (Premium Blog widget): hide the whole meta line
   (category + separators + comment count) for a fully clean card —
   image, title and excerpt only. */
.premium-blog-entry-meta { display:none !important; }

/* Single post: hide the theme's native meta bar (author / date / category)
   entirely — the redesigned template prints its own clean byline (author +
   reading time, no category, no date) just above the article body instead,
   so this avoids a duplicated / cluttered meta line. */
body.single-post .entry-meta { display:none !important; }

/* Single post: hide the native WordPress comments section (form + list)
   for a cleaner, distraction-free article. Does not affect comment data,
   only whether it is displayed. */
body.single-post .ct-comments { display:none !important; }

/* -------------------------------------------------------------------------
   2) Breadcrumb bar (injected via wp_body_open on single posts only)
   ------------------------------------------------------------------------- */
.ptv-breadcrumb{
  border-bottom:1px solid var(--ptv-line);
  background:#fff;
}
.ptv-breadcrumb__inner{
  max-width:var(--ptv-maxw-article);margin:0 auto;padding:14px 24px;
  font-size:13px;color:var(--ptv-ink-faint);
  display:flex;gap:6px;align-items:center;flex-wrap:wrap;
  font-family:inherit;
}
.ptv-breadcrumb a{color:var(--ptv-ink-faint);text-decoration:none;}
.ptv-breadcrumb a:hover{color:var(--ptv-brand);}
.ptv-breadcrumb .sep{opacity:.5;}
.ptv-breadcrumb .current{color:var(--ptv-ink-soft);}

/* -------------------------------------------------------------------------
   3) Article header / title
   ------------------------------------------------------------------------- */
body.single-post .page-title{
  max-width:var(--ptv-maxw-article);
  margin-left:auto;margin-right:auto;
  letter-spacing:-.02em;
  line-height:1.15;
}

/* -------------------------------------------------------------------------
   4) Featured image
   ------------------------------------------------------------------------- */
body.single-post article > figure.ct-featured-image{
  max-width:var(--ptv-maxw-wide);
  margin:28px auto 0;
  padding:0 24px;
}
body.single-post article > figure.ct-featured-image .ct-image-container,
body.single-post article > figure.ct-featured-image a,
body.single-post article > figure.ct-featured-image img{
  border-radius:var(--ptv-radius);
  overflow:hidden;
  width:100%;
}
body.single-post article > figure.ct-featured-image img{
  aspect-ratio:16/8;
  object-fit:cover;
  box-shadow:0 20px 40px -20px rgba(20,20,22,.25);
}

/* -------------------------------------------------------------------------
   5) Content column — width, typography, spacing, hierarchy
   ------------------------------------------------------------------------- */
body.single-post .entry-content{
  max-width:var(--ptv-maxw-article);
  margin-left:auto;margin-right:auto;
  font-size:18px;
  line-height:1.8;
  color:var(--ptv-ink-soft);
}
body.single-post .entry-content > *:first-child{margin-top:0;}
body.single-post .entry-content p{margin:0 0 24px;}
body.single-post .entry-content h1,
body.single-post .entry-content h2,
body.single-post .entry-content h3,
body.single-post .entry-content h4{
  color:var(--ptv-ink);
  font-weight:750;
  letter-spacing:-.01em;
  line-height:1.3;
}
/* neutralize an in-content H1 so it never competes with the real page title */
body.single-post .entry-content h1{ font-size:24px; margin:44px 0 16px; }
body.single-post .entry-content h2{
  font-size:28px; margin:52px 0 18px; padding-top:28px;
  border-top:1px solid var(--ptv-line);
}
body.single-post .entry-content > h2:first-of-type,
body.single-post .entry-content > *:first-child h2{ border-top:none; padding-top:0; }
body.single-post .entry-content h3{ font-size:21px; margin:34px 0 12px; }
body.single-post .entry-content h4{ font-size:18px; margin:26px 0 10px; }
body.single-post .entry-content ul,
body.single-post .entry-content ol{ margin:0 0 24px; padding-left:1.3em; }
body.single-post .entry-content li{ margin:0 0 10px; }
body.single-post .entry-content ul:not([class]) li::marker{ color:var(--ptv-brand); }
body.single-post .entry-content a:not(.wp-block-button__link){
  color:var(--ptv-brand-dark);
  text-decoration:underline;
  text-decoration-color:rgba(224,32,44,.35);
  text-underline-offset:3px;
}
body.single-post .entry-content a:not(.wp-block-button__link):hover{
  text-decoration-color:var(--ptv-brand-dark);
}
body.single-post .entry-content blockquote{
  margin:32px 0; padding:4px 0 4px 22px; border-left:3px solid var(--ptv-brand);
  font-size:19px; font-style:italic; color:var(--ptv-ink);
}
body.single-post .entry-content img{ border-radius:12px; margin:8px 0 28px; height:auto; }
body.single-post .entry-content figure{ margin:32px 0; }
body.single-post .entry-content figcaption{ font-size:13px; color:var(--ptv-ink-faint); text-align:center; margin-top:10px; }
body.single-post .entry-content pre,
body.single-post .entry-content code{ background:var(--ptv-bg-soft); border-radius:8px; font-size:14.5px; }
body.single-post .entry-content pre{ padding:18px; overflow-x:auto; }
body.single-post .entry-content hr{ border:none; border-top:1px solid var(--ptv-line); margin:44px 0; }

/* -------------------------------------------------------------------------
   6) Buttons inside article content
   ------------------------------------------------------------------------- */
body.single-post .entry-content .wp-block-button__link,
body.single-post .entry-content a.button{
  display:inline-block; background:var(--ptv-brand); color:#fff !important;
  font-weight:700; padding:14px 30px; border-radius:999px; text-decoration:none !important;
  box-shadow:0 10px 24px -10px rgba(224,32,44,.6);
  transition:transform .15s ease, box-shadow .15s ease, background .15s ease;
}
body.single-post .entry-content .wp-block-button__link:hover,
body.single-post .entry-content a.button:hover{
  background:var(--ptv-brand-dark); transform:translateY(-2px);
  box-shadow:0 14px 28px -10px rgba(224,32,44,.7);
}

/* -------------------------------------------------------------------------
   7) Meta row (author / date / reading time)
   ------------------------------------------------------------------------- */
.ptv-meta-row{
  display:flex; flex-wrap:wrap; align-items:center; gap:14px;
  font-size:14px; color:var(--ptv-ink-faint);
  margin:0 0 28px;
}
.ptv-author{ display:flex; align-items:center; gap:8px; color:var(--ptv-ink-soft); font-weight:600; }
.ptv-avatar{ display:inline-flex; border-radius:50%; overflow:hidden; line-height:0; }
.ptv-avatar img{ border-radius:50%; display:block; }
.ptv-dot{ font-size:10px; color:var(--ptv-ink-faint); }

/* -------------------------------------------------------------------------
   8) Share row
   ------------------------------------------------------------------------- */
.ptv-share-row{
  max-width:var(--ptv-maxw-article); margin:44px auto 0 !important; padding:22px 0;
  border-top:1px solid var(--ptv-line); border-bottom:1px solid var(--ptv-line);
  display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:16px;
}
.ptv-share-label{ font-size:13px; font-weight:700; letter-spacing:.04em; text-transform:uppercase; color:var(--ptv-ink-faint); }
.ptv-share-icons{ display:flex; gap:10px; }
.ptv-share-icons a{
  width:38px; height:38px; border-radius:50%; background:var(--ptv-bg-soft);
  display:flex; align-items:center; justify-content:center; font-size:14px; font-weight:700; color:var(--ptv-ink-soft);
  text-decoration:none !important; transition:background .15s, color .15s;
}
.ptv-share-icons a:hover{ background:var(--ptv-brand); color:#fff; }

/* -------------------------------------------------------------------------
   9) Related articles
   ------------------------------------------------------------------------- */
.ptv-related{
  margin:56px 0 0 !important; padding:0;
}
.ptv-related h2{
  font-size:24px; font-weight:800; margin:0 0 24px !important; padding-top:0 !important; border-top:none !important;
  letter-spacing:-.01em;
}
.ptv-related-grid{ display:grid; grid-template-columns:repeat(2,1fr); gap:20px; }
.ptv-card{
  display:block; border-radius:14px; overflow:hidden; background:#fff; border:1px solid var(--ptv-line);
  text-decoration:none !important; color:inherit;
  transition:transform .18s ease, box-shadow .18s ease;
}
.ptv-card:hover{ transform:translateY(-4px); box-shadow:0 18px 34px -18px rgba(20,20,22,.28); }
.ptv-card-thumb{ aspect-ratio:16/10; background:var(--ptv-bg-soft); overflow:hidden; }
.ptv-card-thumb img{ width:100%; height:100%; object-fit:cover; display:block; margin:0; border-radius:0; }
.ptv-card-body{ padding:16px 18px 20px; }
.ptv-card-date{ font-size:12px; color:var(--ptv-ink-faint); margin-bottom:8px; }
.ptv-related h3{ font-size:16.5px; line-height:1.4; margin:0 !important; font-weight:700; padding-top:0 !important; border-top:none !important; }

/* -------------------------------------------------------------------------
   10) Responsive — tablet & mobile
   ------------------------------------------------------------------------- */
@media (max-width:900px){
  .ptv-related-grid{ grid-template-columns:repeat(2,1fr); }
}
@media (max-width:640px){
  .ptv-breadcrumb__inner{ padding:12px 18px; }
  body.single-post .page-title{ padding:0 18px; font-size:28px !important; }
  body.single-post article > figure.ct-featured-image{ padding:0 12px; }
  body.single-post article > figure.ct-featured-image img{ aspect-ratio:16/11; border-radius:12px; }
  body.single-post .entry-content{ font-size:16.5px; padding-left:18px; padding-right:18px; }
  body.single-post .entry-content h2{ font-size:23px; }
  body.single-post .entry-content h3{ font-size:19px; }
  .ptv-meta-row{ padding-left:18px; padding-right:18px; }
  .ptv-share-row{ flex-direction:column; align-items:flex-start; padding-left:18px; padding-right:18px; }
  .ptv-related{ padding-left:18px; padding-right:18px; }
  .ptv-related-grid{ grid-template-columns:1fr; }
}
