
/* ============================================
   1. SEARCH FORM (Homepage)
   ============================================ */

.pei-search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    background: var(--e-global-color-0cfcdd3);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
    margin-left: auto;
    margin-right: auto;
}

.pei-search-form input[type="text"],
.pei-search-form select {
    flex: 1 1 200px;
    padding: 12px 18px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    background: var(--e-global-color-e32c78d);
    transition: 0.2s;
}

.pei-search-form input[type="text"]:focus,
.pei-search-form select:focus {
    border-color: var(--e-global-color-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(44, 95, 45, 0.15);
}

.pei-search-form button {
    background: var(--e-global-color-primary);
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
    flex: 0 0 auto;
}

.pei-search-form button:hover {
    background: #1e4620;
}



.no-results-found {
    background: var(--e-global-color-0cfcdd3, #fff);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--e-global-color-1cfd18e, #eee);
    text-align: center;
}




/* ============================================
   Login
   ============================================ */


   .pmpro_card {
    font-family: var(--e-global-typography-text-font-family), Sans-serif;
}


.pmpro_section {
        font-family: var(--e-global-typography-text-font-family), Sans-serif;
    }

    .pmpro_section #loginform .input{
    border: 1px solid #ddd !important;
    border-radius: 8px !important;
    background: var(--e-global-color-f7d61f2);
}
.pmpro_card {
    margin: 0px !important;
}
input#wp-submit {
    border-radius: 100px !important;
}


.pmpro_btn {
    border-radius: 100px !important;
}
/* ============================================
   2. COLLECTION GRID
   ============================================ */

.pei-collection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.pei-collection-item {
    border-radius: 12px;
    padding: 28px;
    background: var(--e-global-color-0cfcdd3);
    border: 1px solid var(--e-global-color-1cfd18e);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.pei-collection-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.10);
}

.pei-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.pei-collection-item .collection-count {
    display: flex;    
    width: fit-content;
    font-size: 14px;
    font-weight: 600;
    color: var(--e-global-color-primary);
    background: var(--e-global-color-d958f8f);
    padding: 4px 16px;
    border-radius: 20px;
    margin:0 0 8px;
    font-family: var(--e-global-typography-text-font-family);
}

.pei-collection-item a {
    display: block;
    text-decoration: none;
    color: inherit;
}

.pei-collection-count {
    font-size: 12px;
    font-weight: 700;
    color: #7a8a7e;
    letter-spacing: -1px;
    line-height: 1.1;
    font-family: var(--e-global-typography-text-font-family);
    margin-bottom: 6px;
}

.pei-collection-icon {
    font-size: 22px;
    border-radius: 10%;
    display: inline-flex;
    padding: 0.5em;
    fill: var(--e-global-color-primary);
    color: var(--e-global-color-primary);
    margin-bottom: 16px;
    transition: 0.2s;
    background-color: var(--e-global-color-d958f8f);
}

.pei-collection-item:hover .pei-collection-icon {
    color: var(--e-global-color-primary);
}

.pei-collection-item h3 {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: #1a3a1a;
    line-height: 1.3;
}

.pei-collection-item p {
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 1rem !important;
    color: #666;
    margin: 0 0 18px 0;
    font-family: var(--e-global-typography-text-font-family);
}

.pei-collection-item .explore-link {
    display: inline-block;
    font-weight: 600;
    font-size: 15px;
    font-family: var(--e-global-typography-text-font-family);
    color: var(--e-global-color-primary);
    transition: 0.2s;
    padding-bottom: 2px;
}

.pei-collection-item .explore-link:hover {
    color: var(--e-global-color-secondary);
}


/* ============================================
   3. SINGLE RECORD PAGE
   ============================================ */

/* ---------- 3a. Layout & Wrapper ---------- */
.pei-single-record-wrapper {
    max-width: 1140px;
    margin: 0 auto;
    padding: 40px 20px;
}

