/* Exam Section Styles */
.exam-section {
    position: relative;
    padding: 120px 0 90px 0;
    background: 
        /* Overlay gradient for seamless blending */
        linear-gradient(135deg, 
            rgba(248, 250, 255, 0.95) 0%, 
            rgba(255, 255, 255, 0.85) 30%, 
            rgba(245, 248, 255, 0.90) 70%, 
            rgba(248, 250, 255, 0.95) 100%
        ),
        /* Laboratory background image */
        url('../images/lab-background.jpg');
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    overflow: hidden;
}

.exam-section .auto-container {
    position: relative;
    z-index: 2;
}

.exam-content {
    text-align: center;
    max-width: 1000px;
    margin: 0 auto;
}

.exam-section h2 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--title-color);
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    animation: fadeInUp 0.8s ease-out;
}

.exam-section .subtitle {
    font-size: 24px;
    font-weight: 500;
    margin-bottom: 30px;
    color: var(--theme-color);
}

.exam-section .description {
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 50px;
    color: var(--text-color);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.exam-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin: 50px 0;
}

/* Staggered animation for feature cards */
.exam-feature:nth-child(1) {
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.exam-feature:nth-child(2) {
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.exam-feature:nth-child(3) {
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

.exam-feature {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 24px;
    padding: 45px 35px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0px 12px 50px rgba(29, 60, 226, 0.12), 
        0px 4px 20px rgba(0, 0, 0, 0.08),
        inset 0px 1px 0px rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.exam-feature::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(29, 60, 226, 0.03), transparent);
    transition: left 0.6s ease;
}

.exam-feature:hover::before {
    left: 100%;
}

.exam-feature:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 
        0px 20px 80px rgba(29, 60, 226, 0.18), 
        0px 8px 30px rgba(0, 0, 0, 0.15),
        inset 0px 1px 0px rgba(255, 255, 255, 0.9);
    border-color: rgba(29, 60, 226, 0.3);
    background: rgba(255, 255, 255, 0.99);
}

.exam-feature-icon {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, rgba(29, 60, 226, 0.1), rgba(29, 60, 226, 0.05));
    border: 2px solid rgba(29, 60, 226, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    font-size: 36px;
    transition: all 0.4s ease;
    color: var(--theme-color);
    position: relative;
    box-shadow: 0 4px 20px rgba(29, 60, 226, 0.1);
}

.exam-feature-icon::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(29, 60, 226, 0.2), transparent, rgba(29, 60, 226, 0.1));
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.exam-feature:hover .exam-feature-icon {
    background: linear-gradient(135deg, var(--theme-color), rgba(29, 60, 226, 0.8));
    color: white;
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 8px 30px rgba(29, 60, 226, 0.3);
    border-color: var(--theme-color);
}

.exam-feature:hover .exam-feature-icon::before {
    opacity: 1;
}

.exam-feature h4 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--title-color);
}

.exam-feature p {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    margin: 0;
}

.exam-cta {
    margin-top: 50px;
}

.exam-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, var(--theme-color), rgba(29, 60, 226, 0.8));
    color: white;
    padding: 20px 40px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.4s ease;
    box-shadow: 0px 8px 30px rgba(29, 60, 226, 0.25), 0px 2px 10px rgba(0, 0, 0, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.exam-btn::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.6s ease;
}

.exam-btn:hover::before {
    left: 100%;
}

.exam-btn:hover {
    background: linear-gradient(135deg, var(--secondary-color), rgba(249, 49, 59, 0.8));
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0px 12px 40px rgba(249, 49, 59, 0.3), 0px 4px 15px rgba(0, 0, 0, 0.15);
    color: white;
    text-decoration: none;
    border-color: rgba(255, 255, 255, 0.3);
}

.exam-btn-icon {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.exam-btn:hover .exam-btn-icon {
    transform: translateX(3px);
}

/* Enhanced lab-inspired overlay pattern */
.exam-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        /* Subtle molecular structure dots */
        radial-gradient(circle at 20% 30%, rgba(29, 60, 226, 0.06) 1px, transparent 1px),
        radial-gradient(circle at 80% 70%, rgba(29, 60, 226, 0.04) 1.5px, transparent 1.5px),
        radial-gradient(circle at 60% 20%, rgba(29, 60, 226, 0.03) 1px, transparent 1px),
        /* Laboratory grid pattern */
        linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
        linear-gradient(0deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
        /* Scientific equipment inspired pattern */
        repeating-linear-gradient(45deg, 
            transparent, 
            transparent 25px, 
            rgba(29, 60, 226, 0.02) 25px, 
            rgba(29, 60, 226, 0.02) 27px
        );
    background-size: 80px 80px, 100px 100px, 60px 60px, 50px 50px, 50px 50px, 150px 150px;
    pointer-events: none;
    z-index: 1;
}

/* Medical equipment subtle overlay */
.exam-section::after {
    content: '';
    position: absolute;
    top: 10%;
    right: 5%;
    width: 200px;
    height: 200px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="45" fill="none" stroke="rgba(29,60,226,0.05)" stroke-width="2"/><circle cx="50" cy="50" r="30" fill="none" stroke="rgba(29,60,226,0.03)" stroke-width="1"/><circle cx="50" cy="50" r="15" fill="none" stroke="rgba(29,60,226,0.04)" stroke-width="1.5"/></svg>') no-repeat center;
    background-size: contain;
    opacity: 0.6;
    pointer-events: none;
    z-index: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .exam-section {
        padding: 70px 0 40px 0;
        background-attachment: scroll; /* Better performance on mobile */
        background-position: center top;
    }
    
    .exam-section h2 {
        font-size: 36px;
    }
    
    .exam-section .subtitle {
        font-size: 20px;
    }
    
    .exam-section .description {
        font-size: 16px;
        margin-bottom: 40px;
    }
    
    .exam-features {
        grid-template-columns: 1fr;
        gap: 25px;
        margin: 40px 0;
    }
    
    .exam-feature {
        padding: 30px 20px;
    }
    
    .exam-feature-icon {
        width: 70px;
        height: 70px;
        font-size: 30px;
    }
    
    .exam-btn {
        padding: 16px 30px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .exam-section {
        padding: 50px 0 30px 0;
    }
    
    .exam-section h2 {
        font-size: 28px;
        margin-bottom: 15px;
    }
    
    .exam-section .subtitle {
        font-size: 18px;
        margin-bottom: 20px;
    }
    
    .exam-section .description {
        font-size: 15px;
        margin-bottom: 30px;
    }
    
    .exam-feature {
        padding: 25px 15px;
    }
    
    .exam-feature h4 {
        font-size: 20px;
    }
    
    .exam-feature p {
        font-size: 15px;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}
