.appl-post-list,
.appl-post-list * {
    box-sizing: border-box;
}

.appl-post-list {
    --appl-columns: 3;
    display: grid;
    grid-template-columns: repeat(var(--appl-columns), minmax(0, 1fr));
    gap: var(--appl-gap, 30px);
}

.appl-post-card,
.appl-post-card-inner {
    min-width: 0;
}

.appl-post-card-inner {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.appl-post-image-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.appl-post-image-wrap {
    position: relative;
    display: block;
    overflow: hidden;
    width: 100%;
    background: rgba(0, 0, 0, 0.04);
}

.appl-post-image-wrap img,
.appl-post-image-placeholder {
    display: block;
    width: 100%;
}

.appl-post-image-wrap img {
    height: 100%;
    object-fit: cover;
    transition: transform .55s cubic-bezier(.22,.61,.36,1);
}

.appl-post-image-link:hover img {
    transform: scale(1.04);
}

.appl-post-image-placeholder {
    aspect-ratio: 1 / 1;
    background: linear-gradient(135deg, rgba(0,0,0,.06), rgba(0,0,0,.13));
}

.appl-image-proportion--square .appl-post-image-wrap,
.appl-image-proportion--circle .appl-post-image-wrap {
    aspect-ratio: 1 / 1;
}

.appl-image-proportion--landscape .appl-post-image-wrap {
    aspect-ratio: 4 / 3;
}

.appl-image-proportion--wide .appl-post-image-wrap {
    aspect-ratio: 16 / 9;
}

.appl-image-proportion--portrait .appl-post-image-wrap {
    aspect-ratio: 3 / 4;
}

.appl-image-proportion--original .appl-post-image-wrap img {
    height: auto;
    object-fit: initial;
}

.appl-image-proportion--circle .appl-post-image-wrap {
    border-radius: 50% !important;
}

.appl-image-proportion--circle .appl-post-image-wrap img,
.appl-image-proportion--circle .appl-post-image-placeholder {
    width: 100%;
    height: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: inherit;
}

.appl-post-content {
    position: relative;
    padding-top: 18px;
}

.appl-post-category {
    font-size: 13px;
    line-height: 1.25;
    font-weight: 600;
    color: #ff3b16;
    margin: 0 0 6px;
}

.appl-post-category a {
    color: inherit;
    text-decoration: none;
}

.appl-post-category a:hover {
    text-decoration: underline;
}

.appl-post-title {
    margin: 0;
    color: #20282d;
    font-size: 20px;
    line-height: 1.16;
    font-weight: 600;
}

.appl-post-title a {
    color: inherit;
    text-decoration: none;
    transition: color .25s ease;
}

.appl-post-date {
    --appl-date-x: -4px;
    --appl-date-y: -4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border-radius: 50%;
    background: #ff3b16;
    color: #fff;
    font-size: 11px;
    line-height: 1;
    font-weight: 600;
    white-space: nowrap;
    z-index: 3;
}

.appl-post-date--floating {
    position: absolute;
}

.appl-date-position--image-top-left .appl-post-date--floating {
    left: var(--appl-date-x);
    top: var(--appl-date-y);
}

.appl-date-position--image-top-right .appl-post-date--floating {
    right: var(--appl-date-x);
    top: var(--appl-date-y);
}

.appl-date-position--image-bottom-left .appl-post-date--floating {
    left: var(--appl-date-x);
    bottom: var(--appl-date-y);
}

.appl-date-position--image-bottom-right .appl-post-date--floating {
    right: var(--appl-date-x);
    bottom: var(--appl-date-y);
}

.appl-date-position--content-above .appl-post-date,
.appl-date-position--content-below .appl-post-date {
    margin: 0 0 10px;
}

.appl-date-position--content-below .appl-post-date {
    margin: 10px 0 0;
}

.appl-empty {
    padding: 20px;
    border: 1px solid rgba(0,0,0,.12);
}

@media (max-width: 1024px) {
    .appl-post-list {
        --appl-columns: 2;
    }
}

@media (max-width: 767px) {
    .appl-post-list {
        --appl-columns: 1;
    }
}

/* Carousel mode */
.appl-post-list--carousel {
    display: flex;
    grid-template-columns: none;
    gap: var(--appl-gap, 30px);
    overflow-x: auto;
    overflow-y: visible;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    cursor: auto;
}

.appl-post-list--carousel::-webkit-scrollbar {
    display: none;
}

.appl-post-list--carousel .appl-post-card {
    flex: 0 0 calc((100% - (var(--appl-columns, 3) - 1) * var(--appl-gap, 30px)) / var(--appl-columns, 3));
    scroll-snap-align: start;
}

.appl-post-list--carousel.appl-is-pointer-down,
.appl-post-list--carousel.appl-is-dragging {
    cursor: grabbing;
    scroll-behavior: auto;
    scroll-snap-type: none;
}

.appl-carousel-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.appl-carousel-dot {
    width: 8px;
    height: 8px;
    border: 0;
    padding: 0;
    border-radius: 999px;
    background: currentColor;
    opacity: .25;
    cursor: pointer;
}

.appl-carousel-dot.is-active {
    opacity: 1;
}

/* Floating date badge must sit above circular/hidden image, not be clipped by it */
.appl-post-image-link {
    position: relative;
    overflow: visible;
}

.appl-post-date--floating {
    pointer-events: none;
}

.appl-image-proportion--circle .appl-post-image-link {
    overflow: visible;
}

@media (max-width: 1024px) {
    .appl-post-list:not(.appl-post-list--carousel) {
        --appl-columns: 2;
    }
}

@media (max-width: 767px) {
    .appl-post-list:not(.appl-post-list--carousel) {
        --appl-columns: 1;
    }
}


/* v1.0.2: carousel safety padding and dot styling refinements */
.appl-post-list--carousel {
    --appl-carousel-edge-padding: 28px;
    padding-left: var(--appl-carousel-edge-padding);
    padding-right: var(--appl-carousel-edge-padding);
    scroll-padding-left: var(--appl-carousel-edge-padding);
    scroll-padding-right: var(--appl-carousel-edge-padding);
}

.appl-post-list--carousel .appl-post-card,
.appl-post-list--carousel .appl-post-card-inner,
.appl-post-list--carousel .appl-post-image-link {
    overflow: visible;
}

.appl-carousel-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    appearance: none;
    -webkit-appearance: none;
    line-height: 1;
    transition: width .25s ease, height .25s ease, background-color .25s ease, border-color .25s ease, opacity .25s ease, transform .25s ease;
    opacity: 1;
}

