/**
 * Public Styles - Modern & Responsive
 * @package NGO_Projects_Manager
 */

/* Colors come from the active theme, with a neutral fallback. */
:root {
    --ngo-primary: var(--theme-button-background-initial-color, var(--theme-palette-color-1, var(--global-palette1, var(--wp--preset--color--primary, #1d2327))));
    --ngo-on-primary: var(--theme-button-text-initial-color, #fff);
    --ngo-primary-hover: var(--theme-button-background-hover-color, var(--theme-palette-color-2, var(--ngo-primary)));
    --ngo-on-primary-hover: var(--theme-button-text-hover-color, var(--ngo-on-primary));
    --ngo-secondary: var(--theme-text-color, #50575e);
    --ngo-success: #1e7a46;
    --ngo-warning: #8a5a00;
    --ngo-danger: #8a2424;
    --ngo-light: var(--theme-palette-color-6, var(--global-palette7, transparent));
    --ngo-dark: var(--theme-headings-color, var(--theme-heading-color, var(--global-palette3, #1d2327)));
    --ngo-border: var(--theme-palette-color-5, var(--global-palette6, #dcdcde));
    --ngo-radius: var(--theme-border-radius, 0px);
    --ngo-shadow: none;
    --ngo-shadow-lg: none;
}

.ngo-pm-archive,
.ngo-pm-archive *,
.ngo-pm-single-wrap,
.ngo-pm-single-wrap *,
.ngo-pm-single-project,
.ngo-pm-single-project * {
    box-sizing: border-box;
}

.ngo-pm-archive,
.ngo-pm-single-project,
.ngo-pm-single-wrap {
    color: var(--ngo-secondary);
    font-family: var(--theme-font-family, inherit);
    font-size: var(--theme-font-size, inherit);
    font-weight: var(--theme-font-weight, inherit);
    font-style: var(--theme-font-style, inherit);
    line-height: var(--theme-line-height, inherit);
    letter-spacing: var(--theme-letter-spacing, inherit);
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.ngo-pm-archive :is(h1, h2, h3),
.ngo-pm-single-project :is(h1, h2, h3),
.ngo-pm-card-title,
.ngo-pm-project-title {
    font-family: var(--theme-heading-font-family, var(--theme-font-family, inherit));
    font-weight: var(--theme-heading-font-weight, inherit);
    font-style: var(--theme-heading-font-style, inherit);
    letter-spacing: var(--theme-heading-letter-spacing, inherit);
    text-transform: var(--theme-heading-text-transform, none);
    line-height: var(--theme-heading-line-height, 1.25);
}

.entry-content > .ngo-pm-archive,
.ngo-pm-archive {
    overflow: visible;
    margin-top: 40px;
    margin-block-start: 40px;
}

/* ==========================================================================
   Filter & Search Bar
   ========================================================================== */

.ngo-pm-filters {
    position: relative;
    z-index: 30;
    background: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.ngo-pm-search {
    flex: none;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin-bottom: 0;
}

.ngo-pm-search .search-form {
    display: flex;
    gap: 10px;
    max-width: none;
    margin: 0;
}

.ngo-pm-search .search-field {
    flex: 1 1 auto;
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 12px 16px;
    border: 1px solid var(--ngo-border);
    border-radius: var(--theme-form-field-border-radius, var(--ngo-radius));
    font-size: inherit;
    font-family: inherit;
    color: inherit;
}

.ngo-pm-search .search-field:focus,
.ngo-pm-filter-select:focus {
    border-color: var(--ngo-dark);
    outline: 1px solid var(--ngo-dark);
    outline-offset: 0;
}

.ngo-pm-search .search-submit {
    width: auto;
    flex: 0 0 auto;
    padding: 12px 24px;
    background: var(--ngo-primary);
    color: var(--ngo-on-primary);
    border: none;
    border-radius: var(--theme-button-border-radius, var(--ngo-radius));
    cursor: pointer;
    font-weight: 600;
    line-height: 1.2;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.ngo-pm-search .search-submit:hover {
    background: var(--ngo-primary-hover);
    color: var(--ngo-on-primary-hover);
}

.ngo-pm-filter-bar {
    display: grid;
    grid-template-columns: minmax(180px, 1.35fr) repeat(4, minmax(0, 1fr)) auto;
    gap: 12px 14px;
    align-items: center;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.ngo-pm-filter-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    min-width: 0;
}

.ngo-pm-layout-switch {
    display: inline-flex;
    flex: 0 0 auto;
    border: 1px solid var(--ngo-border);
    border-radius: var(--theme-button-border-radius, 0);
    overflow: hidden;
}

.ngo-pm-layout-btn {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin: 0;
    padding: 0;
    border: 0;
    border-right: 1px solid var(--ngo-border);
    background: #fff;
    color: var(--ngo-dark);
    cursor: pointer;
    line-height: 1;
}

.ngo-pm-layout-btn:last-child {
    border-right: 0;
}

.ngo-pm-layout-btn[aria-pressed="true"] {
    background: var(--ngo-primary);
    color: var(--ngo-on-primary);
}

.ngo-pm-layout-btn svg {
    display: block;
    width: 16px;
    height: 16px;
}

.ngo-pm-filter-group {
    display: flex;
    flex-direction: column;
    flex: 1 1 140px;
    min-width: 0;
    gap: 5px;
}

.ngo-pm-filter-group label,
.ngo-pm-search label {
    font-family: var(--theme-font-family, inherit);
    font-weight: var(--theme-font-weight, 600);
    font-size: 0.85em;
    color: var(--ngo-dark);
}

.ngo-pm-filter-select {
    appearance: none;
    -webkit-appearance: none;
    padding: 10px 40px 10px 14px;
    border: 1px solid var(--ngo-border);
    border-radius: var(--theme-form-field-border-radius, var(--ngo-radius));
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    font-size: inherit;
    font-family: inherit;
    line-height: 1.4;
    color: inherit;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.25L6 6.25L11 1.25' fill='none' stroke='currentColor' stroke-width='1.6' stroke-linecap='square'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 12px 8px;
    cursor: pointer;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

.ngo-pm-filter-select:has(option[value=""]:checked) {
    color: var(--ngo-secondary);
}

.ngo-pm-filter-select option {
    color: var(--ngo-dark);
}

.ngo-pm-select {
    position: relative;
    min-width: 0;
}

.ngo-pm-select .ngo-pm-filter-select {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.ngo-pm-select-btn {
    appearance: none;
    display: block;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 10px 40px 10px 14px;
    border: 1px solid var(--ngo-border);
    border-radius: var(--theme-form-field-border-radius, var(--ngo-radius));
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.25L6 6.25L11 1.25' fill='none' stroke='currentColor' stroke-width='1.6' stroke-linecap='square'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 12px 8px;
    color: var(--ngo-secondary);
    font: inherit;
    line-height: 1.4;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    cursor: pointer;
}

.ngo-pm-select-menu {
    position: fixed;
    z-index: 100000;
    box-sizing: border-box;
    max-height: min(50vh, 280px);
    margin: 0;
    padding: 4px 0;
    overflow: auto;
    list-style: none;
    background: #fff;
    border: 1px solid var(--ngo-border);
}

.ngo-pm-select-option {
    display: block;
    width: 100%;
    margin: 0;
    padding: 10px 14px;
    border: 0;
    background: transparent;
    color: var(--ngo-dark);
    font: inherit;
    line-height: 1.4;
    text-align: left;
    cursor: pointer;
}

.ngo-pm-select-option:hover,
.ngo-pm-select-option:focus {
    background: var(--ngo-light, #f6f7f8);
}

.ngo-pm-filter-select:focus {
    border-color: var(--ngo-dark);
    outline: 1px solid var(--ngo-dark);
    outline-offset: 0;
}

a.ngo-pm-filter-reset,
button.ngo-pm-filter-reset {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: 42px;
    margin: 0;
    padding: 0 16px;
    box-sizing: border-box;
    background: #fff;
    border: 1px solid var(--ngo-border);
    border-radius: var(--theme-button-border-radius, 0);
    cursor: pointer;
    font-weight: 600;
    font-family: inherit;
    line-height: 1.2;
    text-decoration: none;
    color: var(--ngo-dark);
}

.ngo-pm-filter-reset:hover {
    border-color: var(--ngo-dark);
    color: var(--ngo-dark);
}

/* ==========================================================================
   Grid View
   ========================================================================== */

.ngo-pm-grid {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 30px;
    margin-bottom: 40px;
}

.ngo-pm-columns-2,
.ngo-pm-columns-3,
.ngo-pm-columns-4 {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
}

/* Project Card */
.ngo-pm-card {
    background: #fff;
    border: 1px solid var(--ngo-border);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.ngo-pm-card-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 10;
}

.ngo-pm-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ngo-pm-card-placeholder {
    width: 100%;
    height: 100%;
    background: var(--ngo-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px;
}

.ngo-pm-card-placeholder .dashicons {
    font-size: 64px;
    width: 64px;
    height: 64px;
    color: var(--ngo-secondary);
}

.ngo-pm-placeholder-text {
    color: var(--ngo-secondary);
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    line-height: 1.4;
    max-width: 90%;
}

.ngo-pm-card-kicker {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px 20px;
    margin-bottom: 12px;
}

.ngo-pm-card-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: transparent;
    color: var(--ngo-dark);
}

.ngo-pm-card-status .dashicons {
    width: 16px;
    height: 16px;
    font-size: 16px;
    color: var(--ngo-primary);
}

.ngo-pm-status-planning,
.ngo-pm-status-ongoing,
.ngo-pm-status-completed,
.ngo-pm-status-needs-funding,
.ngo-pm-status-on-hold {
    color: var(--ngo-dark);
    background: transparent;
    border: 0;
}

.ngo-pm-card-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.ngo-pm-card-title {
    margin: 0 0 12px 0;
    line-height: 1.3;
}

.ngo-pm-card-title a {
    color: var(--ngo-dark);
    text-decoration: none;
    transition: color 0.3s ease;
}

.ngo-pm-card-title a:hover {
    color: var(--ngo-primary);
}

.ngo-pm-card-location {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    color: var(--ngo-secondary);
    font-size: 0.95em;
}

.ngo-pm-card-statline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.ngo-pm-card-funding {
    width: 100%;
    margin-top: 4px;
}

.ngo-pm-card-funding .ngo-pm-progress {
    width: 100%;
}

.ngo-pm-card-beneficiaries {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

.ngo-pm-card-location .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.ngo-pm-card-excerpt {
    color: var(--ngo-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

.ngo-pm-card-footer {
    margin-top: auto;
    padding-top: 18px;
}

.ngo-pm-read-more,
a.ngo-pm-donate,
button.ngo-pm-filter-submit {
    display: inline-block;
    background: var(--ngo-primary);
    color: var(--ngo-on-primary);
    padding: 10px 18px;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    border: 0;
    border-radius: var(--theme-button-border-radius, var(--ngo-radius));
    cursor: pointer;
}

.ngo-pm-read-more:hover,
a.ngo-pm-donate:hover,
button.ngo-pm-filter-submit:hover {
    background: var(--ngo-primary-hover);
    color: var(--ngo-on-primary-hover);
}

/* ==========================================================================
   List View
   ========================================================================== */

.ngo-pm-list {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 40px;
}

.ngo-pm-list .ngo-pm-card {
    flex-direction: row;
    align-items: stretch;
    height: auto;
}

.ngo-pm-list .ngo-pm-card-image {
    flex: 0 0 38%;
    max-width: 420px;
    aspect-ratio: auto;
    min-height: 220px;
}

.ngo-pm-list .ngo-pm-card-content {
    flex: 1;
    justify-content: center;
    padding: 28px 32px;
    min-width: 0;
}

.ngo-pm-list-item {
    background: #fff;
    border: 1px solid var(--ngo-border);
    padding: 24px;
    display: flex;
    gap: 24px;
}

.ngo-pm-list-image {
    flex-shrink: 0;
    width: 200px;
    border-radius: 0;
    overflow: hidden;
}

.ngo-pm-list-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ngo-pm-list-content {
    flex: 1;
}

.ngo-pm-list-title {
    margin: 0 0 12px 0;
    font-size: 24px;
    font-weight: 700;
}

.ngo-pm-list-title a {
    color: var(--ngo-dark);
    text-decoration: none;
    transition: color 0.3s ease;
}

.ngo-pm-list-title a:hover {
    color: var(--ngo-primary);
}

.ngo-pm-list-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 12px;
}

.ngo-pm-meta-status,
.ngo-pm-meta-location,
.ngo-pm-meta-date {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
}

.ngo-pm-meta-status {
    padding: 4px 12px;
    border-radius: 0;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
}

.ngo-pm-list-excerpt {
    color: var(--ngo-secondary);
    line-height: 1.6;
    margin-bottom: 15px;
}

/* ==========================================================================
   Single Project
   ========================================================================== */

.ngo-pm-single-project-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

.ngo-pm-project-hero {
    margin-bottom: 40px;
    border-radius: var(--ngo-radius);
    overflow: hidden;
    box-shadow: var(--ngo-shadow-lg);
}

.ngo-pm-project-hero img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
}

.ngo-pm-project-container {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
    align-items: start;
}

/* Main Content */
.ngo-pm-project-main,
.ngo-pm-project-sidebar {
    min-width: 0;
}

.ngo-pm-project-main {
    background: transparent;
    padding: 0;
}

.ngo-pm-project-header {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 2px solid var(--ngo-border);
}

.ngo-pm-project-title {
    margin: 0 0 15px 0;
    color: var(--ngo-dark);
}

.ngo-pm-single-project h2,
.ngo-pm-single-project h3 {
    color: var(--ngo-dark);
}

.ngo-pm-back-link {
    display: inline-block;
    margin-bottom: 12px;
    color: var(--theme-link-initial-color, var(--ngo-primary));
    text-decoration: none;
    font-weight: 600;
}

.ngo-pm-project-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.ngo-pm-meta-categories {
    display: flex;
    gap: 8px;
}

.ngo-pm-category {
    padding: 6px 14px;
    background: var(--ngo-light);
    border-radius: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--ngo-primary);
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.ngo-pm-category:hover {
    border-color: var(--ngo-primary);
    background: #fff;
}

.ngo-pm-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0;
    border: 0;
    background: transparent;
    border-radius: 0;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--ngo-dark);
}

.ngo-pm-status .dashicons,
.ngo-pm-meta-location .dashicons {
    width: 16px;
    height: 16px;
    font-size: 16px;
    color: var(--ngo-primary);
}

.ngo-pm-project-content {
    line-height: inherit;
    color: inherit;
    margin-bottom: 40px;
}

.ngo-pm-project-content p {
    margin-bottom: 20px;
}

.ngo-pm-project-section {
    margin-bottom: 40px;
    padding: 28px 0 0;
    background: transparent;
    border-radius: 0;
    border-top: 1px solid var(--ngo-border);
    border-left: 0;
}

.ngo-pm-project-section h2,
.ngo-pm-project-section h3 {
    color: var(--ngo-dark);
}

.ngo-pm-section-content {
    line-height: 1.7;
    color: inherit;
}

/* ==========================================================================
   Gallery Slider
   ========================================================================== */

/* Gallery count badge */
.ngo-pm-gallery-count {
    display: inline-block;
    margin-left: 10px;
    padding: 0;
    background: transparent;
    color: inherit;
    border-radius: 0;
    font-size: 14px;
    font-weight: 600;
}

/* Slider wrapper */
.ngo-pm-gallery-slider-wrapper {
    position: relative;
    max-width: 100%;
    margin: 20px 0;
}

/* Main slider container */
.ngo-pm-gallery-slider {
    position: relative;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    background: var(--ngo-border);
    border-radius: 0;
    overflow: hidden;
}

/* Individual slide */
.ngo-pm-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ngo-pm-slide.active {
    opacity: 1;
    z-index: 1;
}

.ngo-pm-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Slide caption */
.ngo-pm-slide-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.82);
    color: #fff;
    padding: 40px 20px 20px;
    font-size: 14px;
    text-align: center;
}

/* Navigation arrows */
.ngo-pm-slider-prev,
.ngo-pm-slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 0;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #dcdcde;
}

.ngo-pm-slider-prev:hover,
.ngo-pm-slider-next:hover {
    background: #fff;
}

.ngo-pm-slider-prev {
    left: 20px;
}

.ngo-pm-slider-next {
    right: 20px;
}

.ngo-pm-slider-prev .dashicons,
.ngo-pm-slider-next .dashicons {
    font-size: 30px;
    width: 30px;
    height: 30px;
    color: var(--ngo-primary);
}

/* Slide counter */
.ngo-pm-slider-counter {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 8px 16px;
    border-radius: 0;
    font-size: 14px;
    font-weight: 600;
    z-index: 10;
}

/* Thumbnail navigation */
.ngo-pm-slider-thumbs {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    overflow-x: auto;
    padding: 10px 0;
    scrollbar-width: thin;
    scrollbar-color: var(--ngo-primary) #e2e8f0;
}

.ngo-pm-slider-thumbs::-webkit-scrollbar {
    height: 8px;
}

.ngo-pm-slider-thumbs::-webkit-scrollbar-track {
    background: #e2e8f0;
    border-radius: 0;
}

.ngo-pm-slider-thumbs::-webkit-scrollbar-thumb {
    background: var(--ngo-primary);
    border-radius: 0;
}

.ngo-pm-thumb {
    flex-shrink: 0;
    width: 100px;
    height: 80px;
    cursor: pointer;
    border: 3px solid transparent;
    border-radius: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    opacity: 0.6;
}

.ngo-pm-thumb:hover {
    opacity: 0.8;
}

.ngo-pm-thumb.active {
    border-color: var(--ngo-primary);
    opacity: 1;
}

.ngo-pm-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Documents */
.ngo-pm-documents ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ngo-pm-documents li {
    margin-bottom: 12px;
}

.ngo-pm-document-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #fff;
    border: 2px solid var(--ngo-border);
    border-radius: 0;
    text-decoration: none;
    color: var(--ngo-dark);
    transition: all 0.3s ease;
}

.ngo-pm-document-link:hover {
    border-color: var(--ngo-primary);
    color: var(--ngo-primary);
    transform: translateX(5px);
}

/* Tags */
.ngo-pm-project-tags {
    padding-top: 20px;
    border-top: 1px solid var(--ngo-border);
}

.ngo-pm-tag {
    display: inline-block;
    padding: 5px 12px;
    margin: 0 8px 8px 0;
    background: var(--ngo-light);
    border-radius: 0;
    font-size: 13px;
    text-decoration: none;
    color: var(--ngo-secondary);
    transition: all 0.3s ease;
}

.ngo-pm-tag:hover {
    background: var(--ngo-primary);
    color: #fff;
}

/* ==========================================================================
   Sidebar
   ========================================================================== */

.ngo-pm-project-sidebar {
    position: static;
}

.ngo-pm-sidebar-widget {
    background: transparent;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    margin-bottom: 24px;
}

.ngo-pm-sidebar-widget h3 {
    margin: 0 0 20px 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--ngo-dark);
    padding-bottom: 15px;
    border-bottom: 2px solid var(--ngo-border);
}

.ngo-pm-info-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.ngo-pm-info-item {
    padding-bottom: 15px;
    border-bottom: 1px solid var(--ngo-border);
}

.ngo-pm-info-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.ngo-pm-info-item.ngo-pm-info-list-item {
    padding-bottom: 20px;
}

.ngo-pm-info-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--ngo-secondary);
    font-weight: 600;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ngo-pm-info-label .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    color: var(--ngo-primary);
}

.ngo-pm-project-section ul,
.ngo-pm-ticks {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ngo-pm-project-section ul > li,
.ngo-pm-ticks > li {
    position: relative;
    padding: 8px 0 8px 32px;
}

.ngo-pm-project-section ul > li::before,
.ngo-pm-ticks > li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    top: 8px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--ngo-primary);
    color: var(--ngo-on-primary);
    font-size: 11px;
    line-height: 18px;
    text-align: center;
    font-weight: 700;
}

.ngo-pm-info-value {
    font-size: 15px;
    color: var(--ngo-dark);
    font-weight: 600;
}

/* Sidebar lists for milestones and partners */
.ngo-pm-sidebar-list {
    list-style: none;
    padding: 0;
    margin: 8px 0 0 0;
}

.ngo-pm-sidebar-list li {
    position: relative;
    padding: 8px 0 8px 24px;
    font-size: 14px;
    font-weight: 500;
    color: var(--ngo-dark);
    line-height: 1.5;
    border-bottom: 1px dashed var(--ngo-border);
}

.ngo-pm-sidebar-list li:last-child {
    border-bottom: none;
}

.ngo-pm-sidebar-list li:before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 8px;
    width: 18px;
    height: 18px;
    background: var(--ngo-primary);
    color: var(--ngo-on-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
}

/* Special styling for partners list */
.ngo-pm-info-item:has(.ngo-pm-info-label:contains('Partners')) .ngo-pm-sidebar-list li:before {
    content: '🤝';
    background: transparent;
    font-size: 14px;
}

/* Related Projects */
.ngo-pm-related-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.ngo-pm-related-item {
    display: flex;
    gap: 12px;
}

.ngo-pm-related-thumb {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 0;
    overflow: hidden;
}

.ngo-pm-related-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ngo-pm-related-title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
}

.ngo-pm-related-title a {
    color: var(--ngo-dark);
    text-decoration: none;
    transition: color 0.3s ease;
}

.ngo-pm-related-title a:hover {
    color: var(--ngo-primary);
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.ngo-pm-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}

.ngo-pm-pagination .page-numbers {
    padding: 10px 16px;
    background: #fff;
    border: 2px solid var(--ngo-border);
    border-radius: 0;
    text-decoration: none;
    color: var(--ngo-dark);
    font-weight: 600;
    transition: all 0.3s ease;
}

.ngo-pm-pagination .page-numbers:hover,
.ngo-pm-pagination .page-numbers.current {
    background: var(--ngo-primary);
    color: #fff;
    border-color: var(--ngo-primary);
}

/* ==========================================================================
   Archive Page
   ========================================================================== */

.ngo-pm-archive-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

.ngo-pm-archive-header {
    text-align: center;
    margin-bottom: 40px;
}

.ngo-pm-archive-title {
    font-weight: inherit;
    margin: 0 0 15px 0;
    color: var(--ngo-dark);
}

.ngo-pm-archive-description {
    font-size: 18px;
    color: var(--ngo-secondary);
    max-width: 700px;
    margin: 0 auto;
}

/* ==========================================================================
   No Projects Message
   ========================================================================== */

.ngo-pm-no-projects {
    text-align: center;
    padding: 60px 20px;
    background: var(--ngo-light);
    border-radius: var(--ngo-radius);
    font-size: 18px;
    color: var(--ngo-secondary);
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 1024px) {
    .ngo-pm-project-container {
        grid-template-columns: 1fr;
    }
    
    .ngo-pm-project-sidebar {
        position: static;
    }
}

@media (max-width: 1100px) {
    .ngo-pm-filter-bar {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .ngo-pm-search,
    .ngo-pm-filter-actions {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .ngo-pm-columns-2,
    .ngo-pm-columns-3,
    .ngo-pm-columns-4 {
        grid-template-columns: 1fr;
    }
    
    .ngo-pm-list-item,
    .ngo-pm-list .ngo-pm-card {
        flex-direction: column;
    }

    .ngo-pm-list .ngo-pm-card-image {
        flex: none;
        width: 100%;
        max-width: none;
        aspect-ratio: 16 / 10;
        min-height: 0;
    }
    
    .ngo-pm-list-image {
        width: 100%;
        height: 200px;
    }
    
    .ngo-pm-project-main {
        padding: 0;
    }
    
    .ngo-pm-project-title {
        font-size: 28px;
    }
    
    .entry-content > .ngo-pm-archive,
    .ngo-pm-archive {
        margin-top: 28px;
        margin-block-start: 28px;
    }

    .ngo-pm-filter-bar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .ngo-pm-search,
    .ngo-pm-filter-actions {
        grid-column: 1 / -1;
    }

    .ngo-pm-filter-actions {
        flex-wrap: nowrap;
        justify-content: flex-end;
        width: 100%;
        gap: 10px;
    }

    .ngo-pm-layout-switch {
        margin-right: auto;
    }

    .ngo-pm-filter-submit,
    .ngo-pm-filter-reset {
        height: 42px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
        white-space: nowrap;
    }
    
    .ngo-pm-filter-select {
        width: 100%;
    }
    
    .ngo-pm-slider-prev,
    .ngo-pm-slider-next {
        width: 40px;
        height: 40px;
    }
    
    .ngo-pm-slider-prev {
        left: 10px;
    }
    
    .ngo-pm-slider-next {
        right: 10px;
    }
    
    .ngo-pm-thumb {
        width: 80px;
        height: 60px;
    }
}

@media (max-width: 480px) {
    .ngo-pm-project-main {
        padding: 0;
    }

    .ngo-pm-card-kicker {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .ngo-pm-card-location {
        flex-basis: 100%;
        margin-left: 0;
    }

    .ngo-pm-project-title {
        font-size: 24px;
    }
    
    .ngo-pm-slider-prev,
    .ngo-pm-slider-next {
        width: 35px;
        height: 35px;
    }
    
    .ngo-pm-slider-counter {
        font-size: 12px;
        padding: 6px 12px;
    }
    
    .ngo-pm-thumb {
        width: 60px;
        height: 50px;
    }
    
    .ngo-pm-gallery-count {
        display: block;
        margin-left: 0;
        margin-top: 8px;
    }
    
    .ngo-pm-archive-title {
        font-size: 32px;
    }
}

.ngo-pm-archive-intro h2 {
    margin: 0 0 8px;
}

.ngo-pm-filter-form {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
}

.ngo-pm-filter-group label,
.ngo-pm-search label {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
}

.ngo-pm-filter-submit,
.ngo-pm-filter-reset,
.ngo-pm-donate,
.ngo-pm-read-more {
    display: inline-block;
}

.ngo-pm-progress {
    height: 8px;
    background: var(--ngo-border);
    margin: 6px 0 10px;
}

.ngo-pm-progress > span:first-child {
    display: block;
    height: 100%;
    background: var(--ngo-primary);
}

.ngo-pm-funding-meter {
    margin: -6px 0 4px;
}

.ngo-pm-progress {
    position: relative;
    overflow: visible;
}

.ngo-pm-progress-tip {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    transform: translateX(-50%);
    width: max-content;
    max-width: 220px;
    height: auto;
    padding: 6px 8px;
    background: var(--ngo-dark);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    z-index: 2;
}

.ngo-pm-progress:hover .ngo-pm-progress-tip,
.ngo-pm-progress:focus .ngo-pm-progress-tip,
.ngo-pm-progress:focus-within .ngo-pm-progress-tip {
    opacity: 1;
}

.ngo-pm-funding-meter .ngo-pm-donate {
    display: block;
    width: 100%;
    margin-top: 12px;
    text-align: center;
}

.ngo-pm-single-wrap {
    width: min(100% - 32px, var(--theme-normal-container-max-width, var(--theme-container-width, 1140px)));
    max-width: 100%;
    margin: 20px auto 72px;
    overflow: visible;
}

.ngo-pm-breadcrumbs {
    margin: 0 0 18px;
    font-family: var(--theme-font-family, inherit);
    font-size: var(--theme-font-size, inherit);
    font-weight: var(--theme-font-weight, inherit);
    color: var(--theme-text-color, inherit);
}

.ngo-pm-breadcrumbs .ct-breadcrumbs,
.ngo-pm-breadcrumbs a,
.ngo-pm-breadcrumbs .last-item {
    color: var(--theme-text-color, inherit);
    font-family: var(--theme-font-family, inherit);
}

.ngo-pm-breadcrumbs a {
    color: var(--theme-link-initial-color, var(--theme-text-color, inherit));
    text-decoration: none;
}

.ngo-pm-breadcrumb-sep {
    margin: 0 0.4em;
}

.entry-content .ngo-pm-single-project,
.ngo-pm-single-project {
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    overflow: visible;
}

.ngo-pm-challenges {
    background: #f6f7f8;
    border: 1px solid #e4e7eb;
    padding: 24px 28px;
}

.ngo-pm-sidebar-widget.ngo-pm-sidebar-milestones {
    background: #f6f7f8;
    border: 1px solid #e4e7eb;
    padding: 24px 22px;
}

.ngo-pm-sidebar-milestones h2 {
    margin: 0 0 8px;
}

.ngo-pm-sidebar-milestones ol {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ngo-pm-sidebar-milestones li {
    padding: 14px 0;
    border-top: 1px solid var(--ngo-border);
}

.ngo-pm-sidebar-milestones h3 {
    margin: 0 0 4px;
    font-size: 1rem;
}

.ngo-pm-sidebar-milestones p {
    margin: 0 0 6px;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
}

.ngo-pm-milestone-meta {
    color: var(--ngo-secondary);
    font-weight: 600;
}

.ngo-pm-table-scroll {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
}

.ngo-pm-cover,
.ngo-pm-slide img,
.ngo-pm-map,
.ngo-pm-card-image img {
    max-width: 100%;
}

.ngo-pm-project-sidebar .ngo-pm-map {
    height: 200px;
    margin-top: 16px;
}

.ngo-pm-sidebar-widget .ngo-pm-donate {
    margin-top: 16px;
}

/* The theme already prints the excerpt above this width. */
@media (min-width: 690px) {
    body:has(.page-description) .ngo-pm-project-summary {
        display: none;
    }
}

.ngo-pm-cover {
    display: block;
    width: 100%;
    height: auto;
    max-height: 520px;
    object-fit: cover;
}

.ngo-pm-project-section {
    margin: 32px 0;
    padding-top: 16px;
    border-top: 1px solid var(--ngo-border);
}

.ngo-pm-table {
    width: 100%;
    border-collapse: collapse;
}

.ngo-pm-table th,
.ngo-pm-table td {
    border: 1px solid var(--ngo-border);
    padding: 8px 10px;
    text-align: left;
}

.ngo-pm-project-section.ngo-pm-challenges {
    background: #f6f7f8;
    border: 1px solid #e4e7eb;
    padding: 24px 28px;
}

.ngo-pm-map {
    width: 100%;
    height: 320px;
    border: 1px solid var(--ngo-border);
}

.ngo-pm-contributors,
.ngo-pm-milestones,
.ngo-pm-documents,
.ngo-pm-related-list,
.ngo-pm-stat-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ngo-pm-contributors li {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.ngo-pm-contributor-logo {
    width: 72px;
    height: 72px;
    object-fit: contain;
}

.ngo-pm-note,
.ngo-pm-file-size {
    color: #475569;
    font-size: 0.9em;
}

.ngo-pm-pagination {
    margin-top: 24px;
}

.ngo-pm-pagination .page-numbers {
    display: inline-block;
    margin-right: 6px;
    padding: 4px 8px;
    border: 1px solid var(--ngo-border);
    text-decoration: none;
}

