/* Premium Grid View 3 Styling */

.grid-controls-wrapper {
    background: var(--bg-surface);
    padding: 20px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.filter-control {
    width: 100%;
    height: 48px;
    padding: 0 15px;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition-smooth);
}

.filter-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(48, 67, 0, 0.1);
    outline: none;
}

/* Card Modernization */
.view-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.data-card {
    background: var(--bg-surface);
    border-radius: 16px; /* Slightly more defined radius */
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04); /* Lighter shadow */
    transition: var(--transition-smooth);
    border: 1px solid rgba(0, 0, 0, 0.05);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.data-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.card-image-wrapper {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.data-card:hover .card-image {
    transform: scale(1.05);
}

.card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(48, 67, 0, 0.85);
    backdrop-filter: blur(8px);
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    color: white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    z-index: 2;
}

.card-content {
    padding: 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 19px;
    font-weight: 900;
    color: var(--text-main);
    margin: 0 0 16px 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 3em; /* Ensure consistent height for titles */
}

.card-meta {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #64748b;
    font-weight: 600;
}

.meta-item i {
    width: 20px;
    text-align: center;
    color: var(--secondary);
    font-size: 14px;
}

.card-footer {
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.btn-details {
    width: 100%;
    height: 46px;
    background: white;
    color: var(--primary);
    border: 1.5px solid var(--primary);
    border-radius: 12px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: var(--transition-smooth);
    font-size: 14px;
}

.btn-details:hover {
    background: var(--primary);
    color: white;
    box-shadow: 0 8px 16px rgba(48, 67, 0, 0.15);
    transform: translateY(-2px);
}

/* List Mode Overrides */
.view-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.view-list .data-card {
    flex-direction: row;
    height: auto;
}

.view-list .card-image-wrapper {
    width: 260px;
    height: 180px;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .view-list .data-card {
        flex-direction: column;
    }
    .view-list .card-image-wrapper {
        width: 100%;
    }
}
