/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --accent-color: #3b82f6;
    --success-color: #10b981;
    --background-color: #f8fafc;
    --card-background: #ffffff;
    --text-color: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 2.5rem 0;
    box-shadow: var(--shadow-lg);
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.95;
    font-weight: 300;
}

/* Main Content */
main {
    padding: 2rem 0;
}

/* Search Section */
.search-section {
    background: var(--card-background);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.search-container {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

#searchInput {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

#searchInput:focus {
    outline: none;
    border-color: var(--primary-color);
}

#searchBtn {
    padding: 0.75rem 2rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.1s;
}

#searchBtn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-1px);
}

#searchBtn:active {
    transform: translateY(0);
}

/* Filter Container */
.filter-container {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
    padding: 1rem;
    background-color: var(--background-color);
    border-radius: 8px;
    margin-bottom: 1rem;
}

.filter-container label {
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.9rem;
}

.filter-container select {
    padding: 0.5rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: border-color 0.3s;
    min-width: 200px;
}

.filter-container select:focus {
    outline: none;
    border-color: var(--primary-color);
}

#resetBtn {
    padding: 0.5rem 1.5rem;
    background-color: var(--text-secondary);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-left: auto;
}

#resetBtn:hover {
    background-color: #475569;
}

/* Stats */
.stats {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

#certCount {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.2rem;
}

/* Categories Section */
.categories-section {
    margin-bottom: 2rem;
}

.categories-section h2 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.category-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.category-btn {
    padding: 0.65rem 1.25rem;
    background-color: var(--card-background);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.category-btn:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Certifications Grid */
.certifications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

/* Certification Card */
.cert-card {
    background: var(--card-background);
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    border-left: 4px solid var(--primary-color);
}

.cert-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.cert-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text-color);
    line-height: 1.3;
}

.cert-card .provider {
    color: var(--primary-color);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.cert-card .category {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

.cert-card .description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 3rem;
    font-size: 1.1rem;
    color: var(--text-secondary);
    grid-column: 1 / -1;
}

/* Footer */
footer {
    background-color: var(--text-color);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

footer p {
    opacity: 0.9;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .search-container {
        flex-direction: column;
    }

    .filter-container {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-container select {
        width: 100%;
    }

    #resetBtn {
        margin-left: 0;
        width: 100%;
    }

    .certifications-grid {
        grid-template-columns: 1fr;
    }

    .category-buttons {
        gap: 0.5rem;
    }

    .category-btn {
        font-size: 0.85rem;
        padding: 0.5rem 1rem;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.75rem;
    }

    .search-section {
        padding: 1.5rem;
    }

    .cert-card {
        padding: 1.25rem;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--background-color);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Loading Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cert-card {
    animation: fadeIn 0.4s ease-out;
}
