/*
 * Dropdown reveal restored.
 * LiteSpeed UCSS purged the interactive :hover / .sfHover states GeneratePress
 * uses to OPEN sub-menus, so archive.css only kept the "hidden" base rule
 * (.main-navigation ul ul { left:-99999px; opacity:0; height:0 }).
 * These rules bring the dropdowns back, matching the archived behaviour.
 */

/* ---- Desktop (>=769px): open on hover / keyboard focus ---- */
@media (min-width: 769px) {
    .main-navigation .main-nav ul li:hover > ul,
    .main-navigation .main-nav ul li.sfHover > ul,
    .main-navigation .main-nav ul li:focus-within > ul {
        left: auto;
        opacity: 1;
        height: auto;
        overflow: visible;
    }
    /* second level (none today, but keep it sane if added) flows to the side */
    .main-navigation .main-nav ul ul li:hover > ul,
    .main-navigation .main-nav ul ul li.sfHover > ul {
        left: 100%;
        top: 0;
    }
}

/* ---- Mobile (<=768px): accordion — sub-menus stack inline, open on tap ---- */
@media (max-width: 768px) {
    .main-navigation.toggled .main-nav ul ul {
        position: static;
        left: auto;
        float: none;
        width: 100%;
        opacity: 1;
        box-shadow: none;
    }
    .main-navigation.toggled .main-nav ul li.sfHover > ul {
        height: auto;
        overflow: visible;
    }
    .main-navigation .dropdown-menu-toggle {
        cursor: pointer;
        padding: 0 1em;
    }
}

/*
 * Responsive embeds (YouTube). UCSS purged the wp-block-library embed rules, so
 * the iframes fell back to their width="1200" height="675" attributes and
 * overflowed/overlapped the neighbouring text column. Restore the aspect-ratio box.
 */
.wp-block-embed { margin: 0 0 1em; }
.wp-block-embed iframe { max-width: 100%; }
.wp-block-embed__wrapper { position: relative; }
.wp-embed-aspect-21-9 .wp-block-embed__wrapper::before { padding-top: 42.85%; }
.wp-embed-aspect-18-9 .wp-block-embed__wrapper::before { padding-top: 50%; }
.wp-embed-aspect-16-9 .wp-block-embed__wrapper::before { padding-top: 56.25%; }
.wp-embed-aspect-4-3  .wp-block-embed__wrapper::before { padding-top: 75%; }
.wp-embed-aspect-1-1  .wp-block-embed__wrapper::before { padding-top: 100%; }
.wp-has-aspect-ratio .wp-block-embed__wrapper::before {
    content: "";
    display: block;
}
.wp-has-aspect-ratio .wp-block-embed__wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/*
 * Double image border fix. EditorPlus puts the orange box-shadow on the <img>
 * (.eplus-styles-uid-X img). Merging every page's inline styles also pulled in a
 * stray copy of that shadow on the <figure> wrapper, so images got TWO identical
 * shadows. Drop the wrapper shadow; the one on the <img> stays.
 */
figure.wp-block-image.eplus-wrapper {
    box-shadow: none;
}
