/**
 * Nordnatur Com — Research page styles
 *
 * Originally ported from the retired GP child theme's nnt-custom.css
 * (sections 17–21). Phase 5 (2026-05-16) remapped GP-era variable names
 * to the TT5 child theme's preset tokens (`--wp--preset--*`,
 * `--wp--custom--*`, `--wp--style--global--*`).
 *
 * Class names preserve the nnt- prefix so migrated content renders unchanged.
 *
 * Design-system note: hover purple (.nnt-ref-card__link:hover, .nnt-research-disclaimer a:hover)
 * resolves to the brand accent-2 (#B46B91, lighter) rather than the GP-era
 * darker hover (#7a3566). This matches theme.json's element link styles and
 * the rest of the site.
 *
 * @package ncom-core
 */

/* ==========================================================================
   17. Research Page — Filter Bar
   ========================================================================== */

.nnt-research-filter {
    background: var(--wp--preset--color--base);
    padding: 1rem var(--wp--preset--spacing--50);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--wp--custom--border--soft);
    max-width: var(--wp--style--global--wide-size);
    margin: 0 auto 2.5rem;
    border-radius: var(--wp--custom--radius--default);
}

.nnt-research-filter__label {
    font-size: 0.8125rem;
    color: var(--wp--preset--color--contrast-3);
    font-weight: 500;
    margin-right: 0.25rem;
}

.nnt-research-filter__btn {
    font-size: 0.8125rem;
    font-weight: 500;
    padding: 0.35rem 0.875rem;
    border-radius: var(--wp--custom--radius--default);
    border: 1px solid var(--wp--custom--border--muted);
    background: var(--wp--preset--color--base-3);
    color: var(--wp--preset--color--contrast);
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    font-family: inherit;
    line-height: 1.4;
}

.nnt-research-filter__btn:hover {
    background: var(--wp--preset--color--contrast);
    color: var(--wp--preset--color--base-3);
    border-color: var(--wp--preset--color--contrast);
}

.nnt-research-filter__btn--active {
    background: var(--wp--preset--color--contrast);
    color: var(--wp--preset--color--base-3);
    border-color: var(--wp--preset--color--contrast);
}

/* ==========================================================================
   18. Research Page — Topic Block
   ========================================================================== */

.nnt-research-topic {
    margin-bottom: 3rem;
    max-width: var(--wp--style--global--wide-size);
    margin-left: auto;
    margin-right: auto;
    padding: 0 var(--wp--preset--spacing--50);
}

.nnt-research-topic__header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.875rem;
    border-bottom: 1px solid var(--wp--custom--border--soft);
}

.nnt-research-topic__icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: var(--wp--custom--radius--default);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.nnt-research-topic__icon svg {
    width: 1.125rem;
    height: 1.125rem;
}

.nnt-research-topic__title {
    font-size: 1.375rem;
    color: var(--wp--preset--color--contrast);
    margin: 0;
    line-height: 1.2;
}

.nnt-research-topic__count {
    font-size: 0.8125rem;
    color: var(--wp--preset--color--contrast-3);
    margin: 0.125rem 0 0;
}

.nnt-research-topic__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (max-width: 768px) {
    .nnt-research-topic__grid {
        grid-template-columns: 1fr;
    }

    .nnt-research-filter {
        padding: 0.75rem var(--wp--preset--spacing--40);
    }
}

@media (max-width: 480px) {
    .nnt-research-topic {
        padding: 0 var(--wp--preset--spacing--40);
    }

    .nnt-ref-card {
        padding: 1rem;
    }
}

/* ==========================================================================
   19. Research Page — Reference Card
   ========================================================================== */

.nnt-ref-card {
    background: var(--wp--preset--color--base-3);
    border: 1px solid var(--wp--custom--border--soft);
    border-radius: var(--wp--custom--radius--default);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    transition: border-color 0.15s ease;
}

.nnt-ref-card:hover {
    border-color: var(--wp--custom--border--muted);
}

