/* Custom CSS for animations and additional styling */
@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

@keyframes techScroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

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

.animate-scroll {
    animation: scroll 30s linear infinite;
}

.animate-tech-scroll {
    animation: techScroll 40s linear infinite;
}

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

/* Custom hover effects */
.group:hover .group-hover\:translate-x-1 {
    transform: translateX(0.25rem);
}

.group:hover .group-hover\:scale-110 {
    transform: scale(1.1);
}

/* Form focus styles */
input:focus, textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Button hover effects */
button {
    transition: all 0.3s ease;
}

/* Loading animation */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Success message */
.success-message {
    background-color: #10b981;
    color: white;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-top: 1rem;
    text-align: center;
}

/* Error message */
.error-message {
    background-color: #ef4444;
    color: white;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-top: 1rem;
    text-align: center;
}

/* Mobile menu animation */
#mobile-menu {
    transition: all 0.3s ease;
}

#mobile-menu.show {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

/* Cookie consent animation */
#cookie-consent.show {
    display: block;
    animation: fadeIn 0.5s ease-in-out;
}

/* Fix for text cutting issues */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    padding-bottom: 0.1em;
}

/* Ensure proper line height for gradient text */
.bg-clip-text {
    line-height: 1.1;
    padding-bottom: 0.05em;
}

/* CRITICAL: Service page button fixes - prevent text wrapping */
.service-hero-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap !important;
    min-width: fit-content !important;
    max-width: 100% !important;
    overflow: hidden !important;
    flex-wrap: nowrap !important;
}

.service-hero-button span:first-child {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    flex-shrink: 1 !important;
}

.service-hero-button span:last-child {
    flex-shrink: 0 !important;
    margin-left: 0.5rem !important;
}

/* Responsive button text sizing for service pages */
@media (max-width: 640px) {
    .service-hero-button {
        font-size: 0.875rem !important;
        padding: 0.75rem 1.5rem !important;
        max-width: 280px !important;
        margin: 0 auto !important;
    }
    
    .service-hero-button span:first-child {
        font-size: 0.875rem !important;
        max-width: 180px !important;
    }
}

@media (min-width: 641px) and (max-width: 768px) {
    .service-hero-button {
        font-size: 1rem !important;
        padding: 1rem 2rem !important;
        max-width: 320px !important;
    }
    
    .service-hero-button span:first-child {
        max-width: 220px !important;
    }
}

@media (min-width: 769px) {
    .service-hero-button {
        font-size: 1.125rem !important;
        padding: 1rem 2rem !important;
        max-width: 400px !important;
    }
    
    .service-hero-button span:first-child {
        max-width: 300px !important;
    }
}

/* Process section line fixes - ensure lines are behind circles */
.process-step-container {
    position: relative;
    z-index: 10;
}

.process-connecting-line {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, rgba(99, 102, 241, 0.3), rgba(168, 85, 247, 0.3));
    transform: translateY(-50%);
    z-index: 1;
}

.process-step-circle {
    position: relative;
    z-index: 20;
    background: white;
}

/* UX/UI Design process specific fixes */
.ux-process-container {
    position: relative;
}

.ux-process-step {
    position: relative;
    z-index: 10;
}

.ux-process-line {
    position: absolute;
    top: 2rem;
    left: 100%;
    width: calc(100% - 2rem);
    height: 2px;
    background: linear-gradient(to right, rgba(99, 102, 241, 0.3), rgba(168, 85, 247, 0.3));
    z-index: 1;
    transform: translateX(-50%);
}

