/**
 * Tidi Latest Posts Polylang Block — Frontend Stylesheet
 *
 * File: assets/css/style.css
 *
 * Layouts: grid | list | fullwidth | numbered | numbered-grid | grid2plus4 | hgrid421 | grid1plus3 | grid1plus4plus1
 */

/* =========================================================================
   Custom Properties
   ========================================================================= */
.tidi-lpp {
    --tidi-gap:          40px;
    --tidi-radius:       3px;
    --tidi-shadow:       0 2px 12px rgba(0, 0, 0, 0.08);

    --very-small-spacing: 5px;
    --small-spacing: 10px;
    --std-spacing: 15px;
    --double-spacing: 30px;
    --triple-spacing: 60px;
    --large-spacing: 80px;

    --tidi-accent:       #2563eb;
    --tidi-text:         #1e293b;
    --tidi-meta:         #aaa;
    --tidi-flame:        #f16234;
    --tidi-cat:          #e6c55d;
    --tidi-bg:           #ffffff;
    --tidi-border:       #e2e8f0;
    --tidi-trans:        0.22s ease;
}

/* =========================================================================
   Base Item
   ========================================================================= */
.tidi-lpp__item {
    background:    var(--tidi-bg);
    overflow:      hidden;
    display:       flex;
    flex-direction: column;
}

/* Thumbnail */
.tidi-lpp__thumb-link {
    display:      block;
    overflow:     hidden;
    position:     relative;
    aspect-ratio: 4 / 3;
    width:        100%;
    border-radius: var(--tidi-radius);
}

.tidi-lpp__thumb-link::after {
    content: none;
}

.tidi-lpp__thumb {
    position:   absolute;
    inset:      0;
    width:      100%;
    height:     100% !important;
    object-fit: cover;
    display:    block;
    transition: transform 0.4s ease;
}

/* Body */
.tidi-lpp__body {
    flex:    1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* Category badge */
.tidi-lpp__cat .lpp__cat_single {
    display: inline-block;
}

.tidi-lpp__cat .tidi-lpp__cat_single:not(:last-child):after {
    content: " | ";
    color: #aaa;
}

.tidi-lpp__cat,
.tidi-lpp__secondary-cat {
    display:     flex;
    align-items: baseline;
    flex-wrap:   wrap;
    gap:         2px;
}

.tidi-lpp__cat::before,
.tidi-lpp__secondary-cat::before {
    content:      'for';
    font-size:    12px;
    font-weight:  400;
    color:        #111;
    margin-right: 4px;
}

.tidi-lpp__cat a,
.tidi-lpp__secondary-cat a {
    font-size: 12px;
    font-weight: normal;
    color: var(--tidi-meta);
}

.tidi-lpp__cat a:hover,
.tidi-lpp__secondary-cat a:hover {
    color: #222;
}

/* Title */
.tidi-lpp__title {
    margin:      0 0 8px 0;
    font-size:   1.15rem;
    line-height: 1.35;
}

#sidebar .tidi-lpp__title {
    font-size:   14px;
    margin: 0;
}

.tidi-lpp__title a {
    margin: 0;
    font-size: inherit;
    color: #111 !important;

    background-image: linear-gradient(var(--tidi-flame), var(--tidi-flame)) !important;
    background-position: 0 100% !important;
    background-repeat: no-repeat;
    background-size: 0 1px !important;
    transition: background-size .4s !important;
}

.tidi-lpp__title a:hover {
    background-size: 100% 1px !important;
}


.tidi-lpp__excerpt{
    color: #555;
    line-height: 170%;
    font-size: 13px;
}


/* Meta */
.tidi-lpp__meta,
.tidi-lpp__secondary-date {
    margin-top:  0;
    font-size:   10px;
    letter-spacing: 1px;
    color:       var(--tidi-meta);
    text-transform: uppercase;
    display:     flex;
    gap:         0.75rem;
    align-items: center;
}


.tidi-lpp__author-label {
    font-size:  10px;
    color:      var(--tidi-meta);
}
.tidi-lpp__author-name {
    font-size:   12px;
    font-weight: 500;
    color:       #111;    
    line-height: 1.4;
}

/* Empty */
.tidi-lpp__empty {
    padding: 2rem;
    text-align: center;
    color: var(--tidi-meta);
    font-style: italic;
}

/* =========================================================================
   Layout: GRID (default)
   ========================================================================= */
.tidi-lpp--grid {
    display:               grid;
    grid-template-columns: repeat( auto-fill, minmax(min(100%, 280px), 1fr) );
    gap:                   var(--tidi-gap);
}

/* =========================================================================
   Layout: LIST
   ========================================================================= */
.tidi-lpp--list {
    display:        flex;
    flex-direction: column;
    gap:            var(--tidi-gap);
}

.tidi-lpp--list .tidi-lpp__item {
    flex-direction: row;
    align-items:    stretch;
}

#sidebar .tidi-lpp--list .tidi-lpp__item {
    align-items:    center;
}

.tidi-lpp--list .tidi-lpp__body {
    padding: 0 0 0 15px;
}

.tidi-lpp--list .tidi-lpp__thumb-link {
    flex:         0 0 80px;
    width:        80px;
    aspect-ratio: 1 / 1;
    align-self:   flex-start;
}

.tidi-lpp--list .tidi-lpp__thumb-link::after {
    content: none;
}

.tidi-lpp--list .tidi-lpp__thumb {
    max-height: none;
}

