/* ==========================================================================
   Thraets — Main Stylesheet
   Based on Figma: https://www.figma.com/design/myjDvXpVAaPjy9Z7gdnv9D/Thraets
   ========================================================================== */

/* --------------------------------------------------------------------------
   Custom Properties (Design Tokens)
-------------------------------------------------------------------------- */
:root {
    --color-ivory:  #EAE8D8;
    --color-red:    #922120;
    --color-red-dk: #CB2A1F;
    --color-red-hover: #7a1a19;
    --color-black:  #412925;
    --color-sand:   #D8D2C1;
    --color-white:  #FFFFFF;
    --color-peach:  #FCE5C3;
    --color-peach-lt: #F6EFE7;
    --color-moss:   #DBDECB;
    --color-gray-dk: #3D3D3D;
    --color-gray-lt: #CCCCCC;
    --color-input-bg: rgba(255, 255, 255, 0.5);

    /* Brand fonts — same files the client uses on thraets.org (self-hosted, see @font-face below) */
    --font-heading: 'TASA Explorer', 'Inter Tight', sans-serif;
    --font-body:    'GT Pressura Mono', 'Courier New', monospace;
    --color-header: #D5D2C4;        /* thraets.org header background */
    --color-heading-gray: #4F4F4F;  /* thraets.org primary text/heading color */

    --page-max:    1920px;
    --content-max: 1244px;
    /* Mobile/tablet: Figma 18px gutters. Desktop ≥1280: scale up to 338px at 1920. */
    --page-pad:    18px;
    --container:   var(--content-max);

    --gap-xs:  4px;
    --gap-sm:  12px;
    --gap-md:  20px;
    --gap-lg:  40px;
    --gap-xl:  80px;

    --radius-card: 0px;
    --transition: 0.2s ease;

    /* Recent Updates: text column ≈80% of inner white box (Figma 240/300, 300/380). */
    --article-recent-content-width: 80%;
    --article-recent-stack-gap: 40px;
    --article-sidebar-stack-gap: 12px;

    /* Ongoing Projects: title → cards (Figma 237:4120 desktop 40px, mobile 20px). */
    --ongoing-projects-stack-gap: 40px;
}

/* --------------------------------------------------------------------------
   Fonts — TASA Explorer (headings) + GT Pressura Mono (body), from thraets.org
-------------------------------------------------------------------------- */
@font-face {
    font-family: 'TASA Explorer';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/tasaexplorer-regular-webfont.woff2') format('woff2'),
         url('../fonts/tasaexplorer-regular-webfont.woff') format('woff');
}
@font-face {
    font-family: 'TASA Explorer';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/tasaexplorer-bold-webfont.woff2') format('woff2'),
         url('../fonts/tasaexplorer-bold-webfont.woff') format('woff');
}
@font-face {
    font-family: 'TASA Explorer';
    font-style: normal;
    font-weight: 900;
    font-display: swap;
    src: url('../fonts/tasaexplorer-black-webfont.woff2') format('woff2'),
         url('../fonts/tasaexplorer-black-webfont.woff') format('woff');
}
@font-face {
    font-family: 'GT Pressura Mono';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/GT-Pressura-Mono-Regular-Regular.woff2') format('woff2'),
         url('../fonts/GT-Pressura-Mono-Regular-Regular.woff') format('woff');
}

/* --------------------------------------------------------------------------
   Reset / Base
-------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    overflow-x: clip; /* clip avoids breaking position:sticky (unlike hidden) */
}

body {
    background-color: var(--color-ivory);
    color: var(--color-black);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: clip;
    max-width: 100%;
    width: 100%;
}

.site-main {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
}

/* overflow-x: clip on .site-main breaks position:sticky for article sidebar */
.site-main.article-page {
    overflow-x: visible;
}

img, svg { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

ul, ol { list-style: none; }

/* --------------------------------------------------------------------------
   Typography
-------------------------------------------------------------------------- */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 900;          /* thraets.org kit: TASA Explorer Black, uppercase */
    text-transform: uppercase;
    letter-spacing: -0.02em;
    line-height: 1;
}

/* --------------------------------------------------------------------------
   Layout Helpers
-------------------------------------------------------------------------- */
.container {
    width: min(var(--content-max), calc(100% - var(--page-pad) * 2));
    margin-inline: auto;
}

/* --------------------------------------------------------------------------
   Header
-------------------------------------------------------------------------- */
.site-header {
    position: relative;
    z-index: 100;
    background: transparent; /* no fill: on the home page the menu sits on the hero texture */
    /* containing block for dropdown + search panel absolute positioning */
    isolation: isolate;
    overflow: visible;
}

.header-inner {
    max-width: var(--page-max);
    margin-inline: auto;
    padding: 14px var(--page-pad);
    display: grid;
    grid-template-columns: 1fr auto 1fr; /* thraets.org: logo | centered menu | actions */
    align-items: center;
    gap: 20px;
    min-height: 72px;
}

.header-logo { justify-self: start; }

.header-logo img,
.header-logo .custom-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

/* Home: header overlays the hero (texture runs underneath the menu) */
.home .site-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
}

/* Desktop: the wrapper dissolves so nav + actions sit in the grid columns */
.header-right {
    display: contents;
}

.header-actions {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 22px;
}

/* Donate button — added to the thraets.org header; burgundy from the dev design */
.btn-donate {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: var(--color-red);
    color: var(--color-white);
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 400;
    line-height: 1;
    padding: 10px 14px;
    min-height: 36px;
    flex-shrink: 0;
    white-space: nowrap;
    transition: background var(--transition);
}
.btn-donate:hover { background: var(--color-red-hover); }
.btn-donate svg { flex-shrink: 0; }

/* Nav links */
.header-nav {
    display: flex;
    align-items: center;
    gap: var(--gap-lg);
}

.header-nav .nav-list {
    display: flex;
    align-items: center;
    gap: var(--gap-lg);
}

.header-nav .nav-list li a,
.header-nav .nav-list > a {
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 400;
    color: var(--color-heading-gray);
    line-height: 1;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 2px 0;
    text-decoration: underline transparent;
    text-underline-offset: 5px;
    text-decoration-thickness: 1px;
    transition: color var(--transition), text-decoration-color var(--transition);
}

/* thraets.org header: current/hover = 1px underline, color stays gray */
.header-nav .nav-list li a.is-current,
.nav-dropdown-toggle.is-current {
    text-decoration-color: currentColor;
}

/* Figma link component — active/current = Red #922120 (dropdown + mobile keep the dev design) */
.dropdown-nav li a.is-current,
.mobile-nav > a.is-current,
.mobile-submenu a.is-current {
    color: var(--color-red);
}

.nav-dropdown-toggle.is-current .dropdown-arrow,
.mobile-dropdown-toggle.is-current .dropdown-arrow {
    color: var(--color-red);
}

@media (hover: hover) {
    .header-nav .nav-list li a:hover,
    .header-nav .nav-list li a:focus-visible,
    .nav-dropdown-toggle:hover,
    .nav-dropdown-toggle:focus-visible {
        color: var(--color-heading-gray);
        text-decoration-color: currentColor;
    }

    .dropdown-nav li a:hover,
    .dropdown-nav li a:focus-visible,
    .mobile-nav > a:hover,
    .mobile-nav > a:focus-visible,
    .mobile-submenu a:hover,
    .mobile-submenu a:focus-visible,
    .mobile-dropdown-toggle:hover,
    .mobile-dropdown-toggle:focus-visible {
        color: var(--color-red);
    }

    .mobile-dropdown-toggle:hover .dropdown-arrow,
    .mobile-dropdown-toggle:focus-visible .dropdown-arrow {
        color: var(--color-red);
    }

    .nav-search-btn:hover,
    .nav-search-btn:focus-visible {
        color: var(--color-red);
    }
}

/* Nav dropdown toggle button (Projects) */
.nav-dropdown-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 400;
    color: var(--color-heading-gray);
    line-height: 1;
    padding: 2px 0;
    text-decoration: underline transparent;
    text-underline-offset: 5px;
    text-decoration-thickness: 1px;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color var(--transition);
    white-space: nowrap;
}

/* Projects open = underlined (thraets.org header style) */
.nav-item-dropdown.open .nav-dropdown-toggle {
    text-decoration-color: currentColor;
}

/* Fix 1: Arrow — stem + bevel arrowhead, same as Figma arrow-down */
.nav-dropdown-toggle .dropdown-arrow {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    transition: transform 0.2s ease, color var(--transition);
    color: currentColor;
}
.nav-item-dropdown.open .nav-dropdown-toggle .dropdown-arrow {
    transform: scaleY(-1);
}

/* Fix 3: Dropdown is positioned from site-header bottom, not from nav-item */
/* .nav-item-dropdown has NO position:relative — .site-header is containing block */
.nav-item-dropdown {
    /* intentionally no position:relative */
}

.nav-dropdown {
    position: absolute;
    top: 100%;
    right: var(--page-pad);
    background: var(--color-ivory);
    padding: 32px 20px 28px;
    width: min(509px, calc(100vw - var(--page-pad) * 2));
    pointer-events: none;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 200;
}

.nav-dropdown::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--color-red);
}

.nav-item-dropdown.open .nav-dropdown {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.dropdown-nav {
    display: flex;
    flex-direction: column;
    gap: 20px;
    list-style: none;
}

.dropdown-nav li a {
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 400;
    color: var(--color-black);
    line-height: 1;
    white-space: nowrap;
    transition: color var(--transition);
    display: block;
}

.nav-search-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    color: var(--color-heading-gray);
    transition: color var(--transition);
}

.site-header.search-open .nav-search-btn,
body.search .nav-search-btn {
    color: var(--color-red);
}

