/*
 * YWCA NYC header and menu (Option C), moved from WPCode snippet 21977 on staging.
 * Loaded by inc/ywm-header.php. Same rules as the snippet, unchanged.
 */
/* Avenir Next LT Pro Heavy Condensed (licensed web use), self-hosted in the theme's fonts folder. Latin subset.
   Headlines and menu (Nov 18). */
@font-face{font-family:"Avenir Next Condensed";src:url("/wp-content/themes/YWCANYC/fonts/AvenirNextLTPro-HeavyCn.woff2") format("woff2");font-weight:800;font-style:normal;font-display:swap}
@font-face{font-family:"Avenir Next Condensed";src:url("/wp-content/themes/YWCANYC/fonts/AvenirNextLTPro-BoldCn.woff2") format("woff2");font-weight:700;font-style:normal;font-display:swap}
:root{
  --ywm-persimmon:#FA4616; --ywm-p700:#C8380E; --ywm-p50:#FFEDE8;
  --ywm-cream:#FFFAF4; --ywm-gray:#BDBDBD; --ywm-g700:#595959;
  --ywm-header-bg:#FFFFFF;
  --ywm-font:"Source Sans Pro","Source Sans 3",system-ui,sans-serif;
  --ywm-display:"Avenir Next Condensed","Avenir Next LT Pro","Avenir Next","Avenir","Nunito Sans",system-ui,sans-serif;
  --ywm-h:76px; --ywm-top:0px;
}
/* Headlines site-wide: Avenir Next Condensed Heavy */
h1, h2, h3{font-family:var(--ywm-display)!important; font-weight:800!important; letter-spacing:.025em!important}
/* Empty black strip above the header */
#toolbar{display:none!important}
/* One opacity for the whole header (theme sets 0.99 on the pinned bar) */
#branding, #branding #sticky_navigation, #site-navigation .sub-menu, #ywm-util, #ywm-header, .ywm-panel{opacity:1!important}

