html {
    scroll-behavior: smooth;
}

/* Enhanced smooth scrolling with custom easing */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
        scroll-padding-top: 100px;
        /* Account for fixed header */
    }
}

/* Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.font-display {
    font-family: 'Playfair Display', serif;
}

.font-body {
    font-family: 'Inter', sans-serif;
}

/* Typography Hierarchy */
.heading-xl {
    font-size: 3.5rem;
    line-height: 1.1;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.heading-lg {
    font-size: 2.5rem;
    line-height: 1.2;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.heading-md {
    font-size: 1.875rem;
    line-height: 1.3;
    font-weight: 600;
}

.text-lead {
    font-size: 1.25rem;
    line-height: 1.6;
    font-weight: 400;
}

.text-body {
    font-size: 1rem;
    line-height: 1.7;
    font-weight: 400;
}

/* Professional Animations */
.gradient-overlay {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.8) 0%, rgba(5, 150, 105, 0.9) 100%);
}

.card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Enhanced fade-in animations with performance optimizations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity, transform;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered animation delays for better visual flow */
.fade-in:nth-child(1) {
    transition-delay: 0.1s;
}

.fade-in:nth-child(2) {
    transition-delay: 0.2s;
}

.fade-in:nth-child(3) {
    transition-delay: 0.3s;
}

.fade-in:nth-child(4) {
    transition-delay: 0.4s;
}

.fade-in:nth-child(5) {
    transition-delay: 0.5s;
}

.fade-in:nth-child(6) {
    transition-delay: 0.6s;
}

