/* Additional CSS for enhanced functionality */

/* Form field errors */
.form-group input.error,
.form-group textarea.error,
.form-group select.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.field-error {
    color: #ef4444;
    font-size: 0.75rem;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
}

.field-error::before {
    content: "⚠";
    margin-right: 0.5rem;
}

/* Enhanced animations */
.animate-in {
    animation: slideInUp 0.6s ease-out forwards;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.4s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Loading states */
.loading-spinner-small {
    display: inline-block;
}

/* Enhanced project cards */
.project-card {
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

/* Enhanced buttons */
.btn-outline,
.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-outline::before,
.btn-primary::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;
}

.btn-outline:hover::before,
.btn-primary:hover::before {
    left: 100%;
}

/* Error message styling */
.error-message {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.error-message h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

/* Enhanced back to top button */
#back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--gradient-1);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-lg);
}

#back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

#back-to-top::before {
    content: "↑";
    font-size: 1.5rem;
    font-weight: bold;
}

/* Mobile menu improvements */
.nav-menu.active {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1rem;
    margin-top: 1rem;
}

/* Enhanced timeline animations */
.timeline-item {
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.6s ease;
}

.timeline-item.animate-in {
    opacity: 1;
    transform: translateX(0);
}

/* Enhanced hover effects */
.contact-card:hover .contact-icon {
    transform: scale(1.1);
    background: var(--primary);
}

.planning-card:hover .planning-icon {
    transform: scale(1.2) rotate(10deg);
}

/* Progress bar animations */
.progress-fill {
    width: 0;
    background: linear-gradient(90deg, var(--accent), var(--primary));
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Enhanced stat animations */
.stat-number {
    font-weight: 700;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Enhanced focus states */
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Dark mode improvements */
.dark .progress-fill {
    background: linear-gradient(90deg, var(--accent), #60a5fa);
}

.dark .btn-outline {
    border-color: var(--border);
    color: var(--text-primary);
}

.dark .btn-outline:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

/* Enhanced responsive design */
@media (max-width: 768px) {
    #back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
    }
    
    .animate-in {
        animation-duration: 0.4s;
    }
    
    .project-card:hover {
        transform: translateY(-5px);
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --border: #000;
        --text-primary: #000;
        --text-secondary: #333;
        --bg-primary: #fff;
        --bg-secondary: #f5f5f5;
    }
    
    .dark {
        --border: #fff;
        --text-primary: #fff;
        --text-secondary: #ccc;
        --bg-primary: #000;
        --bg-secondary: #111;
    }
}