/* ---------- Desktop and tablet landscape ---------- */
@media (min-width:900px){
  #branding, #branding #sticky_navigation{background:var(--ywm-header-bg)!important}
  #branding{border-bottom:1px solid var(--ywm-gray)}
  #branding #sticky_navigation{border-bottom:1px solid var(--ywm-gray)}
  /* Logo left, menu right, one line */
  #sticky_navigation > .container_16{display:flex; align-items:center; justify-content:space-between; gap:24px}
  #sticky_navigation > .container_16 > .clear, #branding .mob-nav{display:none!important}
  #branding hgroup{width:auto!important; flex:0 0 auto; float:none!important; margin:0!important}
  #site-navigation{width:auto!important; flex:1 1 auto; float:none!important; margin:0!important}
  #site-navigation #menu-main-menu{display:flex; justify-content:flex-end; align-items:center; flex-wrap:nowrap; gap:34px; float:none!important}
  /* Salute proportions: taller bar, larger logo */
  #branding #sticky_navigation{padding:20px 0!important; opacity:1!important}
  #branding #site-title img{height:40px!important; width:auto!important; max-width:none!important; margin-left:5px}
  #site-navigation #menu-main-menu > li{float:none!important}
  #site-navigation #menu-main-menu > li > a{white-space:nowrap}
  /* Logged-in staff: keep the pinned header below the admin bar */
  body.admin-bar #sticky_navigation[style*="fixed"]{top:32px!important}
  #site-navigation #menu-main-menu > li > a{
    font-family:var(--ywm-display)!important; font-weight:800!important;
    font-size:16px!important; line-height:20px!important; color:#000!important; text-transform:uppercase!important; letter-spacing:.1em;
    padding:10px 0!important; margin:0!important; border-bottom:2px solid transparent; background:none!important;
  }
  /* Current section: persimmon. Darker orange is for hover only. */
  #site-navigation #menu-main-menu > li.current-menu-item > a,
  #site-navigation #menu-main-menu > li.current-menu-ancestor > a{
    color:var(--ywm-persimmon)!important; border-bottom-color:var(--ywm-persimmon);
  }
  #site-navigation #menu-main-menu > li > a:hover,
  #site-navigation #menu-main-menu > li:focus-within > a{
    color:var(--ywm-p700)!important; border-bottom-color:var(--ywm-p700);
  }
  /* Donate as the primary button */
  #site-navigation #menu-main-menu > li > a[href*="/donate"]{
    background:var(--ywm-persimmon)!important; color:#fff!important; text-transform:uppercase!important;
    font-family:var(--ywm-display)!important;
    letter-spacing:.1em; border-radius:8px; border-bottom:0!important; font-weight:800!important;
    padding:10px!important; margin-left:6px!important; font-size:16px!important; line-height:20px!important; transition:background-color .15s;
  }
  #site-navigation #menu-main-menu > li > a[href*="/donate"]:hover,
  #site-navigation #menu-main-menu > li > a[href*="/donate"]:focus-visible{background:var(--ywm-p700)!important;color:#fff!important}
  /* Dropdowns: card style, open on hover and keyboard focus */
  #site-navigation #menu-main-menu li:hover > .sub-menu,
  #site-navigation #menu-main-menu li:focus-within > .sub-menu{display:block!important}
  /* Dropdown 2: quiet list (Nov 19) */
  #site-navigation #menu-main-menu .sub-menu{
    background:#FFFFFF!important; border:1px solid #EDEDED!important; border-top:0!important; border-radius:8px; margin-top:12px!important; opacity:1!important;
    box-shadow:0 6px 16px rgba(40,20,10,.08)!important;
    min-width:220px; width:auto!important; padding:10px 28px 10px 22px!important; left:-28px!important;
  }
  #site-navigation #menu-main-menu .sub-menu::before{content:""; position:absolute; left:0; right:0; top:-14px; height:14px}
  #site-navigation #menu-main-menu .sub-menu li{display:block!important; border:0!important; border-bottom:1px solid #EDEDED!important; background:none!important; width:100%!important; float:none!important}
  #site-navigation #menu-main-menu .sub-menu li:last-child{border-bottom:0!important}
  #site-navigation #menu-main-menu .sub-menu a{
    display:flex!important; align-items:center; gap:12px; width:auto!important; white-space:nowrap!important;
    color:#000!important; background:none!important; font-family:var(--ywm-font)!important;
    font-weight:600!important; font-size:16px!important; line-height:22px!important; padding:9px 0!important; text-transform:none!important; letter-spacing:0!important; border:0!important;
  }
  #site-navigation #menu-main-menu .sub-menu a::before{content:""; width:6px; height:6px; border-radius:3px; flex:none; background:transparent}
  #site-navigation #menu-main-menu .sub-menu .current-menu-item > a{color:var(--ywm-persimmon)!important; background:none!important}
  #site-navigation #menu-main-menu .sub-menu .current-menu-item > a::before{background:var(--ywm-persimmon)}
  #site-navigation #menu-main-menu .sub-menu a:hover,
  #site-navigation #menu-main-menu .sub-menu a:focus-visible{color:var(--ywm-p700)!important; background:none!important}
  #site-navigation #menu-main-menu .sub-menu a:hover::before,
  #site-navigation #menu-main-menu .sub-menu a:focus-visible::before{background:var(--ywm-p700)}
  #site-navigation a:focus-visible{outline:3px solid var(--ywm-p700);outline-offset:2px}
  #ywm-header{display:none!important}
  /* Utility bar (Option C) */
  html #ywm-util{display:block; background:#000; height:40px}
  #ywm-util .ywm-util-in{height:40px; display:flex; align-items:center; justify-content:flex-end; gap:28px; float:none!important}
  #ywm-util a{color:#fff!important; font-family:var(--ywm-font); font-size:14px; line-height:20px; text-decoration:none!important}
  #ywm-util a:hover, #ywm-util a:focus-visible{text-decoration:underline!important}
  #ywm-util button{background:none; border:0; padding:6px; margin:0 -6px 0 0; color:#fff; cursor:pointer; display:flex; align-items:center}
  #ywm-util form{display:flex; align-items:center; gap:8px; margin:0}
  #ywm-util form[hidden]{display:none}
  /* Search field: quiet underline that sits inside the 40px bar */
  #ywm-util input{box-sizing:border-box; height:24px!important; width:220px; margin:0!important; padding:0 2px!important; border:0!important; border-bottom:1px solid rgba(255,255,255,.6)!important;
    border-radius:0!important; background:transparent!important; box-shadow:none!important; color:#fff!important; font-family:var(--ywm-font); font-size:14px; line-height:20px}
  #ywm-util input::placeholder{color:rgba(255,255,255,.7); opacity:1}
  #ywm-util input::-webkit-search-cancel-button{-webkit-appearance:none; appearance:none; width:12px; height:12px; margin-left:6px; cursor:pointer; background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 2l8 8M10 2l-8 8' stroke='%23FA4616' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center/12px 12px no-repeat}
  #ywm-util input::-webkit-search-cancel-button:hover{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 2l8 8M10 2l-8 8' stroke='%23C8380E' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E")}
  #ywm-util input:focus, #ywm-util input:focus-visible{outline:none!important; border-bottom:2px solid #fff!important}
  #ywm-util a:focus-visible, #ywm-util button:focus-visible{outline:2px solid #fff; outline-offset:2px}
  /* Subtle shadow once the page scrolls */
  html.ywm-scrolled #branding #sticky_navigation[style*="fixed"]{box-shadow:0 2px 6px rgba(40,20,10,.08)}
  /* Homepage: same soft shadow from first load, above the hero */
  body.home #branding #sticky_navigation{box-shadow:0 2px 6px rgba(40,20,10,.08)}
  body.home #branding #sticky_navigation:not([style*="fixed"]){z-index:50}
}
#ywm-util{display:none}

