/* ==========================================================================
   Project List — Elementor Widget
   ========================================================================== */

/* --- Header (intro + filters row) --- */
.pl-header {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 64px;
}

@media (min-width: 1024px) {
    .pl-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

/* --- Intro --- */
.pl-intro {
    font-family: var(--font-body, sans-serif);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-primary, #1a1a1a);
    margin: 0;
    max-width: 480px;
}

/* --- Filters --- */
.pl-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 0;
    justify-content: flex-end;
}

.pl-filter {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.pl-filter__select {
    appearance: none;
    -webkit-appearance: none;
    background-color: #a2937c;
    color: var(--color-white, #fff);
    font-family: var(--font-body, sans-serif);
    font-size: 0.875rem;
    padding: 10px 40px 10px 18px;
    border: none;
    border-radius: 0;
    cursor: pointer;
    outline: none;
    min-width: 160px;
}

.pl-filter__select:focus-visible {
    outline: 2px solid var(--color-accent, #FCD002);
    outline-offset: 2px;
}

.pl-filter__arrow {
    position: absolute;
    right: 14px;
    pointer-events: none;
    color: var(--color-white, #fff);
    display: flex;
    align-items: center;
}

/* --- Grid --- */
.pl-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 40px 24px;
    min-height: 200px;
    transition: opacity 0.2s ease;
}

.pl-grid--loading {
    opacity: 0.4;
    pointer-events: none;
}

@media (min-width: 640px) {
    .pl-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .pl-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* --- Abstract grid ---
   Mobile: single column, standard spacing.
   768px+: 10-column grid. Each group of 3 cards:
     Card 1 (3n+1): cols 1–5 (left, narrower), sits at top
     Card 2 (3n+2): cols 5–11 (right, wider), drops down
     Card 3 (3n+0): cols 3–8 (center), drops further
   margin-top creates the vertical stagger; margin-bottom
   adds breathing room before the next group. */
.pl-grid--abstract {
    grid-template-columns: 1fr;
    gap: 48px 0;
}

@media (min-width: 768px) {
    .pl-grid--abstract {
        grid-template-columns: repeat(10, 1fr);
        column-gap: 24px;
        row-gap: 0;
        align-items: start;
    }

    /* Card 1: left, narrower */
    .pl-grid--abstract .pl-card:nth-child(3n+1) {
        grid-column: 1 / 5;
        margin-top: 0;
        margin-bottom: 120px;
    }

    /* Card 2: right, wider, drops down */
    .pl-grid--abstract .pl-card:nth-child(3n+2) {
        grid-column: 7 / 11;
        margin-top: 100px;
        margin-bottom: 0;
    }

    /* Card 3: center, drops further */
    .pl-grid--abstract .pl-card:nth-child(3n) {
        grid-column: 3 / 8;
        margin-top: 100px;
        margin-bottom: 120px;
    }

    /* Remove bottom margin from whichever card ends the grid */
    .pl-grid--abstract .pl-card:last-child {
        margin-bottom: 0;
    }

    /* Card 1 & 3: fixed image height */
    .pl-grid--abstract .pl-card:nth-child(3n+1) .pl-card__img,
    .pl-grid--abstract .pl-card:nth-child(3n) .pl-card__img {
        height: 400px !important;
        object-fit: cover;
    }

    /* Card 2: fixed image height */
    .pl-grid--abstract .pl-card:nth-child(3n+2) .pl-card__img {
        height: 500px !important;
        object-fit: cover;
    }
}

/* --- Card --- */
.pl-card {
    display: flex;
    flex-direction: column;
}

.pl-card__media {
    position: relative;
    height: 300px;
    aspect-ratio: unset;
    overflow: hidden;
    margin-bottom: 16px;
}

@media (min-width: 640px) {
    .pl-card__media {
        height: auto;
        aspect-ratio: 4 / 3;
    }
}

.pl-card__media .pl-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.pl-card__media:hover .pl-card__img {
    transform: scale(1.06);
}

/* Abstract grid: images fill their natural height, no forced ratio */
.pl-grid--abstract .pl-card__media {
    aspect-ratio: unset;
    height: auto;
}

.pl-grid--abstract .pl-card__img {
    height: auto;
    width: 100%;
}

/* --- Tags overlay --- */
.pl-card__tags {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    z-index: 1;
}

.pl-card__tag {
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.88);
    color: var(--color-primary, #1a1a1a);
    font-family: var(--font-body, sans-serif);
    font-size: 0.6875rem;
    line-height: 1;
    padding: 4px 8px;
    border-radius: var(--radius, 3px);
    white-space: nowrap;
}

/* --- Card title --- */
.pl-card__title-link {
    text-decoration: none;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
}

.pl-card__title {
    font-family: 'Mulish', var(--font-display, serif);
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    font-weight: 400;
    line-height: 1.3;
    margin: 0;
    color: var(--color-primary, #1a1a1a);
    flex: 1;
}

.pl-card__arrow {
    flex-shrink: 0;
    width: 20px;
    height: auto;
    fill: currentColor;
    color: var(--color-primary, #1a1a1a);
    margin-top: 0.2em;
}

/* --- No results --- */
.pl-no-results {
    grid-column: 1 / -1;
    font-family: var(--font-body, sans-serif);
    font-size: 1rem;
    color: var(--color-muted, #a0a0a0);
    padding: 40px 0;
    text-align: center;
}

/* --- Pagination --- */
.pl-pagination {
    margin-top: 48px;
    display: flex;
    justify-content: center;
}

.pl-pager {
    display: flex;
    align-items: center;
    gap: 4px;
}

.pl-pager__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    background: none;
    font-family: var(--font-body, sans-serif);
    font-size: 0.9375rem;
    color: var(--color-primary, #1a1a1a);
    cursor: pointer;
    border-radius: 0;
    transition: background-color 0.15s ease;
    outline: none;
}

/* Override hello-elementor reset.css which sets button:focus { background: #c36 } */
.pl-pager .pl-pager__btn:focus,
.pl-pager .pl-pager__btn:hover {
    background-color: rgba(0, 0, 0, 0.07);
    color: var(--color-primary, #1a1a1a);
}

.pl-pager .pl-pager__btn:focus-visible {
    outline: 2px solid #57715d;
    outline-offset: 2px;
}

.pl-pager .pl-pager__btn:focus:not(:focus-visible) {
    outline: none;
}

.pl-pager__btn:hover:not(.pl-pager__btn--disabled):not(.pl-pager__num--active),
.pl-pager .pl-pager__btn:hover:not(.pl-pager__btn--disabled):not(.pl-pager__num--active) {
    background-color: rgba(0, 0, 0, 0.07);
}

.pl-pager__num--active,
.pl-pager .pl-pager__num--active,
.pl-pager .pl-pager__num--active:focus,
.pl-pager .pl-pager__num--active:hover {
    background-color: #57715d;
    color: var(--color-white, #fff);
    cursor: default;
}

.pl-pager__btn--disabled {
    opacity: 0.3;
    cursor: default;
}

.pl-pager__ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    font-family: var(--font-body, sans-serif);
    font-size: 0.9375rem;
    color: var(--color-muted, #a0a0a0);
    user-select: none;
}
