/* Hero Section Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

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

::-webkit-scrollbar-thumb {
    background: #1e40af;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0369a1;
}

/* Section transitions */
section {
    animation: fadeIn 0.6s ease-out;
}

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

button:hover {
    transform: translateY(-2px);
}

/* Card hover scale effect */
.group:hover {
    animation: none;
}

/* Link underline effect */
.nav-link {
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #1e40af;
    transition: width 0.3s ease;
}

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

/* Grain texture overlay (optional) */
@supports (mix-blend-mode: overlay) {
    body::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-image: url('data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 width=%22100%22 height=%22100%22><filter id=%22noise%22><feTurbulence type=%22fractalNoise%22 baseFrequency=%220.9%22 numOctaves=%221%22 result=%22noise%22/><feColorMatrix in=%22noise%22 type=%22saturate%22 values=%220.1%22/></filter><rect width=%22100%22 height=%22100%22 filter=%22url(%23noise)%22 opacity=%220.03%22/></svg>');
        pointer-events: none;
        mix-blend-mode: overlay;
        z-index: -1;
    }
}

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

#mobile-nav.hidden {
    display: none;
}

/* Form input focus states */
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

/* Accessible focus state for keyboard navigation */
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
    border-color: #1e40af;
}

/* Smooth transitions for interactive elements */
a, button, input, select, textarea {
    transition: all 0.2s ease;
}

/* Remove default button styles on input[type="submit"] */
input[type="submit"] {
    cursor: pointer;
}

/* Ensure text selection is readable */
::selection {
    background-color: #1e40af;
    color: white;
}

::-moz-selection {
    background-color: #1e40af;
    color: white;
}

/* Hero section image optimization */
@media (max-width: 768px) {
    section {
        display: block;
    }
}

/* Responsive hero with flexbox */
@media (max-width: 1024px) {
    .hero-content {
        padding: 2rem 1rem;
    }
}

/* Ensure cards don't get too wide */
.card-grid {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .card-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

/* Gradient text support */
.bg-clip-text {
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Professional shadow */
.shadow-professional {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

/* Hover lift effect */
.hover\:lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Service card gradient animations */
.service-card {
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-8px);
}

/* Testimonial card animations */
.testimonial-card {
    transition: all 0.3s ease;
}

.testimonial-card:hover {
    box-shadow: 0 20px 50px rgba(30, 64, 175, 0.15);
}

/* Ensure proper text rendering */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Footer link hover effects */
footer a {
    transition: color 0.2s ease;
}

footer a:hover {
    color: #60a5fa;
}

