:root { --dpe-yellow: #ffc400; --dpe-yellow-dark: #e7ae00; --dpe-text: #282828; --dpe-muted: #777; --dpe-card-radius: 12px; }
.dpe-programs-grid, .dpe-category-carousel, .dpe-featured-carousel, .dpe-country-projects { box-sizing: border-box; width: 100%; font-family: inherit; }
.dpe-programs-grid *, .dpe-category-carousel *, .dpe-featured-carousel *, .dpe-country-projects * { box-sizing: border-box; }
.dpe-programs-grid { display: grid; grid-template-columns: repeat(var(--dpe-columns, 3), minmax(0, 1fr)); gap: 20px; align-items: stretch; }
.dpe-program-card { min-width: 0; overflow: hidden; display: flex; flex-direction: column; background: #fff; border: 1px solid rgba(30,30,30,.07); border-radius: var(--dpe-card-radius); box-shadow: 0 2px 10px rgba(25,25,25,.055); color: var(--dpe-text); }
.dpe-program-card__image-link { display: block; color: inherit; text-decoration: none !important; }
.dpe-program-card__image { height: 155px; background-color: #eee8d8; background-position: center; background-size: cover; position: relative; }
.dpe-program-card__category { position: absolute; left: 12px; top: 12px; max-width: calc(100% - 24px); padding: 5px 9px; border-radius: 3px; background: #fff5cc; color: #755f00; font-size: 11px; line-height: 1.2; font-weight: 600; }
.dpe-program-card__body { display: flex; flex: 1; flex-direction: column; padding: 12px 13px 13px; min-height: 0; }
.dpe-program-card__title { margin: 0 0 5px !important; padding: 0 !important; font-size: 16px; line-height: 1.28; font-weight: 700; color: #272727; }
.dpe-program-card__title a { color: inherit; text-decoration: none !important; }
.dpe-program-card__title a:hover { color: #806200; }
.dpe-program-card__description { margin: 0 0 10px !important; color: #777; font-size: 12px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.dpe-program-card__funding { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: auto; margin-bottom: 5px; font-size: 10px; color: #333; }
.dpe-program-card__progress { height: 4px; width: 100%; border-radius: 99px; overflow: hidden; background: #e8e8e8; margin-bottom: 12px; }
.dpe-program-card__progress span { display: block; height: 100%; border-radius: inherit; background: var(--dpe-yellow); }
.dpe-program-card__country { font-size: 11px; margin: 0 0 10px; color: #333; }
.dpe-program-card__country span { display: inline-block; font-size: 9px; color: #128b49; margin-right: 4px; }
.dpe-program-card__button { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: 37px; margin-top: auto; padding: 9px 12px; border: 0; border-radius: 5px; background: var(--dpe-yellow); color: #282000 !important; font-size: 12px; font-weight: 700; text-decoration: none !important; transition: background .2s ease, transform .2s ease; }
.dpe-program-card__button:hover, .dpe-program-card__button:focus { background: var(--dpe-yellow-dark); color: #282000 !important; transform: translateY(-1px); }
.dpe-program-card__button span { font-size: 14px; line-height: 1; }
.dpe-program-card--featured .dpe-program-card__image { height: 168px; }
.dpe-program-card--featured .dpe-program-card__body { padding: 12px 13px 13px; }
.dpe-program-card--featured .dpe-program-card__title { font-size: 15px; }
.dpe-program-card--featured .dpe-program-card__button { min-height: 34px; font-weight: 600; }
.dpe-empty-message { padding: 14px 16px; background: #fff9df; border-radius: 8px; color: #675500; }

/* Category image carousel inspired by the supplied Figma reference. */
.dpe-category-carousel { position: relative; }
.dpe-carousel-controls { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 16px 0 0; padding: 0; }
.dpe-carousel-shell .dpe-carousel-arrow { appearance: none; -webkit-appearance: none; display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; min-height: 42px; padding: 0; border: 1px solid transparent; border-radius: 9px; font-family: inherit; font-size: 15px; font-weight: 600; line-height: 1; cursor: pointer; text-decoration: none !important; box-shadow: 0 2px 5px rgba(30, 25, 0, .07); transition: background-color .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.dpe-carousel-shell .dpe-carousel-arrow--prev { width: 42px; height: 42px; background-color: #efefef !important; border-color: #e8e8e8 !important; color: #6d6d6d !important; font-size: 19px; }
.dpe-carousel-shell .dpe-carousel-arrow--prev:hover:not(:disabled), .dpe-carousel-shell .dpe-carousel-arrow--prev:focus:not(:disabled), .dpe-carousel-shell .dpe-carousel-arrow--prev:active:not(:disabled) { background-color: #e4e4e4 !important; border-color: #e4e4e4 !important; color: #292929 !important; transform: translateY(-1px); }
.dpe-carousel-shell .dpe-carousel-arrow--next { min-width: 148px; gap: 12px; padding: 0 17px; background-color: #f2bd00 !important; border-color: #f2bd00 !important; color: #292510 !important; }
/* Force the same Figma yellow on hover/focus/active so theme-wide button rules cannot turn it red. */
.dpe-carousel-shell .dpe-carousel-arrow--next:hover:not(:disabled), .dpe-carousel-shell .dpe-carousel-arrow--next:focus:not(:disabled), .dpe-carousel-shell .dpe-carousel-arrow--next:active:not(:disabled) { background-color: #f2bd00 !important; border-color: #f2bd00 !important; color: #292510 !important; box-shadow: 0 4px 10px rgba(180, 137, 0, .18); transform: translateY(-1px); }
.dpe-carousel-shell .dpe-carousel-arrow__label { color: inherit !important; font-size: 12px; font-weight: 700; white-space: nowrap; }
.dpe-carousel-shell .dpe-carousel-arrow__icon { color: inherit !important; font-size: 17px; line-height: 1; transition: transform .18s ease; }
.dpe-carousel-shell .dpe-carousel-arrow--next:hover:not(:disabled) .dpe-carousel-arrow__icon { transform: translateX(2px); }
.dpe-carousel-shell .dpe-carousel-arrow:focus-visible { outline: 3px solid rgba(242, 189, 0, .45); outline-offset: 3px; }
.dpe-carousel-shell .dpe-carousel-arrow:disabled { box-shadow: none !important; cursor: not-allowed; transform: none !important; }
.dpe-carousel-shell .dpe-carousel-arrow--prev:disabled { background-color: #efefef !important; border-color: #e8e8e8 !important; color: #b0b0b0 !important; opacity: .72; }
.dpe-carousel-shell .dpe-carousel-arrow--next:disabled { background-color: #f5e9b9 !important; border-color: #f5e9b9 !important; color: #98884d !important; opacity: .82; }
.dpe-category-carousel__track { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 24px) / 3); gap: 12px; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; }
.dpe-category-carousel__track::-webkit-scrollbar { display: none; }
.dpe-category-card { position: relative; overflow: hidden; min-width: 0; height: 218px; border-radius: 12px; background: #d9d4c5; color: #fff; scroll-snap-align: start; isolation: isolate; }
.dpe-category-card__image { position: absolute; inset: 0; z-index: -2; background-position: center; background-size: cover; background-color: #cfc7b4; transition: transform .45s ease; }
.dpe-category-card::after { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 20%, rgba(0,0,0,.32) 48%, rgba(0,0,0,.94) 100%); }
.dpe-category-card:hover .dpe-category-card__image { transform: scale(1.04); }
.dpe-category-card__content { position: absolute; inset: auto 13px 13px; }
.dpe-category-card__title { color: #fff !important; font-size: 15px; font-weight: 700; line-height: 1.25; margin: 0 0 5px !important; }
.dpe-category-card__description { color: rgba(255,255,255,.82) !important; font-size: 10px; line-height: 1.4; margin: 0 0 8px !important; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dpe-category-card__link { display: inline-flex; align-items: center; gap: 6px; color: var(--dpe-yellow) !important; font-size: 11px; font-weight: 600; text-decoration: none !important; }
.dpe-category-card__link:hover { color: #ffe16b !important; }
.dpe-archive-page { padding: clamp(28px, 5vw, 64px) 20px; }
.dpe-archive-page__inner { width: min(1200px, 100%); margin: 0 auto; }
.dpe-archive-page__header { margin: 0 0 26px; }
.dpe-archive-page__header h1 { font-size: clamp(27px, 3vw, 40px); margin: 0 0 10px; }
.dpe-archive-page__description { color: var(--dpe-muted); }
.dpe-archive-page .dpe-programs-grid { margin-top: 22px; }

@media (max-width: 1024px) {
    .dpe-programs-grid { grid-template-columns: repeat(min(var(--dpe-columns, 3), 2), minmax(0, 1fr)); }
    .dpe-category-carousel__track { grid-auto-columns: calc((100% - 12px) / 2); }
}
@media (max-width: 640px) {
    .dpe-programs-grid { grid-template-columns: 1fr; gap: 16px; }
    .dpe-program-card__image { height: 190px; }
    .dpe-category-carousel__track { grid-auto-columns: 86%; gap: 12px; }
    .dpe-category-card { height: 220px; }
    .dpe-carousel-controls { margin-top: 14px; gap: 8px; }
    .dpe-carousel-arrow--prev { width: 40px; height: 40px; min-height: 40px; }
    .dpe-carousel-arrow--next { min-height: 40px; padding: 0 15px; }
}


/* Shared responsive carousel track and identical grey/yellow navigation for all three carousel types. */
.dpe-featured-carousel, .dpe-country-projects { width: 100%; min-width: 0; color: var(--dpe-text); }
.dpe-carousel-controls { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 16px 0 0; padding: 0; }
.dpe-featured-carousel__track { display: grid; grid-auto-flow: column; grid-auto-columns: var(--dpe-featured-card-width, calc((100% - 40px) / 3)); gap: 20px; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; }
.dpe-featured-carousel__track::-webkit-scrollbar, .dpe-country-projects__track::-webkit-scrollbar { display: none; }
.dpe-featured-carousel__track .dpe-program-card { height: auto; scroll-snap-align: start; }
.dpe-carousel-shell .dpe-carousel-arrow { appearance: none; -webkit-appearance: none; display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; min-height: 42px; padding: 0; border: 1px solid transparent; border-radius: 9px; font-family: inherit; font-size: 15px; font-weight: 600; line-height: 1; cursor: pointer; text-decoration: none !important; box-shadow: 0 2px 5px rgba(30,25,0,.07); transition: background-color .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.dpe-carousel-shell .dpe-carousel-arrow--prev { width: 42px; height: 42px; background-color: #efefef !important; border-color: #e8e8e8 !important; color: #6d6d6d !important; font-size: 19px; }
.dpe-carousel-shell .dpe-carousel-arrow--prev:hover:not(:disabled), .dpe-carousel-shell .dpe-carousel-arrow--prev:focus:not(:disabled), .dpe-carousel-shell .dpe-carousel-arrow--prev:active:not(:disabled) { background-color: #e4e4e4 !important; border-color: #e4e4e4 !important; color: #292929 !important; transform: translateY(-1px); }
.dpe-carousel-shell .dpe-carousel-arrow--next { min-width: 148px; gap: 12px; padding: 0 17px; background-color: #f2bd00 !important; border-color: #f2bd00 !important; color: #292510 !important; }
.dpe-carousel-shell .dpe-carousel-arrow--next:hover:not(:disabled), .dpe-carousel-shell .dpe-carousel-arrow--next:focus:not(:disabled), .dpe-carousel-shell .dpe-carousel-arrow--next:active:not(:disabled) { background-color: #f2bd00 !important; border-color: #f2bd00 !important; color: #292510 !important; box-shadow: 0 4px 10px rgba(180,137,0,.18); transform: translateY(-1px); }
.dpe-carousel-shell .dpe-carousel-arrow__label { color: inherit !important; font-size: 12px; font-weight: 700; white-space: nowrap; }
.dpe-carousel-shell .dpe-carousel-arrow__icon { color: inherit !important; font-size: 17px; line-height: 1; transition: transform .18s ease; }
.dpe-carousel-shell .dpe-carousel-arrow--next:hover:not(:disabled) .dpe-carousel-arrow__icon { transform: translateX(2px); }
.dpe-carousel-shell .dpe-carousel-arrow:focus-visible { outline: 3px solid rgba(242,189,0,.45); outline-offset: 3px; }
.dpe-carousel-shell .dpe-carousel-arrow:disabled { box-shadow: none !important; cursor: not-allowed; transform: none !important; }
.dpe-carousel-shell .dpe-carousel-arrow--prev:disabled { background-color: #efefef !important; border-color: #e8e8e8 !important; color: #b0b0b0 !important; opacity: .72; }
.dpe-carousel-shell .dpe-carousel-arrow--next:disabled { background-color: #f5e9b9 !important; border-color: #f5e9b9 !important; color: #98884d !important; opacity: .82; }

.dpe-country-projects { padding: 30px clamp(12px, 2vw, 24px) 36px; background: #fffdf5; }
.dpe-country-projects__header { max-width: 430px; margin: 0 auto 26px; text-align: center; }
.dpe-country-projects__header h2 { margin: 0 0 9px; color: #292929; font-size: clamp(25px, 3vw, 32px); line-height: 1.2; font-weight: 400; }
.dpe-country-projects__header p { margin: 0; color: #77766f; font-size: 12px; line-height: 1.5; }
.dpe-country-projects__track { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 28px) / 3); gap: 14px; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; -ms-overflow-style: none; }
.dpe-country-project-card { display: flex; min-width: 0; flex-direction: column; overflow: hidden; padding: 9px; border-radius: 13px; background: #fff; scroll-snap-align: start; }
.dpe-country-project-card[hidden] { display: none !important; }
.dpe-country-project-card__image { display: block; width: 100%; height: 160px; flex: 0 0 auto; border-radius: 6px; object-fit: cover; background: #efeee8; }
.dpe-country-project-card__image--empty { display: flex; align-items: center; justify-content: center; color: #85837d; font-size: 11px; }
.dpe-country-project-card__body { display: flex; min-width: 0; flex: 1; flex-direction: column; padding-top: 10px; }
.dpe-country-project-card__body h3 { margin: 0 0 6px; color: #292929; font-size: 14px; font-weight: 600; line-height: 1.35; }
.dpe-country-project-card__description { min-height: 34px; margin: 0 0 9px; color: #85837d; font-size: 10px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dpe-country-project-card__location { display: flex; align-items: center; gap: 5px; margin: 0 0 14px; color: #33322e; font-size: 11px; font-weight: 600; }
.dpe-country-project-card__location span:first-child { font-size: 14px; line-height: 1; }
.dpe-country-project-card__support { display: flex; width: 100%; min-height: 34px; align-items: center; justify-content: center; gap: 7px; margin-top: auto; padding: 8px 10px; border: 1px solid var(--dpe-yellow); border-radius: 5px; background: var(--dpe-yellow); color: #292929 !important; font-family: inherit; font-size: 10px; font-weight: 600; text-decoration: none !important; text-align: center; transition: background .2s ease; }
.dpe-country-project-card__support:hover, .dpe-country-project-card__support:focus { background: #f1bb00; color: #292929 !important; }
.dpe-country-projects__empty { margin: 12px 0; padding: 18px; border-radius: 8px; background: #fff; color: #77766f; font-size: 13px; text-align: center; }
.dpe-country-projects__empty[hidden] { display: none !important; }
@media (max-width: 1024px) {
    .dpe-country-projects__track { grid-auto-columns: calc((100% - 14px) / 2); }
    .dpe-featured-carousel__track { grid-auto-columns: calc((100% - 20px) / 2); }
}
@media (max-width: 640px) {
    .dpe-carousel-controls { margin-top: 14px; gap: 8px; }
    .dpe-carousel-shell .dpe-carousel-arrow--prev { width: 40px; height: 40px; min-height: 40px; }
    .dpe-carousel-shell .dpe-carousel-arrow--next { min-height: 40px; padding: 0 15px; }
    .dpe-featured-carousel__track { grid-auto-columns: 86%; gap: 12px; }
    .dpe-country-projects { padding: 25px 12px 28px; }
    .dpe-country-projects__header { margin-bottom: 21px; }
    .dpe-country-projects__track { grid-auto-columns: 86%; gap: 12px; }
    .dpe-country-project-card__image { height: 190px; }
    .dpe-country-project-card__body h3 { font-size: 15px; }
    .dpe-country-project-card__description { font-size: 12px; }
}
