/* ====================================================
   GCBC EVIDENCE REPOSITORY - MODERN LIST & GRID UI
   ==================================================== */

:root {
    --er-green: #528E61;
    --er-dark-green: #3d6e4b;
    --er-light-bg: #EBF4F7;
    --er-text-grey: #555555;
    --er-orange: #F0C48D;
    --er-border: #E0E0E0;
    --er-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
    --er-hover-shadow: 0 15px 40px rgba(82, 142, 97, 0.15);
}

.er-repository-wrapper {
    font-family: 'Poppins', sans-serif;
    color: var(--er-text-grey);
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* ----------------------------------
   1. FILTER SECTION DESIGN
---------------------------------- */
.pfg-filter-section-full {
    background-color: #ffffff;
    padding: 35px;
    border-radius: 16px;
    margin-bottom: 50px;
    box-shadow: var(--er-shadow);
    border: 1px solid var(--er-border);
}

.pfg-filter-header h3 {
    color: var(--er-green);
    font-size: 26px;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 25px;
}

/* Search Bar */
.pfg-search-bar input {
    width: 100%;
    padding: 16px 25px;
    border: 1px solid var(--er-border);
    border-radius: 50px;
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    background-color: #fcfcfc;
    outline: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.pfg-search-bar input:focus {
    border-color: var(--er-green);
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(82, 142, 97, 0.1);
}

/* Dropdown Grid */
.pfg-taxonomies-wrap {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.pfg-above-label {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
}

/* Dropdown Button */
.pfg-custom-dropdown {
    position: relative;
    background: #fff;
    border: 1px solid var(--er-border);
    border-radius: 8px;
    padding: 0; /* Removed padding from here */
    cursor: pointer; /* Makes the whole box show the pointer hand */
    font-size: 14px;
    color: #444;
    transition: all 0.2s ease;

}

.pfg-custom-dropdown:hover {
   border-color: var(--er-green);
    background-color: var(--er-light-bg);
}

.pfg-dropdown-header {
display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
    padding: 14px 18px; /* Moved padding to here so it stretches full width */
    width: 100%;
    box-sizing: border-box;
}

.pfg-dropdown-arrow {
    color: var(--er-green);
    font-weight: bold;
}

/* Dropdown Menu List */
.pfg-dropdown-list {
    display: none; /* Handled by your existing JS */
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    width: 100%;
    background: #fff;
    border: 1px solid var(--er-border);
    border-radius: 8px;
    box-shadow: var(--er-shadow);
    z-index: 100;
    max-height: 250px;
    overflow-y: auto;
    padding: 10px 0;
}

/* Dropdown Radio Items */
.pfg-radio-label {
    display: flex;
    align-items: center;
    padding: 10px 18px;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 13px;
    color: #555;
}

.pfg-radio-label:hover {
    background: var(--er-light-bg);
    color: var(--er-green);
}

.pfg-radio-label input {
    display: none; /* Hide default radio */
}

/* Custom Radio Button Circle */
.pfg-radio-custom {
    width: 16px;
    height: 16px;
    border: 2px solid #ccc;
    border-radius: 50%;
    margin-right: 12px;
    position: relative;
    display: inline-block;
}

.pfg-radio-label input:checked + .pfg-radio-custom {
    border-color: var(--er-green);
}

.pfg-radio-label input:checked + .pfg-radio-custom::after {
    content: '';
    position: absolute;
    top: 3px; left: 3px; right: 3px; bottom: 3px;
    background: var(--er-green);
    border-radius: 50%;
}

/* Filter Actions (Reset & Sort) */
.pfg-action-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 35px;
    padding-top: 25px;
    border-top: 1px solid var(--er-border);
    flex-wrap: wrap;
    gap: 15px;
}

#pfg-reset-btn {
    background: transparent;
    border: 2px solid var(--er-green);
    color: var(--er-green);
    padding: 10px 24px;
    border-radius: 30px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#pfg-reset-btn:hover {
    background: var(--er-green);
    color: #fff;
}

.pfg-sort-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pfg-sort-label {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.pfg-sort-select {
    padding: 10px 16px;
    border: 1px solid var(--er-border);
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    outline: none;
    background: #fff;
    color: #444;
    cursor: pointer;
}

/* ----------------------------------
   2. GRID & CARD DESIGN
---------------------------------- */
.pfg-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 35px;
}

.pfg-card.er-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: var(--er-shadow);
    transition: all 0.4s ease;
    border: 1px solid #f2f2f2;
    position: relative;
}

/* Card Hover Animation */
.pfg-card.er-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--er-hover-shadow);
    border-color: #d1e2d6;
}

/* Card Image with Angled Cut */
.pfg-card-image {
    height: 220px;
    background-size: cover;
    background-position: center;
    position: relative;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    /* Exactly matches the bottom-right angle cut from the single page */
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 35px), calc(100% - 35px) 100%, 0 100%);
}

/* Publication Type Badge */
.er-badge-type {
    position: absolute;
    top: 20px;
    left: 20px;
    background: var(--er-green);
    color: #fff;
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* Card Content Area */
.pfg-card-content {
    padding: 25px 30px 15px;
}

.pfg-date {
    display: block;
    color: var(--er-green);
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pfg-title {
    font-size: 20px;
    color: #222;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 15px 0;
    transition: color 0.2s ease;
}

.pfg-card.er-card:hover .pfg-title {
    color: var(--er-green);
}

.er-card-summary {
    font-size: 14.5px;
    color: #666;
    line-height: 1.6;
    margin: 0;
    /* Forces summary to crop perfectly after 3 lines */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Card Button Area */
.pfg-card-footer {
    padding: 0 30px 30px;
}

.er-read-more-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    background: transparent;
    color: var(--er-green);
    border: 2px solid var(--er-green);
    padding: 14px 20px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

/* Button Hover Fill */
.er-read-more-btn:hover {
    background: var(--er-green);
    color: #fff;
}



/* Force dropdowns to appear above everything else and prevent cutoff */
.pfg-taxonomies-wrap {
    overflow: visible !important;
}
.pfg-custom-dropdown {
    position: relative;
}
.pfg-dropdown-list {
    display: none;
    z-index: 99999 !important;
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    width: 100%;
}

.evidence_product-template-default section.page-banner {
    display: none;
}