/* ==========================================================================
   Blog (blog.php + blog-details.php) — scoped to .twk-blog
   ========================================================================== */
.twk-blog {
  --tb-ink: #0b2a4a;
  --tb-text: #4b5563;
  --tb-muted: #6b7280;
  --tb-blue: #169ef5;
  --tb-yellow: #ffd749;
  --tb-grey: #f5f8ff;
  --tb-border: #e8ecf2;
  color: var(--tb-text);
}
.twk-blog main { overflow-x: clip; }
.twk-blog h1, .twk-blog h2, .twk-blog h3 { color: var(--tb-ink); }

/* ---------- shared ---------- */
.tb-crumb { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; font-size: 14px; color: var(--tb-muted); }
.tb-crumb a { color: var(--tb-ink); font-weight: 600; text-decoration: none; }
.tb-crumb a:hover { color: var(--tb-blue); }
.tb-eyebrow {
  display: inline-block;
  margin-bottom: 16px;
  padding: 6px 16px;
  border-radius: 999px;
  background: rgba(255, 215, 73, .4);
  color: var(--tb-ink);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.tb-hl {
  background: linear-gradient(transparent 62%, rgba(255, 215, 73, .95) 62%, rgba(255, 215, 73, .95) 88%, transparent 88%);
  -webkit-box-decoration-break: clone;
          box-decoration-break: clone;
}
.tb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  padding: 0 26px;
  border-radius: 999px;
  background: var(--tb-ink);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 14px 30px -16px rgba(11, 42, 74, .8);
  transition: background-color .25s ease, transform .25s ease;
}
.tb-btn:hover, .tb-btn:focus-visible { background: var(--tb-blue); color: #fff; transform: translateY(-2px); }
.tb-btn--block { width: 100%; }
.tb-chip {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--tb-yellow);
  color: var(--tb-ink);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-decoration: none;
}
.tb-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; color: var(--tb-muted); font-size: 13px; font-weight: 500; }
.tb-meta i { margin-right: 4px; color: var(--tb-blue); }

/* ---------- hero ---------- */
.tb-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(44px, 5vw, 100px) 0 clamp(36px, 4vw, 70px);
  background: var(--tb-grey);
}
.tb-hero--compact { padding-bottom: clamp(50px, 5vw, 90px); }
.tb-hero .container { position: relative; z-index: 1; }
.tb-hero__shape { position: absolute; border-radius: 50%; pointer-events: none; }
.tb-hero__shape--a { top: -120px; right: -60px; width: 380px; height: 380px; background: rgba(22, 158, 245, .12); }
.tb-hero__shape--b { bottom: -160px; left: 30%; width: 320px; height: 320px; background: rgba(255, 215, 73, .3); }
.tb-hero__title { max-width: 820px; margin: 0 0 16px; font-size: clamp(36px, 4.6vw, 64px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.08; }
.tb-hero__lead { max-width: 620px; margin: 0 0 26px; font-size: clamp(16px, 1.15vw, 20px); line-height: 1.75; }
.tb-cats { display: flex; flex-wrap: wrap; gap: 10px; }
.tb-cat {
  padding: 9px 18px;
  border: 1px solid var(--tb-border);
  border-radius: 999px;
  background: #fff;
  color: var(--tb-ink);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color .25s ease, color .25s ease, border-color .25s ease, transform .25s ease;
}
.tb-cat:hover { border-color: rgba(22, 158, 245, .4); color: var(--tb-blue); transform: translateY(-2px); }
.tb-cat.is-active { border-color: var(--tb-ink); background: var(--tb-ink); color: #fff; }

/* ---------- list ---------- */
.tb-list { padding: clamp(50px, 5vw, 100px) 0; background: #fff; }
.tb-grid { display: grid; grid-template-columns: 1fr; gap: 28px; }
@media (min-width: 640px) { .tb-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .tb-grid { grid-template-columns: repeat(3, 1fr); } }

.tb-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--tb-border);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 16px 36px -30px rgba(10, 50, 110, .5);
  transition: transform .45s cubic-bezier(.2, .8, .2, 1), box-shadow .45s ease, border-color .45s ease;
}
.tb-card:hover { transform: translateY(-8px); border-color: rgba(22, 158, 245, .18); box-shadow: 0 34px 60px -32px rgba(10, 50, 110, .5); }
.tb-card__media { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--tb-grey); }
.tb-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s cubic-bezier(.2, .8, .2, 1); }
.tb-card:hover .tb-card__media img { transform: scale(1.06); }
.tb-card__media .tb-chip { position: absolute; top: 14px; left: 14px; }
.tb-card__placeholder { display: grid; place-items: center; width: 100%; height: 100%; background: var(--tb-ink); color: var(--tb-yellow); font-size: 46px; }
.tb-card__body { display: flex; flex: 1; flex-direction: column; padding: 20px 22px 22px; }
.tb-card__body .tb-meta { margin-bottom: 10px; }
.tb-card__title { margin: 0 0 10px; font-size: 20px; font-weight: 700; line-height: 1.35; }
.tb-card__title a { color: inherit; text-decoration: none; background: linear-gradient(var(--tb-yellow), var(--tb-yellow)) 0 100% / 0 3px no-repeat; transition: background-size .4s ease; }
.tb-card:hover .tb-card__title a { background-size: 100% 3px; }
.tb-card__text { margin: 0 0 18px; font-size: 15px; line-height: 1.65; color: var(--tb-text); }
.tb-card__more { margin-top: auto; align-self: flex-start; color: var(--tb-ink); font-size: 14px; font-weight: 700; text-decoration: none; border-bottom: 2px solid var(--tb-yellow); }
.tb-card__more i { transition: transform .3s ease; }
.tb-card:hover .tb-card__more i { transform: translateX(4px); }

