@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700;800&family=Poppins:wght@300;400;500;600;700&display=swap');

/* ============================================================
   WRAPPER
============================================================ */
.luyah-resource-filter-wrapper {
    font-family: 'Poppins', sans-serif;
    margin: 0 0 40px 0;
    animation: luyahSlideDown 0.6s ease-out;
}

@keyframes luyahSlideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   FILTER CARD
============================================================ */
.luyah-filter-card {
    background: linear-gradient(135deg, #2E6EB5 0%, #255d9a 50%, #1d4d80 100%);
    border-radius: 16px;
    padding: 22px 26px;
    box-shadow:
        0 10px 40px rgba(46, 110, 181, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    position: relative;
    overflow: hidden;
    margin-bottom: 32px;
}

.luyah-filter-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 160px;
    background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.13) 0%, transparent 55%);
    pointer-events: none;
}

.luyah-filter-card::after {
    content: '';
    position: absolute;
    bottom: -45px; right: -45px;
    width: 260px; height: 260px;
    background: radial-gradient(circle, rgba(255,255,255,0.07) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

/* ============================================================
   SEARCH
============================================================ */
.luyah-search-container {
    margin-bottom: 18px;
    position: relative;
    z-index: 1;
}

.luyah-search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.luyah-search-icon {
    position: absolute;
    left: 18px;
    color: #2E6EB5;
    z-index: 2;
    transition: all 0.3s ease;
    width: 18px;
    height: 18px;
    pointer-events: none;
}

.luyah-search-input {
    width: 100%;
    padding: 14px 50px 14px 50px;
    border: none;
    border-radius: 12px;
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    font-weight: 500;
    background: white;
    color: #333;
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(46, 110, 181, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
}

.luyah-search-input::placeholder { color: #999; }

.luyah-search-input:focus {
    outline: none;
    box-shadow:
        0 8px 36px rgba(46, 110, 181, 0.2),
        0 0 0 3px rgba(46, 110, 181, 0.25);
    transform: translateY(-1px);
}

.luyah-clear-search {
    position: absolute;
    right: 14px;
    background: #f0f0f0;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2;
}

.luyah-clear-search:hover {
    background: #e0e0e0;
    transform: rotate(90deg);
}

.luyah-clear-search svg { color: #666; }

/* ============================================================
   FILTERS ROW
============================================================ */
.luyah-filters-row {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.luyah-filter-group {
    flex: 1;
    min-width: 150px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    animation: luyahFadeInUp 0.5s ease-out backwards;
}

.luyah-filter-group:nth-child(1) { animation-delay: 0.1s; }
.luyah-filter-group:nth-child(2) { animation-delay: 0.2s; }
.luyah-filter-group:nth-child(3) { animation-delay: 0.3s; }

@keyframes luyahFadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.luyah-filter-label {
    font-family: 'Montserrat', sans-serif;
    color: white;
    font-weight: 700;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 6px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.luyah-filter-label svg {
    color: rgba(255,255,255,0.85);
    width: 13px;
    height: 13px;
}

.luyah-filter-select {
    width: 100%;
    padding: 11px 38px 11px 14px;
    border: none;
    border-radius: 10px;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 500;
    background: white;
    color: #333;
    cursor: pointer;
    box-shadow: 0 3px 12px rgba(0,0,0,0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%232E6EB5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 13px center;
    line-height: normal;
    height: auto;
}

.luyah-filter-select:hover {
    box-shadow: 0 5px 20px rgba(46,110,181,0.18);
    transform: translateY(-1px);
}

.luyah-filter-select:focus {
    outline: 2px solid #2E6EB5;
    box-shadow: 0 6px 24px rgba(46,110,181,0.2);
    transform: translateY(-1px);
}

/* ============================================================
   CLEAR FILTERS BUTTON
============================================================ */
.luyah-clear-filters-btn {
    padding: 11px 20px;
    height: 42px;
    background: rgba(255,255,255,0.12);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 10px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: luyahFadeInUp 0.5s ease-out 0.4s backwards;
}

.luyah-clear-filters-btn:hover {
    background: rgba(255,255,255,0.22);
    border-color: rgba(255,255,255,0.55);
    transform: translateY(-1px);
}

.luyah-clear-filters-btn:active {
    transform: translateY(0) scale(0.98);
}

.luyah-clear-filters-btn svg { transition: transform 0.3s ease; }
.luyah-clear-filters-btn:hover svg { transform: rotate(-180deg); }

/* ============================================================
   ACTIVE FILTER TAGS
============================================================ */
.luyah-active-filters {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.luyah-active-filters-label {
    font-family: 'Montserrat', sans-serif;
    color: white;
    font-weight: 700;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    white-space: nowrap;
}

.luyah-filter-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    flex: 1;
}

.luyah-filter-tag {
    background: rgba(255,255,255,0.95);
    color: #2E6EB5;
    padding: 6px 14px;
    border-radius: 18px;
    font-family: 'Poppins', sans-serif;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    animation: luyahPopIn 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes luyahPopIn {
    0%   { opacity: 0; transform: scale(0.5); }
    100% { opacity: 1; transform: scale(1); }
}

.luyah-remove-tag {
    background: transparent;
    border: none;
    color: #2E6EB5;
    cursor: pointer;
    padding: 0;
    width: 15px;
    height: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.luyah-remove-tag:hover {
    background: #2E6EB5;
    color: white;
    transform: rotate(90deg);
}

/* ============================================================
   RESULTS META
============================================================ */
.luyah-results-meta {
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    color: #888;
    margin-bottom: 20px;
}

/* ============================================================
   LOADING SPINNER
============================================================ */
.luyah-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 80px 0;
    width: 100%;
    grid-column: 1 / -1;
}

.luyah-spinner {
    width: 38px;
    height: 38px;
    border: 3px solid #e8e8e8;
    border-top-color: #2E6EB5;
    border-radius: 50%;
    animation: luyahSpin 0.7s linear infinite;
}

@keyframes luyahSpin {
    to { transform: rotate(360deg); }
}

/* ============================================================
   RESOURCES GRID
============================================================ */
.luyah-resources-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

/* ============================================================
   RESOURCE CARD
============================================================ */
.luyah-resource-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.luyah-resource-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 32px rgba(46,110,181,0.18);
}

/* Thumbnail */
.luyah-resource-thumbnail {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
    background: #eef2fa;
}

.luyah-resource-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
}

.luyah-resource-card:hover .luyah-resource-thumbnail img {
    transform: scale(1.06);
}

.luyah-no-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2E6EB5;
    opacity: 0.4;
}

/* Type badge */
.luyah-type-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #2E6EB5;
    color: white;
    font-family: 'Montserrat', sans-serif;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: 5px;
}

/* Body */
.luyah-resource-body {
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 10px;
}

/* Meta tags */
.luyah-resource-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.luyah-meta-tag {
    font-family: 'Poppins', sans-serif;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 5px;
}

.luyah-meta-category {
    background: #eef2fa;
    color: #2E6EB5;
}

.luyah-meta-year {
    background: #f4f4f4;
    color: #777;
}

/* Title */
.luyah-resource-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 17px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.35;
    margin: 0;
}

/* Excerpt */
.luyah-resource-excerpt {
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    color: #666;
    line-height: 1.65;
    margin: 0;
    flex: 1;
}

/* Action buttons */
.luyah-resource-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

.luyah-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    flex: 1;
    border: 2px solid #2E6EB5;
}

.luyah-btn-view {
    background: #2E6EB5;
    color: white;
}

.luyah-btn-view:hover {
    background: #255d9a;
    border-color: #255d9a;
    color: white;
    transform: translateY(-2px);
}

.luyah-btn-download {
    background: white;
    color: #2E6EB5;
}

.luyah-btn-download:hover {
    background: #2E6EB5;
    color: white;
    transform: translateY(-2px);
}

.luyah-no-pdf {
    font-size: 12px;
    color: #bbb;
    font-style: italic;
    margin: 0;
}

/* ============================================================
   NO RESULTS
============================================================ */
.luyah-no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 70px 20px;
    background: #f9f9f9;
    border-radius: 12px;
}

.luyah-no-results svg {
    display: block;
    margin: 0 auto 16px;
    color: #ccc;
}

.luyah-no-results p {
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #444;
    margin: 0 0 6px;
}

.luyah-no-results span {
    font-size: 13px;
    color: #aaa;
}

/* ============================================================
   PAGINATION
============================================================ */
.luyah-pagination-wrapper {
    margin-top: 40px;
    display: flex;
    justify-content: center;
}

.luyah-pagination {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: white;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 6px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.06);
}

.luyah-page-btn {
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #555;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.luyah-page-btn:hover:not([disabled]) {
    background: #eef2fa;
    color: #2E6EB5;
}

.luyah-page-btn.active {
    background: #2E6EB5;
    color: white;
    font-weight: 700;
}

.luyah-page-btn[disabled] {
    opacity: 0.3;
    cursor: not-allowed;
}

.luyah-page-ellipsis {
    color: #bbb;
    font-size: 14px;
    padding: 0 4px;
}

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 1024px) {
    .luyah-resources-grid { grid-template-columns: repeat(2, 1fr); }
    .luyah-filter-group { min-width: 130px; }
}

@media (max-width: 768px) {
    .luyah-filter-card { padding: 18px 20px; border-radius: 12px; }
    .luyah-filters-row { flex-direction: column; align-items: stretch; }
    .luyah-filter-group { min-width: 100%; }
    .luyah-clear-filters-btn { width: 100%; justify-content: center; }
    .luyah-active-filters { flex-direction: column; align-items: flex-start; }
    .luyah-resources-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}

@media (max-width: 580px) {
    .luyah-resources-grid { grid-template-columns: 1fr; }
    .luyah-resource-actions { flex-direction: column; }
}

@media (max-width: 480px) {
    .luyah-filter-card { padding: 15px 16px; }
    .luyah-search-input { font-size: 13px; }
    .luyah-filter-label { font-size: 9px; }
    .luyah-filter-select { font-size: 12px; }
    .luyah-clear-filters-btn { font-size: 10px; }
}