/* =========================================================
   Tweakit Blog – theme templates (blog grid, category, single post)
   Design tokens from tweakitmedia.co.uk home page
   ========================================================= */
.tw-blog-page *, .tw-single * { box-sizing: border-box; }

.tw-blog-page, .tw-single {
  --tw-blue: #0A6CFF;
  --tw-blue-hover: #0057E6;
  --tw-ink: #000;
  --tw-text: #1A1A1A;
  --tw-muted: #6A717A;
  --tw-line: #DCE1E7;
  --tw-soft: #F5F7FA;
  --tw-navy: #0A1A2F;
  --tw-medium: "Neue Haas Display Medium", "Helvetica Neue", Arial, sans-serif;
  --tw-roman: "Neue Haas Display Roman", "Helvetica Neue", Arial, sans-serif;
}
.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}

/* ---------- Shared meta ---------- */
.tw-meta {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--tw-roman); font-size: 14px; line-height: 20px; color: var(--tw-muted);
}
.tw-meta__dot { width: 3px; height: 3px; border-radius: 50%; background: #A3AAB3; flex: 0 0 3px; }

/* ---------- Topic filter ---------- */
.tw-topics { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 40px; }
.tw-topic {
  display: inline-flex; align-items: center;
  padding: 9px 18px;
  border: 1px solid var(--tw-line); border-radius: 999px;
  background: #fff;
  font-family: var(--tw-medium); font-size: 14px; line-height: 20px; color: var(--tw-text) !important;
  text-decoration: none !important;
  transition: border-color .2s, color .2s, background .2s;
}
.tw-topic:hover { border-color: var(--tw-blue); color: var(--tw-blue) !important; }
.tw-topic.is-active { background: var(--tw-blue); border-color: var(--tw-blue); color: #fff !important; }

/* ---------- Cards ---------- */
.tw-card {
  position: relative;
  display: flex; flex-direction: column;
  background: #fff;
  border: 1px solid var(--tw-line); border-radius: 16px;
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.tw-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(10,26,47,.08); border-color: #CBD3DD; }
.tw-card__media {
  display: block; position: relative;
  aspect-ratio: 16 / 10; overflow: hidden;
  background: var(--tw-soft);
}
.tw-card__media img, .tw-media__img {
  display: block; width: 100% !important; height: 100% !important;
  object-fit: cover; transition: transform .5s ease;
}
.tw-card:hover .tw-card__media img { transform: scale(1.04); }
.tw-media__placeholder {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background-color: #0B162C;
  background-image:
    radial-gradient(rgba(150,175,225,.35) 1px, transparent 1.6px),
    radial-gradient(ellipse 60% 70% at 50% 60%, rgba(16,58,150,.7), transparent 70%);
  background-size: 18px 18px, 100% 100%;
}
.tw-media__placeholder span { font-family: "Neue Haas Display Medium", Arial, sans-serif; font-size: 18px; color: rgba(255,255,255,.85); }

.tw-card__body { display: flex; flex-direction: column; flex: 1; padding: 26px 28px 28px; }
.tw-card__cat {
  position: relative; z-index: 2; align-self: flex-start;
  margin-bottom: 12px;
  font-family: var(--tw-medium); font-size: 14px; line-height: 20px;
  color: var(--tw-blue) !important; text-decoration: none !important;
}
.tw-card__cat:hover { color: var(--tw-blue-hover) !important; }
.tw-card__title {
  margin: 0 0 12px !important; padding: 0 !important;
  font-family: var(--tw-medium) !important; font-weight: 400 !important;
  font-size: 22px !important; line-height: 30px !important; color: var(--tw-ink) !important;
  letter-spacing: 0 !important;
}
.tw-card__title a { color: inherit !important; text-decoration: none !important; }
.tw-card__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.tw-card:hover .tw-card__title a { color: var(--tw-blue) !important; }
.tw-card__excerpt {
  margin: 0 0 24px !important;
  font-family: var(--tw-roman); font-size: 16px; line-height: 24px; color: var(--tw-muted);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.tw-card__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.tw-card__more { font-family: var(--tw-medium); font-size: 16px; line-height: 24px; color: var(--tw-blue); }

/* Featured */
.tw-featured { margin-bottom: 50px; }
.tw-card--featured { display: grid; grid-template-columns: 1.15fr 1fr; }
.tw-card--featured .tw-card__media { aspect-ratio: auto; min-height: 440px; height: 100%; }
.tw-card--featured .tw-card__media img,
.tw-card--featured .tw-media__img { position: absolute; inset: 0; }
.tw-card--featured .tw-card__body { padding: 48px 48px 44px; justify-content: center; }
.tw-card--featured .tw-card__title { font-size: 32px !important; line-height: 42px !important; margin-bottom: 16px !important; }
.tw-card--featured .tw-card__excerpt { font-size: 17px; line-height: 27px; -webkit-line-clamp: 4; margin-bottom: 32px !important; }
.tw-card--featured .tw-card__body::before {
  content: "Featured"; align-self: flex-start;
  margin-bottom: 18px; padding: 5px 12px; border-radius: 999px;
  background: #EAF1FF; color: var(--tw-blue);
  font-family: var(--tw-medium); font-size: 13px; line-height: 18px;
}

/* Grid */
.tw-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; }

/* Pagination */
.tw-pagination { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 60px; }
.tw-pagination .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; height: 44px; padding: 0 12px;
  border: 1px solid var(--tw-line); border-radius: 8px; background: #fff;
  font-family: var(--tw-medium); font-size: 16px; color: var(--tw-text) !important; text-decoration: none !important;
  transition: border-color .2s, color .2s;
}
.tw-pagination a.page-numbers:hover { border-color: var(--tw-blue); color: var(--tw-blue) !important; }
.tw-pagination .page-numbers.current { background: var(--tw-blue); border-color: var(--tw-blue); color: #fff !important; }
.tw-pagination .page-numbers.dots { border-color: transparent; background: none; }
.tw-empty { font-family: var(--tw-roman); font-size: 16px; color: var(--tw-muted); }

/* ---------- Single: header ---------- */
.tw-crumbs {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin-bottom: 28px;
  font-family: var(--tw-roman); font-size: 14px; line-height: 20px; color: #A3AAB3;
}
.tw-crumbs a { color: var(--tw-muted) !important; text-decoration: none !important; }
.tw-crumbs a:hover { color: var(--tw-blue) !important; }

.tw-post-head { max-width: 860px; }
.tw-pill {
  display: inline-block; margin-bottom: 20px;
  padding: 6px 14px; border-radius: 999px;
  background: #EAF1FF;
  font-family: var(--tw-medium); font-size: 14px; line-height: 20px;
  color: var(--tw-blue) !important; text-decoration: none !important;
}
.tw-pill:hover { background: #DCE8FF; }
.tw-post-head__title {
  margin: 0 0 20px !important; padding: 0 !important;
  font-family: var(--tw-medium) !important; font-weight: 400 !important;
  font-size: 48px !important; line-height: 56px !important; color: var(--tw-ink) !important;
}
.tw-post-head__lede {
  max-width: 760px; margin: 0 0 28px !important;
  font-family: var(--tw-roman); font-size: 20px; line-height: 30px; color: var(--tw-text);
}
.tw-post-head__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.tw-avatar { border-radius: 50%; display: block; }
.tw-post-head__by { font-family: var(--tw-medium); font-size: 15px; line-height: 20px; color: var(--tw-ink); }

.tw-post-image { margin: 0; }
.tw-post-image img {
  display: block; width: 100%; height: auto; max-height: 620px;
  object-fit: cover; border-radius: 16px;
}
.tw-post-image figcaption {
  margin-top: 12px;
  font-family: "Neue Haas Display Roman", Arial, sans-serif; font-size: 14px; color: #6A717A;
}

/* ---------- Single: article typography ---------- */
.tw-content {
  font-family: "Neue Haas Display Roman", "Helvetica Neue", Arial, sans-serif;
  font-size: 18px; line-height: 30px; color: #1A1A1A;
}
.tw-content p { margin: 0 0 24px; font-size: 18px; line-height: 30px; }
.tw-content h2,
.tw-content h3,
.tw-content h4 {
  font-family: "Neue Haas Display Medium", "Helvetica Neue", Arial, sans-serif;
  font-weight: 400; color: #000; padding: 0; scroll-margin-top: 120px;
}
.tw-content h2 { font-size: 32px; line-height: 42px; margin: 56px 0 18px; }
.tw-content h3 { font-size: 24px; line-height: 32px; margin: 40px 0 14px; }
.tw-content h4 { font-size: 20px; line-height: 28px; margin: 32px 0 12px; }
.tw-content > *:first-child,
.tw-content .wpb_wrapper > *:first-child { margin-top: 0; }
.tw-content a { color: #0A6CFF; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.tw-content a:hover { color: #0057E6; }
.tw-content strong { font-family: "Neue Haas Display Medium", Arial, sans-serif; font-weight: 400; color: #000; }
.tw-content ul,
.tw-content ol { margin: 0 0 28px; padding: 0; list-style: none; }
.tw-content ul li,
.tw-content ol li { position: relative; margin: 0 0 12px; padding-left: 30px; }
.tw-content ul li::before {
  content: ""; position: absolute; left: 6px; top: 12px;
  width: 7px; height: 7px; border-radius: 50%; background: #0A6CFF;
}
.tw-content ol { counter-reset: tw-ol; }
.tw-content ol li { counter-increment: tw-ol; }
.tw-content ol li::before {
  content: counter(tw-ol) "."; position: absolute; left: 0; top: 0;
  font-family: "Neue Haas Display Medium", Arial, sans-serif; color: #0A6CFF;
}
.tw-content blockquote {
  margin: 40px 0; padding: 4px 0 4px 28px;
  border-left: 3px solid #0A6CFF; background: none;
  font-family: "Neue Haas Display Medium", Arial, sans-serif;
  font-size: 22px; line-height: 32px; color: #000; font-style: normal;
}
.tw-content blockquote p { font-size: inherit; line-height: inherit; margin-bottom: 12px; }
.tw-content blockquote cite { display: block; font-family: "Neue Haas Display Roman", Arial, sans-serif; font-size: 15px; color: #6A717A; font-style: normal; }
.tw-content img { max-width: 100%; height: auto; border-radius: 12px; }
.tw-content figure { margin: 40px 0; }
.tw-content figcaption { margin-top: 10px; font-size: 14px; line-height: 20px; color: #6A717A; }
.tw-content hr { border: 0; border-top: 1px solid #DCE1E7; margin: 48px 0; }
.tw-content table { width: 100%; border-collapse: collapse; margin: 0 0 28px; font-size: 16px; line-height: 24px; }
.tw-content th,
.tw-content td { padding: 12px 16px; border: 1px solid #DCE1E7; text-align: left; vertical-align: top; }
.tw-content th { background: #F5F7FA; font-family: "Neue Haas Display Medium", Arial, sans-serif; font-weight: 400; color: #000; }
.tw-content code { padding: 2px 6px; border-radius: 4px; background: #F5F7FA; font-size: .9em; }

/* ---------- Author + prev/next ---------- */
.tw-author {
  display: flex; gap: 20px; align-items: flex-start;
  margin-top: 56px; padding: 28px;
  background: var(--tw-soft); border-radius: 16px;
}
.tw-author .tw-avatar { flex: 0 0 64px; }
.tw-author p { margin: 0 !important; }
.tw-author__label { font-family: var(--tw-roman); font-size: 14px; line-height: 20px; color: var(--tw-muted); }
.tw-author__name { font-family: var(--tw-medium); font-size: 18px; line-height: 26px; color: var(--tw-ink); margin-bottom: 6px !important; }
.tw-author__bio { font-family: var(--tw-roman); font-size: 16px; line-height: 24px; color: var(--tw-muted); }

.tw-post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 32px; }
.tw-post-nav__item {
  display: flex; flex-direction: column; gap: 6px;
  padding: 20px 24px;
  border: 1px solid var(--tw-line); border-radius: 12px;
  text-decoration: none !important; transition: border-color .2s;
}
.tw-post-nav__item:hover { border-color: var(--tw-blue); }
.tw-post-nav__item--next { text-align: right; }
.tw-post-nav__dir { font-family: var(--tw-roman); font-size: 14px; line-height: 20px; color: var(--tw-muted); }
.tw-post-nav__title { font-family: var(--tw-medium); font-size: 17px; line-height: 24px; color: var(--tw-ink); }
.tw-post-nav__item:hover .tw-post-nav__title { color: var(--tw-blue); }

/* ---------- Sidebar ---------- */
.tw-aside {
  position: sticky; top: 120px;
  display: flex; flex-direction: column; gap: 28px;
  padding-left: 30px;
}
.tw-aside__label { margin: 0 0 12px !important; font-family: var(--tw-medium); font-size: 14px; line-height: 20px; color: var(--tw-ink); }
.tw-toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid #E6EAF0; }
.tw-toc li { margin: 0; padding: 0; }
.tw-toc li::before { display: none; }
.tw-toc a {
  display: block; margin-left: -2px; padding: 7px 0 7px 16px;
  border-left: 2px solid transparent;
  font-family: var(--tw-roman); font-size: 15px; line-height: 22px;
  color: var(--tw-muted) !important; text-decoration: none !important;
  transition: color .2s, border-color .2s;
}
.tw-toc a:hover { color: var(--tw-blue) !important; border-left-color: var(--tw-blue); }

.tw-aside-cta { padding: 28px; border-radius: 16px; background: var(--tw-navy); }
.tw-aside-cta__title { margin: 0 0 10px !important; font-family: var(--tw-medium); font-size: 22px; line-height: 30px; color: #fff; }
.tw-aside-cta__text { margin: 0 0 22px !important; font-family: var(--tw-roman); font-size: 15px; line-height: 23px; color: #C9D3E1; }
.tw-aside-cta__btn {
  display: flex; align-items: center; justify-content: center;
  height: 50px; border-radius: 8px; background: var(--tw-blue);
  font-family: var(--tw-medium); font-size: 16px; color: #fff !important; text-decoration: none !important;
  transition: background .2s;
}
.tw-aside-cta__btn:hover { background: var(--tw-blue-hover); }

.tw-share__links { display: flex; flex-wrap: wrap; gap: 8px; }
.tw-share__links a,
.tw-share__copy {
  display: inline-flex; align-items: center; justify-content: center;
  height: 40px; min-width: 40px; padding: 0 12px;
  border: 1px solid var(--tw-line); border-radius: 999px; background: #fff;
  font-family: var(--tw-medium); font-size: 14px; line-height: 1; color: var(--tw-text) !important;
  text-decoration: none !important; cursor: pointer;
  transition: border-color .2s, color .2s, background .2s;
}
.tw-share__links a:hover, .tw-share__copy:hover { border-color: var(--tw-blue); color: var(--tw-blue) !important; }
.tw-share__copy.is-done { background: var(--tw-blue); border-color: var(--tw-blue); color: #fff !important; }


/* ---------- Sections (inside Impreza's .l-section container) ---------- */
.l-section.tw-sec { padding-top: 0 !important; padding-bottom: 0 !important; }
.l-section.tw-sec--hero      { padding-top: 80px !important; padding-bottom: 30px !important; }
.l-section.tw-sec--list      { padding-top: 30px !important; padding-bottom: 80px !important; }
.l-section.tw-sec--post-head { padding-top: 60px !important; padding-bottom: 40px !important; }
.l-section.tw-sec--post-image{ padding-bottom: 60px !important; }
.l-section.tw-sec--post-body { padding-bottom: 80px !important; }
.l-section.tw-sec--related   { padding-top: 80px !important; padding-bottom: 80px !important; background: #F5F7FA; }
.l-section.tw-cta            { padding-top: 80px !important; padding-bottom: 80px !important; background: #F7F8FA; }

/* ---------- Type (matches home page) ---------- */
.tw-eyebrow {
  margin: 0 0 20px !important;
  font-family: "Neue Haas Display Light", "Helvetica Neue", Arial, sans-serif; font-weight: 400;
  font-size: 14px; line-height: 24px; color: #0A6CFF;
}
.tw-h1 {
  margin: 0 0 22px !important; padding: 0 !important;
  font-family: "Neue Haas Display Medium", "Helvetica Neue", Arial, sans-serif !important; font-weight: 400 !important;
  font-size: 48px !important; line-height: 53px !important; color: #000 !important; letter-spacing: 0 !important;
}
.tw-h2 {
  margin: 0 0 20px !important; padding: 0 !important;
  font-family: "Neue Haas Display Medium", "Helvetica Neue", Arial, sans-serif !important; font-weight: 400 !important;
  font-size: 32px !important; line-height: 42px !important; color: #000 !important; letter-spacing: 0 !important;
}
.tw-text {
  margin: 0 !important;
  font-family: "Neue Haas Display Roman", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px; line-height: 24px; color: #000;
}
.tw-intro { max-width: 560px; }

.tw-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 15px 20px; border: 1px solid #0A6CFF; border-radius: 8px; background: #0A6CFF;
  font-family: "Neue Haas Display Medium", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px; line-height: 20px; color: #fff !important; text-decoration: none !important;
  transition: background .2s, border-color .2s;
}
.tw-btn:hover { background: #0057E6; border-color: #0057E6; color: #fff !important; }

/* ---------- Single layout ---------- */
.tw-single-layout { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 30px; align-items: stretch; }
.tw-related__title { margin-bottom: 40px !important; }
.tw-related__btn { margin-top: 50px; }
/* posts built with WPBakery: keep rows inside the article column */
.tw-content .l-section { padding: 0 !important; background: none !important; }
.tw-content .l-section-h { padding: 0 !important; max-width: none !important; }
.tw-content .wp-block-image { margin: 40px 0; }
.tw-content .alignwide, .tw-content .alignfull { margin-left: 0; margin-right: 0; width: 100%; }

/* ---------- CTA (copy of the home page "Ready to Start?" row) ---------- */
.tw-cta__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: center; }
.tw-cta__title { max-width: 520px; }
.tw-cta__text { margin-bottom: 70px !important; }
.tw-cta__img { display: block; max-width: 100%; height: auto; }
.tw-cta__subtitle {
  margin: 0 0 20px !important; padding: 0 !important;
  font-family: "Neue Haas Display Medium", "Helvetica Neue", Arial, sans-serif !important; font-weight: 400 !important;
  font-size: 18px !important; line-height: 27px !important; color: #000 !important;
}
.tw-ticks { list-style: none !important; margin: 0 0 65px !important; padding: 0 !important; }
.tw-ticks li {
  position: relative; margin: 0 0 14px !important; padding: 0 0 0 32px !important; list-style: none !important;
  font-family: "Neue Haas Display Roman", "Helvetica Neue", Arial, sans-serif; font-size: 16px; line-height: 24px; color: #1A1A1A;
}
.tw-ticks li::before {
  content: ""; position: absolute; left: 0; top: 2px; width: 20px; height: 20px; border-radius: 50%;
  background: #0A6CFF url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 10.5l2.6 2.5L14 7.5'/%3E%3C/svg%3E") no-repeat center / 20px 20px;
}
.tw-cta__note {
  margin: 20px 0 0 !important;
  font-family: "Neue Haas Display Roman", "Helvetica Neue", Arial, sans-serif; font-size: 16px; line-height: 24px; color: #000;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .l-section.tw-sec--hero { padding-top: 50px !important; }
  .l-section.tw-sec--list, .l-section.tw-sec--related, .l-section.tw-cta, .l-section.tw-sec--post-body { padding-bottom: 50px !important; }
  .l-section.tw-sec--related, .l-section.tw-cta { padding-top: 50px !important; }
  .tw-single-layout { grid-template-columns: 1fr; gap: 0; }
  .tw-cta__grid { grid-template-columns: 1fr; }
  .tw-cta__text { margin-bottom: 0 !important; }
  .tw-cta__img { margin: 50px auto; }
  .tw-cta__right { text-align: left; }
  .tw-ticks { margin-bottom: 35px !important; }
  .tw-cta__note { display: none; }
  .tw-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
  .tw-card--featured { grid-template-columns: 1fr; }
  .tw-card--featured .tw-card__media { min-height: 0; height: auto; aspect-ratio: 16 / 9; }
  .tw-card--featured .tw-card__body { padding: 32px; }
  .tw-aside { position: static; padding-left: 0; margin-top: 48px; }
  .tw-post-head__title { font-size: 40px !important; line-height: 48px !important; }
}
@media (max-width: 767px) {
  .l-section.tw-sec--hero, .l-section.tw-sec--post-head { padding-top: 30px !important; }
  .l-section.tw-sec--list, .l-section.tw-sec--related, .l-section.tw-cta, .l-section.tw-sec--post-body { padding-bottom: 30px !important; }
  .l-section.tw-sec--related, .l-section.tw-cta { padding-top: 30px !important; }
  .l-section.tw-sec--post-image { padding-bottom: 30px !important; }
  .tw-h1 { font-size: 34px !important; line-height: 42px !important; }
  .tw-h2 { font-size: 26px !important; line-height: 34px !important; }
  .tw-grid { grid-template-columns: 1fr; }
  .tw-topics { flex-wrap: nowrap; overflow-x: auto; margin-left: -20px; margin-right: -20px; padding: 0 20px 4px; scrollbar-width: none; }
  .tw-topics::-webkit-scrollbar { display: none; }
  .tw-topic { white-space: nowrap; }
  .tw-card__body { padding: 22px 22px 24px; }
  .tw-card--featured .tw-card__body { padding: 24px 22px; }
  .tw-card--featured .tw-card__title { font-size: 26px !important; line-height: 34px !important; }
  .tw-post-head__title { font-size: 32px !important; line-height: 40px !important; }
  .tw-post-head__lede { font-size: 18px; line-height: 28px; }
  .tw-content p, .tw-content { font-size: 17px; line-height: 28px; }
  .tw-content h2 { font-size: 26px; line-height: 34px; margin-top: 44px; }
  .tw-content h3 { font-size: 21px; line-height: 29px; }
  .tw-post-nav { grid-template-columns: 1fr; }
  .tw-post-nav__item--next { text-align: left; }
  .tw-author { flex-direction: column; }
}
