/* Tizgin Category Grid v2 */
.tcg,
.tcg * {
    box-sizing: border-box;
}

.tcg {
    --tcg-text: #232323;
    --tcg-muted: #9a9a9a;
    --tcg-label: #2e2e2e;
    width: 100%;
    margin: 0 0 34px;
    color: var(--tcg-text);
    font-family: inherit;
}

.tcg__section-head {
    display: flex;
    align-items: center;
    width: 100%;
    margin-bottom: 24px;
}

.tcg__section-title {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-width: 168px;
    height: 28px;
    padding: 0 28px 0 24px;
    background: var(--tcg-label);
    color: #fff !important;
    text-decoration: none !important;
    text-transform: uppercase;
    font-size: 13px;
    line-height: 1;
    font-weight: 800;
    font-style: italic;
    letter-spacing: .01em;
    clip-path: polygon(8px 0, 100% 0, calc(100% - 9px) 100%, 0 100%);
}

.tcg__section-line {
    flex: 1 1 auto;
    height: 1px;
    background: #727272;
}

/* 50 / 50 */
.tcg__grid {
    display: grid;
    grid-template-columns: minmax(0, 60fr) minmax(0, 40fr);
    gap: 34px;
    align-items: stretch;
}

.tcg--featured-right .tcg__featured {
    grid-column: 2;
    grid-row: 1;
}

.tcg--featured-right .tcg__side {
    grid-column: 1;
    grid-row: 1;
}

.tcg__featured {
    min-width: 0;
    display: flex;
    flex-direction: column;
    border: 1px solid #dedede;
    background: #fff;
}

.tcg__featured-image {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #eee;
}

.tcg__img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    transition: transform .25s ease;
}

.tcg a:hover .tcg__img {
    transform: scale(1.02);
}

.tcg__no-image {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 120px;
    background: #ececec;
}

.tcg__featured-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    padding: 18px 14px 13px;
}

.tcg__featured-title,
.tcg__side-title {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
}

.tcg__featured-title {
    font-size: 22px !important;
    line-height: 1.28 !important;
    font-weight: 800 !important;
}

.tcg__featured-title a,
.tcg__side-title a {
    color: var(--tcg-text) !important;
    text-decoration: none !important;
}

.tcg__featured-title a:hover,
.tcg__side-title a:hover {
    opacity: .72;
}

.tcg__date {
    margin-top: auto;
    padding-top: 12px;
    color: var(--tcg-muted);
    font-size: 12px;
    line-height: 1.2;
    text-align: right;
}

.tcg__side {
    display: grid;
    grid-template-rows: repeat(3, minmax(0, 1fr));
    gap: 18px;
    min-width: 0;
}

.tcg__side-item {
    display: grid;
    grid-template-columns: 34% minmax(0, 1fr);
    gap: 16px;
    min-width: 0;
    align-items: stretch;
}

.tcg__side-image {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 112px;
    overflow: hidden;
    background: #eee;
}

.tcg__side-content {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 2px 0;
}

.tcg__side-title {
    font-size: 19px !important;
    line-height: 1.27 !important;
    font-weight: 800 !important;
}