.tidi-lpp--list .tidi-lpp__title {
}

/* =========================================================================
   Layout: FULL WIDTH
   ========================================================================= */
.tidi-lpp--fullwidth .tidi-lpp__body {
    padding: 5px 0 0 0;
    text-align: left;
}

.tidi-lpp--fullwidth .tidi-lpp__item {
    text-align: center;
    margin-bottom: 20px;
}

.tidi-lpp--fullwidth .tidi-lpp__item span {
    line-height: normal;
}

.tidi-lpp--fullwidth .tidi-lpp__title{
    margin-bottom: 15px;
}

.tidi-lpp--fullwidth .tidi-lpp__title a{
    font-size: 36px;
}

#sidebar .tidi-lpp--fullwidth .tidi-lpp__title{
    text-align: center;
    margin-top: 5px;
}

#sidebar .tidi-lpp--fullwidth .tidi-lpp__title a{
    font-size: 14px;
}

.tidi-lpp--fullwidth .tidi-lpp__excerpt{
    font-size: 14px;
}

.tidi-lpp--fullwidth .tidi-lpp__item .tidi-lpp__meta {
    margin: 20px 0 0 0;
}

/* =========================================================================
   Layout: NUMBERED LIST
   ========================================================================= */

.tidi-lpp--numbered {
    display:        flex;
    flex-direction: column;
}

/* Each article is a block, separated by a top border (skip first) */
.tidi-lpp--numbered .tidi-lpp__item {
    flex-direction: column;
    padding: 14px 0;
    border-top: 1px solid var(--tidi-border);
    gap: 0;
    overflow: visible;
    counter-increment: tidi-numbered;
}

.tidi-lpp--numbered .tidi-lpp__item:first-child {
    border-top: none;
    padding-top: 0;
}

.tidi-lpp--numbered .tidi-lpp__item:last-child {
    padding-bottom: 0;
}

/* ── Row 1: title (left) + number (right) ── */
.tidi-lpp--numbered .tidi-lpp__header {
    display:         flex;
    align-items:     flex-start;
    justify-content: space-between;
    gap:             12px;
    margin-bottom:   8px;
}

.tidi-lpp--numbered .tidi-lpp__title {
    flex: 1;
    font-size: 14px;
}

.tidi-lpp--numbered .tidi-lpp__title a {
    font-size:   inherit;
    font-weight: inherit;
    line-height: inherit;
}

/* Large ordinal number */
.tidi-lpp--numbered .tidi-lpp__item .tidi-lpp__num {
    flex-shrink:  0;
    font-size:    2rem;
    font-weight:  700;
    line-height:  1;
    color:        var(--tidi-flame);
    /* right-align the 2-digit numbers so they stay stable */
    min-width:    2.2ch;
    text-align:   right;
    /* Slightly nudge down to optically align with title cap-height */
    margin-top:   -2px;
    opacity: .1;
    transition: opacity .3s ease-in-out;
}

.tidi-lpp--numbered .tidi-lpp__item:hover .tidi-lpp__num{
    opacity: 1;
}

/* ── Row 2: thumbnail (left) + excerpt/meta (right) ── */
.tidi-lpp--numbered .tidi-lpp__content-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.tidi-lpp--numbered .tidi-lpp__thumb-link {
    flex:         0 0 68px;
    width:        68px;
    aspect-ratio: 1 / 1;
    align-self:   flex-start;
    border-radius: var(--tidi-radius);
}

.tidi-lpp--numbered .tidi-lpp__thumb {
    border-radius: var(--tidi-radius);
}

/* Right column inside row 2 */
.tidi-lpp--numbered .tidi-lpp__body {
    flex:    1;
    padding: 0;
    gap:     4px;
}

/* Hide the title inside body — it lives in the header row */
.tidi-lpp--numbered .tidi-lpp__body .tidi-lpp__title {
    display: none;
}

/* Category */
.tidi-lpp--numbered .tidi-lpp__cat a {
}

/* Excerpt */
.tidi-lpp--numbered .tidi-lpp__excerpt {
    margin:      0;
    /* clamp to 3 lines */
    display:            -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow:           hidden;
}

/* Meta */
.tidi-lpp--numbered .tidi-lpp__meta {
}

/* When there is NO thumbnail, let the body span full width */
.tidi-lpp--numbered .tidi-lpp__content-row--no-thumb .tidi-lpp__body {
    width: 100%;
}

/* =========================================================================
   Layout: NUMBERED GRID
   —
   Outer wrapper : 3-cards-per-row grid (each card = one post).
   Inner card    : CSS grid with 3 columns → [number | text | thumbnail]
   ========================================================================= */

/* Outer grid: 3 cards per row */
.tidi-lpp--numbered-grid {
    display:               grid;
    grid-template-columns: repeat( 3, 1fr );
    gap:                   0;
}

/* Card — each post uses an inner 3-column CSS grid */
.tidi-lpp--numbered-grid .tidi-lpp__item {
    display:               grid;
    grid-template-columns: 26px 1fr 76px;   /* num | text | thumb */
    grid-template-rows:    1fr;
    align-items:           start;
    column-gap:            10px;
    padding:               20px 20px 20px 0;
    border-top:            1px solid var(--tidi-border);
    overflow:              visible;
    background:            transparent;
    /* reset flex from base rule */
    flex-direction:        unset;
}