/* Enhanced fade-in variants for different elements */
.fade-in-up {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-scale {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
    transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in-scale.visible {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.fade-in-right {
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Scroll-based animations */
body.scrolling-down nav {
    transform: translateY(-5px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.scrolling-up nav {
    transform: translateY(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Loading state styles */
body:not(.loaded) .fade-in {
    opacity: 0;
    transform: translateY(30px);
}

body.loaded .fade-in {
    transition-delay: 0.1s;
}

/* Enhanced section transitions */
section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Performance optimizations */
.card-hover,
.service-card,
.testimonial-card {
    will-change: transform, opacity;
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {

    .fade-in,
    .fade-in-up,
    .fade-in-scale,
    .fade-in-left,
    .fade-in-right,
    section {
        transition: none !important;
        animation: none !important;
    }

    .fade-in,
    .fade-in-up,
    .fade-in-scale,
    .fade-in-left,
    .fade-in-right,
    section {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* Enhanced hover states with better performance */
.card-hover:hover {
    transform: translateY(-8px) translateZ(0);
    will-change: transform;
}

/* Optimized animations for mobile */
@media (max-width: 768px) {
    .fade-in {
        transform: translateY(20px);
    }

    .fade-in-up {
        transform: translateY(30px);
    }

    .card-hover:hover {
        transform: translateY(-4px) translateZ(0);
    }
}

.hero-text {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* Enhanced Hero Text Styling */
.hero-text-enhanced {
    text-shadow: 3px 3px 8px rgba(0, 0, 0, 0.4), 1px 1px 3px rgba(0, 0, 0, 0.6);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.hero-subtext {
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.4);
    opacity: 0.95;
}

/* Enhanced Hero CTA Button */
.hero-cta {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transform: translateY(0);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-cta:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2), 0 0 30px rgba(16, 185, 129, 0.3);
    background: linear-gradient(135deg, #ffffff 0%, #ecfdf5 100%);
    border-color: rgba(16, 185, 129, 0.3);
}

.hero-cta:active {
    transform: translateY(-2px) scale(1.02);
}

.section-divider {
    background: linear-gradient(90deg, transparent, #10b981, transparent);
    height: 2px;
    width: 80px;
    margin: 1.5rem auto;
    border-radius: 1px;
}

/* Enhanced Button Styles */
.btn-primary {
    background: linear-gradient(135deg, #059669, #047857);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px 0 rgba(5, 150, 105, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px 0 rgba(5, 150, 105, 0.4);
}

/* Accessibility Improvements */
.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 States */
.focus-ring:focus {
    outline: 2px solid #10b981;
    outline-offset: 2px;
}

/* Enhanced Navigation Styles */
.nav-logo {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-logo:hover {
    color: #059669;
    transform: scale(1.02);
}

.nav-link {
    position: relative;
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #059669, #10b981);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 1px;
}

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

.nav-link:hover {
    transform: translateY(-1px);
}

.nav-cta {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-cta:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 10px 30px 0 rgba(5, 150, 105, 0.4);
}

/* Enhanced Mobile Menu Animations with Touch Targets */
.mobile-menu-container {
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
}

.mobile-menu-container.show {
    max-height: 450px;
    opacity: 1;
}

/* Enhanced touch targets for mobile */
@media (max-width: 768px) {

    /* Navigation touch targets */
    .mobile-menu-link {
        min-height: 48px;
        display: flex;
        align-items: center;
        font-size: 1.1rem;
        font-weight: 500;
    }

    .mobile-menu-cta {
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.1rem;
        font-weight: 600;
    }

    /* Menu button touch target */
    #menu-btn {
        min-width: 48px;
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Hero CTA touch target */
    .hero-cta {
        min-height: 48px;
        padding: 1rem 2rem;
        font-size: 1.1rem;
    }

    /* Service and testimonial card CTAs */
    .service-cta,
    .contact-cta-primary,
    .contact-cta-secondary {
        min-height: 48px;
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }

    /* Form input touch targets */
    .form-input,
    .form-select,
    .form-textarea {
        min-height: 48px;
        font-size: 1rem;
    }

    /* About section CTA */
    #about a {
        min-height: 48px;
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
}

.mobile-menu-content {
    transform: translateY(-20px);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0.1s;
}

.mobile-menu-container.show .mobile-menu-content {
    transform: translateY(0);
}

.mobile-menu-link {
    transform: translateX(-20px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu-container.show .mobile-menu-link {
    transform: translateX(0);
    opacity: 1;
}

.mobile-menu-container.show .mobile-menu-link:nth-child(1) {
    transition-delay: 0.1s;
}

.mobile-menu-container.show .mobile-menu-link:nth-child(2) {
    transition-delay: 0.15s;
}

.mobile-menu-container.show .mobile-menu-link:nth-child(3) {
    transition-delay: 0.2s;
}

.mobile-menu-container.show .mobile-menu-cta {
    transition-delay: 0.25s;
}

.mobile-menu-cta {
    transform: translateX(-20px) scale(0.95);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu-container.show .mobile-menu-cta {
    transform: translateX(0) scale(1);
    opacity: 1;
}

/* Hamburger Menu Animation */
.menu-icon {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-line-1,
.menu-line-2,
.menu-line-3 {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

.menu-open .menu-line-1 {
    transform: rotate(45deg) translate(6px, 6px);
}

.menu-open .menu-line-2 {
    opacity: 0;
    transform: scale(0);
}

.menu-open .menu-line-3 {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Navigation backdrop enhancement */
nav {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Enhanced About Section Styles */
.about-image-container {
    position: relative;
    display: inline-block;
}

.about-image-glow {
    position: absolute;
    inset: -1rem;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(5, 150, 105, 0.3));
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    filter: blur(20px);
    z-index: -1;
}

.about-image-container:hover .about-image-glow {
    opacity: 1;
}

.about-content-fade {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.about-content-fade.visible {
    opacity: 1;
    transform: translateY(0);
}

.about-content-fade:nth-child(1) {
    transition-delay: 0.1s;
}

.about-content-fade:nth-child(2) {
    transition-delay: 0.2s;
}

.about-content-fade:nth-child(3) {
    transition-delay: 0.3s;
}

.about-content-fade:nth-child(4) {
    transition-delay: 0.4s;
}

/* Initial hidden states for About section animations */
#about .space-y-6>* {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

#about img {
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced profile image styling */
.profile-image-enhanced {
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.profile-image-enhanced:hover {
    transform: scale(1.05) rotate(2deg);
}

.profile-image-enhanced::before {
    content: '';
    position: absolute;
    inset: -8px;
    background: linear-gradient(45deg, rgba(16, 185, 129, 0.3), rgba(5, 150, 105, 0.2), rgba(16, 185, 129, 0.3));
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
    filter: blur(15px);
}

.profile-image-enhanced:hover::before {
    opacity: 1;
}

/* Enhanced credentials box */
.credentials-box {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), rgba(5, 150, 105, 0.08));
    border: 1px solid rgba(16, 185, 129, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.credentials-box:hover {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(5, 150, 105, 0.12));
    border-color: rgba(16, 185, 129, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.15);
}

/* Enhanced Philosophy/Approach Section Animations */
#approach .fade-in {
    opacity: 0;
    transform: translateY(50px) scale(0.95);
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
}

#approach .fade-in.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Staggered animation delays for smooth content reveal */
#approach .fade-in:nth-child(1) {
    transition-delay: 0.1s;
}

#approach .fade-in:nth-child(2) {
    transition-delay: 0.3s;
}

#approach .fade-in:nth-child(3) {
    transition-delay: 0.5s;
}

#approach .fade-in:nth-child(4) {
    transition-delay: 0.7s;
}

#approach .fade-in:nth-child(5) {
    transition-delay: 0.9s;
}

/* Enhanced card hover effects for approach section */
#approach .card-hover {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center bottom;
}

#approach .card-hover:hover {
    transform: translateY(-15px) scale(1.03) rotateX(5deg);
    box-shadow: 0 35px 70px -15px rgba(16, 185, 129, 0.3);
}

/* Enhanced approach section icon animations */
#approach .card-hover:hover svg {
    transform: scale(1.15) rotate(8deg);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced decorative elements animation */
#approach .bg-emerald-100/20 {
    animation: float 8s ease-in-out infinite;
}

#approach .bg-emerald-200/15 {
    animation: float 10s ease-in-out infinite reverse;
}

#approach .bg-emerald-300/10 {
    animation: float 12s ease-in-out infinite;
    animation-delay: 2s;
}

#approach .bg-emerald-400/8 {
    animation: float 14s ease-in-out infinite reverse;
    animation-delay: 4s;
}

/* Enhanced floating animation */
@keyframes float {

    0%,
    100% {
        transform: translateY(0px) rotate(0deg) scale(1);
    }

    25% {
        transform: translateY(-15px) rotate(1deg) scale(1.02);
    }

    50% {
        transform: translateY(-25px) rotate(2deg) scale(1.05);
    }

    75% {
        transform: translateY(-15px) rotate(1deg) scale(1.02);
    }
}

/* Enhanced gradient divider with animation */
#approach .section-divider {
    background: linear-gradient(90deg, transparent, #10b981, #059669, #10b981, transparent);
    height: 4px;
    width: 140px;
    margin: 2rem auto;
    border-radius: 3px;
    box-shadow: 0 3px 12px rgba(16, 185, 129, 0.4);
    animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 3px 12px rgba(16, 185, 129, 0.4);
    }

    50% {
        box-shadow: 0 3px 20px rgba(16, 185, 129, 0.6);
    }
}

/* Enhanced group hover effects for core principles */
#approach .group:hover {
    transform: translateY(-5px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Subtle background pattern animation */
#approach .bg-white/70 {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.8));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Enhanced decorative floating elements */
#approach .animate-bounce {
    animation-duration: 3s;
    animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced Services Section Styles */
.service-card {
    position: relative;
    transform-origin: center bottom;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 35px 70px -15px rgba(5, 150, 105, 0.25),
        0 20px 40px -10px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(16, 185, 129, 0.1);
}

.service-card::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.05));
    border-radius: 1.75rem;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}

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

/* Service CTA Button Enhanced Styles */
.service-cta {
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(5, 150, 105, 0.3);
}

.service-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-cta:hover::before {
    left: 100%;
}

.service-cta:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 15px 35px rgba(5, 150, 105, 0.4);
}

.service-cta:active {
    transform: translateY(0) scale(1.02);
}

/* Service Card Icon Animation */
.service-card .w-16.h-16 {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover .w-16.h-16 {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 15px 30px rgba(5, 150, 105, 0.3);
}

/* Staggered animation delays for service cards */
.service-card:nth-child(1) {
    animation-delay: 0.1s;
}

.service-card:nth-child(2) {
    animation-delay: 0.2s;
}

.service-card:nth-child(3) {
    animation-delay: 0.3s;
}

/* Enhanced responsive design for service cards */
@media (max-width: 1024px) {
    .service-card:hover {
        transform: translateY(-8px) scale(1.01);
    }

    #services .grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    #services {
        padding: 3rem 0;
    }

    #services .grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .service-card {
        margin-bottom: 1.5rem;
        padding: 2rem 1.5rem;
    }

    .service-card:hover {
        transform: translateY(-4px) scale(1.005);
        box-shadow: 0 15px 30px -10px rgba(5, 150, 105, 0.2);
    }

    .service-cta:hover {
        transform: translateY(-1px) scale(1.01);
    }

    #services h2 {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }

    .service-card h3 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .service-card p {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    .service-card .w-16.h-16 {
        width: 3.5rem;
        height: 3.5rem;
    }
}

@media (max-width: 480px) {
    .service-card {
        padding: 1.5rem 1.25rem;
    }

    .service-card h3 {
        font-size: 1.375rem;
    }

    .service-card p {
        font-size: 0.9rem;
    }

    .service-card .w-16.h-16 {
        width: 3rem;
        height: 3rem;
    }
}

/* Enhanced Testimonials Section Styles */
.testimonial-card {
    position: relative;
    transform-origin: center bottom;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.testimonial-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 35px 70px -15px rgba(5, 150, 105, 0.25),
        0 20px 40px -10px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(16, 185, 129, 0.1);
}

.testimonial-card::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.05));
    border-radius: 1.75rem;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}

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

/* Testimonial quote styling */
.testimonial-card blockquote p {
    position: relative;
}

.testimonial-card blockquote p::before {
    content: '"';
    position: absolute;
    left: -0.5rem;
    top: -0.25rem;
    font-size: 2rem;
    color: rgba(16, 185, 129, 0.3);
    font-family: 'Playfair Display', serif;
    line-height: 1;
}

.testimonial-card blockquote p::after {
    content: '"';
    position: absolute;
    right: -0.25rem;
    bottom: -0.5rem;
    font-size: 2rem;
    color: rgba(16, 185, 129, 0.3);
    font-family: 'Playfair Display', serif;
    line-height: 1;
}

/* Enhanced star rating animation */
.testimonial-card .fill-current {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.testimonial-card:hover .fill-current {
    transform: scale(1.1);
    filter: drop-shadow(0 2px 4px rgba(251, 191, 36, 0.3));
}

/* Staggered animation delays for testimonial cards */
.testimonial-card:nth-child(1) {
    animation-delay: 0.1s;
}

.testimonial-card:nth-child(2) {
    animation-delay: 0.2s;
}

.testimonial-card:nth-child(3) {
    animation-delay: 0.3s;
}

/* Trust indicators hover effects */
#testimonials .bg-white/60:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: translateY(-2px);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced Image Loading and Optimization */
.hero-background {
    background-color: #047857;
    /* Fallback color matching brand */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Image loading states */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Section background images with fallbacks */
#services .absolute.inset-0 {
    background-color: rgba(16, 185, 129, 0.02);
}

#testimonials .absolute.inset-0 {
    background-color: rgba(16, 185, 129, 0.01);
}

#approach .absolute.inset-0 {
    background-color: rgba(16, 185, 129, 0.02);
}

/* Responsive image optimization */
@media (max-width: 768px) {
    .hero-background {
        background-image: url('https://images.unsplash.com/photo-1506905925346-21bda4d32df4?q=80&w=1080&auto=format&fit=crop&ixlib=rb-4.0.3'),
            url('https://images.unsplash.com/photo-1544367567-0f2fcb009e0b?q=80&w=1080&auto=format&fit=crop&ixlib=rb-4.0.3') !important;
    }

    /* Mobile optimized section backgrounds */
    #services .absolute.inset-0 {
        background-image: url('https://images.unsplash.com/photo-1544367567-0f2fcb009e0b?q=80&w=1080&auto=format&fit=crop&ixlib=rb-4.0.3') !important;
    }

    #testimonials .absolute.inset-0 {
        background-image: url('https://images.unsplash.com/photo-1571019613454-1cb2f99b2d8b?q=80&w=1080&auto=format&fit=crop&ixlib=rb-4.0.3') !important;
    }
}