/* featured (first post on page 1) */
.tb-card--featured { margin-bottom: 34px; }
@media (min-width: 900px) {
  .tb-card--featured { display: grid; grid-template-columns: 1.15fr 1fr; }
  .tb-card--featured .tb-card__media { aspect-ratio: auto; min-height: 380px; }
  .tb-card--featured .tb-card__body { justify-content: center; padding: clamp(28px, 3vw, 56px); }
}
.tb-card--featured .tb-card__title { font-size: clamp(24px, 2.2vw, 36px); letter-spacing: -0.02em; }
.tb-card--featured .tb-card__text { font-size: 16px; }
.tb-card__flag { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 12px; color: var(--tb-blue); font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }

.tb-pages { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 50px; }
.tb-page {
  display: grid;
  place-items: center;
  min-width: 46px;
  height: 46px;
  padding: 0 10px;
  border: 1px solid var(--tb-border);
  border-radius: 14px;
  color: var(--tb-ink);
  font-weight: 700;
  text-decoration: none;
  transition: background-color .25s ease, color .25s ease, border-color .25s ease;
}
.tb-page:hover { border-color: var(--tb-ink); }
.tb-page.is-active { border-color: var(--tb-ink); background: var(--tb-ink); color: #fff; }

.tb-empty { max-width: 560px; margin: 0 auto; padding: 40px 20px; text-align: center; }
.tb-empty__icon { display: inline-grid; place-items: center; width: 76px; height: 76px; margin-bottom: 18px; border-radius: 50%; background: rgba(255, 215, 73, .4); color: var(--tb-ink); font-size: 32px; }
.tb-empty h2 { margin: 0 0 8px; font-size: 26px; font-weight: 700; }
.tb-empty a { color: var(--tb-blue); font-weight: 600; }

/* ---------- CTA ---------- */
.tb-cta { padding: 0 0 clamp(60px, 6vw, 110px); background: #fff; }
.tb-cta__box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(30px, 3.4vw, 56px);
  border-radius: 26px;
  background: var(--tb-yellow);
}
.tb-cta__box h2 { margin: 0 0 6px; font-size: clamp(24px, 2.4vw, 36px); font-weight: 800; letter-spacing: -0.02em; }
.tb-cta__box p { margin: 0; color: #2b2f36; }

/* ---------- article ---------- */
.tb-preview-bar { padding: 10px 16px; background: #fff3cd; color: #6b4e00; font-size: 14px; font-weight: 600; text-align: center; }
.tb-article__head { padding: clamp(40px, 4.5vw, 80px) 0 clamp(26px, 2.6vw, 40px); background: var(--tb-grey); }
.tb-article__head .container { max-width: 980px; }
.tb-chip--static { margin-bottom: 14px; }
.tb-article__title { margin: 0 0 18px; font-size: clamp(30px, 3.6vw, 52px); font-weight: 800; letter-spacing: -0.025em; line-height: 1.14; }
.tb-meta--lg { gap: 10px 22px; font-size: 14px; }
.tb-author { display: inline-flex; align-items: center; gap: 10px; color: var(--tb-ink); font-weight: 700; }
.tb-author__avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--tb-ink); color: var(--tb-yellow); font-size: 14px; }

.tb-cover { margin: -10px auto 0; max-width: 1100px; overflow: hidden; border-radius: 26px; box-shadow: 0 40px 80px -46px rgba(10, 50, 110, .6); }
.tb-cover img { display: block; width: 100%; max-height: 560px; object-fit: cover; cursor: zoom-in; }

.tb-article__layout { display: grid; grid-template-columns: 1fr; gap: 50px; padding: clamp(40px, 4vw, 70px) 0 clamp(50px, 5vw, 90px); }
@media (min-width: 992px) { .tb-article__layout { grid-template-columns: minmax(0, 1fr) 320px; } }
.tb-article__main { min-width: 0; max-width: 760px; }

/* readable article typography */
.tb-prose { color: #374151; font-size: 18px; line-height: 1.85; }
.tb-prose > * + * { margin-top: 1.15em; }
.tb-prose p { margin: 0; }
.tb-prose h2 { margin: 1.8em 0 .5em; font-size: clamp(24px, 2vw, 30px); font-weight: 800; letter-spacing: -0.015em; line-height: 1.25; }
.tb-prose h3 { margin: 1.5em 0 .4em; font-size: clamp(20px, 1.6vw, 24px); font-weight: 700; line-height: 1.3; }
.tb-prose h4 { margin: 1.3em 0 .3em; font-size: 19px; font-weight: 700; }
.tb-prose a { color: var(--tb-blue); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.tb-prose strong, .tb-prose b { color: var(--tb-ink); }
.tb-prose ul, .tb-prose ol { margin: 0; padding-left: 1.4em; }
.tb-prose li { margin: .4em 0; }
.tb-prose ul li::marker { color: var(--tb-blue); }
.tb-prose blockquote {
  margin: 1.6em 0;
  padding: 18px 24px;
  border-left: 5px solid var(--tb-yellow);
  border-radius: 0 16px 16px 0;
  background: var(--tb-grey);
  color: var(--tb-ink);
  font-size: 19px;
  font-style: italic;
}
.tb-prose blockquote p { margin: 0; }
.tb-prose img { max-width: 100%; height: auto; border-radius: 16px; cursor: zoom-in; }
.tb-prose .bp-figure { margin: 1.8em 0; }
.tb-prose .bp-figure img { display: block; width: 100%; box-shadow: 0 24px 50px -34px rgba(10, 50, 110, .6); }

.tb-gallery { margin-top: 44px; }
.tb-gallery__title { margin: 0 0 16px; font-size: 22px; font-weight: 700; }
.tb-gallery__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (min-width: 768px) { .tb-gallery__grid { grid-template-columns: repeat(3, 1fr); } }
.tb-gallery__item { display: block; padding: 0; overflow: hidden; border: 0; border-radius: 16px; background: var(--tb-grey); cursor: zoom-in; aspect-ratio: 4 / 3; }
.tb-gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2, .8, .2, 1); }
.tb-gallery__item:hover img, .tb-gallery__item:focus-visible img { transform: scale(1.07); }

.tb-share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--tb-border); }
.tb-share > span { margin-right: 6px; color: var(--tb-ink); font-weight: 700; }
.tb-share__btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border: 1px solid var(--tb-border);
  border-radius: 50%;
  background: #fff;
  color: var(--tb-ink);
  font-size: 18px;
  text-decoration: none;
  cursor: pointer;
  transition: transform .25s ease, background-color .25s ease, color .25s ease, border-color .25s ease;
}
.tb-share__btn:hover { transform: translateY(-3px); color: #fff; }
.tb-share__btn--wa:hover { background: #25d366; border-color: #25d366; }
.tb-share__btn--fb:hover { background: #1877f2; border-color: #1877f2; }
.tb-share__btn--in:hover { background: #0a66c2; border-color: #0a66c2; }
.tb-share__btn--copy:hover { background: var(--tb-ink); border-color: var(--tb-ink); }
.tb-share__copied { position: absolute; bottom: calc(100% + 8px); left: 50%; padding: 4px 10px; border-radius: 8px; background: var(--tb-ink); color: #fff; font-size: 12px; white-space: nowrap; transform: translateX(-50%); opacity: 0; pointer-events: none; transition: opacity .25s ease; }
.tb-share__copied:not(:empty) { opacity: 1; }

/* sidebar */
.tb-article__side { display: grid; align-content: start; gap: 26px; }
@media (min-width: 992px) { .tb-article__side { position: sticky; top: 110px; } }
.tb-side-cta { padding: 28px 24px; border-radius: 22px; background: var(--tb-ink); color: rgba(255, 255, 255, .75); }
.tb-side-cta__icon { display: grid; place-items: center; width: 50px; height: 50px; margin-bottom: 16px; border-radius: 14px; background: var(--tb-yellow); color: var(--tb-ink); font-size: 22px; }
.tb-side-cta h2 { margin: 0 0 8px; color: #fff; font-size: 21px; font-weight: 700; }
.tb-side-cta p { margin: 0 0 18px; font-size: 14px; line-height: 1.65; }
.tb-side-cta .tb-btn { background: var(--tb-yellow); color: var(--tb-ink); box-shadow: none; }
.tb-side-cta .tb-btn:hover { background: #fff; color: var(--tb-ink); }
.tb-side-cta__call { display: block; margin-top: 12px; color: #fff; font-weight: 600; text-align: center; text-decoration: none; }
.tb-side-cta__call:hover { color: var(--tb-yellow); }
.tb-side-list { padding: 22px; border: 1px solid var(--tb-border); border-radius: 22px; background: #fff; }
.tb-side-list h2 { margin: 0 0 14px; font-size: 18px; font-weight: 700; }
.tb-side-post { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--tb-border); color: inherit; text-decoration: none; }
.tb-side-post:first-of-type { border-top: 0; padding-top: 0; }
.tb-side-post__img { display: grid; flex: 0 0 72px; place-items: center; height: 56px; overflow: hidden; border-radius: 10px; background: var(--tb-ink); color: var(--tb-yellow); }
.tb-side-post__img img { width: 100%; height: 100%; object-fit: cover; }
.tb-side-post strong { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--tb-ink); font-size: 14px; line-height: 1.4; }
.tb-side-post small { color: var(--tb-muted); font-size: 12px; }
.tb-side-post:hover strong { color: var(--tb-blue); }

.tb-related { padding: clamp(50px, 5vw, 90px) 0; background: var(--tb-grey); }
.tb-related__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.tb-related__head h2 { margin: 0; font-size: clamp(26px, 2.4vw, 36px); font-weight: 800; }
.tb-related__head a { color: var(--tb-ink); font-weight: 700; text-decoration: none; border-bottom: 2px solid var(--tb-yellow); }

/* image viewer */
.tb-viewer { position: fixed; inset: 0; z-index: 10000; display: grid; place-items: center; padding: 60px 70px; background: rgba(6, 14, 28, .9); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.tb-viewer[hidden] { display: none; }
.tb-viewer__img { max-width: 100%; max-height: 100%; border-radius: 14px; box-shadow: 0 40px 100px -20px rgba(0, 0, 0, .7); animation: tbPop .35s cubic-bezier(.2, .8, .2, 1); }
@keyframes tbPop { from { opacity: 0; transform: scale(.95); } }
.tb-viewer__close, .tb-viewer__nav {
  position: absolute;
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}
.tb-viewer__close:hover, .tb-viewer__nav:hover { background: var(--tb-yellow); color: var(--tb-ink); }
.tb-viewer__close { top: 16px; right: 16px; }
.tb-viewer__nav--prev { left: 14px; top: 50%; transform: translateY(-50%); }
.tb-viewer__nav--next { right: 14px; top: 50%; transform: translateY(-50%); }
html.tb-viewer-open { overflow: hidden; }
@media (max-width: 575.98px) { .tb-viewer { padding: 70px 10px; } .tb-viewer__nav { top: auto; bottom: 14px; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .tb-card, .tb-card__media img, .tb-gallery__item img, .tb-viewer__img { transition: none; animation: none; }
}
