/* ==========================================================
   HEADER - single source of truth for Shutters Stop
   Save as: public/css/header.css
   Load this file LAST (after site-polish.css / site-overrides.css)
   Works with the header Blade markup (.nav-wrap, .brand, .nav-links,
   .nav-dropdown, .nav-single, .nav-actions, .mobile-nav-actions)
   ========================================================== */

/* ---------- Base bar ---------- */
body > header,
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  overflow: visible;
  background: rgba(255, 255, 255, .97);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid #e6ebe6;
  box-shadow: 0 8px 28px rgba(3, 42, 35, .08);
}

header .container.nav-wrap {
  width: min(1320px, calc(100% - 40px));
  max-width: 1320px;
  margin-inline: auto;
  padding: 0;
  min-height: 88px;
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.2vw, 20px);
  overflow: visible;
}

/* ---------- Logo ---------- */
header .brand {
  flex: 0 0 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  padding-right: 16px;
  position: relative;
}

header .brand img.site-logo {
  display: block;
  width: auto;
  height: 44px;          /* change logo size here */
  max-width: none;
  object-fit: contain;
}

header .brand::after {
  content: "";
  position: absolute;
  right: 0;
  top: 14px;
  bottom: 14px;
  width: 1px;
  background: linear-gradient(transparent, #c99a3a, transparent);
}

/* ---------- Menu ---------- */
header .nav-links {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, .9vw, 14px);
  font-family: "Manrope", sans-serif;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .03em;
  text-transform: uppercase;
}

header .nav-single,
header .nav-dropdown summary {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 14px 4px;
  white-space: nowrap;
  color: #23362f;
  cursor: pointer;
  list-style: none;
  transition: color .2s;
}

header .nav-dropdown summary::-webkit-details-marker { display: none; }

header .nav-single:hover,
header .nav-dropdown summary:hover,
header .nav-dropdown[open] summary {
  color: #073d32;
}

/* gold underline on hover */
header .nav-links .nav-single::after,
header .nav-dropdown summary::before {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 7px;
  width: auto;
  height: 2px;
  border-radius: 2px;
  background: #c99a3a;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .22s;
}

header .nav-links .nav-single:hover::after,
header .nav-dropdown summary:hover::before,
header .nav-dropdown[open] summary::before {
  width: auto;
  transform: scaleX(1);
}

/* dropdown arrow */
header .nav-dropdown summary::after {
  content: "";
  width: 5px;
  height: 5px;
  flex-shrink: 0;
  border-right: 1.7px solid currentColor;
  border-bottom: 1.7px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform .2s;
}

header .nav-dropdown[open] summary::after {
  transform: rotate(225deg) translate(-1px, -1px);
}

header .nav-dropdown {
  position: relative;
  flex: 0 0 auto;
  display: block;
  height: auto;
}

/* link inside <summary> */
header .nav-dropdown summary .nav-parent-link {
  padding: 0;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  border: 0;
}

header .nav-dropdown summary .nav-parent-link::after {
  display: none;
}

/* ---------- Dropdown panel ---------- */
header .dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: -14px;
  min-width: 250px;
  padding: 10px;
  display: none;
  gap: 2px;
  background: #fff;
  border: 1px solid #e4e9e3;
  border-radius: 13px;
  box-shadow: 0 22px 55px rgba(3, 42, 35, .18);
  z-index: 1100;
  text-transform: none;
  letter-spacing: 0;
}

header .nav-dropdown[open] > .dropdown-menu {
  display: grid;
}

/* invisible bridge so the menu doesn't close when moving the mouse down */
header .dropdown-menu::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -14px;
  height: 14px;
}

header .dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  border-radius: 8px;
  font-size: .82rem;
  font-weight: 700;
  line-height: 1.35;
  color: #35453d;
  white-space: normal;
  transition: background .2s, color .2s, transform .2s;
}

header .dropdown-menu a::after {
  display: none;
}

header .dropdown-menu a:hover {
  background: #edf4ef;
  color: #073d32;
  transform: translateX(3px);
}

/* ---------- Right side: phone + quote ---------- */
header .nav-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

header .nav-actions .nav-phone {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0;
  border: 0;
  background: none;
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  white-space: nowrap;
  font-size: .82rem;
  font-weight: 800;
  color: #073d32;
}

