/* ==========================================================================
   CreateIT LB Projekti — frontend styles
   Licensed exclusively for apkaimes.lv
   ========================================================================== */

/* ── Rīga brand design tokens ─────────────────────────────────────────────
   Full palette (Rīgas zīmola vadlīnijas, p.50) — reference, do not use directly.
   Active scheme references the semantic --lb-* vars below — swap those to
   re-skin the whole LB module without touching component CSS.
   ───────────────────────────────────────────────────────────────────────── */
:root {
    /* Full Rīga palette */
    --rg-blue:            #254CD4;          /* Rudzupuķu zilais                     */
    --rg-blue-light:      #AAD0FF;          /* Debesu zilais                        */
    --rg-blue-dark:       #000B40;          /* Jāņu nakts zilais                    */
    --rg-green-pine:      #0D382C;          /* Priežu zaļais                        */
    --rg-green-mint:      #78E9B8;          /* Kapara zaļais                        */
    --rg-green-cuke:      #E2FF86;          /* Gurķīšu iekšiņas zaļais              */
    --rg-green-oak:       #8F993E;          /* Ozolzaļais                           */
    --rg-sand:            #B8B6A4;          /* Smilšu pelēkais                      */
    --rg-grey:            #565947;          /* Novembra pelēkais                    */
    --rg-lilac:           #BEAFEC;          /* Ceriņu lillā                         */
    --rg-red:             #FF4B33;          /* Dakstiņu sarkanais                   */
    --rg-white:           #FFFFFF;          /* Rīgas baltais                        */

    /* ── Active LB scheme — "Public Record" ──────────────────────────────
       Civic editorial: white surface, deep navy text, cornflower as the
       single saturated accent. No teals, no mints, no greens. Sand and sky
       as soft secondary surfaces.
       Brand fit: Rudzupuķu zilais + Jāņu nakts zilais (p.51 main combo).
       ──────────────────────────────────────────────────────────────────── */
    --lb-bg:              #FFFFFF;                /* surface                        */
    --lb-bg-soft:         #FBF8F0;                /* warm paper wash                */
    --lb-text:            var(--rg-blue-dark);    /* primary text — Jāņu nakts zilais */
    --lb-text-soft:       var(--rg-grey);         /* secondary — Novembra pelēkais  */
    --lb-text-mute:       #8C8979;                /* muted — sand-leaning grey      */
    --lb-line:            rgba(0, 11, 64, 0.14);  /* hairline — navy 14%            */
    --lb-line-strong:     rgba(0, 11, 64, 0.85);  /* strong divider — navy 85%      */
    --lb-accent:          var(--rg-blue);         /* cornflower — links, hover, status */
    --lb-accent-soft:     var(--rg-blue-light);   /* sky — soft highlight fill      */
    --lb-critical:        var(--rg-red);          /* dakstiņu sarkanais — sparingly */
    --lb-accent-rgb:      37, 76, 212;
    --lb-text-rgb:        0, 11, 64;

    /* Legacy aliases (kept so old --lb-* references still resolve) */
    --lb-dark:            var(--lb-text);
    --lb-nov:             var(--lb-text-soft);
    --lb-sand:            var(--rg-sand);
    --lb-soft:            var(--lb-bg-soft);
    --lb-accent-dark:     #1a3cb0;
    --lb-accent-light:    var(--lb-accent-soft);
    --lb-accent-glow:     var(--lb-accent-soft);
    --lb-white:           #FFFFFF;
    --lb-dark-rgb:        var(--lb-text-rgb);
}

/* ── Base font ──────────────────────────────────────────────────────────── */
.lb-gads-badge, .lb-statuss-badge,
.lb-stat-label, .lb-stat-number,
.lb-section-heading,
.lb-timeline-date, .lb-timeline-title, .lb-timeline-today-label,
.lb-file-name, .lb-file-size, .lb-file-ext,
.lb-back-link a, .lb-diary-back-link a,
.lb-archive-title a, .lb-archive-info, .lb-archive-empty,
.lb-diary-single-date, .lb-gallery-count {
    font-family: Apkaimes, 'HelveticaNeue', Arial, sans-serif;
}

/* ═══════════════════════════════════════════════════════════════════════════
   YEAR BADGE
   ═══════════════════════════════════════════════════════════════════════════ */

.lb-gads-badge {
    display: inline-block;
    background: var(--lb-dark);
    color: #fff;
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 2px;
    margin-right: 8px;
    vertical-align: middle;
}

/* ═══════════════════════════════════════════════════════════════════════════
   STATUS BADGE
   ═══════════════════════════════════════════════════════════════════════════ */

/* Status — small leading dot + text. No pill, no fill. The dot's colour
   carries the state; the text remains the same body weight as its context. */
.lb-statuss-badge {
    display: -webkit-inline-flex;
    display: inline-flex;
    -webkit-align-items: baseline;
    align-items: baseline;
    gap: 9px;
    background: transparent;
    color: var(--lb-text);
    font-weight: 600;
    font-size: inherit;
    letter-spacing: 0;
    text-transform: none;
    padding: 0;
    border-radius: 0;
    line-height: inherit;
}
.lb-statuss-badge::before {
    content: '';
    -webkit-flex-shrink: 0;
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--lb-accent);
    -webkit-transform: translateY(-1px);
    transform: translateY(-1px);
}
.lb-statuss-badge.lb-statuss-ieviests::before,
.lb-statuss-badge.lb-statuss-apstiprinats::before {
    background: var(--lb-text);
}
.lb-statuss-badge.lb-statuss-noraidits::before,
.lb-statuss-badge.lb-statuss-noslegumusies::before {
    background: var(--rg-sand);
}

/* ═══════════════════════════════════════════════════════════════════════════
   PROJECT TITLE — left aligned
   ═══════════════════════════════════════════════════════════════════════════ */

h1.lb-projekts-title,
.lb-projekts-title {
    margin: 20px 0 16px;
    text-align: left !important;
    max-width: none !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   GALLERY
   Hero image with thumbnail strip overlaid at the bottom edge.
   Thumbnails are fixed-size squares (56×56px), scroll horizontally if overflow.
   No frames / no border-radius anywhere.
   ═══════════════════════════════════════════════════════════════════════════ */

.lb-gallery {
    margin: 0 0 20px;
    line-height: 0;
}

/* Positioning context for absolute children */
.lb-gallery-wrap {
    position: relative;
    overflow: hidden;
    background: #111;
    line-height: 0;
}

/* Hero image link — no frame */
.lb-gallery-hero-link,
.lb-gallery-hero-link.lightbox-added,
.lb-gallery-hero-link:hover,
.lb-gallery-hero-link:focus {
    display: block;
    overflow: hidden;
    cursor: pointer !important;
    line-height: 0;
}

.lb-gallery-hero-img {
    width: 100%;
    padding: 0 !important;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    border: none !important;
    cursor: pointer !important;
    -webkit-transition: opacity 0.25s ease;
    transition: opacity 0.25s ease;
}
.lb-gallery-hero-link:hover .lb-gallery-hero-img {
    opacity: 0.9;
    padding: 0 !important;
}

/* Counter badge — top-right, above the thumbnail strip */
.lb-gallery-count {
    position: absolute;
    top: 12px;
    right: 14px;
    background: rgba(0,0,0,0.50);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 3px 9px;
    line-height: 1.5;
    pointer-events: none;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 2;
}

/* On-page thumbnail strip is hidden by request — the hero is the only visible
   image. The anchor tags stay in the DOM so Avia's lightbox still groups them
   into the gallery; the lightbox shows the same thumbs at the bottom of the
   overlay (see .lb-mfp-thumbs below). */
.lb-gallery-thumbs {
    display: none !important;
}
.lb-gallery-thumbs::-webkit-scrollbar { display: none; }

/* Lightbox thumbnail strip — injected by JS on first popup open, lives inside
   .mfp-container. Mirrors the gallery items so the user can jump between
   images without using only the prev/next arrows. */
.lb-mfp-thumbs {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: -webkit-flex;
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    padding: 12px 14px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    background: rgba(0, 0, 0, 0.55);
    z-index: 1101;  /* above .mfp-content (1045) and figure caption */
    box-sizing: border-box;
}
.lb-mfp-thumbs::-webkit-scrollbar { height: 6px; }
.lb-mfp-thumbs::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.35); border-radius: 3px; }

.lb-mfp-thumb {
    flex: 0 0 auto;
    width: 64px;
    height: 64px;
    padding: 0;
    margin: 0;
    border: 2px solid transparent;
    background: rgba(255, 255, 255, 0.06);
    cursor: pointer;
    opacity: 0.55;
    transition: opacity 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
    border-radius: 2px;
    overflow: hidden;
    line-height: 0;
}
.lb-mfp-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.lb-mfp-thumb:hover,
.lb-mfp-thumb:focus { opacity: 1; }
.lb-mfp-thumb.is-active {
    opacity: 1;
    border-color: #ffffff;
    transform: translateY(-2px);
}

@media (max-width: 640px) {
    .lb-mfp-thumbs { padding: 8px 10px; gap: 4px; }
    .lb-mfp-thumb { width: 48px; height: 48px; }
}

/* Individual thumbnail — fixed 56×56 square, no frame */
.lb-gallery .lb-gallery-hero-link,
.lb-gallery .lb-gallery-thumb,
.lb-gallery .lb-gallery-hero-img,
.lb-gallery .lb-gallery-thumb-img {
    cursor: pointer !important;
}

.lb-gallery-thumb,
.lb-gallery-thumb.lightbox-added,
.lb-gallery-thumb:hover,
.lb-gallery-thumb:focus {
    -webkit-flex-shrink: 0;
    flex-shrink: 0;
    display: block;
    width: 56px;
    height: 56px;
    overflow: hidden;
    cursor: pointer !important;
    line-height: 0;
    scroll-snap-align: start;
    opacity: 0.75;
    -webkit-transition: opacity 0.2s ease;
    transition: opacity 0.2s ease;
}
.lb-gallery-thumb:hover,
.lb-gallery-thumb.lightbox-added:hover { opacity: 1; }

