/*
Theme Name:   Twenty Sixteen Child – 50px header + vertical pop-up submenus (final fix)
Template:     twentysixteen
Version:      1.0.6
*/

@import url("../twentysixteen/style.css");

/* ==============================================================
   1. GLOBAL + 50PX HEADER (unchanged)
   ============================================================== */
html, body, #page, .site, .site-inner { background:#fff !important; overflow-x:hidden !important; }
.site-inner { max-width:1200px; margin:0 auto; padding:0 20px; box-sizing:border-box; }

header#masthead.site-header.cpt-header {
    height:50px !important; min-height:50px !important; max-height:50px !important;
    padding:5px 0 !important; display:flex !important; align-items:center !important;
    background:#fff !important; border-bottom:1px solid #ddd !important;
    overflow:visible !important; position:relative; z-index:10000 !important;
}
header#masthead.site-header.cpt-header .site-header-main {
    display:flex !important; justify-content:space-between !important; align-items:center !important;
    width:100% !important; max-width:1200px !important; margin:0 auto !important;
    padding:0 20px !important; height:50px; box-sizing:border-box;
}
header#masthead.site-header.cpt-header .site-branding { margin-right:20px !important; }
header#masthead.site-header.cpt-header .site-logo img { max-height:40px !important; width:auto !important; }
header#masthead.site-header.cpt-header .main-navigation { font-size:14px !important; }

/* Primary menu horizontal */
header#masthead.site-header.cpt-header .main-navigation > div > ul,
header#masthead.site-header.cpt-header .main-navigation ul { display:flex !important; gap:20px !important; margin:0 !important; padding:0 !important; list-style:none !important; }
header#masthead.site-header.cpt-header .main-navigation a { color:#333 !important; text-decoration:none !important; line-height:50px !important; white-space:nowrap !important; }

/* ==============================================================
   2. VERTICAL POP-UP SUBMENUS – NUCLEAR OVERRIDE
   ============================================================== */
header#masthead.site-header.cpt-header .main-navigation ul ul,
header#masthead.site-header.cpt-header .main-navigation .sub-menu {
    all: unset !important;                                      /* kills every inherited rule */
    display: block !important;
    position: absolute !important;
    top: 100% !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    min-width: 220px !important;
    background: #fff !important;
    border: 1px solid #ddd !important;
    border-radius: 8px !important;
    box-shadow: 0 12px 30px rgba(0,0,0,0.18) !important;
    padding: 12px 0 !important;
    margin-top: 10px !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: all 0.25s ease !important;
    z-index: 99999 !important;
    text-align: left !important;
    white-space: nowrap !important;
}

/* Show on hover */
header#masthead.site-header.cpt-header .main-navigation li:hover > ul,
header#masthead.site-header.cpt-header .main-navigation li:focus-within > ul {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateX(-50%) translateY(5px) !important;
}

/* Submenu items */
header#masthead.site-header.cpt-header .main-navigation ul ul li {
    all: unset !important;
    display: block !important;
    width: 100% !important;
}
header#masthead.site-header.cpt-header .main-navigation ul ul a {
    all: unset !important;
    display: block !important;
    padding: 10px 24px !important;
    color: #333 !important;
    font-size: 14px !important;
}
header#masthead.site-header.cpt-header .main-navigation ul ul a:hover {
    background: #f5f5f5 !important;
    color: #000 !important;
}

/* Kill absolutely everything that could interfere */
header#masthead.site-header.cpt-header .main-navigation .dropdown-toggle,
header#masthead.site-header.cpt-header .menu-item-has-children > a::after,
header#masthead.site-header.cpt-header .main-navigation .sub-menu:before,
header#masthead.site-header.cpt-header .main-navigation .sub-menu:after { display:none !important; }

/* Mobile – left aligned */
@media (max-width: 767px) {
    header#masthead.site-header.cpt-header .main-navigation ul ul {
        left: 0 !important;
        transform: none !important;
        min-width: 180px !important;
    }
    header#masthead.site-header.cpt-header .main-navigation { font-size:12px !important; }
    header#masthead.site-header.cpt-header .main-navigation > div > ul,
    header#masthead.site-header.cpt-header .main-navigation ul { gap:12px !important; }
}

/* Global scrollbar + excerpt killer stay unchanged */
::-webkit-scrollbar { width:6px; height:6px; }
::-webkit-scrollbar-track { background:transparent; }
::-webkit-scrollbar-thumb { background:rgba(0,0,0,0.3); border-radius:3px; }
::-webkit-scrollbar-thumb:hover { background:rgba(0,0,0,0.5); }

body.single-post .entry-content .excerpt-killer,
body.single-post .entry-content .excerpt-killer * { font-size:5px !important; font-style:italic !important; line-height:1 !important; }