/* No-thumbnail variant: only 2 columns */
.tidi-lpp--numbered-grid .tidi-lpp__item--no-thumb {
    grid-template-columns: 26px 1fr;
}

/* First row of cards: no top border, no top padding */
.tidi-lpp--numbered-grid .tidi-lpp__item:nth-child(-n+3) {
    border-top:  none;
    padding-top: 0;
}

/* Right divider except last card in each row */
.tidi-lpp--numbered-grid .tidi-lpp__item:not(:nth-child(3n)) {
    padding-right: 20px;
    border-right:  1px solid var(--tidi-border);
}

/* Left padding for 2nd and 3rd card in each row */
.tidi-lpp--numbered-grid .tidi-lpp__item:nth-child(3n+2),
.tidi-lpp--numbered-grid .tidi-lpp__item:nth-child(3n) {
    padding-left: 20px;
}

/* ── Column 1: ordinal number ── */
.tidi-lpp--numbered-grid .tidi-lpp__item .tidi-lpp__num {
    grid-column:  1;
    grid-row:     1;
    font-size:    0.7rem;
    font-weight:  700;
    line-height:  1.8;     /* align with title cap-height */
    color:        var(--tidi-flame);
    opacity: .3;
    transition: opacity .3s ease-in-out;
}

.tidi-lpp--numbered-grid .tidi-lpp__item:hover .tidi-lpp__num {
    opacity: 1;
}

/* ── Column 2: text block ── */
.tidi-lpp--numbered-grid .tidi-lpp__body {
    grid-column:    2;
    grid-row:       1;
    display:        flex;
    flex-direction: column;
    gap:            6px;
    padding:        0;
    min-width:      0;     /* prevent overflow */
    align-self:     start;
}

/* ── Column 3: thumbnail ── */
.tidi-lpp--numbered-grid .tidi-lpp__thumb-link {
    grid-column:  3;
    grid-row:     1;
    display:      block;
    width:        76px;
    aspect-ratio: 1 / 1;
    align-self:   start;
    border-radius: var(--tidi-radius);
    overflow:     hidden;
    position:     relative;
    /* override base rule that forces width:100% */
    flex:         none;
}

.tidi-lpp--numbered-grid .tidi-lpp__thumb {
    border-radius: var(--tidi-radius);
}

/* Title */
.tidi-lpp--numbered-grid .tidi-lpp__title {
    margin:      0;
}

.tidi-lpp--numbered-grid .tidi-lpp__title a {
    font-size:   inherit;
    font-weight: inherit;
    line-height: inherit;
    color:       #111 !important;
}

/* Excerpt */
.tidi-lpp--numbered-grid .tidi-lpp__excerpt {
    margin:             0;
    display:            -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow:           hidden;
}

/* Category row — prefixed with "for " via pseudo-element */
.tidi-lpp--numbered-grid .tidi-lpp__cat {
    display:     flex;
    align-items: baseline;
    flex-wrap:   wrap;
    gap:         1px;
}

.tidi-lpp--numbered-grid .tidi-lpp__cat .tidi-lpp__cat_single:not(:last-child)::after {
    content:      ',';
    color:        var(--tidi-meta);
    margin-right: 2px;
}

/* Meta (date / views) */
.tidi-lpp--numbered-grid .tidi-lpp__meta {
}


/* =========================================================================
   Layout: GRID 2+4
   —
   Row 1: 2 cards side-by-side.
     Card structure: [large image LEFT] | [cat + title + excerpt + author RIGHT]
   Row 2: 4 cards side-by-side.
     Card structure: vertical — cat on top, then title (left) + small image (right), excerpt below, author at bottom
   ========================================================================= */

/* Outer wrapper: single-column flex, split into two sub-rows */
.tidi-lpp--grid2plus4 {
    display:        flex;
    flex-direction: column;
    gap:            var(--tidi-gap);
}

/* Sub-row containers */
.tidi-lpp--grid2plus4 .tidi-lpp__row-top {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--tidi-gap);
}

.tidi-lpp--grid2plus4 .tidi-lpp__row-bottom {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--tidi-gap);
    border-top: 1px solid var(--tidi-border);
    padding-top: var(--tidi-gap);
}

/* ── TOP ROW cards: image left, text right ── */
.tidi-lpp--grid2plus4 .tidi-lpp__item--top {
    display:        flex;
    flex-direction: row;
    align-items:    stretch;
    gap:            20px;
    background:     var(--tidi-bg);
}

/* Large image on the left */
.tidi-lpp--grid2plus4 .tidi-lpp__item--top .tidi-lpp__thumb-link {
    flex:         0 0 42%;
    width:        42%;
    aspect-ratio: 4 / 3;
    align-self:   stretch;
    display:      block;
    overflow:     hidden;
    position:     relative;
    border-radius: var(--tidi-radius);
}

/* Text column */
.tidi-lpp--grid2plus4 .tidi-lpp__item--top .tidi-lpp__body {
    flex:           1;
    display:        flex;
    flex-direction: column;
    gap:            8px;
    padding:        0;
    justify-content: flex-start;
}

/* Category */
.tidi-lpp--grid2plus4 .tidi-lpp__item--top .tidi-lpp__cat::before {
}

.tidi-lpp--grid2plus4 .tidi-lpp__item--top .tidi-lpp__cat .tidi-lpp__cat_single:not(:last-child)::after {
    content: ',';
    margin-right: 3px;
}

/* Title */
.tidi-lpp--grid2plus4 .tidi-lpp__item--top .tidi-lpp__title {
}

