:root{
    --orange:#ff6a00;
    --bg:#08080e;
    --card:#0d0d1a;
    --border:rgba(255,255,255,.08);
}

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

body{
    background:var(--bg);
    color:#fff;
    font-family:'DM Sans',sans-serif;
}


/* FAQ */

.faq-title{
    margin-top:50px;
    margin-bottom:20px;
}

.faq-item{
    margin-bottom:12px;
    background:#121228;
    border-radius:12px;
    overflow:hidden;
}

.faq-header{
    padding:18px;
    cursor:pointer;
    color:var(--orange);
    font-weight:600;
    display:flex;
    justify-content:space-between;
    align-items:center;
}

.faq-answer{
    display:none;
    padding:0 18px 18px;
    color:#ccc;
}

/* ===================================================================
   GrowthAstra — Single Post (v2)
   No new fonts loaded here — inherits whatever the header CSS sets.
   Accent gradient below approximates the site's real header gradient
   (orange → pink → violet). Tweak the three hex values if you want
   an exact match to your brand kit.
=================================================================== */
.ga-post{
    --g1: #ff7a1a;   /* orange  */
    --g2: #ef3d78;   /* pink    */
    --g3: #7b2ff7;   /* violet  */
    --grad: linear-gradient(90deg, var(--g1), var(--g2), var(--g3));

    --ink:         #10121a;
    --card:        #171a24;
    --card-soft:   #1c202c;
    --line:        rgba(255,255,255,.09);
    --line-soft:   rgba(255,255,255,.05);
    --text-dim:    rgba(255,255,255,.66);
    --text-faint:  rgba(255,255,255,.42);
    --radius-lg:   24px;
    --radius-md:   16px;
    --radius-sm:   10px;
}

/* ---------- Reading progress ---------- */
.ga-progress{
    position: fixed;
    top: 0; left: 0;
    height: 3px;
    width: 0%;
    background: var(--grad);
    z-index: 999;
    transition: width .12s linear;
}

/* ---------- Hero ---------- */
.hero{
    min-height: 580px;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: left;
    padding: 120px 0 60px;
}

.hero-bg{
    position: absolute;
    inset: 0;
    background: url('<?php echo (strpos($blog['cover_image'], '/') !== 0 ? '/' : '') . htmlspecialchars($blog['cover_image']); ?>')
    center center / cover no-repeat;
    filter: blur(26px) brightness(.3) saturate(1.15);
    transform: scale(1.14);
}

.hero::after{
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(55% 45% at 20% 100%, rgba(239,61,120,.28), transparent 70%),
        radial-gradient(45% 40% at 90% 0%, rgba(123,47,247,.22), transparent 65%),
        radial-gradient(60% 55% at 50% 100%, rgba(0,0,0,.7), transparent 70%),
        linear-gradient(180deg, rgba(0,0,0,.3) 0%, rgba(0,0,0,.15) 40%, rgba(0,0,0,.88) 100%);
    pointer-events: none;
}

.hero-flex{
    position: relative;
    z-index: 2;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 48px;
}

.hero-text{
    flex: 1 1 auto;
    max-width: 620px;
}

.hero-visual{
    flex: 0 0 300px;
    display: flex;
    justify-content: center;
}

.hero-visual img{
       width: 362%;
    max-width: 542px;
    aspect-ratio: 8 / 5;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, .14);
    box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .65);
    transform: rotate(3deg);
    height: 368px; }
    
@media (max-width: 900px){
    .hero-visual{ display: none; }
    .hero-flex{ flex-direction: column; align-items: flex-start; }
}

.hero-eyebrow{
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: .72rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    font-weight: 700;
    color: #fff;
    background: var(--grad);
    padding: 7px 16px;
    border-radius: 999px;
    margin-bottom: 22px;
}

.hero h1{
    font-size: clamp(2rem, 4.4vw, 3.5rem);
    line-height: 1.14;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #fff;
    margin: 0 0 22px;
    max-width: 17ch;
}

.hero-meta{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 22px;
    color: var(--text-dim);
    font-size: .92rem;
}