@media (min-width: 1920px) {
    .hero-background {
        background-image: url('https://images.unsplash.com/photo-1506905925346-21bda4d32df4?q=80&w=2560&auto=format&fit=crop&ixlib=rb-4.0.3'),
            url('https://images.unsplash.com/photo-1544367567-0f2fcb009e0b?q=80&w=2560&auto=format&fit=crop&ixlib=rb-4.0.3') !important;
    }

    /* High-res section backgrounds */
    #services .absolute.inset-0 {
        background-image: url('https://images.unsplash.com/photo-1544367567-0f2fcb009e0b?q=80&w=2560&auto=format&fit=crop&ixlib=rb-4.0.3') !important;
    }

    #testimonials .absolute.inset-0 {
        background-image: url('https://images.unsplash.com/photo-1571019613454-1cb2f99b2d8b?q=80&w=2560&auto=format&fit=crop&ixlib=rb-4.0.3') !important;
    }
}

/* Image error handling */
img[data-fallback] {
    position: relative;
}

img[data-fallback]::after {
    content: attr(data-fallback);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(5, 150, 105, 0.9);
    color: white;
    padding: 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* Enhanced Contact Form Styles with Responsive Design */
.contact-form-container {
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-form-container:hover {
    transform: translateY(-4px);
    box-shadow: 0 40px 80px -20px rgba(5, 150, 105, 0.15);
}

/* Contact section responsive improvements */
@media (max-width: 768px) {
    #contact {
        padding: 3rem 0;
    }

    #contact h2 {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }

    #contact .grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-form-container {
        padding: 2rem 1.5rem;
        margin: 0 1rem;
    }

    .contact-form-container:hover {
        transform: translateY(-2px);
    }

    .contact-info-card {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .contact-info-card:hover {
        transform: translateY(-2px);
    }

    .contact-info-icon {
        width: 2.5rem;
        height: 2.5rem;
        margin-bottom: 1rem;
    }

    /* Form grid adjustments */
    .form-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* Button spacing */
    .contact-cta-primary,
    .contact-cta-secondary {
        width: 100%;
        margin-bottom: 1rem;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .contact-form-container {
        padding: 1.5rem 1.25rem;
        margin: 0 0.5rem;
    }

    .contact-info-card {
        padding: 1.25rem;
    }

    .contact-info-icon {
        width: 2.25rem;
        height: 2.25rem;
    }

    #contact h2 {
        font-size: 1.75rem;
    }

    .form-input,
    .form-select,
    .form-textarea {
        padding: 0.75rem 0.75rem 0.75rem 2.25rem;
    }
}

/* Enhanced Footer Styles */
footer {
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.5), transparent);
}