/* ---------- Phones and small tablets ---------- */
@media (max-width:899px){
  #branding, .mob-nav, .mean-bar{display:none!important}
  #page{padding-top:var(--ywm-h)!important}
  html #ywm-header{display:block}
}
#ywm-header{display:none; position:fixed; top:var(--ywm-top); left:0; right:0; z-index:99990;
  font-family:var(--ywm-font)}
#ywm-header *{box-sizing:border-box}
.ywm-bar{height:var(--ywm-h); display:flex; align-items:center; gap:14px; padding:0 calc(6vw + 1.6px) 0 calc(6vw + 9.6px);
  background:var(--ywm-header-bg); border-bottom:1px solid var(--ywm-gray); transition:box-shadow .2s}
html.ywm-scrolled .ywm-bar, body.home .ywm-bar{box-shadow:0 2px 6px rgba(40,20,10,.08)}
.ywm-logo{display:flex; align-items:center; margin-right:auto; min-height:44px}
.ywm-logo img{height:clamp(34px, 11vw, 40px); width:auto; display:block}
.ywm-donate{display:inline-flex; align-items:center; padding:10px; border-radius:8px;
  background:var(--ywm-persimmon); color:#fff!important; font-family:var(--ywm-display); font-weight:800; font-size:16px; line-height:20px; letter-spacing:.1em;
  text-transform:uppercase; text-decoration:none!important; white-space:nowrap; transition:background-color .15s}
