*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Page-level overrides for single-post ── */
body { background: var(--page-bg); }

img { max-width: 100%; height: auto; }

/* ══════════════════════════════════════
   HERO — Light Copilot Gradient
══════════════════════════════════════ */
.post-hero {
    padding: 120px 0 80px;
    position: relative;
    overflow: hidden;
    text-align: center;

    /* Light pastel mesh — matches index.php page-bg direction */
    background: linear-gradient(155deg,
        #F0E8FF 0%,
        #F8F0FF 18%,
        #FFF0FA 38%,
        #FFF4F0 60%,
        #FFF9F0 78%,
        #FDF8FF 100%);
}

/* Radial colour blobs */
.post-hero::before {
    content: '';
    position: absolute; inset: 0;
    background:
        radial-gradient(ellipse 65% 70% at 5%  40%, rgba(123,77,255,0.14)  0%, transparent 55%),
        radial-gradient(ellipse 55% 60% at 95% 25%, rgba(216,91,255,0.13)  0%, transparent 50%),
        radial-gradient(ellipse 50% 55% at 55% 95%, rgba(255,154,87,0.11)  0%, transparent 55%),
        radial-gradient(ellipse 40% 40% at 30% 15%, rgba(255,111,181,0.10) 0%, transparent 45%);
    pointer-events: none;
}

/* Gradient top bar */
.post-hero::after {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: var(--grad-main);
}

/* Floating orbs */
.hero-blob { position: absolute; border-radius: 50%; filter: blur(80px); pointer-events: none; }
.hero-blob-1 { width:420px; height:420px; background:rgba(123,77,255,0.10); top:-160px; left:-80px; animation: orbFloat 9s ease-in-out infinite; }
.hero-blob-2 { width:350px; height:350px; background:rgba(216,91,255,0.09); top:-100px; right:-70px; animation: orbFloat 11s ease-in-out infinite reverse; }
.hero-blob-3 { width:260px; height:260px; background:rgba(255,154,87,0.10); bottom:-80px; right:20%; animation: orbFloat 7s ease-in-out infinite 1.5s; }

@keyframes orbFloat { 0%,100%{transform:translateY(0) scale(1)} 50%{transform:translateY(-22px) scale(1.03)} }

.hero-inner { position: relative; z-index: 5; }

/* Badge */
.post-hero-badge {
    display: inline-flex; align-items: center; gap: 10px;
    background: rgba(255,255,255,0.85);
    border: 1px solid rgba(123,77,255,0.18);
    color: var(--text-mid); font-weight: 700;
    font-size: 11px; letter-spacing: 2.5px; text-transform: uppercase;
    padding: 8px 20px; border-radius: 50px; margin-bottom: 28px;
    box-shadow: 0 4px 16px rgba(123,77,255,0.10);
    backdrop-filter: blur(10px);
    font-family: 'Manrope', sans-serif;
}
.badge-pill-mini {
    width: 16px; height: 9px; border-radius: 5px;
    background: var(--grad-main); flex-shrink: 0;
    animation: pillShift 3s ease-in-out infinite;
}
@keyframes pillShift { 0%,100%{filter:hue-rotate(0deg)} 50%{filter:hue-rotate(60deg)} }

/* Title */
.post-hero-title {
    font-family: 'Plus Jakarta Sans', 'Clash Display', sans-serif;
    font-size: clamp(22px, 3.4vw, 46px); line-height: 1.15;
    font-weight: 800; letter-spacing: -0.5px;
    color: var(--text-strong);
    margin-bottom: 24px;
    max-width: 820px; margin-left: auto; margin-right: auto;
}

/* Gradient underline on last word — decorative span */
.post-hero-title .grad-word {
    background: var(--grad-main);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Meta row */
.hero-meta {
    display: flex; align-items: center; justify-content: center;
    gap: 14px; flex-wrap: wrap;
}
.hero-meta-item {
    display: inline-flex; align-items: center; gap: 6px;
    font-family: 'Manrope', sans-serif; font-size: 13px; font-weight: 600;
    color: var(--text-mid);
    background: rgba(255,255,255,0.80);
    border: 1px solid rgba(123,77,255,0.12);
    padding: 7px 16px; border-radius: 50px;
    backdrop-filter: blur(8px);
}
.hero-meta-item svg { width:14px; height:14px; stroke:currentColor; stroke-width:2; fill:none; }
.hero-cat-badge {
    display: inline-flex; align-items: center;
    background: rgba(255,255,255,0.85);
    border: 1.5px solid rgba(123,77,255,0.22);
    color: var(--purple); font-family: 'Manrope', sans-serif;
    font-weight: 700; font-size: 10.5px; letter-spacing: 1.5px; text-transform: uppercase;
    padding: 7px 16px; border-radius: 50px;
    transition: all .25s; box-shadow: 0 2px 10px rgba(123,77,255,0.10);
}
.hero-cat-badge:hover {
    background: var(--grad-main); color: white; border-color: transparent;
    box-shadow: 0 4px 18px rgba(123,77,255,0.28);
}

/* Decorative wave at bottom of hero */
.hero-wave {
    position: absolute; bottom: -1px; left: 0; right: 0;
    height: 50px; z-index: 6;
}
.hero-wave svg { width: 100%; height: 100%; display: block; }

/* ══════════════════════════════════════
   BODY SECTION
══════════════════════════════════════ */
.post-body { padding: 48px 0 90px; }
.post-layout { display: grid; grid-template-columns: 1fr 310px; gap: 28px; align-items: start; }

/* ── Image card ── */
.post-img-card {
    background: #fff;
    border: 1.5px solid rgba(123,77,255,0.10);
    border-radius: 24px; overflow: hidden;
    box-shadow: 0 8px 36px rgba(123,77,255,0.10);
    margin-bottom: 20px; position: relative;
}
.post-img-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: var(--grad-main); z-index: 2;
}
.img-card-photo { width: 100%; aspect-ratio: 16/9; overflow: hidden; }
.img-card-photo img { width:100%; height:100%; object-fit:cover; display:block; transition:transform .5s; }
.post-img-card:hover .img-card-photo img { transform: scale(1.03); }

.img-card-footer {
    padding: 18px 24px 16px; text-align: center;
    background: rgba(253,248,255,0.95); position: relative; z-index: 1;
    border-top: 1px solid rgba(123,77,255,0.08);
}
.img-card-logo { display:inline-flex; align-items:center; gap:7px; margin-bottom:8px; }
.img-card-logo-icon {
    width: 26px; height: 26px; background: var(--grad-main);
    border-radius: 8px; display:flex; align-items:center; justify-content:center;
    font-weight: 900; font-size: 12px; color: #fff;
    font-family: 'Plus Jakarta Sans', sans-serif;
    box-shadow: 0 3px 10px rgba(123,77,255,0.28);
}
.img-card-logo-text {
    font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 800; font-size: 13px;
    background: var(--grad-main); -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text;
}
.img-card-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: clamp(13px,1.6vw,17px); font-weight: 700;
    color: var(--text-strong); line-height: 1.35; margin-bottom: 8px;
}
.img-card-site {
    display: inline-flex; align-items:center; gap:5px;
    font-size: 11.5px; font-weight: 600; color: var(--muted);
}
.img-card-site svg { width:11px; height:11px; stroke:currentColor; stroke-width:2; fill:none; }