/* Footer social media hover effects */
footer .group {
    position: relative;
    overflow: hidden;
}

footer .group::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(5, 150, 105, 0.3));
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: inherit;
}

footer .group:hover::before {
    opacity: 1;
}

/* Footer link animations */
footer nav a {
    position: relative;
    display: inline-block;
}

footer nav a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: linear-gradient(90deg, #10b981, #059669);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

footer nav a:hover::after {
    width: 100%;
}

/* Footer CTA button enhanced styling */
footer .bg-gradient-to-r {
    position: relative;
    overflow: hidden;
}

footer .bg-gradient-to-r::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

footer .bg-gradient-to-r:hover::before {
    left: 100%;
}

/* Enhanced Footer responsive improvements */
@media (max-width: 768px) {
    footer {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }

    footer .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    footer .grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    footer .flex {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1rem;
    }

    footer .space-x-6 {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        margin: 0;
    }

    footer .space-x-6>*+* {
        margin-left: 0;
        margin-top: 0;
    }

    /* Footer navigation links */
    footer nav {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }

    footer nav a {
        min-height: 44px;
        display: flex;
        align-items: center;
        font-size: 1rem;
    }

    /* Footer social links */
    footer .group {
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Footer CTA button */
    footer .bg-gradient-to-r {
        width: 100%;
        max-width: 280px;
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    footer {
        padding-top: 2.5rem;
        padding-bottom: 2.5rem;
    }

    footer .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    footer h3 {
        font-size: 1.25rem;
    }

    footer p {
        font-size: 0.9rem;
        line-height: 1.6;
    }

    footer nav a {
        font-size: 0.95rem;
    }
}

/* Footer fade-in animations */
footer .fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

footer .fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

footer .fade-in:nth-child(1) {
    transition-delay: 0.1s;
}

footer .fade-in:nth-child(2) {
    transition-delay: 0.2s;
}

footer .fade-in:nth-child(3) {
    transition-delay: 0.3s;
}

footer .fade-in:nth-child(4) {
    transition-delay: 0.4s;
}

.form-group {
    position: relative;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    transition: color 0.2s ease;
}

.form-input-container {
    position: relative;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid #e5e7eb;
    border-radius: 1rem;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.form-input:hover,
.form-select:hover,
.form-textarea:hover {
    border-color: #10b981;
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.1);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: #059669;
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1), 0 8px 25px rgba(16, 185, 129, 0.15);
    transform: translateY(-2px);
}

.form-input:focus+.form-input-icon svg,
.form-select:focus+.form-select-icon svg,
.form-textarea:focus+.form-textarea-icon svg {
    color: #059669;
    transform: scale(1.1);
}

.form-input-icon,
.form-select-icon,
.form-textarea-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-textarea-icon {
    top: 1rem;
    transform: none;
}

.form-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: none;
    cursor: pointer;
}

.form-select-icon {
    right: 1rem;
    left: auto;
    pointer-events: none;
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
    padding-top: 1rem;
}

.form-error {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-error::before {
    content: '⚠';
    font-size: 1rem;
}

.form-input.error,
.form-select.error,
.form-textarea.error {
    border-color: #dc2626;
    background: rgba(254, 242, 242, 0.8);
}

.form-input.error:focus,
.form-select.error:focus,
.form-textarea.error:focus {
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.1);
}

.form-input.success,
.form-select.success,
.form-textarea.success {
    border-color: #059669;
    background: rgba(236, 253, 245, 0.8);
}

.form-input.success+.form-input-icon svg,
.form-select.success+.form-select-icon svg,
.form-textarea.success+.form-textarea-icon svg {
    color: #059669;
}

/* Enhanced CTA Button Styles */
.contact-cta-primary {
    background: linear-gradient(135deg, #059669, #047857);
    color: white;
    padding: 1rem 2rem;
    border-radius: 1rem;
    font-size: 1.125rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 25px rgba(5, 150, 105, 0.3);
    position: relative;
    overflow: hidden;
}

.contact-cta-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-cta-primary:hover::before {
    left: 100%;
}

.contact-cta-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 40px rgba(5, 150, 105, 0.4);
    background: linear-gradient(135deg, #047857, #065f46);
}

.contact-cta-primary:active {
    transform: translateY(-1px) scale(1.01);
}

.contact-cta-secondary {
    background: rgba(255, 255, 255, 0.9);
    color: #059669;
    padding: 1rem 2rem;
    border-radius: 1rem;
    font-size: 1.125rem;
    font-weight: 600;
    border: 2px solid #10b981;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-block;
    text-align: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.contact-cta-secondary:hover {
    background: #059669;
    color: white;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 40px rgba(5, 150, 105, 0.3);
}

.contact-cta-secondary:active {
    transform: translateY(-1px) scale(1.01);
}

/* Success and Error Message Styles */
.form-success {
    background: linear-gradient(135deg, rgba(236, 253, 245, 0.9), rgba(220, 252, 231, 0.8));
    border: 1px solid #10b981;
    border-radius: 1rem;
    padding: 1.5rem;
    margin-top: 1.5rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.form-error-message {
    background: linear-gradient(135deg, rgba(254, 242, 242, 0.9), rgba(254, 226, 226, 0.8));
    border: 1px solid #dc2626;
    border-radius: 1rem;
    padding: 1.5rem;
    margin-top: 1.5rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Contact Info Cards */
.contact-info-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(16, 185, 129, 0.1);
    border-radius: 1.5rem;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-info-card:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.2);
}

.contact-info-icon {
    width: 3rem;
    height: 3rem;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: white;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-info-card:hover .contact-info-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
}

/* Form Validation States */
.form-group.has-error .form-label {
    color: #dc2626;
}

.form-group.has-success .form-label {
    color: #059669;
}

/* Loading State for Submit Button */
.contact-cta-primary.loading {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.contact-cta-primary.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
}

@keyframes spin {
    0% {
        transform: translateY(-50%) rotate(0deg);
    }

    100% {
        transform: translateY(-50%) rotate(360deg);
    }
}

/* Comprehensive Mobile Typography Adjustments */
@media (max-width: 768px) {
    .heading-xl {
        font-size: 2.25rem;
        line-height: 1.2;
    }

    .heading-lg {
        font-size: 1.875rem;
        line-height: 1.3;
    }

    .heading-md {
        font-size: 1.5rem;
        line-height: 1.4;
    }

    .text-lead {
        font-size: 1.125rem;
        line-height: 1.6;
    }

    .text-body {
        font-size: 0.95rem;
        line-height: 1.7;
    }

    .contact-form-container {
        padding: 1.5rem;
    }

    .form-input,
    .form-select,
    .form-textarea {
        padding: 0.875rem 0.875rem 0.875rem 2.5rem;
        font-size: 0.95rem;
    }

    .contact-cta-primary,
    .contact-cta-secondary {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
        min-height: 48px;
        /* Ensure proper touch target */
    }

    .contact-info-card {
        padding: 1.5rem;
    }

    /* Hero section mobile improvements */
    #hero h1 {
        font-size: 2.25rem;
        line-height: 1.2;
        margin-bottom: 1.5rem;
    }

    #hero p {
        font-size: 1.125rem;
        line-height: 1.6;
        margin-bottom: 2rem;
    }

    /* Navigation mobile improvements */
    nav .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* Section padding adjustments */
    section {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }

    .py-20,
    .py-24 {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
}

/* Enhanced tablet responsive design */
@media (min-width: 769px) and (max-width: 1024px) {
    .heading-xl {
        font-size: 3rem;
    }

    .heading-lg {
        font-size: 2.25rem;
    }

    .text-lead {
        font-size: 1.2rem;
    }

    /* Tablet grid adjustments */
    .grid-cols-1.md\\:grid-cols-2.lg\\:grid-cols-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.5rem;
    }

    /* Tablet navigation spacing */
    nav .space-x-10 {
        gap: 1.5rem;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .heading-xl {
        font-size: 2rem;
        line-height: 1.2;
    }

    .heading-lg {
        font-size: 1.75rem;
        line-height: 1.3;
    }

    .text-lead {
        font-size: 1rem;
        line-height: 1.6;
    }

    /* Container padding for small screens */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* Hero adjustments for small screens */
    #hero h1 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }

    #hero p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    /* Button sizing for small screens */
    .hero-cta {
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
        min-height: 48px;
    }

    /* Card padding adjustments */
    .service-card,
    .testimonial-card {
        padding: 1.5rem;
    }

    /* Form adjustments */
    .form-input,
    .form-select,
    .form-textarea {
        padding: 0.75rem 0.75rem 0.75rem 2.25rem;
        font-size: 0.9rem;
    }
}

/* Enhanced About section mobile optimizations */
@media (max-width: 768px) {
    #about .flex {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }

    #about .lg:w-2/5,
    #about .lg\\:w-3/5 {
        width: 100%;
    }

    #about img {
        width: 16rem;
        height: 16rem;
        margin: 0 auto;
    }

    #about h2 {
        font-size: 2rem;
        line-height: 1.2;
        text-align: center;
    }

    #about p {
        font-size: 1rem;
        line-height: 1.6;
        text-align: center;
    }

    #about .credentials-box {
        margin: 1.5rem 0;
    }

    #about .lg\\:text-left {
        text-align: center;
    }
}

