/* GK-RD-1: shared page header (Views/Shared/_PageHeader.cshtml).
   Import per view, before the page CSS. Tokens come from goeksperv2.css. See DESIGN.md.
   Only the task that owns this file changes it. */

[pageheader] {
    width: var(--wfull);
    border-bottom: 1px solid var(--bordergray);
    padding: var(--i30) 0 var(--i20) 0; /* GK-RD-P9b: bottom --i20 (was --i25); the page body adds --i20 below the rule */
}

[pageheaderinner] {
    max-width: 1250px;
    margin: 0 auto;
    padding: 0 var(--i15);
    display: flex;
    flex-direction: column;
    gap: var(--i10);
}

[pageheaderback] {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: var(--i5);
    min-height: 2rem;
    font-size: var(--fs14);
    font-weight: 600;
    color: var(--themedarkblue);
    border-radius: var(--br5);
    transition: color var(--t2s);
}

    [pageheaderback] .material-icons {
        font-size: var(--fs16);
        transition: transform var(--t2s);
    }

@media (hover: hover) {
    [pageheaderback]:hover {
        color: var(--themedarkblue);
        text-decoration: underline;
    }

        [pageheaderback]:hover .material-icons {
            transform: translateX(-3px);
        }
}

[pageheadereyebrow] {
    margin: 0;
    font-size: var(--fs14);
    font-weight: 600;
    color: var(--graydark);
}

[pageheaderrow] {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--i15) var(--i30);
}

[pageheadertext] {
    flex: 1 1 24rem;
    min-width: 0;
}

    [pageheadertext] h1 {
        margin: 0;
        font-size: var(--fs24);
        line-height: 1.25;
        font-weight: 700;
        color: var(--themedarkblue);
        text-wrap: balance;
    }

[pageheaderdesc] {
    margin: var(--i5) 0 0 0;
    max-width: 65ch;
    font-size: var(--fs15);
    line-height: 1.5;
    font-weight: 500;
    color: var(--graydark);
}

/* GK-RD-P9a: the page action looks like uibtn="secondary" (ui-buttons.css): lift on hover, press, 600 weight */
[pageheaderaction] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--i10);
    min-height: 44px; /* px: root font-size shrinks on phones, rem would give < 44 px */
    padding: 0 var(--i20);
    font-size: var(--fs15);
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    color: var(--themedarkblue);
    background: var(--white);
    border: 1px solid var(--themedarkblue);
    border-radius: var(--br30);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transition: background-color var(--t-base) var(--ease-out), color var(--t-base) var(--ease-out), box-shadow var(--t-base) var(--ease-out), transform var(--t-fast) var(--ease-out);
}

    [pageheaderaction] .material-icons {
        font-size: var(--fs16);
        line-height: 1;
    }

@media (hover: hover) {
    [pageheaderaction]:hover {
        background: var(--themedarkblue);
        color: var(--white);
        box-shadow: var(--elev2);
        transform: translateY(-1px);
    }
}

[pageheaderaction]:active {
    transform: translateY(0) scale(.98);
    box-shadow: none;
}

[pageheaderback]:focus-visible,
[pageheaderaction]:focus-visible {
    outline: 2px solid var(--themedarkblue);
    outline-offset: 2px;
}

@media (max-width: 768px) {
    [pageheader] {
        padding: var(--i20) 0 var(--i15) 0;
    }

    [pageheadertext] h1 {
        font-size: var(--fs20);
    }

    [pageheaderaction] {
        width: var(--wfull);
    }

    [pageheaderback] {
        min-height: 44px; /* px: rem shrinks with the phone root font-size */
    }
}

@media (prefers-reduced-motion: reduce) {
    [pageheaderback],
    [pageheaderback] .material-icons {
        transition: none;
    }

    [pageheaderaction] {
        transition: background-color var(--t-base) var(--ease-out), color var(--t-base) var(--ease-out), box-shadow var(--t-base) var(--ease-out);
    }

    [pageheaderaction][pageheaderaction]:hover,
    [pageheaderaction][pageheaderaction]:active {
        transform: none;
    }

        [pageheaderback]:hover .material-icons {
            transform: none;
        }
}