.pei-single-record {
    display: flex;
    gap: 40px;
}

.pei-record-main {
    flex: 2;
    font-family: var(--e-global-typography-text-font-family), sans-serif;
}

.pei-record-sidebar {
    flex: 1;
    min-width: 280px;
    position: sticky;
    top: 70px;
    align-self: flex-start;
}

/* ---------- 3b. Breadcrumb ---------- */
.pei-breadcrumb {
    font-family: var(--e-global-typography-text-font-family), sans-serif;
    font-size: 14px;
    color: #888;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.pei-breadcrumb a {
    color: #2c5f2d;
    text-decoration: none;
}

.pei-breadcrumb a:hover {
    text-decoration: underline;
}

.pei-breadcrumb .separator {
    margin: 0 8px;
    color: #ccc;
}

.pei-breadcrumb .current {
    color: #333;
    font-weight: 600;
}

/* ---------- 3c. Collection Label ---------- */
.record-collection-label {
    font-size: 12px;
    font-weight: 400;
    color: var(--e-global-color-primary);
    text-transform: uppercase;
    margin-bottom: 6px;
    display: inline-flex;
    padding: 2px 10px;
    background-color: var(--e-global-color-d958f8f);
    border-radius: 999px;
    border: 1px solid #1f4a2e4d;
    font-family: var(--e-global-typography-text-font-family), sans-serif;
}



/* PDF Viewer Section */
.record-pdf-section {
    margin: 30px 0;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.record-pdf-section h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #1a3a1a;
}

.pdf-viewer-wrapper {
    background: #f9f7f2;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.pdf-viewer-wrapper iframe {
    width: 100%;
    height: 600px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
}

.pdf-download-btn {
    display: inline-block;
    margin-top: 12px;
    background: var(--e-global-color-primary, #2c5f2d);
    color: #fff !important;
    padding: 10px 24px;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}

.pdf-download-btn i {
    margin-right: 8px;
}

.pdf-download-btn:hover {
    background: #1e4620;
    color: #fff ;
}



/* ---------- 3d. Featured Image ---------- */
.record-featured-image {
    margin-bottom: 25px;
    border-radius: 12px;
    overflow: hidden;
    background: #f9f7f2;
}

.record-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* ---------- 3e. Title & Meta ---------- */
.record-title {
    font-weight: 700;
    margin: 0 0 12px 0;
    color: #1a3a1a;
    font-family: var(--e-global-typography-primary-font-family), sans-serif;
}

.record-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    /* border-bottom: 1px solid #eee; */
    margin-bottom: 25px;
    padding-bottom: 20px;
    row-gap: 12px;
    align-items: center;
}

.record-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 15px;
    font-family: var(--e-global-typography-text-font-family), sans-serif;
}

.record-meta i {
    margin-right: 6px;
    color: #536056;
}

/* ---------- 3f. Content (Full vs Preview) ---------- */
.record-content {
    margin: 20px 0 30px;
}

.record-content h2,
.record-content h3 {
    margin-top: 25px;
}

.preview-badge {
    display: inline-block;
    background: #e8e3da;
    color: var(--e-global-color-text);
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    padding: 4px 14px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    font-family: var(--e-global-typography-text-font-family), sans-serif;
}

.record-teaser {
    background: var(--e-global-color-f7d61f2);
    padding: 25px;
    border-radius: 12px;
    border: 1px solid var(--e-global-color-1cfd18e);
    font-family: var(--e-global-typography-text-font-family);
}

.record-teaser h3 {
    font-weight: 600;
    margin: 0 0 15px;
}

.record-teaser .preview-badge {
    margin-bottom: 15px;
}

/* ---------- 3g. Unlock Banner ---------- */
.unlock-banner {
    text-align: center;
    padding: 30px 20px;
    background: var(--e-global-color-0cfcdd3);
    border-radius: 8px;
    margin-top: 25px;
}