.header-cart {
    position: relative;
    display: flex;
    color: var(--color-heading-gray);
    transition: color var(--transition);
}
.header-cart:hover { color: var(--color-red); }
.header-cart-count {
    position: absolute;
    top: -6px;
    right: -9px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 9px;
    background: var(--color-red);
    color: var(--color-white);
    font-size: 11px;
    line-height: 18px;
    text-align: center;
}

/* --------------------------------------------------------------------------
   Shared input row (footer subscribe + header search)
-------------------------------------------------------------------------- */
.subscribe-input-wrap,
.site-search-form,
.mobile-search {
    display: flex;
    align-items: stretch;
    width: 100%;
    min-height: 44px;
}

.subscribe-input-wrap {
    max-width: 604px;
}

.site-search-form {
    max-width: var(--content-max);
}

.subscribe-email,
.site-search-input {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    background: transparent;
    border: none;
    border-radius: 0;
    outline: none;
    box-sizing: border-box;
    padding: 0;
    font-family: var(--font-body);
    font-size: 18px;
    font-weight: 500;
    line-height: 1;
    color: var(--color-black);
    -webkit-appearance: none;
    appearance: none;
}

.site-search-input::-webkit-search-cancel-button,
.site-search-input::-webkit-search-decoration,
.site-search-input::-webkit-search-results-button,
.site-search-input::-webkit-search-results-decoration {
    -webkit-appearance: none;
    appearance: none;
    display: none;
}

.site-search-input::-ms-clear,
.site-search-input::-ms-reveal {
    display: none;
    width: 0;
    height: 0;
}

.input-field {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    background: var(--color-input-bg);
    border: 1px solid transparent;
    border-right: none;
    border-radius: 0;
    box-sizing: border-box;
    padding: 12px 16px;
    min-height: 44px;
    transition: border-color var(--transition), border-width var(--transition);
}

.subscribe-input-wrap > .input-field {
    flex: 1 1 400px;
    max-width: 400px;
}

.subscribe-input-wrap:hover .input-field:not(:focus-within),
.site-search-form:hover .input-field:not(:focus-within) {
    border-top-color: var(--color-black);
    border-left-color: var(--color-black);
    border-bottom-color: var(--color-black);
}

.input-field:focus-within {
    border-top: 2px solid var(--color-black);
    border-left: 2px solid var(--color-black);
    border-bottom: 2px solid var(--color-black);
    border-right: none;
}

.input-field.has-value:not(:focus-within),
.input-field:has(.subscribe-email:not(:placeholder-shown)):not(:focus-within),
.input-field:has(.site-search-input:not(:placeholder-shown)):not(:focus-within) {
    border-top-color: var(--color-black);
    border-left-color: var(--color-black);
    border-bottom-color: var(--color-black);
}

.input-field .subscribe-email:focus-visible,
.input-field .site-search-input:focus-visible {
    outline: none;
}

.subscribe-email::placeholder,
.site-search-input::placeholder {
    color: var(--color-black);
    opacity: 0.5;
}

.btn-subscribe,
.btn-search {
    flex: 0 0 204px;
    width: 204px;
    background: var(--color-red);
    color: var(--color-white);
    border: none;
    border-radius: 0;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 18px;
    font-weight: 500;
    line-height: 1;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 44px;
    flex-shrink: 0;
    transition: background var(--transition);
}

.btn-subscribe:disabled,
.btn-search:disabled,
.btn-subscribe.is-disabled,
.btn-search.is-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-subscribe svg,
.btn-search svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.btn-subscribe__icon--check {
    display: none;
}

.footer-subscribe-form.is-subscribed .input-field {
    border-top-color: var(--color-black);
    border-left-color: var(--color-black);
    border-bottom-color: var(--color-black);
}

.footer-subscribe-form.is-subscribed .btn-subscribe,
.footer-subscribe-form.is-subscribed .btn-subscribe:disabled {
    opacity: 1;
    cursor: default;
}

.footer-subscribe-form.is-subscribed .btn-subscribe__icon--arrow {
    display: none;
}

.footer-subscribe-form.is-subscribed .btn-subscribe__icon--check {
    display: block;
}

/* Figma Input (117:2625): button stays #922120 in all states; only the field gets a border on hover/focus */

.mobile-search {
    min-height: 40px;
}

.mobile-search .input-field {
    padding: 12px;
}

.mobile-search .site-search-input {
    font-size: 14px;
}

.mobile-search .btn-search {
    flex: 0 0 120px;
    width: 120px;
    font-size: 14px;
    padding: 12px;
    min-height: 40px;
}

.mobile-search .btn-search svg {
    width: 16px;
    height: 16px;
}

/* --------------------------------------------------------------------------
   Desktop Search Panel
-------------------------------------------------------------------------- */
.site-search-panel {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-sand);
    padding: 50px var(--page-pad);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
    z-index: 150;
}

.site-header.search-open .site-search-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.site-search-panel-inner {
    max-width: var(--container);
    margin-inline: auto;
}

/* --------------------------------------------------------------------------
   Search Results Page
-------------------------------------------------------------------------- */
.search-page {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.search-results {
    width: 100%;
    max-width: var(--page-max);
    margin-inline: auto;
    padding-block: 16px 100px;
    box-sizing: border-box;
}

.search-results--empty {
    padding-top: 20px;
}

.search-results-header--empty {
    gap: 12px;
}

.search-results-header--empty .search-results-empty-message {
    max-width: none;
}

.search-results-inner {
    width: min(var(--content-max), calc(100% - var(--page-pad) * 2));
    margin-inline: auto;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.search-results-header {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.search-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 500;
    line-height: 1;
}

.search-breadcrumbs a { transition: color var(--transition); }
.search-breadcrumbs a:hover { color: var(--color-red); }

.search-breadcrumbs .breadcrumb-current {
    color: var(--color-red);
}

.search-results-title {
    font-size: 60px;
    letter-spacing: -0.02em;
    line-height: 1;
    text-transform: lowercase;
}

.search-results-empty-message {
    font-size: 18px;
    line-height: 1.4;
    max-width: 391px;
}

.search-cards-grid {
    width: 100%;
}

.search-results-body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 40px;
    width: 100%;
}

.search-cards-grid .project-card-body {
    padding: 8px;
}

.search-results-form {
    max-width: 100%;
}

.search-input-clear {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    padding: 0;
    border: none;
    background: none;
    color: var(--color-black);
    cursor: pointer;
    transition: color var(--transition);
}

.search-input-clear:hover,
.search-input-clear:focus-visible {
    color: var(--color-red);
}

.search-input-clear:focus-visible {
    outline: 2px solid var(--color-red);
    outline-offset: 2px;
}

.search-input-clear[hidden] {
    display: none;
}

.search-results-form .btn-search:disabled,
.search-results-form .btn-search.is-disabled {
    opacity: 0.5;
}

.search-empty {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
}

.search-empty-image {
    position: relative;
    width: 100%;
    height: 560px;
    overflow: hidden;
}

.search-empty-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-empty-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--color-black);
    color: var(--color-white);
    font-family: var(--font-heading);
    font-size: 36px;
    letter-spacing: -0.72px;
    line-height: 1;
    padding: 8px 16px;
    white-space: nowrap;
    pointer-events: none;
}

@media (max-width: 768px) {
    .site-search-panel {
        padding: 20px var(--page-pad);
    }

    .subscribe-input-wrap,
    .site-search-form,
    .mobile-search {
        max-width: 100%;
        min-height: 40px;
    }

    .subscribe-email,
    .site-search-input {
        font-size: 14px;
    }

    .input-field {
        padding: 12px;
        min-height: 40px;
    }

    .btn-subscribe,
    .btn-search {
        flex: 0 0 120px;
        width: 120px;
        font-size: 14px;
        padding: 12px;
        min-height: 40px;
    }

    .btn-subscribe svg,
    .btn-search svg {
        width: 16px;
        height: 16px;
    }

    .search-results {
        padding-block: 12px 80px;
    }

    .search-results-header {
        gap: 8px;
    }

    .search-cards-grid .project-card-body {
        padding: 4px;
    }

    .search-results--empty {
        padding-top: 12px;
    }

    .search-results-header--empty {
        gap: 8px;
    }

    .search-breadcrumbs {
        font-size: 12px;
        gap: 4px;
        flex-wrap: wrap;
    }

    .search-results-title {
        font-size: 36px;
        letter-spacing: -0.02em;
    }

    .search-results-empty-message {
        font-size: 16px;
        max-width: 100%;
    }

    .search-empty-image {
        height: 146px;
    }

    .search-empty-badge {
        font-size: 24px;
        letter-spacing: -0.48px;
        padding: 6px 12px;
    }
}

/* --------------------------------------------------------------------------
   Mobile Menu Toggle Button (hamburger — shown only on mobile)
-------------------------------------------------------------------------- */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    align-self: center;
    flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   Mobile Menu — full-screen overlay, Sand bg (#D8D2C1) per Figma
-------------------------------------------------------------------------- */
.mobile-menu {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--color-sand);   /* Sand, NOT ivory */
    z-index: 300;
    flex-direction: column;
}
.mobile-menu.open { display: flex; }

/* Menu header: logo 50px + X close icon, px-18 py-20 */
.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 18px;
    flex-shrink: 0;
}

.mobile-menu-logo img,
.mobile-menu-logo .custom-logo {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.mobile-menu-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    color: var(--color-black);
}

/* Menu body: flex-col, justify-between, px-18 py-20, flex-1 */
.mobile-menu-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px 18px;
    overflow-y: auto;
}