.tidi-lpp--grid2plus4 .tidi-lpp__item--top .tidi-lpp__title a {
    font-size:   inherit;
    font-weight: inherit;
    line-height: inherit;
    color:       #111 !important;
}

/* Excerpt */
.tidi-lpp--grid2plus4 .tidi-lpp__item--top .tidi-lpp__excerpt {
    margin:             0;
    display:            -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow:           hidden;
}

/* Author (meta) */
.tidi-lpp--grid2plus4 .tidi-lpp__item--top .tidi-lpp__author {
    margin-top: auto;
    display:    flex;
    flex-direction: column;
    gap:        1px;
}

.tidi-lpp--grid2plus4 .tidi-lpp__item--top .tidi-lpp__author-label {
    font-size:  10px;
    color:      var(--tidi-meta);
    text-transform: none;
}


/* Meta date (hidden in top row — replaced by author block) */
.tidi-lpp--grid2plus4 .tidi-lpp__item--top .tidi-lpp__meta {
    display: none;
}

/* ── BOTTOM ROW cards: cat top, then title+thumb side-by-side, excerpt, author ── */
.tidi-lpp--grid2plus4 .tidi-lpp__item--bottom {
    display:        flex;
    flex-direction: column;
    gap:            8px;
    background:     var(--tidi-bg);
}

/* Category */
.tidi-lpp--grid2plus4 .tidi-lpp__item--bottom .tidi-lpp__cat {
}

.tidi-lpp--grid2plus4 .tidi-lpp__item--bottom .tidi-lpp__cat::before {
}

.tidi-lpp--grid2plus4 .tidi-lpp__item--bottom .tidi-lpp__cat .tidi-lpp__cat_single:not(:last-child)::after {
    content: ',';
    margin-right: 3px;
}

/* Title+image row: title on the left, small thumb on the right */
.tidi-lpp--grid2plus4 .tidi-lpp__item--bottom .tidi-lpp__title-row {
    display:     flex;
    align-items: flex-start;
    gap:         12px;
}

.tidi-lpp--grid2plus4 .tidi-lpp__item--bottom .tidi-lpp__title {
    flex:        1;
    min-width:   0;
}

.tidi-lpp--grid2plus4 .tidi-lpp__item--bottom .tidi-lpp__title a {
    font-size:   inherit;
    font-weight: inherit;
    line-height: inherit;
    color:       #111 !important;
}

/* Small square thumb on the right of title */
.tidi-lpp--grid2plus4 .tidi-lpp__item--bottom .tidi-lpp__thumb-link {
    flex:         0 0 80px;
    width:        80px;
    aspect-ratio: 1 / 1;
    align-self:   flex-start;
    border-radius: var(--tidi-radius);
    overflow:     hidden;
    position:     relative;
    display:      block;
}

.tidi-lpp--grid2plus4 .tidi-lpp__item--bottom .tidi-lpp__thumb {
    border-radius: var(--tidi-radius);
}

/* Excerpt */
.tidi-lpp--grid2plus4 .tidi-lpp__item--bottom .tidi-lpp__excerpt {
    margin:             0;
    display:            -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow:           hidden;
}

/* Author block */
.tidi-lpp--grid2plus4 .tidi-lpp__item--bottom .tidi-lpp__author {
    margin-top: auto;
    display:    flex;
    flex-direction: column;
    gap:        1px;
}


/* Meta date (hidden in bottom row — replaced by author block) */
.tidi-lpp--grid2plus4 .tidi-lpp__item--bottom .tidi-lpp__meta {
    display: none;
}

/* =========================================================================
   Layout: HORIZONTAL GRID 4-2-1  (hgrid421)
   —
   4 cards side-by-side on desktop (≥ 960 px)
   2 cards on mid viewport (641 – 959 px)
   1 card  on mobile      (≤ 640 px)
   Max visible posts: 4 (extras are hidden via CSS).
   Each card: small square thumb LEFT | title + date + categories RIGHT
   ========================================================================= */

/* Outer grid: always 4 columns; responsive overrides below */
.tidi-lpp--hgrid421 {
    display:               grid;
    grid-template-columns: repeat( 4, 1fr );
    gap:                   var(--tidi-gap);
    align-items:           start;
}

/* Hide any post beyond the 4th */
.tidi-lpp--hgrid421 .tidi-lpp__item:nth-child(n+5) {
    display: none;
}

/* Card: horizontal — thumb LEFT, body RIGHT */
.tidi-lpp--hgrid421 .tidi-lpp__item {
    display:        flex;
    flex-direction: row;
    align-items:    flex-start;
    gap:            12px;
    background:     var(--tidi-bg);
}

/* Square thumbnail */
.tidi-lpp--hgrid421 .tidi-lpp__thumb-link {
    flex:         0 0 100px;
    width:        100px;
    aspect-ratio: 1 / 1;
    align-self:   flex-start;
    border-radius: var(--tidi-radius);
    overflow:     hidden;
    position:     relative;
    display:      block;
}

.tidi-lpp--hgrid421 .tidi-lpp__thumb {
    border-radius: var(--tidi-radius);
}

/* Text column */
.tidi-lpp--hgrid421 .tidi-lpp__body {
    flex:           1;
    display:        flex;
    flex-direction: column;
    gap:            4px;
    padding:        0;
    min-width:      0;
}

/* Title */
.tidi-lpp--hgrid421 .tidi-lpp__title {
    margin:      0;
}

