/* ===== Header (Triga) — compatible with burger-btn.js ===== */

.site-header {
  background-color: var(--color-primary);
  color: var(--color-white);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: padding 0.2s ease, background-color 0.2s ease;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 100px;
  width: auto;
  filter: invert(1);
  transition: height 0.2s ease;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: auto;
}

/* Desktop nav */
.main-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 14px;
}

.main-nav a {
  opacity: 0.9;
  transition: opacity 0.2s ease;
}

.main-nav a:hover {
  opacity: 1;
}

/* Header actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}

.site-header .btn-outline {
  background-color: transparent;
  color: var(--color-white);
  border: 1px solid rgba(255, 255, 255, 0.55);
}

.site-header .btn-outline:hover {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.8);
  color: var(--color-white);
}

/* Burger button (hidden on desktop) */
.burger {
  display: none;
  background: none;
  border: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 40px;
  width: 40px;
  cursor: pointer;
  z-index: 1201;
}

.burger span {
  width: 26px;
  height: 3px;
  background: var(--color-white);
  display: block;
  margin: 4px 0;
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Burger in X */
body.nav-open .burger span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
body.nav-open .burger span:nth-child(2) {
  opacity: 0;
}
body.nav-open .burger span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Compact header state */
.site-header.is-compact .logo img {
  height: 38px;
}

.site-header.is-compact .header-inner {
  padding: 6px 0;
}

/* Overlay for mobile nav */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 1199;
  opacity: 0;
  transition: opacity 0.22s ease;
}

.nav-overlay[hidden] {
  display: none !important;
}

.nav-overlay.is-open {
  opacity: 1;
}

body.nav-open {
  overflow: hidden;
}

/* ===== Quick Contacts ===== */

.contact-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

/* Trigger button */
.contact-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  background: transparent;
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 4px;
  cursor: pointer;
  opacity: 0.95;
  transition: background-color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
  white-space: nowrap;
}

.contact-trigger:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.7);
  opacity: 1;
}

.contact-trigger.icon-only {
  width: 36px;
  height: 36px;
  padding: 8px;
}

.contact-trigger.icon-only svg {
  display: block;
}

/* Tooltip (desktop only) */
@media (min-width: 961px) {
  .contact-trigger.icon-only[data-tooltip] {
    position: relative;
  }
  .contact-trigger.icon-only[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    background: rgba(0,0,0,0.75);
    color: #fff;
    font-size: 12px;
    padding: 6px 8px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(-2px);
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
  }
  .contact-trigger.icon-only:hover::after,
  .contact-trigger.icon-only:focus-visible::after {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Backdrop */
.contact-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.38);
  z-index: 1999;
}

/* Panel (desktop: dropdown) */
.contact-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 320px;
  background: #0f2234;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0 14px 30px rgba(0,0,0,0.35);
  display: none;
  z-index: 2000;
}

.contact-dropdown.is-open .contact-panel {
  display: block;
}

/* Rows */
.contact-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 10px;
  border-radius: 10px;
}

.contact-row + .contact-row {
  border-top: 1px solid rgba(255,255,255,0.10);
}

.contact-top {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.contact-icon {
  display: inline-flex;
  width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
  opacity: 0.95;
}

.contact-icon svg {
  display: block;
  color: var(--color-white);
}

.contact-label {
  font-size: 12px;
  opacity: 0.75;
}

.contact-link {
  color: var(--color-white);
  font-weight: 600;
  opacity: 0.95;
}

.contact-link:hover {
  opacity: 1;
  text-decoration: underline;
}

.contact-actions {
  margin-top: 6px;
  padding: 8px 10px 2px;
}

.contact-more {
  font-size: 12px;
  opacity: 0.85;
}

.contact-more:hover {
  opacity: 1;
  text-decoration: underline;
}

/* Mobile sheet head (hidden on desktop) */
.contact-sheet-head {
  display: none;
}

/* Compact header */
.site-header.is-compact .contact-trigger.icon-only {
  width: 32px;
  height: 32px;
  padding: 6px;
}

/* ===== Responsive mobile nav ===== */
@media (max-width: 960px) {
  .logo img {
    height: 72px;
  }

  .header-right {
    gap: 12px;
  }

  .main-nav {
    position: fixed;
    top: 0;
    right: -260px;
    width: 240px;
    height: 100vh;
    background: var(--color-primary);
    color: var(--color-white);
    flex-direction: column;
    align-items: flex-start;
    padding: 90px 24px 24px;
    gap: 12px;
    font-size: 16px;
    transition: right 0.28s ease-out;
    box-shadow: -2px 0 18px rgba(0,0,0,0.35);
    z-index: 1200;
  }

  .main-nav.is-open {
    right: 0;
  }

  .burger {
    display: flex;
  }

  .site-header .btn-outline {
    padding: 8px 14px;
  }

  /* ===== Bottom-sheet contacts (mobile) ===== */
  .contact-panel {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    width: auto;
    border-radius: 16px 16px 0 0;
    padding: 12px 12px calc(12px + env(safe-area-inset-bottom));
    max-height: 70vh;
    overflow: auto;
    -webkit-overflow-scrolling: touch;

    transform: translateY(102%);
    opacity: 0;
    transition: transform 0.22s ease, opacity 0.22s ease;
  }

  .contact-dropdown.is-open .contact-panel {
    display: block;
    transform: translateY(0);
    opacity: 1;
  }

  .contact-sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 6px 10px;
    position: sticky;
    top: 0;
    background: #0f2234;
    z-index: 1;
    border-bottom: 1px solid rgba(255,255,255,0.10);
    border-radius: 16px 16px 0 0;
  }

  .contact-sheet-title {
    font-weight: 700;
    letter-spacing: 0.2px;
  }

  .contact-close {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.06);
    color: var(--color-white);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    line-height: 1;
  }

  .contact-close:hover {
    background: rgba(255,255,255,0.10);
    border-color: rgba(255,255,255,0.45);
  }
}

@media (max-width: 640px) {
  .logo img {
    height: 56px;
  }

  .header-inner {
    gap: 12px;
  }

  .site-header .btn-outline {
    padding: 6px 10px;
    font-size: 12px;
  }
}

/* Optional: lock body scroll when contacts open (mobile looks better) */
body.contact-open {
  overflow: hidden;
}