@media (max-width: 480px) {
    #about img {
        width: 14rem;
        height: 14rem;
    }

    #about h2 {
        font-size: 1.75rem;
    }

    #about .credentials-box {
        padding: 1rem;
    }
}

/* Enhanced Philosophy section mobile adjustments */
@media (max-width: 768px) {
    #approach {
        padding: 3rem 0;
    }

    #approach .card-hover:hover {
        transform: translateY(-6px) scale(1.005);
    }

    #approach .bg-emerald-100/20,
    #approach .bg-emerald-200/15,
    #approach .bg-emerald-300/10,
    #approach .bg-emerald-400/8 {
        animation: none;
        display: none;
        /* Hide decorative elements on mobile for cleaner look */
    }

    #approach h2 {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }

    #approach .grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    #approach .bg-white/70 {
        padding: 2rem;
        margin: 1rem;
    }

    #approach .space-y-6 {
        gap: 1.5rem;
    }

    #approach .w-20.h-20 {
        width: 4rem;
        height: 4rem;
    }

    #approach .w-10.h-10 {
        width: 2rem;
        height: 2rem;
    }
}

@media (max-width: 480px) {
    #approach .bg-white/70 {
        padding: 1.5rem;
        margin: 0.5rem;
    }

    #approach h2 {
        font-size: 1.75rem;
    }

    #approach h3 {
        font-size: 1.5rem;
    }

    #approach h4 {
        font-size: 1.25rem;
    }
}