.lb-gallery-thumb-img {
    width: 100%;
    padding: 0 !important;
    height: 100%;
    object-fit: cover;
    display: block;
    border: 1px solid rgba(225,225,225,0.5) !important; /* half opacity of theme default */
    cursor: pointer !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   MAGNIFIC POPUP FIX
   ═══════════════════════════════════════════════════════════════════════════ */

div.avia-popup.mfp-wrap {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    z-index: 99999 !important;
}

div.avia-popup.mfp-bg {
    z-index: 99998 !important;
}

div.avia-popup .mfp-container {
    height: 100%;
}

div.avia-popup img.mfp-img {
    max-height: calc(100vh - 80px) !important;
    padding: 20px 0;
    box-sizing: border-box;
}

div.avia-popup .mfp-figure::after {
    top: 20px;
    bottom: 20px;
}

/* Theme animation requires mfp-image-loaded on wrap — our init doesn't add it
   for the docs lightbox. Force figure visible once mfp-ready is set, but
   exclude `.mfp-removing` so Avia's own close fade (in avia-snippet-lightbox.css)
   isn't blocked by our !important. */
div.avia-popup.mfp-zoom-in.mfp-ready:not(.mfp-removing) .mfp-figure {
    opacity: 1 !important;
    -webkit-transform: scale(1) !important;
    transform: scale(1) !important;
}

/* The injected thumbnail strip fades in lockstep with the rest of the popup
   on close — Avia's MFP zoom CSS handles .mfp-bg and .mfp-figure; we just
   match its 0.3s ease-out for the thumb strip. */
div.avia-popup .lb-mfp-thumbs {
    -webkit-transition: opacity 0.3s ease-out;
    transition: opacity 0.3s ease-out;
}
div.avia-popup.mfp-removing .lb-mfp-thumbs {
    opacity: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   STATS + INFO CARDS — identical box style
   ═══════════════════════════════════════════════════════════════════════════ */

.lb-stats-row {
    display: -webkit-flex;
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    margin: 0 0 2px;
}

.lb-info-strip {
    margin-bottom: 0;
}

.lb-stat-card {
    display: -webkit-flex;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 16px 22px;
    background: #f4f4f4;
    flex: 1 1 120px;
    min-width: 0;
}

.lb-stat-number {
    display: block;
    font-size: 20px;
    font-weight: 900;
    line-height: 1.2;
    color: var(--lb-dark);
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.lb-info-value {
    font-size: 14px;
    font-weight: 600;
    white-space: normal;
}

.lb-stat-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    color: #919191;
}

.lb-stat-card .lb-statuss-badge {
    margin-bottom: 6px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   BACK LINK
   ═══════════════════════════════════════════════════════════════════════════ */

.lb-back-link {
    margin: 14px 0 24px;
    line-height: 1;
}
.lb-back-link a {
    font-size: 13px;
    font-weight: 600;
    color: var(--lb-dark);
    text-decoration: none;
    -webkit-transition: color 0.2s ease;
    transition: color 0.2s ease;
}
.lb-back-link a:hover { color: var(--lb-accent); }

/* ═══════════════════════════════════════════════════════════════════════════
   PROJECT CONTENT
   ═══════════════════════════════════════════════════════════════════════════ */

.lb-projekts-content {
    margin: 0 0 36px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SECTION HEADING — no separator line
   ═══════════════════════════════════════════════════════════════════════════ */

#top .lb-section-heading,
#top #wrap_all .lb-section-heading {
    font-family: Apkaimes, 'HelveticaNeue', Arial, sans-serif;
    font-size: 18px !important;
    font-weight: 700 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    color: var(--lb-text) !important;
    margin: 0 0 16px !important;
    padding: 0 !important;
    text-align: left !important;
    /* no border — sections are separated by space only */
}

/* ═══════════════════════════════════════════════════════════════════════════
   DIARY TIMELINE — grid layout, square markers, axis pixel-perfect centred
   ═══════════════════════════════════════════════════════════════════════════ */

.lb-diary-section {
    margin: 24px 0 24px !important;
    padding-top: 18px !important;
    border-top: 1px solid var(--lb-line) !important;
}

/*
 * Two-column grid per row:
 *   col 1 = 20px  ← marker column; axis centre = 10px from timeline left
 *   col 2 = 1fr   ← content
 * Axis ::before sits at left: 9px, width: 2px → centre exactly at 10px.
 * .lb-tl-mark is 20px, flex-centred → square dot centre also at 10px. ✓
 */
.lb-timeline {
    position: relative;
}

.lb-timeline::before {
    content: '';
    position: absolute;
    left: 9px;          /* 9 + 2/2 = 10px centre — matches .lb-tl-mark centre */
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--lb-line);
    pointer-events: none;
}

/* Shared row layout — compact one-line entries */
.lb-timeline-entry,
.lb-timeline-today {
    display: -webkit-grid;
    display: grid;
    grid-template-columns: 20px 1fr;
    -webkit-column-gap: 12px;
    column-gap: 12px;
    margin-bottom: 8px;
    align-items: baseline;
}

/* Today mark: 10px dot, same line-height → padding = 10.7 - 5 = 5.7 ≈ 6px */
.lb-timeline-today .lb-tl-mark {
    padding-top: 6px;
}
.lb-timeline-today--end { margin-bottom: 0; }

/* ── Marker column ───────────────────────────────────────────────────────── */
.lb-tl-mark {
    width: 20px;
    display: -webkit-flex;
    display: flex;
    justify-content: center;
    /*
     * Align square centre with lb-timeline-date text centre.
     * date: font-size 11px, theme line-height 21.45px → text centre at 10.7px.
     * square 7px → padding-top = 10.7 - 3.5 = 7.2 ≈ 7px.
     */
    padding-top: 7px;
    position: relative;
    z-index: 1;
}

/* Square dot on regular entries */
.lb-timeline-entry .lb-tl-mark::after {
    content: '';
    display: block;
    width: 7px;
    height: 7px;
    background: var(--lb-dark);
    box-sizing: border-box;
    /* no border-radius — sharp square */
}

/*
 * Accent bullet — used for both "šodiena" and "latest entry (finished project)"
 *   background: --lb-accent inner fill
 *   border: 2px #ffffff (white ring)
 *   outline: 2px --lb-dark (navy outer ring)
 */
.lb-timeline-today-dot,
.lb-timeline-entry--latest .lb-tl-mark::after {
    width: 10px;
    height: 10px;
    background: var(--lb-accent);     /* blue inner fill */
    border: 2px solid #ffffff !important;
    outline: 2px solid var(--lb-dark);
    box-sizing: border-box;
    /* no border-radius */
}

/* span element needs display:block */
.lb-timeline-today-dot { display: block; }

/* Latest entry: larger dot needs adjusted padding-top */
.lb-timeline-entry--latest .lb-tl-mark {
    padding-top: 6px; /* 10px dot: 10.7 - 5 = 5.7 ≈ 6px */
}
.lb-timeline-entry--latest .lb-timeline-date {
    color: var(--lb-accent);
}

/* ── Content column ──────────────────────────────────────────────────────── */
.lb-tl-body {
    min-width: 0;
}

.lb-timeline-date {
    display: inline;  /* inline so date sits on the same line as the title (one-line entry) */
    font-family: Apkaimes, 'HelveticaNeue', Arial, sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0;
    color: var(--lb-text);
    margin-bottom: 0;
    text-transform: none;
    font-variant-numeric: tabular-nums;
}

#top .main_color a.lb-timeline-title,
#top a.lb-timeline-title {
    font-family: Apkaimes, 'HelveticaNeue', Arial, sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: var(--lb-text) !important;
    text-decoration: none !important;
    line-height: 1.4;
    display: inline;  /* inline so it joins the date with " – " separator */
    -webkit-transition: color 0.2s ease;
    transition: color 0.2s ease;
}
#top .main_color a.lb-timeline-title:hover,
#top a.lb-timeline-title:hover {
    color: var(--lb-accent) !important;
}

/* Today label — flat tag, no rounded pill */
.lb-timeline-today-label {
    display: inline-block;
    background: var(--lb-dark);
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    padding: 3px 8px;
    line-height: 1.5;
    /* no border-radius */
}

/* ═══════════════════════════════════════════════════════════════════════════
   FILES LIST
   ═══════════════════════════════════════════════════════════════════════════ */

/* #top prefix bumps specificity above the theme's
   `.main_color section { border-color: #e1e1e1 }` rule. */
#top .lb-files-section {
    margin: 24px 0 24px;
    padding-top: 18px;
    border-top: 1px solid var(--lb-line);
}

.lb-files-list {
    display: -webkit-flex;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Compact attached-document rows — borderless stack with a subtle hover
   fill, similar to the Finansēšanas konkursi page style. Removing the
   per-row hairlines avoids a "ladder" feel next to the section dividers
   above and below. The hover background gives a clear click affordance
   without adding more horizontal lines. */
#top .main_color a.lb-file-item,
#top a.lb-file-item {
    display: -webkit-flex;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 2px 12px;
    text-decoration: none !important;
    background: transparent;
    color: var(--lb-text) !important;
    border: 0;
    border-radius: 4px;
    -webkit-transition: background 0.15s ease, color 0.15s ease;
    transition: background 0.15s ease, color 0.15s ease;
}
#top .main_color a.lb-file-item:hover,
#top a.lb-file-item:hover {
    background: rgba(0, 11, 64, 0.04);
    color: var(--lb-accent) !important;
}

.lb-file-ext {
    display: -webkit-inline-flex;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* Fixed width so all chips (PDF, DOC, DOCX, XLSX, EDOC) take the same
       horizontal space — filenames line up cleanly across rows regardless
       of extension length. */
    width: 38px;
    min-width: 38px;
    height: 22px;
    padding: 0;
    font-family: Apkaimes, 'HelveticaNeue', Arial, sans-serif;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--lb-text);
    background: #DDE3EC;
    border-radius: 2px;
    flex-shrink: 0;
    -webkit-transition: background 0.15s ease, color 0.15s ease;
    transition: background 0.15s ease, color 0.15s ease;
}
.lb-file-item:hover .lb-file-ext {
    background: var(--lb-accent);
    color: var(--lb-bg);
}

/* Filename + size on the SAME line — gives a single-line row, dramatically
   shorter than the previous two-line stacked meta. Size sits to the right
   of filename as a muted, smaller note. */
.lb-file-meta {
    flex: 1;
    display: -webkit-flex;
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: 10px;
    min-width: 0;
}

.lb-file-name {
    flex: 1;
    font-size: 13px;
    font-weight: 600;
    color: var(--lb-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
    min-width: 0;
    -webkit-transition: color 0.15s ease;
    transition: color 0.15s ease;
}
.lb-file-item:hover .lb-file-name { color: var(--lb-accent); }

.lb-file-size {
    flex-shrink: 0;
    font-family: Apkaimes, 'HelveticaNeue', Arial, sans-serif;
    font-size: 11px;
    color: rgba(0, 11, 64, 0.5);
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

.lb-file-dl {
    display: -webkit-flex;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    color: var(--lb-text-mute);
    -webkit-transition: color 0.15s ease;
    transition: color 0.15s ease;
}
.lb-file-item:hover .lb-file-dl { color: var(--lb-accent); }

/* ═══════════════════════════════════════════════════════════════════════════
   SINGLE DIARY PAGE
   ═══════════════════════════════════════════════════════════════════════════ */

/* ╔══════════════════════════════════════════════════════════════════════════╗
   ║  SINGLE DIARY ENTRY (lb_dienasgramata)                                   ║
   ║  Same visual language as the project detail page: navy text on white,    ║
   ║  cool-grey #F2F4F7 surface accents, cornflower for interactive only.    ║
   ╚══════════════════════════════════════════════════════════════════════════╝ */

/* The breadcrumb uses the theme's own .title_container / .avia-breadcrumbs
   markup (output in the template, outside .content) so it renders identically
   to the project page — no custom breadcrumb CSS needed here. */

/* Date byline — small muted line directly under the headline (standard
   article dateline). Understated so it supports the title without competing. */
#top .lb-diary-single .lb-diary-page-date,
#top #wrap_all .lb-diary-single .lb-diary-page-date {
    display: block;
    font-family: Apkaimes, 'HelveticaNeue', Arial, sans-serif !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    color: var(--lb-text-soft) !important;
    line-height: 1.3 !important;
    margin: 0 0 24px !important;   /* gap down to the image / body */
    padding: 0 !important;
    font-variant-numeric: tabular-nums;
}

/* Editorial title — same scale as project detail h1 */
#top .lb-diary-single .lb-diary-page-title,
#top #wrap_all .lb-diary-single .lb-diary-page-title {
    font-family: Apkaimes, 'HelveticaNeue', Arial, sans-serif;
    font-size: clamp(28px, 3.4vw, 44px) !important;
    font-weight: 700 !important;
    line-height: 1.1 !important;
    letter-spacing: -0.015em !important;
    color: var(--lb-text) !important;
    text-align: left !important;
    text-transform: none !important;
    margin: 0 0 8px !important;   /* tight to the date byline below */
    padding: 0 !important;
    /* No width clamp — long diary titles stay on one line, matching
       .lb-detail-title (which sets max-width: none). */
    max-width: none;
}

/* Featured image — compact, left-aligned editorial photo (NOT a full-width
   hero). Contained to a sensible max-width and gently cropped to 3:2 so tall
   or oddly-shaped source images don't dominate the page. Click opens the full
   resolution in the theme lightbox. */
