/* ============ KONSALTA GLOBAL SITE HEADER ============ */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: clamp(16px, 1.8vw, 22px) clamp(24px, 4vw, 56px);
  position: relative;
  z-index: 100;
  width: 100%;
  box-sizing: border-box;
}

.site-header .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  position: static !important;
  transform: none !important;
  padding: 0 !important;
  background: transparent !important;
}

.site-header .logo-dot {
  max-width: 140px;
  height: 44px;
  display: flex;
  align-items: center;
}

.site-header .logo-dot img {
  max-height: 42px;
  width: auto;
  object-fit: contain;
  display: block;
}

.site-header .header-nav {
  display: flex;
  gap: clamp(20px, 2.2vw, 34px);
  align-items: center;
  font-family: "Manrope", sans-serif;
  font-size: 14px;
  font-weight: 600;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-header .header-menu-toggle,
.site-header .mobile-nav-contact,
.site-header .header-nav a.mobile-nav-contact {
  display: none;
}

.site-header .header-nav a {
  color: var(--ink-soft, #4e5e73);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition:
    color 0.25s ease,
    transform 0.2s ease;
  position: relative;
  font-family: "Manrope", sans-serif;
  line-height: 1.2;
  text-align: center;
}

.site-header .header-nav a span {
  display: inline;
}

.site-header .header-nav a:hover,
.site-header .header-nav a.active {
  color: var(--navy, #0b2d53);
}

.site-header .header-nav a.active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 2px;
  background: var(--orange, #f26522);
  border-radius: 2px;
}

.site-header .header-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  font-family: "Manrope", sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--navy, #0b2d53);
  background: var(--white, #ffffff);
  border: 1.5px solid var(--navy, #0b2d53);
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.25s ease;
  box-shadow: 0 3px 0 var(--navy, #0b2d53);
  cursor: pointer;
  white-space: nowrap;
}

.site-header .header-btn:hover {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--navy, #0b2d53);
  color: var(--orange, #f26522);
  border-color: var(--orange, #f26522);
}

.site-header .header-btn:active {
  transform: translateY(3px);
  box-shadow: 0 0 0 var(--navy, #0b2d53);
}

/* ============ RESPONSIVE BREAKPOINTS ============ */
/* Large screens - reduce padding slightly */
@media (max-width: 1200px) {
  .site-header {
    padding: 16px 32px;
  }
}

/* Medium to large tablets and small desktops - stack nav items */
@media screen and (max-width: 1200px) and (min-width: 851px) {
  nav.header-nav {
    gap: clamp(8px, 1vw, 16px) !important;
    font-size: clamp(12px, 1.3vw, 14px) !important;
  }
  
  nav.header-nav a {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0 !important;
    line-height: 1.15 !important;
    padding: 0 !important;
  }
  
  nav.header-nav a span {
    display: block !important;
    white-space: nowrap !important;
  }
  
  nav.header-nav a.active::after {
    display: none !important;
  }
}

/* Smaller tablets - even tighter spacing */
@media screen and (max-width: 950px) and (min-width: 851px) {
  nav.header-nav {
    gap: clamp(6px, 0.9vw, 12px) !important;
    font-size: 12px !important;
  }
  
  .site-header {
    padding: 14px 20px;
  }
}

@media (max-width: 850px) {
  .site-header {
    padding: 14px 20px;
    position: relative;
  }

  .site-header .header-nav {
    display: none;
    position: absolute;
    top: calc(100% - 4px);
    left: 20px;
    right: 20px;
    padding: 8px;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    border: 1px solid rgba(11, 45, 83, 0.12);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 16px 36px rgba(11, 45, 83, 0.16);
    z-index: 1000;
  }

  .site-header .header-nav.is-open,
  .site-header .header-nav.nav-open {
    display: flex !important;
  }

  .site-header .header-nav a {
    padding: 12px 14px;
    font-size: 15px;
    min-height: var(--touch-min, 44px);
    display: flex;
    align-items: center;
    flex-direction: row;
    gap: 4px;
  }
  
  .site-header .header-nav a span {
    display: inline !important;
  }

  .site-header .header-nav a.active::after {
    left: 14px;
    width: 28px;
    bottom: 6px;
  }

  .site-header .header-nav a.mobile-nav-contact {
    display: block;
    border-top: 1px solid var(--line, #e2ddd3);
    color: var(--orange-deep, #d34e0d);
    font-weight: 700;
    margin-top: 4px;
  }

  .site-header .header-menu-toggle {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 10px;
    border: 1px solid var(--navy-tint, #d4e4f7);
    border-radius: 50%;
    background: var(--white, #ffffff);
    color: var(--navy, #0b2d53);
    cursor: pointer;
    transition:
      background 0.2s,
      transform 0.2s;
  }

  .site-header .header-menu-toggle:hover {
    background: var(--navy-soft, #edf4fc);
  }

  .site-header .header-menu-toggle svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
  }

  .site-header .header-menu-toggle:focus-visible,
  .site-header .header-nav a:focus-visible {
    outline: 3px solid rgba(242, 101, 34, 0.6);
    outline-offset: 3px;
  }

  .site-header .header-btn {
    display: none !important;
  }
}

/* ============================================================
   FOLDABLE DEVICE SUPPORT
   ============================================================ */

/* Galaxy Fold / ultra-narrow foldables (closed-fold state) */
@media (max-width: 280px) {
  .site-header {
    padding: 10px 12px;
  }
  .site-header .logo-dot {
    max-width: 100px;
    height: 34px;
  }
  .site-header .logo-dot img {
    max-height: 32px;
  }
  .site-header .header-menu-toggle {
    width: 36px;
    height: 36px;
    padding: 8px;
  }
  .site-header .header-nav {
    left: 8px;
    right: 8px;
    padding: 6px;
  }
  .site-header .header-nav a {
    font-size: 13px;
    padding: 10px 10px;
    min-height: 40px;
  }
}

/* Landscape foldables (phone-like device rotated) */
@media (max-height: 500px) and (orientation: landscape) {
  .site-header {
    padding: 8px 16px;
  }
  .site-header .logo-dot {
    height: 32px;
  }
  .site-header .logo-dot img {
    max-height: 30px;
  }
  .site-header .header-menu-toggle {
    width: 36px;
    height: 36px;
  }
}

/* Dynamic viewport units for notched/foldable screens */
@supports (height: 100dvh) {
  .site-header + * {
    padding-top: env(safe-area-inset-top, 0px);
  }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .site-header .header-btn {
    transition: none;
    transform: none !important;
    box-shadow: none !important;
  }
  .site-header .header-menu-toggle {
    transition: none;
  }
}