/* --- Card Cards Filter Styles --- */
/* Enhanced Glassmorphism Filter Section */
.card-filters-section {
    background: rgba(255, 255, 255, 0.7);
    /* Lighter for better contrast */
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 50px;
    box-shadow: 0 10px 40px 0 rgba(31, 38, 135, 0.1);
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.card-filters-section form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Search Row */
.search-row {
    width: 100%;
    margin-bottom: 10px;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    max-width: 700px;
    /* Wider search */
    margin: 0 auto;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    /* Subtle shadow */
}

.search-field {
    width: 100%;
    padding: 15px 25px;
    border-radius: 50px 0 0 50px;
    border: 1px solid rgba(200, 200, 200, 0.5);
    border-right: none;
    outline: none;
    background: white;
    font-size: 1rem;
    color: #333;
}

.search-submit {
    padding: 15px 40px;
    border-radius: 0 50px 50px 0;
    border: none;
    background: linear-gradient(135deg, #B27C26 0%, #EBC364 100%);
    /* Diagonal gradient */
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.search-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(178, 124, 38, 0.3);
}

.search-suggestions-box {
    position: absolute;
    top: 100%;
    left: 15px;
    /* Indent slightly */
    right: 15px;
    width: auto;
    background: white;
    border-radius: 0 0 15px 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    z-index: 100;
    display: none;
    overflow: hidden;
    margin-top: 5px;
}

.search-suggestions-box ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.search-suggestions-box li {
    padding: 12px 20px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.95rem;
    color: #444;
}

.search-suggestions-box li:last-child {
    border-bottom: none;
}

.search-suggestions-box li:hover {
    background: #f8f9fa;
    color: #B27C26;
}

/* Filter Grid System */
.filter-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* 3 Columns */
    gap: 20px;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-group label {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    color: #555;
    margin-left: 5px;
}

.filter-select {
    padding: 12px 15px;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    font-size: 0.95rem;
    color: #333;
    transition: all 0.2s;
    appearance: none;
    /* Remove default arrow */
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 16px;
}

.filter-select:hover {
    background-color: white;
    border-color: #B27C26;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.filter-select:focus {
    outline: none;
    border-color: #B27C26;
    box-shadow: 0 0 0 3px rgba(178, 124, 38, 0.1);
}

/* Responsive */
@media(max-width: 992px) {
    .filter-grid {
        grid-template-columns: repeat(2, 1fr);
        /* 2 cols on tablets */
    }
}

@media(max-width: 768px) {
    .card-filters-section {
        padding: 20px;
    }

    .filter-grid {
        grid-template-columns: 1fr;
        /* 1 col on mobile */
    }

    .search-input-wrapper {
        flex-direction: column;
    }

    .search-field {
        border-radius: 10px;
        margin-bottom: 10px;
        border-right: 1px solid rgba(200, 200, 200, 0.5);
    }

    .search-submit {
        border-radius: 10px;
        width: 100%;
    }
}


/* Archive Header Spacing */
.archive-header {
    margin-top: 75px;
}

/* --- Card Archive Layout V2 (Table Style) - Restored --- */

.card-archive-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.card-row-v2 {
    background: #fff;
    border: 3px solid #e2b04c;
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(226, 176, 76, 0.1);
    transition: transform 0.3s;
}

.card-row-v2:hover {
    transform: translateY(-5px);
}

.card-row-header {
    display: flex;
    gap: 30px;
    margin-bottom: 25px;
    align-items: flex-start;
}

.card-image-v2 {
    flex: 0 0 160px;
}

.card-image-v2 img {
    width: 100%;
    height: auto;
    border-radius: 10px;
}

.card-header-main {
    flex: 1;
}

.card-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 15px;
}

.card-title-v2 {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    font-family: 'Poppins', sans-serif;
}

.card-rating-v2 {
    display: flex;
    align-items: center;
    gap: 8px;
}

.stars-v2 {
    color: #e2b04c;
    font-size: 18px;
}

.star-empty {
    color: #e2e8f0;
}

.rating-num {
    font-weight: 600;
    color: #4a5568;
}

.card-sub-header {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* Badge Links Hover Effects */
.badge-v2 {
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    text-decoration: none;
    /* Ensure no underline */
    display: inline-block;
    /* Better for transform */
    transition: all 0.3s ease;
    cursor: pointer;
}

.badge-best-for {
    background: #0f172a;
    color: #fff !important;
}

.badge-best-for:hover {
    background: #1e293b;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.3);
}

.badge-bank {
    background: #f1f5f9;
    color: #334155 !important;
    border: 1px solid #cbd5e1;
}

.badge-bank:hover {
    background: #e2e8f0;
    border-color: #94a3b8;
    color: #1e293b !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.badge-network {
    background: #fff;
    color: #ca8a04 !important;
    border: 2px solid #e2b04c;
}

.badge-network:hover {
    background: #e2b04c;
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(226, 176, 76, 0.2);
}

.apply-btn-box {
    margin-left: auto;
    display: flex;
    gap: 12px;
    align-items: center;
}

.btn-apply-v2,
.btn-view-details-v2 {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s;
    font-size: 14px;
    white-space: nowrap;
    text-align: center;
}

.btn-apply-v2 {
    background: linear-gradient(135deg, #e2b04c 0%, #ca8a04 100%);
    color: #fff !important;
    box-shadow: 0 4px 10px rgba(202, 138, 4, 0.3);
}

.btn-view-details-v2 {
    background: #fff;
    color: #ca8a04 !important;
    border: 2px solid #e2b04c;
    box-shadow: 0 4px 10px rgba(226, 176, 76, 0.1);
}

.btn-apply-v2:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(202, 138, 4, 0.4);
    background: linear-gradient(135deg, #ca8a04 0%, #a16207 100%);
}

.btn-view-details-v2:hover {
    background: #e2b04c;
    color: #fff !important;
    transform: translateY(-2px);
}

/* Detailed Table Styling */
.card-details-table-wrapper {
    width: 100%;
    margin-top: 10px;
}

.card-details-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    border: 1px solid #e2e8f0;
}

.card-details-table th,
.card-details-table td {
    border: 1px solid #e2e8f0;
    padding: 12px 10px;
    text-align: left;
}

.card-details-table th {
    background: #f8fafc;
    color: #475569;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 1px;
}

.card-details-table td {
    color: #1a1a1a;
    line-height: 1.5;
}

/* Pagination Overrides for V2 */
.pagination {
    margin-top: 50px;
    text-align: center;
}

.pagination .page-numbers {
    background: #fff;
    border: 1px solid #e2e8f0;
    color: #4a5568;
    padding: 10px 18px;
    border-radius: 8px;
    margin: 0 4px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.pagination .page-numbers.current,
.pagination .page-numbers:hover {
    background: #e2b04c;
    border-color: #e2b04c;
    color: #fff;
}

/* Responsive Fixes & Mobile Optimization */
@media (max-width: 992px) {
    .card-row-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 20px;
    }

    .card-image-v2 {
        flex: 0 0 auto;
        width: 180px;
        margin: 0 auto;
    }

    .card-title-row {
        flex-direction: column;
        align-items: center;
        text-align: center;
        width: 100%;
    }

    .card-rating-v2 {
        justify-content: center;
        width: 100%;
    }

    .card-sub-header {
        justify-content: center;
        gap: 10px;
    }

    .apply-btn-box {
        margin: 20px auto 0;
        justify-content: center;
        width: 100%;
        flex-wrap: wrap;
    }

    .btn-apply-v2,
    .btn-view-details-v2 {
        flex: 1;
        min-width: 140px;
        font-size: 13px;
        padding: 10px 15px;
    }

    .card-details-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .card-details-table {
        min-width: 700px;
    }
}

@media (max-width: 600px) {
    .card-row-v2 {
        padding: 15px;
        border-width: 2px;
    }

    .card-title-v2 {
        font-size: 20px;
    }

    .card-image-v2 {
        width: 140px;
    }

    .badge-v2 {
        padding: 4px 10px;
        font-size: 11px;
    }

    .kud-card-actions {
        margin: 10px 0 !important;
        justify-content: center;
        width: 100%;
    }

    .apply-btn-box {
        gap: 8px;
    }

    .btn-apply-v2,
    .btn-view-details-v2 {
        width: 100%;
        flex: 0 0 100%;
    }
}

/* Status Filter Styling */
.status-filter-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.filter-btn {
    padding: 10px 24px;
    border-radius: 50px;
    background: #ffffff;
    color: #475569;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    border: 1px solid #e2e8f0;
    transition: all 0.3s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
}

.filter-btn:hover {
    border-color: #2563eb;
    color: #2563eb;
}

.filter-btn.active {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

/* Pagination Styling */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 60px;
    padding: 20px 0;
}

.pagination .page-numbers {
    padding: 10px 18px;
    border-radius: 10px;
    background: #ffffff;
    color: #475569;
    text-decoration: none;
    font-weight: 600;
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
}

.pagination .page-numbers:hover {
    border-color: #2563eb;
    background: #f8fafc;
}

.pagination .page-numbers.current {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
}