/* Zephyr 9.5 uses cover by default. The existing header logos require contain. */
.logoHeader img {
    object-fit: contain;
}

/* Retain the original search label/icon spacing and vertical alignment. */
.searchWrapper .w-search-open {
    height: 20px !important;
    min-height: 20px;
}

.searchWrapper .w-search-open::after {
    margin-right: .6em !important;
}

/* The old full-width header used 1.5rem desktop gutters. The new equivalent
 * inherits the wider section gutters; retain the existing header alignment.
 */
body.header_hor.state_default .l-subheader.width_full_with_indents,
body.header_hor.state_laptops .l-subheader.width_full_with_indents {
    padding-inline: 1.5rem;
}

/* Preserve the mobile dropdown's original line boxes and viewport width.
 * The vendor now uses flex anchors and negative margins, changing row spacing.
 */
.menuHeader.w-nav.type_mobile .w-nav-anchor.level_1:not(.w-btn) {
    display: block;
    line-height: 1.6em;
    margin-inline: 0;
}

.header_hor .menuHeader.w-nav.type_mobile.m_layout_dropdown .w-nav-list.level_1 {
    left: -1rem;
    right: -1rem;
    padding-inline: .3rem;
    box-shadow: 0 3px 3px rgba(0, 0, 0, .1);
}

/* These editorial grids have custom percentage widths stored in Theme Options.
 * Keep their flex layout; applying those percentages inside CSS-grid cells
 * shrinks the cards a second time. Other theme grids retain the vendor layout.
 */
.w-grid.type_grid.itemNewArticleHome > .w-grid-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin: calc(var(--gap, 0px) * -1);
}

:where(.w-grid.type_grid.itemNewArticleHome > .w-grid-list) > .w-grid-item {
    width: calc(100% / var(--columns, 1));
    padding: var(--gap, 0px);
}

/* The site's one-column archive breakpoint previously emitted these rules. */
@media (max-width: 899px) {
    .w-grid.type_grid.itemNewArticleHome > .w-grid-list {
        margin: 0;
    }

    .w-grid.type_grid.itemNewArticleHome > .w-grid-list > .w-grid-item {
        width: 100%;
        padding: 0;
        margin-bottom: var(--gap, 0px);
    }
}

/* Grid actions are now buttons. Exclude this action from the site's broad
 * category-filter button appearance while retaining the vendor button markup.
 */
.categoryContainer button.buttonReadNowFeaturedArticleHome {
    background: url("../../../uploads/2024/12/arrowShareBlack.svg") 14px 16px no-repeat !important;
}

.categoryContainer button.buttonReadNowFeaturedArticleHome:hover {
    background-image: url("../../../uploads/2025/01/arrowClickWhite.svg") !important;
    background-color: #1a1a1a !important;
}

.categoryContainer button.buttonReadNowFeaturedArticleHome .w-btn-label {
    font: inherit;
    letter-spacing: inherit;
}

.categoryContainer button.buttonReadNowFeaturedArticleHome:hover .w-btn-label {
    color: #fff;
}

/* Preserve the live newsletter's checkbox size and top alignment. */
.newsletter-pg-form .wpcf7-acceptance input[type="checkbox"] {
    box-sizing: border-box;
    font-size: 13.5px;
    width: 22.25px;
    height: 22.25px;
    align-self: flex-start;
}

/* Keep the live button appearance; native disabled/consent validation remains. */
.wpcf7 input.wpcf7-submit:disabled {
    opacity: 1;
}

/* The custom mobile article rail already spaces cards with their margins. */
@media (max-width: 767px) {
    .single-post #relatedArticles .relatedArticles > .w-grid-list {
        gap: 0;
    }
}

/* Whole-card links replace the old title anchors in Zephyr 9.5. Preserve the
 * larger headlines on the two wide cards in each seven-article group.
 */
.itemNewArticleHome article:nth-of-type(7n+1) .titleNewArticleHome,
.itemNewArticleHome article:nth-of-type(7n) .titleNewArticleHome {
    font-size: 2.25rem;
}

@media (min-width: 600px) and (max-width: 1024px) {
    .itemNewArticleHome article:nth-of-type(7n+1) .titleNewArticleHome,
    .itemNewArticleHome article:nth-of-type(7n) .titleNewArticleHome {
        font-size: 1.75rem;
    }
}

/* The old homepage title link inherited its 20px heading's line height while
 * a tablet rule enlarged the link text. Whole-card markup has no inner link.
 */
@media (min-width: 600px) and (max-width: 900px) {
    body .home-latest-article .w-grid.itemNewArticleHome .w-grid-list .w-grid-item .post_title {
        font-size: 1.75rem !important;
        line-height: 1.4125rem;
    }
}