/* Enhanced Testimonials mobile optimizations */
@media (max-width: 768px) {
    #testimonials {
        padding: 3rem 0;
    }

    .testimonial-card {
        margin-bottom: 1.5rem;
        padding: 1.5rem;
    }

    .testimonial-card:hover {
        transform: translateY(-4px) scale(1.005);
        box-shadow: 0 15px 30px -10px rgba(5, 150, 105, 0.2);
    }

    .testimonial-card blockquote p::before,
    .testimonial-card blockquote p::after {
        font-size: 1.25rem;
    }

    .testimonial-card blockquote p {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    /* Trust indicators mobile layout */
    #testimonials .bg-white/60 {
        padding: 1.5rem;
        margin-bottom: 1rem;
    }

    #testimonials .grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    #testimonials h2 {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }

    /* Star ratings mobile adjustment */
    .testimonial-card .fill-current {
        width: 1rem;
        height: 1rem;
    }
}

@media (max-width: 480px) {
    .testimonial-card {
        padding: 1.25rem;
    }

    .testimonial-card blockquote p {
        font-size: 0.9rem;
    }

    .testimonial-card blockquote p::before,
    .testimonial-card blockquote p::after {
        font-size: 1rem;
    }

    #testimonials .bg-white/60 {
        padding: 1.25rem;
    }
}

