/*
 * Small additions layered on top of the verbatim woodapplez.css, for things
 * it doesn't cover. Always loaded alongside woodapplez.css, never instead
 * of it, and never editing woodapplez.css itself.
 */

/* Article prev/next -- not in the design handoff's components.html, kept
   deliberately minimal and using only its declared tokens. */
.wa-article__pagination {
    max-width: 680px;
    margin: 40px auto 40px;
    padding: 20px 22px;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 16px;
}

/*
 * Pillar section numbering: components.html shows a hand-authored
 * .wa-section__n span beside each h2, for content built block-by-block.
 * Existing pillar pages just have plain <h2> tags typed in the editor, so
 * this approximates the same look with a CSS counter instead of requiring
 * every page to be rewritten in that exact markup.
 */
.wa-pillar__content {
    counter-reset: wa-section;
}

.wa-pillar__content h2 {
    counter-increment: wa-section;
    display: flex;
    align-items: baseline;
    gap: 14px;
}

.wa-pillar__content h2::before {
    content: counter(wa-section, decimal-leading-zero);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: #0d6e6e;
    font-variant-numeric: tabular-nums;
    flex: none;
}

/*
 * Hardening against Astra's own global CSS, which is enqueued on every
 * request (via wp_head()) regardless of which template renders the page --
 * confirmed repeatedly: bare heading/background selectors in woodapplez.css
 * (a plain class, no !important) lose to Astra's Customizer-generated
 * heading/background rules when they carry equal-or-higher specificity or
 * their own !important. This does not touch woodapplez.css itself; it
 * reasserts the SAME values it already declares, just with !important.
 */
.wa-hero {
    background: #000000 !important;
    color: #f5f5f7 !important;
}

.wa-hero h1 {
    color: #ffffff !important;
    font-size: clamp(44px, 7.4vw, 92px) !important;
}

.wa-hero__eyebrow {
    color: #86868b !important;
}

.wa-hero__sub {
    color: #a1a1a6 !important;
}

.wa-hero__links a {
    color: #5ec8c0 !important;
}

.wa-archive h1 {
    font-size: clamp(32px, 4vw, 54px) !important;
    color: #1d1d1f !important;
}

.wa-article h1 {
    font-size: clamp(32px, 4.4vw, 46px) !important;
    color: #1d1d1f !important;
}

.wa-pillar__band h1 {
    color: #ffffff !important;
    font-size: clamp(38px, 5vw, 62px) !important;
}

.wa-section__head h2 {
    color: #1d1d1f !important;
}

.wa-card__title {
    color: #1d1d1f !important;
}

/*
 * Nav: only the active item is teal, everything else is ink at 0.85 opacity.
 * Astra's own nav/menu-item colouring can otherwise apply to this markup too.
 */
.wa-nav a {
    color: #1d1d1f !important;
    opacity: 0.85;
}

.wa-nav a:hover {
    opacity: 1 !important;
}

.wa-nav a[aria-current] {
    color: #0d6e6e !important;
    opacity: 1 !important;
    font-weight: 500 !important;
}

/*
 * Flag pills for the language switcher: the pill colours, radius and
 * hover state come from the site-wide .wa-lang-switch CSS already
 * injected in woodapplez-extra.php (wp_head) -- this just adds the
 * gap between the two flag pills, which that block does not set.
 */
.wa-lang-switch {
    gap: 8px;
}

.wa-logo {
    color: #1d1d1f !important;
}

/*
 * Mobile nav toggle: the header markup (includes/header-footer.php) is now
 * shared by every wa-* template, so this collapsed-menu behaviour needs to
 * apply everywhere that header renders, not just the homepage.
 */
@media (max-width: 760px) {
    .wa-nav {
        display: none;
        position: absolute;
        top: 52px;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
        box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
    }

    .wa-nav.is-open {
        display: flex;
    }

    .wa-nav a {
        width: 100%;
        padding: 14px 22px;
        opacity: 1;
    }

    .wa-nav-toggle {
        display: flex;
    }
}

.wa-nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
}

.wa-nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--wa-ink);
}

/*
 * Shared "Eén e-mail" newsletter section (assets/css/homepage-extra.css
 * has the same core .wa-newsletter* rules, but that file only loads on
 * the front page -- duplicated here so the section is styled on every
 * page, since wa-supplements.css loads site-wide). Kept byte-identical
 * to homepage-extra.css on purpose.
 */
.wa-newsletter {
    background: var(--wa-black);
    color: var(--wa-ground);
    padding: 90px 22px;
    text-align: center;
}

.wa-newsletter__inner {
    max-width: 620px;
    margin: 0 auto;
}

.wa-newsletter__inner h2 {
    margin: 0;
    font-size: clamp(30px, 3.8vw, 48px);
    line-height: 1.08;
    letter-spacing: -0.022em;
    font-weight: 600;
    color: #ffffff;
}

.wa-newsletter__inner p {
    margin: 18px 0 30px;
    font-size: 19px;
    line-height: 1.45;
    color: var(--wa-dim);
}

.wa-newsletter__form {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.wa-newsletter__form input {
    flex: 1 1 260px;
    min-width: 0;
    height: 52px;
    padding: 0 20px;
    font-size: 17px;
    font-family: inherit;
    color: var(--wa-ground);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    outline: none;
}

.wa-newsletter__form input:focus {
    border-color: var(--wa-teal-dark);
    background: rgba(255, 255, 255, 0.12);
}

.wa-newsletter__form button {
    height: 52px;
    padding: 0 30px;
    font-size: 17px;
    font-family: inherit;
    font-weight: 500;
    color: var(--wa-black);
    background: var(--wa-ground);
    border: 0;
    border-radius: 999px;
    cursor: pointer;
}

.wa-newsletter__form button:hover {
    opacity: 0.82;
}

.wa-newsletter__hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.wa-newsletter__msg {
    flex-basis: 100%;
    margin: 14px 0 0;
    font-size: 14px;
    color: var(--wa-dim);
}

.wa-newsletter__msg--ok {
    color: var(--wa-teal-dark);
}

.wa-newsletter__msg--error {
    color: #ff6b6b;
}
