/* Data Explorer Archive Styles */

.data-explorer-archive {
    padding: 40px 0;
}

/* Header Section */
.data-explorer-header {
    text-align: left;
    margin-bottom: 32px;
}

.data-explorer-title {
    font-size: 32px;
    font-weight: 600;
    color: #00578d;
    margin: 0 0 8px 0;
    line-height: 1.2;
}

.data-explorer-subtitle {
    font-size: 16px;
    color: #6b6b6b;
    margin: 0;
    line-height: 1.5;
}

/* Filter Section */
.data-explorer-filters {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 32px;
}

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

/* Search Container */
.search-container {
    position: relative;
    flex: 1;
    min-width: 200px;
}

.search-input {
    width: 100%;
    border-radius: 4px !important;
    color: #343434 !important;    
    padding-left: 40px !important;
    
}

.search-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    pointer-events: none;
}

/* Filter Containers */
.filter-container {
    position: relative;
    min-width: 200px;
}

.filter-select {
    width: 100%;
    padding: 6px 40px 6px 16px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    appearance: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    color: #00578d
}
.search-container .search-input::placeholder{
    color: #343434;
}

.filter-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.dropdown-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    pointer-events: none;
}

/* Results Info */
.results-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    
}

#results-count {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

.sort-container {
    position: relative;
    min-width: 140px;
}

.sort-select {
    width: 100%;
    padding: 8px 32px 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    appearance: none;
    transition: border-color 0.2s ease;
    color: #00578d;
}

.sort-select:focus {
    outline: none;
    border-color: #3b82f6;
}

/* Clear Filter Container */
.clear-filter {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f9fafb;
    width: 100%;
}

/* Data Grid */
.data-explorer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

/* Data Cards */
.data-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.data-card:hover {   
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.data-card-image {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.data-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.data-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding: 12px 20px 20px 20px;
    border-top: 1px solid #f1f5f9;
}

.data-meta-left {
    display: flex;
    align-items: center;
}

.data-meta-date {
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.data-meta-date svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.data-meta-right {
    display: flex;
    align-items: center;
}

.data-view-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    color: #343434;
    text-decoration: none;
    border-radius: 6px;
    border: 1px solid #e3e3e3;
    font-size: 14px;
    font-weight: 500;
    
}

.data-view-btn:hover {    
    color: #343434;
    text-decoration: none;
   
}

.data-view-btn svg {
    width: 16px;
    height: 16px;
   
}

.data-view-btn:hover svg {
   
}

/* Data Badges */
.data-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 8px;
    border-radius: 1.5rem;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.5px;
    background: #d3f1ff;
}

.data-badge-new {
    background: #dbeafe;
    color: #1e40af;
}

.data-badge-event {
    background: #f3e8ff;
    color: #7c3aed;
}

.data-badge-guide {
    background: #dcfce7;
    color: #166534;
}

.data-badge-protocol {
    background: #fef3c7;
    color: #92400e;
}

/* Card Content */
.data-card-content {
    padding: 20px;
}

.data-card-title {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
}

.data-card-title a {
    color: #1f2937;
    text-decoration: none;
    transition: color 0.2s ease;
}

.data-card-title a:hover {
    color: #2563eb;
}

.data-card-excerpt {
    margin: 0;
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
}

/* No Results */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}

.no-results p {
    font-size: 16px;
    margin: 0;
}

/* Pagination */
.data-pagination {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

.data-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.data-pagination .page-numbers a,
.data-pagination .page-numbers span {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    text-decoration: none;
    color: #374151;
    font-size: 14px;
    transition: all 0.2s ease;
}

.data-pagination .page-numbers a:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.data-pagination .page-numbers .current {
    background: #00578d;
    border-color: #00578d;
    color: white;
}

/* Loading Spinner */
.loading-spinner {
    text-align: center;
    padding: 40px 20px;
    color: #6b7280;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f4f6;
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

/* Error Messages */
.filter-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    color: #dc2626;
    font-size: 14px;
}

/* Search Counter */
.search-counter {
    font-style: italic;
    animation: fadeIn 0.2s ease-in;
}

/* Clear Filters Button */
.clear-filters-btn {
    padding: 8px 16px;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    color: #374151;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 12px;
}

.clear-filters-btn:hover {
    background: #e5e7eb;
    border-color: #9ca3af;
    color: #000;
}

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

/* Active Filter Indicators */
.filter-select.has-value {
    border-color: #3b82f6;
    background: #eff6ff;
}

.search-input.has-value {
    border-color: #3b82f6;
    background: #eff6ff;
}

/* Responsive Design */
@media (max-width: 768px) {
    .data-explorer-archive {
        padding: 20px 0;
    }
    
    .data-explorer-title {
        font-size: 24px;
    }
    
    .data-explorer-filters {
        padding: 16px;
    }
    
    .filter-row {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .search-container,
    .filter-container {
        min-width: auto;
    }
    
    .results-info {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    .data-explorer-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .data-card-content {
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .data-explorer-filters {
        padding: 12px;
    }
    
    .data-card-title {
        font-size: 16px;
    }
    
    .data-card-excerpt {
        font-size: 13px;
    }
}
