/* Thimze Blog: index redesign (v2). Scoped to .thimze-blog-wrapper so the single-post styles are untouched. */

/* Edge-to-edge hero.
   style.css gives .thimze-hero 40px side padding but no border-box, so width:100vw + padding was wider than the
   viewport (80px at desktop, 40px on mobile). border-box + clip on the root removes the horizontal scroll. */
html:has(.thimze-blog-wrapper),
body:has(.thimze-blog-wrapper) { overflow-x: clip; }
.thimze-blog-wrapper .thimze-hero {
    box-sizing: border-box;
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

.thimze-blog-wrapper .tbx {
    --tb-blue: #04C2F4;
    --tb-navy: #211c2f;
    --tb-muted: #6B7280;
    --tb-line: #E5E7EB;
    --tb-soft: #F6F9FB;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
    color: #141414;
    box-sizing: border-box;
}
.thimze-blog-wrapper .tbx *, .thimze-blog-wrapper .tbx *::before, .thimze-blog-wrapper .tbx *::after { box-sizing: border-box; }
.thimze-blog-wrapper .tbx a { text-decoration: none; box-shadow: none; }
.thimze-blog-wrapper .tbx img { display: block; max-width: 100%; }

/* Title + tab bar */
.tbx-bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 44px 0 26px; }
.thimze-blog-wrapper .tbx-title { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -.03em; line-height: 1.2; color: #141414; }
.tbx-tabs { display: flex; gap: 4px; background: #fff; border: 1px solid var(--tb-line); border-radius: 999px; padding: 4px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.tbx-tabs::-webkit-scrollbar { display: none; }
.thimze-blog-wrapper .tbx a.tbx-tab { padding: 10px 18px; border-radius: 999px; font-weight: 700; font-size: 14px; line-height: 1.2; white-space: nowrap; color: #374151; transition: background .2s, color .2s; }
.thimze-blog-wrapper .tbx a.tbx-tab:hover { background: var(--tb-soft); color: #141414; }
.thimze-blog-wrapper .tbx a.tbx-tab.is-active { background: #111; color: #fff; }

/* Layout */
.tbx-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; align-items: start; }
.tbx-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }

/* Cards */
.tbx-card { position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid #E8ECF0; border-radius: 22px; overflow: hidden; transition: border-color .25s; }
.tbx-card:hover { border-color: #C9D2DA; }
/* Themes love to add padding/margin to <article>; keep the card flush so the footer sits where we put it. */
.thimze-blog-wrapper .tbx .tbx-grid .tbx-card { margin: 0; padding: 0; height: auto; min-height: 0; }
.tbx-im { position: relative; overflow: hidden; aspect-ratio: 1.8; background: linear-gradient(135deg, #e8edf1, #cfd8df); }
.thimze-blog-wrapper .tbx-im img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.tbx-card:hover .tbx-im img { transform: scale(1.05); }
.thimze-blog-wrapper .tbx-tag { position: absolute; left: 14px; top: 14px; display: inline-flex; align-items: center; background: rgba(255,255,255,.92); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); color: #111; font-size: 12px; font-weight: 800; line-height: 1; padding: 8px 13px; border-radius: 999px; box-shadow: 0 6px 16px -6px rgba(0,0,0,.35); }

/* Card body. No flex gap: spacing is explicit so the gap above the divider is exactly 22px
   (the footer is pinned with margin-top:auto, so a taller sibling in the row only ever adds to it). */
.thimze-blog-wrapper .tbx .tbx-card .tbx-cb { display: flex; flex-direction: column; flex: 1 1 auto; gap: 0; margin: 0; padding: 20px 22px; }
.thimze-blog-wrapper .tbx .tbx-card .tbx-card-title { margin: 0 0 10px; padding: 0; font-size: 19px; font-weight: 800; letter-spacing: -.02em; line-height: 1.28; }
.thimze-blog-wrapper .tbx-card-title a { color: #141414; }
.thimze-blog-wrapper .tbx-card-title a::after { content: ""; position: absolute; inset: 0; z-index: 1; } /* whole card is clickable */
/* Excerpt capped at 3 lines so cards in a row stay close in height. */
.thimze-blog-wrapper .tbx .tbx-card .tbx-card-desc { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; margin: 0 0 22px; padding: 0; font-size: 14px; line-height: 1.6; color: var(--tb-muted); }

/* Footer: divider, then 16px, then author + pill; the card body adds the 20px below.
   The author block never shrinks below 140px (name may ellipsize, the date never does); if author + pill can't fit
   on one line (very narrow cards) the pill wraps underneath instead of squeezing the text. */
.thimze-blog-wrapper .tbx .tbx-card .tbx-ft { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 10px; height: auto; min-height: 0; margin: auto 0 0; padding: 16px 0 0; border: 0; border-top: 1px solid var(--tb-line); }

/* Author chip */
.thimze-blog-wrapper .tbx .tbx-ft .tbx-au { display: flex; align-items: center; gap: 10px; flex: 1 1 0; min-width: 140px; margin: 0; padding: 0; line-height: 1; }
/* 38x38 circle, every dimension pinned so no theme span/img rule can squash it. Initials sit underneath the <img>;
   if the avatar 404s the <img> removes itself (onerror) and the initials show. */
.thimze-blog-wrapper .tbx .tbx-ft .tbx-av { position: relative; display: flex; align-items: center; justify-content: center; flex: 0 0 38px; width: 38px; min-width: 38px; max-width: 38px; height: 38px; min-height: 38px; max-height: 38px; aspect-ratio: 1 / 1; margin: 0; padding: 0; border: 0; border-radius: 50%; overflow: hidden; line-height: 1; vertical-align: middle; background: linear-gradient(135deg, var(--tb-blue), #0AA8D4); box-shadow: 0 0 0 3px #E7F8FE; }
.thimze-blog-wrapper .tbx .tbx-ft .tbx-av .tbx-av-i { position: relative; z-index: 0; display: block; width: auto; height: auto; margin: 0; padding: 0; border: 0; transform: none; color: #0F1226; font-size: 13px; font-weight: 800; line-height: 1; letter-spacing: 0; text-align: center; text-transform: uppercase; }
.thimze-blog-wrapper .tbx .tbx-ft .tbx-av img { position: absolute; inset: 0; z-index: 1; display: block; width: 100%; height: 100%; max-width: none; min-height: 0; margin: 0; padding: 0; border: 0; border-radius: 50%; object-fit: cover; box-shadow: none; }
/* Name + date stacked and vertically centred next to the avatar */
.thimze-blog-wrapper .tbx .tbx-ft .tbx-au-t { display: flex; flex-direction: column; justify-content: center; min-width: 0; margin: 0; padding: 0; line-height: 1.2; }
.thimze-blog-wrapper .tbx .tbx-ft .tbx-au-t b { display: block; margin: 0; padding: 0; font-size: 13.5px; font-weight: 700; line-height: 1.2; color: #141414; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thimze-blog-wrapper .tbx .tbx-ft .tbx-au-t small { display: block; margin: 2px 0 0; padding: 0; font-size: 12.5px; font-weight: 600; line-height: 1.2; color: var(--tb-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Read story pill: fixed 44px high (1px border + 5px + 32px circle + 5px + 1px), label and circle both centred on
   the same axis. line-height:1, no transforms, overflow visible, and only colour properties transition. */
.thimze-blog-wrapper .tbx .tbx-ft .tbx-rd { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; gap: 10px; height: 44px; min-height: 44px; margin: 0; padding: 0 5px 0 16px; border: 1px solid #D1D5DB; border-radius: 999px; background-color: #fff; color: #141414; font-size: 13.5px; font-weight: 700; line-height: 1; letter-spacing: 0; text-transform: none; white-space: nowrap; overflow: visible; transform: none; vertical-align: middle; transition: background-color .25s, color .25s, border-color .25s; }
.thimze-blog-wrapper .tbx .tbx-ft .tbx-rd s { display: flex; align-items: center; justify-content: center; flex: 0 0 32px; width: 32px; min-width: 32px; height: 32px; min-height: 32px; margin: 0; padding: 0; border: 0; border-radius: 50%; background: var(--tb-blue); color: #0F1226; line-height: 1; text-decoration: none; transition: transform .25s; }
.thimze-blog-wrapper .tbx .tbx-ft .tbx-rd s svg { display: block; width: 16px; height: 16px; margin: 0; padding: 0; transform: rotate(-45deg); transition: transform .25s; }
.thimze-blog-wrapper .tbx .tbx-card:hover .tbx-ft .tbx-rd { background-color: #111; color: #fff; border-color: #111; transform: none; overflow: visible; }
.thimze-blog-wrapper .tbx .tbx-card:hover .tbx-ft .tbx-rd s { transform: translateX(2px); }
.thimze-blog-wrapper .tbx .tbx-card:hover .tbx-ft .tbx-rd s svg { transform: rotate(0); }

/* Pagination */
.thimze-blog-wrapper .tbx-pager { margin: 40px 0 0; }
.thimze-blog-wrapper .tbx-pager ul { gap: 8px; justify-content: center; flex-wrap: wrap; }
.thimze-blog-wrapper .tbx-pager a,
.thimze-blog-wrapper .tbx-pager span { min-width: 44px; height: 44px; padding: 0 14px; border: 1px solid #D1D5DB; border-radius: 10px; font-weight: 700; font-size: 14px; color: #141414; background: #fff; }
.thimze-blog-wrapper .tbx-pager a:hover { border-color: #111; background: var(--tb-soft); color: #141414; }
.thimze-blog-wrapper .tbx-pager .current { background: #111; border-color: #111; color: #fff; }

/* Sidebar */
.tbx-side { position: sticky; top: 20px; display: flex; flex-direction: column; gap: 20px; }
.thimze-blog-wrapper .tbx .tbx-side { float: none; width: auto; margin: 0; padding: 0; background: transparent; border: 0; }
.tbx-panel { background: var(--tb-soft); border: 1px solid #E8ECF0; border-radius: 20px; padding: 22px; }
.tbx-panel-white { background: #fff; }
.thimze-blog-wrapper .tbx-panel h3 { margin: 0 0 12px; padding: 0; font-size: 17px; font-weight: 800; letter-spacing: -.015em; line-height: 1.3; color: #141414; }

/* Shared 64/68px thumbnail box. The <img> is absolutely filled, so the box size is the thumbnail size
   whatever width/height attributes or theme img rules say. */
.thimze-blog-wrapper .tbx .tbx-side .tbx-fi-img { position: relative; display: block; overflow: hidden; margin: 0; padding: 0; border: 0; line-height: 0; background: linear-gradient(135deg, #e8edf1, #cfd8df); }
.thimze-blog-wrapper .tbx .tbx-side .tbx-fi-img img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; max-width: none; min-height: 0; margin: 0; padding: 0; border: 0; border-radius: 0; object-fit: cover; box-shadow: none; }

/* Featured: compact rows. 64px thumb, date over bold 14px title, 12px padding, hairline between rows. */
.thimze-blog-wrapper .tbx .tbx-side a.tbx-fi { display: flex; align-items: center; gap: 14px; width: auto; height: auto; min-height: 0; margin: 0; padding: 12px 0; border: 0; border-top: 1px solid var(--tb-line); float: none; color: #141414; line-height: 1.3; text-decoration: none; }
.thimze-blog-wrapper .tbx .tbx-side .tbx-panel h3 + a.tbx-fi { border-top: 0; }
.thimze-blog-wrapper .tbx .tbx-side .tbx-fi .tbx-fi-img { flex: 0 0 64px; width: 64px; min-width: 64px; max-width: 64px; height: 64px; min-height: 64px; max-height: 64px; border-radius: 12px; }
.thimze-blog-wrapper .tbx .tbx-side .tbx-fi > span:not(.tbx-fi-img) { display: block; flex: 1 1 auto; min-width: 0; margin: 0; padding: 0; color: #141414; font-weight: 400; line-height: 1.3; }
.thimze-blog-wrapper .tbx .tbx-side .tbx-fi small { display: block; margin: 0 0 3px; padding: 0; font-size: 12.5px; font-weight: 600; line-height: 1.3; color: var(--tb-muted); }
.thimze-blog-wrapper .tbx .tbx-side .tbx-fi b { display: block; margin: 0; padding: 0; font-size: 14px; font-weight: 700; line-height: 1.3; color: #141414; transition: color .2s; }
.thimze-blog-wrapper .tbx .tbx-side a.tbx-fi:hover b { color: var(--tb-blue); }

/* Top posts by category */
.tbx-tg { margin-top: 12px; padding-top: 16px; border-top: 1px solid var(--tb-line); }
.tbx-panel h3 + .tbx-tg { margin-top: 0; padding-top: 4px; border-top: 0; }
.tbx-tgh { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.tbx-tgh b { font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; background: var(--tb-soft); padding: 5px 11px; border-radius: 999px; }
.thimze-blog-wrapper .tbx-tgh a { color: var(--tb-blue); font-weight: 700; font-size: 13px; }
.thimze-blog-wrapper .tbx .tbx-side a.tbx-tp { display: flex; align-items: center; gap: 14px; width: auto; height: auto; min-height: 0; margin: 0; padding: 9px 0; border: 0; float: none; color: #141414; text-decoration: none; }
.thimze-blog-wrapper .tbx .tbx-side .tbx-tp .tbx-fi-img { flex: 0 0 68px; width: 68px; min-width: 68px; max-width: 68px; height: 68px; min-height: 68px; max-height: 68px; border-radius: 14px; }
/* Title: 14px / 700 / #141414, cyan on hover. Targets the unclassed title <span> by position-independent :not() so
   the theme's "aside span" / "a span" colour + weight rules lose. */
.thimze-blog-wrapper .tbx .tbx-side .tbx-tp > span:not(.tbx-fi-img) { display: block; flex: 1 1 auto; min-width: 0; margin: 0; padding: 0; font-size: 14px; font-weight: 700; line-height: 1.35; letter-spacing: 0; text-transform: none; color: #141414; transition: color .2s; }
.thimze-blog-wrapper .tbx .tbx-side a.tbx-tp:hover > span:not(.tbx-fi-img) { color: var(--tb-blue); }

/* Newsletter band with photo overlay.
   Layers (isolation makes the section its own stacking context, so z-index:-1 stays inside it):
     section background  solid navy
     ::before            the photo, on the right 60% only, positioned so the FACE is in frame
     ::after             navy gradient: solid on the left (text), fading out to the right (photo shows)
   The photo comes from --tbx-news-img (set inline by the template) with the plugin's own file as fallback. */
.thimze-blog-wrapper .tbx .tbx-news { position: relative; isolation: isolate; overflow: hidden; margin: 70px 0; border-radius: 26px; padding: 56px; min-height: 300px; display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; align-items: center; color: #fff; background: #211c2f; }
.thimze-blog-wrapper .tbx .tbx-news::before { content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 60%; z-index: -1; background-color: #211c2f; background-image: url("images/hero-row-3.jpg"); background-image: var(--tbx-news-img, url("images/hero-row-3.jpg")); background-repeat: no-repeat; background-size: cover; background-position: 50% 14%; }
.thimze-blog-wrapper .tbx .tbx-news::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(0deg, rgba(33,28,47,.94) 0, rgba(33,28,47,.72) 24%, rgba(33,28,47,0) 58%), linear-gradient(90deg, #211c2f 0, #211c2f 40%, rgba(33,28,47,.84) 50%, rgba(33,28,47,.36) 70%, rgba(33,28,47,.06) 100%); }
.thimze-blog-wrapper .tbx-news h2 { margin: 0 0 10px; font-size: 32px; font-weight: 800; letter-spacing: -.03em; line-height: 1.15; color: #fff; }
.thimze-blog-wrapper .tbx-news h2 span { color: var(--tb-blue); }
.thimze-blog-wrapper .tbx-news p { margin: 0; color: rgba(255,255,255,.85); }

/* Thimze Newsletter "offer" form inside the band.
   The newsletter plugin's rules (.thimze-newsletter-form-offer .thimze-input.thimze-offer-input etc.) are 3 classes
   and load after this file, so a same-weight rule loses. These are 5-6 deep and win without !important. */
.thimze-blog-wrapper .tbx .tbx-news-form { min-width: 0; }
.thimze-blog-wrapper .tbx .tbx-news-form .thimze-newsletter-form { max-width: none; width: 100%; margin: 0; padding: 0; background: none; border: 0; box-shadow: none; }
/* The pill: input grows, button is a fixed block; overflow:hidden rounds the button's right end into the pill. */
.thimze-blog-wrapper .tbx .tbx-news-form .thimze-offer-row { display: flex; flex-direction: row; align-items: stretch; justify-content: flex-start; gap: 0; width: 100%; min-height: 56px; margin: 0; padding: 0; background: #fff; border: 0; border-radius: 999px; overflow: hidden; box-shadow: 0 24px 40px -24px rgba(0,0,0,.7); }
.thimze-blog-wrapper .tbx .tbx-news-form .thimze-offer-row:focus-within { box-shadow: 0 0 0 3px rgba(4,194,244,.6), 0 24px 40px -24px rgba(0,0,0,.7); }
.thimze-blog-wrapper .tbx .tbx-news-form input.thimze-input.thimze-offer-input { flex: 1 1 0; width: auto; min-width: 0; max-width: none; height: auto; min-height: 56px; margin: 0; padding: 0 22px; background: transparent; border: 0; border-radius: 0; box-shadow: none; outline: 0; -webkit-appearance: none; appearance: none; font-family: inherit; font-size: 15px; font-style: italic; line-height: 1.2; text-align: left; color: #111; }
.thimze-blog-wrapper .tbx .tbx-news-form input.thimze-input.thimze-offer-input:focus { background: transparent; border: 0; box-shadow: none; outline: 0; }
/* Button: 150px block, full pill height, label centred with flex (no padding/line-height tricks). */
.thimze-blog-wrapper .tbx .tbx-news-form button.thimze-offer-button { display: flex; align-items: center; justify-content: center; align-self: stretch; flex: 0 0 150px; width: 150px; min-width: 150px; height: auto; min-height: 56px; margin: 0; padding: 0 24px; background: var(--tb-blue); border: 0; border-radius: 0; box-shadow: none; transform: none; color: #0F1226; font-family: inherit; font-size: 15px; font-weight: 800; line-height: 1; letter-spacing: 0; text-align: center; text-transform: none; white-space: nowrap; cursor: pointer; transition: background-color .2s; }
.thimze-blog-wrapper .tbx .tbx-news-form button.thimze-offer-button:hover:not(:disabled) { background: #0AA8D4; color: #0F1226; }
.thimze-blog-wrapper .tbx .tbx-news-form button.thimze-offer-button:disabled { opacity: .7; cursor: wait; }
/* Fine print: light text under the pill, aligned with the input's text. */
.thimze-blog-wrapper .tbx .tbx-news-form .thimze-offer-fineprint { margin: 12px 0 0; padding: 0 0 0 22px; font-size: 12.5px; font-weight: 500; line-height: 1.5; text-align: left; color: rgba(255,255,255,.88); text-shadow: 0 1px 3px rgba(0,0,0,.55); }
.thimze-blog-wrapper .tbx .tbx-news-form .thimze-offer-fineprint a { color: #fff; text-decoration: underline; }
.thimze-blog-wrapper .tbx .tbx-news-form .error-message { color: #ffb4b4; }
.thimze-blog-wrapper .tbx .tbx-news-form .thimze-newsletter-success { color: #fff; }
.thimze-blog-wrapper .tbx-news-note { margin: 0; color: rgba(255,255,255,.7); font-size: 13px; }

/* Responsive */
/* Sidebar stacks under the cards at 1120px: with a 320px sidebar the two card columns get too narrow below that. */
@media (max-width: 1120px) {
    .tbx-layout { grid-template-columns: 1fr; }
    .tbx-side { position: static; }
}
@media (max-width: 960px) {
    .thimze-blog-wrapper .tbx .tbx-news { grid-template-columns: 1fr; padding: 32px 24px; }
}
@media (max-width: 620px) {
    .tbx-grid { grid-template-columns: 1fr; }
    .thimze-blog-wrapper .tbx { padding: 0 16px; }
    /* Photo goes full-bleed behind the (now stacked) text and form, under a heavier overlay for legibility. */
    .thimze-blog-wrapper .tbx .tbx-news::before { width: 100%; background-position: 50% 10%; }
    .thimze-blog-wrapper .tbx .tbx-news::after { background: linear-gradient(180deg, rgba(33,28,47,.7) 0, rgba(33,28,47,.9) 100%); }
    .thimze-blog-wrapper .tbx .tbx-news-form .thimze-offer-row { flex-direction: column; border-radius: 16px; }
    .thimze-blog-wrapper .tbx .tbx-news-form input.thimze-input.thimze-offer-input { flex: 0 0 auto; width: 100%; min-height: 52px; padding: 16px 20px; }
    .thimze-blog-wrapper .tbx .tbx-news-form button.thimze-offer-button { flex: 0 0 auto; align-self: stretch; width: 100%; min-width: 0; min-height: 52px; padding: 16px; }
    .thimze-blog-wrapper .tbx .tbx-news-form .thimze-offer-fineprint { padding-left: 4px; }
}