header .mobile-nav-actions .nav-phone,
header .mobile-nav-actions .nav-cta {
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
}

header .nav-actions .nav-phone .nav-phone-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #eff4ef;
  border: 1px solid #e0e9e1;
  font-size: 1rem;
}

/* number: hidden on smaller desktops, shown on wide screens */
header .nav-actions .nav-phone > span:not(.nav-phone-icon) {
  display: none;
}

/* quote button (overrides the global clipped-corner .btn rules) */
header .nav-actions .nav-cta {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  padding: 12px 18px !important;
  font-size: .72rem !important;
  line-height: 1.1;
  white-space: nowrap;
  gap: 8px !important;
}

header .nav-cta::before {
  -webkit-clip-path: none !important;
  clip-path: none !important;
}

@media (min-width: 1440px) {
  header .nav-links {
    font-size: .74rem;
  }

  header .nav-actions .nav-phone > span:not(.nav-phone-icon) {
    display: inline;
  }
}

/* ---------- Tablet / mobile menu ---------- */
header .menu-toggle {
  display: none;
}

header .mobile-nav-actions {
  display: none;
}

@media (max-width: 1239px) {
  header .container.nav-wrap {
    min-height: 74px;
    flex-wrap: nowrap;
  }

  header .brand::after {
    display: none;
  }

  header .brand img.site-logo {
    height: 40px;
  }

  header .menu-toggle {
    display: grid;
    place-items: center;
    margin-left: auto;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 10px;
    background: #073d32;
    color: #fff;
    font-size: 1.3rem;
    cursor: pointer;
  }

  header .nav-actions {
    display: none;
  }

  header .nav-links {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    padding: 14px 22px 22px;
    background: #fff;
    border-top: 1px solid #e6ebe6;
    box-shadow: 0 22px 35px rgba(16, 44, 32, .12);
    height: calc(100vh - 74px);
    height: calc(100svh - 74px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    font-size: .8rem;
  }

  header .nav-links.open {
    display: flex;
  }

  header .nav-single {
    padding: 14px 4px;
    border-bottom: 1px solid #edf0ed;
  }

  header .nav-links .nav-single::after,
  header .nav-dropdown summary::before {
    display: none;
  }

  header .nav-dropdown {
    width: 100%;
    border-bottom: 1px solid #edf0ed;
  }

  header .nav-dropdown summary {
    padding: 14px 4px;
  }

  header .nav-dropdown summary::after {
    margin-left: auto;
  }

  header .nav-dropdown summary .nav-parent-link {
    flex: 1;
    border-bottom: 0;
  }

  header .dropdown-menu {
    position: static;
    min-width: 0;
    margin: 0 0 10px;
    padding: 6px;
    background: #f6f8f6;
    border: 0;
    box-shadow: none;
  }

  header .dropdown-menu::before {
    display: none;
  }

  header .dropdown-menu a {
    border-bottom: 0;
    padding: 11px 12px;
  }

  header .mobile-nav-actions {
    display: grid;
    gap: 12px;
    padding-top: 16px;
  }

  header .mobile-nav-actions .nav-phone {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: .88rem !important;
    font-weight: 800;
    color: #073d32;
    border-bottom: 0;
  }

  header .mobile-nav-actions .nav-cta {
    justify-self: start;
    padding: 13px 20px !important;
    font-size: .78rem !important;
  }
}

@media (max-width: 560px) {
  header .container.nav-wrap {
    min-height: 68px;
  }

  header .brand img.site-logo {
    height: 36px;
  }

  header .nav-links {
    height: calc(100vh - 68px);
    height: calc(100svh - 68px);
  }
}

@media (prefers-reduced-motion: reduce) {
  header *,
  header *::before,
  header *::after {
    transition: none !important;
  }
}

@media (min-width: 1051px) {
  header .container.nav-wrap {
    width: min(1560px, calc(100% - 48px));
    max-width: none;
    margin-inline: auto;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 20px;
  }

  header .brand       { flex: 0 0 auto; }
  header .nav-links   { flex: 1 1 auto; min-width: 0; justify-content: center; gap: clamp(8px, 1vw, 16px); font-size: .72rem; }
  header .nav-actions { flex: 0 0 auto; margin-left: 0; }
  header .nav-phone,
  header .nav-cta     { white-space: nowrap; }
}