/*
 * Aadnevik-specific fixes layered on top of Porto 5.2 without touching
 * parent-theme or core files (kept in the child theme per its own theme.xml
 * policy: Porto updates should be absorbed, not overwritten).
 *
 * Desktop main-navigation visibility (D22):
 * Magento core's Magento_Theme::html/sections.phtml (2.4.9) renders
 * .nav-sections-item-content with inline style="display:none" and
 * aria-hidden="true", meant to be cleared by the mage/tabs + mage/collapsible
 * JS widgets once a desktop viewport is detected. Porto's compiled CSS only
 * shows that panel through a plain (non-!important) ".active" class rule,
 * which cannot win over the element's own inline style even when the widget
 * does add the class. Magento's own Blank/Luma theme carries an !important
 * desktop override in _navigation.less to cover exactly this; Porto does not
 * import that partial, so the site never inherited the equivalent rule under
 * 2.4.9's core template. Net effect without this: the entire main navigation
 * menu is invisible at every desktop width. This restores core Magento's own
 * intended desktop behaviour, scoped to this site's header only.
 */
@media (min-width: 768px) {
    .page-header .nav-sections-item-content {
        display: block !important;
    }
}

/*
 * Mobile off-canvas drawer (D22):
 * Porto's own mobile design hides .nav-sections-item-title entirely (no
 * per-section accordion headers -- the drawer is meant to show the menu
 * content directly), and Porto's JS correctly adds "nav-open" to <html> when
 * the hamburger is tapped (confirmed: .nav-sections becomes a properly
 * positioned, correctly sized fixed-position drawer on toggle). But no CSS
 * rule ever clears .nav-sections-item-content's inline style="display:none"
 * for that state, so the drawer opens visually empty on every mobile device.
 * This is the same class of gap as the desktop rule above, for the mobile
 * side of the same underlying core-template/widget mismatch.
 */
html.nav-open .nav-sections-item-content {
    display: block !important;
}

/*
 * Header type21 CTA bar hidden (D34, 2026-09-26):
 * Porto's own header/type21.css (an admin-configured theme asset in
 * pub/media, never touched by this or any prior migration) sets
 * `.page-header.type21 .main-panel-top { display: none; }` unconditionally,
 * at every viewport. That container is what wraps the Contact/Appointments/
 * phone CTA block (custom_block_top, CMS block 2059) for this header type,
 * so the block's markup and links have always rendered in the DOM but never
 * been visible on screen. Confirmed via the pre-cutover DB dump that
 * header_type=21 has been configured since 2021-02-03 -- this predates the
 * 2.4.7->2.4.9 migration entirely and is not a migration regression, just
 * never previously verified with a rendered browser check. Restoring
 * visibility here rather than editing the pub/media asset directly, per
 * this file's existing policy of layering fixes without touching
 * parent-theme/uploaded assets.
 */
.page-header.type21 .main-panel-top {
    display: block !important;
}
