/* Custom Styles for Derma Art Clinic Proposal */

/* Smooth scrolling for navigation */
html {
    scroll-behavior: smooth;
}

/* Custom animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Module cards hover effects */
.module-card {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.module-card:hover {
    transform: translateY(-5px);
}

.module-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s;
}

.module-card:hover::before {
    left: 100%;
}

/* Pricing cards */
.pricing-card {
    transition: all 0.3s ease;
    position: relative;
}

.pricing-card:hover {
    transform: scale(1.02);
}

/* Navigation active states */
.nav-link {
    transition: all 0.3s ease;
    position: relative;
}

.nav-link.active {
    background-color: #3b82f6;
}

.nav-link:hover {
    background-color: #3b82f6;
}

/* Loading screen */
#loading-screen {
    animation: fadeOut 0.5s ease-in 2s forwards;
}

@keyframes fadeOut {
    to { opacity: 0; visibility: hidden; }
}

/* Main content fade in */
#main-content {
    animation: fadeIn 0.8s ease-in 2.2s forwards;
}

/* Gradient text */
.gradient-text {
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Floating elements */
.float-animation {
    animation: float 3s ease-in-out infinite;
}

/* Timeline enhancements */
.timeline-item {
    opacity: 0;
    transform: translateX(-50px);
    animation: slideInLeft 0.6s ease-out forwards;
}

.timeline-item:nth-child(2) { animation-delay: 0.2s; }
.timeline-item:nth-child(3) { animation-delay: 0.4s; }
.timeline-item:nth-child(4) { animation-delay: 0.6s; }
.timeline-item:nth-child(5) { animation-delay: 0.8s; }

@keyframes slideInLeft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Contact form enhancements */
.form-input {
    transition: all 0.3s ease;
}

.form-input:focus {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Button hover effects */
.btn-primary {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.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-primary:hover::before {
    left: 100%;
}

/* Arabic RTL support */
[dir="rtl"] {
    text-align: right;
}

[dir="rtl"] .flex {
    flex-direction: row-reverse;
}

[dir="rtl"] .space-x-4 > * + * {
    margin-left: 0;
    margin-right: 1rem;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .module-card {
        margin-bottom: 1rem;
    }
    
    .pricing-card {
        margin-bottom: 1rem;
    }
    
    .timeline-item {
        padding-left: 2rem;
    }
    
    .nav-link {
        font-size: 0.875rem;
        padding: 0.5rem 0.75rem;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .module-card {
        border-width: 2px;
    }
    
    .pricing-card {
        border-width: 2px;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        color: black !important;
        background: white !important;
    }
    
    .module-card, .pricing-card {
        border: 1px solid #000 !important;
        background: white !important;
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #1e40af;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #3b82f6;
}

/* Accessibility improvements */
.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 indicators */
a:focus, button:focus, input:focus, select:focus, textarea:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Loading spinner enhancement */
.spinner {
    border: 4px solid #f3f4f6;
    border-top: 4px solid #1e40af;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}