/* 
 * TZQ Modern Header Component
 * Includes: Core Header, Modifiers, Stats, Breadcrumbs, and Responsive Layer.
 */

.tzq-page-header,
.tzq-modern-header {
  position: relative;
  overflow: hidden;
  padding: 1rem;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: #fff;
  border-bottom: 2px solid rgba(255,255,255,0.05);
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  z-index: 10;
  display: flex;
  align-items: center;
}

.tzq-modern-header::before {
    content: '';
    position: absolute;
    top: -50%; left: -10%; width: 40%; height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.03) 0%, transparent 70%);
    transform: rotate(-15deg);
    pointer-events: none;
}

.tzq-modern-header::after {
    content: '';
    position: absolute;
    bottom: -20%; right: -5%; width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 80%);
    border-radius: 50%;
    pointer-events: none;
}

.tzq-modern-header--standard {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%) !important;
}
.tzq-modern-header--info,
.tzq-modern-header--legal {
    background: var(--tzq-primary, #3b82f6) !important;
}
.tzq-modern-header--tests,
.tzq-modern-header--premium{
    background: var(--tzq-primary-darker);
}

.tzq-modern-header--deneme {
    background: linear-gradient(135deg, #4A148C 0%, #0d071a 100%);
}
.tzq-modern-header--etkinlik {
    background: linear-gradient(135deg, #256b60 0%, #1a4d45 100%) !important;
}
.tzq-modern-header--yazili {
    background: #08223e;
}
.tzq-modern-header--pdf {
    background: #68002e;
}

/* Modifier: Blog (Slate/BlueGrey Premium) */
.tzq-modern-header--blog,
.tzq-modern-header--blog-single {
    background: linear-gradient(135deg, #475569 0%, #1e293b 100%) !important;
}

/* Modifier: Contact (Teal Premium) */
.tzq-modern-header--contact {
    background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%) !important;
}

/* Modifier: Home/Portal (Blue Premium) */
.tzq-modern-header--home {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%) !important;
}

/* Modifier: Error (Standard) */
.tzq-modern-header--error {
    background: #f8fafc !important;
    color: #1e293b !important;
    padding: 2rem 0 !important;
    min-height: auto !important;
}
.tzq-modern-header--error .tzq-modern-header__title { color: #1e293b !important; }

.tzq-modern-header__inner {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: var(--tzq-global-gap, 30px);
  width: 100%;
}

@media (min-width: 1025px) {
    .tzq-modern-header__inner--has-sidebar {
        display: grid !important;
        align-items: center;
    }
    
    .tzq-modern-header__inner--sidebar-right {
        grid-template-columns: 1fr var(--tzq-sidebar-width, 340px);
    }
    
    .tzq-modern-header__inner--sidebar-left {
        grid-template-columns: var(--tzq-sidebar-width, 340px) 1fr;
    }
}

.tzq-modern-header__main {
  flex: 1;
}

.tzq-modern-header__eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 0.75rem;
}

.tzq-modern-header__title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 0.5rem;
}

.tzq-modern-header__icon-emoji {
  font-size: 2.2rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tzq-modern-header__title,
.tzq-page-header__title {
  margin: 0;
  font-family: var(--tzq-font-heading);
  font-size: clamp(1.5rem, 2.5vw, 1.6rem);
  font-weight: 600;
  color: #fff;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.tzq-modern-header__subtitle {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.9rem;
  opacity: 0.9;
  font-weight: 400;
  line-height: 1.5;
}

.tzq-modern-header__stats {
  display: flex;
  gap: var(--tzq-spacing-lg);
  background: rgba(255, 255, 255, 0.08);
  padding: 0.75rem 1.25rem;
  border-radius: var(--tzq-spacing-xs);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  width: fit-content;
  margin-left: auto;
}

.tzq-modern-header__stats:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.tzq-modern-header__stats .stat-item {
  display: flex;
  text-align: center;
  position: relative;
  flex-direction: column;
  justify-content: space-evenly;
}

.tzq-modern-header__stats .stat-item:not(:last-child)::after {
  content: '';
  position: absolute;
  right: -1rem;
  top: 15%;
  bottom: 15%;
  width: 1px;
  background: rgba(255, 255, 255, 0.15);
}

.tzq-modern-header__stats .value {
  display: block;
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.tzq-modern-header__stats .label {
  font-size: 0.6rem;
  font-weight: 800;
  text-transform: uppercase;
  opacity: 0.6;
  letter-spacing: 1px;
}

.tzq-modern-header__stats .stat-item--stamp {
  background: none !important;
  box-shadow: none !important;
  border: none !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
}

.tzq-modern-header__stats .stat-item--stamp::after {
  display: none !important;
}

.stamp-seal {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
  padding: 10px 16px;
  border-radius: var(--tzq-spacing-xs);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.stat-item--stamp:hover .stamp-seal {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.stamp-icon {
  width: 24px;
  height: 24px;
  background: #10b981;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
  flex-shrink: 0;
}

.stamp-text {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.stamp-value {
  font-size: 0.75rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
  letter-spacing: 0.02em;
}

.stamp-label {
  font-size: 0.55rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Breadcrumbs Layer */
.tzq-page-header__breadcrumb {
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    opacity: 0.85;
}

.tzq-breadcrumb__list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.75rem;
    font-weight: 600;
}

.tzq-breadcrumb__item {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
}

.tzq-breadcrumb__link {
    display: inline-flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    padding: 2px 4px;
    border-radius: var(--tzq-spacing-xs);
    white-space: nowrap;
}

.tzq-breadcrumb__link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.tzq-breadcrumb__separator {
    opacity: 0.3;
    font-size: 0.7rem;
    margin: 0 2px;
    color: #fff;
    user-select: none;
}

.tzq-breadcrumb__item--current .tzq-breadcrumb__text {
    color: #fff;
    opacity: 1;
    font-weight: 700;
}

/* Hide legacy headers */
.tzq-archive__header,
.tzq-section--page-header,
.tzq-page-header--home {
  display: none !important; 
}

/* Scroll Offset */
.tzo-category-block,
.tzo-list-items > *,
.tzq-section {
  scroll-margin-top: calc(var(--tzo-sticky-nav-height, 52px) + 8px);
}

/* Responsive Overrides */
@media (max-width: 1024px) {
    .tzq-modern-header {
        padding: 1.5rem 0;
    }

    .tzq-page-header__title {
        font-size: 1.7rem !important;
        line-height: 1.2 !important;
    }
}

@media (max-width: 640px) {
  .tzq-modern-header__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }

  .tzq-modern-header__stats {
    display: none;
    width: auto;
    margin-left: 0;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
  }

  .tzq-modern-header__stats .stat-item:not(:last-child)::after {
    display: none;
  }

  .tzq-modern-header__title,
  .tzq-page-header__title {
    font-size: clamp(1.25rem, 5vw, 1.4rem);
  }
}

@media (max-width: 480px) {
  .tzq-page-header__title {
    font-size: clamp(1.5rem, 5vw, 1.7rem);
    letter-spacing: -0.01em;
  }
}
