
/* Prema AJAX Resources */

.prema-arf {
    width: 100%;
    margin: 0 auto 35px;
    position: relative;
    z-index: 2;
}

.prema-arf *,
.prema-arf *::before,
.prema-arf *::after {
    box-sizing: border-box;
}

.prema-arf [hidden] {
    display: none !important;
}

/* Filter bar */

.prema-arf__sticky-shell {
    width: 100%;
    background: #fff;
    transition: box-shadow 0.2s ease;
}

.prema-arf.is-filter-active .prema-arf__sticky-shell {
    position: sticky;
    top: 90px;
    z-index: 999;
    background: #fff;
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.08);
}

.prema-arf__filter-bar {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr auto;
    gap: 15px;
    align-items: end;
    width: 100%;
    padding: 20px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.prema-arf__field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}

.prema-arf__field label {
    display: block;
    margin: 0;
    color: #222;
    font-size: 14px;
    font-weight: 600;
}

.prema-arf__field input,
.prema-arf__field select {
    width: 100%;
    min-width: 0;
    height: 46px;
    margin: 0;
    padding: 0 12px;
    border: 1px solid #d5d9df;
    border-radius: 5px;
    background: #fff;
    color: #333;
    font-size: 14px;
    line-height: normal;
}

.prema-arf__field input:focus,
.prema-arf__field select:focus {
    outline: 2px solid rgba(34, 74, 152, 0.18);
    border-color: #224a98;
}

.prema-arf__actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.prema-arf__actions button,
.prema-arf__more {
    min-height: 46px;
    padding: 12px 17px;
    border: 1px solid #224a98;
    border-radius: 5px;
    background: #224a98;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.prema-arf__actions .prema-arf__reset-btn {
    background: #fff;
    color: #224a98;
}

.prema-arf__actions button:hover,
.prema-arf__more:hover {
    background: #18366f;
    border-color: #18366f;
    color: #fff;
}

.prema-arf__actions button:disabled,
.prema-arf__more:disabled {
    opacity: 0.6;
    cursor: wait;
}

/* Status message */

.prema-arf__status {
    margin: 22px 0;
    color: #333;
    font-size: 15px;
}

/* Results grid */

.prema-arf__results {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.prema-arf__card {
    display: flex;
    min-width: 0;
    height: 100%;
    overflow: hidden;
    border: 1px solid #e4e7ec;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.prema-arf__card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.09);
}

.prema-arf__card-link {
    display: flex;
    flex-direction: column;
    width: 100%;
    color: inherit;
    text-decoration: none !important;
}

.prema-arf__card-link:hover {
    color: inherit;
}

.prema-arf__image {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f2f4f7;
}

.prema-arf__image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.prema-arf__card-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    padding: 22px;
}

.prema-arf__type {
    display: inline-block;
    margin-bottom: 12px;
    color: #224a98;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.prema-arf__card-title {
    margin: 0 0 12px;
    color: #222;
    font-size: 21px;
    font-weight: 700;
    line-height: 1.4;
}

.prema-arf__excerpt {
    margin-bottom: 20px;
    color: #555;
    font-size: 14px;
    line-height: 1.7;
}

.prema-arf__read-more {
    margin-top: auto;
    color: #224a98;
    font-size: 14px;
    font-weight: 700;
}

/* Load more */

.prema-arf__more-wrap {
    margin-top: 35px;
    text-align: center;
}

.prema-arf__more {
    min-width: 150px;
}

/*
 * Hide original Elementor sections only while filters are active.
 * Add the class prema-resource-default-content to the original
 * sections that should disappear during filtering.
 */
body.prema-resource-filter-active .prema-resource-default-content {
    display: none !important;
}

/* Tablet */

@media (max-width: 1024px) {
    .prema-arf__filter-bar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .prema-arf__actions {
        align-self: end;
    }

    .prema-arf__results {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
    }
}

/* Mobile */

@media (max-width: 767px) {
    .prema-arf.is-filter-active .prema-arf__sticky-shell {
        top: 70px;
    }

    .prema-arf__filter-bar {
        grid-template-columns: 1fr;
        gap: 13px;
        padding: 15px;
    }

    .prema-arf__actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
    }

    .prema-arf__actions button {
        width: 100%;
        padding: 12px 8px;
    }

    .prema-arf__results {
        grid-template-columns: 1fr;
        gap: 18px;
        margin-top: 22px;
    }

    .prema-arf__card-title {
        font-size: 19px;
    }

    .prema-arf__card-content {
        padding: 18px;
    }
}