/* ── Share row ── */
.share-row { margin-bottom: 24px; }
.share-row-label {
    font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 700;
    font-size: 14px; color: var(--text-strong); margin-bottom: 10px;
}
.share-btns { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; }
.share-btn {
    display: flex; align-items:center; justify-content:center; gap:7px;
    padding: 12px 8px; border-radius: 12px;
    font-family: 'Manrope', sans-serif; font-weight: 700; font-size: 12px;
    color: #fff; transition: all .25s; border: none; text-decoration: none; cursor: pointer;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}
.share-btn svg { width:16px; height:16px; fill:#fff; flex-shrink:0; }
.share-btn.fb { background: #1877f2; }
.share-btn.fb:hover { background:#0d65d9; transform:translateY(-3px); box-shadow:0 8px 20px rgba(24,119,242,0.35); }
.share-btn.wa { background: #25D366; }
.share-btn.wa:hover { background:#1db954; transform:translateY(-3px); box-shadow:0 8px 20px rgba(37,211,102,0.35); }
.share-btn.tw { background: #111; }
.share-btn.tw:hover { background:#333; transform:translateY(-3px); box-shadow:0 8px 20px rgba(0,0,0,0.22); }
.share-btn.em { background: linear-gradient(135deg,#7B4DFF,#D85BFF); }
.share-btn.em:hover { transform:translateY(-3px); box-shadow:0 8px 20px rgba(123,77,255,0.35); }

/* ── Article ── */
.article-content {
    background: #fff;
    border: 1.5px solid rgba(123,77,255,0.08);
    border-radius: 22px; padding: 42px 46px;
    box-shadow: 0 4px 24px rgba(123,77,255,0.07);
}
.article-content h2 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: clamp(17px,2.1vw,24px); color: var(--text-strong);
    margin: 36px 0 14px; padding-bottom: 10px;
    border-bottom: 2px solid rgba(123,77,255,0.08); font-weight: 800;
}
.article-content h2:first-child { margin-top: 0; }
.article-content h3 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: clamp(14px,1.7vw,19px); color: var(--text-strong);
    margin: 24px 0 10px; font-weight: 700;
}
.article-content p { font-size: 15.5px; line-height: 1.95; color: var(--text); margin-bottom: 18px; }
.article-content ul, .article-content ol { margin: 10px 0 20px 18px; }
.article-content li { font-size: 15px; line-height: 1.85; color: var(--text); margin-bottom: 7px; padding-left: 4px; }
.article-content ul li::marker { color: var(--purple); }
.article-content ol li::marker { color: var(--purple); font-weight: 700; }
.article-content strong { color: var(--text-strong); }

/* Blockquote */
.article-content blockquote {
    background: linear-gradient(135deg, rgba(123,77,255,0.05), rgba(216,91,255,0.04));
    border-left: 4px solid var(--purple);
    border-radius: 0 16px 16px 0;
    padding: 20px 24px; margin: 22px 0;
    font-style: italic; color: var(--text-mid);
}

/* Table */
.article-content table { width:100%; border-collapse:collapse; margin:20px 0; border-radius:14px; overflow:hidden; border:1.5px solid rgba(123,77,255,0.10); }
.article-content th { background:rgba(123,77,255,0.07); padding:11px 14px; font-family:'Plus Jakarta Sans',sans-serif; font-size:12px; color:var(--purple); text-align:left; border-bottom:2px solid rgba(123,77,255,0.12); font-weight:700; }
.article-content td { padding:11px 14px; font-size:14px; color:var(--text); border-bottom:1px solid rgba(123,77,255,0.06); }
.article-content tr:last-child td { border-bottom:none; }
.article-content tr:nth-child(even) td { background:rgba(123,77,255,0.02); }

/* ── Sidebar ── */
.sidebar { position: sticky; top: 88px; }
.sidebar-card {
    background: #fff;
    border: 1.5px solid rgba(123,77,255,0.10);
    border-radius: 20px; padding: 22px 20px;
    margin-bottom: 18px;
    box-shadow: 0 4px 20px rgba(123,77,255,0.07);
}

.sidebar-search {
    display: flex; overflow: hidden;
    border: 1.5px solid rgba(123,77,255,0.18); border-radius: 12px;
}
.sidebar-search input {
    flex: 1; border: none; outline: none;
    padding: 12px 14px; font-family: 'Manrope', sans-serif;
    font-size: 13px; color: var(--text); background: #fff;
}
.sidebar-search input::placeholder { color: var(--muted); }
.sidebar-search button {
    background: var(--grad-btn); color: #fff; border: none;
    cursor: pointer; padding: 12px 16px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700; font-size: 10.5px; letter-spacing: 1px; text-transform: uppercase;
    transition: opacity .2s; white-space: nowrap;
}
.sidebar-search button:hover { opacity: .88; }

.sidebar-title {
    font-family: 'Plus Jakarta Sans', sans-serif; font-size: 16px;
    font-weight: 800; color: var(--text-strong);
    margin-bottom: 18px; padding-bottom: 12px;
    border-bottom: 2px solid rgba(123,77,255,0.09);
    display: flex; align-items: center; gap: 8px;
}
.sidebar-title::before {
    content: ''; width: 14px; height: 3px;
    background: var(--grad-main); border-radius: 2px; display: block;
}

.recent-item {
    display: flex; gap: 12px; align-items: flex-start;
    padding: 10px 0; border-bottom: 1px solid rgba(123,77,255,0.07);
    transition: transform .2s;
}
.recent-item:last-child { border-bottom: none; padding-bottom: 0; }
.recent-item:hover { transform: translateX(4px); }

.recent-thumb {
    width: 66px; height: 52px; border-radius: 10px;
    overflow: hidden; flex-shrink: 0;
    border: 1.5px solid rgba(123,77,255,0.10);
}
.recent-thumb img { width:100%; height:100%; object-fit:cover; display:block; }

.recent-info { flex: 1; min-width: 0; }
.recent-title {
    font-family: 'Plus Jakarta Sans', sans-serif; font-size: 12.5px; font-weight: 700;
    color: var(--text-strong); line-height: 1.45;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    margin-bottom: 4px; transition: color .2s;
}
.recent-title:hover { color: var(--purple); }
.recent-date { font-size: 11px; font-weight: 600; color: var(--muted); }

/* ── 404 ── */
.not-found { padding: 160px 0 120px; text-align: center; }
.not-found h1 {
    font-size: 90px; line-height: 1;
    background: var(--grad-main); -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text;
}
.not-found p { font-size: 18px; color: var(--muted); margin: 16px 0 36px; }
.btn-back {
    display: inline-flex; align-items:center; gap:8px;
    background: var(--grad-btn); color: #fff;
    font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 700; font-size: 15px;
    padding: 14px 34px; border-radius: 50px; transition: all .3s;
    box-shadow: 0 4px 24px rgba(123,77,255,0.35);
}
.btn-back:hover { transform: translateY(-3px); box-shadow: 0 10px 36px rgba(123,77,255,0.45); }

/* ── Back to top ── */
#back-to-top {
    position: fixed; bottom: 36px; left: 36px;
    width: 52px; height: 52px;
    background: var(--grad-main); color: white; border: none;
    border-radius: 15px; cursor: pointer; display: none;
    align-items: center; justify-content: center;
    box-shadow: 0 6px 26px rgba(123,77,255,.38);
    z-index: 999; transition: all .3s; font-size: 20px;
}
#back-to-top.visible { display: flex; }
#back-to-top:hover { transform: translateY(-4px); box-shadow: 0 10px 36px rgba(123,77,255,.50); }

/* ── Responsive ── */
@media(max-width:1024px) {
    .post-layout { grid-template-columns: 1fr; }
    .sidebar { position: static; }
    .article-content { padding: 28px 26px; }
}
@media(max-width:600px) {
    .article-content { padding: 20px 16px; }
    .container { padding: 0 16px; }
    .share-btns { grid-template-columns: repeat(2,1fr); }
    #back-to-top { bottom: 18px; left: 18px; }
    .post-hero { padding: 100px 0 60px; }
}