/**
 * Modern Page Headers
 * Nowoczesne style dla nagłówków stron
 * Zaktualizowano: grudzień 2025
 */

/* ===============================================
   HEADER COMMON TEMPLATE - Główny nagłówek strony
   =============================================== */
header.common-template {
  height: 300px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
  overflow: hidden !important;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
}

/* Domyślne tło gdy brak inline style */
header.common-template:not([style*="background-image"]) {
  background: linear-gradient(
    135deg,
    rgba(32, 91, 171, 0.9) 0%,
    rgba(1, 34, 65, 0.95) 50%,
    rgba(0, 20, 40, 0.98) 100%
  ),
  url('../img/entry-header.jpg') !important;
}

/* Subtelny overlay dla lepszego kontrastu tekstu */
header.common-template::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.1) 0%,
    rgba(0, 0, 0, 0.05) 50%,
    rgba(0, 0, 0, 0.2) 100%
  ) !important;
  pointer-events: none !important;
  z-index: 0 !important;
}

/* ===============================================
   ULEPSZONA DEKORACYJNA LINIA NA DOLE
   Prosta elegancka linia bez efektu glow
   =============================================== */
header.common-template::after {
  content: '' !important;
  position: absolute !important;
  bottom: 0 !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: 120px !important;
  height: 4px !important;
  background: linear-gradient(
    90deg, 
    transparent 0%,
    rgba(255, 255, 255, 0.5) 20%,
    #ffffff 50%,
    rgba(255, 255, 255, 0.5) 80%,
    transparent 100%
  ) !important;
  border-radius: 4px !important;
  /* Usunięto box-shadow i animację glow */
}

/* Tytuł w nagłówku */
header.common-template h1.entry-title {
  color: #fff !important;
  font-size: 2.8rem !important;
  font-weight: 700 !important;
  text-align: center !important;
  padding: 1rem 2rem !important;
  margin: 0 !important;
  margin-bottom: 15px !important;
  position: relative !important;
  z-index: 1 !important;
  text-transform: uppercase !important;
  letter-spacing: 4px !important;
  text-shadow: 
    0 2px 4px rgba(0, 0, 0, 0.3),
    0 4px 20px rgba(0, 0, 0, 0.2) !important;
  
  /* Subtelna animacja */
  animation: fadeInUp 0.6s ease-out forwards !important;
}

