.tmag-hub {
    padding: 16px 0 48px;
    background: #f5f5f5;
}

.tmag-hub__container {
    width: min(1180px, calc(100% - 24px));
    margin: 0 auto;
}

.tmag-hub__container--sidebar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 28px;
    align-items: start;
}

.tmag-hub__container--full {
    display: block;
}

.tmag-hub__main {
    min-width: 0;
}

.tmag-hub__sidebar {
    min-width: 0;
}

.tmag-hub__sidebar .widget,
.tmag-hub__sidebar section {
    margin-bottom: 28px;
    padding: 20px;
    background: #fff;
}

.tmag-hub__sidebar .widget-title,
.tmag-hub__sidebar .wp-block-heading,
.tmag-hub__sidebar h2 {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 18px;
    color: #222;
    font-size: 18px;
    line-height: 1.2;
    font-weight: 700;
}

.tmag-hub__sidebar .widget-title::after,
.tmag-hub__sidebar .wp-block-heading::after,
.tmag-hub__sidebar h2::after {
    content: '';
    height: 2px;
    flex: 1 1 auto;
    background: #c8342f;
}

.tmag-hub-header {
    margin-bottom: 28px;
    padding: 10px 12px 4px;
    background: #fff;
}

.tmag-hub-header__title {
    margin: 0 0 16px;
    color: #222;
    font-size: 26px;
    line-height: 1.15;
    font-weight: 700;
}

.tmag-hub-header__lead,
.tmag-hub-header__scope {
    max-width: 860px;
    color: #444;
    font-size: 15px;
    line-height: 1.65;
}

.tmag-hub-header__lead {
    margin: 0 0 8px;
}

.tmag-hub-section {
    margin-top: 22px;
    padding: 12px;
    background: #fff;
}

.tmag-hub-section__head {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

.tmag-hub-section__title {
    margin: 0;
    color: #222;
    font-size: 18px;
    line-height: 1.2;
    font-weight: 700;
    white-space: nowrap;
}

.tmag-hub-section__head::after {
    content: '';
    height: 2px;
    background: #c8342f;
    flex: 1 1 auto;
    transform: translateY(1px);
}

.tmag-hub-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tmag-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    height: 100%;
}

.tmag-card__link {
    display: block;
    color: inherit;
    text-decoration: none;
    height: 100%;
}

.tmag-card__media {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f2f2f2;
}

.tmag-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tmag-card__body {
    padding: 10px 12px 14px;
}

.tmag-card__terms {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 10px;
}

.tmag-card__badge {
    display: inline-block;
    padding: 3px 6px;
    background: #e10600;
    color: #fff;
    font-size: 10px;
    line-height: 1;
    font-weight: 700;
}

.tmag-card__title {
    margin: 0 0 8px;
    color: #222;
    font-size: 16px;
    line-height: 1.35;
    font-weight: 500;
}

.tmag-card__meta {
    color: #666;
    font-size: 12px;
    line-height: 1.2;
}

.tmag-pagination {
    margin-top: 28px;
}

.tmag-pagination .page-numbers {
    display: inline-block;
    margin-right: 6px;
    padding: 7px 11px;
    border: 1px solid #ddd;
    background: #fff;
    color: #222;
    text-decoration: none;
}

.tmag-pagination .page-numbers.current {
    background: #e10600;
    border-color: #e10600;
    color: #fff;
}

@media (max-width: 991px) {
    .tmag-hub__container--sidebar {
        grid-template-columns: 1fr;
    }

    .tmag-hub__sidebar {
        order: 2;
    }
}

@media (max-width: 767px) {
    .tmag-hub__container {
        width: min(100%, calc(100% - 20px));
    }

    .tmag-hub-header,
    .tmag-hub-section {
        padding: 10px;
    }

    .tmag-hub-grid {
        grid-template-columns: 1fr;
    }

    .tmag-hub-section__head {
        gap: 10px;
    }

    .tmag-hub-section__title,
    .tmag-hub__sidebar .widget-title,
    .tmag-hub__sidebar .wp-block-heading,
    .tmag-hub__sidebar h2 {
        white-space: normal;
        font-size: 17px;
    }
}