.unlock-banner h4 {
    font-size: 20px;
    color: #1a3a1a;
    margin: 0 0 8px;
}

.unlock-banner p {
    color: #666;
    margin: 0 0 15px;
}

.btn-member {
    display: inline-block;
    background: var(--e-global-color-primary);
    color: var(--e-global-color-0cfcdd3);
    font-family: var(--e-global-typography-text-font-family), sans-serif;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}

.btn-member:hover {
    background: #1e4620;
}

/* ---------- 3h. About Section ---------- */
.record-about {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.record-about h3 {
    font-size: 20px;
    margin: 0 0 15px;
    color: #1a3a1a;
}

.record-about p {
    line-height: 1.7;
    color: #555;
}

/* ---------- 3i. Related Records ---------- */
.related-records {
    margin-top: 0px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.related-records h2 {
    margin-bottom: 1rem;
}

.related-records h3 {
    font-size: 20px;
    margin: 0 0 6px;
}

.related-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.related-item {
    background: #f9f7f2;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #eee;
    transition: 0.2s;
    display: flex;
    gap: 15px;
    align-items: flex-start;
    font-family: var(--e-global-typography-text-font-family), sans-serif;
}

.related-item:hover {
    border-color: #2c5f2d;
}

.related-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.related-content {
    flex: 1;
}

.related-count {
    display: inline-block;
    font-size: 18px;
    font-weight: 700;
    color: #2c5f2d;
    margin-right: 8px;
}

.related-item .preview-badge {
    font-size: 12px;
    padding: 2px 10px;
    margin-bottom: 5px;
}

.related-item h4 {
    font-size: 15px;
    margin: 5px 0 4px;
}

.related-item h4 a {
    color: #1a3a1a;
    text-decoration: none;
}

.related-item h4 a:hover {
    color: #2c5f2d;
}

.related-meta {
    font-size: 14px;
    color: var(--e-global-color-text);
    margin: 0 0 4px;
}

.record-information {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.related-item .call-number {
    display: block;
    font-size: 14px;
    color: var(--e-global-color-text);
    margin: 0 0 4px;
}

.related-item .view-link {
    display: inline-block;
    font-weight: 600;
    font-size: 14px;
    color: #2c5f2d;
    text-decoration: none;
}

.related-item .view-link:hover {
    text-decoration: underline;
}

/* ---------- 3j. Sidebar Details ---------- */
.record-details {
    background: var(--e-global-color-f7d61f2);
    padding: 24px;
    border-radius: 12px;
    font-family: var(--e-global-typography-text-font-family), sans-serif;
    border: 1px solid var(--e-global-color-1cfd18e);
}

.record-details h3 {
    margin: 0 0 10px;
}

.record-details table {
    width: 100%;
    border-collapse: collapse;
}

.record-details th,
.record-details td {
    padding: 10px 12px;
    border-bottom: 1px solid #e8e3da;
    text-align: left;
    font-size: 14px;
}

.record-details th {
    font-weight: 600;
    color: #333;
    width: 40%;
}

.record-details td {
    color: #555;
}

.record-details tr:last-child th,
.record-details tr:last-child td {
    border-bottom: none;
}

/* ---------- 3k. Sidebar Unlock ---------- */
.sidebar-unlock {
    background: var(--e-global-color-primary);
    color: #fff;
    padding: 24px;
    border-radius: 12px;
    margin-top: 20px;
}

.sidebar-unlock h3 {
    margin: 0 0 8px;
    color: var(--e-global-color-0cfcdd3) !important;
}

.sidebar-unlock p {
    font-size: 14px;
    opacity: 0.9;
    margin: 0 0 15px;
    color: var(--e-global-color-0cfcdd3);
    font-family: var(--e-global-typography-text-font-family), sans-serif;
}

.sidebar-unlock .btn-member {
    background: var(--e-global-color-0cfcdd3);
    color: var(--e-global-color-primary);
    padding: 10px 25px;
    display: flex;
    justify-content: center;
    font-family: var(--e-global-typography-text-font-family), sans-serif;
}

.sidebar-unlock .btn-member:hover {
    background: #f0f0f0;
}


/* ============================================
   4. ACCOUNT LINKS (Header)
   ============================================ */

.pei-account-links {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-family: var(--e-global-typography-text-font-family), sans-serif;
}

.pei-account-links a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--e-global-color-text) !important;
    text-decoration: none;
    transition: color 0.2s;
}

.pei-account-links a i {
    font-size: 16px;
    color: var(--e-global-color-primary);
}

.pei-account-links a:hover {
    color: var(--e-global-color-primary);
}

.pei-account-links .logout-link {
    color: #c0392b;
}

a.logout-link i {
    color: #c0392b;
}

.pei-account-links .logout-link:hover {
    color: #e74c3c;
}


/* ============================================
   5. MEDIA PLAYERS
   ============================================ */

.record-media-player {
    margin: 20px 0 30px;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    background: #000;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

audio {
    width: 100%;
    border-radius: 8px;
}


/* ============================================
   6. ARCHIVE: COLLECTION PAGE
   ============================================ */

.pei-archive-wrapper {
    max-width: 1140px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* ---------- 6a. Header ---------- */
.archive-collection-header {
    display: flex;
    gap: 30px;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.collection-featured-image {
    flex: 0 0 150px;
    border-radius: 12px;
    overflow: hidden;
    background: #f9f7f2;
}

.collection-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

.collection-info {
    flex: 1;
}

.collection-info h1 {
    font-family: var(--e-global-typography-primary-font-family), Sans-serif;
    margin: 0 0 8px;
}

.collection-info span {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    font-family: var(--e-global-typography-text-font-family), sans-serif;
    color: var(--e-global-color-accent);
}

.collection-info .collection-description {
    font-size: 16px;
    color: #555;
    margin: 0 0 6px;
    line-height: 1.5;
    font-family: var(--e-global-typography-text-font-family), sans-serif;
}

.collection-info .collection-count {
    display: inline-block;
    font-size: 14px;
    font-weight: 600;
    color: var(--e-global-color-primary);
    background: var(--e-global-color-d958f8f);
    padding: 4px 16px;
    border-radius: 20px;
}

/* ---------- 6b. Filters ---------- */
.archive-filters {
    background: var(--e-global-color-0cfcdd3);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 30px;
    border: 1px solid var(--e-global-color-1cfd18e);
}

.archive-search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.archive-search-form input[type="text"],
.archive-search-form select {
    flex: 1 1 200px;
    padding: 10px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    background: var(--e-global-color-f7d61f2);
    font-family: var(--e-global-typography-text-font-family), sans-serif;
}

.archive-search-form button {
    background: var(--e-global-color-primary);
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.archive-search-form button:hover {
    background: #1e4620;
}

/* ---------- 6c. Records List ---------- */
.archive-records-list h2 {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 20px;
    color: #1a3a1a;
}

span.records-found {
    font-family: var(--e-global-typography-text-font-family), sans-serif;
}

.records-grid {
    display: grid;
    /* grid-template-columns: 1fr; */
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 370px), 1fr));
    gap: 20px;
    margin-top: 1.25rem;
}

.archive-record-item {
    display: flex;
    gap: 20px;
    background: var(--e-global-color-0cfcdd3);
    border: 1px solid var(--e-global-color-1cfd18e);
    border-radius: 12px;
    padding: 20px;
    font-family: var(--e-global-typography-text-font-family), sans-serif;
    transition: 0.2s;
}

.archive-record-item:hover {
    border-color: var(--e-global-color-primary);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.record-thumbnail {
    flex: 0 0 120px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    background: #e8e3da;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: #aaa;
   
}

.record-thumbnail.placeholder{
  display:none; 
}

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

.record-thumbnail.placeholder i {
    font-size: 40px;
    color: #bbb;
}

.record-summary {
    flex: 1;
}

.record-summary .preview-badge {
    margin-bottom: 8px;
}

.record-summary h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 6px;
}

.record-summary h3 a {
    color: #1a3a1a;
    text-decoration: none;
}

.record-summary h3 a:hover {
    color: var(--e-global-color-primary);
}

.record-meta-archive {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 14px;
    color: #555;
    margin-bottom: 8px;
    font-family: var(--e-global-typography-text-font-family), sans-serif;
}

.record-meta-archive i {
    margin-right: 4px;
    color: #888;
}

.record-excerpt {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin: 0 0 10px;
}

.view-record-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    font-size: 14px;
    color: var(--e-global-color-primary);
    text-decoration: none;
    transition: 0.2s;
}

.view-record-link:hover {
    color: var(--e-global-color-secondary);
    gap: 10px;
}

/* ---------- 6d. Pagination ---------- */


/* Main pagination container */
.pei-search-wrapper .pagination,
.pei-archive-wrapper .pagination,
.archive-pagination {
    text-align: center;
    margin: 40px 0 20px;
    padding: 10px 0;
    border-top: 1px solid #eee;
}

/* Pagination links container */
.nav-links,
.pei-search-wrapper .page-numbers,
.pei-archive-wrapper .page-numbers {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-family: var(--e-global-typography-text-font-family, sans-serif);
}

/* Individual page number links */
.pei-search-wrapper .page-numbers,
.pei-archive-wrapper .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid transparent;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    color: #333;
    text-decoration: none;
    transition: all 0.2s ease;
    background: transparent;
}

