/* Test page specific styles */
@import url('style.css');

/* Page header */
.page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.page-header p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
    opacity: 0.9;
}

/* Categories filter */
.categories-filter {
    padding: 2rem 0;
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    background-color: var(--light-gray);
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    color: var(--primary-color);
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.filter-btn:hover::before {
    transform: translateX(0);
}

.filter-btn:hover,
.filter-btn.active {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(139, 195, 74, 0.4);
}

.filter-btn.active {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(139, 195, 74, 0.4);
}

.filter-btn.active::after {
    content: "✓";
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-weight: bold;
}

/* Tests grid */
.tests-content {
    padding: 3rem 0;
}

.tests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.test-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.test-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.test-card-header {
    padding: 2rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
}

.test-card-header h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.test-card-header p {
    opacity: 0.9;
    line-height: 1.6;
}

.test-card-body {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.test-card-body p {
    color: #666;
    margin-bottom: 10px;
    flex-grow: 1;
}

.test-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: #888;
}

.test-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1.5rem 1.5rem;
    margin-top: auto;
}

.difficulty-badge {
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Take Test Button */
.btn-primary {
    padding: 0.8rem 1.8rem;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(139, 195, 74, 0.4);
}

.btn-primary::after {
    content: "▶";
    transition: transform 0.3s ease;
}

.btn-primary:hover::after {
    transform: translateX(3px);
}

.difficulty-easy {
    background-color: #e8f5e9;
    color: #4caf50;
}

.difficulty-medium {
    background-color: #fff8e1;
    color: #ff9800;
}

.difficulty-hard {
    background-color: #ffebee;
    color: #f44336;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .page-header {
        padding: 3rem 0;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .filter-buttons {
        gap: 0.5rem;
    }
    
    .filter-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .tests-grid {
        grid-template-columns: 1fr;
    }
}

/* Add animation styles at the end of the file */

/* Test card entrance animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.test-card {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.test-card.animate-in {
    opacity: 1;
}

/* Ripple effect for buttons */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.7);
    transform: scale(0);
    animation: ripple 0.6s linear;
    pointer-events: none;
}

@keyframes ripple {
    to {
        transform: scale(2.5);
        opacity: 0;
    }
}

/* Difficulty badge enhancements */
.difficulty-badge {
    position: relative;
    overflow: hidden;
}

.difficulty-badge::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.difficulty-badge:hover::before {
    left: 100%;
}
