/* theme:thuonggiavietnam family:business-magazine */
/* Skin Newspark index-v-3.1 / business / post-1. */

@font-face {
    font-family: "Heebo";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("../fonts/heebo-vietnamese.woff2") format("woff2");
    unicode-range: U+0300-0301, U+0303, U+0309, U+0323, U+1EA0-1EF1;
}

@font-face {
    font-family: "Heebo";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("../fonts/heebo-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: "Heebo";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("../fonts/heebo-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --theme-key: thuonggiavietnam;
    --color-primary: #D52228;
    --color-accent: #17222B;
    --color-page-bg: #F8F5F4;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (min-width: 1200px) {
    .container.custom-container {
        max-width: 1260px;
    }
}

.post-layout-top-content .post-author {
    margin-bottom: 24px;
}

.post-layout-top-content .post-author .author-info {
    padding-left: 0;
    padding-right: 0;
}

.post-layout-top-content .post-author .author-info ul li {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.post-layout-top-content .article-standfirst {
    margin: 0 0 1.5rem;
    font-size: 20px;
    font-weight: 500;
    line-height: 1.5;
    color: #17222B;
}

@media (max-width: 767px) {
    .post-layout-top-content .article-standfirst {
        font-size: 18px;
    }
}

.banner-slot {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    min-width: 0;
}

.banner-slot .ad {
    overflow: hidden;
    min-width: 0;
    border-radius: 8px;
}

.post-news-thumb,
.feature-news-thumb,
.business-post-thumb,
.finance-thumb {
    overflow: hidden;
    min-width: 0;
    border-radius: 8px;
}

/* Giữ layout ngang mẫu Business News: ảnh 320×220 trái, chữ phải. */
.bussiness-post-thumb {
    overflow: hidden;
    border-radius: 8px;
    flex: 0 0 320px;
    width: 320px;
    max-width: 42%;
}

.bussiness-post-item {
    align-items: flex-start;
}

.bussiness-post-item .bussiness-post-thumb img {
    width: 320px;
    max-width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.bussiness-post-item .bussiness-post-content {
    flex: 1 1 auto;
    min-width: 0;
}

.bussiness-post-item .article-excerpt {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    overflow: hidden;
}

@media (max-width: 767px) {
    .bussiness-post-thumb {
        flex-basis: auto;
        width: 100%;
        max-width: none;
    }

    .bussiness-post-item .bussiness-post-thumb img {
        width: 100%;
        height: auto;
        aspect-ratio: 320 / 220;
    }
}

.banner-slot img,
.post-news-thumb img,
.feature-news-thumb img,
.bussiness-post-thumb img,
.business-post-thumb img,
.finance-thumb img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* Tiêu đề section: mẫu dùng chữ to đậm; tránh bị .section-title a (15px xám) ghi đè khi bọc link. */
.section-title .title {
    font-size: 24px;
    font-weight: 500;
    line-height: 1.3;
    color: #17222B;
}

.section-title .title > a {
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
    color: inherit;
}

.section-title .title > a:hover {
    color: #D52228;
}

.feature-news-box .section-title .title,
.feature-news-box .section-title .title > a {
    line-height: 60px;
}

.post-gallery-style-2 .post-gallery-thumb {
    overflow: visible;
    min-width: 100px;
}

.post-gallery-style-2 .post-gallery-thumb img {
    width: 100px;
    height: 70px;
    object-fit: cover;
    display: block;
    border-radius: 5px;
}

.post-gallery-style-2.most-view-style-2 .post-gallery-thumb img {
    width: 75px;
    height: 55px;
}

.header-search .search-results img,
.post-layout-top-content .thumb img,
.article-content img {
    border-radius: 8px;
}

.trending-sidebar-slider {
    min-width: 0;
}

.page-body {
    min-width: 0;
}

@media (max-width: 48rem) {
    .page-body {
        grid-template-columns: minmax(0, 1fr);
    }
}

.nav-list > li > ul > li > ul {
    top: 0;
    left: 220px;
}

.stellarnav.light > ul > li:hover > ul,
.stellarnav.light li:hover > ul {
    display: block;
}

.header-leaderboard,
.below-nav-wrap,
.footer-banner-wrap {
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.header-search {
    position: relative;
    z-index: 60;
}

.header-area .header-centerbar {
    position: relative;
    z-index: 50;
    overflow: visible;
}

.header-area .header-menubar {
    position: relative;
    z-index: 20;
}

.header-search .search-spinner {
    position: absolute;
    right: 6.5rem;
    top: 50%;
    transform: translateY(-50%);
    display: none;
    color: #D52228;
}

.header-search [aria-busy="true"] .search-spinner {
    display: block;
}

.header-search .search-results,
.header-search .search-status:not([hidden]) {
    position: absolute;
    z-index: 70;
    left: 0;
    right: 0;
    top: calc(100% + 0.5rem);
    margin: 0;
    background: #fff;
    border: 1px solid #E7E8E9;
    border-radius: 7px;
}

.header-search .search-results {
    max-height: min(24rem, 70vh);
    overflow-x: hidden;
    overflow-y: auto;
    padding: 0.5rem 0.75rem;
    list-style: none;
}

.header-search .search-results:not([hidden]),
.header-search .search-status:not([hidden]) {
    animation: tg-search-panel-in 0.18s ease-out;
}

@keyframes tg-search-panel-in {
    from {
        opacity: 0;
        transform: translateY(-0.35rem);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header-search .search-results li + li {
    border-top: 2px dashed #E7E8E9;
}

.header-search .search-results a {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    padding: 0.75rem 0.25rem;
    color: #17222B;
    text-decoration: none;
}

.header-search .search-results a:hover,
.header-search .search-results a:focus-visible {
    color: #D52228;
}

.header-search .search-results a:hover .search-result-title,
.header-search .search-results a:focus-visible .search-result-title {
    color: #D52228;
}

.header-search .search-result-thumb {
    flex: none;
    width: 100px;
    height: 70px;
    overflow: hidden;
    border-radius: 5px;
    background: #F8F5F4;
}

.header-search .search-result-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.header-search .search-result-body {
    min-width: 0;
    flex: 1 1 auto;
}

.header-search .search-result-title {
    display: block;
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1.35;
    color: #17222B;
}

.header-search .search-result-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    margin-top: 0.35rem;
    font-size: 0.75rem;
    line-height: 1.2;
}

.header-search .search-result-category {
    position: relative;
    padding-left: 0.6rem;
    font-weight: 500;
    color: #D52228;
    text-transform: uppercase;
}

.header-search .search-result-category::before {
    position: absolute;
    content: '';
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0.75rem;
    background: #D52228;
}

.header-search .search-result-date {
    font-weight: 500;
    color: rgba(23, 34, 43, 0.45);
}

.header-search .search-status {
    padding: 0.75rem 1rem;
    font-size: 0.8125rem;
    color: #515A60;
}

.logo-text {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #17222B;
}

.header-centerbar .logo img,
.footer-style-2-area .widget-about img,
.mobile-menu .nav-logo img {
    max-height: 56px;
    width: auto;
}

.header-menu-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.mobile-nav-toggler {
    display: none;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.header-search .input-box button,
.go-top,
.mobile-menu .close-btn,
[data-banner-link] {
    cursor: pointer;
}

.mobile-nav-toggler .bars,
.mobile-nav-toggler .bars::before,
.mobile-nav-toggler .bars::after {
    display: block;
    width: 1.25rem;
    height: 2px;
    background: #fff;
    position: relative;
}

.mobile-nav-toggler .bars::before,
.mobile-nav-toggler .bars::after {
    content: "";
    position: absolute;
    left: 0;
}

.mobile-nav-toggler .bars::before {
    top: -6px;
}

.mobile-nav-toggler .bars::after {
    top: 6px;
}

.mobile-menu[hidden],
.menu-backdrop[hidden] {
    display: none !important;
}

.mobile-menu {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(20rem, 88vw);
    z-index: 10000;
    background: #fff;
    overflow: auto;
    padding: 1.25rem;
}

.mobile-menu .close-btn {
    float: right;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.mobile-menu .navigation,
.mobile-menu .navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-menu .navigation a {
    display: block;
    padding: 0.65rem 0;
    color: #17222B;
}

.mobile-menu .navigation ul {
    display: none;
    padding-left: 1rem;
}

.mobile-menu .navigation .dropdown-open > ul {
    display: block;
}

.menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9990;
    background: rgba(23, 34, 43, 0.45);
}

body.mobile-menu-visible {
    overflow: hidden;
}

body.mobile-menu-visible .mobile-menu,
body.mobile-menu-visible .menu-backdrop {
    display: block;
}

.topbar-trending .trending-item a {
    color: inherit;
}

.category-subnav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    list-style: none;
    margin: 0 0 1.25rem;
    padding: 0;
}

.about-item-area {
    padding-top: 17px;
}

.about-item-area .about-tab-btn .archive-btn ul {
    padding-bottom: 0;
}

.about-item-area .about-tab-btn .archive-btn {
    margin-bottom: 24px;
}

.about-item-area .category-lead {
    margin: 0.25rem 0 0;
    font-size: 15px;
    line-height: 1.5;
    color: rgba(23, 34, 43, 0.5);
}

.category-subnav .is-current {
    font-weight: 700;
    color: #D52228;
}

.empty-note {
    margin: 1rem 0;
    color: #515A60;
}

.article-content img {
    max-width: 100%;
    height: auto;
}

.article-content figure {
    margin: 1.25rem 0;
    width: fit-content;
    max-width: 100%;
}

.article-content figure img {
    display: block;
    max-width: 100%;
    height: auto;
}

.article-content figcaption {
    margin: 0.15rem 0 0;
    color: #515A60;
    font-size: 0.9rem;
}

.article-content p + p {
    margin-top: 1rem;
}

.feature-news-content .title {
    font-size: 17px;
    font-weight: 500;
    line-height: 23px;
    margin: 0;
}

.feature-news-content .title a {
    color: inherit;
}

.bussiness-post-item .bussiness-post-content .title {
    font-weight: 500;
}

.bussiness-post-item .bussiness-post-content .title a {
    color: #17222B;
}

.bussiness-post-item .bussiness-post-content > a {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.35rem;
}

.bussiness-post-item .bussiness-post-content > a img,
.bussiness-post-item .bussiness-post-content > a svg {
    display: block;
    flex-shrink: 0;
}

.international-item .text-thumb p {
    margin: 0;
    flex: 1 1 auto;
    min-width: 0;
}

.international-item .text-thumb .thumb {
    overflow: hidden;
    border-radius: 5px;
}

.international-item .text-thumb .thumb img {
    width: 100px;
    height: 70px;
    object-fit: cover;
    display: block;
}

.post-sports-thumb {
    overflow: hidden;
    border-radius: 5px;
}

.post-sports-thumb img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    aspect-ratio: 16 / 10;
}

.footer-style-2-area {
    margin-top: 48px;
}

.footer-copyright.footer-copyright-style-2 .copyright-item {
    padding: 12px 0;
    text-align: center;
}

.footer-copyright.footer-copyright-style-2 .copyright-item p {
    margin-bottom: 0;
}

.footer-style-2-area .widget-about .logo-text {
    padding-top: 0;
}

.more-news-items .more-news-item .title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.more-news-items .more-news-item .title a {
    color: #17222B;
}

.more-news-items .more-news-item .title a:hover {
    color: #D52228;
}

.more-news-items .more-news-item p {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
    font-size: 15px;
    line-height: 24px;
    color: rgba(23, 34, 43, 0.75);
}

.footer-style-2-area .weidget-ad img,
.footer-style-2-area .banner-slot img {
    max-width: 100%;
    height: auto;
}

.go-top {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 50;
    width: 2.5rem;
    height: 2.5rem;
    border: 0;
    background: #D52228;
    color: #fff;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
}

.go-top.active,
.go-top.open {
    opacity: 1;
    pointer-events: auto;
}

@media (max-width: 991px) {
    .footer-style-2-area .widget-more-news,
    .footer-style-2-area .footer-banner-col:not(.is-empty) {
        margin-top: 40px;
    }

    .mobile-nav-toggler {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .header-menu .stellarnav > ul.nav-list {
        display: none;
    }
}

/* CMS banner-slot preview overlay */
.banner-slot-preview-bar {
    position: sticky;
    top: 0;
    z-index: 400;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1.25rem;
    padding: 0.7rem 1rem;
    background: #111827;
    color: #f9fafb;
    border-bottom: 1px solid #374151;
    font-size: 0.875rem;
    line-height: 1.4;
}

.banner-slot-preview-bar p {
    margin: 0;
}

.banner-slot-preview-bar form {
    margin: 0;
}

.banner-slot-preview-bar button {
    cursor: pointer;
    border: 1px solid #9ca3af;
    background: transparent;
    color: #f9fafb;
    padding: 0.35rem 0.85rem;
    font: inherit;
}

.banner-slot-preview-bar button:focus-visible {
    outline: 2px solid #f9fafb;
    outline-offset: 2px;
}

.banner-slot.is-preview {
    position: relative;
}

.banner-slot.is-preview-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 5.5rem;
    padding: 0.75rem;
    border: 1px dashed #6b7280;
    background: repeating-linear-gradient(
        -45deg,
        transparent,
        transparent 8px,
        rgba(17, 24, 39, 0.04) 8px,
        rgba(17, 24, 39, 0.04) 16px
    );
}

.banner-slot.is-preview-filled {
    outline: 1px dashed #6b7280;
    outline-offset: 2px;
}

.banner-slot-preview-badge {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem 0.65rem;
    margin: 0;
    padding: 0.35rem 0.5rem;
    font-size: 0.75rem;
    line-height: 1.3;
    color: #111827;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
}

.banner-slot.is-preview-filled .banner-slot-preview-badge {
    position: absolute;
    z-index: 2;
    top: 0.35rem;
    left: 0.35rem;
}

.banner-slot-preview-label {
    font-weight: 700;
}

.banner-slot-preview-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.7rem;
}

.banner-slot-preview-hint {
    color: #4b5563;
}

/* article gallery */
.article-body figure[data-media-gallery],
.article-content figure[data-media-gallery] {
    width: 100% !important;
    max-width: 100% !important;
    margin: 1.25rem 0;
}

.article-body figure[data-media-gallery] > figure,
.article-content figure[data-media-gallery] > figure {
    display: flex;
    flex-direction: column;
    width: 100% !important;
    min-width: 0;
    max-width: none !important;
    height: 100%;
    margin: 0 !important;
}

.article-body figure[data-media-gallery] > figure > img,
.article-content figure[data-media-gallery] > figure > img {
    display: block;
    width: 100% !important;
    max-width: none !important;
    height: auto;
    margin: 0 !important;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.article-body figure[data-media-gallery] figcaption,
.article-content figure[data-media-gallery] figcaption {
    flex: 0 0 auto;
    margin: 0.35rem 0 0;
    font-size: 0.8125rem;
    line-height: 1.4;
    text-align: left;
}

figure[data-media-gallery][data-captions="hidden"] figcaption,
figure[data-media-gallery][data-style="featured"][data-captions="lead"] > figure:not(:first-child) figcaption {
    display: none;
}

figure[data-media-gallery][data-style="grid"] {
    display: grid;
    align-items: start;
    gap: 0.75rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

figure[data-media-gallery][data-style="grid"] > figure {
    height: auto;
}

figure[data-media-gallery][data-style="grid"][data-columns="2"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

figure[data-media-gallery][data-style="grid"][data-columns="4"] {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

figure[data-media-gallery][data-style="grid"][data-gap="sm"] { gap: 0.35rem; }
figure[data-media-gallery][data-style="grid"][data-gap="lg"] { gap: 1.25rem; }

figure[data-media-gallery][data-style="grid"][data-ratio="1-1"] > figure > img { aspect-ratio: 1 / 1; }
figure[data-media-gallery][data-style="grid"][data-ratio="4-3"] > figure > img,
figure[data-media-gallery][data-style="grid"][data-ratio="auto"] > figure > img { aspect-ratio: 4 / 3; }
figure[data-media-gallery][data-style="grid"][data-ratio="16-9"] > figure > img { aspect-ratio: 16 / 9; }

figure[data-media-gallery][data-style="featured"] {
    display: grid;
    align-items: stretch;
    gap: 0.75rem;
}

figure[data-media-gallery][data-style="featured"] > figure > img {
    flex: 1 1 auto;
    width: 100% !important;
    height: 100% !important;
    min-height: 0;
    aspect-ratio: auto;
    object-fit: cover;
}

figure[data-media-gallery][data-style="featured"][data-lead="top"][data-thumbs="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
figure[data-media-gallery][data-style="featured"][data-lead="top"][data-thumbs="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
figure[data-media-gallery][data-style="featured"][data-lead="top"][data-thumbs="4"] { grid-template-columns: repeat(4, minmax(0, 1fr)); }
figure[data-media-gallery][data-style="featured"][data-lead="top"] > figure:first-child { grid-column: 1 / -1; }
figure[data-media-gallery][data-style="featured"][data-lead="top"] > figure:first-child > img { aspect-ratio: 16 / 9; height: auto !important; }
figure[data-media-gallery][data-style="featured"][data-lead="top"] > figure:not(:first-child) > img { aspect-ratio: 4 / 3; height: auto !important; }

figure[data-media-gallery][data-style="featured"][data-lead="left"] {
    grid-template-columns: repeat(12, minmax(0, 1fr));
}
figure[data-media-gallery][data-style="featured"][data-lead="left"][data-thumbs="2"] {
    grid-template-rows: repeat(2, minmax(10rem, 1fr));
}
figure[data-media-gallery][data-style="featured"][data-lead="left"][data-thumbs="3"] {
    grid-template-rows: repeat(3, minmax(8rem, 1fr));
}
figure[data-media-gallery][data-style="featured"][data-lead="left"][data-thumbs="4"] {
    grid-template-rows: repeat(4, minmax(7rem, 1fr));
}
figure[data-media-gallery][data-style="featured"][data-lead="left"] > figure:first-child {
    grid-column: 1 / span 8;
}
figure[data-media-gallery][data-style="featured"][data-lead="left"][data-thumbs="2"] > figure:first-child { grid-row: 1 / span 2; }
figure[data-media-gallery][data-style="featured"][data-lead="left"][data-thumbs="3"] > figure:first-child { grid-row: 1 / span 3; }
figure[data-media-gallery][data-style="featured"][data-lead="left"][data-thumbs="4"] > figure:first-child { grid-row: 1 / span 4; }
figure[data-media-gallery][data-style="featured"][data-lead="left"][data-thumbs="2"] > figure:nth-child(-n+3):not(:first-child),
figure[data-media-gallery][data-style="featured"][data-lead="left"][data-thumbs="3"] > figure:nth-child(-n+4):not(:first-child),
figure[data-media-gallery][data-style="featured"][data-lead="left"][data-thumbs="4"] > figure:nth-child(-n+5):not(:first-child) {
    grid-column: 9 / span 4;
}
figure[data-media-gallery][data-style="featured"][data-lead="left"][data-thumbs="2"] > figure:nth-child(n+4),
figure[data-media-gallery][data-style="featured"][data-lead="left"][data-thumbs="3"] > figure:nth-child(n+5),
figure[data-media-gallery][data-style="featured"][data-lead="left"][data-thumbs="4"] > figure:nth-child(n+6) {
    grid-column: span 3;
    grid-row: auto;
    height: auto;
}
figure[data-media-gallery][data-style="featured"][data-lead="left"][data-thumbs="2"] > figure:nth-child(n+4) > img,
figure[data-media-gallery][data-style="featured"][data-lead="left"][data-thumbs="3"] > figure:nth-child(n+5) > img,
figure[data-media-gallery][data-style="featured"][data-lead="left"][data-thumbs="4"] > figure:nth-child(n+6) > img {
    aspect-ratio: 4 / 3;
    height: auto !important;
}

figure[data-media-gallery][data-style="strip"] {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
}

figure[data-media-gallery][data-style="strip"] > figure {
    flex: 0 0 16rem;
    width: 16rem !important;
    height: auto;
    scroll-snap-align: start;
}

figure[data-media-gallery][data-style="strip"] > figure > img {
    height: 11rem !important;
    aspect-ratio: auto;
}

figure[data-media-gallery][data-style="strip"][data-height="sm"] > figure { flex-basis: 12rem; width: 12rem !important; }
figure[data-media-gallery][data-style="strip"][data-height="lg"] > figure { flex-basis: 20rem; width: 20rem !important; }
figure[data-media-gallery][data-style="strip"][data-height="sm"] > figure > img { height: 8rem !important; }
figure[data-media-gallery][data-style="strip"][data-height="md"] > figure > img { height: 11rem !important; }
figure[data-media-gallery][data-style="strip"][data-height="lg"] > figure > img { height: 14rem !important; }

@media (max-width: 640px) {
    figure[data-media-gallery][data-style="grid"][data-columns="3"],
    figure[data-media-gallery][data-style="grid"][data-columns="4"],
    figure[data-media-gallery][data-style="featured"][data-lead="top"][data-thumbs="3"],
    figure[data-media-gallery][data-style="featured"][data-lead="top"][data-thumbs="4"] {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    figure[data-media-gallery][data-style="featured"][data-lead="left"][data-thumbs="2"],
    figure[data-media-gallery][data-style="featured"][data-lead="left"][data-thumbs="3"],
    figure[data-media-gallery][data-style="featured"][data-lead="left"][data-thumbs="4"] {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: none;
    }

    figure[data-media-gallery][data-style="featured"][data-lead="left"] > figure:first-child,
    figure[data-media-gallery][data-style="featured"][data-lead="left"][data-thumbs="2"] > figure:nth-child(-n+3):not(:first-child),
    figure[data-media-gallery][data-style="featured"][data-lead="left"][data-thumbs="3"] > figure:nth-child(-n+4):not(:first-child),
    figure[data-media-gallery][data-style="featured"][data-lead="left"][data-thumbs="4"] > figure:nth-child(-n+5):not(:first-child),
    figure[data-media-gallery][data-style="featured"][data-lead="left"][data-thumbs="2"] > figure:nth-child(n+4),
    figure[data-media-gallery][data-style="featured"][data-lead="left"][data-thumbs="3"] > figure:nth-child(n+5),
    figure[data-media-gallery][data-style="featured"][data-lead="left"][data-thumbs="4"] > figure:nth-child(n+6) {
        grid-column: 1 / -1;
        grid-row: auto;
    }

    figure[data-media-gallery][data-style="featured"][data-lead="left"] > figure:first-child > img {
        aspect-ratio: 16 / 9;
        height: auto !important;
    }
}
