/* ===============================================
   Reusable Page Header Component
   Clean, modern header that integrates with ticker
   =============================================== */

.page-header-bar {
    background:
        linear-gradient(180deg,
            var(--rfc-panel-bg-top, rgba(74, 108, 95, 0.60)) 0%,
            var(--rfc-panel-bg-bottom, rgba(47, 77, 64, 0.52)) 100%),
        radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.14), transparent 44%);
    color: var(--rfc-panel-text, #d7f4dc);
    margin-top: 0;
    box-shadow:
        0 12px 32px rgba(0, 0, 0, 0.20),
        inset 0 1px 0 rgba(255, 255, 255, 0.16);
    position: relative;
    border-bottom: 1px solid var(--rfc-panel-border, rgba(44, 142, 62, 0.40));
}

@supports ((backdrop-filter: blur(14px)) or (-webkit-backdrop-filter: blur(14px))) {
    .page-header-bar {
        -webkit-backdrop-filter: blur(14px) saturate(145%);
        backdrop-filter: blur(14px) saturate(145%);
    }
}

.page-header-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 2rem 0 0 0;
}

.page-header-text {
    text-align: left;
}

.page-header-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: var(--rfc-heading-green, #2ecc71);
    letter-spacing: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-shadow: 
        -1px -1px 0 var(--rfc-heading-stroke, #0b3d25),
        1px -1px 0 var(--rfc-heading-stroke, #0b3d25),
        -1px 1px 0 var(--rfc-heading-stroke, #0b3d25),
        1px 1px 0 var(--rfc-heading-stroke, #0b3d25),
        0 2px 8px rgba(0, 0, 0, 0.24);
}

.page-header-title i {
    font-size: 1.75rem;
    opacity: 0.95;
}

.page-header-description {
    font-size: 1rem;
    margin: 0;
    color: var(--rfc-panel-text, #d7f4dc);
    opacity: 0.95;
    font-weight: 400;
    line-height: 1.5;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
}

/* Button Navigation */
.page-header-buttons {
    display: flex;
    gap: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.page-header-buttons::-webkit-scrollbar {
    display: none;
}

.page-header-btn {
    flex: 1;
    min-width: 100px;
    background: linear-gradient(145deg, var(--rfc-button-top, rgba(46, 204, 113, 0.92)), var(--rfc-button-bottom, rgba(8, 123, 62, 0.96)));
    backdrop-filter: blur(10px);
    border: 1px solid var(--rfc-button-border, rgba(255, 255, 255, 0.22));
    color: #ffffff;
    padding: 0.625rem 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 800;
    font-size: 0.8125rem;
    text-align: center;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    border-radius: 999px;
    margin: 0 1px;
    text-shadow:
        -1px -1px 0 rgba(0, 46, 27, 0.82),
        1px 1px 0 rgba(0, 46, 27, 0.82),
        0 2px 8px rgba(0, 0, 0, 0.24);
    box-shadow: var(--rfc-button-shadow, 0 10px 22px rgba(0, 70, 38, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.32));
}

.page-header-btn:hover {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(225, 255, 236, 0.94));
    color: #1a8a49;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow:
        0 13px 28px rgba(0, 70, 38, 0.20),
        inset 0 1px 0 rgba(255, 255, 255, 0.62);
}

.page-header-btn.active {
    background: linear-gradient(145deg, var(--rfc-button-top, rgba(46, 204, 113, 0.92)), var(--rfc-button-bottom, rgba(8, 123, 62, 0.96)));
    color: #ffffff;
    border-bottom-color: rgba(255, 255, 255, 0.22);
    box-shadow: var(--rfc-button-shadow, 0 10px 22px rgba(0, 70, 38, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.32));
}

.page-header-btn i {
    font-size: 1rem;
}

.page-header-badge {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 700;
    min-width: 20px;
    text-align: center;
}

.page-header-btn.active .page-header-badge {
    background: rgba(255, 255, 255, 0.18);
}

/* Responsive Design */
@media (max-width: 992px) {
    .page-header-content {
        gap: 1.25rem;
        padding: 1.5rem 0 0 0;
    }
    
    .page-header-title {
        font-size: 1.75rem;
    }
    
    .page-header-title i {
        font-size: 1.5rem;
    }
    
    .page-header-description {
        font-size: 0.9375rem;
    }
    
    .page-header-btn {
        min-width: 120px;
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
}

@media (max-width: 768px) {
    .page-header-content {
        gap: 1rem;
        padding: 1.25rem 0 0 0;
    }
    
    .page-header-title {
        font-size: 1.5rem;
    }
    
    .page-header-title i {
        font-size: 1.25rem;
    }
    
    .page-header-description {
        font-size: 0.875rem;
    }
    
    .page-header-buttons {
        gap: 0.25rem;
    }
    
    .page-header-btn {
        min-width: 100px;
        padding: 0.75rem 0.75rem;
        font-size: 0.8125rem;
    }
    
    .page-header-btn span {
        display: none;
    }
    
    .page-header-btn i {
        margin: 0;
        font-size: 1.125rem;
    }
}

@media (max-width: 576px) {
    .page-header-title {
        font-size: 1.25rem;
        gap: 0.5rem;
    }
    
    .page-header-btn {
        min-width: 60px;
        padding: 0.625rem 0.5rem;
    }
}

/* Integration with Ticker Bar */
.news-ticker + .page-header-bar {
    margin-top: 0;
    border-top: 2px solid rgba(255, 255, 255, 0.1);
}

/* Dark mode support (future) */
@media (prefers-color-scheme: dark) {
    .page-header-bar {
        background:
            linear-gradient(180deg,
                var(--rfc-panel-bg-top, rgba(74, 108, 95, 0.60)) 0%,
                var(--rfc-panel-bg-bottom, rgba(47, 77, 64, 0.52)) 100%),
            radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.14), transparent 44%);
    }
}
