/**
 * Page Header Styles
 * 
 * Styles for both image-based and solid color headers
 * with breadcrumbs, titles, and subtitles
 */

/* ==========================================================================
   Page Header Base Styles
   ========================================================================== */

.page-header {
    position: relative;
    width: 100vw; /* Full viewport width */
    margin-left: calc(50% - 50vw); /* Center and expand to edges */
    margin-right: calc(50% - 50vw);
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
}

/* Contained variant - reset full width */
.page-header--contained {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Header Overlay for Image Headers */
.page-header__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(0, 0, 0, 0.5) 100%
    );
    z-index: 1;
}

.page-header__content {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 60px 0;
    text-align: center;
}

/* Full-width content wrapper (default) */
.page-header__content-inner {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Contained variant */
.page-header--contained .page-header__content {
    padding: 60px 0;
}

/* ==========================================================================
   Solid Color Header Variant
   ========================================================================== */

.page-header--solid {
    background: var(--color-primary, #1a1a1a);
    background-image: none !important;
    min-height: 300px;
}

.page-header--solid .page-header__overlay {
    display: none;
}

/* ==========================================================================
   Breadcrumbs
   ========================================================================== */

.page-header__breadcrumbs {
    margin-bottom: 20px;
}

.breadcrumbs {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
}

.page-header--solid .breadcrumbs {
    color: rgba(255, 255, 255, 0.7);
}

.breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 8px;
}

.breadcrumb-item {
    display: inline-flex;
    align-items: center;
}

.breadcrumb-item a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-item a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: rgba(255, 255, 255, 0.6);
}

.breadcrumb-separator {
    color: rgba(255, 255, 255, 0.5);
    margin: 0 4px;
}

/* ==========================================================================
   Title Styles
   ========================================================================== */

.page-header__title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.2;
    color: #ffffff;
    margin: 0 0 20px 0;
    text-shadow: 0 3px 8px rgba(0, 0, 0, 0.6), 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* Solid header title - slightly smaller for better SEO hierarchy */
.page-header--solid .page-header__title {
    font-size: clamp(1.75rem, 4.5vw, 3rem);
    text-shadow: none;
}

/* Animation support using Blueprint's Intersection Observer system */
.page-header [data-animate] {
    /* Initial state is set by animations.js */
}

.page-header .bp-animated {
    /* Animated state is handled by animations.js */
}

/* ==========================================================================
   Subtitle Styles
   ========================================================================== */

.page-header__subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    font-weight: 400;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Image header subtitle */
.page-header:not(.page-header--solid) .page-header__subtitle {
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5), 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Solid header subtitle - SEO optimized smaller size */
.page-header--solid .page-header__subtitle {
    font-size: clamp(0.95rem, 1.8vw, 1.125rem);
    color: rgba(255, 255, 255, 0.8);
    margin-top: 15px;
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */

/* Tablet */
@media (max-width: 768px) {
    .page-header {
        min-height: 300px;
    }
    
    .page-header--solid {
        min-height: 250px;
    }
    
    .page-header__content {
        padding: 40px 0;
    }
    
    .breadcrumbs {
        font-size: 0.8125rem;
    }
    
    .page-header__title {
        margin-bottom: 15px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .page-header {
        min-height: 250px;
    }
    
    .page-header--solid {
        min-height: 200px;
    }
    
    .page-header__content {
        padding: 30px 0;
    }
    
    .page-header__breadcrumbs {
        margin-bottom: 15px;
    }
    
    .breadcrumb-list {
        gap: 6px;
    }
    
    .breadcrumbs {
        font-size: 0.75rem;
    }
}

/* ==========================================================================
   Dark Mode Support
   ========================================================================== */

[data-theme="dark"] .page-header--solid {
    background: var(--color-dark-bg, #0a0a0a);
}

[data-theme="dark"] .page-header__overlay {
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.4) 0%,
        rgba(0, 0, 0, 0.6) 100%
    );
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .page-header {
        min-height: auto;
        background-image: none !important;
        background: #ffffff;
        color: #000000;
        padding: 20px 0;
    }
    
    .page-header__overlay {
        display: none;
    }
    
    .page-header__title,
    .page-header__subtitle,
    .breadcrumbs,
    .breadcrumb-item a {
        color: #000000 !important;
        text-shadow: none !important;
    }
}

/* ==========================================================================
   Accessibility Enhancements
   ========================================================================== */

/* Focus styles for breadcrumb links */
.breadcrumb-item a:focus {
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: 2px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .page-header--solid .page-header__title.bp-animate {
        animation: none;
        opacity: 1;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .page-header__title,
    .page-header__subtitle,
    .breadcrumb-item a {
        color: #ffffff;
    }
    
    .breadcrumb-item.active {
        color: rgba(255, 255, 255, 0.8);
    }
}