.tidi-lpp--hgrid421 .tidi-lpp__title a {
    font-size:   inherit;
    font-weight: inherit;
    line-height: inherit;
    color:       #111 !important;
}

/* Date (inside .tidi-lpp__meta) */
.tidi-lpp--hgrid421 .tidi-lpp__meta {
    font-size:      12px;
    color:          #555;
    text-transform: none;
    gap:            0;
    flex-direction: column;
    align-items:    flex-start;
}

.tidi-lpp--hgrid421 .tidi-lpp__date {
    font-size: 12px;
    color:     #555;
}

/* Excerpt: hidden in this layout */
.tidi-lpp--hgrid421 .tidi-lpp__excerpt {
    display: none;
}

/* Category — prefixed with "for " */
.tidi-lpp--hgrid421 .tidi-lpp__cat {
    align-items: flex-start;
}

.tidi-lpp--hgrid421 .tidi-lpp__cat::before {
    flex-shrink:  0;
}

.tidi-lpp--hgrid421 .tidi-lpp__cat .tidi-lpp__cat_single:not(:last-child)::after {
    content:      ',';
    color:        var(--tidi-meta);
    margin-right: 2px;
}


/* =========================================================================
   Layout: GRID 1+3
   —
   Left column (~60%): 1 featured post
     – meta bar (date · for categories · read time) top-right above image
     – large image full-width
     – big title
     – excerpt (narrower right sub-column)
     – author avatar + "Created by" + name
   Right column (~40%): 3 secondary posts, each:
     – title (left) + thumbnail (right)
     – date
     – "for" + categories
     – excerpt
   ========================================================================= */

/* Outer wrapper: 2-column layout */
.tidi-lpp--grid1plus3 {
    display:               grid;
    grid-template-columns: 80fr 20fr;
    gap:                   40px;
    align-items:           start;
}

/* ── LEFT: featured post — image left, text column right ── */
.tidi-lpp__featured {
    display:               grid;
    grid-template-columns: 78fr 22fr;
    gap:                   0;
    align-items:           stretch;
}

/* Large image: left column, full height */
.tidi-lpp__featured-thumb-link {
    display:       block;
    overflow:      hidden;
    position:      relative;
    width:         100%;
    height:        100%;
    min-height:    320px;
    border-radius: var(--tidi-radius) 0 0 var(--tidi-radius);
    grid-column:   1;
    grid-row:      1;
}

.tidi-lpp__featured-thumb-link .tidi-lpp__thumb {
    position:      absolute;
    inset:         0;
    width:         100%;
    height:        100% !important;
    object-fit:    cover;
    border-radius: var(--tidi-radius) 0 0 var(--tidi-radius);
}

/* Text column: right side, flex column, space between top and bottom */
.tidi-lpp__featured-text {
    grid-column:    2;
    grid-row:       1;
    display:        flex;
    flex-direction: column;
    padding:        0 0 0 28px;
}

/* Meta bar: date · for categories · read time — top of text column */
.tidi-lpp__featured-meta-bar {
    display:       flex;
    align-items:   center;
    flex-wrap:     wrap;
    gap:           6px;
    font-size:     11px;
    color:         var(--tidi-meta);
    line-height:   110%;
    padding-bottom: 10px;
}

.tidi-lpp__featured-meta-bar .tidi-lpp__date {
    font-size: 11px;
    color:     var(--tidi-meta);
}

.tidi-lpp__featured-meta-bar .tidi-lpp__sep {
    color: var(--tidi-border);
}

/* "for" prefix in meta bar */
.tidi-lpp__featured-meta-bar .tidi-lpp__cat {
}

.tidi-lpp__featured-meta-bar .tidi-lpp__cat::before {
}

.tidi-lpp__featured-meta-bar .tidi-lpp__cat .tidi-lpp__cat_single:not(:last-child)::after {
    content:      ',';
    margin-right: 2px;
}

.tidi-lpp__featured-meta-bar .tidi-lpp__readtime {
    font-size: 11px;
    color:     var(--tidi-meta);
}

/* Title: large, sits below meta bar */
.tidi-lpp__featured-title {
    margin:      0 0 auto; /* pushes excerpt+author to bottom */
    font-size:   30px;
}

.tidi-lpp__featured-title a {
    color:            #111 !important;
    font-size:        inherit;
    font-weight:      inherit;
    line-height:      inherit;
    background-image: linear-gradient(var(--tidi-flame), var(--tidi-flame)) !important;
    background-position: 0 100% !important;
    background-repeat:   no-repeat;
    background-size:  0 2px !important;
    transition:       background-size .4s !important;
}

.tidi-lpp__featured-title a:hover {
    background-size: 100% 2px !important;
}

/* Bottom block: excerpt + author, pushed to bottom of text column */
.tidi-lpp__featured-bottom {
    display:        flex;
    flex-direction: column;
    gap:            16px;
    padding-top:    20px;
}

.tidi-lpp__featured-excerpt {
    font-size:          13px;
    line-height:        1.6;
    color:              #555;
    margin:             0;
    display:            -webkit-box;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
    overflow:           hidden;
}


@media screen and (min-width: 1280px) {
    .tidi-lpp__featured-text{
        position: relative;
        margin-left: -100px;
    }

    .tidi-lpp__featured-meta-bar,
    .tidi-lpp__featured-title,
    .tidi-lpp__featured-bottom{
        background-color: #fff;
        padding-left: 40px;
    }

    .tidi-lpp__featured-title{
        padding-bottom: 30px;
    }

    .tidi-lpp__featured-bottom{
        margin-left: 80px;
        padding-top: 0;
        padding-left: 30px;
    }

}