.appl-carousel-dot.is-active {
    opacity: 1;
}

/* v1.0.3: Elementor editor carousel hardening */
.elementor-editor-active .appl-carousel-dots,
.elementor-editor-preview .appl-carousel-dots {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative;
    z-index: 5;
}

.elementor-editor-active .appl-post-list--carousel,
.elementor-editor-preview .appl-post-list--carousel {
    overflow-x: auto !important;
    overflow-y: visible !important;
}

/* v1.1.1: infinite scroll uses invisible sentinel, no load-more button */
.appl-post-list-widget {
    position: relative;
}

.appl-post-list-widget.appl-is-loading {
    opacity: .72;
    pointer-events: none;
}

.appl-filter-tabs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
}

.appl-filter-tab {
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid currentColor;
    background: transparent;
    color: inherit;
    padding: 8px 18px;
    border-radius: 999px;
    cursor: pointer;
    font: inherit;
    line-height: 1.2;
    transition: color .25s ease, background-color .25s ease, border-color .25s ease, opacity .25s ease;
}

.appl-filter-tab.is-active,
.appl-filter-tab:hover {
    background: #20282d;
    border-color: #20282d;
    color: #fff;
}

.appl-pagination-wrap {
    margin-top: 36px;
}

.appl-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.appl-pagination button {
    appearance: none;
    -webkit-appearance: none;
    min-width: 38px;
    min-height: 38px;
    padding: 8px 14px;
    border: 1px solid rgba(32,40,45,.18);
    border-radius: 999px;
    background: transparent;
    color: #20282d;
    cursor: pointer;
    line-height: 1;
    transition: color .25s ease, background-color .25s ease, border-color .25s ease, opacity .25s ease;
}

.appl-pagination button:hover,
.appl-pagination button.is-active {
    background: #20282d;
    border-color: #20282d;
    color: #fff;
}

.appl-pagination button:disabled {
    opacity: .35;
    cursor: not-allowed;
}

.appl-pagination-load-more {
    min-width: 150px;
}

.appl-carousel-progress {
    width: 100%;
    height: 3px;
    margin-top: 26px;
    background: rgba(32,40,45,.14);
    overflow: hidden;
    border-radius: 999px;
    transform: translateZ(0);
}

.appl-carousel-progress span {
    display: block;
    width: 100%;
    height: 100%;
    background: #ff3b16;
    border-radius: inherit;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform .35s ease;
}

.appl-carousel-fraction {
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 6px;
    margin-top: 24px;
    color: #20282d;
    font-weight: 600;
}

.appl-post-list--draggable {
    cursor: auto;
    touch-action: pan-y;
    user-select: none;
}

.appl-post-list--draggable.appl-is-pointer-down,
.appl-post-list--draggable.appl-is-dragging {
    cursor: grabbing;
}


.appl-pagination-infinite-sentinel {
    display: block;
    width: 100%;
    height: 1px;
    pointer-events: none;
    visibility: hidden;
}

/* v1.1.2: infinite-scroll preloader */
.appl-pagination--infinite {
    min-height: 28px;
    margin-top: 28px;
    justify-content: center;
}

.appl-infinite-preloader {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    min-height: 28px;
    pointer-events: none;
}

.appl-post-list-widget.appl-is-loading .appl-pagination--infinite .appl-infinite-preloader {
    display: inline-flex;
}

.appl-infinite-preloader-dot {
    display: block;
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: currentColor;
    opacity: .35;
    animation: applInfinitePreloader .78s ease-in-out infinite alternate;
}

.appl-infinite-preloader-dot:nth-child(2) {
    animation-delay: .12s;
}

.appl-infinite-preloader-dot:nth-child(3) {
    animation-delay: .24s;
}

@keyframes applInfinitePreloader {
    from {
        transform: translateY(0);
        opacity: .25;
    }
    to {
        transform: translateY(-5px);
        opacity: 1;
    }
}


/* v1.1.6: make carousel draggable from linked images, titles, text and empty areas */
.appl-post-list--draggable,
.appl-post-list--draggable * {
    -webkit-user-select: none;
    user-select: none;
}

.appl-post-list--draggable a,
.appl-post-list--draggable img {
    -webkit-user-drag: none;
    user-drag: none;
}

.appl-post-list--draggable img {
    pointer-events: none;
}

.appl-post-list--draggable .appl-post-image-link,
.appl-post-list--draggable .appl-post-title a,
.appl-post-list--draggable .appl-post-card {
    touch-action: pan-y;
}

/* v1.1.8: image/date wrapper and unlinkable category/date options */
.appl-post-image-area {
    position: relative;
    display: block;
    overflow: visible;
}

.appl-post-category-text {
    color: inherit;
}
