/* Custom Animations and Styles */
.fade-in {
    opacity: 1;
    transform: translateY(0);
}

.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.gradient-bg {
    background: linear-gradient(135deg, #05122D 0%, #0A1B3D 100%);
}

/* Floating Shapes Animation */
.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(54, 177, 225, 0.1);
    animation: float 20s infinite linear;
}

.shape-1 {
    width: 80px;
    height: 80px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
    animation-duration: 25s;
}

.shape-2 {
    width: 120px;
    height: 120px;
    top: 60%;
    right: 15%;
    animation-delay: -5s;
    animation-duration: 30s;
}

.shape-3 {
    width: 60px;
    height: 60px;
    top: 10%;
    right: 20%;
    animation-delay: -10s;
    animation-duration: 20s;
}

@keyframes float {
    0% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.7;
    }
    25% {
        transform: translateY(-20px) rotate(90deg);
        opacity: 1;
    }
    50% {
        transform: translateY(0px) rotate(180deg);
        opacity: 0.7;
    }
    75% {
        transform: translateY(-10px) rotate(270deg);
        opacity: 1;
    }
    100% {
        transform: translateY(0px) rotate(360deg);
        opacity: 0.7;
    }
}

/* Enhanced Card Animations */
.service-card, .feature-card, .testimonial-card, .industry-card {
    transition: all 0.3s ease;
}

.service-card:hover, .feature-card:hover, .testimonial-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

.industry-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Process Step Connector */
.process-card:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -50%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #36B1E1, transparent);
    transform: translateY(-50%);
    z-index: -1;
}

@media (max-width: 1024px) {
    .process-card::after {
        display: none;
    }
}

/* Newsletter Form Animation */
.newsletter-form input:focus {
    transform: scale(1.02);
    transition: transform 0.2s ease;
}

/* FAQ Items */
.faq-item {
    padding: 1.5rem;
    border-radius: 0.75rem;
    background: rgba(54, 177, 225, 0.02);
    border: 1px solid rgba(54, 177, 225, 0.1);
    transition: all 0.3s ease;
}

.faq-item:hover {
    background: rgba(54, 177, 225, 0.05);
    border-color: rgba(54, 177, 225, 0.2);
    transform: translateY(-2px);
}

/* Smooth Scroll Behavior */
html {
    scroll-behavior: smooth;
}

/* Prevent horizontal overflow from toast */
body {
    overflow-x: hidden;
}

/* Sticky Navigation */
.navbar-visible {
    transform: translateY(0) !important;
}

.navbar-hidden {
    transform: translateY(-100%) !important;
}

/* Button Enhancements */
.cta-btn, .learn-more-btn {
    position: relative;
    overflow: hidden;
}

.cta-btn::before, .learn-more-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;
}

.cta-btn:hover::before, .learn-more-btn:hover::before {
    left: 100%;
}

/* Badge Animations */
.inline-flex {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Statistics Counter Animation */
.stats-number {
    transition: transform 0.3s ease;
}

.stats-number:hover {
    transform: scale(1.1);
}

/* Enhanced Header Shadow */
header.shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(10px);
}

/* Custom Loading Animation for Newsletter */
.loading-spinner {
    border: 2px solid #f3f3f3;
    border-top: 2px solid #36B1E1;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* RTL Support */
[dir="rtl"] .rtl-flip {
    transform: scaleX(-1);
}

[dir="rtl"] {
    font-family: 'Noto Kufi Arabic', sans-serif;
}

[dir="ltr"] {
    font-family: 'Inter', sans-serif;
}

/* Enhanced Mobile Responsiveness */
@media (max-width: 768px) {
    .floating-shapes {
        display: none;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .service-card, .feature-card, .testimonial-card {
        padding: 1.5rem;
    }
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
    .bg-white {
        background-color: #1a1a1a;
    }
    
    .text-gray-900 {
        color: #f9fafb;
    }
    
    .text-gray-600 {
        color: #d1d5db;
    }
}

/* Image Modal Styles */
#image-modal {
    transition: opacity 0.3s ease;
}

#image-modal.hidden {
    opacity: 0;
    pointer-events: none;
}

#image-modal:not(.hidden) {
    opacity: 1;
    pointer-events: auto;
}

#modal-image {
    transition: transform 0.3s ease;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

#close-modal {
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

#close-modal:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* Enhanced image hover effects for project images */
.project-detail img {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-detail img:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2);
}

/* Loading state for modal */
#image-modal.loading #modal-image {
    opacity: 0.7;
}

/* Responsive modal adjustments */
@media (max-width: 768px) {
    #image-modal {
        padding: 1rem;
    }
    
    #close-modal {
        top: 1rem;
        right: 1rem;
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1.5rem;
    }
}
