/**
 * Veyra Header & Footer System.
 *
 * Header and footer layouts remain native block markup. This stylesheet
 * only supplies reusable structure, responsive states and visual helpers.
 */

.veyra-header {
    position: relative;
    z-index: 20;
    width: 100%;
}

.veyra-header__inner {
    min-height: var(--wp--custom--header--height);
}

.veyra-header__brand {
    flex-shrink: 0;
}

.veyra-header__brand .wp-block-site-logo {
    flex-shrink: 0;
}

.veyra-header__actions {
    flex-shrink: 0;
}

.veyra-header--bordered {
    border-bottom: 1px solid var(--wp--preset--color--border);
}

.veyra-header--shadow {
    box-shadow: var(--wp--preset--shadow--soft);
}

.veyra-header--centered .veyra-header__brand {
    justify-content: center;
}

.veyra-topbar {
    min-height: var(--wp--custom--header--topbar-height);
    font-size: var(--wp--preset--font-size--xs);
}

.veyra-topbar a {
    font-weight: 700;
}

.veyra-header .wp-block-navigation-item__content {
    text-decoration: none;
    text-underline-offset: 0.2em;
}

.veyra-header .wp-block-navigation-item__content:hover,
.veyra-header .current-menu-item > .wp-block-navigation-item__content {
    text-decoration: underline;
    text-decoration-thickness: 0.1em;
}

.wp-block-navigation.is-style-veyra-pill
> .wp-block-navigation__container
> .wp-block-navigation-item
> .wp-block-navigation-item__content {
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
}

.wp-block-navigation.is-style-veyra-pill
> .wp-block-navigation__container
> .wp-block-navigation-item
> .wp-block-navigation-item__content:hover {
    background: var(--wp--preset--color--surface);
    text-decoration: none;
}

.veyra-footer {
    width: 100%;
    margin-top: auto;
}

.veyra-footer__grid {
    display: grid;
    grid-template-columns: repeat(
        auto-fit,
        minmax(min(100%, var(--wp--custom--footer--column-min-width)), 1fr)
    );
    gap: var(--wp--preset--spacing--50);
    align-items: start;
}

.veyra-footer__brand {
    max-width: 24rem;
}

.veyra-footer__legal {
    padding-top: var(--wp--preset--spacing--40);
    border-top: 1px solid var(--wp--preset--color--border);
}

.wp-block-navigation.is-style-veyra-footer {
    align-items: flex-start;
}

.wp-block-navigation.is-style-veyra-footer
.wp-block-navigation__container {
    align-items: flex-start;
    gap: var(--wp--preset--spacing--20);
}

.wp-block-navigation.is-style-veyra-footer
.wp-block-navigation-item__content {
    color: var(--wp--preset--color--muted);
    text-decoration: none;
}

.wp-block-navigation.is-style-veyra-footer
.wp-block-navigation-item__content:hover {
    color: var(--wp--preset--color--contrast);
    text-decoration: underline;
    text-underline-offset: 0.18em;
}

.wp-block-social-links.is-style-veyra-social-outline
.wp-social-link {
    color: var(--wp--preset--color--contrast);
    background: transparent;
    border: 1px solid var(--wp--preset--color--border);
}

.wp-block-social-links.is-style-veyra-social-outline
.wp-social-link:hover {
    color: var(--wp--preset--color--base);
    background: var(--wp--preset--color--primary);
    border-color: var(--wp--preset--color--primary);
    transform: translateY(-2px);
}

.veyra-footer-newsletter {
    padding: clamp(1.5rem, 4vw, 3rem);
    background: var(--wp--preset--color--surface);
    border: 1px solid var(--wp--preset--color--border);
    border-radius: var(--wp--custom--radius--large);
}

@media (max-width: 960px) {
    .veyra-header__actions .veyra-header__secondary-action {
        display: none;
    }

    .veyra-header--centered .veyra-header__inner {
        flex-direction: column;
        justify-content: center;
    }
}

@media (max-width: 782px) {
    .veyra-topbar__inner {
        justify-content: center;
        text-align: center;
    }

    .veyra-topbar__secondary {
        display: none;
    }

    .veyra-header__inner {
        min-height: 4.25rem;
    }

    .veyra-header .wp-block-navigation__responsive-container.is-menu-open {
        padding: var(--wp--preset--spacing--40);
        background: var(--wp--preset--color--base);
        color: var(--wp--preset--color--contrast);
    }

    .veyra-header .wp-block-navigation__responsive-container.is-menu-open
    .wp-block-navigation__responsive-container-content {
        align-items: stretch;
    }

    .veyra-header .wp-block-navigation__responsive-container.is-menu-open
    .wp-block-navigation__container {
        align-items: stretch;
        gap: var(--wp--preset--spacing--20);
    }

    .veyra-header .wp-block-navigation__responsive-container.is-menu-open
    .wp-block-navigation-item__content {
        width: 100%;
        padding-block: 0.6rem;
        font-size: var(--wp--preset--font-size--lg);
    }

    .veyra-footer__legal {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 600px) {
    .veyra-header__actions .wp-block-buttons {
        display: none;
    }

    .veyra-footer__grid {
        grid-template-columns: minmax(0, 1fr);
    }
}