.lb-diary-single .lb-diary-page-feature {
    margin: 0 0 24px;
    padding: 0;
    max-width: 520px;
}
#top .main_color a.lb-diary-page-feature-link,
#top a.lb-diary-page-feature-link {
    display: block;
    position: relative;
    overflow: hidden;
    line-height: 0;
    background: #E5E7EB;   /* same placeholder grey as the project hero */
    border: none !important;
    cursor: zoom-in;
    text-decoration: none !important;
}
.lb-diary-single .lb-diary-page-feature-img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;   /* reuse the project-hero ratio, not a new one */
    object-fit: cover;
    background: #E5E7EB;
    border: none !important;
    -webkit-transition: -webkit-transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.lb-diary-page-feature-link:hover .lb-diary-page-feature-img {
    -webkit-transform: scale(1.04);
    transform: scale(1.04);
}
/* Zoom affordance — small magnifier chip, bottom-right, appears on hover */
.lb-diary-page-feature-zoom {
    position: absolute;
    right: 10px;
    bottom: 10px;
    display: -webkit-inline-flex;
    display: inline-flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    color: var(--lb-bg);
    background: rgba(var(--lb-text-rgb), 0.72);
    border-radius: 50%;
    line-height: 0;
    opacity: 0;
    -webkit-transform: translateY(4px);
    transform: translateY(4px);
    -webkit-transition: opacity 0.2s ease, -webkit-transform 0.2s ease;
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}
.lb-diary-page-feature-link:hover .lb-diary-page-feature-zoom,
.lb-diary-page-feature-link:focus-visible .lb-diary-page-feature-zoom {
    opacity: 1;
    -webkit-transform: translateY(0);
    transform: translateY(0);
}
.lb-diary-single .lb-diary-page-feature-caption {
    margin: 10px 0 0;
    font-family: Apkaimes, 'HelveticaNeue', Arial, sans-serif;
    font-size: 12px;
    line-height: 1.5;
    color: var(--lb-text-mute);
    letter-spacing: 0.2px;
}

/* Mobile: image spans the column */
@media only screen and (max-width: 600px) {
    .lb-diary-single .lb-diary-page-feature { max-width: 100%; }
}

/* Body prose — full content width, navy, Apkaimes (mirrors .lb-detail-body) */
.lb-diary-single .lb-diary-page-body {
    margin: 0 0 28px;
    font-family: Apkaimes, 'HelveticaNeue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: var(--lb-text);
}
/* Belt-and-braces: never let a stray empty paragraph add a phantom gap
   (the template already strips leading/trailing ones). */
.lb-diary-single .lb-diary-page-body p:empty { display: none; }

/* Back-link row — no divider on the diary page, tight spacing after body */
#top .lb-diary-single .lb-diary-back-row,
.lb-diary-single .lb-diary-back-row {
    margin: 0 0 8px;
    padding: 0;
    border-top: 0 !important;
}
.lb-diary-single .lb-diary-page-body * {
    font-family: Apkaimes, 'HelveticaNeue', Arial, sans-serif;
}
#top .main_color .lb-diary-single .lb-diary-page-body strong,
#top .main_color .lb-diary-single .lb-diary-page-body b,
#top .main_color .lb-diary-single .lb-diary-page-body em,
#top .main_color .lb-diary-single .lb-diary-page-body i,
#top .main_color .lb-diary-single .lb-diary-page-body span,
#top .lb-diary-single .lb-diary-page-body strong,
#top .lb-diary-single .lb-diary-page-body b,
#top .lb-diary-single .lb-diary-page-body em,
#top .lb-diary-single .lb-diary-page-body i,
#top .lb-diary-single .lb-diary-page-body span {
    color: var(--lb-text) !important;
}
#top .lb-diary-single .lb-diary-page-body strong,
#top .lb-diary-single .lb-diary-page-body b { font-weight: 700; }

.lb-diary-single .lb-diary-page-body > p:first-child {
    font-size: 21px;      /* match .lb-detail-body lead — same design system */
    line-height: 1.5;
    font-weight: 500;
    margin-bottom: 1.4em;
    color: var(--lb-text);
}
.lb-diary-single .lb-diary-page-body p { margin: 0 0 1.1em; }
.lb-diary-single .lb-diary-page-body p:last-child { margin-bottom: 0; }
.lb-diary-single .lb-diary-page-body a {
    color: var(--lb-text);
    text-decoration: none;
    border-bottom: 1px solid var(--lb-text);
    -webkit-transition: color 0.2s ease, border-color 0.2s ease;
    transition: color 0.2s ease, border-color 0.2s ease;
}
.lb-diary-single .lb-diary-page-body a:hover {
    color: var(--lb-accent);
    border-color: var(--lb-accent);
}
.lb-diary-single .lb-diary-page-body h2,
.lb-diary-single .lb-diary-page-body h3 {
    font-family: Apkaimes, 'HelveticaNeue', Arial, sans-serif;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.01em;
    margin: 1.6em 0 0.5em;
    color: var(--lb-text);
}
.lb-diary-single .lb-diary-page-body ul,
.lb-diary-single .lb-diary-page-body ol { margin: 0 0 1.2em; padding-left: 1.4em; }
.lb-diary-single .lb-diary-page-body li { margin-bottom: 0.4em; }

/* Stack vertically on narrow screens */
@media only screen and (max-width: 600px) {
    .lb-diary-single .lb-diary-page-meta {
        -webkit-flex-direction: column;
        flex-direction: column;
        -webkit-align-items: flex-start;
        align-items: flex-start;
        gap: 8px;
    }
    .lb-diary-single .lb-diary-page-stamp {
        font-size: 16px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   FILTER BAR — individual bordered controls, no container border
   Colour tokens:
     --lb-dark    #000B40   primary text / active
     gray-600     #4b5563   secondary / placeholder text
     gray-300     #d1d5db   border default
     gray-400     #9ca3af   border hover
     --lb-accent  #254CD4   accent / focus
   ═══════════════════════════════════════════════════════════════════════════ */

.lb-filter-bar {
    display: -webkit-flex;
    display: flex;
    -webkit-flex-wrap: wrap;
    flex-wrap: wrap;
    -webkit-align-items: stretch;   /* all children fill the same row height */
    align-items: stretch;
    gap: 8px;
    margin: 0 0 28px;
}

/* ── Shared height — !important beats Enfold's global button/input rules ── */
.lb-filter-select,
.lb-filter-submit,
.lb-filter-reset {
    height: 42px !important;
    min-height: 0 !important;
    max-height: none !important;
    box-sizing: border-box !important;
    font-family: Apkaimes, 'HelveticaNeue', Arial, sans-serif;
    vertical-align: middle;
}

/* ── Selects ─────────────────────────────────────────────────────────────── */
.lb-filter-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: #fff;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6'><path d='M0 0l5 6 5-6z' fill='%234b5563'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 9px 5px;
    border: 1.5px solid #d1d5db;
    border-radius: 0;
    padding: 0 36px 0 12px;
    font-size: 14px;
    font-weight: 400;
    color: #9ca3af;          /* placeholder: gray-400 */
    cursor: pointer;
    -webkit-flex: 1 1 200px;
    flex: 1 1 200px;
    min-width: 0;
    -webkit-transition: border-color 0.15s ease, box-shadow 0.15s ease;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.lb-filter-select--narrow {
    -webkit-flex: 0 1 120px;
    flex: 0 1 120px;
}
.lb-filter-select:hover {
    border-color: #9ca3af;
}
.lb-filter-select:focus {
    outline: none;
    border-color: var(--lb-accent);
    box-shadow: 0 0 0 3px rgba(var(--lb-accent-rgb), 0.18);
}
/* Active = a value is selected */
.lb-filter-select.lb-is-active {
    color: var(--lb-dark);
    font-weight: 600;
    border-color: #6b7280;   /* gray-500 */
}

/* ── Submit button ───────────────────────────────────────────────────────── */
.lb-filter-submit {
    -webkit-flex-shrink: 0;
    flex-shrink: 0;
    background: var(--lb-accent);
    color: #ffffff;
    border: 1.5px solid var(--lb-accent);
    padding: 0 22px !important;     /* !important overrides Enfold button padding */
    margin: 0 !important;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    cursor: pointer;
    white-space: nowrap;
    -webkit-transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    /* ensure text is vertically centred inside the fixed height */
    display: -webkit-inline-flex;
    display: inline-flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: center;
    justify-content: center;
}
.lb-filter-submit:hover {
    background: var(--lb-accent-dark);
    border-color: var(--lb-accent-dark);
    color: #fff;
}
.lb-filter-submit:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(var(--lb-accent-rgb), 0.3);
}

/* ── Reset link ──────────────────────────────────────────────────────────── */
.lb-filter-reset {
    display: -webkit-inline-flex;
    display: inline-flex;
    -webkit-align-items: center;
    align-items: center;
    padding: 0 14px;
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;          /* gray-500 */
    text-decoration: none;
    white-space: nowrap;
    border: 1.5px solid #e5e7eb;
    -webkit-transition: color 0.15s ease, border-color 0.15s ease;
    transition: color 0.15s ease, border-color 0.15s ease;
}
.lb-filter-reset:hover {
    color: var(--lb-dark);
    border-color: #9ca3af;
}
.lb-filter-reset:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(var(--lb-accent-rgb), 0.2);
}

/* ── Filter summary line ─────────────────────────────────────────────────── */
.lb-filter-summary {
    font-size: 13px;
    color: #6b7280;
    margin: -16px 0 20px;
    font-family: Apkaimes, 'HelveticaNeue', Arial, sans-serif;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ARCHIVE GRID
   ═══════════════════════════════════════════════════════════════════════════ */

.lb-archive-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    margin-bottom: 32px;
}

/* ── Card ─────────────────────────────────────────────────────────────────── */
.lb-archive-item {
    background: #f4f4f4;
    overflow: hidden;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    flex-direction: column;
}

/* Thumbnail */
.lb-archive-thumb-link {
    display: block;
    overflow: hidden;
    flex-shrink: 0;
}
.lb-archive-thumb {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
    border: none !important;
    -webkit-transition: -webkit-transform 0.3s ease;
    transition: transform 0.3s ease;
}
.lb-archive-thumb--empty {
    display: block;
    width: 100%;
    height: 180px;
    background: #e2e2e2;
}
.lb-archive-thumb-link:hover .lb-archive-thumb {
    -webkit-transform: scale(1.03);
    transform: scale(1.03);
}

/* Body */
.lb-archive-body {
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    flex-direction: column;
    -webkit-flex: 1;
    flex: 1;
    padding: 12px 14px 14px;
}

.lb-archive-meta-row {
    display: -webkit-flex;
    display: flex;
    gap: 6px;
    -webkit-flex-wrap: wrap;
    flex-wrap: wrap;
    margin-bottom: 8px;
    padding: 10px 0px 0 !important;
}

.lb-archive-title {
    padding: 5px 0px 5px !important;
    margin: 0 0 10px;
    font-size: 15px;
    line-height: 1.3;
}
.lb-archive-title a {
    color: var(--lb-dark);
    text-decoration: none;
    font-weight: 700;
    -webkit-transition: color 0.2s ease;
    transition: color 0.2s ease;
}
.lb-archive-title a:hover { color: var(--lb-accent); }

/* Details list */
.lb-archive-details {
    margin: 0 0 14px;
    padding: 0;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    flex-direction: column;
    gap: 4px;
}