.hero-meta span{
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.hero-meta i{ color: var(--g1); }

.hero-meta .dot{
    width: 4px; height: 4px;
    border-radius: 50%;
    background: var(--text-faint);
}

/* ---------- Layout ---------- */
.blog-wrapper{
    max-width: 1200px;
    margin: -46px auto 0;
    padding: 0 24px 100px;
    position: relative;
    z-index: 3;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 40px;
    align-items: start;
}

@media (max-width: 960px){
    .blog-wrapper{ grid-template-columns: 1fr; }
    .sidebar{ position: static !important; }
}

/* ---------- Article card ---------- */
.article-card{
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: clamp(22px, 4vw, 56px);
    box-shadow: 0 30px 60px -30px rgba(0,0,0,.5);
    min-width: 0;
    overflow: hidden;
}

.article-card > :first-child{ margin-top: 0; }

/* Clearfix + hard reset for pasted / WYSIWYG content so it can't
   leave stray inline widths/floats that create empty space */
.article-card::after{ content:""; display:block; clear:both; }

.article-card,
.article-card *{
    box-sizing: border-box;
}

/* Everything the CMS/editor injects lives in .cms-content, kept
   separate from the FAQ block below so resets never fight with it */
.cms-content [style*="width"]{
    width: auto !important;
    max-width: 100% !important;
}

.cms-content [style*="float"]{
    float: none !important;
}

.cms-content [style*="height"]{
    height: auto !important;
}

.cms-content div,
.cms-content section,
.cms-content table{
    max-width: 100% !important;
}

.cms-content table{
    width: 100% !important;
    border-collapse: collapse;
}

.cms-content table td,
.cms-content table th{
    border: 1px solid var(--line);
    padding: 10px 14px;
    color: var(--text-dim);
}

/* Kill stray spacer line-breaks left by the WYSIWYG editor — real
   paragraph/heading spacing already comes from margins below */
.cms-content br{ display: none; }

/* Prose typography for CMS-rendered content */
.cms-content h2{
    font-size: clamp(1.35rem, 2.4vw, 1.8rem);
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #fff;
    margin: 1.6em 0 .6em;
    scroll-margin-top: 90px;
}

.cms-content h3{
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    font-weight: 700;
    color: #fff;
    margin: 1.4em 0 .5em;
}

.cms-content p{
    color: var(--text-dim);
    font-size: 1.05rem;
    line-height: 1.85;
    margin: 0 0 1em;
}

.cms-content ul,
.cms-content ol{
    color: var(--text-dim);
    line-height: 1.85;
    margin: 0 0 1em;
    padding-left: 1.3em;
}

.cms-content li{ margin-bottom: .4em; }
.cms-content li::marker{ color: var(--g2); }

.cms-content a{
    color: var(--g1);
    text-decoration: underline;
    text-decoration-color: rgba(255,122,26,.4);
    text-underline-offset: 3px;
}

.cms-content img{
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
    margin: 1.3em 0;
}

.cms-content blockquote{
    margin: 1.4em 0;
    padding: 18px 24px;
    border-left: 3px solid;
    border-image: var(--grad) 1;
    background: var(--card-soft);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: #fff;
    font-size: 1.08rem;
    font-style: italic;
}

.cms-content code{
    background: var(--card-soft);
    border: 1px solid var(--line);
    padding: 2px 7px;
    border-radius: 6px;
    font-size: .9em;
    color: var(--g1);
}

.cms-content hr{
    border: none;
    border-top: 1px solid var(--line);
    margin: 1.8em 0;
}



/* ---------- Sidebar ---------- */
.sidebar{
    display: flex;
    flex-direction: column;
    gap: 22px;
    position: sticky;
    top: 24px;
}

.sidebar-card{
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 26px;
}

.sidebar-brand{ text-align: center; }

.sidebar-brand a.logo{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 14px;
    text-decoration: none;
}

.sidebar-brand .logo-icon{
    width: 40px; height: 40px;
    background: var(--grad);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-weight: 800;
    font-size: 18px;
}

.sidebar-brand .logo-text{
    font-weight: 800;
    font-size: 1.25rem;
    color: #fff;
    letter-spacing: -0.01em;
}

.sidebar-brand .logo-text span{ color: var(--g1); }

.sidebar-brand p{
    font-size: .88rem;
    color: var(--text-faint);
    line-height: 1.6;
    margin: 0 auto;
    max-width: 30ch;
}

.sidebar-socials{
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 18px;
}

.sidebar-socials a{
    width: 36px; height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--card-soft);
    border: 1px solid var(--line);
    color: var(--text-dim);
    text-decoration: none;
    transition: all .2s ease;
}

.sidebar-socials a:hover{
    color: #fff;
    background: var(--grad);
    border-color: transparent;
}

/* Tabs */
.tab-row{
    display: flex;
    gap: 6px;
    margin-bottom: 20px;
    background: var(--card-soft);
    padding: 4px;
    border-radius: 999px;
    border: 1px solid var(--line);
}

.tab-btn{
    flex: 1;
    background: none;
    border: none;
    color: var(--text-dim);
    padding: 9px 14px;
    border-radius: 999px;
    cursor: pointer;
    font-size: .84rem;
    font-weight: 600;
    transition: all .2s ease;
    position: relative;
    z-index: 5;
    pointer-events: auto;
}

.tab-btn.active{
    background: var(--grad);
    color: #fff;
}

.tab-content{ display: none; flex-direction: column; gap: 14px; }
.tab-content.active-tab{ display: flex; }

.side-post{
    display: flex;
    gap: 14px;
    align-items: center;
    text-decoration: none;
}

.side-post img{
    width: 58px; height: 58px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid var(--line);
}

.side-post h4{
    font-size: .88rem;
    line-height: 1.35;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

/* Newsletter */
.newsletter-card h3{
    font-size: 1.05rem;
    color: #fff;
    margin: 0 0 6px;
}

.newsletter-card p{
    font-size: .85rem;
    color: var(--text-faint);
    margin: 0 0 16px;
    line-height: 1.55;
}

.newsletter-card input{
    width: 100%;
    padding: 12px 14px;
    margin-bottom: 10px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--card-soft);
    color: #fff;
    font-size: .9rem;
    box-sizing: border-box;
}

.newsletter-card input::placeholder{ color: var(--text-faint); }

.newsletter-card button{
    width: 100%;
    padding: 12px;
    background: var(--grad);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: .9rem;
    cursor: pointer;
    transition: opacity .2s ease;
}

.newsletter-card button:hover{ opacity: .88; }
