/* Tests Section */
.tests-section {
    padding: 4rem 0;
    min-height: 80vh;
}

.tests-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--gray-900);
    text-align: center;
    margin-bottom: 3rem;
}

.tests-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

.test-card {
    background: var(--white);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.test-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.2);
    border-color: var(--primary-blue);
}

.test-image {
    width: 100%;
    height: 300px;
    overflow: hidden;
    background: var(--gray-100);
}

.test-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.test-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
    padding: 1.25rem;
    text-align: center;
    margin: 0;
}

.no-tests {
    grid-column: 1 / -1;
    text-align: center;
    font-size: 1.25rem;
    color: var(--gray-600);
    padding: 3rem;
}

/* Пагинация */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.pagination-link {
    padding: 0.5rem 1rem;
    background: var(--primary-blue);
    color: var(--white);
    text-decoration: none;
    border-radius: 0.5rem;
    transition: background 0.3s ease;
    font-weight: 500;
}

.pagination-link:hover {
    background: var(--dark-blue);
}

.pagination-current {
    padding: 0.5rem 1rem;
    color: var(--gray-600);
    font-weight: 500;
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--white);
    border-radius: 1.5rem;
    padding: 2.5rem;
    max-width: 600px;
    width: 90%;
    position: relative;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    font-weight: bold;
    color: var(--gray-600);
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--gray-900);
}

.modal-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 2rem;
    text-align: center;
}

.test-types-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.test-type-btn {
    padding: 1.25rem;
    background: var(--primary-blue);
    color: var(--white);
    border: none;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.test-type-btn:hover {
    background: var(--dark-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
}

.test-type-btn:active {
    transform: translateY(0);
}

/* Модальное окно продолжения теста */
.modal-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.modal-btn {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-btn-continue {
    background: #2563eb;
    color: #ffffff;
}

.modal-btn-continue:hover {
    background: #1e40af;
}

.modal-btn-restart {
    background: #e5e7eb;
    color: #374151;
}

.modal-btn-restart:hover {
    background: #d1d5db;
}

.modal-text {
    text-align: center;
    color: #4b5563;
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/* Responsive */
@media (max-width: 1024px) {
    .tests-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .tests-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .test-types-grid {
        grid-template-columns: 1fr;
    }
    
    .tests-title {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .tests-grid {
        grid-template-columns: 1fr;
    }
    
    .tests-title {
        font-size: 1.75rem;
    }
}