.lb-archive-detail-row {
    display: -webkit-flex;
    display: flex;
    gap: 5px;
    font-size: 13px;
    line-height: 1.5;
    font-family: Apkaimes, 'HelveticaNeue', Arial, sans-serif;
}
.lb-archive-detail-row dt {
    color: #6b7280;          /* gray-500 — readable but secondary */
    font-weight: 400;
    flex-shrink: 0;
    white-space: nowrap;
}
.lb-archive-detail-row dt::after { content: ':'; }
.lb-archive-detail-row dd {
    color: var(--lb-dark);
    font-weight: 600;
    margin: 0;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* "Vairāk par projektu" CTA */
.lb-archive-more {
    display: -webkit-inline-flex;
    display: inline-flex;
    -webkit-align-items: center;
    align-items: center;
    gap: 5px;
    margin-top: auto;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    color: #374151;          /* gray-700 */
    text-decoration: none;
    -webkit-transition: color 0.2s ease;
    transition: color 0.2s ease;
    font-family: Apkaimes, 'HelveticaNeue', Arial, sans-serif;
}
.lb-archive-more:hover { color: var(--lb-accent); }
.lb-archive-more:focus {
    outline: none;
    color: var(--lb-accent);
}

/* ── Pagination ──────────────────────────────────────────────────────────── */
.lb-archive-pagination {
    display: -webkit-flex;
    display: flex;
    -webkit-flex-wrap: wrap;
    flex-wrap: wrap;
    -webkit-justify-content: center;
    justify-content: center;
    -webkit-align-items: center;
    align-items: center;
    gap: 4px;
    margin-top: 40px;
    margin-bottom: 8px;
}

/* Every page-numbers child is a 40×40 square */
.lb-archive-pagination .page-numbers {
    display: -webkit-inline-flex;
    display: inline-flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    box-sizing: border-box;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    color: #374151;
    background: #fff;
    border: 1.5px solid #d1d5db;
    text-decoration: none;
    -webkit-transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    font-family: Apkaimes, 'HelveticaNeue', Arial, sans-serif;
    -webkit-user-select: none;
    user-select: none;
}

/* Hover — any clickable page number */
.lb-archive-pagination a.page-numbers:hover {
    background: var(--lb-dark);
    color: #fff;
    border-color: var(--lb-dark);
}
.lb-archive-pagination a.page-numbers:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(var(--lb-accent-rgb), 0.3);
}

/* Active / current page — filled navy square, white number */
.lb-archive-pagination .page-numbers.current {
    background: var(--lb-accent);
    color: #fff;
    border-color: var(--lb-accent);
    cursor: default;
    font-weight: 700;
}

/* Dots (ellipsis) — no box, just the character */
.lb-archive-pagination .page-numbers.dots {
    width: 24px;
    border: none;
    background: transparent;
    color: #9ca3af;
    cursor: default;
    font-weight: 400;
}

/* Prev / Next arrow squares */
.lb-archive-pagination .page-numbers.prev,
.lb-archive-pagination .page-numbers.next {
    color: #374151;
}
.lb-archive-pagination .page-numbers.prev svg,
.lb-archive-pagination .page-numbers.next svg {
    display: block;
    pointer-events: none;
}
/* Disabled state (first page has no prev, last has no next) */
.lb-archive-pagination .page-numbers.prev:not([href]),
.lb-archive-pagination .page-numbers.next:not([href]) {
    color: #d1d5db;
    cursor: not-allowed;
    background: #f9fafb;
}

/* Empty & empty-state link */
.lb-archive-empty {
    color: #919191;
    font-size: 14px;
}
.lb-archive-empty a {
    color: var(--lb-accent);
    text-decoration: none;
    font-weight: 600;
}
.lb-archive-empty a:hover { text-decoration: underline; }

/* RAIC: apkaime filter with zero projects gets a centred, more prominent
   message inviting the user back to the broader project list. */
.lb-archive-empty--apkaime {
    text-align: center;
    color: var(--lb-text);
    font-size: 16px;
    line-height: 1.6;
    margin: 60px auto;
    max-width: 520px;
}
.lb-archive-empty--apkaime a {
    display: inline-block;
    margin-top: 6px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */

@media only screen and (max-width: 767px) {
    .lb-gallery-thumb-img { height: 52px; }

    .lb-stats-row { gap: 2px; }
    .lb-stat-card { -webkit-flex: 1 1 calc(50% - 1px); flex: 1 1 calc(50% - 1px); }
    .lb-stat-number { font-size: 17px; }

    .lb-archive-grid { grid-template-columns: 1fr; }

    .lb-filter-select,
    .lb-filter-select--narrow { -webkit-flex: 1 1 100%; flex: 1 1 100%; }
    .lb-filter-submit { width: 100%; }
    .lb-filter-reset { width: 100%; -webkit-justify-content: center; justify-content: center; }
}

@media only screen and (min-width: 768px) and (max-width: 989px) {
    .lb-stat-card    { -webkit-flex: 1 1 calc(50% - 1px); flex: 1 1 calc(50% - 1px); }
    .lb-archive-grid { grid-template-columns: repeat(2, 1fr); }
}


/* ═══════════════════════════════════════════════════════════════════════════
   ARCHIVE HERO — archive-lb_projekts.php
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Collapse the Enfold title bar to zero height and make it transparent ──
   Breadcrumb overflows downward 30px into the hero image area.
   Matches the established site pattern used on page-id-3938, -3984, etc.    */
body.post-type-archive-lb_projekts .title_container {
    position: relative;
    z-index: 10;               /* float above the hero section below */
    background: transparent !important;
    box-shadow: none !important;
    border-top: none !important;
    border-bottom: none !important;
}
body.post-type-archive-lb_projekts .title_container .container {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    min-height: 0 !important;
    position: relative;
    top: 30px;
    background-color: transparent !important;
}

/* ── Breadcrumb: white only when bg image is set (.lb-hero-has-bg) ─────── */
body.post-type-archive-lb_projekts .lb-hero-has-bg .breadcrumb,
body.post-type-archive-lb_projekts .lb-hero-has-bg .breadcrumb a {
    color: #ffffff;
}
body.post-type-archive-lb_projekts .lb-hero-has-bg .breadcrumb a:hover {
    color: var(--lb-accent-light);
}
/* No-bg: breadcrumb inherits the theme's default dark colour (no override) */

/* ── Hero: full-section overlay via ::before ───────────────────────────────
   Using ::before on the section so overlay covers full background-image area.
   Color + opacity injected by inline <style> block from PHP.                 */
/* Two-class selector beats Enfold's .avia-section { position:static; min-height:100px } */
.avia-section.lb-archive-hero {
    position: relative !important;
    z-index: 0;
    background-position: center bottom !important;
}
.avia-section.lb-archive-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    /* background-color + opacity set by inline <style> from PHP */
}
.lb-archive-hero .av-section-color-overlay-wrap {
    position: relative;
    z-index: 1;
    padding: 50px 0;            /* matches main.template-page padding in Enfold builder sections */
}

/* ── H1 font size + uppercase — always, regardless of bg image ──────────── */
#top .lb-archive-hero .av-special-heading-tag,
#top #wrap_all .lb-archive-hero .av-special-heading-tag {
    font-size: 50px;
    text-transform: uppercase;
}

/* ── White H1 + border — only when bg image is set (.lb-archive-hero-heading) */
/* Use #top prefix to match Enfold's generated CSS specificity level         */
#top .lb-archive-hero .lb-archive-hero-heading,
#top #wrap_all .lb-archive-hero .lb-archive-hero-heading {
    color: #ffffff;
}
#top .lb-archive-hero .lb-archive-hero-heading .av-special-heading-tag,
#top #wrap_all .lb-archive-hero .lb-archive-hero-heading .av-special-heading-tag {
    color: #ffffff !important;
}
#top .lb-archive-hero .lb-archive-hero-heading .special-heading-inner-border {
    background: #ffffff !important;
    border-color: #ffffff !important;
}

@media only screen and (min-width: 768px) and (max-width: 989px) {
    #top #wrap_all .lb-archive-hero .av-special-heading-tag { font-size: 45px; }
}
@media only screen and (min-width: 480px) and (max-width: 767px) {
    #top #wrap_all .lb-archive-hero .av-special-heading-tag { font-size: 40px; }
}
@media only screen and (max-width: 479px) {
    #top #wrap_all .lb-archive-hero .av-special-heading-tag { font-size: 25px; }
}


/* ═══════════════════════════════════════════════════════════════════════════
   LB BANNER SHORTCODE — [lb_banner]
   ═══════════════════════════════════════════════════════════════════════════ */

.lb-banner-wrap {
    display: block;
    margin: 0;
}

/* Heading above the image */
.lb-banner-heading {
    margin: 0 0 12px !important;
    padding: 0 !important;
    font-family: Apkaimes, 'HelveticaNeue', Arial, sans-serif !important;
}
.lb-banner-heading a {
    display: -webkit-inline-flex;
    display: inline-flex;
    -webkit-align-items: center;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: inherit;
    -webkit-transition: color 0.2s ease;
    transition: color 0.2s ease;
}
.lb-banner-heading a:hover {
    color: var(--lb-accent);
}

.lb-banner-arrow {
    display: -webkit-inline-flex;
    display: inline-flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-flex-shrink: 0;
    flex-shrink: 0;
    -webkit-transition: -webkit-transform 0.22s ease;
    transition: transform 0.22s ease;
}
.lb-banner-heading a:hover .lb-banner-arrow {
    -webkit-transform: translateX(5px);
    transform: translateX(5px);
}

/* Image link */
.lb-banner-link {
    display: block;
    line-height: 0;
    overflow: hidden;
}
.lb-banner-img {
    display: block;
    width: 100%;
    height: auto;
    border: none !important;
    -webkit-transition: -webkit-transform 0.4s ease;
    transition: transform 0.4s ease;
}
.lb-banner-link:hover .lb-banner-img {
    -webkit-transform: scale(1.02);
    transform: scale(1.02);
}

/* ═══════════════════════════════════════════════════════════════════════════
   INTRO PAGE — template-lb-intro.php
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Section 1: hero — two-column grid ────────────────────────────────── */
.lb-intro-hero-wrap {
    padding: 52px 0 40px;
}
/* h1 above the grid — tighten the gap between it and the grid below */
.lb-intro-hero-wrap > .container > .lb-intro-main-heading {
    margin-bottom: 20px;
}

.lb-intro-hero {
    display: -ms-grid;
    display: grid;
    -ms-grid-columns: 1fr 60px 400px;
    grid-template-columns: 1fr 400px;
    gap: 60px;
    -webkit-align-items: start;
    align-items: start;
}

/* ── Left: text ────────────────────────────────────────────────────────── */
.lb-intro-hero-text { min-width: 0; }

/* Heading + eyebrow wrapper with left-bar accent (mockup detail).
   #top + !important needed to beat Avia's .container_wrap_first border
   declarations (otherwise Section 1's bar leaks the theme's grey colour). */
#top .lb-intro-headline,
#top #wrap_all .lb-intro-headline,
#top .container_wrap_first .lb-intro-headline {
    border-left: 4px solid var(--lb-accent) !important;
    border-right: none !important;
    border-top: none !important;
    border-bottom: none !important;
    padding: 4px 0 4px 18px;
    margin: 0 0 28px;
}
#top .lb-intro-headline--center,
#top #wrap_all .lb-intro-headline--center {
    display: inline-block;
    text-align: left;
    margin: 0 0 14px;
}

.lb-intro-eyebrow {
    font-family: Apkaimes, 'HelveticaNeue', Arial, sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    color: var(--lb-text);
    margin: 0 0 8px;
    text-align: left;
}

#top .lb-intro-main-heading,
#top #wrap_all .lb-intro-main-heading {
    font-family: Apkaimes, 'HelveticaNeue', Arial, sans-serif !important;
    font-size: clamp(26px, 3.2vw, 40px) !important;
    font-weight: 800 !important;
    line-height: 1.18 !important;
    color: var(--lb-text) !important;
    margin: 0 !important;
    padding: 0 !important;
    letter-spacing: -0.4px;
    text-align: left !important;
    text-transform: none !important;
}

