/**
 * ExamExcel CBT Showcase Page - Additional Styles
 * Supplementary styles for the showcase page
 */

/* Loading Animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Enhanced Feature Cards */
.feature-card {
    position: relative;
    overflow: hidden;
}

.feature-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.6s ease;
}

.feature-card:hover::after {
    left: 100%;
}

/* Enhanced Button Styles */
.btn {
    position: relative;
    overflow: hidden;
}

.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.5s ease;
}

.btn:hover::before {
    left: 100%;
}

/* Floating Animation Enhancements */
.floating-icon {
    animation: floatEnhanced 6s ease-in-out infinite;
}

@keyframes floatEnhanced {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg) scale(1); 
    }
    25% { 
        transform: translateY(-10px) rotate(90deg) scale(1.05); 
    }
    50% { 
        transform: translateY(-20px) rotate(180deg) scale(1.1); 
    }
    75% { 
        transform: translateY(-10px) rotate(270deg) scale(1.05); 
    }
}

/* Enhanced Stats Animation */
.stat-item {
    position: relative;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
}

.stat-item:hover::before {
    width: 100px;
    height: 100px;
}

/* Enhanced Tech Items */
.tech-item {
    position: relative;
    overflow: hidden;
}

.tech-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tech-item:hover::before {
    opacity: 0.1;
}

.tech-item .tech-icon,
.tech-item h4 {
    position: relative;
    z-index: 2;
}

/* Scroll Progress Bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    z-index: 1001;
    transition: width 0.1s ease;
}

/* Enhanced Mobile Styles */
@media (max-width: 768px) {
    .floating-icon {
        animation-duration: 4s;
    }
    
    .feature-card {
        margin-bottom: 1rem;
    }
    
    .hero-content h1 {
        animation: slideInUp 1s ease-out;
    }
    
    .hero-content p {
        animation: slideInUp 1s ease-out 0.3s both;
    }
    
    .hero-buttons {
        animation: slideInUp 1s ease-out 0.6s both;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .floating-elements,
    .hero-buttons,
    .cta-buttons {
        display: none !important;
    }
    
    .hero {
        min-height: auto;
        padding: 2rem 0;
    }
    
    .section {
        padding: 2rem 0;
        break-inside: avoid;
    }
    
    .feature-card {
        break-inside: avoid;
        margin-bottom: 1rem;
    }
    
    * {
        color: #000 !important;
        background: #fff !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --primary: #000080;
        --secondary: #800080;
        --text-dark: #000000;
        --text-light: #333333;
    }
    
    .feature-card,
    .tech-item {
        border: 2px solid #000;
    }
    
    .btn {
        border: 2px solid currentColor;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .floating-icon {
        animation: none;
    }
    
    .hero-mockup {
        transform: none !important;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --white: #1a202c;
        --light-bg: #2d3748;
        --gray-100: #2d3748;
        --gray-200: #4a5568;
        --text-dark: #f7fafc;
        --text-light: #e2e8f0;
    }
    
    body {
        background: var(--gray-900);
        color: var(--gray-100);
    }
    
    .navbar {
        background: rgba(26, 32, 44, 0.95);
    }
    
    .feature-card,
    .tech-item {
        background: var(--gray-800);
        border-color: var(--gray-700);
    }
    
    .footer {
        background: var(--gray-900);
    }
}

/* Accessibility Enhancements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus Styles */
.keyboard-navigation *:focus {
    outline: 2px solid var(--primary) !important;
    outline-offset: 2px !important;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2) !important;
}

/* Skip Link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary);
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 10000;
}

.skip-link:focus {
    top: 6px;
}

/* Enhanced Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--primary);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 10000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    max-width: 300px;
}

.notification.success {
    background: var(--success);
    color: white;
}

.notification.error {
    background: var(--danger);
    color: white;
}

.notification.info {
    background: var(--primary);
    color: white;
}

.notification.show {
    transform: translateX(0);
}

/* Enhanced Responsive Images */
img {
    max-width: 100%;
    height: auto;
}

.hero-mockup {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: var(--border-radius-lg);
}

/* Performance Optimizations */
.feature-card,
.tech-item,
.btn {
    will-change: transform;
}

.floating-icon {
    will-change: transform;
    backface-visibility: hidden;
}

/* Custom Scrollbar for Webkit Browsers */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-200);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Firefox Scrollbar */
html {
    scrollbar-width: thin;
    scrollbar-color: var(--primary) var(--gray-200);
}