/* AECO Standards Frontend Styles */
.aeco-standards-directory {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Alert Banner */
.aeco-alert-banner {
    background: #fff3cd;
    border-left: 4px solid #FF9800;
    padding: 20px 30px;
    margin-bottom: 30px;
    border-radius: 8px;
}

.aeco-alert-banner h3 {
    color: #E65100;
    margin: 0 0 8px 0;
    font-size: 1.05rem;
    font-weight: 700;
}

.aeco-alert-banner p {
    color: #BF360C;
    font-size: 0.95rem;
    margin: 0;
}

/* Stats Grid */
.aeco-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.aeco-stat-card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-left: 4px solid #6B4FBB;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.aeco-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(107, 79, 187, 0.15);
}

.aeco-stat-card:nth-child(2) {
    border-left-color: #2E8BC0;
}

.aeco-stat-card:nth-child(3) {
    border-left-color: #FF6B6B;
}

.aeco-stat-card:nth-child(4) {
    border-left-color: #00D4AA;
}

.stat-label {
    font-size: 0.8rem;
    color: #999;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.stat-detail {
    font-size: 0.85rem;
    color: #666;
    font-weight: 500;
}

/* Filter Section */
.aeco-filter-section {
    background: white;
    padding: 24px 30px;
    margin-bottom: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.aeco-filters {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr auto;
    gap: 15px;
    align-items: center;
}

.aeco-search, .aeco-filter-select {
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.95rem;
    background: white;
    transition: border-color 0.3s ease;
}

.aeco-search:focus, .aeco-filter-select:focus {
    outline: none;
    border-color: #6B4FBB;
}

.aeco-reset-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, #6B4FBB 0%, #2E8BC0 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.aeco-reset-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(107, 79, 187, 0.3);
}

/* Results Info */
.aeco-results-info {
    margin: 20px 0;
    padding: 12px 20px;
    background: #f8f9fb;
    border-radius: 8px;
    text-align: center;
}

#aeco-results-count {
    font-size: 0.95rem;
    color: #666;
}

#aeco-results-count .count-current {
    font-weight: 700;
    color: #1a1a1a;
}

#aeco-results-count .count-total {
    font-weight: 700;
    color: #6B4FBB;
}

/* Standards Grid */
.aeco-standards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

/* Standard Card */
.aeco-standard-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.aeco-standard-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(107, 79, 187, 0.15);
}

.standard-header {
    background: linear-gradient(135deg, #f8f7fc 0%, #ede9f7 100%);
    padding: 24px;
    border-bottom: 1px solid #e8e4f1;
}

.standard-title-row {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 12px;
}

.standard-icon {
    font-size: 2rem;
    min-width: 50px;
    text-align: center;
}

.standard-header h3 {
    margin: 0;
    font-size: 1.4rem;
    color: #1a1a1a;
    font-weight: 700;
    flex: 1;
}

.standard-code {
    margin: 4px 0 12px 0;
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

.standard-body {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.status-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.status-badge.active {
    background: #e3f2fd;
    color: #1976d2;
}

.status-badge.upcoming {
    background: #fff3e0;
    color: #f57c00;
}

.status-badge.draft {
    background: #f3e5f5;
    color: #7b1fa2;
}

.status-badge.deprecated {
    background: #ffebee;
    color: #c62828;
}

.standard-description {
    color: #444;
    line-height: 1.7;
    margin-bottom: 20px;
    flex: 1;
    font-size: 0.95rem;
}

/* Standard Details */
.standard-details {
    background: #f8f9fb;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e0e0e0;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-size: 0.8rem;
    color: #888;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    font-size: 0.9rem;
    color: #1a1a1a;
    font-weight: 600;
}

/* Impact Section */
.impact-section {
    margin-bottom: 20px;
}

.impact-label {
    font-size: 0.8rem;
    color: #888;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.impact-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.impact-list li {
    padding: 8px 0 8px 24px;
    position: relative;
    font-size: 0.9rem;
    color: #444;
    line-height: 1.6;
}

.impact-list li:before {
    content: "→";
    position: absolute;
    left: 0;
    color: #6B4FBB;
    font-weight: 700;
}

/* Standard Footer */
.standard-footer {
    padding: 16px 24px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    gap: 12px;
}

.btn-learn {
    flex: 1;
    padding: 12px;
    background: linear-gradient(135deg, #6B4FBB 0%, #2E8BC0 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
    display: block;
}

.btn-learn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(107, 79, 187, 0.3);
    color: white;
    text-decoration: none;
}

.btn-watch {
    padding: 12px 16px;
    background: white;
    border: 2px solid #6B4FBB;
    border-radius: 8px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-watch:hover {
    background: #6B4FBB;
}

/* Pagination */
.aeco-pagination {
    margin: 40px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.pagination-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.page-btn {
    min-width: 44px;
    height: 44px;
    padding: 0 16px;
    border: 1px solid #e0e0e0;
    background: white;
    color: #666;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.page-btn:hover:not([disabled]):not(.active) {
    border-color: #6B4FBB;
    color: #6B4FBB;
    background: #f8f7fc;
}

.page-btn.active {
    background: #6B4FBB;
    color: white;
    border-color: #6B4FBB;
    cursor: default;
}

.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.page-dots {
    padding: 0 8px;
    color: #999;
}

.page-prev,
.page-next {
    font-weight: 600;
}

.pagination-info {
    color: #666;
    font-size: 0.95rem;
    text-align: center;
}

.pagination-info .page-current {
    font-weight: 700;
    color: #6B4FBB;
    font-size: 1rem;
}

.pagination-info .page-total {
    font-weight: 700;
    color: #1a1a1a;
    font-size: 1rem;
}

/* Loading State */
.aeco-loading {
    text-align: center;
    padding: 60px 20px;
    grid-column: 1 / -1;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #6B4FBB;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.aeco-loading p {
    color: #666;
    font-size: 1rem;
}

/* No Results */
.aeco-no-results {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fb;
    border-radius: 12px;
    grid-column: 1 / -1;
}

.no-results-icon {
    font-size: 4rem;
    margin-bottom: 16px;
}

.aeco-no-results h3 {
    margin: 0 0 8px 0;
    color: #1a1a1a;
    font-size: 1.5rem;
}

.aeco-no-results p {
    color: #666;
    font-size: 1rem;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .aeco-filters {
        grid-template-columns: 1fr 1fr;
    }
    
    .aeco-search {
        grid-column: 1 / -1;
    }
    
    .aeco-reset-btn {
        grid-column: 1 / -1;
    }
    
    .aeco-standards-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .aeco-standards-directory {
        padding: 15px;
    }
    
    .aeco-stats-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .aeco-filters {
        grid-template-columns: 1fr;
    }
    
    .aeco-standards-grid {
        grid-template-columns: 1fr;
    }
    
    .aeco-alert-banner {
        padding: 16px 20px;
    }
    
    .standard-details {
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .pagination-container {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .page-btn {
        min-width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
    
    .standard-icon {
        font-size: 1.5rem;
        min-width: 40px;
    }
    
    .standard-header h3 {
        font-size: 1.2rem;
    }
}
