/* AquaLibs Tags UI v6.4.5.5 */

.aql-tags-page,
.aql-tags-page * {
    box-sizing: border-box;
}

.aql-tags-page {
    width: 100%;
    margin: 6px 0 54px;
    color: #2b2f33;
}

.aql-tags-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    overflow: hidden;
    margin: 0 0 22px;
    padding: 28px 30px;
    border: 1px solid #e8ecef;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 28px rgba(22, 31, 44, .045);
}

.aql-tags-hero::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, #62c54a 0%, #d9ec24 100%);
}

.aql-tags-hero.has-image {
    grid-template-columns: minmax(0, 1fr) 260px;
    align-items: center;
}

.aql-tags-hero__content {
    min-width: 0;
}

.aql-tags-hero__eyebrow {
    margin: 0 0 7px;
    color: #70c746;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.aql-tags-hero__title {
    margin: 0;
    background: none !important;
    color: #22272c !important;
    -webkit-background-clip: border-box !important;
    -webkit-text-fill-color: #22272c !important;
    font-size: 31px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -.6px;
}

.aql-tags-hero__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
    margin-top: 11px;
    color: #7c838b;
    font-size: 14px;
}

.aql-tags-hero__count {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 10px;
    border-radius: 999px;
    background: #f2f9e9;
    color: #5fab38;
    font-size: 12px;
    font-weight: 600;
}

.aql-tags-hero__count strong {
    color: #22272c;
    font-size: 13px;
}

.aql-tags-hero__description {
    max-width: 760px;
    margin-top: 14px;
    color: #666e76;
    font-size: 14px;
    line-height: 1.75;
}

.aql-tags-hero__description > :last-child {
    margin-bottom: 0;
}

.aql-tags-hero__image {
    overflow: hidden;
    height: 150px;
    border-radius: 12px;
    background: #f2f4f5;
}

.aql-tags-hero__image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Toolbar */
.aql-tags-toolbar {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
    padding: 18px;
    border: 1px solid #e8ecef;
    border-radius: 14px;
    background: #fbfcfd;
}

.aql-tags-search {
    min-width: 0;
    flex: 1 1 720px;
}

.aql-tags-search > label,
.aql-tags-limit > label {
    display: block;
    margin: 0 0 7px;
    color: #4a5158;
    font-size: 12px;
    font-weight: 600;
}

.aql-tags-search__row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 9px;
}

.aql-tags-search__inputwrap {
    position: relative;
    min-width: 0;
}

.aql-tags-search__inputwrap svg {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 14px;
    width: 18px;
    height: 18px;
    fill: #98a0a8;
    transform: translateY(-50%);
    pointer-events: none;
}

.aql-tags-page .aql-tags-search .form-control {
    width: 100%;
    height: 46px;
    margin: 0;
    padding: 0 14px 0 42px;
    border: 1px solid #d9dee3;
    border-radius: 10px;
    outline: 0;
    background: #fff;
    color: #2b3035;
    -webkit-text-fill-color: #2b3035;
    font-family: "Poppins", sans-serif;
    font-size: 14px;
    box-shadow: none;
}

.aql-tags-page .aql-tags-search .form-control:focus {
    border-color: #72c94b;
    box-shadow: 0 0 0 3px rgba(114, 201, 75, .13);
}

.aql-tags-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 46px;
    min-width: 92px;
    padding: 0 16px;
    border-radius: 10px;
    font-family: "Poppins", sans-serif;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: transform .15s ease, border-color .15s ease, background .15s ease;
}

.aql-tags-button:hover {
    transform: translateY(-1px);
}