.mobile-menu-top {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* Mobile menu search uses shared .mobile-search / .site-search-input / .btn-search */

/* Nav links: gap-24px, no borders per Figma */
.mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.mobile-nav > a {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    color: var(--color-black);
    display: block;
    transition: color var(--transition);
}

/* Mobile Projects dropdown */
.mobile-nav-dropdown {
    display: flex;
    flex-direction: column;
}

.mobile-dropdown-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    color: var(--color-black);
    line-height: 1;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 4px;
    text-align: left;
    transition: color var(--transition);
}

/* Projects = red when open, same as Figma */
.mobile-nav-dropdown.open .mobile-dropdown-toggle {
    color: var(--color-red);
}

.mobile-dropdown-toggle .dropdown-arrow {
    transition: transform 0.2s ease, color var(--transition);
    flex-shrink: 0;
    color: var(--color-black);
}
/* Arrow flips up and turns red when open */
.mobile-nav-dropdown.open .mobile-dropdown-toggle .dropdown-arrow {
    transform: scaleY(-1);
    color: var(--color-red);
}

/* Submenu: red left border + 12px padding, gap-16px, full width — per Figma */
.mobile-submenu {
    display: none;
    flex-direction: column;
    gap: 16px;
    margin-top: 16px;
    padding-left: 12px;
    border-left: 1px solid var(--color-red);
    width: 100%;
}
.mobile-nav-dropdown.open .mobile-submenu { display: flex; }

.mobile-submenu a {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    color: var(--color-black);
    line-height: 1;
    /* text wraps — no white-space: nowrap per Figma */
    word-break: break-word;
    display: block;
    transition: color var(--transition);
}

/* Donate at bottom of menu */
.btn-donate-mobile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--color-red);
    color: var(--color-white);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    padding: 12px;
    width: 100%;
    transition: background var(--transition);
}
.btn-donate-mobile:hover { background: var(--color-red-hover); }

/* --------------------------------------------------------------------------
   Hero Section — ported from the live thraets.org home (Elementor):
   paper texture, TASA Explorer 900 heading, 10px rule, partner logos, collage
-------------------------------------------------------------------------- */
.hero--paper {
    position: relative;
    background: var(--color-sand) url('../images/thraets-org/paper-texture.webp') center / cover no-repeat;
    overflow: hidden;
}

.hero-inner {
    width: min(1140px, calc(100% - var(--page-pad) * 2));
    margin-inline: auto;
    display: grid;
    grid-template-columns: 40% 60%;
    align-items: end;
    padding-top: 112px; /* 72px header overlay + 40px */
    min-width: 0;
}

.hero-text {
    align-self: center;
    padding: 0 0 50px 50px;
    position: relative;
    z-index: 2;
    min-width: 0; /* grid item must not grow to the heading's longest line */
}

.hero-visual { min-width: 0; }

.hero-heading {
    font-family: var(--font-heading);
    font-size: 60px;
    font-weight: 900;
    line-height: 1.02;
    letter-spacing: -3px;
    text-transform: none;
    color: var(--color-heading-gray);
    margin-right: -120px; /* lets the title run over the collage column, as on thraets.org */
}

.hero-rule {
    width: 15%;
    min-width: 60px;
    height: 10px;
    background: var(--color-heading-gray);
    margin: 22px 0 30px;
}

.hero-collab-label {
    font-family: var(--font-body);
    font-size: 20px;
    line-height: 1.2;
    text-transform: uppercase;
    color: var(--color-heading-gray);
    margin: 0 0 20px 40px;
}

.hero-partners {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.hero-partners-row {
    display: flex;
    align-items: center;
    gap: 22px;
}

.hero-partners-row--wrap {
    flex-wrap: wrap;
    justify-content: center;
    gap: 28px 44px;
}

.hero-partner {
    display: block;
    flex-shrink: 0;
    opacity: 0.85;
    transition: opacity var(--transition);
}
.hero-partner:hover { opacity: 1; }

.hero-partner img {
    display: block;
    width: auto;
    height: 44px;
    object-fit: contain;
}
.hero-partner.is-ddi img      { height: 44px; }
.hero-partner.is-gmr img      { height: 40px; }
.hero-partner.is-africa img   { height: 46px; }
.hero-partner.is-cipesa img   { height: 46px; }
.hero-partner.is-tactical img { height: 18px; }
.hero-partner.is-wired img    { height: 20px; }
.hero-partner.is-aiij img     { height: 44px; }
.hero-partner.is-giz img      { height: 34px; }
.hero-partner.is-luminate img { height: 18px; }

.hero-visual {
    align-self: end;
    display: flex;
    justify-content: flex-end;
    padding-right: 20px;
}

.hero-visual img {
    display: block;
    width: 100%;
    height: auto;
}

/* --------------------------------------------------------------------------
   Category Cards Grid
-------------------------------------------------------------------------- */
.category-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--gap-xs);
    padding: 60px var(--page-pad) 100px;
    max-width: var(--page-max);
    margin-inline: auto;
    width: 100%;
}

.category-card {
    position: relative;
    width: 100%;
    min-width: 0;
    aspect-ratio: 620 / 360;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-card.card-wide {
    grid-column: 1 / -1;
    aspect-ratio: 1244 / 700;
}

.card-img {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
}

/* Figma State=Hover (129:1213): solid #922120 fill, ivory label pills */
.card-img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--color-red);
    opacity: 0;
    transition: opacity var(--transition);
    pointer-events: none;
}

@media (hover: hover) {
    .category-card:hover .card-img::after {
        opacity: 1;
    }

    .category-card:hover .card-label-row {
        color: var(--color-red) !important;
        background-color: var(--color-ivory) !important;
    }
}

.category-card:focus-within .card-img::after {
    opacity: 1;
}

.category-card:focus-within .card-label-row {
    color: var(--color-red) !important;
    background-color: var(--color-ivory) !important;
}

.card-label-link {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    text-align: center;
}

/* Figma 368:2137 — labels centered vertically in each card */
.card-label-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: calc(100% - 24px);
}

.card-label-row {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    font-family: var(--font-heading);
    font-size: 30px;
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -0.6px;
    text-transform: uppercase;
    padding: 0 4px;
    text-align: center;
    white-space: nowrap;
}

/* Figma Home — label pill colors per project card */
.card-label-stack--anti-gender-movements .card-label-row {
    color: var(--color-gray-dk);
    background-color: var(--color-peach);
}

.card-label-stack--digital-youth-movements .card-label-row {
    color: var(--color-gray-lt);
    background-color: var(--color-gray-dk);
}

.card-label-stack--mass-surveillance-tech .card-label-row {
    color: var(--color-red-dk);
    background-color: var(--color-peach-lt);
}

.card-label-stack--ai-society .card-label-row {
    color: var(--color-peach-lt);
    background-color: var(--color-red-dk);
}

.card-label-stack--data-politics .card-label-row {
    color: var(--color-black);
    background-color: var(--color-moss);
}

.card-label-stack--open-source-intelligence .card-label-row {
    color: var(--color-red-dk);
    background-color: var(--color-peach);
}

.card-label-stack--foreign-information-manipulation .card-label-row {
    color: var(--color-red);
    background-color: var(--color-peach-lt);
}

/* --------------------------------------------------------------------------
   Inner Pages — Content
-------------------------------------------------------------------------- */
.page-content {
    padding: 60px 0 100px;
}

.single-header {
    margin-bottom: 40px;
}

.single-title {
    font-family: var(--font-heading);
    font-size: 60px;
    letter-spacing: -0.02em;
    color: var(--color-black);
    line-height: 1;
    margin-bottom: 16px;
}

.single-meta {
    font-size: 16px;
    opacity: 0.6;
}

.single-thumbnail {
    margin-bottom: 40px;
    overflow: hidden;
}

.single-thumbnail img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.single-content {
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.4;
    color: var(--color-black);
    max-width: 800px;
}

/* Donate page: GiveWP form centred in the full content width (logo → search) */
.single-content:has(> .give-embed-form-wrapper) { max-width: none; }
.give-embed-form-wrapper { margin-inline: auto; }

.single-content p { margin-bottom: 20px; }
.single-content h2 { font-size: 42px; margin: 40px 0 20px; letter-spacing: -0.84px; }
.single-content h3 { font-size: 36px; margin: 32px 0 16px; letter-spacing: -0.72px; }
.single-content a { text-decoration: underline; }

/* Post Cards (index) */
.post-card {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 40px;
    padding-bottom: 60px;
    margin-bottom: 60px;
    border-bottom: 1px solid rgba(65,41,37,0.2);
}

.post-thumbnail img {
    width: 400px;
    height: 260px;
    object-fit: cover;
}

.post-title {
    font-family: var(--font-heading);
    font-size: 42px;
    letter-spacing: -0.84px;
    line-height: 1;
    margin-bottom: 20px;
}

.post-title a:hover { opacity: 0.75; }

.post-excerpt {
    font-size: 18px;
    line-height: 1.4;
    margin-bottom: 24px;
}

.btn-read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    font-size: 18px;
    color: var(--color-red);
    transition: opacity var(--transition);
}
.btn-read-more:hover { opacity: 0.75; }

