/* Shared page header + breadcrumb — matches products list */

body.blog-page,
body.contact-page {
  --rh-ph-primary: var(--primary-color, #80AD01);
  --rh-ph-primary-dark: var(--primary-color-dark, #6d9500);
}

body.blog-page .modern-container,
body.contact-page .modern-container {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 15px;
  padding-right: 15px;
}

body.blog-page .page-content > .modern-container:first-child,
body.contact-page .page-content > .modern-container:first-child {
  margin-top: 140px;
}

body.blog-page .page-header,
body.contact-page .page-header {
  background: linear-gradient(135deg, var(--rh-ph-primary) 0%, var(--rh-ph-primary-dark) 100%);
  margin: 20px 0;
  padding: 40px 24px;
  border-radius: 24px;
  color: #fff;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 14px 36px rgba(var(--primary-color-rgb, 128, 173, 1), 0.28);
}

body.blog-page .page-header::before,
body.contact-page .page-header::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  animation: rh-ph-rotate 20s linear infinite;
  pointer-events: none;
}

@keyframes rh-ph-rotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

body.blog-page .page-title,
body.contact-page .page-title {
  position: relative;
  z-index: 2;
  margin: 0 0 15px;
  font-size: clamp(1.85rem, 4vw, 2.5rem) !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
  color: #fff !important;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3) !important;
}

body.blog-page .page-subtitle,
body.contact-page .page-subtitle {
  position: relative;
  z-index: 2;
  margin: 0 auto;
  max-width: 42rem;
  font-size: clamp(1.05rem, 2.5vw, 1.6rem) !important;
  font-weight: 600 !important;
  line-height: 1.6 !important;
  color: #fff !important;
  opacity: 1 !important;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.35) !important;
  text-align: center;
  animation: rh-ph-fade-in-up 0.8s ease 0.3s both;
}

body.blog-page .page-subtitle::before,
body.contact-page .page-subtitle::before {
  content: '✨';
  margin-left: 8px;
  font-size: 1.25rem;
  color: #fff;
  animation: rh-ph-sparkle 2s ease-in-out infinite;
}

body.blog-page .page-subtitle::after,
body.contact-page .page-subtitle::after {
  content: '✨';
  margin-right: 8px;
  font-size: 1.25rem;
  color: #fff;
  animation: rh-ph-sparkle 2s ease-in-out infinite 0.5s;
}

@keyframes rh-ph-fade-in-up {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes rh-ph-sparkle {
  0%, 100% {
    transform: scale(1) rotate(0deg);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.2) rotate(180deg);
    opacity: 1;
  }
}

/* Breadcrumb */
body.blog-page .breadcrumb-nav,
body.contact-page .breadcrumb-nav {
  background: #fff;
  border-radius: 10px;
  padding: 1rem 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  border: 1px solid #e9ecef;
}

body.blog-page .breadcrumb-list,
body.contact-page .breadcrumb-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  background: none;
  border: none;
  box-shadow: none;
  border-radius: 0;
}

body.blog-page .breadcrumb-link,
body.contact-page .breadcrumb-link {
  color: var(--rh-ph-primary, #61ab00);
  text-decoration: none;
  transition: color 0.3s ease;
  font-size: 17px !important;
  font-weight: 500 !important;
}

body.blog-page .breadcrumb-link:hover,
body.contact-page .breadcrumb-link:hover {
  color: var(--rh-ph-primary-dark, #447800);
  text-decoration: none;
}

body.blog-page .breadcrumb-separator,
body.contact-page .breadcrumb-separator {
  color: #6c757d;
  margin: 0 8px;
  font-weight: 300;
  font-size: 17px !important;
  opacity: 1;
}

body.blog-page .breadcrumb-current,
body.contact-page .breadcrumb-current {
  color: #6c757d;
  font-size: 17px !important;
  font-weight: 500 !important;
}

body.blog-page .breadcrumb-current {
  max-width: min(70vw, 28rem);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Article detail — same banner, no sparkles on excerpt */
body.blog-detail-page .page-header--article {
  text-align: right;
  padding: 2rem 1.5rem 1.75rem;
}

body.blog-detail-page .page-header--article .page-title {
  max-width: none;
  white-space: normal;
  text-wrap: balance;
  text-align: right;
}

body.blog-detail-page .page-header--article .page-subtitle {
  max-width: none;
  text-align: right;
  animation: none;
}

body.blog-detail-page .page-subtitle::before,
body.blog-detail-page .page-subtitle::after {
  content: none !important;
  animation: none !important;
}

@media (max-width: 768px) {
  body.blog-page .page-content > .modern-container:first-child,
  body.contact-page .page-content > .modern-container:first-child {
    margin-top: 120px;
  }

  body.blog-page .modern-container:has(.breadcrumb-nav),
  body.contact-page .modern-container:has(.breadcrumb-nav) {
    margin-top: 10px !important;
  }

  body.blog-page .modern-container:has(.breadcrumb-nav) + .modern-container,
  body.blog-page .modern-container:has(.breadcrumb-nav) + section,
  body.contact-page .modern-container:has(.breadcrumb-nav) + .modern-container,
  body.contact-page .modern-container:has(.breadcrumb-nav) + section {
    margin-top: 0 !important;
  }

  body.blog-page .page-header,
  body.contact-page .page-header {
    margin: 20px 0 0;
    padding: 30px 18px;
  }

  body.blog-page .page-title,
  body.contact-page .page-title {
    font-size: 2rem !important;
  }

  body.blog-page .page-subtitle,
  body.contact-page .page-subtitle {
    font-size: 1.3rem !important;
    font-weight: 500 !important;
  }

  body.blog-page .page-subtitle::before,
  body.blog-page .page-subtitle::after,
  body.contact-page .page-subtitle::before,
  body.contact-page .page-subtitle::after {
    font-size: 1.2rem;
  }

  body.blog-page .breadcrumb-nav,
  body.contact-page .breadcrumb-nav {
    padding: 0.5rem 0.8rem;
    margin-bottom: 1.25rem !important;
  }
}

@media (max-width: 480px) {
  body.blog-page .page-title,
  body.contact-page .page-title {
    font-size: 1.8rem !important;
  }

  body.blog-page .page-subtitle,
  body.contact-page .page-subtitle {
    font-size: 1.2rem !important;
  }

  body.blog-page .page-subtitle::before,
  body.blog-page .page-subtitle::after,
  body.contact-page .page-subtitle::before,
  body.contact-page .page-subtitle::after {
    font-size: 1.1rem;
  }

  body.blog-page .breadcrumb-nav,
  body.contact-page .breadcrumb-nav {
    padding: 0.5rem;
  }

  body.blog-page .breadcrumb-link,
  body.blog-page .breadcrumb-current,
  body.blog-page .breadcrumb-separator,
  body.contact-page .breadcrumb-link,
  body.contact-page .breadcrumb-current,
  body.contact-page .breadcrumb-separator {
    font-size: 15px !important;
  }

  body.blog-page .breadcrumb-separator,
  body.contact-page .breadcrumb-separator {
    margin: 0 5px;
  }
}