#top .lb-intro-subheading,
#top #wrap_all .lb-intro-subheading {
    font-family: Apkaimes, 'HelveticaNeue', Arial, sans-serif;
    font-size: 17px !important;
    font-weight: 700 !important;
    color: var(--lb-text) !important;
    margin: 0 0 10px !important;
    padding: 0 !important;
    line-height: 1.35 !important;
    text-align: left !important;
    text-transform: none !important;
}

.lb-intro-body {
    font-family: Apkaimes, 'HelveticaNeue', Arial, sans-serif;
    font-size: 15px;
    line-height: 1.75;
    color: var(--lb-text);
    margin: 0 0 0;
}

#top .lb-intro-section-label,
#top #wrap_all .lb-intro-section-label {
    font-family: Apkaimes, 'HelveticaNeue', Arial, sans-serif !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    color: var(--lb-text) !important;
    margin: 24px 0 8px !important;
    padding: 0 !important;
    text-align: left !important;
}

.lb-intro-list {
    margin: 0;
    padding-left: 0;
    list-style: none;
}
.lb-intro-list li {
    font-family: Apkaimes, 'HelveticaNeue', Arial, sans-serif;
    font-size: 15px;
    line-height: 1.7;
    color: var(--lb-text);
    padding: 3px 0 3px 20px;
    position: relative;
}
.lb-intro-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 13px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--lb-accent);
}

.lb-intro-merks {
    font-family: Apkaimes, 'HelveticaNeue', Arial, sans-serif;
    font-size: 15px;
    line-height: 1.7;
    color: var(--lb-text);
    margin: 0;
}

#top .lb-intro-merks-link,
#top #wrap_all .lb-intro-merks-link {
    display: -webkit-inline-flex;
    display: inline-flex;
    -webkit-align-items: center;
    align-items: center;
    gap: 5px;
    margin-top: 12px;
    font-family: Apkaimes, 'HelveticaNeue', Arial, sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--lb-dark) !important;
    text-decoration: none !important;
    -webkit-transition: gap 0.2s ease, color 0.2s ease;
    transition: gap 0.2s ease, color 0.2s ease;
}
#top .lb-intro-merks-link:hover,
#top #wrap_all .lb-intro-merks-link:hover {
    color: var(--lb-accent) !important;
    gap: 9px;
    text-decoration: none !important;
}
#top .lb-intro-merks-link svg,
#top #wrap_all .lb-intro-merks-link svg {
    -webkit-flex-shrink: 0;
    flex-shrink: 0;
    color: #9ca3af;
    -webkit-transition: -webkit-transform 0.2s ease;
    transition: transform 0.2s ease;
}
#top .lb-intro-merks-link:hover svg,
#top #wrap_all .lb-intro-merks-link:hover svg {
    -webkit-transform: translateY(3px);
    transform: translateY(3px);
}

/* ── Right: poster image ───────────────────────────────────────────────── */
.lb-intro-hero-image {
    position: -webkit-sticky;
    position: sticky;
    top: 100px;
    -webkit-align-self: start;
    align-self: start;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0,0,0,0.15), 0 2px 8px rgba(0,0,0,0.08);
}
.lb-intro-hero-image img {
    display: block;
    width: 100%;
    height: auto;
}

/* ── Section 2: Aktualitātes ───────────────────────────────────────────── */
.lb-intro-aktualitates-wrap {
    background: linear-gradient(180deg, #ffffff 0%, #eaeff6 30%, #edf3f8 65%, #f1f5f9 100%);
    border-top: 1px solid var(--lb-line) !important;     /* hairline separator — soft, not heavy */
    border-bottom: 1px solid var(--lb-line) !important;
    padding: 48px 0 48px;
    margin-bottom: 46px;
}
.lb-intro-hero-wrap {
    border-bottom: none !important;
}

/* Inline divider HR was removed — the gradient bg + section padding gives
   enough visual separation without a third horizontal line cluttering the
   block. .lb-intro-divider is kept hidden so any stray <hr> markup left in
   templates (caches, previous render) doesn't render an extra line. */
.lb-intro-divider {
    display: none;
}

/* On the intro page the noteikumi block has only ONE row (the saistošo
   noteikumu PDF). The per-row border-bottom (added globally for compact
   doc lists on project pages) looks like a stray line here — strip it. */
#top .lb-intro-noteikumi a.lb-file-item,
#top .main_color .lb-intro-noteikumi a.lb-file-item {
    border-bottom: 0;
}

.lb-intro-aktualitates {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

#top .lb-intro-aktualitates-heading,
#top #wrap_all .lb-intro-aktualitates-heading {
    font-family: Apkaimes, 'HelveticaNeue', Arial, sans-serif !important;
    font-size: clamp(22px, 2.8vw, 34px) !important;
    font-weight: 800 !important;
    color: var(--lb-text) !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.2 !important;
    letter-spacing: -0.3px;
    text-align: left !important;
    text-transform: none !important;
}

.lb-intro-aktualitates-lead {
    font-family: Apkaimes, 'HelveticaNeue', Arial, sans-serif;
    font-size: 15px;
    color: var(--lb-text);
    line-height: 1.65;
    margin: 0 0 40px;
    text-align: center;
}

/* ── Unified card system: platform cards + all-projects + noteikumi ─────
   All three CTAs use the same flat aesthetic so the section reads as one
   harmonious group instead of three competing button styles.
   Surface: white. Border: 1px navy hairline. Hover: cornflower border + lift. */

.lb-intro-platform-cards {
    display: -webkit-flex;
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    -webkit-justify-content: center;
    justify-content: center;
}

#top a.lb-intro-platform-card,
#top a.lb-intro-all-link,
#top .main_color a.lb-intro-platform-card,
#top .main_color a.lb-intro-all-link {
    display: -webkit-flex;
    display: flex;
    text-decoration: none !important;
    background: var(--lb-bg);
    border: 1px solid var(--lb-line);
    border-radius: 0;
    color: var(--lb-text) !important;
    -webkit-transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, background 0.18s ease;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

#top a.lb-intro-platform-card:hover,
#top a.lb-intro-all-link:hover,
#top .main_color a.lb-intro-platform-card:hover,
#top .main_color a.lb-intro-all-link:hover {
    border-color: var(--lb-accent);
    box-shadow: 0 4px 18px rgba(var(--lb-accent-rgb), 0.12);
    -webkit-transform: translateY(-2px);
    transform: translateY(-2px);
    color: var(--lb-text) !important;
}

.lb-intro-platform-card {
    -webkit-flex: 1 1 0;
    flex: 1 1 0;
    max-width: 280px;
    -webkit-flex-direction: column;
    flex-direction: column;
    -webkit-align-items: flex-start;
    align-items: flex-start;
    padding: 22px 22px 18px;
    gap: 0;
}

/* Drop the legacy dark variant — both platform cards now share one look */
.lb-intro-platform-card--dark {
    background: var(--lb-bg);
    border-color: var(--lb-line);
}
.lb-intro-platform-card--dark .lb-intro-platform-logo img,
.lb-intro-platform-logo--dark img {
    -webkit-filter: none;
    filter: none;
}
.lb-intro-platform-card--dark .lb-intro-platform-label {
    color: var(--lb-text);
}
.lb-intro-platform-card--dark .lb-intro-platform-arrow {
    color: var(--lb-text-mute);
}

/* Logo area */
.lb-intro-platform-logo {
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    height: 46px;
    border-bottom: 1px solid var(--lb-line);
    width: 100%;
    padding-bottom: 14px;
    margin-bottom: 14px !important;
}
.lb-intro-platform-logo img {
    max-height: 36px;
    max-width: 160px;
    width: auto;
    height: auto;
    display: block;
    object-fit: contain;
    object-position: left center;
}

/* Label + arrow — inline flex row */
.lb-intro-platform-label {
    font-family: Apkaimes, 'HelveticaNeue', Arial, sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: -0.005em;
    color: var(--lb-text);
    line-height: 1.35;
    text-align: left;
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: space-between;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
}

.lb-intro-platform-arrow {
    display: -webkit-inline-flex;
    display: inline-flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-flex-shrink: 0;
    flex-shrink: 0;
    color: var(--lb-text-mute);
    -webkit-transition: color 0.15s ease, -webkit-transform 0.15s ease;
    transition: color 0.15s ease, transform 0.15s ease;
}
.lb-intro-platform-card:hover .lb-intro-platform-arrow {
    color: var(--lb-accent);
    -webkit-transform: translateX(3px);
    transform: translateX(3px);
}

.lb-intro-platform-card[aria-disabled="true"] {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

/* ── "All projects" button — full-width sibling of the platform cards ── */
.lb-intro-all-link {
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: space-between;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    max-width: 572px;     /* exactly two platform cards (280×2) + 12px gap */
    margin: 0 auto;
    padding: 16px 22px;
    font-family: Apkaimes, 'HelveticaNeue', Arial, sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: -0.005em;
}
.lb-intro-all-link svg {
    -webkit-flex-shrink: 0;
    flex-shrink: 0;
    color: var(--lb-text-mute);
    -webkit-transition: color 0.15s ease, -webkit-transform 0.15s ease;
    transition: color 0.15s ease, transform 0.15s ease;
}
.lb-intro-all-link:hover svg {
    color: var(--lb-accent);
    -webkit-transform: translateX(4px);
    transform: translateX(4px);
}

/* ── Section 2 footer block — noteikumi + contact ──────────────────────
   Constrained to the same 572px column as the all-projects button so the
   whole section 2 reads as one harmonised stack: heading → lead →
   2 platform cards (572px) → all-projects button (572px) → noteikumi (572px)
   → contacts (572px, centred). */
.lb-intro-footer {
    width: 100%;
    max-width: 572px;
    margin: 32px auto 0;
    padding: 28px 0 0;
    border-top: 1px solid var(--lb-line);
    text-align: left;
}

.lb-intro-noteikumi {
    margin-top: 0;
    margin-bottom: 18px;
}

/* Compact noteikumi row — small icon + filename + size on one line.
   Client requested a much smaller block ("nelikt tādā lielā blokā").
   On the intro page this is a single-row list, so no border-bottom — it
   would look like a stray horizontal line on an otherwise quiet panel. */
#top .lb-intro-noteikumi a.lb-file-item,
#top .main_color .lb-intro-noteikumi a.lb-file-item {
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 8px 0;
    color: var(--lb-text) !important;
    -webkit-transition: color 0.15s ease;
    transition: color 0.15s ease;
}
#top .lb-intro-noteikumi a.lb-file-item:hover,
#top .main_color .lb-intro-noteikumi a.lb-file-item:hover {
    background: transparent;
    color: var(--lb-accent) !important;
}

/* Smaller DOCX chip */
#top .lb-intro-noteikumi .lb-file-ext {
    min-width: 30px;
    height: 22px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.5px;
    background: #DDE3EC;
    color: var(--lb-text);
}
#top .lb-intro-noteikumi a.lb-file-item:hover .lb-file-ext {
    background: var(--lb-accent);
    color: var(--lb-bg);
}
.lb-intro-noteikumi .lb-file-name {
    font-size: 13px;
    line-height: 1.45;
    color: var(--lb-text);
}
.lb-intro-noteikumi .lb-file-size {
    font-size: 11px;
    color: var(--lb-text);
}
.lb-intro-noteikumi .lb-file-dl {
    color: var(--lb-text-mute);
}

/* Allow the long noteikumi title to wrap — override the global nowrap rule */
.lb-intro-noteikumi .lb-file-name {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
}