/* Current page number */
.pei-search-wrapper .page-numbers.current,
.pei-archive-wrapper .page-numbers.current {
    background: var(--e-global-color-primary, #2c5f2d);
    color: #fff;
    border-color: var(--e-global-color-primary, #2c5f2d);
    font-weight: 600;
}

/* Hover effect for page numbers */
.pei-search-wrapper .page-numbers:hover:not(.current):not(.dots),
.pei-archive-wrapper .page-numbers:hover:not(.current):not(.dots) {
    background: #f0f0f0;
    border-color: #ddd;
}

/* Previous / Next buttons */
.pei-search-wrapper .page-numbers.prev,
.pei-search-wrapper .page-numbers.next,
.pei-archive-wrapper .page-numbers.prev,
.pei-archive-wrapper .page-numbers.next {
    font-weight: 600;
    color: var(--e-global-color-primary, #2c5f2d);
    padding: 0 16px;
}

.pei-search-wrapper .page-numbers.prev:hover,
.pei-search-wrapper .page-numbers.next:hover,
.pei-archive-wrapper .page-numbers.prev:hover,
.pei-archive-wrapper .page-numbers.next:hover {
    background: rgba(44, 95, 45, 0.08);
    border-color: rgba(44, 95, 45, 0.2);
}

/* Dots (…) */
.pei-search-wrapper .page-numbers.dots,
.pei-archive-wrapper .page-numbers.dots {
    color: #888;
    border: none;
    cursor: default;
    min-width: 30px;
}

/* "Page X of Y" indicator (if using the_posts_pagination) */
.pagination .pages {
    display: inline-block;
    padding: 0 16px;
    font-size: 14px;
    color: #888;
}



.no-records {
    text-align: center;
    padding: 40px 0;
    color: #888;
    font-size: 16px;
}


/* ============================================
   7. SEARCH RESULTS PAGE
   ============================================ */

/* ---------- 7a. Wrapper & Header ---------- */
.pei-search-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

.pei-search-header {
    text-align: center;
    margin-bottom: 30px;
}

.pei-search-header h1 {
  font-family: var(--e-global-typography-primary-font-family), Sans-serif;
    margin: 0 0 8px;
}

.pei-search-main-form {
    display: flex;
    max-width: 700px;
    margin: 0 auto;
    gap: 10px;
}

.pei-search-main-form input[type="text"] {
    flex: 1;
   padding: 10px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    background: var(--e-global-color-f7d61f2);
    font-family: var(--e-global-typography-text-font-family), sans-serif;
}

.pei-search-main-form button {
    background: var(--e-global-color-primary, #2c5f2d);
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.pei-search-main-form button:hover {
    background: #1e4620;
}

/* ---------- 7b. Content Layout ---------- */
.pei-search-content {
    display: flex;
    gap: 30px;
}

.pei-search-sidebar {
    flex: 0 0 300px;
    position: sticky;
    top: 70px;
    align-self: flex-start;
}

/* ---------- 7c. Sidebar Filters ---------- */
.search-filters {
  padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--e-global-color-1cfd18e, #eee);
    font-family: var(--e-global-typography-text-font-family), sans-serif;
    background: var(--e-global-color-f7d61f2);
}

.search-filters h2 {
    font-size: 18px !important;
    margin: 0 0 15px !important;
    color: var(--e-global-color-primary, #2c5f2d);
}


.filter-group {
    margin-bottom: 18px;
}

.filter-group label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 5px;
    color: #333;
}

.checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 280px;
    overflow-y: auto;
    padding-right: 4px;
}

.checkbox-list::-webkit-scrollbar {
    width: 4px;
}

.checkbox-list::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 4px;
}

.checkbox-list::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.checkbox-list::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    padding: 3px 6px;
    border-radius: 4px;
    transition: background 0.15s;
}

.checkbox-item:hover {
    background: rgba(44, 95, 45, 0.06);
}

.checkbox-item input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: var(--e-global-color-primary, #2c5f2d);
    cursor: pointer;
    flex-shrink: 0;
}

.checkbox-item .count {
    margin-left: auto;
    font-size: 12px;
    color: #888;
    font-weight: 500;
}

.date-range {
    display: flex;
    gap: 8px;
    align-items: center;
}

.date-range input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
    width: 70px;
}

.apply-filters-btn {
    display: block;
    width: 100%;
    background: var(--e-global-color-primary, #2c5f2d);
    color: #fff;
    border: none;
    padding: 10px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: 0.2s;
}

.apply-filters-btn:hover {
    background: #1e4620;
}

.clear-filters-btn {
    display: block;
    width: 100%;
    background: transparent;
    color: #888;
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: 0.2s;
    margin-top: 8px;
}

.clear-filters-btn:hover {
    background: #f0f0f0;
    border-color: #ccc;
}

/* ---------- 7d. Results ---------- */
.pei-search-results {
    flex: 1;
    font-family: var(--e-global-typography-text-font-family), sans-serif;
}

.results-header {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.results-count {
    font-size: 18px;
    font-weight: 600;
    color: #1a3a1a;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 370px), 1fr));
    gap: 20px;
}

.search-result-item {
    background: var(--e-global-color-0cfcdd3, #fff);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--e-global-color-1cfd18e, #eee);
    transition: 0.2s;
}

.search-result-item:hover {
    border-color: var(--e-global-color-primary, #2c5f2d);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.result-collection-label {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--e-global-color-primary, #2c5f2d);
    background: var(--e-global-color-d958f8f, #e8e3da);
    padding: 2px 10px;
    border-radius: 999px;
    border: 1px solid #1f4a2e4d;
    margin-bottom: 8px;
}

.search-result-item .preview-badge {
    margin-left: 8px;
}

.search-result-item h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 6px;
}

.search-result-item h3 a {
    color: #1a3a1a;
    text-decoration: none;
}

.search-result-item h3 a:hover {
    color: var(--e-global-color-primary, #2c5f2d);
}

.result-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 14px;
    color: #555;
    margin-bottom: 8px;
}

.result-meta i {
    margin-right: 4px;
    color: #888;
}

.result-excerpt {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin: 0 0 10px;
}

.view-record-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    font-size: 14px;
    color: var(--e-global-color-primary, #2c5f2d);
    text-decoration: none;
    transition: 0.2s;
}

.view-record-link:hover {
    color: var(--e-global-color-secondary, #1e4620);
    gap: 10px;
}

.no-records {
    text-align: center;
    padding: 60px 0;
    color: #888;
    font-size: 16px;
}


/* ============================================
   8. RESPONSIVE BREAKPOINTS (Global)
   ============================================ */

/* ---------- Tablet (max-width: 768px) ---------- */
@media (max-width: 768px) {

    /* Search Form (Homepage) */
    .pei-search-form {
        flex-direction: column;
        padding: 15px;
    }


        .pdf-viewer-wrapper iframe {
        height: 400px;
    }



    .pei-search-form input[type="text"],
    .pei-search-form select,
    .pei-search-form button {
        flex: 1 1 auto;
        width: 100%;
    }

    /* Collection Grid */
    .pei-collection-grid {
        grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
        gap: 20px;
    }

    /* Single Record */
    .pei-single-record {
        flex-direction: column-reverse;
        gap: 30px;
    }

    .pei-record-sidebar {
        order: -1;
        width: 100%;
        position: static;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }

    .record-title {
        font-size: 26px;
    }

    .record-meta {
        font-size: 13px;
        gap: 15px;
    }

    .record-teaser {
        padding: 20px 15px;
    }

    .record-details {
        padding: 15px;
    }

    .record-details th,
    .record-details td {
        font-size: 13px;
        padding: 8px 10px;
    }

    /* Archive Collection */
    .archive-collection-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .collection-featured-image {
        flex: 0 0 auto;
        width: 100%;
        max-width: 300px;
    }

    .archive-search-form {
        flex-direction: column;
    }

    .archive-search-form input[type="text"],
    .archive-search-form select,
    .archive-search-form button {
        flex: auto;
        width:stretch   ;
    }   

    .archive-record-item {
        flex-direction: column;
    }

    .record-thumbnail {
        flex: 0 0 auto;
        width: 100%;
        height: 160px;
    }

    .record-meta-archive {
        font-size: 13px;
        gap: 10px;
    }

    /* Search Results */
    .pei-search-content {
        flex-direction: column;
    }

    .pei-search-sidebar {
        flex: none;
        width: 100%;
        position: static;
    }

    .pei-search-main-form {
        flex-direction: column;
    }

    .pei-search-main-form input[type="text"],
    .pei-search-main-form button {
        width:-webkit-fill-available;
    }
}

/* ---------- Mobile (max-width: 480px) ---------- */
@media (max-width: 480px) {

    /* Collection Grid */
    .pei-collection-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }


    .pdf-viewer-wrapper iframe {
        height: 300px;
    }

    .pei-collection-item {
        padding: 24px;
    }

    .pei-collection-icon {
        font-size: 20px;
    }

    /* Single Record - Related Items */
    .related-item {
        flex-direction: column;
    }

    .related-thumb {
        width: 100%;
        height: 120px;
    }

    /* Archive Collection */
    .collection-info h1 {
        font-size: 24px;
    }

    .record-thumbnail {
        height: 120px;
    }

    /* Search Results */
    .pei-search-header h1 {
        font-size: 24px;
    }

    .pei-search-wrapper .page-numbers,
    .pei-archive-wrapper .page-numbers {
        min-width: 34px;
        height: 34px;
        font-size: 13px;
        padding: 0 8px;
    }
    .pei-search-wrapper .page-numbers.prev,
    .pei-search-wrapper .page-numbers.next,
    .pei-archive-wrapper .page-numbers.prev,
    .pei-archive-wrapper .page-numbers.next {
        padding: 0 10px;
        font-size: 13px;
    }
    .nav-links {
        gap: 2px;
    }
}