/* Comprehensive spacing and alignment improvements */
@media (max-width: 768px) {

    /* Container and section spacing */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* Section vertical spacing */
    section {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }

    /* Grid spacing adjustments */
    .grid {
        gap: 1.5rem;
    }

    .space-y-6>*+* {
        margin-top: 1.5rem;
    }

    .space-y-8>*+* {
        margin-top: 2rem;
    }

    /* Card spacing */
    .service-card,
    .testimonial-card {
        margin-bottom: 1.5rem;
    }

    /* Text spacing */
    .mb-6 {
        margin-bottom: 1.5rem;
    }

    .mb-8 {
        margin-bottom: 2rem;
    }

    .mb-12 {
        margin-bottom: 3rem;
    }

    /* Hero section spacing */
    #hero .max-w-5xl {
        padding: 0 1rem;
    }

    /* Services grid spacing */
    #services .grid {
        gap: 2rem;
    }

    /* Contact form spacing */
    .contact-form-container {
        margin: 1rem;
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 640px) {
    .about-heading-mobile {
        font-size: 1.75rem;
    }

    .about-image-mobile {
        width: 14rem;
        height: 14rem;
    }

    /* Testimonials mobile adjustments */
    .testimonial-card {
        padding: 1.5rem;
    }

    .testimonial-card blockquote p {
        font-size: 1rem;
    }

    /* Extra small screen adjustments */
    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    section {
        padding-top: 2.5rem;
        padding-bottom: 2.5rem;
    }

    .grid {
        gap: 1.25rem;
    }

    /* Hero adjustments for very small screens */
    #hero h1 {
        font-size: 1.875rem;
        line-height: 1.2;
    }

    #hero p {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    .hero-cta {
        padding: 0.75rem 1.25rem;
        font-size: 0.95rem;
    }
}