/* Dekoracyjna linia pod tytułem (wewnętrzna) */
header.common-template h1.entry-title::after {
  content: '' !important;
  display: block !important;
  width: 60px !important;
  height: 3px !important;
  background: linear-gradient(90deg, transparent, #fff, transparent) !important;
  margin: 15px auto 0 !important;
  border-radius: 2px !important;
  opacity: 0.7 !important;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===============================================
   TABLET - 768px - 991px
   =============================================== */
@media screen and (min-width: 768px) and (max-width: 991px) {
  header.common-template {
    height: 240px !important;
  }
  
  header.common-template h1.entry-title {
    font-size: 2.2rem !important;
    letter-spacing: 3px !important;
    margin-bottom: 12px !important;
  }
  
  header.common-template h1.entry-title::after {
    width: 50px !important;
    margin-top: 12px !important;
  }
  
  header.common-template::after {
    width: 100px !important;
    height: 3px !important;
  }
}

/* ===============================================
   MOBILE - do 767px
   =============================================== */
@media screen and (max-width: 767px) {
  header.common-template {
    height: 180px !important;
    margin-top: 0 !important;
  }
  
  header.common-template h1.entry-title {
    font-size: 1.5rem !important;
    letter-spacing: 2px !important;
    padding: 0.75rem 1.5rem !important;
    line-height: 1.3 !important;
    margin-bottom: 10px !important;
  }
  
  header.common-template h1.entry-title::after {
    width: 40px !important;
    height: 2px !important;
    margin-top: 10px !important;
  }
  
  header.common-template::after {
    width: 80px !important;
    height: 3px !important;
    /* Usunięto box-shadow - brak glow na mobile */
  }
}

/* ===============================================
   COMMON PAGE HEADER - Nagłówek w treści strony
   (np. "Venus - partner kreatywnego stylisty")
   =============================================== */
h1.common-page-header {
  font-size: 2.4rem !important;
  font-weight: 700 !important;
  color: #012241 !important;
  text-align: center !important;
  margin: 2.5rem 0 2rem !important;
  padding-bottom: 1.2rem !important;
  position: relative !important;
  line-height: 1.3 !important;
}

/* Ulepszona dekoracyjna linia pod nagłówkiem */
h1.common-page-header::after {
  content: '' !important;
  position: absolute !important;
  bottom: 0 !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: 80px !important;
  height: 4px !important;
  background: linear-gradient(
    90deg,
    transparent 0%,
    #1C5EA8 20%,
    #1C5EA8 80%,
    transparent 100%
  ) !important;
  border-radius: 4px !important;
  box-shadow: 0 2px 8px rgba(28, 94, 168, 0.3) !important;
}

@media screen and (max-width: 767px) {
  h1.common-page-header {
    font-size: 1.6rem !important;
    margin: 1.5rem 0 1.2rem !important;
    padding-bottom: 1rem !important;
  }
  
  h1.common-page-header::after {
    width: 60px !important;
    height: 3px !important;
  }
}

/* ===============================================
   COMMON PAGE SUBHEADER - Podtytuły
   =============================================== */
p.common-page-subheader {
  font-size: 1.3rem !important;
  font-weight: 600 !important;
  color: #1C5EA8 !important;
  margin: 2rem 0 1rem !important;
  position: relative !important;
  padding-left: 20px !important;
}

/* Dekoracyjna linia po lewej */
p.common-page-subheader::before {
  content: '' !important;
  position: absolute !important;
  left: 0 !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 4px !important;
  height: 100% !important;
  min-height: 24px !important;
  background: linear-gradient(180deg, #1C5EA8, #1C5EA8) !important;
  border-radius: 2px !important;
}

@media screen and (max-width: 767px) {
  p.common-page-subheader {
    font-size: 1.1rem !important;
    margin: 1.5rem 0 0.75rem !important;
    padding-left: 15px !important;
  }
  
  p.common-page-subheader::before {
    width: 3px !important;
    min-height: 20px !important;
  }
}

/* ===============================================
   PAGE TEXTAREA - Bloki tekstu
   =============================================== */
.page-textarea {
  margin: 1rem 0 2rem !important;
  line-height: 1.8 !important;
}

.page-textarea p {
  font-size: 1.05rem !important;
  color: #333 !important;
  text-align: justify !important;
  hyphens: auto !important;
}

@media screen and (max-width: 767px) {
  .page-textarea {
    margin: 0.75rem 0 1.5rem !important;
    line-height: 1.7 !important;
  }
  
  .page-textarea p {
    font-size: 1rem !important;
    text-align: left !important;
  }
}

/* ===============================================
   PAGE HEADER dla archiwów (WooCommerce itp.)
   =============================================== */
.page-header {
  text-align: center !important;
  margin-bottom: 2rem !important;
  padding: 1.5rem 0 !important;
}

.page-header .page-title,
.page-header .woocommerce-products-header__title {
  font-size: 2rem !important;
  font-weight: 700 !important;
  color: #012241 !important;
  margin: 0 0 0.5rem !important;
  position: relative !important;
  display: inline-block !important;
}

/* Ulepszona linia pod tytułem */
.page-header .page-title::after,
.page-header .woocommerce-products-header__title::after {
  content: '' !important;
  position: absolute !important;
  bottom: -12px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: 70px !important;
  height: 4px !important;
  background: linear-gradient(
    90deg,
    transparent 0%,
    #1C5EA8 15%,
    #1C5EA8 85%,
    transparent 100%
  ) !important;
  border-radius: 4px !important;
  box-shadow: 0 2px 6px rgba(28, 94, 168, 0.25) !important;
}

.page-header .archive-description,
.page-header .term-description {
  font-size: 1rem !important;
  color: #666 !important;
  max-width: 600px !important;
  margin: 1.5rem auto 0 !important;
  line-height: 1.6 !important;
}

@media screen and (max-width: 767px) {
  .page-header {
    padding: 1rem 0 !important;
    margin-bottom: 1.5rem !important;
  }
  
  .page-header .page-title,
  .page-header .woocommerce-products-header__title {
    font-size: 1.5rem !important;
  }
  
  .page-header .page-title::after,
  .page-header .woocommerce-products-header__title::after {
    width: 50px !important;
    height: 3px !important;
    bottom: -10px !important;
  }
}

/* ===============================================
   WOOCOMMERCE CATEGORY HEADER
   =============================================== */
.woocommerce-products-header {
  text-align: center !important;
  margin-bottom: 2rem !important;
  padding-bottom: 1.2rem !important;
}

.woocommerce-products-header__title.page-title {
  font-size: 2.2rem !important;
  font-weight: 700 !important;
  color: #012241 !important;
  margin-bottom: 0.75rem !important;
  text-transform: capitalize !important;
  position: relative !important;
  display: inline-block !important;
}

/* Ulepszona linia dla WooCommerce */
.woocommerce-products-header__title.page-title::after {
  content: '' !important;
  position: absolute !important;
  bottom: -12px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: 80px !important;
  height: 4px !important;
  background: linear-gradient(
    90deg,
    transparent 0%,
    #1C5EA8 15%,
    #1C5EA8 85%,
    transparent 100%
  ) !important;
  border-radius: 4px !important;
  box-shadow: 0 2px 8px rgba(28, 94, 168, 0.3) !important;
}

@media screen and (max-width: 767px) {
  .woocommerce-products-header {
    margin-bottom: 1.5rem !important;
    padding-bottom: 1rem !important;
  }
  
  .woocommerce-products-header__title.page-title {
    font-size: 1.6rem !important;
  }
  
  .woocommerce-products-header__title.page-title::after {
    width: 60px !important;
    height: 3px !important;
  }
}

/* ===============================================
   ENTRY TITLE na pojedynczych stronach/postach
   =============================================== */
.entry-header:not(.common-template) {
  text-align: center !important;
  margin-bottom: 2rem !important;
  padding: 1.5rem 0 !important;
}

.entry-header:not(.common-template) .entry-title {
  font-size: 2rem !important;
  font-weight: 700 !important;
  color: #012241 !important;
  margin: 0 !important;
  line-height: 1.3 !important;
  position: relative !important;
  display: inline-block !important;
  padding-bottom: 15px !important;
}

/* Linia pod tytułem */
.entry-header:not(.common-template) .entry-title::after {
  content: '' !important;
  position: absolute !important;
  bottom: 0 !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: 70px !important;
  height: 4px !important;
  background: linear-gradient(
    90deg,
    transparent 0%,
    #1C5EA8 15%,
    #1C5EA8 85%,
    transparent 100%
  ) !important;
  border-radius: 4px !important;
  box-shadow: 0 2px 6px rgba(28, 94, 168, 0.25) !important;
}

@media screen and (max-width: 767px) {
  .entry-header:not(.common-template) {
    margin-bottom: 1.5rem !important;
    padding: 1rem 0 !important;
  }
  
  .entry-header:not(.common-template) .entry-title {
    font-size: 1.4rem !important;
    padding-bottom: 12px !important;
  }
  
  .entry-header:not(.common-template) .entry-title::after {
    width: 50px !important;
    height: 3px !important;
  }
}

/* ===============================================
   WHOLESALE HEADER - specjalny styl
   =============================================== */
header.wholesale-header {
  height: 180px !important;
  background: linear-gradient(
    135deg,
    rgba(32, 91, 171, 0.9) 0%,
    rgba(1, 34, 65, 0.95) 100%
  ) !important;
}

@media screen and (max-width: 767px) {
  header.wholesale-header {
    height: 120px !important;
  }
}

/* ===============================================
   404 PAGE HEADER
   =============================================== */
.error-404 .page-header {
  padding: 3rem 0 !important;
}

.error-404 .page-title {
  font-size: 4rem !important;
  color: #1C5EA8 !important;
  margin-bottom: 1rem !important;
}

@media screen and (max-width: 767px) {
  .error-404 .page-header {
    padding: 2rem 0 !important;
  }
  
  .error-404 .page-title {
    font-size: 2.5rem !important;
  }
}

/* ===============================================
   SEARCH RESULTS HEADER
   =============================================== */
.search-results .page-header {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
  padding: 2rem !important;
  border-radius: 8px !important;
  margin-bottom: 2rem !important;
}

.search-results .page-title {
  font-size: 1.5rem !important;
  color: #012241 !important;
}

@media screen and (max-width: 767px) {
  .search-results .page-header {
    padding: 1.5rem 1rem !important;
    border-radius: 6px !important;
  }
  
  .search-results .page-title {
    font-size: 1.2rem !important;
  }
}

/* ===============================================
   PROMO BAR COMPATIBILITY
   =============================================== */
body:has(.promo-navigation) header.common-template {
  margin-top: 0 !important;
}

/* ===============================================
   MENU OFERTA - style dla pozycji w menu głównym
   =============================================== */
.desktop-menu-container .menu-item-oferta a {
  text-decoration: none !important;
  color: #333 !important;
  font-weight: 500 !important;
  transition: color 0.3s ease !important;
}

.desktop-menu-container .menu-item-oferta a:hover,
.desktop-menu-container .menu-item-oferta.current-menu-item a {
  color: #1C5EA8 !important;
}