.lb-intro-noteikumi-link {
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 6px;
    text-decoration: none;
    transition: border-color 0.15s ease, background 0.15s ease;
    text-align: left;
}
.lb-intro-noteikumi-link:hover {
    border-color: #6b7280;
    background: #f9fafb;
}
.lb-intro-noteikumi-link--static { cursor: default; }
.lb-intro-noteikumi-link--static:hover { border-color: #e5e7eb; background: #fff; }

.lb-intro-file-icon {
    position: relative;
    -webkit-flex-shrink: 0;
    flex-shrink: 0;
    color: #6b7280;
    width: 32px;
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: center;
    justify-content: center;
}
.lb-intro-file-icon svg { display: block; }
.lb-intro-file-ext {
    position: absolute;
    bottom: 4px;
    left: 50%;
    -webkit-transform: translateX(-50%);
    transform: translateX(-50%);
    font-size: 7px;
    font-weight: 800;
    letter-spacing: 0.3px;
    color: #fff;
    background: #6b7280;
    padding: 1px 3px;
    border-radius: 2px;
    white-space: nowrap;
    line-height: 1.2;
}

.lb-intro-file-text {
    font-size: 13px;
    line-height: 1.5;
    color: #374151;
    -webkit-flex: 1 1 0;
    flex: 1 1 0;
    min-width: 0;
    text-align: left;
}
.lb-intro-noteikumi-link:hover .lb-intro-file-text { color: var(--lb-dark); }

.lb-intro-file-dl {
    color: #9ca3af;
    -webkit-flex-shrink: 0;
    flex-shrink: 0;
    transition: color 0.15s ease;
}
.lb-intro-noteikumi-link:hover .lb-intro-file-dl { color: #374151; }

.lb-intro-file-placeholder {
    font-size: 11px;
    color: #9ca3af;
    -webkit-flex-shrink: 0;
    flex-shrink: 0;
    font-style: italic;
}
.lb-intro-file-placeholder code {
    background: #f3f4f6;
    padding: 1px 4px;
    border-radius: 3px;
    font-size: 10px;
    color: #6b7280;
}

/* ── Contact row (sits inside the 572px footer column, centred under the
   noteikumi card) ───────────────────────────────────────────────────────── */
.lb-intro-contact {
    display: -webkit-flex;
    display: flex;
    -webkit-flex-wrap: wrap;
    flex-wrap: wrap;
    -webkit-justify-content: center;
    justify-content: center;
    gap: 8px 28px;
    margin: 0;
    padding: 4px 0;
    text-align: center;
}
#top .main_color a.lb-intro-contact-item,
#top a.lb-intro-contact-item {
    display: -webkit-inline-flex;
    display: inline-flex;
    -webkit-align-items: center;
    align-items: center;
    gap: 8px;
    font-family: Apkaimes, 'HelveticaNeue', Arial, sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: var(--lb-text) !important;
    text-decoration: none !important;
    -webkit-transition: color 0.15s ease;
    transition: color 0.15s ease;
}
#top .main_color a.lb-intro-contact-item:hover,
#top a.lb-intro-contact-item:hover {
    color: var(--lb-accent) !important;
}
.lb-intro-contact-item svg {
    color: var(--lb-text);
    -webkit-flex-shrink: 0;
    flex-shrink: 0;
    -webkit-transition: color 0.15s ease;
    transition: color 0.15s ease;
}
.lb-intro-contact-item:hover svg { color: var(--lb-accent); }

/* ── Responsive ────────────────────────────────────────────────────────── */
@media only screen and (max-width: 767px) {
    .lb-intro-hero-wrap { padding: 32px 0 44px; }
    .lb-intro-hero {
        display: -webkit-flex;
        display: flex;
        -webkit-flex-direction: column-reverse;
        flex-direction: column-reverse;
        gap: 32px;
    }
    .lb-intro-hero-image {
        position: static;
        width: 56%;
        max-width: 260px;
    }
    .lb-intro-platform-cards {
        -webkit-flex-direction: column;
        flex-direction: column;
        -webkit-align-items: stretch;
        align-items: stretch;
    }
    .lb-intro-platform-card { max-width: none; }
    .lb-intro-aktualitates-wrap { padding: 44px 0 52px; }
}

@media only screen and (min-width: 768px) and (max-width: 989px) {
    .lb-intro-hero { grid-template-columns: 1fr 280px; gap: 40px; }
}


/* ╔══════════════════════════════════════════════════════════════════════════╗
   ║  SINGLE PROJECT — DETAIL PAGE                                            ║
   ║  Structure follows LB_projekti_apkaimeslv.pdf (slides 7–8):              ║
   ║    · Project title                                                       ║
   ║    · TOP: gallery (left, ~58%) + facts list (right, ~42%)                ║
   ║    · BODY: full-width prose                                              ║
   ║    · DOKUMENTI section                                                   ║
   ║    · DIENASGRĀMATA section                                               ║
   ║    · Back link                                                           ║
   ║                                                                          ║
   ║  Visual treatment: white surface, navy text (Jāņu nakts zilais),         ║
   ║  cornflower (Rudzupuķu zilais) as the only saturated accent. Hairline    ║
   ║  dividers, generous whitespace, no cards/shadows.                        ║
   ╚══════════════════════════════════════════════════════════════════════════╝ */

/* ── Title ───────────────────────────────────────────────────────────────── */
#top .lb-detail-title,
#top #wrap_all .lb-detail-title {
    font-family: Apkaimes, 'HelveticaNeue', Arial, sans-serif;
    font-size: clamp(28px, 3.4vw, 44px) !important;
    font-weight: 700 !important;
    line-height: 1.1 !important;
    letter-spacing: -0.015em !important;
    color: var(--lb-text) !important;
    text-align: left !important;
    text-transform: none !important;
    margin: 24px 0 36px !important;
    padding: 0 !important;
    /* No width clamp — let the title use the full content column so long
       names like "Bolderājas skeitparks "JUMIS" (ar izmaiņām)" stay on one
       line on desktop. */
    max-width: none;
}

/* ── Top section: gallery + facts side-by-side ───────────────────────────── */
.lb-detail-top {
    display: grid;
    grid-template-columns: minmax(0, 58%) minmax(0, 1fr);
    gap: 56px;
    -webkit-align-items: stretch;
    align-items: stretch;
    margin: 0 0 56px;
}
.lb-detail-top-media { min-width: 0; }
.lb-detail-top-facts {
    min-width: 0;
    padding-top: 4px;        /* optical alignment to image cap */
}

/* Top-section gallery uses the legacy .lb-gallery-wrap (overlay thumbs).
   In-column override: tighter aspect ratio for the 58% column width
   (applies to mid-size viewports; desktop overrides below). */
.lb-detail-top-media .lb-gallery { margin: 0; }
.lb-detail-top-media .lb-gallery-hero-img { aspect-ratio: 16 / 10; }

/* Hero placeholder — shown when the project has no gallery images. Same
   visual language as the archive card placeholder: light-grey field with
   the Rīgas atslēgas symbol centred in white. */
.lb-hero-empty {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    background-color: #E5E7EB;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 139 134' fill='%23ffffff'><polygon points='74.2 38.46 64.88 38.46 65.94 23.07 50.53 24.13 50.53 14.81 65.94 15.87 64.88 .48 74.2 .48 73.14 15.87 88.55 14.81 88.55 24.13 73.14 23.07 74.2 38.46'/><path fill-rule='evenodd' d='M116.5,125.77c1.22-.41,2.32-1.13,3.19-2.07.95-.87,1.66-1.97,2.08-3.19.41-1.22.52-2.52.3-3.79-.3-1.71-1.19-3.27-2.5-4.41-1.21-1.06-4.82-3.13-4.85-3.15l-.23-.13s1.78-2.9,2.61-5.51c.51-1.65.44-3.42-.2-5.02-.67-1.66-1.89-3.04-3.47-3.9-1.57-.86-3.39-1.15-5.15-.81-1.49.29-2.87,1.03-3.94,2.1-1.08,1.08-1.81,2.45-2.1,3.94-.23,1.16-.34,5.74-.34,5.79v.27h-.28c-.05,0-4.64.11-5.8.34-1.49.29-2.87,1.02-3.95,2.1-1.08,1.08-1.81,2.45-2.1,3.94-.33,1.76-.05,3.58.81,5.15.86,1.57,2.24,2.79,3.9,3.46,1.6.64,3.38.72,5.03.2,2.61-.83,5.52-2.6,5.52-2.6l.13.23s2.09,3.64,3.15,4.85c1.14,1.31,2.7,2.19,4.41,2.5,1.27.22,2.57.11,3.79-.3ZM20.96,122.07c3.5-.75,7.06-1.12,10.63-1.13,3.57,0,7.14.38,10.63,1.13-.75-3.49-1.12-7.05-1.13-10.62,0-3.57.38-7.13,1.13-10.62-3.5.75-7.06,1.12-10.63,1.13-3.57,0-7.14-.38-10.63-1.13.75,3.49,1.12,7.05,1.13,10.62,0,3.57-.38,7.13-1.13,10.62ZM31.17,51.03l5.26,5.26,5.26-5.26-5.26-5.26-5.26,5.26ZM31.17,40.52l-5.26-5.26-5.26,5.26,5.26,5.26,5.26-5.26ZM123.91,96.68c.88,3.16.03,7.8-1.59,10.17,2.63,1,5.76,4.1,6.63,7.13.54,1.89.7,3.88.48,5.83-.23,1.96-.84,3.85-1.81,5.56-.73,1.3-1.64,2.49-2.72,3.53-1.04,1.08-2.23,1.99-3.53,2.72-1.72.96-3.61,1.58-5.57,1.81-1.96.23-3.94.07-5.84-.47-3.03-.86-6.13-3.99-7.13-6.62-2.37,1.61-7.02,2.47-10.18,1.59-7.84-2.19-12.07-10.3-9.81-18.25,1.21-4.26,4.43-7.42,8.77-8.75l-22.14-22.12-17.23,17.21.02.02c-2.21,2.21-3.75,8.55-3.75,15.42s1.54,13.21,3.75,15.42l-5.24,5.23c-2.21-2.21-8.56-3.75-15.43-3.75s-13.22,1.54-15.43,3.75l-5.24-5.23c2.21-2.21,3.75-8.55,3.75-15.42s-1.54-13.21-3.75-15.42l5.24-5.23c2.21,2.21,8.56,3.75,15.43,3.75s13.22-1.54,15.43-3.75l.02.02,17.23-17.21-17.33-17.32-10.52,10.51-5.7-5.7-5.26,5.26,5.26,5.26-5.26,5.26-10.52-10.51,10.52-10.51-4.38-4.38-10.52,10.51L.04,51.47l5.26-5.26,5.26,5.26,5.26-5.26-5.7-5.7,10.52-10.51-5.45-5.44,5.26-5.26,49.08,49.04,49.03-48.99,5.18,5.2-5.43,5.43,20.35,20.34-10.52,10.51-8.85-8.85,5.45-5.06-5.26-5.26-5.09,5.42-6.6-6.6-5.26,5.26,6.6,6.59-5.43,5.09,5.26,5.25,5.07-5.44,8.85,8.84-10.52,10.51-20.36-20.33-17.28,17.26,22.15,22.13c1.33-4.34,4.5-7.57,8.76-8.79,7.96-2.26,16.08,1.96,18.27,9.8Z'/></svg>");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 18%;
}

/* Desktop only — clamp the hero image height to match the facts column.
   The media column is positioned absolutely so it contributes zero intrinsic
   height to the row; the grid row then sizes to whichever content is taller
   (in practice, the facts list). The image fills 100% × 100% with
   object-fit: cover so it crops cleanly without distortion. Result: image
   and facts always share the same height, no matter how many facts rows
   are populated. */