/* Additional responsive improvements for consistency */

/* Landscape mobile orientation */
@media (max-width: 768px) and (orientation: landscape) {
    #hero {
        height: 100vh;
        min-height: 500px;
    }

    #hero h1 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }

    #hero p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    section {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
}

/* Large screens optimization */
@media (min-width: 1440px) {
    .container {
        max-width: 1280px;
    }

    .heading-xl {
        font-size: 4rem;
    }

    .heading-lg {
        font-size: 3rem;
    }

    .text-lead {
        font-size: 1.375rem;
    }
}

/* Print styles */
@media print {

    nav,
    footer,
    .hero-cta,
    .service-cta,
    .contact-cta-primary,
    .contact-cta-secondary {
        display: none;
    }

    section {
        page-break-inside: avoid;
        padding: 1rem 0;
    }

    .card-hover,
    .service-card,
    .testimonial-card {
        box-shadow: none;
        border: 1px solid #e5e7eb;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {

    .bg-white/90,
    .bg-white/80,
    .bg-white/70,
    .bg-white/60 {
        background: white;
    }

    .text-gray-600,
    .text-gray-700 {
        color: #000;
    }

    .border-emerald-100/50,
    .border-emerald-200/70 {
        border-color: #059669;
    }
}

/* Focus improvements for keyboard navigation */
@media (prefers-reduced-motion: no-preference) {
    .focus-ring:focus {
        outline: 3px solid #10b981;
        outline-offset: 3px;
        transition: outline-offset 0.2s ease;
    }
}

/* Ensure minimum touch targets on all interactive elements */
a,
button,
input,
select,
textarea {
    min-height: 44px;
    min-width: 44px;
}

/* Exception for inline text links */
p a,
li a,
span a {
    min-height: auto;
    min-width: auto;
}