.aql-tags-button--primary {
    border: 1px solid #75c94a;
    background: linear-gradient(135deg, #61c34b 0%, #a8dc3c 100%);
    color: #fff;
}

.aql-tags-button--secondary {
    border: 1px solid #d7dde2;
    background: #fff;
    color: #4c535a;
}

.aql-tags-button--secondary:hover {
    border-color: #75c94a;
    color: #60b83e;
}

.aql-tags-limit {
    flex: 0 0 auto;
}

.aql-tags-limit select {
    height: 46px;
    min-width: 82px;
    padding: 0 10px;
    border: 1px solid #d9dee3;
    border-radius: 10px;
    background: #fff;
    color: #333;
    font-family: "Poppins", sans-serif;
}

/* Results */
.aql-tags-results {
    display: grid;
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: none;
}

.aql-tag-result {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 20px;
    align-items: stretch;
    overflow: hidden;
    min-width: 0;
    min-height: 152px;
    margin: 0;
    padding: 0;
    border: 1px solid #e9edf0;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 5px 18px rgba(22, 31, 44, .03);
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.aql-tag-result:hover {
    border-color: #dce9cf;
    box-shadow: 0 9px 24px rgba(22, 31, 44, .06);
    transform: translateY(-1px);
}

.aql-tag-result__image {
    position: relative;
    display: block;
    min-height: 152px;
    overflow: hidden;
    background: #f1f3f4;
}

.aql-tag-result__image-fallback {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 30% 25%, rgba(174, 221, 75, .18), transparent 36%),
        linear-gradient(145deg, #f7faf3 0%, #edf5e7 100%);
    color: #90bd72;
}

.aql-tag-result__image-fallback svg {
    display: block;
    width: 44px;
    height: 44px;
    fill: currentColor;
    opacity: .72;
}

.aql-tag-result__image--placeholder .aql-tag-result__image-fallback,
.aql-tag-result__image.is-image-error .aql-tag-result__image-fallback {
    display: flex;
}

.aql-tag-result__image.is-image-error img {
    display: none;
}

.aql-tag-result__image img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 152px;
    object-fit: cover;
    transition: transform .25s ease;
}

.aql-tag-result:hover .aql-tag-result__image img {
    transform: scale(1.025);
}


.aql-tag-result__body {
    min-width: 0;
    padding: 18px 20px 17px 0;
}

.aql-tag-result__topline {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 21px;
    margin-bottom: 4px;
}

.aql-tag-result__category {
    display: inline-flex;
    align-items: center;
    min-height: 23px;
    padding: 4px 9px;
    border-radius: 999px;
    background: #f1f8e8;
    color: #61b53c;
    font-size: 10.5px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: .035em;
    text-transform: uppercase;
}

.aql-tag-result__status {
    padding: 3px 7px;
    border-radius: 999px;
    background: #fff2f2;
    color: #c94d4d;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.aql-tag-result__title {
    margin: 0 0 7px;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.38;
}

.aql-tag-result__title a {
    color: #22272c;
    text-decoration: none;
}

.aql-tag-result__title a:hover,
.aql-tag-result__title a:focus {
    color: #63b940;
    -webkit-text-fill-color: #63b940;
}

.aql-tag-result__excerpt {
    display: -webkit-box;
    overflow: hidden;
    margin: 0;
    color: #626a72;
    font-size: 13.5px;
    line-height: 1.72;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.aql-tag-result__readmore {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 10px;
    color: #62b83f;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.aql-tag-result__readmore span {
    transition: transform .15s ease;
}

.aql-tag-result__readmore:hover span {
    transform: translateX(3px);
}

.aql-tag-result.is-unpublished {
    opacity: .72;
}

.aql-tags-empty {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 24px;
    border: 1px solid #e7ebdf;
    border-radius: 14px;
    background: #f8fbf3;
    color: #66705f;
}

.aql-tags-empty strong {
    color: #333a31;
}

/* Pagination */
.aql-tags-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 22px;
}

.aql-tags-pagination .pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.aql-tags-pagination .pagination a,
.aql-tags-pagination .pagination span,
.aql-tags-pagination .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border: 1px solid #dfe3e7;
    border-radius: 9px;
    background: #fff;
    color: #4d545b;
    text-decoration: none;
}

.aql-tags-pagination .active span,
.aql-tags-pagination .page-link:hover,
.aql-tags-pagination a:hover {
    border-color: #7bca4b;
    background: #f3fae9;
    color: #5daf39;
}

.aql-tags-pagination__counter {
    color: #8b9298;
    font-size: 12px;
}

/* Legacy classes are deliberately neutralised inside this component. */
.aql-tags-page .search-results,
.aql-tags-page .numberstt,
.aql-tags-page .resultwrapper,
.aql-tags-page fieldset.filters {
    float: none;
}

@media (max-width: 800px) {
    .aql-tags-hero.has-image {
        grid-template-columns: 1fr;
    }

    .aql-tags-hero__image {
        height: 190px;
    }

    .aql-tags-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .aql-tags-search__row {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .aql-tags-button--secondary {
        grid-column: 1 / -1;
    }

    .aql-tags-limit {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }
}

@media (max-width: 620px) {
    .aql-tags-hero {
        padding: 21px 18px;
        border-radius: 13px;
    }

    .aql-tags-hero__title {
        font-size: 25px;
    }

    .aql-tags-search__row {
        grid-template-columns: 1fr;
    }

    .aql-tags-button {
        width: 100%;
    }

    .aql-tag-result {
        grid-template-columns: 1fr;
    }

    .aql-tag-result__image,
    .aql-tag-result__image img,
    .aql-tag-result__number {
        min-height: 190px;
    }

    .aql-tag-result__body {
        padding: 16px 17px 18px;
    }

    .aql-tags-pagination {
        align-items: flex-start;
        flex-direction: column;
    }
}