/* Author block */
.tidi-lpp__author-block {
    display:     flex;
    align-items: center;
    gap:         10px;
    flex-shrink: 0;
}

.tidi-lpp__author-avatar {
    width:         36px;
    height:        36px;
    border-radius: 50%;
    overflow:      hidden;
    flex-shrink:   0;
}

.tidi-lpp__author-avatar img {
    width:      100%;
    height:     100%;
    object-fit: cover;
    display:    block;
}

.tidi-lpp__author-info {
    display:        flex;
    flex-direction: column;
    gap:            1px;
}

.tidi-lpp__author-label {
    font-size:   10px;
    color:       var(--tidi-meta);
    line-height: 1.4;
}

/* ── RIGHT: 3 secondary posts ── */
.tidi-lpp__secondary-list {
    display:        flex;
    flex-direction: column;
    gap:            0;
}

.tidi-lpp__secondary-item {
    display:        flex;
    flex-direction: column;
    gap:            6px;
    padding:        20px 0;
    border-top:     1px solid var(--tidi-border);
}

.tidi-lpp__secondary-item:first-child {
    border-top:  none;
    padding-top: 0;
}

.tidi-lpp__secondary-item:last-child {
    padding-bottom: 0;
}

/* Title row: [title+date group LEFT] + [thumb RIGHT] */
.tidi-lpp__secondary-title-row {
    display:     flex;
    align-items: flex-start;
    gap:         12px;
}

/* Title + date stacked in left sub-column */
.tidi-lpp__secondary-title-group {
    flex:           1;
    display:        flex;
    flex-direction: column;
    gap:            4px;
    min-width:      0;
}

.tidi-lpp__secondary-title {
    margin:      0;
    font-size:   1rem;
    font-weight: 700;
    line-height: 1.3;
}

.tidi-lpp__secondary-title a {
    color:       #111 !important;
    font-size:   inherit;
    font-weight: inherit;
    line-height: inherit;
    background-image: linear-gradient(var(--tidi-flame), var(--tidi-flame)) !important;
    background-position: 0 100% !important;
    background-repeat: no-repeat;
    background-size: 0 1px !important;
    transition: background-size .4s !important;
}

.tidi-lpp__secondary-title a:hover {
    background-size: 100% 1px !important;
}

/* Small thumbnail */
.tidi-lpp__secondary-thumb-link {
    flex:         0 0 76px;
    width:        76px;
    aspect-ratio: 1 / 1;
    border-radius: var(--tidi-radius);
    overflow:     hidden;
    position:     relative;
    display:      block;
    align-self:   flex-start;
}

.tidi-lpp__secondary-thumb-link .tidi-lpp__thumb {
    border-radius: var(--tidi-radius);
}

.tidi-lpp__secondary-cat .tidi-lpp__cat_single:not(:last-child)::after {
    content:      ',';
    color:        var(--tidi-meta);
    margin-right: 2px;
}


/* Excerpt */
.tidi-lpp__secondary-excerpt {
    font-size:          12px;
    line-height:        1.55;
    color:              #555;
    margin:             0;
    display:            -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow:           hidden;
}

/* =========================================================================
   Layout: GRID 1+4+1
   —
   Left column  (~33%): 1 top post (title + excerpt + small thumb right)
                         + 4 list posts (thumb left + title right)
   Right column (~67%): 1 featured post, large image full-height,
                         meta + title overlaid at bottom on dark gradient
   ========================================================================= */

/* Outer: 2 columns */
.tidi-lpp--grid1plus4plus1 {
    display:               grid;
    grid-template-columns: 33fr 67fr;
    gap:                   40px;
    align-items:           stretch;
}

/* ═══════════════════════════════════════════
   LEFT COLUMN
   ═══════════════════════════════════════════ */
.tidi-lpp__g141-left {
    display:        flex;
    flex-direction: column;
    gap:            0;
}

/* ── Top post ── */
.tidi-lpp__g141-top {
    display:        flex;
    flex-direction: column;
    gap:            8px;
    padding-bottom: 20px;
    border-bottom:  1px solid var(--tidi-border);
    margin-bottom:  16px;
}

/* Title row: title left + small thumb right */
.tidi-lpp__g141-top-row {
    display:     flex;
    align-items: flex-start;
    gap:         12px;
}

.tidi-lpp__g141-top-title {
    flex:        1;
    margin:      0 0 10px 0;
    font-size:   1rem;
    font-weight: 700;
    line-height: 1.3;
    min-width:   0;
}

.tidi-lpp__g141-top-title a {
    color:            #111 !important;
    font-size:        inherit;
    font-weight:      inherit;
    line-height:      inherit;
    background-image: linear-gradient(var(--tidi-flame), var(--tidi-flame)) !important;
    background-position: 0 100% !important;
    background-repeat:   no-repeat;
    background-size:  0 1px !important;
    transition:       background-size .4s !important;
}

.tidi-lpp__g141-top-title a:hover { background-size: 100% 1px !important; }

.tidi-lpp__g141-top-thumb {
    flex:         0 0 80px;
    width:        80px;
    aspect-ratio: 1 / 1;
    border-radius: var(--tidi-radius);
    overflow:     hidden;
    position:     relative;
    display:      block;
    align-self:   flex-start;
}

