/* Custom CSS for Tab-4 Website */

/* Glass Morphism Effect */
.glass-morphism {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Floating Elements Animation */
.floating-element {
    animation: float 6s ease-in-out infinite;
}

.floating-element:nth-child(1) {
    animation-delay: 0s;
}

.floating-element:nth-child(2) {
    animation-delay: 2s;
}

.floating-element:nth-child(3) {
    animation-delay: 4s;
}

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

/* Fade In Animations */
.animate-fade-in {
    animation: fadeIn 1s ease-out;
}

.animate-fade-in-delay {
    animation: fadeIn 1s ease-out 0.5s both;
}

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

/* Service Cards 3D Effect */
.service-card {
    perspective: 1000px;
}

.service-card:hover .glass-morphism {
    transform: rotateX(5deg) rotateY(5deg);
    box-shadow: 0 20px 40px rgba(124, 58, 237, 0.2);
}

/* Portfolio Items */
.portfolio-item:hover .glass-morphism {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 245, 255, 0.2);
}

/* WhatsApp Button */
.whatsapp-btn {
    position: relative;
}

.whatsapp-btn::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    background: conic-gradient(from 45deg, #22c55e, #10b981, #22c55e);
    border-radius: 50%;
    z-index: -1;
    animation: rotate 3s linear infinite;
}

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

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

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

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #7C3AED, #FF6B35);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #9333EA, #FF8C42);
}

/* RTL Adjustments */
[dir="rtl"] .space-x-reverse > :not([hidden]) ~ :not([hidden]) {
    --tw-space-x-reverse: 1;
    margin-right: calc(2rem * var(--tw-space-x-reverse));
    margin-left: calc(2rem * calc(1 - var(--tw-space-x-reverse)));
}

/* Loading Animation */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #00F5FF;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Section Reveal Animation */
.section-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease-out;
}

.section-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

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

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

/* Gradient Text Effect */
.gradient-text {
    background: linear-gradient(45deg, #7C3AED, #FF6B35, #00F5FF);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 3s ease infinite;
}

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

/* Process Timeline */
.timeline-item {
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    top: 50%;
    right: -25px;
    width: 50px;
    height: 2px;
    background: linear-gradient(to left, #7C3AED, #FF6B35);
    transform: translateY(-50%);
}

.timeline-item:last-child::before {
    display: none;
}

/* Hover Effects */
.hover-lift:hover {
    transform: translateY(-5px);
    transition: transform 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(124, 58, 237, 0.5);
    transition: box-shadow 0.3s ease;
}

/* Contact Form Styles */
.form-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.form-input:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: #00F5FF;
    box-shadow: 0 0 0 2px rgba(0, 245, 255, 0.2);
    outline: none;
}

/* Performance Optimizations */
* {
    box-sizing: border-box;
}

img {
    max-width: 100%;
    height: auto;
}

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

/* Print Styles */
@media print {
    .floating-element,
    .whatsapp-btn,
    header {
        display: none !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .glass-morphism {
        background: rgba(255, 255, 255, 0.15);
        border: 2px solid rgba(255, 255, 255, 0.3);
    }
}

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