.ywm-donate:hover,.ywm-donate:focus-visible,.ywm-donate:active{background:var(--ywm-p700)}
.ywm-toggle{display:inline-flex; align-items:center; justify-content:center; width:46px; height:46px; padding:0;
  border:0; background:transparent; color:#000; cursor:pointer}
.ywm-burger{position:relative; width:30px; height:18px; display:inline-block}
.ywm-burger i{position:absolute; left:0; width:30px; height:2px; background:#000; transition:transform .2s, opacity .2s}
.ywm-burger i:nth-child(1){top:0} .ywm-burger i:nth-child(2){top:8px} .ywm-burger i:nth-child(3){top:16px}
.ywm-toggle[aria-expanded="true"] .ywm-burger i:nth-child(1){transform:translateY(8px) rotate(45deg)}
.ywm-toggle[aria-expanded="true"] .ywm-burger i:nth-child(2){opacity:0}
.ywm-toggle[aria-expanded="true"] .ywm-burger i:nth-child(3){transform:translateY(-8px) rotate(-45deg)}
#ywm-header a:focus-visible, #ywm-header button:focus-visible{outline:3px solid var(--ywm-p700); outline-offset:2px}
.ywm-panel{position:fixed; left:0; right:0; bottom:0; top:calc(var(--ywm-top) + var(--ywm-h));
  background:#fff; border-top:2px solid var(--ywm-persimmon); overflow-y:auto; -webkit-overflow-scrolling:touch; padding-bottom:32px}
.ywm-panel[hidden]{display:none}
/* Search at the top */
.ywm-search{margin:0; padding:16px calc(6vw + 9.6px) 8px}
.ywm-search label{position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap}
.ywm-search-field{display:flex; align-items:center; gap:10px; height:44px; padding:0 14px; border:1px solid var(--ywm-g700); border-radius:4px}
.ywm-search-field svg{width:18px; height:18px; flex:none}
.ywm-search input{flex:1; min-width:0; height:40px; border:0; outline:none; background:transparent; font-family:var(--ywm-font); font-size:17px; color:#000; padding:0; box-shadow:none}
.ywm-search-field:focus-within{outline:3px solid var(--ywm-p700); outline-offset:2px}
/* Quiet lines */
.ywm-panel nav{padding:0 calc(6vw + 9.6px)}
.ywm-panel ul{list-style:none; margin:0; padding:0}
.ywm-panel nav > ul > li{margin:0; border-bottom:1px solid #EDEDED}
.ywm-row{display:flex; align-items:center}
.ywm-panel nav > ul > li > .ywm-row > a{display:flex; align-items:center; flex:1; min-height:56px; padding:12px 0; color:#000!important;
  text-decoration:none!important; font-family:var(--ywm-display); font-weight:800; font-size:20px; line-height:24px; letter-spacing:.08em; text-transform:uppercase}
.ywm-panel li.ywm-current > .ywm-row > a, .ywm-panel nav > ul > li > .ywm-row > a[aria-current="page"]{color:var(--ywm-persimmon)!important}
.ywm-sub-toggle{width:44px; height:44px; border:0; padding:0; background:transparent; cursor:pointer;
  display:flex; align-items:center; justify-content:flex-end; color:#000}
.ywm-current > .ywm-row .ywm-sub-toggle{color:var(--ywm-persimmon)}
@media (hover:hover){ .ywm-panel nav > ul > li > .ywm-row:not(.ywm-nohover):hover > a, .ywm-panel nav > ul > li > .ywm-row:not(.ywm-nohover):hover .ywm-sub-toggle, .ywm-sub a:not(.ywm-nohover):hover{color:var(--ywm-p700)!important} }
.ywm-sub-toggle svg{width:18px; height:18px; transition:transform .2s}
.ywm-sub-toggle[aria-expanded="true"] svg{transform:rotate(180deg)}
.ywm-sub{padding:2px 0 10px!important}
.ywm-sub li{margin:0; border:0}
.ywm-sub a{display:flex; align-items:center; gap:10px; min-height:44px; padding:0 0 0 16px; font-family:var(--ywm-font); font-weight:700; font-size:16px; line-height:22px;
  color:var(--ywm-g700)!important; text-decoration:none!important}
.ywm-sub a[aria-current="page"]{color:var(--ywm-p700)!important; padding-left:0}
.ywm-sub a[aria-current="page"]::before{content:""; width:6px; height:6px; border-radius:3px; background:var(--ywm-p700); flex:none}
/* Donate and utility links at the bottom */
.ywm-foot{padding:24px calc(6vw + 9.6px) 0}
.ywm-foot .ywm-donate-big{display:flex; align-items:center; justify-content:center; padding:10px; border-radius:8px; background:var(--ywm-persimmon); color:#fff!important;
  text-decoration:none!important; font-family:var(--ywm-display); font-weight:800; font-size:16px; line-height:20px; letter-spacing:.1em; text-transform:uppercase}
.ywm-foot .ywm-donate-big:hover, .ywm-foot .ywm-donate-big:focus-visible{background:var(--ywm-p700)}
.ywm-foot-links{display:flex; justify-content:center; gap:24px; padding-top:18px}
.ywm-foot-links a{font-family:var(--ywm-font); font-size:14px; color:var(--ywm-g700)!important; text-decoration:none!important; min-height:32px; display:flex; align-items:center}
html.ywm-open, html.ywm-open body{overflow:hidden!important}
/* Keep the bar from shifting when the page scrollbar is hidden (desktop browsers at phone width) */
html.ywm-open body{padding-right:var(--ywm-sbw,0px)}
html.ywm-open .ywm-bar{padding-right:calc(6vw + 1.6px + var(--ywm-sbw,0px))}
html.ywm-open .ywm-panel{padding-right:var(--ywm-sbw,0px)}
@media (max-width:359px){ .ywm-bar{gap:8px} }
@media (prefers-reduced-motion:reduce){ .ywm-burger i, .ywm-sub-toggle svg{transition:none} }
