/* Blog list (/blog) and article pages — builds on home.css + about.css (dark theme, page hero).
   Articles are shown on a light "paper" panel: imported WordPress posts contain dark inline
   text colours that would be unreadable on navy. */

/* ---------- Shared bits ---------- */
.blog-page .page-hero { padding: 72px 0 64px; }
.blog-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; color: var(--muted); font-size: 0.86rem; }
.blog-meta > span { display: inline-flex; align-items: center; gap: 6px; }
.blog-meta .icon { width: 15px; height: 15px; opacity: 0.85; }
.blog-meta__cat { display: inline-block; padding: 3px 10px; border-radius: 999px; background: rgba(245, 197, 24, 0.14); color: var(--gold); font: 600 0.76rem/1.4 var(--font-heading); text-decoration: none; }
a.blog-meta__cat:hover { background: rgba(245, 197, 24, 0.24); }
.blog-thumb-placeholder { display: grid; place-items: center; width: 100%; height: 100%; background: linear-gradient(135deg, #13244d, #0b1733); color: rgba(245, 197, 24, 0.7); }
.blog-thumb-placeholder .icon { width: 42px; height: 42px; }

/* ---------- Blog list ---------- */
.blog-hero .page-hero__inner { max-width: 1120px; }
.blog-search { display: flex; align-items: center; gap: 8px; max-width: 620px; margin-top: 28px; padding: 6px 6px 6px 14px; border-radius: 14px; background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.16); }
.blog-search:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(245, 197, 24, 0.2); }
.blog-search__icon { display: inline-grid; color: #a8b4cf; }
.blog-search__icon .icon { width: 20px; height: 20px; }
.blog-search input { flex: 1; min-width: 0; min-height: 44px; border: 0; background: transparent; color: #fff; font: 400 1rem/1.3 var(--font); outline: none; }
.blog-search input::placeholder { color: #8d9abb; }
.blog-search .btn { padding: 11px 20px; }
.blog-hero__count { margin: 14px 0 0; color: #a8b4cf; font-size: 0.92rem; }
.blog-hero__count strong { color: #fff; }

.blog-cats { position: relative; z-index: 2; background: #0b1530; border-block: 1px solid rgba(255, 255, 255, 0.06); }
.blog-cats__list { display: flex; gap: 8px; margin: 0; padding: 14px 0; list-style: none; overflow-x: auto; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.2) transparent; }
.blog-cats .chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.14); color: #dbe3f4; font: 600 0.86rem/1.2 var(--font-heading); white-space: nowrap; text-decoration: none; transition: background 160ms, border-color 160ms, color 160ms; }
.blog-cats .chip:hover { border-color: rgba(147, 180, 255, 0.6); color: #fff; }
.blog-cats .chip.is-active { background: var(--gold); border-color: var(--gold); color: #111827; }
.chip__count { padding: 1px 7px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); font-size: 0.72rem; }
.chip.is-active .chip__count { background: rgba(17, 24, 39, 0.15); }

.blog-list { padding-top: 48px; }
.blog-featured { display: grid; grid-template-columns: 1.15fr 1fr; gap: 0; margin-bottom: 40px; border-radius: 22px; overflow: hidden; background: var(--surface); border: 1px solid rgba(255, 255, 255, 0.08); }
.blog-featured__media { display: block; min-height: 300px; background: #0b1733; }
.blog-featured__media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.blog-featured__body { display: flex; flex-direction: column; justify-content: center; gap: 14px; padding: 36px 40px; }
.blog-featured__label { margin: 0; color: var(--gold); font: 700 0.75rem/1 var(--font-heading); letter-spacing: 0.14em; text-transform: uppercase; }
.blog-featured__title { margin: 0; font-size: clamp(1.4rem, 2.6vw, 2rem); line-height: 1.25; text-wrap: balance; }
.blog-featured__title a { color: #fff; text-decoration: none; }
.blog-featured__title a:hover { color: var(--gold); }
.blog-featured__text { margin: 0; color: var(--muted); line-height: 1.7; }
.blog-featured .btn { align-self: flex-start; margin-top: 6px; }

.blog-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.blog-card { display: flex; flex-direction: column; overflow: hidden; border-radius: 18px; background: var(--surface); border: 1px solid rgba(255, 255, 255, 0.08); transition: transform 300ms var(--ease-out), border-color 200ms, box-shadow 300ms; }
.blog-card:hover { transform: translateY(-4px); border-color: rgba(147, 180, 255, 0.4); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45); }
.blog-card__media { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #0b1733; }
.blog-card__media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 500ms var(--ease-out); }
.blog-card:hover .blog-card__media img { transform: scale(1.04); }
.blog-card__body { display: flex; flex-direction: column; gap: 10px; flex: 1; padding: 18px 20px 20px; }
.blog-card__title { margin: 0; font-size: 1.08rem; line-height: 1.4; }
.blog-card__title a { color: #fff; text-decoration: none; }
.blog-card__title a::after { content: ""; position: absolute; inset: 0; }
.blog-card { position: relative; }
.blog-card__title a:hover { color: var(--gold); }
.blog-card__text { margin: 0; color: var(--muted); font-size: 0.93rem; line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.blog-card__more { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 6px; color: var(--link); font: 600 0.9rem/1.2 var(--font-heading); text-decoration: none; }
.blog-card__more .icon { width: 16px; height: 16px; transition: transform 200ms; }
.blog-card:hover .blog-card__more .icon { transform: translateX(3px); }
.blog-meta .blog-meta__cat { position: relative; z-index: 1; }

.blog-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; margin-top: 48px; }
.blog-pagination ol { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.blog-pagination a, .blog-pagination span { display: inline-grid; place-items: center; min-width: 42px; height: 42px; padding: 0 12px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.12); color: #dbe3f4; font: 600 0.92rem/1 var(--font-heading); text-decoration: none; }
.blog-pagination a:hover { border-color: var(--gold); color: #fff; }
.blog-pagination .is-current { background: var(--gold); border-color: var(--gold); color: #111827; }
.blog-pagination .gap { border: 0; min-width: 20px; padding: 0; }
.blog-pagination .blog-pagination__step { display: inline-flex; gap: 6px; white-space: nowrap; padding: 0 16px; }
.blog-pagination__info { margin: 12px 0 0; text-align: center; color: var(--muted); font-size: 0.86rem; }

.blog-empty { display: grid; justify-items: center; gap: 12px; padding: 64px 20px; text-align: center; border-radius: 20px; background: var(--surface); border: 1px solid rgba(255, 255, 255, 0.08); }
.blog-empty__icon .icon { width: 44px; height: 44px; color: var(--gold); }
.blog-empty h2 { margin: 0; color: #fff; }
.blog-empty p { margin: 0 0 8px; color: var(--muted); }

/* ---------- Article ---------- */
.post-hero { padding: 64px 0 120px !important; }
.post-hero__inner { max-width: 1120px; }
.post-hero__title { max-width: 900px; margin: 0 0 22px; font-size: clamp(1.9rem, 4.4vw, 3.1rem); line-height: 1.15; letter-spacing: -0.02em; text-wrap: balance; color: #fff; }
.post-hero__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; color: #c9d3ea; font-size: 0.93rem; }
.post-hero__meta > span { display: inline-flex; align-items: center; gap: 7px; }
.post-hero__meta .icon { width: 17px; height: 17px; color: var(--gold); }
.post-author strong { color: #fff; font-weight: 600; }
.post-author__avatar { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--gold); color: #111827; font: 700 0.95rem/1 var(--font-heading); flex: none; }
.post-author__avatar--lg { width: 56px; height: 56px; font-size: 1.4rem; }

.post-layout { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; align-items: start; margin-top: -72px; padding-bottom: 72px; }

.post-paper {
  /* Light reading surface: re-map the colour tokens the dark theme changed */
  --text: #1f2937; --muted: #5d6670; --border: #e3e6ea; --bg-soft: #f4f6fa; --accent: #1d4ed8; --accent-dark: #1e40af;
  min-width: 0; padding: 40px 48px 36px; border-radius: 22px; background: #fff; color: var(--text);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}
.post-paper__image { margin: -40px -48px 32px; }
.post-paper__image img { display: block; width: 100%; height: auto; border-radius: 22px 22px 0 0; } /* full image: many contain text */

/* Article typography */
.post-paper .entry-content { font-size: 1.075rem; line-height: 1.8; color: #2b3443; }
.post-paper .entry-content > :first-child { margin-top: 0; }
.post-paper .entry-content h2, .post-paper .entry-content h3, .post-paper .entry-content h4 { color: #0b1733; font-family: var(--font-heading); scroll-margin-top: 100px; }
.post-paper .entry-content h2 { font-size: 1.55rem; margin: 2em 0 0.6em; padding-top: 0.2em; }
.post-paper .entry-content h3 { font-size: 1.22rem; margin: 1.7em 0 0.5em; }
.post-paper .entry-content h4 { font-size: 1.05rem; }
.post-paper .entry-content a { color: #1d4ed8; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.post-paper .entry-content a:hover { color: #1e40af; }
.post-paper .entry-content strong, .post-paper .entry-content b { color: #111827; }
.post-paper .entry-content ul, .post-paper .entry-content ol { padding-left: 1.4em; }
.post-paper .entry-content li { margin-bottom: 0.45em; }
.post-paper .entry-content li::marker { color: #1d4ed8; }
.post-paper .entry-content img { max-width: 100%; height: auto; border-radius: 12px; }
.post-paper .entry-content blockquote, .post-paper .entry-content .wp-block-quote { margin: 1.8em 0; padding: 16px 22px; border-left: 4px solid var(--gold); border-radius: 0 12px 12px 0; background: #fffbea; color: #3b4252; font-style: italic; }
.post-paper .entry-content table { width: 100%; border-collapse: collapse; margin: 1.8em 0; display: block; overflow-x: auto; font-size: 0.95rem; }
.post-paper .entry-content th { background: #0b1733; color: #fff; }
.post-paper .entry-content th, .post-paper .entry-content td { border: 1px solid #e3e6ea; padding: 10px 14px; text-align: left; }
.post-paper .entry-content tr:nth-child(even) td { background: #f7f9fc; }
.post-paper .entry-content iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: 12px; }
.post-paper .entry-content hr { border: 0; border-top: 1px solid #e3e6ea; margin: 2.2em 0; }

/* Table of contents */
.post-toc ol { margin: 0; padding: 0; list-style: none; counter-reset: toc; }
.post-toc li.lvl-3 { padding-left: 14px; }
.post-toc a { display: block; padding: 6px 10px; border-radius: 8px; text-decoration: none; line-height: 1.4; font-size: 0.9rem; }
.post-toc--inline { display: none; margin: 0 0 28px; border: 1px solid #e3e6ea; border-radius: 14px; background: #f7f9fc; }
.post-toc--inline summary { display: flex; align-items: center; gap: 8px; padding: 14px 18px; cursor: pointer; color: #0b1733; font: 700 0.98rem/1.2 var(--font-heading); list-style: none; }
.post-toc--inline summary::-webkit-details-marker { display: none; }
.post-toc--inline summary .icon { width: 18px; height: 18px; color: #1d4ed8; }
.post-toc__count { margin-left: auto; color: #5d6670; font: 500 0.8rem/1 var(--font); }
.post-toc--inline ol { padding: 0 10px 12px; }
.post-toc--inline a { color: #1f2937; }
.post-toc--inline a:hover { background: #e8efff; color: #1d4ed8; }

/* Tags, share, author */
.post-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 40px; padding-top: 24px; border-top: 1px solid #e3e6ea; }
.post-tags__label, .post-share__label { margin-right: 4px; color: #5d6670; font: 700 0.78rem/1 var(--font-heading); letter-spacing: 0.1em; text-transform: uppercase; }
.post-tag { padding: 5px 12px; border-radius: 999px; background: #eef2fb; color: #1f2937; font-size: 0.84rem; }
.post-share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 22px; }
.share-btn { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 8px 14px; border: 1px solid #e3e6ea; border-radius: 10px; background: #fff; color: #1f2937; font: 600 0.86rem/1 var(--font-heading); text-decoration: none; cursor: pointer; transition: background 160ms, border-color 160ms, color 160ms; }
.share-btn svg, .share-btn .icon { width: 18px; height: 18px; }
.share-btn--wa { color: #128c4b; }
.share-btn--fb { color: #1877f2; }
.share-btn--in { color: #0a66c2; }
.share-btn--x { color: #111827; }
.share-btn:hover { background: #f4f6fa; border-color: #c9d2e3; }
.post-authorbox { display: flex; gap: 16px; align-items: flex-start; margin-top: 32px; padding: 22px; border-radius: 16px; background: linear-gradient(135deg, #f4f7ff, #fffbea); border: 1px solid #e3e6ea; }
.post-authorbox__name { margin: 0 0 6px; color: #0b1733; font: 700 1rem/1.3 var(--font-heading); }
.post-authorbox__text { margin: 0; color: #4b5563; font-size: 0.94rem; line-height: 1.65; }

/* Sidebar */
.post-sidebar { position: sticky; top: 96px; display: grid; gap: 18px; padding-top: 88px; }
.side-card { padding: 20px; border-radius: 18px; background: var(--surface); border: 1px solid rgba(255, 255, 255, 0.08); }
.side-card__title { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; color: #fff; font: 700 0.98rem/1.2 var(--font-heading); }
.side-card__title .icon { width: 18px; height: 18px; color: var(--gold); }
.post-toc--side { max-height: calc(100vh - 140px); overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.2) transparent; }
.post-toc--side a { color: #a8b4cf; border-left: 2px solid transparent; border-radius: 0 8px 8px 0; }
.post-toc--side a:hover { color: #fff; background: rgba(255, 255, 255, 0.05); }
.post-toc--side a.is-active { color: var(--gold); border-left-color: var(--gold); background: rgba(245, 197, 24, 0.08); }
.side-cta { background: linear-gradient(160deg, #13244d 0%, #0b1733 70%); border-color: rgba(245, 197, 24, 0.3); }
.side-cta__eyebrow { margin: 0 0 8px; color: var(--gold); font: 700 0.72rem/1 var(--font-heading); letter-spacing: 0.14em; text-transform: uppercase; }
.side-cta__title { margin: 0 0 8px; color: #fff; font: 700 1.2rem/1.3 var(--font-heading); }
.side-cta__text { margin: 0 0 16px; color: #c9d3ea; font-size: 0.92rem; line-height: 1.6; }
.side-cta .btn { width: 100%; justify-content: center; }
.side-cta__phone { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 12px; color: #dbe3f4; font-weight: 600; text-decoration: none; }
.side-cta__phone .icon { width: 16px; height: 16px; color: var(--gold); }
.side-posts { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.side-posts a { display: grid; grid-template-columns: 72px 1fr; gap: 12px; align-items: center; text-decoration: none; }
.side-posts img, .side-posts__ph { width: 72px; height: 54px; border-radius: 10px; object-fit: cover; background: #0b1733; }
.side-posts__ph { display: grid; place-items: center; color: rgba(245, 197, 24, 0.7); }
.side-posts__ph .icon { width: 22px; height: 22px; }
.side-posts__title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: #e8edf8; font: 600 0.88rem/1.4 var(--font-heading); }
.side-posts a:hover .side-posts__title { color: var(--gold); }
.side-posts time { display: block; margin-top: 4px; color: #8d9abb; font-size: 0.78rem; }

/* Related */
.post-related { padding-top: 64px; }
.post-related__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 26px; }
.post-related__head h2 { margin: 0; color: #fff; font-size: clamp(1.5rem, 3vw, 2rem); }
.blog-grid--3 .blog-card__title { font-size: 1.02rem; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .post-layout { grid-template-columns: 1fr; }
  .post-sidebar { position: static; padding-top: 0; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
  .post-toc--side { display: none; }
  .post-toc--inline { display: block; }
}
@media (max-width: 980px) {
  .blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .blog-featured { grid-template-columns: 1fr; }
  .blog-featured__media { min-height: 0; aspect-ratio: 16 / 9; }
  .blog-featured__body { padding: 26px 24px 28px; }
}
@media (max-width: 640px) {
  .blog-page .page-hero { padding: 48px 0 44px; }
  .post-hero { padding: 44px 0 96px !important; }
  .blog-grid { grid-template-columns: 1fr; gap: 18px; }
  .blog-search { padding-left: 12px; }
  .blog-search .btn { padding: 10px 14px; }
  .post-layout { margin-top: -64px; gap: 20px; }
  .post-paper { padding: 24px 18px 26px; border-radius: 16px; }
  .post-paper__image { margin: -24px -18px 22px; }
  .post-paper__image img { border-radius: 16px 16px 0 0; }
  .post-paper .entry-content { font-size: 1.02rem; line-height: 1.75; }
  .post-paper .entry-content h2 { font-size: 1.32rem; }
  .share-btn span { display: none; }
  .share-btn { padding: 8px 11px; }
  .post-authorbox { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  .blog-card, .blog-card__media img { transition: none; }
  .blog-card:hover { transform: none; }
}
