/* ============================================================
   HEADER.CSS — Sticky nawigacja, mobilne menu, logo, CTA
   ============================================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: rgba(28, 25, 23, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-dark);
  color: var(--text-light);
  height: var(--header-height-mobile);
  transition: box-shadow var(--transition-normal),
    background-color var(--transition-normal);
}

.site-header.scrolled {
  background-color: rgba(28, 25, 23, 0.98);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 100%;
}

/* ---------- Logo ---------- */
.header-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text-light);
}

.logo-img-header {
  height: 62px;
  width: auto;
  display: block;
}

.header-logo .brand-name {
  display: none;
}

.header-logo .brand-sub {
  display: none;
}

/* ---------- CTA Telefon w nagłówku (desktop) ---------- */
.header-cta {
  display: none;
}

.phone-box {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--text-light);
}

.phone-icon-wrapper {
  position: relative;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.phone-svg,
.phone-icon-img-header {
  width: 24px;
  height: 24px;
  position: relative;
  z-index: 2;
  animation: phone-ring 8s infinite ease-in-out;
}

/* Używamy mask-image dla pełnej kontroli koloru w CSS. */
.phone-icon-img-header {
  background-color: var(--accent-gold);
  mask-image: url('../images/phone-receiver.svg');
  -webkit-mask-image: url('../images/phone-receiver.svg');
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
  width: 24px;
  height: 24px;
  position: relative;
  z-index: 2;
  animation: phone-ring 8s infinite ease-in-out;
}


.phone-details {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.phone-number {
  color: var(--accent-gold);
  font-size: 1.1rem;
  font-weight: 700;
  white-space: nowrap;
}

.phone-label {
  color: var(--text-muted-light);
  font-size: 0.72rem;
}

/* ---------- Hamburger mobilny ---------- */
.hamburger-btn {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  position: relative;
  z-index: 1001;
}

.hamburger-btn span {
  width: 24px;
  height: 2px;
  background-color: var(--text-light);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.2s ease;
  transform-origin: center;
}

.hamburger-btn.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger-btn.active span:nth-child(2) {
  opacity: 0;
}
.hamburger-btn.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Mobilne menu nawigacji ---------- */
.main-nav {
  position: fixed;
  top: var(--header-height-mobile);
  left: 0;
  right: 0;
  width: 100%;
  max-height: calc(100vh - var(--header-height-mobile));
  overflow-y: auto;
  background-color: var(--bg-dark);
  padding: var(--space-md) var(--container-pad) calc(var(--space-lg) + env(safe-area-inset-bottom, 0px));
  transform: translateY(-150%);
  visibility: hidden;
  transition: transform 0.35s ease-in-out, visibility 0.35s ease-in-out;
  border-bottom: 1px solid var(--border-dark);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}

.main-nav.active {
  transform: translateY(0);
  visibility: visible;
}

.nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.nav-list li {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.nav-list li:last-child {
  border-bottom: none;
}

.nav-link {
  display: block;
  padding: 1.05rem 0.25rem;
  color: var(--text-light);
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 500;
  transition: color var(--transition-fast), padding-left var(--transition-fast);
}

.nav-link:hover,
.nav-link:focus {
  color: var(--accent-gold);
  padding-left: 0.6rem;
}

.nav-contact-trigger {
  color: var(--accent-gold);
  font-weight: 600;
}

.nav-link.nav-blog-trigger {
  color: #34d399; /* Świeży, świetlisty szmaragd */
  font-weight: 700;
  text-shadow: 0 0 10px rgba(52, 211, 153, 0.25);
}

.nav-link.nav-blog-trigger:hover {
  color: #6ee7b7;
  padding-left: 0;
}

.nav-link.nav-blog-trigger::after {
  background-color: #34d399;
}

/* ---------- Wersja desktopowa ---------- */
@media (min-width: 992px) {
  .site-header {
    height: var(--header-height-desktop);
  }

  .header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    height: 100%;
    /* Opcjonalnie: zwiększenie kontenera dla nagłówka, by menu miało więcej miejsca */
    max-width: 1400px; 
  }

  .hamburger-btn {
    display: none;
  }

  .header-logo {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-shrink: 0; /* Zabezpiecza logo przed zmniejszaniem */
  }

  .header-cta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-shrink: 0; /* Zabezpiecza telefon przed zmniejszaniem */
  }

  .main-nav {
    position: static;
    transform: none;
    visibility: visible;
    background: none;
    padding: 0;
    display: flex;
    justify-content: center;
    flex: 1;
    max-height: none;
    overflow: visible;
    border: none;
    box-shadow: none;
  }

  .nav-list {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
    width: 100%;
  }
  

  .nav-list li {
    border-bottom: none;
  }

  .nav-link {
    padding: 0.35rem 0;
    font-size: 0.9rem;
    position: relative;
    text-align: center; /* Centruje dwulinijkowe teksty */
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
  }

  .nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0;
    height: 2px;
    background-color: var(--accent-gold);
    transition: width var(--transition-normal);
  }

  .nav-link:hover {
    padding-left: 0;
  }

  .nav-link:hover::after {
    width: 100%;
  }


}

