/* ============================================================
   TGC ADMIN (CMS) - extends styles.css + academy.css
   ============================================================ */

/* edit field cards */
.edit-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.5rem 1.6rem; margin-bottom: 1.25rem; }
.edit-card > h3 { font-family: var(--display); font-weight: 600; font-size: 1.1rem; margin-bottom: 0.3rem; display: flex; align-items: center; gap: 0.6rem; }
.edit-card > .desc { font-size: 0.86rem; color: var(--muted); margin-bottom: 1.3rem; }
.save-bar { position: sticky; bottom: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 1rem; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(12px); border: 1px solid var(--line); border-radius: var(--r-full); padding: 0.7rem 0.8rem 0.7rem 1.4rem; margin-top: 1.5rem; box-shadow: var(--shadow-md); }
.save-bar .si { font-size: 0.85rem; color: var(--ink-2); display: flex; align-items: center; gap: 0.5rem; }
.save-bar .si .d { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); }
.save-bar.saved .si .d { background: hsl(152 50% 45%); }

/* list item rows (team/testimonials/faq) */
.item-list { display: flex; flex-direction: column; gap: 0.75rem; }
.item-row { display: flex; align-items: center; gap: 0.9rem; padding: 0.8rem 1rem; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); transition: var(--t-fast); }
.item-row:hover { border-color: var(--line-strong); }
.item-row .thumb { width: 46px; height: 46px; border-radius: 10px; object-fit: cover; flex-shrink: 0; background: var(--bg-2); }
.item-row .ph { width: 46px; height: 46px; border-radius: 10px; flex-shrink: 0; display: grid; place-items: center; background: var(--bg-2); color: var(--muted); font-family: var(--display); font-weight: 600; }
.item-row .meta { flex: 1; min-width: 0; }
.item-row .meta b { font-family: var(--display); font-size: 0.95rem; display: block; }
.item-row .meta span { font-size: 0.82rem; color: var(--muted); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-row .acts { display: flex; gap: 0.4rem; flex-shrink: 0; }
.item-row .handle { color: var(--muted); cursor: grab; padding: 0 0.2rem; }
.item-row.dragging { opacity: 0.5; }

/* image picker */
.img-pick { display: flex; gap: 1rem; align-items: flex-start; }
.img-pick .prev { width: 84px; height: 84px; border-radius: 10px; object-fit: cover; background: var(--bg-2); flex-shrink: 0; border: 1px solid var(--line); }
.img-pick .prev.empty { display: grid; place-items: center; color: var(--muted); }
.img-pick .pf { flex: 1; }

/* ── Block editor ──────────────────────────────────────── */
.blocks { display: flex; flex-direction: column; gap: 0.6rem; }
.block { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); overflow: hidden; }
.block-bar { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.7rem; background: var(--bg-2); border-bottom: 1px solid var(--line); }
.block-bar .bt { font-family: var(--display); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.block-bar .sp { flex: 1; }
.block-bar button { width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; color: var(--muted); transition: var(--t-fast); }
.block-bar button:hover { background: var(--surface); color: var(--ink); }
.block-bar button svg { width: 15px; height: 15px; }
.block-body { padding: 0.9rem 1rem; }
.block-body textarea { width: 100%; border: none; background: none; color: var(--ink); font-family: var(--body); font-size: 0.95rem; line-height: 1.6; resize: vertical; min-height: 54px; outline: none; }
.block-body input { width: 100%; border: 1.5px solid var(--line-strong); border-radius: var(--r-sm); padding: 0.6rem 0.8rem; background: var(--bg); color: var(--ink); font: inherit; }
.block-body.quote textarea { font-family: var(--display); font-style: italic; font-size: 1.1rem; }
.block-body.heading input { font-family: var(--display); font-weight: 600; font-size: 1.1rem; }
.block-img-prev { width: 100%; max-height: 220px; object-fit: cover; border-radius: var(--r-sm); margin-top: 0.7rem; }
.add-block { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.8rem; padding: 0.9rem; border: 1.5px dashed var(--line-strong); border-radius: var(--r-md); }
.add-block span { font-size: 0.82rem; color: var(--muted); align-self: center; margin-right: 0.3rem; }

/* rich text mini toolbar */
.rt-tools { display: flex; gap: 0.3rem; margin-bottom: 0.5rem; }
.rt-tools button { width: 30px; height: 28px; border-radius: 6px; border: 1px solid var(--line-strong); font-family: Georgia, serif; font-size: 0.85rem; color: var(--ink-2); transition: var(--t-fast); }
.rt-tools button:hover { border-color: var(--accent); color: var(--accent); }

/* ── Blog post cards (admin) ───────────────────────────── */
.post-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.1rem; }
.post-card { display: flex; gap: 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 0.9rem; transition: var(--t); }
.post-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.post-card .pc-cover { width: 110px; height: 90px; border-radius: var(--r-sm); object-fit: cover; flex-shrink: 0; background: var(--bg-2); }
.post-card .pc-i { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.post-card .pc-i h4 { font-family: var(--display); font-weight: 600; font-size: 1rem; line-height: 1.25; }
.post-card .pc-i .ex { font-size: 0.82rem; color: var(--muted); margin: 0.3rem 0; flex: 1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-card .pc-meta { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }

/* analytics */
.bars { display: flex; align-items: flex-end; gap: 0.6rem; height: 140px; padding-top: 1rem; }
.bars .bar { flex: 1; background: linear-gradient(180deg, var(--teal-bright), var(--teal-deep)); border-radius: 6px 6px 0 0; min-height: 4px; position: relative; transition: height var(--t-slow); }
.bars .bar span { position: absolute; top: -1.3rem; left: 50%; transform: translateX(-50%); font-size: 0.72rem; font-weight: 600; font-family: var(--display); color: var(--ink-2); }
.bars .bar em { position: absolute; bottom: -1.5rem; left: 50%; transform: translateX(-50%); font-size: 0.66rem; color: var(--muted); font-style: normal; white-space: nowrap; }
.legend { display: flex; gap: 1.2rem; flex-wrap: wrap; margin-top: 2.2rem; }
.legend span { font-size: 0.82rem; color: var(--ink-2); display: flex; align-items: center; gap: 0.4rem; }
.legend i { width: 11px; height: 11px; border-radius: 3px; }

/* tag input */
.tags-in { display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0.5rem; border: 1.5px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); }
.tags-in .tag { display: inline-flex; align-items: center; gap: 0.3rem; background: var(--bg-2); border-radius: 99px; padding: 0.25rem 0.65rem; font-size: 0.8rem; }
.tags-in .tag button { color: var(--muted); font-size: 0.9rem; line-height: 1; }
.tags-in input { border: none; background: none; outline: none; flex: 1; min-width: 80px; font: inherit; color: var(--ink); padding: 0.25rem; }

/* preview link bar */
.preview-strip { display: flex; align-items: center; gap: 0.8rem; background: var(--orange-soft); border: 1px solid color-mix(in srgb, var(--orange) 30%, transparent); border-radius: var(--r-md); padding: 0.8rem 1.1rem; margin-bottom: 1.5rem; font-size: 0.88rem; }
.preview-strip svg { width: 18px; height: 18px; color: var(--accent-2); flex-shrink: 0; }
.preview-strip a { color: var(--accent-2); font-weight: 600; margin-left: auto; white-space: nowrap; }

@media (max-width: 900px) { .post-grid { grid-template-columns: 1fr; } }
@media (max-width: 680px) { .post-card { flex-direction: column; } .post-card .pc-cover { width: 100%; height: 150px; } }

/* ── PUBLIC BLOG ───────────────────────────────────────── */
.blog-hero { padding: clamp(8rem, 12vw, 11rem) 0 clamp(2rem, 4vw, 3rem); }
.blog-hero .eyebrow { margin-bottom: 1rem; }
.blog-hero h1 { font-family: var(--display); font-weight: 600; font-size: clamp(2.4rem, 5vw, 4rem); letter-spacing: -0.025em; }
.blog-hero p { color: var(--ink-2); font-size: clamp(1.05rem, 1.6vw, 1.3rem); margin-top: 1rem; max-width: 56ch; }

.blog-toolbar { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; padding-bottom: 2rem; border-bottom: 1px solid var(--line); margin-bottom: 2.5rem; }
.blog-search { flex: 1; min-width: 220px; display: flex; align-items: center; gap: 0.6rem; background: var(--surface); border: 1.5px solid var(--line-strong); border-radius: var(--r-full); padding: 0.6rem 1.1rem; }
.blog-search svg { width: 18px; height: 18px; color: var(--muted); flex-shrink: 0; }
.blog-search input { flex: 1; border: none; background: none; outline: none; font: inherit; color: var(--ink); }
.cat-chips { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.cat-chip { font-family: var(--display); font-weight: 500; font-size: 0.85rem; padding: 0.55rem 1.1rem; border-radius: var(--r-full); border: 1.5px solid var(--line-strong); color: var(--ink-2); cursor: pointer; transition: var(--t-fast); }
.cat-chip:hover { border-color: var(--accent); color: var(--accent); }
.cat-chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.feat-post { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; margin-bottom: 3.5rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); overflow: hidden; }
.feat-post .fp-cover { aspect-ratio: 4/3; height: 100%; background: linear-gradient(150deg, var(--teal-deep), #062a30); }
.feat-post .fp-cover img { width: 100%; height: 100%; object-fit: cover; }
.feat-post .fp-body { padding: clamp(1.5rem, 3vw, 2.75rem) clamp(1.5rem, 3vw, 2.75rem) clamp(1.5rem, 3vw, 2.75rem) 0; }
.feat-post h2 { font-family: var(--display); font-weight: 600; font-size: clamp(1.5rem, 2.8vw, 2.3rem); letter-spacing: -0.02em; line-height: 1.1; margin: 0.8rem 0; }
.feat-post p { color: var(--ink-2); font-size: 1.02rem; }

.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.bpost { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; cursor: pointer; transition: transform var(--t), box-shadow var(--t), border-color var(--t); }
.bpost:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.bpost .bp-cover { aspect-ratio: 16/10; background: linear-gradient(150deg, var(--teal-deep), #062a30); overflow: hidden; }
.bpost .bp-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-slow); }
.bpost:hover .bp-cover img { transform: scale(1.05); }
.bpost .bp-body { padding: 1.3rem 1.4rem 1.5rem; display: flex; flex-direction: column; flex: 1; }
.bpost h3 { font-family: var(--display); font-weight: 600; font-size: 1.2rem; line-height: 1.25; letter-spacing: -0.01em; margin: 0.6rem 0; }
.bpost .ex { color: var(--ink-2); font-size: 0.9rem; flex: 1; }
.bmeta { display: flex; align-items: center; gap: 0.6rem; margin-top: 1.2rem; font-size: 0.8rem; color: var(--muted); }
.bmeta .av { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; background: var(--bg-2); }

/* post page */
.post-wrap { max-width: 760px; margin: 0 auto; }
.post-head { padding: clamp(7.5rem, 11vw, 10rem) 0 0; }
.post-head .crumb { display: inline-flex; align-items: center; gap: 0.5rem; font-family: var(--display); font-size: 0.85rem; font-weight: 500; color: var(--accent); margin-bottom: 1.5rem; }
.post-head h1 { font-family: var(--display); font-weight: 600; font-size: clamp(2rem, 4.5vw, 3.4rem); letter-spacing: -0.025em; line-height: 1.08; }
.post-byline { display: flex; align-items: center; gap: 0.8rem; margin: 2rem 0; padding-bottom: 2rem; border-bottom: 1px solid var(--line); }
.post-byline img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; background: var(--bg-2); }
.post-byline b { font-family: var(--display); font-size: 0.95rem; display: block; }
.post-byline span { font-size: 0.82rem; color: var(--muted); }
.post-cover { width: 100%; aspect-ratio: 16/8; object-fit: cover; border-radius: var(--r-lg); margin-bottom: 2.5rem; }
.post-content { font-size: 1.12rem; line-height: 1.75; color: var(--ink); }
.post-content p { margin-bottom: 1.4rem; }
.post-content h2 { font-family: var(--display); font-weight: 600; font-size: 1.6rem; letter-spacing: -0.01em; margin: 2.2rem 0 1rem; }
.post-content blockquote { border-left: 3px solid var(--orange); padding: 0.3rem 0 0.3rem 1.5rem; margin: 2rem 0; font-family: var(--display); font-style: italic; font-size: 1.35rem; line-height: 1.4; color: var(--ink); }
.post-content blockquote cite { display: block; font-size: 0.9rem; font-style: normal; color: var(--muted); margin-top: 0.7rem; font-family: var(--body); }
.post-content img { width: 100%; border-radius: var(--r-md); margin: 1.8rem 0; }
.post-content .vembed { aspect-ratio: 16/9; margin: 1.8rem 0; border-radius: var(--r-md); overflow: hidden; background: #000; }
.post-content .vembed iframe { width: 100%; height: 100%; border: none; }
.post-tags { display: flex; gap: 0.5rem; flex-wrap: wrap; margin: 2.5rem 0; }
.post-tags a { font-size: 0.82rem; color: var(--ink-2); background: var(--bg-2); padding: 0.4rem 0.9rem; border-radius: 99px; }

/* comments */
.comments { max-width: 760px; margin: 3rem auto 0; padding-top: 2.5rem; border-top: 1px solid var(--line); }
.comments h3 { font-family: var(--display); font-weight: 600; font-size: 1.4rem; margin-bottom: 1.5rem; }
.comment { display: flex; gap: 0.9rem; padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.comment .cav { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, var(--teal), var(--teal-leaf)); color: #fff; display: grid; place-items: center; font-family: var(--display); font-weight: 600; flex-shrink: 0; }
.comment .cb b { font-family: var(--display); font-size: 0.92rem; }
.comment .cb .ct { font-size: 0.74rem; color: var(--muted); margin-left: 0.5rem; }
.comment .cb p { margin-top: 0.3rem; color: var(--ink-2); font-size: 0.95rem; }
.comment-form { margin-top: 1.8rem; }

/* newsletter */
.newsletter { background: #06141A; color: #fff; border-radius: var(--r-xl); padding: clamp(2rem, 5vw, 3.5rem); position: relative; overflow: hidden; text-align: center; }
.newsletter canvas { position: absolute; inset: 0; z-index: 0; opacity: 0.5; }
.newsletter .nl-in { position: relative; z-index: 2; max-width: 540px; margin: 0 auto; }
.newsletter h2 { font-family: var(--display); font-weight: 600; font-size: clamp(1.6rem, 3vw, 2.4rem); letter-spacing: -0.02em; color: #fff; }
.newsletter p { color: hsl(180 20% 88% / 0.8); margin: 0.8rem 0 1.8rem; }
.nl-form { display: flex; gap: 0.6rem; max-width: 440px; margin: 0 auto; }
.nl-form input { flex: 1; padding: 0.9rem 1.2rem; border-radius: var(--r-full); border: 1.5px solid rgba(255,255,255,0.25); background: rgba(255,255,255,0.1); color: #fff; font: inherit; backdrop-filter: blur(6px); }
.nl-form input::placeholder { color: hsl(180 20% 88% / 0.6); }
.nl-form input:focus { outline: none; border-color: var(--teal-leaf); }
@media (max-width: 560px) { .nl-form { flex-direction: column; } }

@media (max-width: 1024px) { .blog-grid { grid-template-columns: repeat(2, 1fr); } .feat-post { grid-template-columns: 1fr; } .feat-post .fp-cover { aspect-ratio: 16/9; } .feat-post .fp-body { padding: 0 clamp(1.5rem,3vw,2.5rem) clamp(1.5rem,3vw,2.5rem); } }
@media (max-width: 640px) { .blog-grid { grid-template-columns: 1fr; } }
