/* =====================================================================
   Top Gear ME — redesign extras
   Site-wide rules migrated OUT of the WordPress Customizer "Additional
   CSS" (employee's local work) into the version-controlled theme.
   HEADER rules were intentionally NOT migrated — the header lives in
   header.css. Broken/duplicate Customizer rules were dropped and the
   dark-ink colour normalised to the brand --tg-darkblue (#001024).
   ===================================================================== */

/* ---- His global content-gutter change (verbatim from his Customizer) ---- */
.wrapper {
    margin-right: 0;
    padding: 0px 10px;
}

/* ---- Search results: hide the page title ---- */
.search-results h1.page-title {
    display: none;
}

/* ---- Footer social icons: brand colours ---- */
footer.site-footer .wp-block-social-links.is-style-logos-only .wp-social-link-linkedin svg {
    color: #0d66c2;
    fill: #0d66c2;
}
footer.site-footer .wp-block-social-links.is-style-logos-only .wp-social-link-facebook svg {
    color: #1778f2;
    fill: #1778f2;
}
footer.site-footer .wp-block-social-links.is-style-logos-only .wp-social-link-twitter svg {
    color: #000000;
    fill: #000000;
}
footer.site-footer .wp-block-social-links.is-style-logos-only .wp-social-link-instagram svg {
    color: #f00075;
    fill: #f00075;
}

/* ---- Desktop: hide page breadcrumb, tweak menu-open spacing ---- */
@media (min-width: 1008px) {
    .page .site-breadcrumb {
        display: none;
    }
    .page .site-content.menu-opened::before {
        margin-top: -1.301rem;
    }
}

/* ---- Post subtitle: right-align (RTL) ---- */
.newspack-post-subtitle {
    text-align: right;
}

/* ---- Remove the accent line under entry meta ---- */
.entry-meta::after {
    display: none !important;
}

/* ---- Homepage column blocks ---- */
.page:not(.home) .hm-col-3.trending-week {
    display: block;
}
.home .site-main > article > .entry-content > .wp-block-columns.hm-col-5 {
    background: none !important;
}
.home .site-main > article > .entry-content > .wp-block-columns.hm-col-5 .ads_content {
    background: #0d2e3d;
}

/* ---- Twitter → X icon swap on share buttons ---- */
.entry__share .fa-twitter:before {
    content: "";
    background: url(https://www.topgearmiddleeast.com/cloud/2024/06/11/x-twitter.png) no-repeat bottom / contain;
    display: block;
    width: 16px;
    height: 16px;
}

/* ---- Post titles (dark surfaces): white, brand-blue on hover ---- */
.wp-block-post-title a {
    color: var(--clr-white) !important;
}
.wp-block-post-title a:hover {
    color: var(--tg-blue) !important;
}

/* ---- Query-block pagination ---- */
.wp-block-query-pagination {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 30px;
    padding: 20px;
}
.wp-block-query-pagination a,
.wp-block-query-pagination span {
    min-width: 45px;
    height: 45px;
    background: #d9d9d9;
    color: #333;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    text-decoration: none;
    font-size: 16px;
    transition: 0.2s;
}
.wp-block-query-pagination a:hover {
    background: #c4c4c4;
}
.wp-block-query-pagination .current {
    background: #555;
    color: #fff;
}
.wp-block-query-pagination-previous,
.wp-block-query-pagination-next {
    font-weight: bold;
}
/* hide the "…" dots */
.wp-block-query-pagination-numbers .page-numbers.dots {
    display: none;
}
.wp-block-query-pagination-numbers li:has(.dots) {
    display: none;
}

/* ---- Misc one-offs from his Customizer (fragile IDs — review later) ---- */
.wp-block-newspack-blocks-itpquery.wpnbha.show-image.image-alignleft.ts-7.is-3.is-landscape.show-category.has-text-align-left > div > article > div > h2 {
    line-height: 1.5;
}
#post-19 .hm-hdr {
    border: none !important;
}
#nav_menu-3 > h2 {
    font-size: 220%;
}
article.change-font-size::after {
    display: none !important;
}

