/* ============================================================
   single-post.css - blog post layout for CheapNative4Less.
   Loads on top of pages.css, which supplies .cnl-page,
   .cnl-page-hero, .cnl-prose and .cnl-btn. Everything here is
   scoped under .cnl-post so no other template is affected.
   ============================================================ */

/* ---------------------------------------------- HERO */
.cnl-post .cnl-post-hero{
    padding:34px 0 52px;
    text-align:center;
}
.cnl-post .cnl-post-hero .cnl-container{max-width:860px;}

/* Breadcrumb sits INSIDE the hero and reads light-on-dark, instead of
   being jammed against the sticky header in near-invisible brown. */
.cnl-post .cnl-post-crumbs{
    margin:0 0 26px;
    display:flex;
    justify-content:center;
}
.cnl-post .cnl-post-crumbs .cn4l-crumbs{
    margin:0;
    font-size:13px;
    color:#9ca3af;
}
.cnl-post .cnl-post-crumbs .cn4l-crumbs-list{justify-content:center;}
.cnl-post .cnl-post-crumbs .cn4l-crumbs a{color:#e5e7eb;}
.cnl-post .cnl-post-crumbs .cn4l-crumbs a:hover,
.cnl-post .cnl-post-crumbs .cn4l-crumbs a:focus{color:#fff;text-decoration:underline;}
.cnl-post .cnl-post-crumbs .cn4l-crumbs-sep{color:#6b7280;opacity:1;}
.cnl-post .cnl-post-crumbs .cn4l-crumbs-current{color:#9ca3af;}

.cnl-post .cnl-post-hero h1{
    font-size:clamp(27px,4.4vw,43px);
    letter-spacing:-.01em;
    max-width:17em;
    margin-left:auto;
    margin-right:auto;
}
.cnl-post .cnl-post-standfirst{
    max-width:640px;
    margin:0 auto;
    font-size:17px;
    line-height:1.65;
    color:#d1d5db;
}
.cnl-post .cnl-post-meta{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    justify-content:center;
    gap:7px 11px;
    margin-top:22px;
    font-size:13.5px;
    color:#9ca3af;
}
.cnl-post .cnl-post-meta__dot{
    font-size:0;
    line-height:0;
    display:inline-block;
    width:4px;
    height:4px;
    border-radius:50%;
    background:#9ca3af;
    opacity:.85;
}
.cnl-post .cnl-post-meta time{color:inherit;}

/* ------------------------------------- FEATURED IMAGE */
.cnl-post .cnl-post-figure-wrap{
    background:linear-gradient(180deg,#111827 0%,#111827 50%,#fff 50%,#fff 100%);
}
.cnl-post .cnl-post-figure{
    max-width:880px;
    margin:0 auto;
    padding:0;
    border-radius:16px;
    overflow:hidden;
    box-shadow:0 18px 40px rgba(17,24,39,.18);
    background:#f3f4f6;
}
.cnl-post .cnl-post-figure__img{
    display:block;
    width:100%;
    height:auto;
}
.cnl-post .cnl-post-figure figcaption{
    padding:10px 16px 14px;
    background:#fff;
    color:#6b7280;
    font-size:13.5px;
    text-align:center;
}
.cnl-post .cnl-post-body--after-figure{padding-top:40px;}

/* --------------------------------------------- BODY */
.cnl-post .cnl-post-body{padding-top:52px;padding-bottom:64px;}
.cnl-post .cnl-post-prose{
    max-width:760px;
    margin:0 auto;
    font-size:17px;
    line-height:1.78;
    color:#374151;
    text-align:left;
}
.cnl-post .cnl-post-prose > p:first-of-type{
    font-size:18.5px;
    line-height:1.7;
    color:#1f2937;
}
.cnl-post .cnl-post-prose h2{
    font-size:clamp(21px,2.6vw,27px);
    line-height:1.3;
    margin:44px 0 14px;
    padding-top:6px;
    text-align:left;
}
.cnl-post .cnl-post-prose h3{
    font-size:19px;
    line-height:1.4;
    margin:30px 0 10px;
    text-align:left;
}
.cnl-post .cnl-post-prose > h2:first-child,
.cnl-post .cnl-post-prose > h3:first-child{margin-top:0;}
.cnl-post .cnl-post-prose p{margin:0 0 18px;}
.cnl-post .cnl-post-prose ul,
.cnl-post .cnl-post-prose ol{margin:0 0 22px;padding-left:4px;list-style:none;}
.cnl-post .cnl-post-prose ol{counter-reset:cnlol;}
.cnl-post .cnl-post-prose li{
    position:relative;
    margin:0 0 10px;
    padding-left:28px;
}
.cnl-post .cnl-post-prose ul > li::before{
    content:'';
    position:absolute;
    left:6px;
    top:.62em;
    width:8px;
    height:8px;
    border-radius:50%;
    background:var(--cnl-red,#287c48);
}
.cnl-post .cnl-post-prose ol > li{counter-increment:cnlol;}
.cnl-post .cnl-post-prose ol > li::before{
    content:counter(cnlol);
    position:absolute;
    left:0;
    top:.08em;
    width:21px;
    height:21px;
    border-radius:50%;
    background:rgba(40,124,72,.1);
    color:var(--cnl-red,#287c48);
    font-size:12px;
    font-weight:700;
    line-height:21px;
    text-align:center;
}
.cnl-post .cnl-post-prose blockquote{
    margin:28px 0;
    padding:18px 22px;
    background:#f9fafb;
    border-left:4px solid var(--cnl-red,#287c48);
    border-radius:0 10px 10px 0;
    color:#1f2937;
    font-size:17px;
}
.cnl-post .cnl-post-prose blockquote p:last-child{margin-bottom:0;}
.cnl-post .cnl-post-prose img{
    max-width:100%;
    height:auto;
    border-radius:12px;
    display:block;
}
.cnl-post .cnl-post-prose figure{margin:28px 0;}
.cnl-post .cnl-post-prose hr{
    border:0;
    border-top:1px solid #e5e7eb;
    margin:38px 0;
}

/* Tables: the comparison tables in these guides overflowed on a phone. */
.cnl-post .cnl-post-prose .wp-block-table{
    margin:28px 0;
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
}
.cnl-post .cnl-post-prose table{
    width:100%;
    min-width:560px;
    border-collapse:collapse;
    font-size:15px;
    background:#fff;
    border:1px solid #e5e7eb;
    border-radius:12px;
    overflow:hidden;
}
.cnl-post .cnl-post-prose thead th{
    background:#1f2937;
    color:#fff;
    font-weight:700;
    text-align:left;
}
.cnl-post .cnl-post-prose th,
.cnl-post .cnl-post-prose td{
    padding:12px 14px;
    border-bottom:1px solid #e5e7eb;
    vertical-align:top;
}
.cnl-post .cnl-post-prose tbody tr:nth-child(even){background:#f9fafb;}
.cnl-post .cnl-post-prose tbody tr:last-child td{border-bottom:0;}

/* ----------------------------------------- CTA BAND */
.cnl-post .cnl-post-cta{
    max-width:760px;
    margin:44px auto 0;
    padding:24px 26px;
    background:#f9fafb;
    border:1px solid #e5e7eb;
    border-radius:16px;
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    justify-content:space-between;
    gap:18px;
}
.cnl-post .cnl-post-cta__text{display:flex;flex-direction:column;gap:4px;}
.cnl-post .cnl-post-cta__text strong{color:#1f2937;font-size:17px;}
.cnl-post .cnl-post-cta__text span{color:#6b7280;font-size:14.5px;}

/* ----------------------------------- RELATED POSTS */
.cnl-post .cnl-related{
    max-width:1160px;
    margin:64px auto 0;
    padding-top:44px;
    border-top:1px solid #e5e7eb;
}
.cnl-post .cnl-related__title{
    font-size:clamp(20px,2.4vw,26px);
    font-weight:800;
    color:#1f2937;
    margin:0 0 24px;
}
.cnl-post .cnl-related__grid{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:22px;
}
.cnl-post .cnl-related__card{
    display:flex;
    flex-direction:column;
    background:#fff;
    border:1px solid #e5e7eb;
    border-radius:14px;
    overflow:hidden;
    text-decoration:none;
    transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease;
}
.cnl-post .cnl-related__card:hover{
    transform:translateY(-4px);
    box-shadow:0 12px 28px rgba(17,24,39,.12);
    border-color:var(--cnl-red,#287c48);
}
.cnl-post .cnl-related__img{
    display:block;
    aspect-ratio:16/9;
    background-size:cover;
    background-position:center;
    background-color:#e5e7eb;
}
.cnl-post .cnl-related__img--blank{
    background:linear-gradient(135deg,#1f2937 0%,#111827 100%);
}
.cnl-post .cnl-related__body{
    display:flex;
    flex-direction:column;
    gap:7px;
    padding:18px 20px 22px;
}
.cnl-post .cnl-related__cat{
    font-size:11px;
    font-weight:700;
    letter-spacing:.07em;
    text-transform:uppercase;
    color:var(--cnl-red,#287c48);
}
.cnl-post .cnl-related__name{
    font-size:16px;
    font-weight:700;
    line-height:1.4;
    color:#1f2937;
}
.cnl-post .cnl-related__meta{font-size:13px;color:#6b7280;}

/* -------------------------------------- COMMENTS */
.cnl-post .cnl-post-comments{
    max-width:760px;
    margin:56px auto 0;
    padding-top:40px;
    border-top:1px solid #e5e7eb;
}
.cnl-post .cnl-post-comments .comment-reply-title{
    font-size:21px;
    font-weight:800;
    color:#1f2937;
    margin:0 0 8px;
}
.cnl-post .cnl-post-comments .comment-notes,
.cnl-post .cnl-post-comments .comment-form-cookies-consent label{
    font-size:14px;
    color:#6b7280;
}
.cnl-post .cnl-post-comments input[type=text],
.cnl-post .cnl-post-comments input[type=email],
.cnl-post .cnl-post-comments input[type=url],
.cnl-post .cnl-post-comments textarea{
    width:100%;
    font-size:16px;
    padding:11px 13px;
    border:1px solid #e5e7eb;
    border-radius:10px;
    background:#fff;
    color:#374151;
}
.cnl-post .cnl-post-comments textarea{min-height:140px;}
.cnl-post .cnl-post-comments .submit{
    background:var(--cnl-red,#287c48);
    color:#fff;
    font-weight:700;
    border:0;
    padding:13px 28px;
    border-radius:10px;
    cursor:pointer;
    font-size:16px;
}
.cnl-post .cnl-post-comments .submit:hover{background:#1e5e36;}

/* ------------------------------------- RESPONSIVE */
@media (max-width:900px){
    .cnl-post .cnl-related__grid{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media (max-width:640px){
    .cnl-post .cnl-post-hero{padding:22px 0 40px;}
    .cnl-post .cnl-post-crumbs{margin-bottom:20px;}
    .cnl-post .cnl-post-hero h1{max-width:none;}
    .cnl-post .cnl-post-standfirst{font-size:16px;}
    .cnl-post .cnl-post-meta{gap:8px;font-size:13px;}
    .cnl-post .cnl-post-figure{border-radius:12px;}
    .cnl-post .cnl-post-body{padding-top:36px;padding-bottom:48px;}
    .cnl-post .cnl-post-prose{font-size:16.5px;}
    .cnl-post .cnl-post-prose > p:first-of-type{font-size:17.5px;}
    .cnl-post .cnl-post-cta{flex-direction:column;align-items:flex-start;padding:22px;}
    .cnl-post .cnl-related{margin-top:48px;padding-top:34px;}
    .cnl-post .cnl-related__grid{grid-template-columns:minmax(0,1fr);}
}