/* --------------------------------------------------------------------------
   Footer
-------------------------------------------------------------------------- */
.site-footer {
    background: var(--color-sand);
    color: var(--color-black);
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

.footer-inner {
    max-width: var(--page-max);
    margin-inline: auto;
    padding: var(--gap-xl) var(--page-pad) 20px;
    display: flex;
    flex-direction: column;
    gap: 50px;
}

/* Newsletter */
.footer-subscribe {
    display: flex;
    flex-direction: column;
    gap: var(--gap-lg);
    max-width: 604px;
}

.footer-subscribe-text {
    display: flex;
    flex-direction: column;
    gap: 12px;
    color: var(--color-black);
}

.footer-subscribe-text h2 {
    font-family: var(--font-heading);
    font-size: 42px;
    font-weight: 400;
    line-height: 1;
    letter-spacing: -0.84px;
    color: var(--color-black);
}

.footer-subscribe-title-break {
    display: none;
}

.footer-subscribe-title-line2::before {
    content: ' ';
}

.footer-subscribe-text p {
    font-size: 18px;
    font-weight: 400;
    line-height: 1.4;
    color: var(--color-black);
}

.footer-subscribe-form {
    display: flex;
    flex-direction: column;
    gap: var(--gap-md);
    width: 100%;
    max-width: 604px;
}

.subscribe-input-wrap {
    width: 100%;
}

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

.subscribe-notice {
    font-size: 16px;
    line-height: 1.4;
    padding: 12px 16px;
    max-width: 604px;
}

.subscribe-notice--success {
    background: var(--color-white);
    color: var(--color-black);
}

.subscribe-notice--info {
    background: var(--color-peach-lt);
    color: var(--color-black);
}

.subscribe-notice--error {
    background: #f6e8e8;
    color: var(--color-red);
}

.footer-divider {
    height: 1px;
    background: var(--color-black);
    opacity: 0.2;
    width: 100%;
}

/* Info columns — Figma Footer 57:2483 (desktop) / 147:2313 (360px) */
.footer-info {
    display: flex;
    gap: var(--gap-xs);
    width: 100%;
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.4;
    letter-spacing: -0.32px;
}

.footer-col {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 50px;
}

.footer-section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    max-width: 620px;
    gap: 12px;
}

.footer-section h5 {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 400;
    line-height: 1;
    letter-spacing: -0.48px;
    margin: 0;
    color: var(--color-black);
}

.footer-section p {
    width: 100%;
    max-width: 480px;
    margin: 0;
    font-family: var(--font-body);
    font-size: inherit;
    font-weight: 400;
    line-height: 1.4;
    letter-spacing: inherit;
    color: var(--color-black);
}

.footer-gpg-key {
    white-space: nowrap;
    max-width: 100%;
}

.footer-section p span { font-weight: 400; }
.footer-section a { text-decoration: underline; }
.footer-section a:hover { opacity: 0.75; }

/* Bottom row */
.footer-bottom {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.footer-bottom-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-socials {
    display: flex;
    align-items: center;
    gap: var(--gap-xs);
}

.social-icon,
.article-share-icon {
    width: 40px;
    height: 40px;
    display: block;
    flex-shrink: 0;
    line-height: 0;
}

.social-icon__default,
.social-icon__hover,
.article-share-icon .social-icon__default,
.article-share-icon .social-icon__hover {
    display: block;
    width: 40px;
    height: 40px;
}

.social-icon__hover,
.article-share-icon .social-icon__hover {
    display: none;
}

.social-icon:hover .social-icon__default,
.social-icon:focus-visible .social-icon__default,
.article-share-icon:hover .social-icon__default,
.article-share-icon:focus-visible .social-icon__default {
    display: none;
}

.social-icon:hover .social-icon__hover,
.social-icon:focus-visible .social-icon__hover,
.article-share-icon:hover .social-icon__hover,
.article-share-icon:focus-visible .social-icon__hover {
    display: block;
}

.footer-copyright {
    font-family: var(--font-body);
    font-size: 18px;
    font-weight: 400;
    line-height: 1.4;
    letter-spacing: -0.36px;
    max-width: 620px;
}

/* --------------------------------------------------------------------------
   Responsive — 1280px (fluid desktop gutters + large tablet)
-------------------------------------------------------------------------- */
@media (min-width: 1280px) {
    :root {
        --page-pad: clamp(18px, calc((100vw - var(--content-max)) / 2), 338px);
    }
}

@media (max-width: 1280px) {
    .header-nav,
    .header-nav .nav-list {
        gap: 24px;
    }

    .hero-heading { font-size: 52px; letter-spacing: -2px; margin-right: -60px; }
    .hero-partners-row { gap: 16px; }

    .footer-subscribe { max-width: 100%; }

    .nav-dropdown { right: var(--page-pad); }
}

@media (max-width: 1024px) {
    .header-inner {
        align-items: center;
        padding-block: 16px;
        padding-inline: var(--page-pad);
    }

    .header-logo img,
    .header-logo .custom-logo {
        width: 40px;
        height: 40px;
    }

    .header-right       { display: none; }
    .mobile-menu-toggle { display: flex; }
    .nav-dropdown       { display: none !important; }

    /* Content blocks: side gutters via padding, inner fills available width */
    .project-hero,
    .about-hero,
    .article-page,
    .member-page {
        padding-inline: var(--page-pad);
        box-sizing: border-box;
        width: 100%;
        max-width: 100%;
    }

    .project-hero-inner,
    .about-hero-block,
    .article-layout {
        width: 100%;
        max-width: 100%;
    }

    /* Hero — mobile/tablet layout of the thraets.org hero: stacked, centered */
    .hero-inner {
        grid-template-columns: 1fr;
        width: 100%;
        padding-top: 104px; /* 72px header overlay + 32px */
    }

    .hero-text {
        padding: 0 var(--page-pad) 32px;
        text-align: center;
        max-width: 100%;
    }

    .hero-heading {
        font-size: 40px;
        letter-spacing: -1.2px;
        margin-right: 0;
        overflow-wrap: anywhere;
    }

    /* let the title wrap naturally on narrow screens instead of the desktop line breaks */
    .hero-heading br { display: none; }

    .hero-rule { margin: 20px auto 24px; }

    .hero-collab-label {
        margin: 0 0 16px;
        font-size: 16px;
    }

    .hero-partners { gap: 14px; }

    .hero-partners-row {
        justify-content: center;
        flex-wrap: wrap;
        gap: 14px 18px;
    }

    .hero-partner img { height: 34px; }
    .hero-partner.is-ddi img      { height: 34px; }
    .hero-partner.is-gmr img      { height: 30px; }
    .hero-partner.is-africa img   { height: 34px; }
    .hero-partner.is-cipesa img   { height: 34px; }
    .hero-partner.is-tactical img { height: 14px; }
    .hero-partner.is-wired img    { height: 16px; }
    .hero-partner.is-luminate img { height: 14px; }
    .hero-partner.is-giz img      { height: 26px; }
    .hero-partner.is-aiij img     { height: 34px; }

    .hero-visual {
        padding: 0 var(--page-pad);
        justify-content: center;
    }

    .post-card {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .post-thumbnail img {
        width: 100%;
        height: 280px;
    }
}

@media (max-width: 1024px) {
    /* Footer — Figma 360px (node 147:2209) */
    .footer-inner {
        padding: 40px var(--page-pad) 20px;
        gap: 40px;
    }

    .footer-subscribe             { max-width: 100%; gap: 20px; }
    .footer-subscribe-text        { gap: 8px; }
    .footer-subscribe-text h2     { font-size: 32px; letter-spacing: -0.64px; }
    .footer-subscribe-title-break { display: inline; }
    .footer-subscribe-title-line2::before { content: none; }
    .footer-subscribe-text p      { font-size: 16px; }
    .footer-subscribe-form        { max-width: 100%; }

    .footer-info              { flex-direction: column; gap: 30px; font-size: 12px; line-height: 1.4; letter-spacing: -0.24px; }
    .footer-col               { gap: 30px; }
    .footer-section           { max-width: 100%; gap: 8px; }
    .footer-section h5        { font-size: 18px; letter-spacing: -0.36px; }
    .footer-section p         { max-width: 100%; }
    .footer-gpg-key           { overflow-x: auto; -webkit-overflow-scrolling: touch; }

    .footer-bottom            { gap: 20px; }
    .footer-bottom-row        { flex-direction: column; align-items: flex-start; gap: 30px; }
    .footer-copyright         { font-size: 14px; letter-spacing: -0.28px; width: 100%; }
}

/* --------------------------------------------------------------------------
   Responsive — 768px mobile breakpoint
   All values exact from Figma 360px design.
   The layout fills the full viewport width from 360px to 768px.
-------------------------------------------------------------------------- */
@media (max-width: 768px) {
    /* Prevent any child from pushing the viewport wider */
    html, body { overflow-x: clip; }

    body { font-size: 16px; }

    /* ── All top-level sections: never wider than 100% ── */
    .site-header,
    .site-main,
    .site-footer,
    .hero,
    .category-cards,
    .footer-inner,
    .header-inner,
    .about-hero,
    .about-team,
    .search-results,
    .project-page,
    .article-page,
    .project-hero,
    .ongoing-projects {
        max-width: 100%;
        width: 100%;
    }

    .project-title,
    .article-title,
    .about-title,
    .search-results-title {
        overflow-wrap: anywhere;
    }

    /* ── Header: styles applied at ≤1024px ── */

    /* Hide desktop dropdown on mobile */
    .nav-dropdown { display: none !important; }

    /* ── Category cards — Figma 147:2103 (360px, 324×188 cards) ── */
    .category-cards {
        grid-template-columns: 1fr;
        gap: var(--gap-xs);
        padding: 40px var(--page-pad);
        max-width: 100%;
    }

    .category-card,
    .category-card.card-wide {
        grid-column: auto;
        width: 100%;
        max-width: 100%;
        aspect-ratio: 324 / 188;
    }

    /* XS/H3 — Koulen 24px, tracking -0.48px */
    .card-label-row {
        font-size: 24px;
        letter-spacing: -0.48px;
    }

    /* ── Inner pages ── */
    .post-card         { grid-template-columns: 1fr; }
    .post-thumbnail img { width: 100%; height: 220px; }
    .post-title        { font-size: 32px; }
    .single-title      { font-size: 36px; }
    .page-content      { padding: 40px 0 60px; }
}

/* --------------------------------------------------------------------------
   Project Page
-------------------------------------------------------------------------- */
.project-page {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.project-hero {
    width: 100%;
    display: flex;
    justify-content: center;
    padding-top: 0;
}

.project-hero-inner {
    width: min(var(--content-max), calc(100% - var(--page-pad) * 2));
    background: var(--color-white);
    padding: 16px 16px 120px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.project-hero-head {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.project-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
    font-weight: 500;
    line-height: 1;
}

.project-breadcrumbs a {
    transition: color var(--transition);
}

.project-breadcrumbs a:hover { color: var(--color-red); }

.breadcrumb-current { color: var(--color-red); }

/* Keep breadcrumb links clickable above title/image layers inside hero plaques */
.article-breadcrumbs,
.project-breadcrumbs,
.about-breadcrumbs,
.search-breadcrumbs {
    position: relative;
    z-index: 3;
}

.article-breadcrumbs a,
.project-breadcrumbs a,
.about-breadcrumbs a,
.search-breadcrumbs a {
    position: relative;
    z-index: 1;
    pointer-events: auto;
}

.article-meta,
.project-hero-head,
.about-hero-head,
.search-results-header {
    position: relative;
    z-index: 2;
    flex-shrink: 0;
}

.article-meta .article-title,
.project-hero-head .project-title,
.about-hero-head .about-title,
.search-results-header .search-results-title {
    position: relative;
    z-index: 1;
}

.article-hero-block,
.project-hero-inner,
.about-hero-inner {
    isolation: isolate;
}

.article-hero-image,
.project-hero-image,
.about-hero-image {
    position: relative;
    z-index: 1;
}

.project-title {
    font-size: 60px;
    letter-spacing: -0.02em;
    line-height: 1;
    max-width: 100%;
}

.project-hero-image {
    width: 100%;
    aspect-ratio: 620 / 360;
    overflow: hidden;
}

.project-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-intro {
    display: flex;
    gap: 60px;
    max-width: 970px;
}

.project-intro-col {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.project-intro-heading {
    font-size: 32px;
    letter-spacing: -0.64px;
    line-height: 1;
}

.project-intro-text {
    font-size: 18px;
    line-height: 1.4;
}

.project-intro-text p + p { margin-top: 16px; }

.ongoing-projects {
    width: 100%;
    max-width: var(--page-max);
    margin-inline: auto;
    padding: 100px var(--page-pad);
    box-sizing: border-box;
}

.ongoing-projects-inner {
    width: 100%;
    max-width: var(--content-max);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--ongoing-projects-stack-gap);
}

.ongoing-projects-body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--ongoing-projects-stack-gap);
    width: 100%;
}

.ongoing-projects-title {
    font-size: 42px;
    letter-spacing: -0.84px;
    line-height: 1;
    margin: 0;
}

.project-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px 12px;
}

.project-card {
    width: 100%;
    min-width: 0;
    min-height: 646px;
    background: var(--color-white);
    padding: 4px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

a.project-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    border: 1px solid transparent;
    transition: color var(--transition), border-color var(--transition);
}

a.project-card:focus-visible {
    outline: 2px solid var(--color-red);
    outline-offset: 2px;
}

.project-card-image {
    width: 100%;
    flex-shrink: 0;
    aspect-ratio: 294 / 450;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

/* Figma card 129:1251 — white frame = 4px padding; hover = 1px red border on card */
@media (hover: hover) and (min-width: 1025px) {
    a.project-card:hover,
    a.project-card:focus-visible {
        border-color: var(--color-red);
    }

    a.project-card:hover .project-card-title,
    a.project-card:hover .project-card-link,
    a.project-card:focus-visible .project-card-title,
    a.project-card:focus-visible .project-card-link {
        color: var(--color-red);
    }
}

.project-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 30px;
    padding: 4px;
    min-width: 0;
}

.project-card-text {
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: var(--color-black);
}

.project-card-title {
    font-family: var(--font-heading);
    font-size: 24px;
    letter-spacing: -0.48px;
    line-height: 1;
    transition: color var(--transition);
}

.project-card-subtitle {
    font-size: 16px;
    line-height: 1.4;
    letter-spacing: -0.32px;
}

.project-card-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
    font-weight: 500;
    line-height: 1;
    width: fit-content;
    transition: color var(--transition);
}


