/* Blog & Security News — public cards, reader, article page and admin preview paper. */
.blog-section { background: linear-gradient(180deg, #fff 0%, var(--slate-50, #f7f9fb) 100%); }
.blog-pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 auto 30px; }
.blog-pill { appearance: none; border: 1px solid var(--slate-200, #e2e8f0); background: #fff; color: var(--navy-700, #34495e); border-radius: 999px; padding: 8px 16px; font-family: inherit; font-weight: 600; font-size: .85rem; line-height: 1.2; cursor: pointer; transition: background .2s, color .2s, border-color .2s, box-shadow .2s; }
.blog-pill:hover { border-color: #b9cbe0; box-shadow: 0 4px 14px rgba(26, 38, 50, .07); }
.blog-pill.is-active { background: var(--navy-800, #2c3e50); border-color: var(--navy-800, #2c3e50); color: #fff; box-shadow: 0 6px 18px rgba(44, 62, 80, .22); }
.blog-grid { display: grid; gap: 22px; }
@media (min-width: 720px) { .blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1020px) { .blog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.blog-section__more { display: flex; justify-content: center; margin-top: 34px; }
.blog-empty, .blog-loading { grid-column: 1 / -1; text-align: center; color: var(--slate-400, #8a99a8); padding: 30px 0; }

.blog-card { border-radius: var(--radius-lg, 18px); background: #fff; border: 1px solid var(--slate-200, #e2e8f0); box-shadow: var(--shadow-sm, 0 2px 8px rgba(0,0,0,.05)); overflow: hidden; transition: transform .3s cubic-bezier(.2,.7,.2,1), box-shadow .3s, border-color .3s; }
.blog-card:hover { transform: translateY(-4px); box-shadow: 0 22px 46px -22px rgba(26, 38, 50, .35); border-color: #d3dfeb; }
.blog-card__link { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; }
.blog-card__link:focus-visible { outline: 3px solid var(--accent, #3b6ea5); outline-offset: -3px; }
.blog-card__media { position: relative; }
.blog-cover { aspect-ratio: 16 / 9; overflow: hidden; background: #e8eef5; }
.blog-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s; }
.blog-card:hover .blog-cover img { transform: scale(1.04); }
.blog-cover--placeholder, .blog-article__cover--placeholder { display: grid; place-items: center; font-size: 2.6rem; color: #fff; }
.blog-cover--security { background: radial-gradient(circle at 25% 20%, #3b6ea5 0, transparent 55%), linear-gradient(135deg, #14243a, #2c4a6e); }
.blog-cover--performance { background: radial-gradient(circle at 75% 25%, #e3a008 0, transparent 50%), linear-gradient(135deg, #1d2b3a, #3b4f66); }
.blog-cover--ecommerce { background: radial-gradient(circle at 30% 80%, #10b981 0, transparent 50%), linear-gradient(135deg, #16302b, #2c4f5a); }
.blog-cover--news { background: radial-gradient(circle at 70% 70%, #8b5cf6 0, transparent 50%), linear-gradient(135deg, #1f1d3a, #39365e); }
.blog-cover--placeholder span, .blog-article__cover--placeholder span { filter: drop-shadow(0 6px 18px rgba(0,0,0,.35)); }
.blog-media-flag, .blog-featured { position: absolute; top: 12px; padding: 5px 10px; border-radius: 999px; font-size: .72rem; font-weight: 700; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.blog-media-flag { right: 12px; background: rgba(15, 23, 42, .66); color: #fff; }
.blog-featured { left: 12px; background: rgba(255, 255, 255, .88); color: #a16207; }
.blog-card__body { display: flex; flex-direction: column; gap: 10px; padding: 20px 22px 22px; flex: 1; }
.blog-badge { align-self: flex-start; display: inline-flex; padding: 4px 10px; border-radius: 999px; font-size: .7rem; font-weight: 700; letter-spacing: .02em; }
.blog-badge--security { background: #e8f0fa; color: #1f4f86; }
.blog-badge--performance { background: #fdf3dc; color: #8a5a00; }
.blog-badge--ecommerce { background: #e4f6ee; color: #12704b; }
.blog-badge--news { background: #efeafd; color: #5b3fb0; }
.blog-card__title { font-size: 1.12rem; line-height: 1.35; color: var(--navy-900, #1a2632); }
.blog-card__excerpt { color: var(--navy-500, #5a6b7c); font-size: .92rem; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.blog-card__meta, .blog-article__meta { display: flex; flex-wrap: wrap; gap: 6px; font-size: .8rem; color: var(--slate-400, #8a99a8); }
.blog-card__more { margin-top: auto; padding-top: 6px; font-weight: 700; font-size: .86rem; color: var(--accent, #3b6ea5); }

/* Reader overlay (homepage) */
.blog-reader { width: min(920px, 100vw); max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0 auto; padding: 0; border: 0; border-radius: 0; background: #fff; overflow-y: auto; }
.blog-reader::backdrop { background: rgba(10, 16, 28, .72); backdrop-filter: blur(6px); }
@media (min-width: 960px) { .blog-reader { height: calc(100dvh - 48px); margin-top: 24px; border-radius: 22px; } }
.blog-reader__bar { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 20px; background: rgba(255,255,255,.9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--slate-200, #e2e8f0); }
.blog-reader__full { font-weight: 700; font-size: .88rem; color: var(--accent, #3b6ea5); }
.blog-reader__close { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--slate-200, #e2e8f0); background: #fff; font-size: 1.4rem; line-height: 1; cursor: pointer; color: var(--navy-700, #34495e); }
.blog-reader__status:empty { display: none; }
.blog-reader__status { margin: 10px 20px 0; padding: 8px 12px; border-radius: 10px; background: #e6f6ef; color: #137a52; font-size: .85rem; font-weight: 600; }
.blog-reader__body { padding: 8px 0 40px; }

/* Article */
.blog-article { max-width: 760px; margin: 0 auto; padding: 24px 20px 10px; color: var(--navy-800, #2c3e50); }
.blog-article__head { display: grid; gap: 14px; margin-bottom: 24px; }
.blog-article__head .blog-badge { justify-self: start; }
.blog-article__title { font-size: clamp(1.7rem, 4vw, 2.5rem); line-height: 1.15; letter-spacing: -.02em; color: var(--navy-900, #1a2632); }
.blog-article__excerpt { font-size: 1.1rem; line-height: 1.6; color: var(--navy-500, #5a6b7c); }
.blog-author { font-weight: 700; color: var(--navy-700, #34495e); }
.blog-share { display: flex; flex-wrap: wrap; gap: 8px; }
.blog-share__btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--slate-200, #e2e8f0); background: #fff; color: var(--navy-700, #34495e); font-family: inherit; font-weight: 600; font-size: .8rem; line-height: 1.2; cursor: pointer; text-decoration: none; transition: border-color .2s, color .2s, transform .2s; }
.blog-share__btn:hover { border-color: var(--accent, #3b6ea5); color: var(--accent, #3b6ea5); transform: translateY(-1px); }
.blog-article__cover { aspect-ratio: 16 / 8; border-radius: 18px; overflow: hidden; margin-bottom: 22px; background: #e8eef5; }
.blog-article__cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.blog-article__cover--placeholder { font-size: 3.6rem; }
.blog-video { margin: 0 0 26px; border-radius: 18px; overflow: hidden; background: #0b1220; box-shadow: 0 24px 50px -28px rgba(10, 16, 28, .6); }
.blog-video--youtube { position: relative; aspect-ratio: 16 / 9; }
.blog-video--youtube iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.blog-video--r2 video { display: block; width: 100%; max-height: 72vh; background: #000; accent-color: #e3a008; }
.blog-prose { font-size: 1.04rem; line-height: 1.8; color: var(--navy-700, #34495e); }
.blog-prose > * + * { margin-top: 1.05em; }
.blog-prose > .blog-ad-wrapper { margin: 0; text-align: center; }
.blog-ad-wrapper .ad-caption { display: none; margin-bottom: 8px; color: var(--slate-500, #64748b); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; }
.blog-prose > .blog-ad-wrapper:has(> ins[data-ad-status="filled"]) { margin: 28px 0; }
.blog-ad-wrapper:has(> ins[data-ad-status="filled"]) .ad-caption { display: block; }
.blog-ad-wrapper > ins[data-ad-status="unfilled"] { display: none !important; }
.blog-prose h2 { font-size: 1.5rem; line-height: 1.3; margin-top: 1.8em; color: var(--navy-900, #1a2632); }
.blog-prose h3 { font-size: 1.2rem; margin-top: 1.5em; color: var(--navy-900, #1a2632); }
.blog-prose ul, .blog-prose ol { padding-left: 1.3em; }
.blog-prose ul { list-style: disc; } .blog-prose ol { list-style: decimal; }
.blog-prose li + li { margin-top: .35em; }
.blog-prose a { color: var(--accent, #3b6ea5); text-decoration: underline; text-underline-offset: 3px; }
.blog-prose code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .88em; background: #eef2f7; padding: .12em .4em; border-radius: 6px; }
.blog-code { position: relative; background: #0f172a; color: #e2e8f0; padding: 18px 20px; border-radius: 14px; overflow-x: auto; font-size: .88rem; line-height: 1.65; }
.blog-code code { background: none; padding: 0; color: inherit; font-size: inherit; }
.blog-code[data-lang]::before { content: attr(data-lang); position: absolute; top: 8px; right: 12px; font: 700 .65rem/1 ui-monospace, monospace; text-transform: uppercase; color: #94a3b8; letter-spacing: .08em; }
.blog-prose blockquote { border-left: 3px solid #cbd5e1; padding-left: 16px; color: var(--navy-500, #5a6b7c); font-style: italic; }
.blog-callout { padding: 16px 18px 16px 48px; border-radius: 14px; position: relative; border: 1px solid; }
.blog-callout::before { position: absolute; left: 16px; top: 14px; font-size: 1.1rem; }
.blog-callout--note { background: #eef4fb; border-color: #cfe0f2; } .blog-callout--note::before { content: 'ℹ️'; }
.blog-callout--tip { background: #ebf8f2; border-color: #c4ead8; } .blog-callout--tip::before { content: '💡'; }
.blog-callout--warning { background: #fff7e6; border-color: #f6dfa9; } .blog-callout--warning::before { content: '⚠️'; }
.blog-figure img { width: 100%; border-radius: 14px; display: block; }
.blog-figure figcaption { font-size: .82rem; color: var(--slate-400, #8a99a8); text-align: center; margin-top: 8px; }
.blog-cta { margin: 40px 0 10px; padding: 26px; border-radius: 20px; background: linear-gradient(135deg, #1a2632, #2c4a6e); color: #fff; display: grid; gap: 14px; justify-items: start; box-shadow: 0 24px 50px -26px rgba(26, 38, 50, .6); }
.blog-cta p { font-size: 1.2rem; font-weight: 700; line-height: 1.4; color: #fff; }
.blog-cta__btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 999px; background: linear-gradient(135deg, #f59e0b, #fbbf24); color: #1a1205; font-weight: 800; text-decoration: none; box-shadow: 0 8px 22px rgba(245, 158, 11, .35); transition: transform .2s, filter .2s; }
.blog-cta__btn:hover { transform: translateY(-2px); filter: brightness(1.06); }
.blog-preview-flag { display: inline-block; margin-bottom: 14px; padding: 5px 12px; border-radius: 999px; background: #fff4df; color: #946c2c; font-weight: 700; font-size: .78rem; }
.blog-missing { text-align: center; display: grid; gap: 12px; justify-items: center; padding: 60px 0; }

/* blog.html */
.blog-page { background: var(--slate-50, #f7f9fb); }
.blog-page__nav { position: sticky; top: 0; }
.blog-page__nav .navbar__inner { gap: 18px; }
.blog-page__links { display: flex; gap: 18px; margin-left: auto; font-weight: 600; font-size: .92rem; }
.blog-page__links a { color: var(--navy-600, #47596b); }
.blog-page__links a[aria-current="page"] { color: var(--navy-900, #1a2632); }
.blog-page__main { padding: 40px 0 70px; min-height: 70vh; }
.blog-page__hero { text-align: center; max-width: 720px; margin: 0 auto 26px; display: grid; gap: 10px; }
.blog-page__hero h1 { font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -.02em; }
.blog-page__hero p { color: var(--navy-500, #5a6b7c); }
.blog-page__article { background: #fff; border-radius: 24px; border: 1px solid var(--slate-200, #e2e8f0); padding: 10px 0 30px; }
.blog-page__footer .footer__bottom { display: flex; gap: 18px; flex-wrap: wrap; }
@media (max-width: 640px) { .blog-page__links { display: none; } .blog-article { padding-inline: 16px; } .blog-page__article { border-radius: 0; border-inline: 0; } }

/* Admin preview paper (dark admin, light article) */
.blog-preview-paper { background: #fff; color: #2c3e50; border-radius: 18px; margin: 0 18px 24px; padding-bottom: 10px; --navy-900: #1a2632; --navy-800: #2c3e50; --navy-700: #34495e; --navy-500: #5a6b7c; --slate-200: #e2e8f0; --slate-400: #8a99a8; --accent: #3b6ea5; }
.blog-preview-paper h1, .blog-preview-paper h2, .blog-preview-paper h3 { color: #1a2632; }
@media (prefers-reduced-motion: reduce) { .blog-card, .blog-card:hover, .blog-cover img, .blog-share__btn:hover, .blog-cta__btn:hover { transform: none; transition: none; } }
/* YouTube thumbnail covers */
.blog-cover--video { position: relative; }
.blog-cover--video img { object-fit: cover; }
.blog-play { position: absolute; left: 50%; top: 50%; width: 58px; height: 58px; margin: -29px 0 0 -29px; border-radius: 50%; display: grid; place-items: center; padding-left: 4px; background: rgba(15, 23, 42, .72); color: #fff; font-size: 1.3rem; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); backdrop-filter: blur(6px); transition: transform .25s, background .25s; }
.blog-card:hover .blog-play { transform: scale(1.08); background: rgba(227, 160, 8, .92); color: #1a1205; }
.blog-admin-thumb--video { position: relative; }
.blog-admin-thumb--video .blog-play { width: 22px; height: 22px; margin: -11px 0 0 -11px; font-size: .55rem; padding-left: 2px; }
