/* Custom CSS for Egyft Backend */

/* Smooth scrolling for the entire page */
html {
    scroll-behavior: smooth;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #e36613;
}

/* Loading screen styles */
#loading-screen {
    transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
}

#loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

/* Navbar styles */
#navbar {
    transition: all 0.3s ease-in-out;
}

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.nav-link {
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #f59e42, #0ea5e9);
    transition: width 0.3s ease;
}

.nav-link:hover::before {
    width: 100%;
}

/* Mobile menu animations */
.mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
}

.mobile-menu.show {
    max-height: 500px;
}

/* Button hover effects */
.btn-primary {
    background: linear-gradient(135deg, #f59e42, #e36613);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.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%;
}

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

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(245, 158, 66, 0.1), rgba(14, 165, 233, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Gradient text animation */
.gradient-text {
    background: linear-gradient(-45deg, #f59e42, #e36613, #0ea5e9, #0284c7);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 4s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* Floating animation for background elements */
@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    33% {
        transform: translateY(-10px) rotate(1deg);
    }
    66% {
        transform: translateY(5px) rotate(-1deg);
    }
}

/* Pulse animation for important elements */
.pulse-glow {
    animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(245, 158, 66, 0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(245, 158, 66, 0.6);
    }
}

/* Typing animation */
.typing-animation {
    overflow: hidden;
    border-right: 2px solid #f59e42;
    white-space: nowrap;
    animation: typing 3s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blink-caret {
    from, to {
        border-color: transparent;
    }
    50% {
        border-color: #f59e42;
    }
}

/* Back to top button */
#back-to-top {
    transition: all 0.3s ease;
}

#back-to-top.show {
    transform: translateY(0);
}

#back-to-top:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 158, 66, 0.3);
}

/* API endpoint badges */
.method-badge {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    text-transform: uppercase;
}

/* Responsive utilities */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .dark-mode-support {
        background-color: #1f2937;
        color: #f9fafb;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
}

/* 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 styles for better accessibility */
.focus-visible:focus {
    outline: 2px solid #f59e42;
    outline-offset: 2px;
}

/* Custom animations for AOS library */
[data-aos="fade-up"] {
    transform: translate3d(0, 40px, 0);
    opacity: 0;
}

[data-aos="fade-up"].aos-animate {
    transform: translate3d(0, 0, 0);
    opacity: 1;
}

[data-aos="fade-left"] {
    transform: translate3d(-40px, 0, 0);
    opacity: 0;
}

[data-aos="fade-left"].aos-animate {
    transform: translate3d(0, 0, 0);
    opacity: 1;
}

[data-aos="fade-right"] {
    transform: translate3d(40px, 0, 0);
    opacity: 0;
}

[data-aos="fade-right"].aos-animate {
    transform: translate3d(0, 0, 0);
    opacity: 1;
}
