/* Kingprint custom header styles - mobile first */
:root {
  --kp-red: #e30613;
  --kp-yellow: #ffd100;
  --kp-black: #000000;
  --kp-white: #ffffff;
}

/* Layout offsets so content isn't hidden behind fixed header */
#page.site {
  padding-top: 160px; /* mobile default, header height approx (bigger logo) */
}

/* Fixed header shell */
#masthead.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--kp-white);
  color: var(--kp-black);
  box-shadow: 0 2px 12px rgba(0,0,0,0.35);
  /* Mobile/tablet: stack socials (top), logo (middle), hamburger (bottom) */
  display: grid;
  grid-template-columns: 1fr;
  grid-auto-rows: auto;
  align-items: center;
}

/* Branding: center logo big and noticeable */
.site-header .site-branding {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  text-align: center;
  order: 2;
}

/* Hide text title if logo exists, otherwise style the title */
.site-header .site-title { 
  font-size: 1.5rem;
  margin: 0;
}

/* Custom Logo sizing */
.site-header .custom-logo-link,
.site-header .custom-logo {
  display: inline-block;
  max-height: 110px; /* mobile logo size (bigger) */
  height: auto;
  width: auto;
}

/* Site description below logo (optional) */
.site-header .site-description {
  color: #ccc;
  margin: 4px 0 0 0;
}

/* Navigation: mobile first (collapsed) */
#site-navigation.main-navigation {
  background: transparent;
  border-top: 1px solid rgba(0,0,0,0.06);
  order: 3;
  width: 100%;
  justify-self: stretch;
  position: relative; /* for absolute dropdown */
}

#site-navigation .menu-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: transparent;
  color: var(--kp-black);
  border: 0;
  font-size: 0; /* hide text label visually, keep for a11y */
  line-height: 1;
  width: 44px;
  height: 44px;
  justify-content: center;
  border-radius: 999px;
}

#site-navigation .menu-toggle:hover,
#site-navigation .menu-toggle:focus {
  color: var(--kp-yellow);
  outline: 2px solid rgba(227,6,19,0.25);
  outline-offset: 2px;
}

/* Hamburger icon using pseudo element */
#site-navigation .menu-toggle::before {
  content: "";
  display: inline-block;
  width: 22px;
  height: 2px;
  background: currentColor;
  box-shadow: 0 6px 0 currentColor, 0 -6px 0 currentColor;
  border-radius: 2px;
}

/* Hide menu by default on mobile, show when toggled */
#site-navigation .nav-menu { 
  display: none;
  list-style: none;
  margin: 0;
  padding: 0 8px 12px 8px;
}

#site-navigation.toggled .nav-menu { 
  display: block;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 1001;
  background: var(--kp-white);
  padding: 12px 12px 16px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

/* Mobile menu items */
#site-navigation .nav-menu > li > a {
  display: block;
  padding: 10px 12px;
  color: var(--kp-black);
  text-decoration: none;
  border-radius: 6px;
}

#site-navigation .nav-menu > li > a:hover,
#site-navigation .nav-menu > li > a:focus {
  background: var(--kp-red);
  color: var(--kp-white);
}

/* Desktop and larger tablets */
@media (min-width: 768px) {
  /* Taller header and larger logo */
  #page.site { padding-top: 160px; }

  .site-header .site-branding {
    padding: 20px 24px;
  }

  .site-header .custom-logo-link,
  .site-header .custom-logo {
    max-height: 96px; /* desktop logo size */
  }
}

/* Large screens: show horizontal menu, move socials to left, hide hamburger */
@media (min-width: 1024px) {
  #page.site { padding-top: 180px; }
  /* Desktop: 3-column layout: socials | logo | nav */
  #masthead.site-header { grid-template-columns: 1fr auto 1fr; }
  #site-navigation { justify-self: end; }
  #site-navigation .menu-toggle { display: none; }
  #site-navigation .nav-menu {
    display: flex !important;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    padding: 10px 16px 16px;
    position: static; /* reset from absolute */
    box-shadow: none;
  }
  #site-navigation .nav-menu > li { list-style: none; }
  #site-navigation .nav-menu > li > a {
    padding: 10px 14px;
    color: var(--kp-black);
    text-decoration: none;
    border: 2px solid transparent;
    border-radius: 999px; /* pill look */
    transition: all 0.2s ease;
  }
  #site-navigation .nav-menu > li > a:hover,
  #site-navigation .nav-menu > li > a:focus {
    border-color: var(--kp-yellow);
    background: var(--kp-red);
    color: var(--kp-white);
    box-shadow: 0 0 0 2px rgba(227,6,19,0.25);
  }
  .header-socials { justify-self: start; }
}

/* Optional: highlight current menu item */
#site-navigation .current-menu-item > a,
#site-navigation .current_page_item > a {
  color: var(--kp-yellow);
}

/* Socials */
.header-socials { padding: 8px 12px; justify-self: center; order: 1; }
.header-socials .social-list {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 0;
  padding: 0;
}
.header-socials .social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--kp-black);
  border: 1px solid rgba(0,0,0,0.08);
  background: #fff;
  transition: all .2s ease;
}
.header-socials .social-link:hover,
.header-socials .social-link:focus {
  color: var(--kp-white);
  background: var(--kp-red);
  border-color: var(--kp-red);
  box-shadow: 0 0 0 2px rgba(227,6,19,0.15);
}
