/* =========================================================
   4MOTOKZ_PUBLICATIONS_STYLE_V1
   ========================================================= */

.pub-wrap {
    max-width: 1180px;
    margin: 0 auto 45px;
    box-sizing: border-box;
}

.pub-intro {
    margin: 0 0 22px;
    color: #666;
    font-size: 15px;
    line-height: 1.65;
}

.pub-intro p {
    margin: 0;
}


/* Tabs */

.pub-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 26px;
    padding: 5px;

    background: #f5f5f5;
    border-radius: 10px;
}

.pub-tabs a {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 10px 18px;

    color: #555;
    font-weight: 600;
    text-decoration: none;

    border-radius: 7px;

    transition:
        background .15s ease,
        color .15s ease;
}

.pub-tabs a:hover {
    color: #222;
    background: #fff;
}

.pub-tabs a.active {
    color: #222;
    background: #fff;

    box-shadow:
        0 2px 8px rgba(0,0,0,.07);
}


/* Current category */

.pub-current-category {
    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 15px;

    margin-bottom: 22px;
    padding: 12px 15px;

    background: #fffbea;
    border: 1px solid #ead77b;
    border-radius: 8px;
}

.pub-current-category span {
    font-weight: 700;
}

.pub-current-category a {
    color: #806600;
    text-decoration: none;
}


/* Grid */

.pub-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 24px;
}


/* Card */

.pub-card {
    display: flex;
    flex-direction: column;

    min-width: 0;

    background: #fff;
    border: 1px solid #e4e4e4;
    border-radius: 12px;

    overflow: hidden;

    box-shadow:
        0 3px 12px rgba(0,0,0,.05);

    transition:
        transform .2s ease,
        box-shadow .2s ease,
        border-color .2s ease;
}

.pub-card:hover {
    transform: translateY(-3px);

    border-color: #d8be37;

    box-shadow:
        0 10px 25px rgba(0,0,0,.10);
}


/* Image */

.pub-card-image {
    position: relative;

    display: block;

    width: 100%;
    aspect-ratio: 16 / 9;

    background-color: #f3f3f3;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.pub-no-image {
    position: absolute;
    inset: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #bbb;
    font-size: 58px;
}


/* Body */

.pub-card-body {
    display: flex;
    flex-direction: column;

    flex: 1;

    padding: 17px 18px 16px;
}


/* Categories */

.pub-card-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;

    margin-bottom: 10px;
}

.pub-card-categories a {
    display: inline-block;

    padding: 4px 8px;

    color: #796000;
    background: #fff6c7;

    border-radius: 5px;

    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}


/* Title */

.pub-card-title {
    margin: 0 0 10px !important;
    padding: 0 !important;

    background: none !important;
    border: 0 !important;

    font-size: 19px !important;
    line-height: 1.35 !important;
    font-weight: 700 !important;
}

.pub-card-title a {
    color: #222;
    text-decoration: none;
}

.pub-card-title a:hover {
    color: #8b7000;
}


/* Excerpt */

.pub-card-text {
    margin: 0 0 16px;

    color: #666;

    font-size: 14px;
    line-height: 1.55;

    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;

    overflow: hidden;
}


/* Footer */

.pub-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 10px;

    margin-top: auto;
    padding-top: 13px;

    border-top: 1px solid #eee;
}

.pub-date {
    color: #888;

    font-size: 12px;
}

.pub-date .fa {
    margin-right: 4px;

    color: #b38c00;
}

.pub-more {
    color: #876b00;

    font-size: 13px;
    font-weight: 700;

    text-decoration: none;
}


/* Categories page */

.pub-category-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 12px;
}

.pub-category-card {
    display: grid;

    grid-template-columns:
        35px 1fr auto;

    align-items: center;

    gap: 10px;

    min-height: 62px;

    padding: 12px 15px;

    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 9px;

    color: #333;
    text-decoration: none;

    transition:
        background .15s ease,
        border-color .15s ease,
        transform .15s ease;
}

.pub-category-card:hover {
    transform: translateY(-1px);

    background: #fffbea;
    border-color: #d9be3a;

    color: #222;
}

.pub-category-icon {
    color: #d0a500;

    font-size: 19px;
}

.pub-category-name {
    font-weight: 600;
}

.pub-category-count {
    display: inline-flex;

    min-width: 28px;
    height: 28px;

    align-items: center;
    justify-content: center;

    padding: 0 7px;

    color: #777;
    background: #f3f3f3;

    border-radius: 14px;

    font-size: 12px;
}


/* Pagination */

.pub-pagination {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;

    gap: 7px;

    margin-top: 32px;
}

.pub-pagination a {
    display: inline-flex;

    min-width: 38px;
    height: 38px;

    align-items: center;
    justify-content: center;

    padding: 0 10px;

    border: 1px solid #ddd;
    border-radius: 7px;

    color: #555;
    background: #fff;

    text-decoration: none;
}

.pub-pagination a:hover,
.pub-pagination a.active {
    color: #222;

    border-color: #d8bb2e;
    background: #fff7cf;
}


/* Empty */

.pub-empty {
    padding: 30px 20px;

    text-align: center;

    background: #fafafa;
    border: 1px solid #e5e5e5;
    border-radius: 9px;

    color: #777;
}


/* Tablet */

@media (max-width: 991px) {

    .pub-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

}


/* Phone */

@media (max-width: 600px) {

    .pub-wrap {
        margin-bottom: 30px;
    }

    .pub-tabs {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .pub-tabs a {
        padding:
            9px
            8px;
    }

    .pub-grid {
        grid-template-columns: 1fr;

        gap: 17px;
    }

    .pub-category-grid {
        grid-template-columns: 1fr;
    }

    .pub-current-category {
        align-items: flex-start;

        flex-direction: column;
    }

}