/* Автор жоқ болғандықтан тақырыпқа көбірек орын */
.tcg__side-title a {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tcg__date--side {
    padding-top: 8px;
    margin-top: auto;
}

.tcg-error {
    padding: 12px;
    border: 1px solid #e1e1e1;
    background: #fafafa;
    color: #777;
}

@media (max-width: 1050px) {
    .tcg__grid {
        gap: 24px;
    }

    .tcg__side-item {
        grid-template-columns: 38% minmax(0, 1fr);
        gap: 13px;
    }

    .tcg__featured-title {
        font-size: 20px !important;
    }

    .tcg__side-title {
        font-size: 17px !important;
    }
}

@media (max-width: 820px) {
    .tcg__grid {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .tcg--featured-right .tcg__featured,
    .tcg--featured-right .tcg__side,
    .tcg--featured-left .tcg__featured,
    .tcg--featured-left .tcg__side {
        grid-column: 1;
        grid-row: auto;
    }

    .tcg--featured-right .tcg__side {
        order: 2;
    }

    .tcg__side-item {
        grid-template-columns: 180px minmax(0, 1fr);
    }
}

@media (max-width: 600px) {
    .tcg {
        margin-bottom: 26px;
    }

    .tcg__section-head {
        margin-bottom: 16px;
    }

    .tcg__section-title {
        min-width: 135px;
        height: 26px;
        padding-left: 20px;
        font-size: 12px;
    }

    .tcg__featured-title {
        font-size: 19px !important;
    }

    .tcg__side {
        gap: 14px;
    }

    .tcg__side-item {
        grid-template-columns: 115px minmax(0, 1fr);
        gap: 11px;
    }

    .tcg__side-image {
        min-height: 86px;
        aspect-ratio: 4 / 3;
    }

    .tcg__side-title {
        font-size: 15px !important;
        line-height: 1.24 !important;
    }

    .tcg__date {
        font-size: 10px;
    }
}


/* =========================================================
   TOP STYLE
   Қолдану: [tizgin_category_grid ... style="top"]
   Алдыңғы default/50-50 стильдерге әсер етпейді.
   ========================================================= */
.tcg--top .tcg__featured {
    border: 0;
    background: transparent;
}

.tcg--top .tcg__featured-image--top {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    min-height: 430px;
    aspect-ratio: auto;
    overflow: hidden;
    background: #111;
}

.tcg--top .tcg__featured-image--top .tcg__img {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

.tcg--top .tcg__featured-image--top .tcg__no-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.tcg--top .tcg__top-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,0.02) 30%,
        rgba(0,0,0,0.20) 55%,
        rgba(0,0,0,0.86) 100%
    );
}

.tcg--top .tcg__top-content {
    position: absolute;
    left: 22px;
    right: 22px;
    bottom: 18px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.tcg--top .tcg__top-title {
    display: block;
    max-width: 96%;
    color: #fff;
    font-size: 28px;
    line-height: 1.25;
    font-weight: 800;
    text-shadow: 0 1px 2px rgba(0,0,0,.25);
}

.tcg--top .tcg__top-date {
    display: block;
    margin-top: 7px;
    color: rgba(255,255,255,.82);
    font-size: 12px;
    line-height: 1.2;
    font-weight: 400;
}

.tcg--top .tcg__side {
    gap: 0;
}

.tcg--top .tcg__side-item {
    padding: 0 0 15px;
    margin: 0 0 15px;
    border-bottom: 1px solid #dedede;
}

.tcg--top .tcg__side-item:last-child {
    padding-bottom: 0;
    margin-bottom: 0;
    border-bottom: 0;
}

.tcg--top .tcg__side-image {
    min-height: 128px;
}

.tcg--top .tcg__date--side {
    text-align: left;
    margin-top: 8px;
    padding-top: 0;
}

@media (max-width: 1050px) {
    .tcg--top .tcg__featured-image--top {
        min-height: 390px;
    }

    .tcg--top .tcg__top-title {
        font-size: 24px;
    }
}

@media (max-width: 820px) {
    .tcg--top .tcg__featured-image--top {
        min-height: 360px;
    }

    .tcg--top .tcg__side {
        gap: 14px;
    }

    .tcg--top .tcg__side-item {
        padding-bottom: 14px;
        margin-bottom: 0;
    }
}

@media (max-width: 600px) {
    .tcg--top .tcg__featured-image--top {
        min-height: 310px;
    }

    .tcg--top .tcg__top-content {
        left: 15px;
        right: 15px;
        bottom: 14px;
    }

    .tcg--top .tcg__top-title {
        font-size: 21px;
        line-height: 1.24;
    }

    .tcg--top .tcg__top-date {
        font-size: 10px;
    }
}