/* ---- Force the secondary font (Cairo) across meta / UI / Woo elements ----
   Migrated verbatim from his Customizer. --font-secondary now resolves to
   Cairo (see config.css), so this enforces Cairo on everything below. ---- */
.author-bio .author-link, .author-meta, .comment-metadata, .comment-reply-link, .comment-reply-login, .comments-title, .comment-author .fn, .discussion-meta-info, .cat-links, amp-script .cat-links, .entry-meta, .entry-footer, .nav1, .no-comments, .not-found .page-title, .error-404 .page-title, .page-links, .page-description, .pagination .nav-links, .sticky-post, .site-title, .site-description, .site-info, #cancel-comment-reply-link, .jp-relatedposts-i2 a, .page-title, h1, h2, h3, h4, h5, h6, table, .button, button, input[type="button"], input[type="reset"], input[type="submit"], .wp-block-button__link, figcaption, .wp-caption-text, .gallery-caption, .amp-image-lightbox-caption, .site-main #infinite-handle span button, .site-main #infinite-handle span button:hover, .site-main #infinite-handle span button:focus, .nav1 button, .mobile-menu-toggle, .nav3, .secondary-menu, .highlight-menu-contain .wrapper, .comment-navigation .nav-previous, .comment-navigation .nav-next, .post-navigation, .comment-list .pingback .comment-body, .comment-list .trackback .comment-body, .comment-list .pingback .comment-body .comment-edit-link, .comment-list .trackback .comment-body .comment-edit-link, .comment-form label, .comment-form .comment-notes, .wp-block-latest-comments .wp-block-latest-comments__comment-meta, .wp-block-pullquote cite, .wp-block-categories li, .wp-block-archives li, .wp-block-latest-posts li > a, .wp-block-latest-posts time, .wp-block-file, .wp-block-file .wp-block-file__button, .wpbnbd .freq-label, .wpbnbd .tier-label, .widget, .widget_archive ul li, .widget_categories ul li, .widget_meta ul li, .widget_nav_menu ul li, .widget_pages ul li, .widget_recent_comments ul li, .widget_recent_entries ul li, .widget_rss ul li, .widget_tag_cloud .tagcloud, blockquote cite, .jp-relatedposts-i2, #jp-relatedposts.jp-relatedposts, .jp-relatedposts-i2 .jp-relatedposts-headline, #jp-relatedposts.jp-relatedposts .jp-relatedposts-headline, .site-breadcrumb .wrapper > span, .woocommerce-breadcrumb, .woocommerce-pagination, .woocommerce .onsale, .woocommerce .price, .woocommerce .product_meta, .woocommerce-review-link, .woocommerce-grouped-product-list, .woocommerce .first-payment-date, .woocommerce-message, .woocommerce-error, .woocommerce-info, ul.products .added_to_cart, .woocommerce-tabs ul, .woocommerce-MyAccount-navigation, .woocommerce-Reviews .comment-reply-title, .woocommerce-results-wrapper, .product .nyp {
    font-family: var(--font-secondary) !important;
}

/* 2026-07-13: preserve intrinsic editorial image dimensions and proportions. */
body article figure.post-thumbnail,
body article figure.wp-block-image,
body article figure.wp-caption {
    height: auto !important;
    max-height: none !important;
    aspect-ratio: auto !important;
    overflow: visible !important;
}

body article figure.post-thumbnail > a {
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    aspect-ratio: auto !important;
}

body article figure.wp-block-image > a,
body article figure.wp-caption > a {
    width: auto !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    aspect-ratio: auto !important;
}

body article figure.post-thumbnail img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    aspect-ratio: auto 4 / 3 !important;
    object-fit: contain !important;
    object-position: center !important;
}

body article figure.wp-block-image img,
body article figure.wp-caption img,
body article .entry-content img[class*="wp-image-"]:not(.wp-block-cover__image-background) {
    width: auto !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    aspect-ratio: auto 16 / 9 !important;
    object-fit: contain !important;
    object-position: center !important;
}

/* Loaded thumbnail derivatives can have rounded dimensions (for example 40x22). */
body article .entry-content .image-gallery-thumbnail figure.wp-block-image img {
    aspect-ratio: auto 9 / 5 !important;
}