.nnt-ref-card__tags {
    display: flex;
    gap: 0.375rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.nnt-ref-tag {
    font-size: 0.6875rem;
    font-weight: 500;
    padding: 0.125rem 0.5625rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1.6;
}

.nnt-ref-tag--voc          { background: #FAECE7; color: #993C1D; }
.nnt-ref-tag--sleep        { background: #E6F1FB; color: #185FA5; }
.nnt-ref-tag--humidity     { background: #E1F5EE; color: #0F6E56; }
.nnt-ref-tag--mould        { background: #EAF3DE; color: #3B6D11; }
.nnt-ref-tag--materials    { background: #FAEEDA; color: #854F0B; }
.nnt-ref-tag--children     { background: #FBEAF0; color: #993556; }
.nnt-ref-tag--formaldehyde { background: #FAECE7; color: #993C1D; }
.nnt-ref-tag--baubiologie  { background: #EEEDFE; color: #3C3489; }
.nnt-ref-tag--who          { background: #EEEDFE; color: #3C3489; }
.nnt-ref-tag--co2          { background: #E6F1FB; color: #185FA5; }
.nnt-ref-tag--ventilation  { background: #E6F1FB; color: #185FA5; }
.nnt-ref-tag--clay-plaster { background: #FAEEDA; color: #854F0B; }
.nnt-ref-tag--bio-based    { background: #FAEEDA; color: #854F0B; }
.nnt-ref-tag--asthma       { background: #FBEAF0; color: #993556; }
.nnt-ref-tag--mould-prevention { background: #EAF3DE; color: #3B6D11; }

.nnt-ref-card__title {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--wp--preset--color--contrast);
    line-height: 1.4;
    margin: 0 0 0.5rem;
}

.nnt-ref-card__body {
    font-size: 0.875rem;
    color: var(--wp--preset--color--contrast-2);
    line-height: 1.65;
    margin-bottom: 0.875rem;
    flex: 1;
}

.nnt-ref-card__body p:last-child {
    margin-bottom: 0;
}

.nnt-ref-card__highlight {
    background: var(--wp--preset--color--base);
    border-left: 3px solid var(--wp--preset--color--accent);
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.875rem;
    font-size: 0.875rem;
    color: var(--wp--preset--color--contrast);
    line-height: 1.55;
    font-style: italic;
}

.nnt-ref-card__footer {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    border-top: 1px solid var(--wp--custom--border--soft);
    padding-top: 0.75rem;
    margin-top: auto;
}

.nnt-ref-card__citation {
    font-size: 0.8125rem;
    color: var(--wp--preset--color--contrast-2);
    line-height: 1.5;
    margin: 0;
}

.nnt-ref-card__citation strong {
    color: var(--wp--preset--color--contrast);
    font-weight: 500;
}

.nnt-ref-card__link {
    font-size: 0.8125rem;
    color: var(--wp--preset--color--accent);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.25rem;
}

.nnt-ref-card__link:hover {
    color: var(--wp--preset--color--accent-2);
    text-decoration: underline;
}

/* ==========================================================================
   20. Research Page — Baubiologie Banner
   ========================================================================== */

.nnt-baubiologie-banner {
    background: var(--wp--preset--color--contrast);
    border-radius: var(--wp--custom--radius--default);
    padding: 1.75rem;
    margin-bottom: 2.5rem;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 1.75rem;
    align-items: start;
    max-width: var(--wp--style--global--wide-size);
    margin-left: auto;
    margin-right: auto;
}

.nnt-section__content .nnt-baubiologie-banner {
    margin-left: 0;
    margin-right: 0;
}

.nnt-baubiologie-banner__heading {
    font-family: var(--wp--preset--font-family--heading);
    font-size: 1.375rem;
    color: var(--wp--preset--color--base-3);
    line-height: 1.25;
}

.nnt-baubiologie-banner__text {
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.75;
}

.nnt-baubiologie-banner__text p:last-child {
    margin-bottom: 0;
}

.nnt-baubiologie-banner__stats {
    display: flex;
    gap: 1.5rem;
    margin-top: 1.25rem;
    flex-wrap: wrap;
}

.nnt-baubiologie-banner__stat {
    display: flex;
    flex-direction: column;
}

.nnt-baubiologie-banner__num {
    font-family: var(--wp--preset--font-family--heading);
    font-size: 1.75rem;
    color: var(--wp--preset--color--accent);
    line-height: 1.2;
}

.nnt-baubiologie-banner__label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.45);
    margin-top: 0.125rem;
}

@media (max-width: 768px) {
    .nnt-baubiologie-banner {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .nnt-baubiologie-banner__stats {
        gap: 1rem;
    }
}

/* ==========================================================================
   21. Research Page — Disclaimer
   ========================================================================== */

.nnt-research-disclaimer {
    background: var(--wp--preset--color--base);
    border: 1px solid var(--wp--custom--border--soft);
    border-radius: var(--wp--custom--radius--default);
    padding: 1.125rem 1.25rem;
    margin: 3rem auto 0;
    font-size: 0.875rem;
    color: var(--wp--preset--color--contrast-2);
    line-height: 1.65;
    max-width: calc(var(--wp--style--global--wide-size) - var(--wp--preset--spacing--50) * 2);
}

.nnt-research-disclaimer strong {
    color: var(--wp--preset--color--contrast);
}

.nnt-research-disclaimer a {
    color: var(--wp--preset--color--accent);
    text-decoration: none;
}

.nnt-research-disclaimer a:hover {
    text-decoration: underline;
}