.ux-process-circle {
    position: relative;
    z-index: 20;
    background: white;
    border: 2px solid white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Button text wrapping fixes */
.btn-no-wrap {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Responsive button fixes */
@media (max-width: 640px) {
    .btn-responsive {
        max-width: 280px;
        margin: 0 auto;
    }
    
    .btn-responsive span {
        font-size: 0.875rem;
    }
}

@media (min-width: 641px) and (max-width: 768px) {
    .btn-responsive {
        max-width: 320px;
    }
}

/* Hero text fixes */
.hero-title {
    line-height: 1.1;
    letter-spacing: -0.025em;
}

/* About page specific fixes */
.about-hero h1 {
    line-height: 1.1;
    padding-bottom: 0.2em;
}

/* Service page button fixes */
.service-cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: fit-content;
    margin: 0 auto;
    white-space: nowrap;
}

.service-cta-button span:first-child {
    white-space: nowrap;
}

.service-cta-button span:last-child {
    flex-shrink: 0;
    margin-left: 0.5rem;
}

/* All service page CTA buttons - prevent wrapping */
button[onclick*="window.location.href"] {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap !important;
    flex-wrap: nowrap !important;
}

button[onclick*="window.location.href"] span {
    white-space: nowrap !important;
}

/* Responsive utilities */
@media (max-width: 640px) {
    .text-responsive {
        font-size: 0.875rem;
        line-height: 1.25rem;
    }
    
    .hero-title-mobile {
        font-size: 2.25rem;
        line-height: 2.5rem;
    }
    
    .service-card-mobile {
        padding: 1rem;
    }
    
    .stats-mobile {
        font-size: 1.875rem;
        line-height: 2.25rem;
    }
}

@media (min-width: 641px) and (max-width: 768px) {
    .hero-title-tablet {
        font-size: 3.75rem;
        line-height: 1;
    }
    
    .service-grid-tablet {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .hero-title-desktop {
        font-size: 4.5rem;
        line-height: 1;
    }
    
    .service-grid-desktop {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Ensure proper spacing on all devices */
.container-responsive {
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 640px) {
    .container-responsive {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .container-responsive {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* Mobile-first navigation */
.nav-mobile {
    display: block;
}

@media (min-width: 768px) {
    .nav-mobile {
        display: none;
    }
    
    .nav-desktop {
        display: block;
    }
}

/* Responsive text sizing */
.text-hero {
    font-size: 2.25rem;
    line-height: 2.5rem;
}

@media (min-width: 768px) {
    .text-hero {
        font-size: 3.75rem;
        line-height: 1;
    }
}

@media (min-width: 1024px) {
    .text-hero {
        font-size: 4.5rem;
        line-height: 1;
    }
}

@media (min-width: 1280px) {
    .text-hero {
        font-size: 5rem;
        line-height: 1;
    }
}

/* Responsive grid layouts */
.grid-responsive {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .grid-responsive {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .grid-responsive {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* Responsive padding and margins */
.section-padding {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

@media (min-width: 768px) {
    .section-padding {
        padding-top: 5rem;
        padding-bottom: 5rem;
    }
}

/* Responsive button sizing */
.btn-responsive {
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
}

@media (min-width: 768px) {
    .btn-responsive {
        padding: 1rem 2rem;
        font-size: 1rem;
    }
}

@media (min-width: 1024px) {
    .btn-responsive {
        padding: 1rem 2rem;
        font-size: 1.125rem;
    }
}

/* Responsive card layouts */
.card-responsive {
    padding: 1.5rem;
}

@media (min-width: 768px) {
    .card-responsive {
        padding: 2rem;
    }
}

/* Fix for mobile overflow */
body {
    overflow-x: hidden;
}

/* Responsive image handling */
.img-responsive {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* Mobile-specific adjustments */
@media (max-width: 640px) {
    .mobile-center {
        text-align: center;
    }
    
    .mobile-full-width {
        width: 100%;
    }
    
    .mobile-stack {
        flex-direction: column;
    }
    
    .mobile-space-y {
        margin-top: 1rem;
    }
}

/* Tablet-specific adjustments */
@media (min-width: 641px) and (max-width: 1024px) {
    .tablet-grid-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    
    .tablet-text-center {
        text-align: center;
    }
}

/* Desktop-specific adjustments */
@media (min-width: 1025px) {
    .desktop-grid-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
    
    .desktop-text-left {
        text-align: left;
    }
}

/* Ensure proper line heights for readability */
.text-readable {
    line-height: 1.6;
}

@media (min-width: 768px) {
    .text-readable {
        line-height: 1.7;
    }
}

/* Responsive form elements */
.form-responsive input,
.form-responsive textarea {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
}

@media (min-width: 768px) {
    .form-responsive input,
    .form-responsive textarea {
        padding: 1rem;
    }
}

/* Responsive navigation spacing */
.nav-spacing {
    padding: 0.5rem 1rem;
}

@media (min-width: 768px) {
    .nav-spacing {
        padding: 1rem 1.5rem;
    }
}

@media (min-width: 1024px) {
    .nav-spacing {
        padding: 1rem 2rem;
    }
}