.project-pagination {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
}

.pagination-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-sizing: border-box;
    width: 40px;
    height: 40px;
    padding: 12px 4px;
    border: 1px solid var(--color-black);
    background: transparent;
    color: var(--color-black);
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 500;
    line-height: 1;
    text-align: center;
    transition: background var(--transition), color var(--transition), border-color var(--transition), opacity var(--transition);
}

.pagination-item:hover:not(.is-active):not(.is-disabled):not(.pagination-ellipsis) {
    background: rgba(65, 41, 37, 0.06);
}

.pagination-item.is-active {
    background: var(--color-red);
    border-color: var(--color-red);
    color: var(--color-white);
    pointer-events: none;
}

.pagination-item.is-disabled {
    opacity: 0.4;
    pointer-events: none;
}

.pagination-arrow img,
.pagination-arrow svg {
    width: 16px;
    height: 16px;
    display: block;
    flex-shrink: 0;
    transform: rotate(180deg);
}

.pagination-arrow-next img,
.pagination-arrow-next svg { transform: rotate(0deg); }

.pagination-ellipsis {
    border: none;
    background: transparent;
    pointer-events: none;
}

@media (max-width: 1280px) {
    .project-cards-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
    .project-intro { flex-direction: column; max-width: 100%; }
    .project-cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .project-card { min-height: auto; }
}

