.lyg-posts-filter {
    --lyg-title-hover-scale: 1.03;
    --lyg-image-hover-rotate: 1.5deg;
    --lyg-columns: 4;
    --lyg-cards-gap: 44px;
    width: 100%;
}

.lyg-posts-filter__controls {
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: center;
    margin-bottom: 64px;
}

.lyg-posts-filter__nav {
    position: relative;
    display: inline-flex;
    width: max-content;
    max-width: 100%;
    align-items: stretch;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 34px;
    padding: 26px 34px;
    background: #fff;
}

.lyg-posts-filter__tab {
    position: relative;
    appearance: none;
    border: 0;
    background: transparent;
    color: inherit;
    padding: 10px 8px;
    margin: 0;
    font: inherit;
    line-height: 1.2;
    cursor: pointer;
    white-space: nowrap;
    transition: transform .2s ease, opacity .2s ease, color .2s ease;
}

.lyg-posts-filter__tab:hover,
.lyg-posts-filter__tab:focus-visible {
    transform: translateY(-1px);
}

.lyg-posts-filter__tab:focus-visible,
.lyg-posts-filter__mobile-trigger:focus-visible,
.lyg-posts-filter__mobile-option:focus-visible,
.lyg-posts-filter__carousel-arrow:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 4px;
}

.lyg-posts-filter__arrow {
    position: absolute;
    left: 0;
    top: 100%;
    --lyg-filter-arrow-color: #fff;
    width: 32px;
    height: 16px;
    background-color: var(--lyg-filter-arrow-color);
    clip-path: polygon(0 0, 100% 0, 50% 100%);
    transform: translateX(var(--lyg-arrow-x, 0));
    transition: transform .38s cubic-bezier(.22,.61,.36,1);
    pointer-events: none;
}

.lyg-posts-filter__mobile {
    display: none;
    position: relative;
    width: min(100%, 420px);
    background: #fff;
}

.lyg-posts-filter__mobile-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    appearance: none;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    padding: 20px 22px;
    cursor: pointer;
    text-align: left;
}

.lyg-posts-filter__mobile-chevron {
    flex: 0 0 auto;
    width: 10px;
    height: 10px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
    transition: transform .3s cubic-bezier(.22,.61,.36,1);
}

.lyg-posts-filter__mobile.is-open .lyg-posts-filter__mobile-chevron {
    transform: translateY(3px) rotate(225deg);
}

