/* Custom styles for Techprizy website */

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

/* Enhanced animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInFromLeft {
    from { transform: translateX(-100px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideInFromRight {
    from { transform: translateX(100px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

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

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

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

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

/* Hero Section Animations */
@keyframes blob {
    0% { transform: translate(0px, 0px) scale(1); }
    33% { transform: translate(30px, -50px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
    100% { transform: translate(0px, 0px) scale(1); }
}

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

@keyframes float-delay-1 {
    0% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-15px) scale(1.1); }
    100% { transform: translateY(0px) scale(1); }
}

@keyframes float-delay-2 {
    0% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-10px) scale(0.9); }
    100% { transform: translateY(0px) scale(1); }
}

@keyframes float-delay-3 {
    0% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-20px) scale(1.2); }
    100% { transform: translateY(0px) scale(1); }
}

/* Apply animations to sections */
#home {
    animation: fadeIn 1.5s ease-in-out;
    position: relative;
    overflow: hidden;
}

#home::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(79, 70, 229, 0.1), rgba(124, 58, 237, 0.1));
    z-index: 0;
}

#home .md\:w-1\/2:first-child {
    animation: slideInFromLeft 1.2s ease-in-out;
    position: relative;
    z-index: 1;
}

#home .md\:w-1\/2:last-child {
    animation: slideInFromRight 1.2s ease-in-out;
    position: relative;
    z-index: 1;
}

/* Enhanced service cards */
.service-card {
    animation: fadeIn 0.8s ease-in-out;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(79, 70, 229, 0.1), rgba(124, 58, 237, 0.1));
    opacity: 0;
    transition: opacity 0.4s ease;
}

.service-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 30px -10px rgba(0, 0, 0, 0.2);
}

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

/* Enhanced hover effects */
.hover-zoom {
    transition: all 0.4s ease;
}

.hover-zoom:hover {
    transform: scale(1.08);
    box-shadow: 0 20px 30px -10px rgba(0, 0, 0, 0.2);
}

/* Enhanced button styles */
.btn-gradient {
    background: linear-gradient(45deg, #4F46E5, #7C3AED);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.btn-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #7C3AED, #4F46E5);
    transition: all 0.4s ease;
}

.btn-gradient:hover::before {
    left: 0;
}

.btn-gradient:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 20px -10px rgba(0, 0, 0, 0.3);
}

/* Enhanced text gradient */
.text-gradient {
    background: linear-gradient(45deg, #4F46E5, #7C3AED);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
    animation: pulse 3s infinite;
}

/* Enhanced card shadows */
.custom-shadow {
    box-shadow: 0 15px 30px -10px rgba(0, 0, 0, 0.15);
    transition: all 0.4s ease;
}

.custom-shadow:hover {
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.2);
}

/* Enhanced form inputs */
.form-input {
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.form-input:focus {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -10px rgba(79, 70, 229, 0.3);
    border-color: #4F46E5;
}

/* Enhanced mobile menu */
#mobile-menu {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: top;
}

#mobile-menu.hidden {
    transform: scaleY(0);
    opacity: 0;
}

#mobile-menu:not(.hidden) {
    transform: scaleY(1);
    opacity: 1;
}

/* Enhanced testimonial cards */
.testimonial-card {
    transition: all 0.4s ease;
    position: relative;
}

.testimonial-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.2);
}

.testimonial-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(45deg, #4F46E5, #7C3AED);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.testimonial-card:hover::after {
    transform: scaleX(1);
}

/* Enhanced portfolio items */
.portfolio-item {
    position: relative;
    overflow: hidden;
}

.portfolio-item img {
    transition: all 0.6s ease;
}

.portfolio-item:hover img {
    transform: scale(1.1);
}

.portfolio-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(79, 70, 229, 0.2), rgba(124, 58, 237, 0.2));
    opacity: 0;
    transition: opacity 0.4s ease;
}

.portfolio-item:hover::before {
    opacity: 1;
}

/* Enhanced scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 6px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #4F46E5, #7C3AED);
    border-radius: 6px;
    border: 3px solid #f1f1f1;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #4338CA, #6D28D9);
}

/* Loading animation */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loading.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #4F46E5;
    border-radius: 50%;
    animation: rotate 1s linear infinite;
}

/* Hero Section Animations */
.animate-blob {
    animation: blob 7s infinite;
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-float-delay-1 {
    animation: float-delay-1 4s ease-in-out infinite;
}

.animate-float-delay-2 {
    animation: float-delay-2 5s ease-in-out infinite;
}

.animate-float-delay-3 {
    animation: float-delay-3 6s ease-in-out infinite;
}

.animation-delay-2000 {
    animation-delay: 2s;
}

.animation-delay-4000 {
    animation-delay: 4s;
}

.perspective-1000 {
    perspective: 1000px;
}

.transform-style-3d {
    transform-style: preserve-3d;
}

.rotate-y-12 {
    transform: rotateY(12deg);
}

/* Hero Section Responsive Adjustments */
@media (max-width: 1024px) {
    .perspective-1000 {
        perspective: 800px;
    }
    
    .rotate-y-12 {
        transform: rotateY(5deg);
    }
}

@media (max-width: 768px) {
    .perspective-1000 {
        perspective: 600px;
    }
    
    .rotate-y-12 {
        transform: rotateY(5deg);
    }
}

/* Service card enhancements */
.service-card {
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 30px -10px rgba(0, 0, 0, 0.2);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(79, 70, 229, 0.1), rgba(124, 58, 237, 0.1));
    opacity: 0;
    transition: opacity 0.4s ease;
}

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

/* Application card enhancements */
.application-card {
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.application-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 30px -10px rgba(0, 0, 0, 0.2);
}

.application-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(79, 70, 229, 0.1), rgba(124, 58, 237, 0.1));
    opacity: 0;
    transition: opacity 0.4s ease;
}

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

/* More granular mobile styles */
@media (max-width: 640px) {
    /* Reduce heading sizes for very small screens */
    h1, .text-6xl {
        font-size: 2.5rem; /* Equivalent to text-4xl */
        line-height: 1.2;
    }

    h2, .text-5xl {
        font-size: 2rem; /* Equivalent to text-3xl */
    }

    /* Adjust hero section padding and layout */
    #home {
        padding-top: 6rem;
        padding-bottom: 4rem;
    }

    /* Simplify the 3D hero animation on mobile */
    #home .w-80.h-96 {
        width: 18rem; /* 288px */
        height: 24rem; /* 384px */
    }

    /* Adjust 'About Us' overlapping stats box for mobile */
    #about .relative .absolute {
        position: static;
        margin-top: 1.5rem; /* Add space between image and stats */
        transform: none;
    }

    /* Ensure footer columns have adequate spacing */
    footer .grid > div {
        margin-bottom: 2rem;
    }
    
    /* Mobile adjustments for service cards */
    .service-card {
        margin-bottom: 1rem;
    }
    
    /* Mobile adjustments for application cards */
    .application-card {
        margin-bottom: 1rem;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    .service-card:hover {
        transform: translateY(-5px) scale(1.01);
    }
}