@media (max-width: 768px) {
    .project-hero-inner {
        width: 100%;
        padding: 12px 12px 80px;
        gap: 24px;
    }

    .project-breadcrumbs { font-size: 12px; gap: 8px; }
    .breadcrumb-sep { font-size: 12px; }

    .project-title {
        font-size: 36px;
        letter-spacing: -0.02em;
    }

    .project-hero-image { aspect-ratio: 300 / 175; }

    .project-intro { gap: 30px; }

    .project-intro-heading {
        font-size: 20px;
        letter-spacing: -0.4px;
    }

    .project-intro-text { font-size: 16px; }

    .ongoing-projects { padding: 80px 18px; }

    :root {
        --ongoing-projects-stack-gap: 20px;
    }

    .ongoing-projects-title {
        font-size: 32px;
        letter-spacing: -0.64px;
    }

    .search-results-inner {
        gap: 20px;
    }

    .search-results-body {
        gap: 20px;
    }

    .project-cards-grid {
        gap: 12px 4px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .project-card { min-height: auto; }

    .project-card-image {
        aspect-ratio: 152 / 230;
    }

    .project-card-title { font-size: 18px; }

    .project-card-subtitle { font-size: 16px; }

    .project-card-link { font-size: 12px; }

    .project-pagination {
        flex-wrap: wrap;
        max-width: 100%;
    }

    .pagination-item {
        width: 36px;
        height: 36px;
        font-size: 12px;
    }

    .pagination-arrow img,
    .pagination-arrow svg {
        width: 14px;
        height: 14px;
    }
}

/* --------------------------------------------------------------------------
   About Page
-------------------------------------------------------------------------- */
.about-page {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.about-hero {
    width: 100%;
    display: flex;
    justify-content: center;
}

.about-hero-block {
    width: min(var(--content-max), calc(100% - var(--page-pad) * 2));
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.about-hero-inner {
    background: var(--color-white);
    padding: 16px 16px 120px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.about-hero-head {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.about-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 500;
    line-height: 1;
}

.about-breadcrumbs a { transition: color var(--transition); }
.about-breadcrumbs a:hover { color: var(--color-red); }
.about-breadcrumbs .breadcrumb-current { color: var(--color-red); }

.about-title {
    font-size: 60px;
    letter-spacing: -0.02em;
    line-height: 1;
}

.about-hero-image {
    width: 100%;
    aspect-ratio: 1940 / 806;
    overflow: hidden;
}

.about-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-intro {
    max-width: 970px;
    font-size: 18px;
    line-height: 1.4;
    display: flex;
    flex-direction: column;
}

.about-intro p + p {
    margin-top: 16px;
}

.about-pillars {
    display: flex;
    gap: 4px;
    width: 100%;
}

.about-pillar {
    flex: 1;
    min-width: 0;
    background: var(--color-white);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 60px;
    min-height: auto;
}

.about-pillar:nth-child(2) .about-pillar-text {
    max-width: 290px;
}

.about-pillar-title {
    font-size: 32px;
    letter-spacing: -0.64px;
    line-height: 1;
}

.about-pillar-text {
    font-size: 18px;
    line-height: 1.4;
    max-width: 340px;
}

.about-team {
    width: 100%;
    padding: 100px var(--page-pad);
}

.about-team-inner {
    max-width: var(--container);
    margin-inline: auto;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.about-team-title {
    font-size: 42px;
    letter-spacing: -0.84px;
    line-height: 1;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px 4px;
}

.team-card {
    width: 100%;
    min-width: 0;
    height: 100%;
    background: var(--color-white);
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

button.team-card {
    border: none;
    text-align: left;
    cursor: pointer;
    font: inherit;
    color: inherit;
    appearance: none;
    -webkit-appearance: none;
}

button.team-card.team-card--trigger:hover .team-card-name,
button.team-card.team-card--trigger:hover .team-card-link {
    color: var(--color-red);
}

button.team-card.team-card--trigger:focus-visible {
    outline: 2px solid var(--color-red);
    outline-offset: 2px;
}

.team-card-image {
    height: 450px;
    overflow: hidden;
}

.team-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-card-body {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 4px;
    flex: 1;
    min-height: 0;
}

.team-card-text {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.team-card-name {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 24px;
    letter-spacing: -0.48px;
    line-height: 1;
}

.team-card-role {
    font-size: 16px;
    line-height: 1.4;
    letter-spacing: -0.32px;
}

.team-card-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
    font-weight: 500;
    line-height: 1;
    width: fit-content;
    transition: color var(--transition);
}

@media (min-width: 769px) {
    .team-card {
        min-height: 592px;
    }
}

.member-hero-image {
    aspect-ratio: 4 / 5;
}

@media (max-width: 768px) {
    .member-hero-image {
        aspect-ratio: 300 / 375;
    }
}

@media (max-width: 1280px) {
    .team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .about-pillar-text { max-width: 100%; }
    .about-pillar:nth-child(2) .about-pillar-text { max-width: 100%; }
}

@media (max-width: 768px) {
    /* Figma 360px About (node 237:3258) */
    .about-hero {
        padding-inline: 18px;
        box-sizing: border-box;
    }

    .about-hero-block {
        width: 100%;
        max-width: 100%;
    }

    .about-hero-inner {
        padding: 12px 12px 80px;
        gap: 20px;
    }

    .about-hero-head {
        gap: 8px;
    }

    .about-breadcrumbs {
        font-size: 12px;
        gap: 4px;
        flex-wrap: wrap;
    }

    .about-title {
        font-size: 36px;
        letter-spacing: -0.02em;
        max-width: 100%;
    }

    .about-hero-image {
        aspect-ratio: auto;
        height: 125px;
    }

    .about-intro {
        font-size: 16px;
        max-width: 100%;
    }

    .about-intro p + p {
        margin-top: 12px;
    }

    .about-pillars {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 4px;
        width: 100%;
    }

    .about-pillar:nth-child(3) {
        grid-column: 1 / -1;
    }

    .about-pillar {
        gap: 40px;
        padding: 12px;
        /* When pillars reflow into a grid (3rd goes below),
           let cards shrink to content to avoid empty bottom space. */
        min-height: auto;
        min-width: 0;
    }

    .about-pillar-title {
        font-size: 20px;
        letter-spacing: -0.4px;
    }

    .about-pillar-text {
        font-size: 16px;
        max-width: 100%;
    }

    .about-team {
        padding: 80px 18px;
    }

    .about-team-inner {
        gap: 20px;
    }

    .about-team-title {
        font-size: 32px;
        letter-spacing: -0.64px;
    }

    .team-grid {
        gap: 12px 4px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .team-card {
        padding: 4px;
        gap: 4px;
        min-height: 292px;
    }

    .team-card-image {
        height: 170px;
    }

    .team-card-body {
        padding: 4px;
        flex: 1;
        min-height: 0;
    }

    .team-card-name {
        font-size: 18px;
        letter-spacing: -0.36px;
    }

    .team-card-role {
        font-size: 16px;
        letter-spacing: -0.32px;
    }

    .team-card-link {
        font-size: 12px;
        gap: 8px;
    }
}

/* --------------------------------------------------------------------------
   Team Member Modal (Figma 298:2519 overlay, 298:2507 desktop, 298:2688 mobile)
-------------------------------------------------------------------------- */
.team-modal {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    box-sizing: border-box;
}

.team-modal[hidden] {
    display: none;
}

.team-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.2);
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
}

.team-modal-dialog {
    position: relative;
    width: min(820px, 100%);
    max-height: calc(100vh - 36px);
    overflow-y: auto;
    background: var(--color-white);
    box-sizing: border-box;
}

.team-modal-panel {
    display: flex;
    flex-direction: column;
    gap: 60px;
    padding: 16px 16px 120px;
}

.team-modal-header {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.team-modal-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
}

.team-modal-photo {
    width: 140px;
    height: 159px;
    flex-shrink: 0;
    overflow: hidden;
}

.team-modal-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-modal-close {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-black);
}

.team-modal-close:focus-visible {
    outline: 2px solid var(--color-red);
    outline-offset: 2px;
}

.team-modal-meta {
    display: flex;
    flex-direction: column;
    gap: 12px;
    color: var(--color-black);
    width: 100%;
}

.team-modal-name {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 42px;
    letter-spacing: -0.84px;
    line-height: 1;
}

.team-modal-role {
    margin: 0;
    font-size: 16px;
    line-height: 1.4;
    letter-spacing: -0.32px;
}

.team-modal-bio {
    font-size: 18px;
    line-height: 1.4;
    color: var(--color-black);
    max-width: 609px;
}

.team-modal-bio p + p {
    margin-top: 16px;
}

@media (max-width: 768px) {
    .team-modal {
        align-items: flex-start;
        padding: 18px;
    }

    .team-modal-dialog {
        max-height: calc(100vh - 36px);
        margin-top: 50px;
    }

    .team-modal-panel {
        gap: 40px;
        padding: 12px 12px 80px;
    }

    .team-modal-photo {
        width: 100px;
        height: 113px;
    }

    .team-modal-meta {
        gap: 8px;
    }

    .team-modal-name {
        font-size: 32px;
        letter-spacing: -0.64px;
    }

    .team-modal-role {
        font-size: 12px;
        letter-spacing: -0.24px;
    }

    .team-modal-bio {
        font-size: 16px;
        max-width: 100%;
    }

    .team-modal-bio p + p {
        margin-top: 12px;
    }
}

/* --------------------------------------------------------------------------
   Article Page (single investigation)
-------------------------------------------------------------------------- */
.article-page {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.article-layout {
    width: min(var(--content-max), calc(100% - var(--page-pad) * 2));
    margin-inline: auto;
    padding-bottom: 100px;
    display: grid;
    grid-template-columns: minmax(0, 820px) minmax(0, 412px);
    column-gap: 12px;
    row-gap: 80px;
    align-items: start;
}

.article-hero-block {
    grid-column: 1;
    grid-row: 1;
    background: var(--color-white);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.article-meta {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.article-breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    font-size: 16px;
    font-weight: 500;
    line-height: 1;
}

.article-breadcrumbs a { transition: color var(--transition); }
.article-breadcrumbs a:hover { color: var(--color-red); }

.article-breadcrumbs .breadcrumb-current { color: var(--color-red); }

.article-title {
    font-size: 60px;
    letter-spacing: -0.02em;
    line-height: 1;
    max-width: 100%;
    word-break: break-word;
}

.article-byline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    font-size: 16px;
    line-height: 1.4;
    letter-spacing: -0.32px;
}

.article-byline-sep { opacity: 0.6; }

.article-hero-image {
    width: 100%;
    aspect-ratio: 788 / 1190;
    overflow: hidden;
}

.article-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-sidebar-rail {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    max-width: 412px;
    align-self: start;
    position: relative;
    overflow: clip;
}

.article-sidebar {
    min-width: 0;
    max-width: 412px;
    display: flex;
    flex-direction: column;
    gap: var(--article-sidebar-stack-gap);
    position: sticky;
    top: var(--article-sidebar-sticky-top, 24px);
}

.article-share {
    display: flex;
    gap: 4px;
    align-items: center;
}

.article-recent {
    background: var(--color-white);
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: var(--article-recent-stack-gap);
    width: 100%;
    max-width: 412px;
    align-self: flex-start;
    box-sizing: border-box;
}

.article-recent-title {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 32px;
    letter-spacing: -0.64px;
    line-height: 1;
    color: var(--color-black);
    width: 100%;
}

.article-recent-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    margin: 0;
}

.article-recent-card {
    width: 100%;
}

.article-recent-divider {
    height: 1px;
    background: var(--color-sand);
    width: 100%;
}

.article-recent-card-link {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: var(--article-recent-content-width);
    max-width: 100%;
    color: var(--color-black);
    transition: color var(--transition);
}

.article-recent-card-link:hover { color: var(--color-red); }

.article-recent-card-link:hover .article-recent-card-title,
.article-recent-card-link:hover .article-recent-card-excerpt,
.article-recent-card-link:hover .article-recent-card-date {
    color: inherit;
}

.article-recent-card-text {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.article-recent-card-title {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 24px;
    letter-spacing: -0.48px;
    line-height: 1;
    color: var(--color-black);
}

.article-recent-card-excerpt {
    font-size: 16px;
    line-height: 1.4;
    letter-spacing: -0.32px;
    color: var(--color-black);
}

.article-recent-card-date {
    font-size: 16px;
    line-height: 1.4;
    letter-spacing: -0.32px;
    color: var(--color-black);
    width: 100%;
}

.article-body {
    grid-column: 1;
    grid-row: 2;
    width: 100%;
    max-width: 820px;
}

.article-body-inner {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.article-lead-headline {
    font-family: var(--font-heading);
    font-size: 42px;
    letter-spacing: -0.84px;
    line-height: 1;
    color: var(--color-black);
    max-width: 100%;
}

.article-content {
    font-size: 18px;
    line-height: 1.4;
    color: var(--color-black);
}

.article-content p + p { margin-top: 16px; }

.article-content h2,
.article-content h3 {
    font-family: var(--font-heading);
    line-height: 1;
    margin-top: 30px;
    margin-bottom: 20px;
}

.article-content h2 {
    font-size: 32px;
    letter-spacing: -0.64px;
}

.article-content h3 {
    font-size: 24px;
    letter-spacing: -0.48px;
}

.article-content a { text-decoration: underline; }

.article-content img {
    width: 100%;
    height: auto;
    display: block;
}

.article-content figure {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 30px 0;
}

.article-content figcaption {
    font-size: 16px;
    line-height: 1.4;
    letter-spacing: -0.32px;
}

@media (max-width: 1280px) {
    .article-layout {
        grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
    }
}

@media (max-width: 1024px) {
    .article-layout {
        grid-template-columns: 1fr;
        row-gap: 40px;
    }

    .article-hero-block {
        grid-column: 1;
        grid-row: 1;
    }

    .article-body {
        grid-column: 1;
        grid-row: 2;
        max-width: 100%;
    }

    .article-sidebar-rail {
        grid-column: 1;
        grid-row: 3;
        margin-top: 0 !important;
        height: auto !important;
        width: 100%;
        max-width: 100%;
    }

    .article-sidebar {
        position: static;
        width: 100%;
        max-width: 100%;
    }

    .article-recent {
        max-width: none;
        width: 100%;
        align-self: stretch;
    }
}

@media (max-width: 768px) {
    :root {
        --article-recent-stack-gap: 30px;
        --article-sidebar-stack-gap: 40px;
    }

    .article-layout {
        width: 100%;
        padding-bottom: 80px;
        row-gap: 40px;
    }

    .article-hero-block {
        width: 100%;
        padding: 12px;
        gap: 20px;
    }

    .article-meta {
        gap: 8px;
    }

    .article-breadcrumbs {
        font-size: 12px;
        gap: 4px;
    }

    .article-title {
        font-size: 36px;
        letter-spacing: -0.02em;
    }

    .article-byline {
        font-size: 12px;
        letter-spacing: -0.24px;
        gap: 4px;
    }

    .article-hero-image {
        aspect-ratio: 300 / 452;
    }

    .article-recent {
        gap: var(--article-recent-stack-gap);
        padding: 12px;
    }

    .article-recent-title {
        font-size: 20px;
        letter-spacing: -0.4px;
    }

    .article-recent-list { gap: 8px; }

    .article-recent-card-title { font-size: 18px; letter-spacing: -0.36px; }

    .article-recent-card-excerpt,
    .article-recent-card-date { font-size: 16px; letter-spacing: -0.32px; }

    .article-recent-card-link { gap: 20px; }

    .article-sidebar {
        flex-direction: column;
        gap: var(--article-sidebar-stack-gap);
    }

    .article-share { order: 1; }

    .article-recent { order: 2; }

    .article-body-inner {
        max-width: 100%;
        gap: 30px;
    }

    .article-lead-headline {
        font-size: 32px;
        letter-spacing: -0.64px;
    }

    .article-content {
        font-size: 16px;
    }

    .article-content p + p { margin-top: 12px; }

    .article-content h2 {
        font-size: 20px;
        letter-spacing: -0.4px;
        margin-top: 20px;
        margin-bottom: 12px;
    }

    .article-content figure {
        gap: 4px;
        margin: 20px 0;
    }

    .article-content figcaption {
        font-size: 12px;
        letter-spacing: -0.24px;
    }
}

/* --------------------------------------------------------------------------
   About Page v2 — layout ported from thraets.org/about-us
   (paper texture, centered welcome, Mission/Vision/Values cards, illustration,
   team cards with our portraits, partner logos)
-------------------------------------------------------------------------- */
.about-v2 {
    display: block;
    /* paper texture tiled vertically at page width (cover would stretch it on long pages) */
    background: var(--color-ivory) url('../images/thraets-org/paper-texture.webp') center top / 100% auto repeat-y;
    padding-bottom: 80px;
}

/* team member without a portrait: keep the card compact instead of an empty box */
.tm-card--no-photo { justify-content: flex-end; }

.about-welcome {
    width: min(1000px, calc(100% - var(--page-pad) * 2));
    margin-inline: auto;
    padding: 60px 0 40px;
}

.about-welcome-inner {
    text-align: center;
    max-width: 760px;
    margin-inline: auto;
}

.about-welcome-title {
    font-family: var(--font-heading);
    font-size: 72px;
    font-weight: 900;
    letter-spacing: -3px;
    line-height: 1;
    text-transform: none;
    color: var(--color-heading-gray);
    margin-bottom: 28px;
}

.about-welcome-intro {
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.6;
    color: var(--color-heading-gray);
}
.about-welcome-intro p + p { margin-top: 18px; }

.about-pillars-v2 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 48px;
}

.about-pillar-v2 {
    background: #F4F2EC;
    padding: 36px 20px 40px;
    text-align: center;
}

.about-pillar-v2-title {
    font-family: var(--font-heading);
    font-size: 50px;
    font-weight: 900;
    letter-spacing: -3px;
    text-transform: none;
    color: var(--color-heading-gray);
    margin-bottom: 20px;
}

.about-pillar-v2-text {
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.6;
    color: var(--color-heading-gray);
}

.about-illustration {
    width: min(1140px, calc(100% - var(--page-pad) * 2));
    margin: 20px auto 40px;
}
.about-illustration img { width: 100%; height: auto; display: block; }

.about-section-label {
    font-family: var(--font-body);
    font-size: 22px;
    font-weight: 400;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-align: center;
    color: var(--color-heading-gray);
    margin-bottom: 28px;
}

.about-team-v2-inner {
    width: min(1000px, calc(100% - var(--page-pad) * 2));
    margin-inline: auto;
    padding: 20px 0 40px;
}

.tm-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.tm-card {
    background: #F4F2EC;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Portraits are ours; a touch smaller than on thraets.org (square crop, top-aligned) */
.tm-card-photo {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    margin-bottom: 10px;
}
.tm-card-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.tm-card-name {
    font-family: var(--font-heading);
    font-size: 23px;
    font-weight: 900;
    letter-spacing: -1px;
    text-transform: none;
    color: var(--color-heading-gray);
}

.tm-card-role {
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.4;
    color: var(--color-heading-gray);
}

.tm-card-actions {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-top: 16px;
}

.tm-card-bio {
    background: none;
    border: 0;
    border-bottom: 1px solid var(--color-heading-gray);
    padding: 0 0 2px;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 400;
    color: var(--color-heading-gray);
    transition: color var(--transition), border-color var(--transition);
}
.tm-card-bio:hover { color: var(--color-red); border-color: var(--color-red); }

.tm-card-linkedin {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 1px solid var(--color-heading-gray);
    color: var(--color-heading-gray);
    transition: color var(--transition), border-color var(--transition);
}
.tm-card-linkedin:hover { color: var(--color-red); border-color: var(--color-red); }

.about-partners-inner {
    width: min(1000px, calc(100% - var(--page-pad) * 2));
    margin-inline: auto;
    padding: 20px 0 0;
}
.hero-partners--about .hero-partner img { height: 48px; }
.hero-partners--about .hero-partner.is-tactical img { height: 20px; }
.hero-partners--about .hero-partner.is-wired img    { height: 22px; }
.hero-partners--about .hero-partner.is-luminate img { height: 20px; }
.hero-partners--about .hero-partner.is-giz img      { height: 38px; }

@media (max-width: 1024px) {
    .about-welcome-title { font-size: 52px; letter-spacing: -2px; }
    .about-pillars-v2 { grid-template-columns: 1fr; }
    .about-pillar-v2-title { font-size: 40px; letter-spacing: -2px; }
    .tm-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .about-welcome { padding-top: 40px; }
    .about-welcome-title { font-size: 40px; letter-spacing: -1.2px; }
    .tm-grid { grid-template-columns: 1fr; }
    .hero-partners--about .hero-partner img { height: 36px; }
    .hero-partners--about .hero-partner.is-tactical img { height: 15px; }
    .hero-partners--about .hero-partner.is-wired img    { height: 17px; }
    .hero-partners--about .hero-partner.is-luminate img { height: 15px; }
    .hero-partners--about .hero-partner.is-giz img      { height: 28px; }
}

/* --------------------------------------------------------------------------
   Home topic tags between the hero and the issue cards (client reference:
   compact filled tags, one colour)
-------------------------------------------------------------------------- */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    width: min(var(--content-max), calc(100% - var(--page-pad) * 2)); /* same width as the cards below */
    margin-inline: auto;
    padding-top: 48px;
}

.tag-cloud + .category-cards { padding-top: 48px; }

.tag-cloud-item {
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.2;
    padding: 7px 12px;
    border-radius: 6px;
    white-space: nowrap;
    background: #BDB7A8;
    color: #3A2B28;
    transition: background-color var(--transition), color var(--transition);
}
.tag-cloud-item:hover { background: var(--color-red); color: var(--color-white); }

/* Pill filters (shop categories) */
.topic-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 22px 24px;
}

.topic-tag {
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.2;
    color: var(--color-heading-gray);
    border: 1px solid var(--color-heading-gray);
    border-radius: 999px;
    padding: 9px 36px;
    transition: color var(--transition), background-color var(--transition), border-color var(--transition);
}

.topic-tag.is-active {
    background: var(--color-header);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.25);
}

.topic-tag:hover {
    color: var(--color-red);
    border-color: var(--color-red);
}

@media (max-width: 1024px) {
    .tag-cloud { padding-top: 32px; gap: 6px; }
    .tag-cloud + .category-cards { padding-top: 32px; }
    .tag-cloud-item { font-size: 14px; padding: 6px 12px; }
}

/* --------------------------------------------------------------------------
   Issues page: full-width illustration → issue cards → explanatory text
-------------------------------------------------------------------------- */
.issues-hero img {
    width: 100%;
    max-width: var(--page-max);
    height: auto;
    margin-inline: auto;
}

.issues-page .category-cards { padding-bottom: 60px; }

.issues-text { padding-bottom: 100px; }

.issues-text-placeholder {
    border: 1px dashed var(--color-heading-gray);
    color: var(--color-heading-gray);
    padding: 48px 24px;
    text-align: center;
}

/* --------------------------------------------------------------------------
   Native selects: own chevron with breathing room (the browser arrow hugs the edge).
   WooCommerce checkout blocks draw their own icon and are left alone.
-------------------------------------------------------------------------- */
select:not(.wc-blocks-components-select__select) {
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M4 7.5L10 13.5L16 7.5' stroke='%23412925' stroke-width='2'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 14px;
    padding-right: 44px;
}

/* --------------------------------------------------------------------------
   Shop (WooCommerce): catalogue grid, category pills, product page
-------------------------------------------------------------------------- */
.shop-page .page-title {
    font-family: var(--font-heading);
    font-size: 60px;
    line-height: 1;
    color: var(--color-black);
    margin-bottom: 40px;
}

.shop-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px 24px;
    margin-bottom: 48px;
}

.shop-toolbar .shop-filters {
    justify-content: flex-start;
    gap: 10px;
    max-width: none;
    margin: 0;
    padding: 0;
}

.shop-filters .topic-tag { font-size: 16px; padding: 8px 24px; }

.shop-toolbar .woocommerce-ordering { margin: 0; float: none; }

.woocommerce .woocommerce-ordering select,
.woocommerce .quantity .qty {
    font-family: var(--font-body);
    font-size: 16px;
    color: var(--color-black);
    border: 1px solid var(--color-heading-gray);
    border-radius: 0;
    background-color: var(--color-input-bg);
}
.woocommerce .woocommerce-ordering select { height: 44px; padding-left: 16px; }

/* Catalogue grid: image, title, price; the whole card links to the product */
body.woocommerce .shop-page ul.products {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 48px 24px;
    margin: 0 0 40px;
    padding: 0;
}
body.woocommerce .shop-page ul.products::before,
body.woocommerce .shop-page ul.products::after { content: none; display: none; }

body.woocommerce .shop-page ul.products[class*=columns-] li.product {
    width: auto;
    float: none;
    clear: none;
    margin: 0;
    padding: 0;
    text-align: left;
}

.shop-page ul.products li.product a.woocommerce-LoopProduct-link { display: block; }

.shop-page ul.products li.product a img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    margin: 0 0 16px;
    transition: opacity var(--transition);
}

.shop-page ul.products li.product .woocommerce-loop-product__title {
    font-family: var(--font-heading);
    font-size: 22px;
    line-height: 1.1;
    color: var(--color-black);
    padding: 0;
    margin: 0 0 8px;
    transition: color var(--transition);
}

.shop-page ul.products li.product .price {
    font-family: var(--font-body);
    font-size: 16px;
    color: var(--color-heading-gray);
    margin: 0;
}

@media (hover: hover) {
    .shop-page ul.products li.product a:hover img { opacity: 0.85; }
    .shop-page ul.products li.product a:hover .woocommerce-loop-product__title { color: var(--color-red); }
}

/* Product page: image | details */
.shop-crumbs {
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--color-heading-gray);
    margin-bottom: 32px;
}
.shop-crumbs a:hover { color: var(--color-red); }

