/* Carlisle Glass Repairs — universal dynamic WordPress header */
:root{
  --cgr-navy:#06193c;
  --cgr-green:#38b437;
  --cgr-blue:#5aa3f0;
  --cgr-text:#173766;
  --cgr-muted:#45536d;
  --cgr-line:#e4e9f1;
}

.cgr-topbar,
.cgr-header,
.cgr-header *{box-sizing:border-box}

.cgr-topbar{
  width:100%;
  max-width:none;
  margin:0;
  background:var(--cgr-navy);
  color:#fff;
  font-family:"Inter",system-ui,-apple-system,sans-serif;
}
.cgr-topbar__inner{
  width:calc(100% - 96px);
  max-width:1176px;
  height:36px;
  margin:0 auto;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:11px;
  font-size:12px;
  line-height:1;
}
.cgr-topbar__status{
  width:7px;
  height:7px;
  flex:0 0 7px;
  border-radius:50%;
  background:var(--cgr-green);
  box-shadow:0 0 0 4px rgba(56,180,55,.10);
}
.cgr-topbar__sep{color:#8492a8}
.cgr-topbar__phone{color:var(--cgr-blue)!important;font-weight:600;text-decoration:none}

/* Intentionally non-sticky. */
body .cgr-header{
  position:relative!important;
  inset:auto!important;
  top:auto!important;
  left:auto!important;
  right:auto!important;
  width:100%!important;
  max-width:none!important;
  height:74px;
  margin:0!important;
  padding:0!important;
  z-index:900;
  background:#fff;
  border:0;
  border-bottom:1px solid rgba(6,25,60,.08);
  box-shadow:none;
  font-family:"Inter",system-ui,-apple-system,sans-serif;
}
.cgr-header__inner{
  width:calc(100% - 96px);
  max-width:1176px;
  height:100%;
  margin:0 auto;
  display:grid;
  grid-template-columns:220px minmax(0,1fr) 340px;
  align-items:center;
  gap:0;
}
.cgr-header__brand{display:flex;align-items:center;min-width:0}
.cgr-header__logo{display:inline-flex;align-items:center;width:max-content;max-width:100%;text-decoration:none}
.cgr-header__logo-img{display:block;width:200px!important;max-width:100%!important;height:auto!important;max-height:58px;object-fit:contain;object-position:left center}

.cgr-header__nav-panel{min-width:0}
.cgr-header__nav{display:flex;justify-content:center;align-items:center}
.cgr-primary-menu{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:18px;
  margin:0!important;
  padding:0!important;
  list-style:none!important;
}
.cgr-primary-menu > li{position:relative;margin:0!important;padding:0!important;list-style:none!important}
.cgr-primary-menu > li > a{
  min-height:38px;
  padding:9px 10px;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:var(--cgr-muted)!important;
  font-size:14px;
  line-height:20px;
  font-weight:500;
  white-space:nowrap;
  text-decoration:none!important;
  transition:background .16s ease,color .16s ease;
}
.cgr-primary-menu > li:hover > a,
.cgr-primary-menu > li.current-menu-item > a,
.cgr-primary-menu > li.current-menu-parent > a,
.cgr-primary-menu > li.current_page_item > a,
.cgr-primary-menu > li.current_page_parent > a{
  background:#e9eef5;
  color:#123663!important;
}
.cgr-primary-menu a:before,
.cgr-primary-menu a:after{content:none!important;display:none!important}

/* Basic desktop dropdown support for WordPress submenus. */
.cgr-primary-menu .sub-menu{
  position:absolute;
  top:calc(100% + 8px);
  left:0;
  min-width:220px;
  margin:0!important;
  padding:9px!important;
  list-style:none!important;
  background:#fff;
  border:1px solid var(--cgr-line);
  border-radius:12px;
  box-shadow:0 15px 36px rgba(7,31,66,.14);
  opacity:0;
  visibility:hidden;
  transform:translateY(5px);
  transition:.16s ease;
  z-index:20;
}
.cgr-primary-menu li:hover > .sub-menu,
.cgr-primary-menu li:focus-within > .sub-menu{opacity:1;visibility:visible;transform:none}
.cgr-primary-menu .sub-menu li{list-style:none!important;margin:0!important}
.cgr-primary-menu .sub-menu a{display:block;padding:9px 11px;border-radius:8px;color:var(--cgr-muted)!important;font-size:13px;text-decoration:none!important}
.cgr-primary-menu .sub-menu a:hover{background:#f1f5f9;color:#123663!important}

.cgr-header__actions{display:flex;align-items:center;justify-content:flex-end;gap:15px}
.cgr-header__phone,
.cgr-header__mobile-phone{
  display:inline-flex;
  align-items:center;
  gap:8px;
  color:var(--cgr-text)!important;
  font-size:13px;
  line-height:1.25;
  font-weight:700;
  white-space:nowrap;
  text-decoration:none!important;
}
.cgr-header__phone-icon{
  width:32px;
  height:32px;
  flex:0 0 32px;
  border-radius:50%;
  display:grid;
  place-items:center;
  background:#e8f7e8;
  color:#2fa43a;
  font-size:13px;
}
.cgr-header__quote,
.cgr-header__mobile-quote{
  height:42px;
  padding:0 21px;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:var(--cgr-green)!important;
  color:#fff!important;
  box-shadow:0 8px 18px rgba(56,180,55,.20);
  font-size:13px;
  line-height:1;
  font-weight:700;
  white-space:nowrap;
  text-decoration:none!important;
  transition:background .15s ease,transform .15s ease,box-shadow .15s ease;
}
.cgr-header__quote:hover,
.cgr-header__mobile-quote:hover{background:#31a632!important;transform:translateY(-1px);box-shadow:0 10px 22px rgba(56,180,55,.25)}
.cgr-header__toggle{display:none}
.cgr-header__mobile-actions{display:none}

@media (max-width:1120px){
  .cgr-topbar__inner,.cgr-header__inner{width:calc(100% - 40px)}
  .cgr-header__inner{grid-template-columns:185px minmax(0,1fr) 300px}
  .cgr-header__logo-img{width:172px!important}
  .cgr-primary-menu{gap:7px}
  .cgr-primary-menu > li > a{padding:8px 7px;font-size:13px}
  .cgr-header__actions{gap:9px}
  .cgr-header__phone{font-size:12px}
  .cgr-header__quote{padding:0 15px;font-size:12px}
}

@media (max-width:900px){
  body.cgr-menu-open{overflow:hidden}
  body .cgr-header{height:68px}
  .cgr-topbar__inner,.cgr-header__inner{width:calc(100% - 32px)}
  .cgr-header__inner{grid-template-columns:minmax(0,1fr) auto;position:relative}
  .cgr-header__logo-img{width:160px!important;max-height:48px}
  .cgr-header__phone,.cgr-header__quote{display:none}
  .cgr-header__actions{grid-column:2;grid-row:1;gap:0}
  .cgr-header__toggle{
    width:42px;
    height:42px;
    padding:0;
    border:1px solid #d9e1eb;
    border-radius:10px;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:5px;
    background:#fff;
    cursor:pointer;
    box-shadow:none;
  }
  .cgr-header__toggle span{
    display:block;
    width:19px;
    height:2px;
    border-radius:5px;
    background:#123663;
    transition:transform .2s ease,opacity .2s ease;
  }
  .cgr-header__toggle[aria-expanded="true"] span:nth-child(1){transform:translateY(7px) rotate(45deg)}
  .cgr-header__toggle[aria-expanded="true"] span:nth-child(2){opacity:0}
  .cgr-header__toggle[aria-expanded="true"] span:nth-child(3){transform:translateY(-7px) rotate(-45deg)}

  .cgr-header__nav-panel{
    position:absolute;
    top:68px;
    left:0;
    right:0;
    width:100%;
    max-height:calc(100vh - 100px);
    overflow:auto;
    padding:12px 16px 18px;
    background:#fff;
    border-top:1px solid #edf1f5;
    border-bottom:1px solid #dfe6ef;
    box-shadow:0 18px 36px rgba(7,31,66,.13);
    opacity:0;
    visibility:hidden;
    transform:translateY(-8px);
    pointer-events:none;
    transition:opacity .18s ease,transform .18s ease,visibility .18s ease;
  }
  .cgr-header__nav-panel.is-open{opacity:1;visibility:visible;transform:none;pointer-events:auto}
  .cgr-header__nav{display:block}
  .cgr-primary-menu{display:block;width:100%;margin:0!important;padding:0!important}
  .cgr-primary-menu > li{width:100%;border-bottom:1px solid #eef2f6}
  .cgr-primary-menu > li:last-child{border-bottom:0}
  .cgr-primary-menu > li > a{
    width:100%;
    min-height:48px;
    padding:13px 10px;
    border-radius:8px;
    justify-content:flex-start;
    font-size:14px;
  }
  .cgr-primary-menu > li:hover > a,
  .cgr-primary-menu > li.current-menu-item > a,
  .cgr-primary-menu > li.current-menu-parent > a,
  .cgr-primary-menu > li.current_page_item > a,
  .cgr-primary-menu > li.current_page_parent > a{background:#edf2f7}
  .cgr-primary-menu .sub-menu{
    position:static;
    min-width:0;
    margin:0 0 8px!important;
    padding:4px 0 4px 12px!important;
    border:0;
    box-shadow:none;
    opacity:1;
    visibility:visible;
    transform:none;
  }
  .cgr-header__mobile-actions{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:10px;
    padding-top:14px;
    border-top:1px solid #edf1f5;
    margin-top:8px;
  }
  .cgr-header__mobile-phone,
  .cgr-header__mobile-quote{height:44px;justify-content:center;border-radius:10px}
  .cgr-header__mobile-phone{border:1px solid #dfe6ef;padding:0 12px}
  .cgr-header__mobile-phone .cgr-header__phone-icon{width:28px;height:28px;flex-basis:28px}
  .cgr-header__mobile-quote{padding:0 15px}
}

@media (max-width:520px){
  .cgr-topbar__inner{width:calc(100% - 24px);height:32px;gap:7px;font-size:10px;justify-content:center}
  .cgr-topbar__sep,.cgr-topbar__phone{display:none}
  body .cgr-header{height:64px}
  .cgr-header__inner{width:calc(100% - 24px)}
  .cgr-header__logo-img{width:145px!important;max-height:44px}
  .cgr-header__toggle{width:40px;height:40px}
  .cgr-header__nav-panel{top:64px;padding:10px 12px 16px;max-height:calc(100vh - 96px)}
  .cgr-header__mobile-actions{grid-template-columns:1fr}
  .cgr-header__mobile-phone,.cgr-header__mobile-quote{width:100%}
}
