/*
 * HD-2155 (Craft 5): CKEditor marks rich-text images as <figure class="image">, which collides with the
 * theme's .image background box (58% top padding). Give those figures the plain <figure> styling the
 * Craft 2 site had. [class] lifts specificity above .post .image and .image:first-child.
 */
figure.image[class],
figure.image[class]:first-child {
    padding-top: 0;
    overflow: visible;
    background: none;
    margin: 1.66666667rem 0;
}
@media print, screen and (min-width: 48em) {
    figure.image[class],
    figure.image[class]:first-child {
        margin: 1.83333333rem 0;
    }
}

/*
 * HD-2155 (11/24): the desktop header was too wide for its row at 1024px and up, so the Get Help and
 * Become a Foster Parent buttons wrapped below the menu (the live Craft 2 site does the same). Tighter
 * button padding and menu spacing, scaled with the window, keep menu, search and buttons on one line
 * from 1024px to 2560px. Under 1280px the dropdown carets are hidden (each one hangs 14px into the next
 * item's space), and the last dropdown (Our Services) opens leftward until 1366px so it stays on screen.
 * Under 1024px the slide-out menu is unchanged.
 */
@media screen and (min-width: 64em) and (max-width: 79.9375em) {
    #main-menu > .menu .has-drop-down > a:after { display: none; }
}
@media screen and (min-width: 64em) and (max-width: 74.9375em) {
    #main-menu > .menu li { margin-right: clamp(14px, calc(14px + (100vw - 1024px) * .12), 34px); }
    #main-menu .holder .button { padding: 1.2em .6em; }
    #main-menu .holder .socials li { margin: 0 .5rem 0 0; }
}
@media screen and (min-width: 75em) {
    #main-menu > .menu li { margin-right: clamp(24px, calc(24px + (100vw - 1200px) * .16), 47px); }
    #main-menu .holder .button { padding: 1.2em 1.2em; }
}
@media screen and (min-width: 64em) and (max-width: 85.3125em) {
    #main-menu > .menu > li:last-child > .dropdown { left: auto; right: -14px; }
    #main-menu > .menu > li:last-child > .dropdown:before { left: auto; right: 60px; }
}
