/* -------------------------
   CARD DATABASE STYLES - HORIZONTAL
   ------------------------- */

/* Container overrides */
.card-db-container {
    padding: 40px 0;
    display: block;
    /* Stacked layout now */
}

/* Horizontal Filter Bar */
.filter-bar-container {
    background: #1a1a1d;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 30px;
    position: sticky;
    top: 70px;
    /* Adjust based on header height */
    z-index: 900;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
}

.filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}

.filter-item {
    flex: 1;
    min-width: 140px;
}

.filter-item.search-item {
    flex: 1.5;
    min-width: 200px;
}

.filter-item.narrow-item {
    flex: 0.8;
    min-width: 100px;
}

.filter-label {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    color: #888;
    margin-bottom: 6px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.filter-input-field {
    width: 100%;
    padding: 0 12px;
    background: #0f0f12;
    border: 1px solid #333;
    color: #fff;
    border-radius: 6px;
    height: 42px;
    /* Fixed height for alignment */
    box-sizing: border-box;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.2s;
}

.filter-input-field:focus {
    border-color: var(--color-rich);
    outline: none;
}

.filter-actions {
    display: flex;
    gap: 10px;
    flex: 0 0 auto;
}

.btn-filter,
.btn-reset {
    height: 42px;
    padding: 0 20px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-filter {
    background: var(--color-rich);
    color: white;
    border: none;
    flex: 1;
}

.btn-filter:hover {
    background: #357abd;
    transform: translateY(-2px);
}

.btn-reset {
    background: transparent;
    border: 1px solid #444;
    color: #aaa;
}

.btn-reset:hover {
    border-color: #666;
    color: white;
}

/* Results Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 30px;
}

.card-item {
    display: block;
    text-decoration: none;
    transition: transform 0.2s;
    position: relative;
    border-radius: 15px;
}

.card-item:hover {
    transform: translateY(-5px);
    z-index: 10;
}

.card-wrapper {
    background: transparent;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.no-results {
    text-align: center;
    padding: 80px 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px dashed rgba(255, 255, 255, 0.1);
}

@media (max-width: 900px) {
    .filter-form {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-actions {
        flex-direction: row;
    }

    .filter-bar-container {
        position: static;
        /* Unstick on mobile to avoid eating screen space */
    }
}