body.woocommerce .shop-page div.product {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0 64px;
    align-items: start;
}
body.woocommerce .shop-page div.product::before,
body.woocommerce .shop-page div.product::after { content: none; display: none; }

body.woocommerce .shop-page div.product div.images,
body.woocommerce .shop-page div.product div.summary {
    width: auto;
    float: none;
    margin: 0;
}

.shop-page div.product > :not(.images):not(.summary) { grid-column: 1 / -1; }

.shop-page div.product .product_title {
    font-family: var(--font-heading);
    font-size: 52px;
    line-height: 1;
    color: var(--color-black);
    margin: 0 0 16px;
}

.woocommerce .shop-page div.product p.price,
.woocommerce .shop-page div.product span.price {
    font-family: var(--font-body);
    font-size: 24px;
    color: var(--color-black);
    margin: 0 0 24px;
}

.shop-page div.product .woocommerce-product-details__short-description {
    font-size: 16px;
    line-height: 1.5;
    max-width: 480px;
    margin: 0 0 32px;
}

/* Options: label above, sizes as buttons, all on the summary's left edge */
.woocommerce .shop-page div.product form.cart .variations,
.woocommerce .shop-page div.product form.cart .variations tbody,
.woocommerce .shop-page div.product form.cart .variations tr,
.woocommerce .shop-page div.product form.cart .variations th,
.woocommerce .shop-page div.product form.cart .variations td {
    display: block;
    padding: 0;
    margin: 0;
    border: 0;
    text-align: left;
    line-height: 1.4;
}
.woocommerce .shop-page div.product form.cart .variations { margin-bottom: 24px; }
.woocommerce .shop-page div.product form.cart .variations tr + tr { margin-top: 20px; }

