/* Font Family */
* {
    font-family: 'Poppins', sans-serif;
}

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

.animate-blob {
    animation: blob 7s infinite;
}

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

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

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

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

::-webkit-scrollbar-thumb {
    background: #4f46e5;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4338ca;
}

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

/* Mobile responsive adjustments */
@media (max-width: 640px) {
    h1 {
        line-height: 1.2;
    }

    h2 {
        font-size: 1.875rem;
    }

    /* Ensure no horizontal scroll on mobile */
    body {
        overflow-x: hidden;
    }

    .px-4 {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* Stack layout on small screens */
    .grid {
        gap: 1.5rem;
    }
}

/* Gradient text animation */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Fade in on scroll with AOS */
[data-aos] {
    opacity: 0;
}

[data-aos].aos-animate {
    opacity: 1;
    transition: opacity 0.6s ease-in-out;
}

/* Enhanced link styling */
a {
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    text-decoration: none;
}

/* Form input styling */
input[type="email"],
input[type="text"],
textarea {
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

input[type="email"]:focus,
input[type="text"]:focus,
textarea:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Card hover effect */
.rounded-2xl,
.rounded-xl {
    transition: all 0.3s ease;
}

/* Feature card hover elevation */
.bg-white.rounded-xl:hover,
.bg-white.rounded-2xl:hover {
    transform: translateY(-8px);
}

/* Section padding responsive */
@media (max-width: 768px) {
    section {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }
}

/* Navigation mobile menu animation */
#mobile-menu {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Testimonial star styling */
.flex.gap-1 span {
    font-size: 1.25rem;
}

/* Pricing card featured state */
.scale-105 {
    position: relative;
    z-index: 10;
}

/* Template grid responsive */
@media (max-width: 640px) {
    .grid.md\:grid-cols-2 {
        grid-template-columns: 1fr;
    }

    .grid.md\:grid-cols-3 {
        grid-template-columns: 1fr;
    }

    .grid.md\:grid-cols-4 {
        grid-template-columns: 1fr;
    }
}

/* Ensure footer links are visible */
footer a {
    color: #9ca3af;
}

footer a:hover {
    color: #a5b4fc;
}

/* Loading state for buttons */
button:active {
    transform: scale(0.98);
}

/* High contrast for CTAs */
.bg-gradient-to-r {
    background-attachment: fixed;
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Hero section background pattern */
#hero {
    position: relative;
}

#hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(168, 85, 247, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

/* Ensure proper stacking */
.relative {
    position: relative;
    z-index: 1;
}

.absolute {
    z-index: 0;
}

/* Mobile menu z-index */
#mobile-menu {
    z-index: 40;
}

/* CTA form responsive */
@media (max-width: 640px) {
    .flex.flex-col.sm\:flex-row {
        flex-direction: column;
    }

    .max-w-xs {
        max-width: 100%;
    }
}

/* Image styling */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Testimonial image circle */
.rounded-full {
    border-radius: 9999px;
    overflow: hidden;
}

/* Ensure button text is readable */
button {
    cursor: pointer;
    user-select: none;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Grid gap responsive */
@media (max-width: 768px) {
    .gap-8 {
        gap: 1.5rem;
    }

    .gap-4 {
        gap: 1rem;
    }
}

/* Text overflow handling */
.line-clamp-2 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Prevent layout shift */
html {
    scroll-behavior: smooth;
    scrollbar-gutter: stable;
}

/* Background color transitions */
body {
    background-color: #ffffff;
    transition: background-color 0.3s ease;
}

/* Enhanced contrast for accessibility */
.text-gray-900 {
    color: #111827;
}

.text-gray-600 {
    color: #4b5563;
}

.text-gray-700 {
    color: #374151;
}

/* Focus visible for keyboard navigation */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #4f46e5;
    outline-offset: 2px;
}