@media only screen and (min-width: 990px) {
    .lb-detail-top-media {
        position: relative;
        overflow: hidden;
        min-height: 0;
    }
    /* Give the row a comfortable minimum height so the hero image isn't
       cropped too aggressively when the facts column happens to be short.
       At ~380px row height, a natural 16:10 hero loses only a sliver
       (image aspect 1.85 vs natural 1.88), so it reads as the original
       photo, not a cropped strip. */
    .lb-detail-top-facts {
        min-height: 380px;
    }
    .lb-detail-top-media .lb-gallery,
    .lb-detail-top-media .lb-hero-empty {
        position: absolute;
        inset: 0;
    }
    .lb-detail-top-media .lb-gallery-wrap,
    .lb-detail-top-media .lb-gallery-hero-link {
        display: block;
        height: 100%;
    }
    .lb-detail-top-media .lb-gallery-hero-img {
        aspect-ratio: auto;
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }
    .lb-detail-top-media .lb-hero-empty {
        width: auto;
        height: auto;
        aspect-ratio: auto;
    }
}

/* ── Facts list (right side) — definition list with hairline rows ─────── */
.lb-facts {
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--lb-line-strong);
}
.lb-facts-row {
    display: grid;
    grid-template-columns: 10em minmax(0, 1fr);
    gap: 14px;
    -webkit-align-items: baseline;
    align-items: baseline;
    padding: 10px 0;
    border-bottom: 1px solid var(--lb-line);
    margin: 0;
}
.lb-facts-label {
    font-family: Apkaimes, 'HelveticaNeue', Arial, sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
    color: var(--lb-text);
    margin: 0;
    line-height: 1.35;
    white-space: normal;
}
.lb-facts-value {
    font-family: Apkaimes, 'HelveticaNeue', Arial, sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: var(--lb-text);
    margin: 0;
    line-height: 1.35;
    word-wrap: break-word;
    overflow-wrap: break-word;
    font-variant-numeric: tabular-nums;
}
.lb-facts-value--lead {
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -0.005em;
}

/* ── Body prose — full content width (matches gallery row + files row) ─── */
.lb-detail-body {
    margin: 0 0 56px;
    font-family: Apkaimes, 'HelveticaNeue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: var(--lb-text);
}
.lb-detail-body * {
    font-family: Apkaimes, 'HelveticaNeue', Arial, sans-serif;
}
.lb-detail-body > p:first-child {
    font-size: 21px;
    line-height: 1.5;
    font-weight: 500;
    margin-bottom: 1.4em;
    color: var(--lb-text);
}
.lb-detail-body p { margin: 0 0 1.1em; }
.lb-detail-body p:last-child { margin-bottom: 0; }
/* Beat Avia's #top .main_color strong, .main_color b … rule (loads later
   than this stylesheet, same base specificity → ours loses without #top) */
#top .main_color .lb-detail-body strong,
#top .main_color .lb-detail-body b,
#top .main_color .lb-detail-body em,
#top .main_color .lb-detail-body i,
#top .main_color .lb-detail-body span,
#top .lb-detail-body strong,
#top .lb-detail-body b,
#top .lb-detail-body em,
#top .lb-detail-body i,
#top .lb-detail-body span {
    color: var(--lb-text) !important;
    font-family: Apkaimes, 'HelveticaNeue', Arial, sans-serif;
}
#top .lb-detail-body strong,
#top .lb-detail-body b { font-weight: 700; }
.lb-detail-body a {
    color: var(--lb-text);
    text-decoration: none;
    border-bottom: 1px solid var(--lb-text);
    -webkit-transition: color 0.2s ease, border-color 0.2s ease;
    transition: color 0.2s ease, border-color 0.2s ease;
}
.lb-detail-body a:hover {
    color: var(--lb-accent);
    border-color: var(--lb-accent);
}
.lb-detail-body h2,
.lb-detail-body h3 {
    font-family: Apkaimes, 'HelveticaNeue', Arial, sans-serif;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.01em;
    margin: 1.8em 0 0.5em;
    color: var(--lb-text);
}
.lb-detail-body ul,
.lb-detail-body ol { margin: 0 0 1.2em; padding-left: 1.4em; }
.lb-detail-body li { margin-bottom: 0.4em; }

/* Files & Diary use the legacy .lb-files-section / .lb-diary-section blocks
   defined earlier in this stylesheet (lines ~415–660). Visual treatment was
   already correct (file rows with PDF chip, square timeline markers + axis);
   it only needed the colour-token migration handled below in the
   "Legacy colour migration" block. */

/* ── Back link at bottom ─────────────────────────────────────────────────── */
.lb-detail-back-row {
    margin: 16px 0 0;
    padding: 24px 0 0;
    border-top: 1px solid var(--lb-line);
}
#top .main_color a.lb-detail-back,
#top a.lb-detail-back {
    display: -webkit-inline-flex;
    display: inline-flex;
    -webkit-align-items: center;
    align-items: center;
    gap: 10px;
    font-family: Apkaimes, 'HelveticaNeue', Arial, sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.4px;
    color: var(--lb-text) !important;
    text-decoration: none !important;
    -webkit-transition: gap 0.2s ease, color 0.2s ease;
    transition: gap 0.2s ease, color 0.2s ease;
}
.lb-detail-back svg {
    -webkit-transition: -webkit-transform 0.2s ease, color 0.2s ease;
    transition: transform 0.2s ease, color 0.2s ease;
}
#top .main_color a.lb-detail-back:hover,
#top a.lb-detail-back:hover {
    color: var(--lb-accent) !important;
    gap: 14px;
}
.lb-detail-back:hover svg {
    -webkit-transform: translateX(-3px);
    transform: translateX(-3px);
    color: var(--lb-accent);
}

/* ── Responsive (detail page) ────────────────────────────────────────────── */
@media only screen and (max-width: 989px) {
    #top .lb-detail-title,
    #top #wrap_all .lb-detail-title {
        font-size: clamp(24px, 5vw, 36px) !important;
        margin: 16px 0 28px !important;
    }
    .lb-detail-top {
        grid-template-columns: 1fr;
        gap: 36px;
        margin-bottom: 40px;
    }
    .lb-detail-body { margin-bottom: 56px; }
    .lb-detail-section { margin-bottom: 56px; }

    .lb-file {
        grid-template-columns: 36px minmax(0, 1fr) auto;
        gap: 16px;
        padding: 16px 0;
    }
    /* Legacy .lb-file card style — hide size + arrow on mobile (the old
       boxed-row layout has its own spacing). Scoped to `.lb-file` so the
       new compact `.lb-file-item` keeps showing the size. */
    .lb-file .lb-file-size { display: none; }
    .lb-file-arrow { display: none; }

    /* Mobile: allow doc filenames to wrap, and stack the file-size below
       so a long name uses the full row width without clashing with the
       size column. */
    .lb-file-item .lb-file-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }
    .lb-file-item .lb-file-name {
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
    }

    .lb-diary-row {
        grid-template-columns: 1fr;
        gap: 4px;
        padding: 14px 0;
    }
}

@media only screen and (max-width: 600px) {
    .lb-facts-row {
        grid-template-columns: 1fr;
        gap: 4px;
        padding: 14px 0;
    }
    .lb-detail-top-media .lb-gallery-hero-img { aspect-ratio: 16 / 11; }
}

/* ── Reduced motion ──────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .lb-detail-top-media .lb-gallery-hero-link,
    .lb-detail-top-media .lb-gallery-hero-img,
    .lb-detail-top-media .lb-gallery-strip-img,
    .lb-file, .lb-file-arrow svg,
    .lb-detail-back, .lb-detail-back svg,
    .lb-detail-body a, a.lb-diary-title {
        -webkit-transition: none !important;
        transition: none !important;
    }
}

/* ── Print ───────────────────────────────────────────────────────────────── */
@media print {
    .lb-detail-back-row { display: none !important; }
    .lb-detail-top { grid-template-columns: 1fr; gap: 24px; }
    .lb-detail-section { page-break-inside: avoid; }
    .lb-detail-body a { border-bottom: 1px solid #000; color: #000; }
}


/* ── Suppress Avia's auto-injected .image-overlay (teal hover layer) ────
   Avia attaches an .image-overlay span inside any image link; default
   colour is teal #3FCAB1. We don't want it on the LB module — the image
   scale + status chip already convey hoverability. */
.lb-card-thumb-link .image-overlay,
.lb-detail-top-media .image-overlay,
.lb-gallery .image-overlay,
.lb-doc-aside-image .image-overlay {
    display: none !important;
}


/* ╔══════════════════════════════════════════════════════════════════════════╗
   ║  ARCHIVE LISTING — 3-column grid, image-on-top cards                     ║
   ║  RAIC reference (24-04 docx, image1): 3 × 2 = 6 per page, image-top      ║
   ║  card with title + facts + "Skatīt vairāk par projektu" link.            ║
   ╚══════════════════════════════════════════════════════════════════════════╝ */

.lb-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 90px 72px;  /* 90px vertical + 72px horizontal — matches Jaunumi page spacing per RAIC follow-up */
    margin: 8px 0 0;
}

/* ── Card ────────────────────────────────────────────────────────────────── */
.lb-card {
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    flex-direction: column;
    background: transparent;
    min-width: 0;
}

/* ── Thumbnail (image-on-top) — cool grey wash matching the docs panel */
.lb-card-thumb-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: #F2F4F7;
    line-height: 0;
    margin: 0 0 18px;
}
.lb-card-thumb {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
    border: none !important;
    -webkit-transition: -webkit-transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
/* Placeholder for projects with no hero image: ascetic flat panel with the
   Rīgas atslēgas (keys) symbol centred in white on a light grey field. */
.lb-card-thumb--empty {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    background-color: #E5E7EB;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 139 134' fill='%23ffffff'><polygon points='74.2 38.46 64.88 38.46 65.94 23.07 50.53 24.13 50.53 14.81 65.94 15.87 64.88 .48 74.2 .48 73.14 15.87 88.55 14.81 88.55 24.13 73.14 23.07 74.2 38.46'/><path fill-rule='evenodd' d='M116.5,125.77c1.22-.41,2.32-1.13,3.19-2.07.95-.87,1.66-1.97,2.08-3.19.41-1.22.52-2.52.3-3.79-.3-1.71-1.19-3.27-2.5-4.41-1.21-1.06-4.82-3.13-4.85-3.15l-.23-.13s1.78-2.9,2.61-5.51c.51-1.65.44-3.42-.2-5.02-.67-1.66-1.89-3.04-3.47-3.9-1.57-.86-3.39-1.15-5.15-.81-1.49.29-2.87,1.03-3.94,2.1-1.08,1.08-1.81,2.45-2.1,3.94-.23,1.16-.34,5.74-.34,5.79v.27h-.28c-.05,0-4.64.11-5.8.34-1.49.29-2.87,1.02-3.95,2.1-1.08,1.08-1.81,2.45-2.1,3.94-.33,1.76-.05,3.58.81,5.15.86,1.57,2.24,2.79,3.9,3.46,1.6.64,3.38.72,5.03.2,2.61-.83,5.52-2.6,5.52-2.6l.13.23s2.09,3.64,3.15,4.85c1.14,1.31,2.7,2.19,4.41,2.5,1.27.22,2.57.11,3.79-.3ZM20.96,122.07c3.5-.75,7.06-1.12,10.63-1.13,3.57,0,7.14.38,10.63,1.13-.75-3.49-1.12-7.05-1.13-10.62,0-3.57.38-7.13,1.13-10.62-3.5.75-7.06,1.12-10.63,1.13-3.57,0-7.14-.38-10.63-1.13.75,3.49,1.12,7.05,1.13,10.62,0,3.57-.38,7.13-1.13,10.62ZM31.17,51.03l5.26,5.26,5.26-5.26-5.26-5.26-5.26,5.26ZM31.17,40.52l-5.26-5.26-5.26,5.26,5.26,5.26,5.26-5.26ZM123.91,96.68c.88,3.16.03,7.8-1.59,10.17,2.63,1,5.76,4.1,6.63,7.13.54,1.89.7,3.88.48,5.83-.23,1.96-.84,3.85-1.81,5.56-.73,1.3-1.64,2.49-2.72,3.53-1.04,1.08-2.23,1.99-3.53,2.72-1.72.96-3.61,1.58-5.57,1.81-1.96.23-3.94.07-5.84-.47-3.03-.86-6.13-3.99-7.13-6.62-2.37,1.61-7.02,2.47-10.18,1.59-7.84-2.19-12.07-10.3-9.81-18.25,1.21-4.26,4.43-7.42,8.77-8.75l-22.14-22.12-17.23,17.21.02.02c-2.21,2.21-3.75,8.55-3.75,15.42s1.54,13.21,3.75,15.42l-5.24,5.23c-2.21-2.21-8.56-3.75-15.43-3.75s-13.22,1.54-15.43,3.75l-5.24-5.23c2.21-2.21,3.75-8.55,3.75-15.42s-1.54-13.21-3.75-15.42l5.24-5.23c2.21,2.21,8.56,3.75,15.43,3.75s13.22-1.54,15.43-3.75l.02.02,17.23-17.21-17.33-17.32-10.52,10.51-5.7-5.7-5.26,5.26,5.26,5.26-5.26,5.26-10.52-10.51,10.52-10.51-4.38-4.38-10.52,10.51L.04,51.47l5.26-5.26,5.26,5.26,5.26-5.26-5.7-5.7,10.52-10.51-5.45-5.44,5.26-5.26,49.08,49.04,49.03-48.99,5.18,5.2-5.43,5.43,20.35,20.34-10.52,10.51-8.85-8.85,5.45-5.06-5.26-5.26-5.09,5.42-6.6-6.6-5.26,5.26,6.6,6.59-5.43,5.09,5.26,5.25,5.07-5.44,8.85,8.84-10.52,10.51-20.36-20.33-17.28,17.26,22.15,22.13c1.33-4.34,4.5-7.57,8.76-8.79,7.96-2.26,16.08,1.96,18.27,9.8Z'/></svg>");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 28%;
    position: relative;
    overflow: hidden;
}
.lb-card:hover .lb-card-thumb {
    -webkit-transform: scale(1.04);
    transform: scale(1.04);
}

/* Status chip overlaid bottom-left of the thumb */
.lb-card-status {
    position: absolute;
    left: 12px;
    bottom: 12px;
    display: -webkit-inline-flex;
    display: inline-flex;
    -webkit-align-items: center;
    align-items: center;
    gap: 8px;
    padding: 6px 11px 6px 10px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    color: var(--lb-text);
    font-family: Apkaimes, 'HelveticaNeue', Arial, sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
    line-height: 1;
    pointer-events: none;
    z-index: 2;
}
.lb-card-status::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--lb-accent);
    -webkit-flex-shrink: 0;
    flex-shrink: 0;
}
.lb-card-status.lb-statuss-ieviests::before,
.lb-card-status.lb-statuss-apstiprinats::before {
    background: var(--lb-text);
}
.lb-card-status.lb-statuss-noraidits::before,
.lb-card-status.lb-statuss-noslegumusies::before {
    background: var(--rg-sand);
}
.lb-card-status.lb-statuss-neatbilst::before {
    background: var(--lb-critical);
}