.woocommerce .shop-page div.product form.cart .variations th label {
    display: block;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-heading-gray);
    margin-bottom: 12px;
}

.variation-buttons { display: flex; flex-wrap: wrap; gap: 8px; }

.variation-button {
    min-width: 56px;
    height: 48px;
    padding: 0 16px;
    font-family: var(--font-body);
    font-size: 16px;
    color: var(--color-black);
    background: transparent;
    border: 1px solid var(--color-heading-gray);
    cursor: pointer;
    transition: color var(--transition), border-color var(--transition), background-color var(--transition);
}
.variation-button:hover { color: var(--color-red); border-color: var(--color-red); }
.variation-button.is-active,
.variation-button.is-active:hover { background: var(--color-black); border-color: var(--color-black); color: var(--color-ivory); }

.woocommerce .shop-page div.product form.cart .reset_variations { display: none !important; }
.woocommerce .shop-page div.product .woocommerce-variation-price,
.woocommerce .shop-page div.product .woocommerce-variation-availability { margin-bottom: 16px; }

/* Quantity + Add to cart: one row, same height */
.woocommerce .shop-page div.product form.cart:not(.variations_form),
.woocommerce .shop-page div.product .woocommerce-variation-add-to-cart {
    display: flex;
    align-items: stretch;
    gap: 8px;
}
.woocommerce .shop-page div.product form.cart::before,
.woocommerce .shop-page div.product form.cart::after,
.woocommerce .shop-page div.product .woocommerce-variation-add-to-cart::before,
.woocommerce .shop-page div.product .woocommerce-variation-add-to-cart::after { content: none; display: none; }

.woocommerce .shop-page div.product form.cart div.quantity { float: none; margin: 0; }
.woocommerce .shop-page .quantity .qty { width: 72px; height: 52px; padding: 0; text-align: center; }

.woocommerce .shop-page div.product form.cart .button {
    float: none;
    flex: 1;
    max-width: 320px;
    height: 52px;
    font-size: 16px;
}

/* Buttons site-wide in the shop: burgundy, square, site font */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce button.button.alt,
.woocommerce a.button.alt,
.wc-block-components-button:not(.is-link) {
    background: var(--color-red);
    color: var(--color-white);
    border-radius: 0;
    font-family: var(--font-body);
    font-weight: 400;
    padding: 12px 24px;
    text-decoration: none;
}

.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce button.button.alt:hover,
.woocommerce a.button.alt:hover,
.wc-block-components-button:not(.is-link):hover {
    background: var(--color-red-hover);
    color: var(--color-white);
}

/* Add to cart before a size is chosen */
.woocommerce button.button.alt.disabled,
.woocommerce button.button.alt.disabled:hover {
    background: #C9C3B3;
    color: #6F695E;
    opacity: 1;
    cursor: not-allowed;
}

.shop-page section.related { margin-top: 96px; }
.shop-page section.related > h2 { font-size: 32px; color: var(--color-black); margin-bottom: 32px; }

.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
    border: 0;
    border-left: 4px solid var(--color-red);
    background: var(--color-peach-lt);
    font-family: var(--font-body);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.woocommerce-message::before,
.woocommerce-info::before,
.woocommerce-error::before { color: var(--color-red); top: 50%; transform: translateY(-50%); }
.woocommerce-message .button { order: 2; white-space: nowrap; }
/* WooCommerce moves focus to the notice for screen readers; no visible ring on a non-control */
.woocommerce-message:focus,
.woocommerce-info:focus,
.woocommerce-error:focus { outline: none; }
.woocommerce .woocommerce-message .button { padding: 8px 16px; }

/* Cart / Checkout pages: blocks need the full content width */
.woocommerce-cart .single-content,
.woocommerce-checkout .single-content,
.woocommerce-account .single-content { max-width: none; }

@media (max-width: 1024px) {
    .shop-page .page-title { font-size: 40px; }
    body.woocommerce .shop-page ul.products { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    body.woocommerce .shop-page div.product { gap: 0 32px; }
    .shop-page div.product .product_title { font-size: 40px; }
}

@media (max-width: 768px) {
    body.woocommerce .shop-page ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 16px; }
    .shop-page ul.products li.product .woocommerce-loop-product__title { font-size: 18px; }
    .shop-toolbar { margin-bottom: 32px; }
    .shop-filters .topic-tag { font-size: 14px; padding: 6px 16px; }
    body.woocommerce .shop-page div.product { grid-template-columns: 1fr; }
    body.woocommerce .shop-page div.product div.images { margin-bottom: 32px; }
    .woocommerce .shop-page div.product form.cart .button { max-width: none; }
    .shop-page section.related { margin-top: 64px; }
}

/* --------------------------------------------------------------------------
   Accessibility
-------------------------------------------------------------------------- */
:focus-visible {
    outline: 2px solid var(--color-red);
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}