.lyg-posts-filter__mobile-menu {
    position: absolute;
    z-index: 20;
    top: calc(100% + 8px);
    left: 0;
    width: 100%;
    max-height: min(60vh, 360px);
    overflow: auto;
    padding: 8px;
    background: inherit;
    box-shadow: 0 14px 38px rgba(0,0,0,.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(.985);
    transform-origin: top center;
    transition: opacity .22s ease, transform .22s cubic-bezier(.22,.61,.36,1), visibility .22s;
}

.lyg-posts-filter__mobile.is-open .lyg-posts-filter__mobile-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.lyg-posts-filter__mobile-option {
    width: 100%;
    display: block;
    appearance: none;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    padding: 12px 14px;
    cursor: pointer;
    transition: background-color .18s ease, transform .18s ease;
}

.lyg-posts-filter__mobile-option:hover,
.lyg-posts-filter__mobile-option:focus-visible,
.lyg-posts-filter__mobile-option.is-selected {
    background: rgba(0,0,0,.055);
}

.lyg-posts-filter__mobile-option:hover {
    transform: translateX(2px);
}

.lyg-posts-filter.is-mobile-filter .lyg-posts-filter__nav { display: none; }
.lyg-posts-filter.is-mobile-filter .lyg-posts-filter__mobile { display: block; }

.lyg-posts-filter__posts-wrap {
    position: relative;
}

.lyg-posts-filter__grid {
    display: grid;
    grid-template-columns: repeat(var(--lyg-columns), minmax(0, 1fr));
    gap: var(--lyg-cards-gap);
    transition: opacity .15s ease, transform .15s ease;
}

.lyg-posts-filter.is-carousel .lyg-posts-filter__grid {
    display: flex;
    gap: var(--lyg-cards-gap);
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    -ms-overflow-style: none;
    touch-action: pan-x pan-y;
}

.lyg-posts-filter.is-carousel .lyg-posts-filter__grid::-webkit-scrollbar {
    display: none;
}

.lyg-posts-filter.is-carousel .lyg-post-card {
    flex: 0 0 calc((100% - (var(--lyg-columns) - 1) * var(--lyg-cards-gap)) / var(--lyg-columns));
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

.lyg-posts-filter__carousel-arrow {
    --lyg-carousel-arrow-bg: #fff;
    --lyg-carousel-arrow-hover-bg: #f0ecff;
    position: absolute;
    z-index: 5;
    top: 115px;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 0;
    border-radius: 0;
    background: var(--lyg-carousel-arrow-bg);
    color: inherit;
    box-shadow: none;
    clip-path: polygon(5% 10%, 96% 2%, 100% 90%, 8% 100%);
    cursor: pointer;
    transform: translateY(-50%);
    transition: opacity .2s ease, transform .2s ease, background-color .2s ease;
}

.lyg-posts-filter__carousel-arrow--next {
    clip-path: polygon(2% 2%, 94% 9%, 100% 97%, 6% 91%);
}

.lyg-posts-filter__carousel-arrow:hover:not(:disabled),
.lyg-posts-filter__carousel-arrow:focus-visible:not(:disabled) {
    background: var(--lyg-carousel-arrow-hover-bg);
    transform: translateY(-50%) scale(1.06) rotate(.6deg);
}

.lyg-posts-filter__carousel-arrow:disabled {
    opacity: .28;
    cursor: default;
}

.lyg-posts-filter__carousel-arrow--prev { left: -18px; }
.lyg-posts-filter__carousel-arrow--next { right: -18px; }

.lyg-posts-filter__grid.is-changing {
    opacity: 0;
    transform: translateY(5px);
}

.lyg-posts-filter.is-loading .lyg-posts-filter__grid {
    pointer-events: none;
}

.lyg-post-card {
    min-width: 0;
    opacity: 0;
    transform: translateY(14px);
    animation: lygCardIn .44s cubic-bezier(.22,.61,.36,1) forwards;
    animation-delay: calc(var(--lyg-card-index, 0) * 70ms);
}

@keyframes lygCardIn {
    to { opacity: 1; transform: translateY(0); }
}

.lyg-posts-filter.has-card-shape {
    --lyg-card-shape-bg: #fff;
    --lyg-card-shape-hover-bg: #f7f5ff;
}

.lyg-posts-filter.has-card-shape .lyg-post-card {
    position: relative;
    isolation: isolate;
}

.lyg-posts-filter.has-card-shape .lyg-post-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: var(--lyg-card-shape-bg);
    clip-path: polygon(3% 5%, 98% 1%, 100% 94%, 5% 100%);
    transition: background-color .25s ease, transform .3s cubic-bezier(.22,.61,.36,1);
}

.lyg-posts-filter.has-card-shape .lyg-post-card:nth-child(4n+2)::before {
    clip-path: polygon(1% 2%, 96% 6%, 99% 98%, 4% 94%);
}
.lyg-posts-filter.has-card-shape .lyg-post-card:nth-child(4n+3)::before {
    clip-path: polygon(5% 1%, 100% 7%, 95% 100%, 1% 95%);
}
.lyg-posts-filter.has-card-shape .lyg-post-card:nth-child(4n)::before {
    clip-path: polygon(2% 8%, 97% 1%, 100% 93%, 6% 99%);
}
.lyg-posts-filter.has-card-shape .lyg-post-card:hover::before,
.lyg-posts-filter.has-card-shape .lyg-post-card:focus-within::before {
    background: var(--lyg-card-shape-hover-bg);
    transform: scale(1.012) rotate(.15deg);
}

.lyg-post-card__link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.lyg-post-card__media {
    width: 100%;
    height: 230px;
    margin-bottom: 24px;
    transform-origin: center center;
    transition: transform .38s cubic-bezier(.22,.61,.36,1), filter .38s ease;
}

.lyg-post-card__svg,
.lyg-post-card__media--category img {
    display: block;
    width: 100%;
    height: 100%;
}

.lyg-post-card__media--category img { object-fit: contain; }
.lyg-post-card__media--empty { background: rgba(0,0,0,.035); }

.lyg-post-card__title {
    margin: 0 0 4px;
    transform-origin: left center;
    transition: transform .3s cubic-bezier(.22,.61,.36,1);
}

.lyg-post-card__date { display: block; margin-bottom: 22px; }
.lyg-post-card__excerpt { margin: 0; }

.lyg-post-card:hover .lyg-post-card__media,
.lyg-post-card:focus-within .lyg-post-card__media {
    transform: rotate(var(--lyg-image-hover-rotate)) scale(1.015);
}

.lyg-post-card:hover .lyg-post-card__title,
.lyg-post-card:focus-within .lyg-post-card__title {
    transform: scale(var(--lyg-title-hover-scale));
}

.lyg-posts-filter__empty { grid-column: 1 / -1; width: 100%; }

@media (max-width: 767px) {
    .lyg-posts-filter__carousel-arrow { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .lyg-post-card,
    .lyg-post-card__media,
    .lyg-post-card__title,
    .lyg-posts-filter__grid,
    .lyg-posts-filter__tab,
    .lyg-posts-filter__arrow,
    .lyg-posts-filter__mobile-menu,
    .lyg-posts-filter__mobile-chevron,
    .lyg-posts-filter__mobile-option,
    .lyg-posts-filter__carousel-arrow {
        animation: none !important;
        transition: none !important;
    }

    .lyg-post-card { transform: none !important; opacity: 1 !important; }
    .lyg-posts-filter.is-carousel .lyg-posts-filter__grid { scroll-behavior: auto; }
}

.lyg-posts-filter__bullets {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 22px;
}

.lyg-posts-filter__bullets[hidden] { display: none; }

.lyg-posts-filter__bullet {
    width: 8px;
    height: 8px;
    flex: 0 0 auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    background-color: #c9c9d6;
    clip-path: polygon(7% 4%, 96% 12%, 91% 96%, 2% 87%);
    cursor: pointer;
    transform: scale(1);
    transition: transform .2s ease, background-color .2s ease, opacity .2s ease;
}
.lyg-posts-filter__bullet:nth-child(3n+2) { clip-path: polygon(2% 14%, 91% 3%, 100% 90%, 9% 98%); }
.lyg-posts-filter__bullet:nth-child(3n) { clip-path: polygon(11% 1%, 99% 9%, 88% 100%, 1% 91%); }

.lyg-posts-filter__bullet:hover,
.lyg-posts-filter__bullet:focus-visible { transform: scale(1.35) rotate(3deg); }
.lyg-posts-filter__bullet.is-active { background-color: #2b12d6; transform: scale(1.35) rotate(-2deg); }
.lyg-posts-filter__bullet:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
    .lyg-posts-filter__bullet { transition: none !important; }
}

/* v1.6.2 — optional irregular filter background */
.lyg-posts-filter {
    --lyg-filter-bg:#fff;
}
.lyg-posts-filter__nav,
.lyg-posts-filter__mobile {
    background:var(--lyg-filter-bg);
}
.lyg-posts-filter.has-filter-shape .lyg-posts-filter__nav,
.lyg-posts-filter.has-filter-shape .lyg-posts-filter__mobile {
    background:transparent;
    border-radius:0;
    box-shadow:none;
}
.lyg-posts-filter__filter-shape {
    position:absolute;
    inset:-3px -5px;
    width:calc(100% + 10px);
    height:calc(100% + 6px);
    z-index:-1;
    overflow:visible;
    pointer-events:none;
}
.lyg-posts-filter__filter-shape path {
    fill:var(--lyg-filter-bg);
}
.lyg-posts-filter.has-filter-shape .lyg-posts-filter__nav,
.lyg-posts-filter.has-filter-shape .lyg-posts-filter__mobile {
    isolation:isolate;
}
.lyg-posts-filter.has-filter-shape .lyg-posts-filter__tab,
.lyg-posts-filter.has-filter-shape .lyg-posts-filter__arrow,
.lyg-posts-filter.has-filter-shape .lyg-posts-filter__mobile-trigger {
    z-index:1;
}
.lyg-posts-filter.has-filter-shape .lyg-posts-filter__mobile-menu {
    background:var(--lyg-filter-bg);
}

/* v1.8.0 — Archive mode, tag chips and incremental loading */
.lyg-posts-filter.is-archive .lyg-posts-filter__grid {
    display: grid;
    grid-template-columns: repeat(var(--lyg-columns), minmax(0, 1fr));
    gap: var(--lyg-cards-gap);
}

.lyg-posts-filter__tags {
    position: relative;
    z-index: 9;
    width: 100%;
    margin: -34px 0 38px;
}
.lyg-posts-filter__tags.is-empty { display: none; }

.lyg-posts-filter__tag-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.lyg-posts-filter__tag-search-wrap {
    position: relative;
    width: min(100%, 320px);
}

.lyg-posts-filter__tag-search {
    width: 100%;
    min-height: 40px;
    box-sizing: border-box;
    padding: 9px 36px 9px 14px;
    border: 1px solid rgba(0,0,0,.14);
    border-radius: 999px;
    background: #fff;
    color: inherit;
    font: inherit;
    appearance: none;
}
.lyg-posts-filter__tag-search:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}
.lyg-posts-filter__tag-search::-webkit-search-cancel-button { cursor: pointer; }

.lyg-posts-filter__tag-suggestions {
    position: absolute;
    z-index: 40;
    top: calc(100% + 6px);
    left: 0;
    width: 100%;
    padding: 6px;
    box-sizing: border-box;
    background: #fff;
    box-shadow: 0 12px 32px rgba(0,0,0,.14);
}
.lyg-posts-filter__tag-suggestions[hidden] { display: none; }

.lyg-posts-filter__tag-suggestion {
    display: block;
    width: 100%;
    border: 0;
    background: transparent;
    color: inherit;
    padding: 9px 10px;
    text-align: left;
    font: inherit;
    cursor: pointer;
}
.lyg-posts-filter__tag-suggestion:hover,
.lyg-posts-filter__tag-suggestion:focus-visible { background: rgba(0,0,0,.06); }

.lyg-posts-filter__tag-reset {
    flex: 0 0 auto;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
    padding: 8px 0;
}
.lyg-posts-filter__tag-reset[hidden] { display: none; }

.lyg-posts-filter__tag-chips {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.lyg-posts-filter__tag-chip,
.lyg-posts-filter__tag-more {
    appearance: none;
    border: 0;
    background: rgba(0,0,0,.065);
    color: inherit;
    font: inherit;
    font-size: .88em;
    line-height: 1.15;
    padding: 8px 13px;
    cursor: pointer;
    clip-path: polygon(3% 8%, 97% 2%, 100% 91%, 6% 100%);
    transition: transform .18s ease, background-color .18s ease, color .18s ease;
}
.lyg-posts-filter__tag-chip:nth-child(3n+2),
.lyg-posts-filter__tag-more { clip-path: polygon(2% 2%, 95% 8%, 100% 96%, 5% 91%); }
.lyg-posts-filter__tag-chip:nth-child(3n) { clip-path: polygon(7% 1%, 100% 7%, 94% 100%, 1% 92%); }
.lyg-posts-filter__tag-chip:hover,
.lyg-posts-filter__tag-chip:focus-visible,
.lyg-posts-filter__tag-more:hover,
.lyg-posts-filter__tag-more:focus-visible { transform: translateY(-1px) rotate(.3deg); }
.lyg-posts-filter__tag-chip.is-active {
    background: #222;
    color: #fff;
}
.lyg-posts-filter__tag-chip.is-extra { display: none; }

.lyg-posts-filter__archive-footer {
    display: grid;
    justify-items: center;
    gap: 12px;
    margin-top: 38px;
}
.lyg-posts-filter__load-more {
    appearance: none;
    border: 0;
    background: #fff;
    color: inherit;
    font: inherit;
    font-weight: 600;
    padding: 13px 24px;
    cursor: pointer;
    clip-path: polygon(3% 8%, 97% 1%, 100% 91%, 6% 100%);
    transition: transform .2s ease, opacity .2s ease;
}
.lyg-posts-filter__load-more:hover:not(:disabled),
.lyg-posts-filter__load-more:focus-visible:not(:disabled) { transform: translateY(-2px) rotate(.25deg); }
.lyg-posts-filter__load-more:disabled { opacity: .45; cursor: wait; }
.lyg-posts-filter__load-more[hidden],
.lyg-posts-filter__lazy-sentinel[hidden] { display: none; }

.lyg-posts-filter__lazy-sentinel {
    width: 1px;
    height: 1px;
}
.lyg-posts-filter__archive-status {
    min-height: 1em;
    font-size: .9em;
    opacity: .65;
}

@media (max-width: 767px) {
    .lyg-posts-filter__tag-tools { align-items: stretch; }
    .lyg-posts-filter__tag-search-wrap { width: 100%; }
    .lyg-posts-filter__tags { margin-top: -20px; }
}

@media (prefers-reduced-motion: reduce) {
    .lyg-posts-filter__tag-chip,
    .lyg-posts-filter__tag-more,
    .lyg-posts-filter__load-more { transition: none !important; }
}