.tidi-lpp__g141-top-thumb .tidi-lpp__thumb {
    border-radius: var(--tidi-radius);
}

.tidi-lpp__g141-top-excerpt {
    font-size:          12px;
    line-height:        1.55;
    color:              #555;
    margin:             0;
    display:            -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow:           hidden;
}

/* ── List of 4 posts ── */
.tidi-lpp__g141-list {
    display:        flex;
    flex-direction: column;
    gap:            0;
}

.tidi-lpp__g141-list-item {
    display:     flex;
    align-items: flex-start;
    gap:         12px;
    padding:     18px 0;
    border-bottom: 1px solid var(--tidi-border);
}

.tidi-lpp__g141-list-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.tidi-lpp__g141-list-thumb {
    flex:         0 0 54px;
    width:        54px;
    aspect-ratio: 1 / 1;
    border-radius: var(--tidi-radius);
    overflow:     hidden;
    position:     relative;
    display:      block;
    align-self:   flex-start;
}

.tidi-lpp__g141-list-thumb .tidi-lpp__thumb {
    border-radius: var(--tidi-radius);
}

.tidi-lpp__g141-list-title {
    flex:        1;
    margin:      0;
    font-size:   14px;
    font-weight: 700;
    line-height: 1.3;
    min-width:   0;
}

.tidi-lpp__g141-list-title a {
    color:            #111 !important;
    font-size:        inherit;
    font-weight:      inherit;
    line-height:      inherit;
    background-image: linear-gradient(var(--tidi-flame), var(--tidi-flame)) !important;
    background-position: 0 100% !important;
    background-repeat:   no-repeat;
    background-size:  0 1px !important;
    transition:       background-size .4s !important;
}

.tidi-lpp__g141-list-title a:hover { background-size: 100% 1px !important; }

/* ═══════════════════════════════════════════
   RIGHT COLUMN: featured post
   ═══════════════════════════════════════════ */
.tidi-lpp__g141-featured {
    position:      relative;
    display:       block;
    border-radius: var(--tidi-radius);
    overflow:      hidden;
    min-height:    420px;
    height:        100%;
}

/* Full-bleed image */
.tidi-lpp__g141-featured-thumb {
    display:  block;
    position: absolute;
    inset:    0;
    width:    100%;
    height:   100%;
}

.tidi-lpp__g141-featured-thumb .tidi-lpp__thumb {
    position:   absolute;
    inset:      0;
    width:      100%;
    height:     100% !important;
    object-fit: cover;
    display:    block;
}

/* Dark gradient overlay at bottom */
.tidi-lpp__g141-featured-overlay {
    position:   absolute;
    inset:      0;
    background: linear-gradient(
        to top,
        rgba(0,0,0,0.75) 0%,
        rgba(0,0,0,0.35) 40%,
        rgba(0,0,0,0)    70%
    );
    pointer-events: none;
}

/* Text block pinned to bottom */
.tidi-lpp__g141-featured-body {
    position: absolute;
    bottom:   0;
    left:     0;
    right:    0;
    padding:  28px 28px 24px;
    display:  flex;
    flex-direction: column;
    gap:      8px;
}

/* Meta bar: date · "for" · categories */
.tidi-lpp__g141-featured-meta {
    display:     flex;
    align-items: center;
    flex-wrap:   wrap;
    gap:         6px;
    font-size:   11px;
    color:       rgba(255,255,255,0.8);
}

.tidi-lpp__g141-featured-meta .tidi-lpp__date {
    font-size: 11px;
    color:     rgba(255,255,255,0.8);
}

.tidi-lpp__g141-featured-meta .tidi-lpp__sep {
    color: rgba(255,255,255,0.4);
}

.tidi-lpp__g141-featured-meta .tidi-lpp__cat::before {
}

.tidi-lpp__g141-featured-meta .tidi-lpp__cat {
}

.tidi-lpp__g141-featured-meta .tidi-lpp__cat .tidi-lpp__cat_single:not(:last-child)::after {
    content:      ',';
    margin-right: 2px;
}

.tidi-lpp__g141-featured-meta .tidi-lpp__cat a {
    color: rgba(255,255,255,0.8);
}

.tidi-lpp__g141-featured-meta .tidi-lpp__cat a:hover {
    color: #fff;
}

/* Title over image */
.tidi-lpp__g141-featured-title {
    margin:      0;
    font-size:   1.6rem;
    font-weight: 700;
    line-height: 1.2;
    color:       #fff;
}

.tidi-lpp__g141-featured-title a {
    color:       #fff !important;
    font-size:   inherit;
    font-weight: inherit;
    line-height: inherit;

    background-image: linear-gradient(var(--tidi-flame), var(--tidi-flame)) !important;
    background-position: 0 100% !important;
    background-repeat: no-repeat;
    background-size: 0 1px !important;
    transition: background-size .4s !important;
}

.tidi-lpp__g141-featured-title a:hover {
    background-size: 100% 1px !important;
}

/* =========================================================================
   Mid viewport (641px – 959px): hgrid421 → 2 columns
   ========================================================================= */
@media ( min-width: 641px ) and ( max-width: 959px ) {
    .tidi-lpp--hgrid421 {
        grid-template-columns: repeat( 2, 1fr );
    }

    /* Show only 2 posts at this breakpoint */
    .tidi-lpp--hgrid421 .tidi-lpp__item:nth-child(n+3) {
        display: none;
    }
}