/* ── Card body ───────────────────────────────────────────────────────────── */
.lb-card-body {
    min-width: 0;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    flex-direction: column;
    -webkit-flex: 1;
    flex: 1;
}

#top .lb-card-title,
#top #wrap_all .lb-card-title {
    font-family: Apkaimes, 'HelveticaNeue', Arial, sans-serif;
    font-size: 20px !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
    letter-spacing: -0.01em !important;
    color: var(--lb-text) !important;
    margin: 0 0 16px !important;
    padding: 0 !important;
    text-align: left !important;
    text-transform: none !important;
}
/* #top prefix beats Avia's .main_color a rule */
#top .main_color .lb-card-title a,
#top .lb-card-title a {
    color: var(--lb-text) !important;
    text-decoration: none;
    -webkit-transition: color 0.2s ease;
    transition: color 0.2s ease;
}
#top .main_color .lb-card-title a:hover,
#top .lb-card-title a:hover {
    color: var(--lb-accent) !important;
}

/* ── Facts list (horizontal: label left, value right) ──────────────────── */
.lb-card-facts {
    margin: 0 0 18px;
    padding: 0;
    border-top: 1px solid var(--lb-line);
}
.lb-card-facts-row {
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: baseline;
    align-items: baseline;
    -webkit-justify-content: space-between;
    justify-content: space-between;
    gap: 14px;
    padding: 7px 0 8px;
    border-bottom: 1px solid var(--lb-line);
    margin: 0;
}
.lb-card-facts-row dt {
    font-family: Apkaimes, 'HelveticaNeue', Arial, sans-serif;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    color: var(--lb-text);
    margin: 0;
    line-height: 1.4;
    -webkit-flex-shrink: 0;
    flex-shrink: 0;
}
.lb-card-facts-row dt::after { content: none; }
.lb-card-facts-row dd {
    font-family: Apkaimes, 'HelveticaNeue', Arial, sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: var(--lb-text);
    margin: 0;
    line-height: 1.4;
    font-variant-numeric: tabular-nums;
    text-align: right;
    min-width: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* ── "Skatīt vairāk par projektu" CTA — #top prefix beats Avia .main_color a */
#top .main_color .lb-card-more,
#top .lb-card-more {
    display: -webkit-inline-flex;
    display: inline-flex;
    -webkit-align-items: center;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    font-family: Apkaimes, 'HelveticaNeue', Arial, sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    color: var(--lb-text) !important;
    text-decoration: none !important;
    border-bottom: 1px solid var(--lb-text);
    padding: 0 0 3px;
    align-self: flex-start;
    -webkit-transition: gap 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    transition: gap 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.lb-card-more svg {
    -webkit-transition: -webkit-transform 0.2s ease;
    transition: transform 0.2s ease;
}
#top .main_color .lb-card-more:hover,
#top .lb-card-more:hover {
    color: var(--lb-accent) !important;
    border-color: var(--lb-accent);
    gap: 12px;
}
.lb-card-more:hover svg {
    -webkit-transform: translateX(3px);
    transform: translateX(3px);
}

/* ── Filter bar — cool-grey container with internal hairline dividers,
   submit cell anchors the right end with the navy block. Uses the same
   #F2F4F7 wash as the doc cards + thumb placeholders so the whole module
   reads as one neutral palette. */
#top .lb-filter-bar,
#top #wrap_all .lb-filter-bar {
    display: -webkit-flex;
    display: flex;
    -webkit-flex-wrap: wrap;
    flex-wrap: wrap;
    -webkit-align-items: stretch;
    align-items: stretch;
    gap: 0;
    margin: 0 0 40px;
    padding: 0;
    border: none;
    background: #F2F4F7;
    overflow: hidden;
}

/* Shared form-element baseline */
#top .lb-filter-select,
#top .lb-filter-submit,
#top .lb-filter-reset {
    height: 60px !important;
    min-height: 60px !important;
    max-height: none !important;
    box-sizing: border-box !important;
    font-family: Apkaimes, 'HelveticaNeue', Arial, sans-serif;
    vertical-align: middle;
    margin: 0 !important;
}

/* Native select — nuke arrows, chevron via background-image */
#top .lb-filter-select,
#top #wrap_all .lb-filter-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: transparent;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1.5l5 5 5-5' fill='none' stroke='%23000B40' stroke-width='1.8' stroke-linecap='square' stroke-linejoin='miter'/></svg>");
    background-repeat: no-repeat;
    background-position: right 20px center;
    background-size: 12px 8px;
    border: 0 !important;
    border-right: 1px solid rgba(0, 11, 64, 0.10) !important;
    border-radius: 0 !important;
    padding: 0 46px 0 22px !important;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.2px;
    color: var(--lb-text);
    cursor: pointer;
    -webkit-flex: 1 1 220px;
    flex: 1 1 220px;
    min-width: 0;
    -webkit-transition: background-color 0.15s ease, box-shadow 0.15s ease;
    transition: background-color 0.15s ease, box-shadow 0.15s ease;
}
#top .lb-filter-select::-ms-expand { display: none; }
#top .lb-filter-select--narrow {
    -webkit-flex: 0 1 150px;
    flex: 0 1 150px;
}
#top .lb-filter-select:hover {
    background-color: rgba(0, 11, 64, 0.04);
}
#top .lb-filter-select:focus {
    outline: none;
    background-color: rgba(var(--lb-accent-rgb), 0.06);
    box-shadow: inset 0 -3px 0 var(--lb-accent);
}
#top .lb-filter-select.lb-is-active {
    color: var(--lb-text);
    font-weight: 700;
    background-color: rgba(0, 11, 64, 0.05);
    box-shadow: inset 0 -3px 0 var(--lb-accent);
}

/* Submit — solid navy block, anchors right end of the bar */
#top .lb-filter-submit,
#top #wrap_all .lb-filter-submit {
    background: var(--lb-text) !important;
    border: 0 !important;
    color: var(--lb-bg) !important;
    padding: 0 38px !important;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    cursor: pointer;
    white-space: nowrap;
    -webkit-flex-shrink: 0;
    flex-shrink: 0;
    border-radius: 0 !important;
    -webkit-transition: background 0.18s ease;
    transition: background 0.18s ease;
    display: -webkit-inline-flex;
    display: inline-flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: center;
    justify-content: center;
}
#top .lb-filter-submit:hover {
    background: var(--lb-accent) !important;
    color: var(--lb-bg) !important;
}
#top .lb-filter-submit:focus {
    outline: none;
    background: var(--lb-accent) !important;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.4);
}

/* Reset link — appears only when filter is active */
#top .lb-filter-reset,
#top #wrap_all .lb-filter-reset {
    display: -webkit-inline-flex;
    display: inline-flex;
    -webkit-align-items: center;
    align-items: center;
    padding: 0 22px !important;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.4px;
    color: var(--lb-text) !important;
    text-decoration: none !important;
    white-space: nowrap;
    border: 0 !important;
    border-left: 1px solid rgba(0, 11, 64, 0.10) !important;
    background: transparent;
    -webkit-transition: color 0.15s ease, background-color 0.15s ease;
    transition: color 0.15s ease, background-color 0.15s ease;
}
#top .lb-filter-reset:hover {
    color: var(--lb-accent) !important;
    background: rgba(0, 11, 64, 0.04);
}

#top .lb-filter-summary,
#top #wrap_all .lb-filter-summary {
    color: var(--lb-text);
    font-size: 13px;
    margin: -18px 0 28px;
    font-family: Apkaimes, 'HelveticaNeue', Arial, sans-serif;
}
#top .lb-filter-summary strong { color: var(--lb-text); font-weight: 700; }

/* ── Pagination — clean square cells ─────────────────────────────────────── */
.lb-archive-pagination {
    margin-top: 48px;
    -webkit-justify-content: flex-start;
    justify-content: flex-start;
}
#top .lb-archive-pagination .page-numbers {
    border-color: var(--lb-line);
    color: var(--lb-text);
    background: var(--lb-bg);
    font-weight: 600;
    border-width: 1px !important;
    border-radius: 0 !important;
}
#top .lb-archive-pagination a.page-numbers:hover {
    background: var(--lb-text);
    border-color: var(--lb-text);
    color: var(--lb-bg);
}
#top .lb-archive-pagination .page-numbers.current {
    background: var(--lb-text);
    border-color: var(--lb-text);
    color: var(--lb-bg);
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media only screen and (min-width: 768px) and (max-width: 989px) {
    .lb-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 32px 24px;
    }
}
@media only screen and (max-width: 767px) {
    .lb-grid {
        grid-template-columns: 1fr;
        gap: 32px 0;
    }
    #top .lb-card-title,
    #top #wrap_all .lb-card-title {
        font-size: 18px !important;
        margin-bottom: 12px !important;
    }
    .lb-card-facts-row {
        grid-template-columns: 7em minmax(0, 1fr);
        gap: 10px;
    }
}

