.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    text-align: center;
}

.page-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.search-container {
    max-width: 600px;
    margin: 0 auto 3rem auto;
}

.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.search-wrapper:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.search-icon {
    width: 20px;
    height: 20px;
    fill: var(--text-secondary);
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.search-input {
    flex: 1;
    border: none;
    background: none;
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
    padding: 0;
}

.search-input::placeholder {
    color: var(--text-secondary);
}

.clear-search-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    margin-left: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.clear-search-btn:hover {
    color: var(--text-primary);
    background: var(--border-color);
}

.clear-search-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.search-results-info {
    text-align: center;
    margin-top: 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.search-results-info span {
    font-weight: 600;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.certs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.cert-container {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.cert-container:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
    border-color: var(--primary-color);
}

.cert-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.cert-container:hover::before {
    transform: scaleX(1);
}

.cert-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.cert-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.cert-icon img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 8px;
}

.cert-icon svg {
    width: 32px;
    height: 32px;
    fill: var(--bg-primary);
}

.cert-info {
    flex: 1;
}

.cert-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cert-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.4;
}

.cert-details {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.cert-detail {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.cert-detail svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.cert-type {
    background: var(--primary-gradient);
    color: var(--bg-primary);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cert-validity {
    background: var(--bg-primary);
    color: var(--text-primary);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
}

.cert-download-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--primary-gradient);
    color: var(--bg-primary);
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.cert-download-btn:hover {
    background: var(--primary-gradient-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.cert-download-btn svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    grid-column: 1 / -1;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top: 3px solid transparent;
    border-radius: 50%;
    background: conic-gradient(from 0deg, var(--primary-gradient));
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

.loading-container p {
    color: var(--text-secondary);
    font-size: 1rem;
}

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

.error-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    grid-column: 1 / -1;
    text-align: center;
}

.error-container svg {
    width: 64px;
    height: 64px;
    fill: var(--text-secondary);
    margin-bottom: 1rem;
}

.error-container h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.error-container p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.retry-btn {
    background: var(--primary-gradient);
    color: var(--bg-primary);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.retry-btn:hover {
    background: var(--primary-gradient-hover);
}

.no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    grid-column: 1 / -1;
    text-align: center;
}

.no-results svg {
    width: 64px;
    height: 64px;
    fill: var(--text-secondary);
    margin-bottom: 1rem;
}

.no-results h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.no-results p {
    color: var(--text-secondary);
    margin-bottom: 0;
}

@media (min-width: 1200px) {
    .certs-grid {
        grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
        gap: 2.5rem;
    }
    
    .page-title {
        font-size: 3rem;
    }
    
    .page-description {
        font-size: 1.2rem;
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    .certs-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
        gap: 2rem;
    }
    
    .page-title {
        font-size: 2.75rem;
    }
}

@media (max-width: 767px) {
    .certs-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 1rem;
    }
    
    .cert-container {
        padding: 1.5rem;
        border-radius: 12px;
    }
    
    .cert-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .cert-icon {
        width: 50px;
        height: 50px;
    }
    
    .cert-icon img,
    .cert-icon svg {
        width: 28px;
        height: 28px;
    }
    
    .cert-name {
        font-size: 1.1rem;
    }
    
    .cert-details {
        justify-content: center;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .page-description {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .search-container {
        margin-bottom: 2rem;
        padding: 0 1rem;
    }
    
    .search-wrapper {
        padding: 0.625rem 0.875rem;
    }
    
    .search-input {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .cert-container {
        padding: 1.25rem;
    }
    
    .cert-download-btn {
        padding: 0.875rem;
        font-size: 0.9rem;
    }
    
    .page-title {
        font-size: 1.75rem;
    }
}

[data-theme="dark"] .cert-container {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

[data-theme="light"] .cert-container {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.cert-container:focus,
.cert-download-btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.cert-download-btn.loading {
    opacity: 0.7;
    pointer-events: none;
}