/* =========================================================================
   Responsive
   ========================================================================= */
@media ( max-width: 640px ) {
    .tidi-lpp--list .tidi-lpp__item,
    .tidi-lpp--fullwidth .tidi-lpp__item {
        flex-direction: column;
    }

    .tidi-lpp--list .tidi-lpp__thumb-link {
        flex:         none;
        width:        100%;
        aspect-ratio: 1 / 1;
    }

    .tidi-lpp--fullwidth .tidi-lpp__item:not(:first-child) .tidi-lpp__thumb-link {
        flex:         none;
        max-width:    100%;
        aspect-ratio: 1 / 1;
        position:     relative;
    }

    /* Numbered: keep side-by-side even on mobile (small thumb) */
    .tidi-lpp--numbered .tidi-lpp__thumb-link {
        flex:  0 0 56px;
        width: 56px;
    }

    .tidi-lpp--numbered .tidi-lpp__num {
        font-size: 1.6rem;
    }

    /* Numbered grid: collapse to 1 column on mobile */
    .tidi-lpp--numbered-grid {
        grid-template-columns: 1fr;
    }

    .tidi-lpp--numbered-grid .tidi-lpp__item {
        padding:      16px 0 !important;
        border-right: none !important;
        border-top:   1px solid var(--tidi-border) !important;
    }

    .tidi-lpp--numbered-grid .tidi-lpp__item:first-child {
        border-top:  none !important;
        padding-top: 0 !important;
    }

    /* Horizontal Grid 4-2-1: 1 column on mobile, show only 1 post */
    .tidi-lpp--hgrid421 {
        grid-template-columns: 1fr;
    }

    .tidi-lpp--hgrid421 .tidi-lpp__item:nth-child(n+2) {
        display: none;
    }

    /* Grid 1+4+1: stack to single column on mobile */
    .tidi-lpp--grid1plus4plus1 {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .tidi-lpp__g141-featured {
        min-height: 280px;
        height: 280px;
    }

    /* Grid 1+3: stack to single column on mobile */
    .tidi-lpp--grid1plus3 {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    /* Featured: stack image above text on mobile */
    .tidi-lpp__featured {
        grid-template-columns: 1fr;
    }

    .tidi-lpp__featured-thumb-link {
        min-height:    220px;
        border-radius: var(--tidi-radius);
    }

    .tidi-lpp__featured-thumb-link .tidi-lpp__thumb {
        border-radius: var(--tidi-radius);
    }

    .tidi-lpp__featured-text {
        padding: 16px 0 0;
    }

    .tidi-lpp__featured-title {
        font-size: 1.4rem;
    }

    /* Grid 2+4: stack all rows to single column */
    .tidi-lpp--grid2plus4 .tidi-lpp__row-top,
    .tidi-lpp--grid2plus4 .tidi-lpp__row-bottom {
        grid-template-columns: 1fr;
    }

    .tidi-lpp--grid2plus4 .tidi-lpp__item--top {
        flex-direction: column;
    }

    .tidi-lpp--grid2plus4 .tidi-lpp__item--top .tidi-lpp__thumb-link {
        flex:  none;
        width: 100%;
    }
}

/* =========================================================================
   Dark mode support
   ========================================================================= */
@media ( prefers-color-scheme: dark ) {
    .tidi-lpp {
        --tidi-bg:     #1e293b;
        --tidi-text:   #f1f5f9;
        --tidi-meta:   #94a3b8;
        --tidi-border: #334155;
        --tidi-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
    }

    .tidi-lpp--numbered .tidi-lpp__excerpt {
        color: #94a3b8;
    }

    .tidi-lpp--numbered-grid .tidi-lpp__excerpt {
        color: #94a3b8;
    }

    .tidi-lpp--grid2plus4 .tidi-lpp__item--top .tidi-lpp__excerpt,
    .tidi-lpp--grid2plus4 .tidi-lpp__item--bottom .tidi-lpp__excerpt {
        color: #94a3b8;
    }

    .tidi-lpp--grid2plus4 .tidi-lpp__item--top .tidi-lpp__title a,
    .tidi-lpp--grid2plus4 .tidi-lpp__item--bottom .tidi-lpp__title a {
        color: #f1f5f9 !important;
    }

    .tidi-lpp--grid2plus4 .tidi-lpp__item--top .tidi-lpp__author-name,
    .tidi-lpp--grid2plus4 .tidi-lpp__item--bottom .tidi-lpp__author-name {
        color: #f1f5f9;
    }

    .tidi-lpp--hgrid421 .tidi-lpp__title a {
        color: #f1f5f9 !important;
    }

    .tidi-lpp--hgrid421 .tidi-lpp__date,
    .tidi-lpp--hgrid421 .tidi-lpp__meta {
        color: #94a3b8;
    }

    .tidi-lpp__g141-top-title a,
    .tidi-lpp__g141-list-title a {
        color: #f1f5f9 !important;
    }

    .tidi-lpp__g141-top-excerpt {
        color: #94a3b8;
    }

    .tidi-lpp__featured-title a,
    .tidi-lpp__secondary-title a {
        color: #f1f5f9 !important;
    }

    .tidi-lpp__featured-excerpt,
    .tidi-lpp__secondary-excerpt {
        color: #94a3b8;
    }

    .tidi-lpp__author-name {
        color: #f1f5f9;
    }
}
