/* Projects directory, matching the supplied XD. */
#projects.projects-page { position: relative; isolation: isolate; padding: 200px 0; background: #ecf1d0; color: #007479; }
.projects-page::before { content: ''; position: absolute; inset: 0; z-index: -1; background: url('../images/projects-background.jpg') center / cover no-repeat; opacity: .4; transform: scaleY(-1); pointer-events: none; }
.projects-page [hidden] { display: none !important; }
.projects-page__heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 50px; margin-bottom: 75px; }
.projects-page__heading h1 { margin: 0; font-size: 55px; line-height: 1; font-weight: 600; letter-spacing: 0; color: #007479; }
.projects-filters { margin: 0 0 5px; }
.projects-filters fieldset { display: flex; flex-wrap: wrap; gap: 16px; padding: 0; margin: 0; border: 0; min-width: 0; }
.projects-filters__option { display: flex; align-items: center; justify-content: space-between; gap: 22px; min-width: 185px; min-height: 60px; padding: 15px 17px 15px 30px; background: rgba(255,255,255,.27); border-radius: 40px; color: #007479; cursor: pointer; font-size: 16px; line-height: 1.2; }
.projects-page .projects-filters__option input { appearance: none; -webkit-appearance: none; flex: 0 0 24px; width: 24px; height: 24px; padding: 0; margin: 0; border: 0; border-radius: 50%; background: #fff; box-shadow: none; cursor: pointer; }
.projects-page .projects-filters__option input::before, .projects-page .projects-filters__option input::after { content: none; }
.projects-page .projects-filters__option input:checked { background: #007479; }
.projects-page .projects-filters__option input { transition: background-color .2s ease; }
.projects-page .projects-filters__option:hover input:not(:checked) { background-color: #00747933; }
/* Keep the pill borderless; keyboard focus remains on the checkbox itself. */
.projects-page .projects-filters__option input:focus:not(:focus-visible) { outline: none; }
.projects-filters__submit { margin-top: 16px; }
.projects-page.is-enhanced .projects-filters__submit { display: none; }
.projects-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 50px 15px; }
.projects-page .projects-tile { min-width: 0; }
.projects-page .meta-card p { margin: 0; }
.projects-page .project-illustration { position: relative; }
.projects-page .projects-tile__image { position: absolute; inset: 0; display: block; width: 100% !important; height: 100% !important; max-width: none !important; max-height: none !important; object-fit: cover !important; object-position: center; }
.projects-page .extra-info { position: absolute; inset: 0; padding: 25px; }
.projects-page .extra-info .keynum { margin: 0; border: 0; color: #ecf1d0; }
#projects.projects-page .projects-tile h2 { height: 139px; font-size: 22px; line-height: 25px; font-weight: 500; text-align: left; margin: 0; }
.projects-tile:focus .extra-info, .projects-tile:focus-within .extra-info { visibility: visible; opacity: 1; }
.projects-tile:focus .meta-card .not-hover, .projects-tile:focus-within .meta-card .not-hover { display: none; }
.projects-tile:focus .meta-card .hover, .projects-tile:focus-within .meta-card .hover { display: block; }
.projects-tile:focus-visible { outline: 2px solid #007479; outline-offset: 4px; }
.projects-archive { margin-top: 150px; }
#projects.projects-page .projects-archive > h2 { margin: 0 0 70px; font-size: 55px; line-height: 1; text-align: center; }
.projects-archive__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.projects-archive__row { position: relative; display: flex; align-items: stretch; min-height: 60px; border-radius: 36px; overflow: hidden; background: linear-gradient(#ecf1d0, #fff 75%); }
.projects-archive__country { flex: 0 0 96px; display: flex; justify-content: center; align-items: center; padding: 15px 10px; background: #007479; color: #ecf1d0; font-size: 22px; line-height: 1.2; text-decoration: none; border: 0; }
.projects-archive__list > .projects-archive__row { padding: 0; }
.projects-archive__list > .projects-archive__row::before { content: none; display: none; }
.projects-archive__country[title] { text-decoration: none; }
.projects-archive__description { flex: 1; min-width: 0; padding: 10px 28px; }
.projects-archive__category { font-size: 11px; line-height: 1.1; text-transform: uppercase; letter-spacing: .08em; margin: 0 0 3px; }
.projects-archive__description h3 { font-size: 22px; line-height: 1.15; font-weight: 500; margin: 0; }
.projects-archive__link { align-self: center; flex-shrink: 0; padding: 18px 30px 18px 10px; font-size: 13px; line-height: 1.3; text-transform: uppercase; text-decoration: none; font-weight: 500; color: #007479; }
.projects-archive__plus { display: inline-block; font-size: 18px; line-height: 0; transform: translateY(0); transition: transform .2s ease; }
.projects-page .projects-archive__link:link,
.projects-page .projects-archive__link:visited,
.projects-page .projects-archive__link:hover { color: #007479; text-decoration: none; }
.projects-page .projects-archive__link { transition: color .2s ease; }
.projects-page .projects-archive__link:hover,
.projects-page .projects-archive__link:focus-visible { color: #004e52; }
.projects-archive__link:hover .projects-archive__plus,
.projects-archive__link:focus-visible .projects-archive__plus { transform: scale(1.2); }
@media (prefers-reduced-motion: reduce) {
    .projects-page .projects-archive__link, .projects-archive__plus { transition: none; }
}
.projects-load-more { display: table; margin: 55px auto 0; padding: 12px; font-size: 20px; font-weight: 600; text-transform: uppercase; text-decoration: none; }
.projects-load-more:hover { text-decoration: underline; }
.projects-load-more[aria-disabled="true"] { opacity: .6; cursor: wait; }
.projects-empty, .projects-archive__empty { padding: 30px; text-align: center; font-size: 18px; }
.projects-results[aria-busy="true"] { opacity: .6; }
.projects-error { margin-top: 30px; text-align: center; }
.projects-error button { padding: 10px 20px; margin-left: 10px; border-radius: 30px; background: #007479; color: #fff; }
@media (max-width: 1250px) {
    .projects-page__heading { gap: 30px; }
    .projects-page__heading h1 { font-size: 45px; }
    .projects-filters__option { min-width: 150px; padding-left: 20px; }
    .projects-filters fieldset { gap: 10px; }
}
@media (max-width: 1000px) {
    .projects-page__heading { align-items: flex-start; flex-direction: column; gap: 40px; }
    .projects-archive__description h3 { font-size: 18px; }
}
@media (max-width: 600px) {
    #projects.projects-page { padding: 60px 0; }
    .projects-page .contener { padding-right: 20px; padding-left: 20px; }
    .projects-page__heading { margin-bottom: 40px; }
    .projects-page__heading h1 { font-size: clamp(29px,7.5vw,40px); line-height: 1.05; }
    .projects-archive { margin-top: 80px; }
    #projects.projects-page .projects-archive > h2 { font-size: 35px; margin-bottom: 35px; }
    .projects-archive__row { position: relative; display: grid; grid-template-columns: 56px minmax(0,1fr); border-radius: 18px; }
    .projects-archive__country { grid-row: span 2; font-size: 16px; padding: 14px 5px; }
    .projects-archive__description { padding: 12px 16px 6px; }
    .projects-archive__description h3 { font-size: 16px; line-height: 1.25; }
    .projects-archive__category { font-size: 9px; }
    .projects-archive__link { grid-column: 2; padding: 6px 16px 14px; font-size: 11px; }
}



/* Match the former homepage project grid on mobile. */
@media (max-width: 768px) {
    .projects-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Stack country filters like the experts filters on the about page. */
@media (max-width: 768px) {
    .projects-filters { width: 100%; margin: 0; }
    .projects-filters fieldset { display: block; }
    .projects-filters__option {
        display: inline-flex;
        width: 100%;
        min-width: 193px;
        min-height: 0;
        margin-right: 15px;
        margin-bottom: 10px;
        flex: 0 0 auto;
        justify-content: space-between;
        gap: 24px;
        padding: 19px 20px 17px 30px;
        border-radius: 50px;
        background: #edf8fa;
        color: #007479;
        font-size: var(--form--font-size);
        font-weight: var(--form--label-weight);
        line-height: var(--global--line-height-body);
        text-align: left;
    }
    .projects-page .projects-filters__option input {
        flex-basis: 24px;
        width: 24px;
        height: 24px;
    }
}

/* One continuous capsule hit area, including keyboard focus, without the theme's white link focus patch. */
.projects-page .projects-archive__link { position: static; }
.projects-page .projects-archive__link::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
#projects.projects-page .projects-archive__link:focus,
#projects.projects-page .projects-archive__link:active { background: transparent; box-shadow: none; text-decoration: none; outline: none; }
/* Animate the lower gradient stop into the top colour, then back on pointer exit. */
@property --etherra-capsule-bottom { syntax: '<color>'; inherits: false; initial-value: #fff; }
.projects-archive__row { --etherra-capsule-bottom: #fff; background: linear-gradient(#ecf1d0, var(--etherra-capsule-bottom) 75%); transition: --etherra-capsule-bottom .45s ease-in-out; }
.projects-archive__row:hover,
.projects-archive__row:has(.projects-archive__link:focus-visible) { --etherra-capsule-bottom: #ecf1d0; }
.projects-archive__row:has(.projects-archive__link:focus-visible) { outline: 2px solid #007479; outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .projects-archive__row { transition: none; } }

/* Signal the full clickable capsule, including its stretched link hit area. */
.projects-archive__row:has(.projects-archive__link),
.projects-page .projects-archive__link,
.projects-page .projects-archive__link::after { cursor: pointer; }
