/* Custom CSS for BRIAN8 Website - Redesigned */

/* Import Modern Fonts */
/* Local fonts are loaded via HTML link tags */

/* Root variables for modern theming */
:root {
    --primary-blue: #3b82f6;
    --primary-blue-dark: #2563eb;
    --primary-purple: #8b5cf6;
    --primary-indigo: #6366f1;
    --accent-yellow: #f59e0b;
    --accent-orange: #f97316;
    --accent-pink: #ec4899;
    --text-dark: #0f172a;
    --text-medium: #334155;
    --text-light: #64748b;
    --bg-light: #f8fafc;
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --shadow-light: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-medium: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-large: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-accent: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

/* Base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter Tight', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.65;
    letter-spacing: -0.005em;
    color: var(--text-dark);
    overflow-x: hidden;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

/* Custom utility classes */

.font-montserrat {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Typography improvements */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

/* Force Inter Tight for UI text regardless of utility classes */
.nav-link span,
.cta-button,
.btn-primary,
.btn-secondary,
button,
input,
textarea,
label {
    font-family: 'Inter Tight', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

.font-montserrat {
    letter-spacing: -0.02em;
}

/* Better text rendering */
body, p, span, div {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Navigation improvements */
.nav-link {
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
    transition: left 0.5s;
}

.nav-link:hover::before {
    left: 100%;
}

/* Header scroll effect */
.header-scrolled {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Logo container improvements */
.logo-container {
    position: relative;
    overflow: hidden;
}

.logo-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.2), transparent);
    transition: left 0.6s;
}

.logo-container:hover::before {
    left: 100%;
}

/* Mobile menu improvements - removed conflicting animation */

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

/* CTA button improvements */
.cta-button {
    position: relative;
    overflow: hidden;
}

.cta-button::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;
}

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

/* Parallax scrolling effects */
.parallax-element {
    will-change: transform;
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Smooth transitions for all elements */
* {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Animated counters */
.counter {
    font-variant-numeric: tabular-nums;
    transition: all 0.3s ease;
}

/* Testimonial carousel */
.testimonials-carousel {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    width: 100%;
}

/* New step-based track for auto-advancing testimonials */
.testimonials-track {
    display: flex;
    align-items: stretch;
    gap: 0; /* avoid inter-item gap for precise step alignment */
    width: max-content; /* allow track to be as wide as needed */
    will-change: transform;
}

/* Individual testimonial item widths per breakpoint */
.testimonial-item {
    flex: 0 0 100%;
    box-sizing: border-box;
}

@media (min-width: 640px) {
    /* Tablet still shows one card per view */
    .testimonial-item { flex: 0 0 100%; }
}

@media (min-width: 1024px) {
    .testimonial-item { flex: 0 0 33.3333%; }
}

/* Carousel navigation arrows */
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(59, 130, 246, 0.3);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    backdrop-filter: blur(10px);
}

.carousel-arrow:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.6);
    transform: translateY(-50%) scale(1.1);
}

.carousel-arrow-left {
    left: 10px;
}

.carousel-arrow-right {
    right: 10px;
}

.carousel-arrow i {
    color: #3b82f6;
    font-size: 1.2rem;
}

/* Hide dots on mobile and tablet, show arrows */
@media (max-width: 1024px) {
    .testimonial-dot {
        display: none !important;
    }
    
    .carousel-arrow {
        width: 40px;
        height: 40px;
    }
    
    .carousel-arrow i {
        font-size: 1rem;
    }
}

@media (min-width: 1025px) {
    .carousel-arrow {
        width: 50px;
        height: 50px;
    }
    
    .carousel-arrow i {
        font-size: 1.2rem;
    }
}

/* Ensure carousel works on all screen sizes */
@media (max-width: 640px) {
    .testimonials-carousel {
        margin: 0 -1rem;
        border-radius: 0;
        width: calc(100% + 2rem);
    }
    
    .testimonials-track {
        gap: 0;
    }
    
    .testimonial-item {
        flex: 0 0 100%;
        padding: 0;
    }
    
    .testimonial-card {
        margin: 0;
        max-width: none;
        width: 100%;
        padding: 1.5rem;
        border-radius: 0;
        display: block;
        box-sizing: border-box;
    }
    
    /* Hide dots on mobile */
    .testimonial-dot {
        display: none !important;
    }
}

@media (min-width: 641px) and (max-width: 768px) {
    .testimonials-carousel {
        margin: 0 -1rem;
        width: calc(100% + 2rem);
    }
    
    .testimonials-track {
        gap: 0;
    }
    
    .testimonial-item {
        padding: 0;
        flex: 0 0 100%;
    }
    
    .testimonial-card {
        width: 100%;
        max-width: none;
        padding: 2rem;
        border-radius: 0;
        display: block;
        box-sizing: border-box;
    }
    
    /* Hide dots on tablet */
    .testimonial-dot {
        display: none !important;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .testimonials-carousel {
        margin: 0;
        width: 100%;
    }
    
    .testimonial-item {
        padding: 0;
        flex: 0 0 100%;
    }
    
    .testimonial-card {
        width: 100%;
        max-width: none;
        padding: 2rem;
    }
    
    .testimonial-dot {
        width: 5px !important;
        height: 5px !important;
    }
}

@media (min-width: 1025px) {
    .testimonial-card {
        width: 100%;
        max-width: 4xl;
        padding: 2rem;
    }
    
    .testimonial-item { flex: 0 0 33.3333%; }
    
    .testimonial-dot {
        width: 6px !important;
        height: 6px !important;
    }
}

.testimonial-dot {
    cursor: pointer;
    transition: all 0.3s ease;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.testimonial-dot:hover {
    transform: scale(1.2);
}

/* Hide CTA arrow on mobile and tablet */
@media (max-width: 1024px) {
    .cta-arrow {
        display: none !important;
    }
}

/* Responsive testimonial dots */
@media (max-width: 640px) {
    .testimonial-dot {
        width: 4px;
        height: 4px;
    }
}

@media (min-width: 641px) and (max-width: 768px) {
    .testimonial-dot {
        width: 5px;
        height: 5px;
    }
}

/* Standardize checkmark sizes in responsive design */
.achievement-check {
    font-size: 1.25rem !important;
    width: 1.25rem !important;
    height: 1.25rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Achievement items responsive layout */
.achievement-item {
    display: flex;
    align-items: center;
    space-x: 1rem;
}

/* Story cards responsive layout - icons above text on mobile/tablet */
.story-card {
    display: flex;
    align-items: start;
    space-x: 1rem;
}

@media (max-width: 1024px) {
    .story-card {
        flex-direction: column;
        text-align: center;
        space-x: 0;
        space-y: 1.5rem;
    }
    
    .story-card .flex-shrink-0 {
        align-self: center;
        margin-bottom: 0.5rem;
    }
}

@media (min-width: 1025px) {
    .story-card {
        flex-direction: row;
        text-align: left;
        space-x: 1rem;
    }
}

@media (max-width: 768px) {
    .achievement-item {
        flex-direction: column;
        text-align: center;
        space-x: 0;
        space-y: 0.75rem;
    }
    
    .achievement-check {
        font-size: 1.125rem !important;
        width: 1.125rem !important;
        height: 1.125rem !important;
    }
    
    .achievement-text {
        font-size: 0.9rem;
        line-height: 1.4;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .achievement-item {
        flex-direction: column;
        text-align: center;
        space-x: 0;
        space-y: 0.75rem;
    }
    
    .achievement-check {
        font-size: 1.25rem !important;
        width: 1.25rem !important;
        height: 1.25rem !important;
    }
}

@media (min-width: 1025px) {
    .achievement-item {
        flex-direction: row;
        text-align: left;
        space-x: 1rem;
    }
    
    .achievement-check {
        font-size: 1.375rem !important;
        width: 1.375rem !important;
        height: 1.375rem !important;
    }
}

/* Enhanced section transitions */
section {
    transition: all 0.5s ease;
}

/* Improved hover effects */
.service-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.15);
}

/* Smooth fade-in animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Enhanced loading states */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Improved focus states */
*:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Better mobile touch interactions */
@media (hover: none) and (pointer: coarse) {
    .service-card:active,
    .testimonial-card:active {
        transform: scale(0.98);
    }
}

/* Comprehensive Responsive Design */

/* Mobile First - Base styles for mobile */
@media (max-width: 640px) {
    /* Typography scaling */
    h1 {
        font-size: 2.5rem;
        line-height: 1.2;
    }
    
    h2 {
        font-size: 2rem;
        line-height: 1.3;
    }
    
    h3 {
        font-size: 1.5rem;
        line-height: 1.4;
    }
    
    /* Hero headline specific sizing */
    .hero-headline {
        font-size: 2.8rem !important;
        line-height: 1.2;
        margin-bottom: 1.5rem;
    }
    
    /* Hero section spacing improvements */
    .hero-section .space-y-6 {
        gap: 1.5rem;
    }
    
    .hero-section .space-y-8 {
        gap: 2rem;
    }
    
    /* Container overflow fixes */
    .container {
        max-width: 100%;
        padding-left: 1rem;
        padding-right: 1rem;
        overflow-x: hidden;
    }
    
    /* Prevent horizontal overflow */
    body {
        overflow-x: hidden;
    }
    
    /* Section padding adjustments */
    section {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Book section and footer extra spacing */
    #book {
        padding-left: 2rem;
        padding-right: 2rem;
        min-height: auto;
        overflow: visible;
    }
    
    /* Book section mobile optimizations */
    #book .container {
        max-width: 100%;
        overflow: visible;
    }
    
    #book .grid {
        gap: 1.5rem;
    }
    
    #book .space-y-6 > * + * {
        margin-top: 1rem;
    }
    
    #book h2 {
        font-size: 1.875rem;
        line-height: 1.2;
    }
    
    #book p {
        font-size: 1rem;
        line-height: 1.6;
    }
    
    #book .space-y-4 {
        margin-top: 1rem;
    }
    
    #book ul {
        margin-top: 0.75rem;
    }
    
    #book li {
        margin-bottom: 0.5rem;
        font-size: 0.95rem;
    }
    
    /* Book section image and button mobile fixes */
    #book img {
        max-width: 280px;
        height: auto;
        margin: 0 auto;
    }
    
    #book .btn-primary {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
        display: block;
        text-align: center;
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
    
    /* Book section quote box mobile optimization */
    #book .bg-yellow-400\/20 {
        padding: 1rem;
        margin: 1rem 0;
    }
    
    #book .bg-yellow-400\/20 p {
        font-size: 0.95rem;
        line-height: 1.5;
    }
    
    /* Hide floating elements on mobile to prevent overflow */
    #book .absolute {
        display: none;
    }
    
    /* Services and Contact sections mobile fixes */
    #services, #contact {
        min-height: auto;
        overflow: visible;
        padding: 2rem 0;
    }
    
    #services .container, #contact .container {
        max-width: 100%;
        overflow: visible;
        padding: 0 1rem;
    }
    
    #services .grid, #contact .grid {
        gap: 1.5rem;
        margin: 0;
    }
    
    #services .service-card, #contact .contact-card {
        min-height: auto;
        padding: 1.5rem;
        margin: 0;
    }
    
    /* Services grid mobile optimization */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* Contact form mobile optimization */
    #contact .grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    #contact .contact-info {
        order: 2;
    }
    
    #contact .contact-form {
        order: 1;
    }
    
    /* Ensure book section doesn't cause horizontal scroll */
    #book {
        width: 100%;
        max-width: 100vw;
        box-sizing: border-box;
    }
    
    /* Additional mobile fixes for scrollable sections */
    #services, #contact {
        height: auto;
        max-height: none;
        overflow: visible;
    }
    
    #services .container, #contact .container {
        height: auto;
        max-height: none;
        overflow: visible;
    }
    
    /* Service cards mobile optimization */
    .service-card {
        height: auto;
        min-height: auto;
        max-height: none;
        overflow: visible;
        padding: 1.5rem;
    }
    
    /* Contact form mobile optimization */
    .contact-form {
        height: auto;
        min-height: auto;
        max-height: none;
        overflow: visible;
    }
    
    .contact-info {
        height: auto;
        min-height: auto;
        max-height: none;
        overflow: visible;
    }
    
    #book * {
        max-width: 100%;
        box-sizing: border-box;
    }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
    #book {
        padding: 1.5rem 1rem;
    }
    
    #book h2 {
        font-size: 1.5rem;
        line-height: 1.3;
    }
    
    #book p {
        font-size: 0.95rem;
        line-height: 1.5;
    }
    
    #book img {
        max-width: 240px;
    }
    
    #book .btn-primary {
        padding: 0.75rem 1.25rem;
        font-size: 0.95rem;
    }
    
    #book .space-y-6 > * + * {
        margin-top: 0.75rem;
    }
    
    #book .bg-yellow-400\/20 {
        padding: 0.75rem;
        margin: 0.75rem 0;
    }
    
    #book .bg-yellow-400\/20 p {
        font-size: 0.9rem;
    }
}

/* About Section Mobile Optimizations */
@media (max-width: 1023px) {
    #about .grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    #about .relative {
        order: -1; /* Show image first on mobile */
    }
    
    #about img {
        max-width: 400px;
        margin: 0 auto;
    }
    
    /* Hide floating elements on mobile */
    #about .absolute {
        display: none;
    }
}

@media (max-width: 640px) {
    #about img {
        max-width: 300px;
    }
    
    #about .space-y-6 > * + * {
        margin-top: 1rem;
    }
    
    #about .bg-white\/80 {
        padding: 1.5rem;
    }
    
    #about .w-16.h-16 {
        width: 3rem;
        height: 3rem;
    }
    
    #about .text-2xl {
        font-size: 1.25rem;
    }
}
    
    footer {
        padding-left: 2rem;
        padding-right: 2rem;
    }
    
    /* Navigation */
    .nav-link {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    /* Mobile menu improvements */
    /* old dropdown styles removed; using full-screen overlay below */
    
    /* Ensure mobile menu button is clickable */
    #mobile-menu-btn {
        cursor: pointer;
        user-select: none;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
        z-index: 50;
        position: relative;
    }
    
    #mobile-menu-btn:hover {
        background-color: rgba(59, 130, 246, 0.1);
    }
    
    #mobile-menu-btn:active {
        transform: scale(0.95);
    }
    
/* Header height adjustment for mobile */
    header {
        height: 96px; /* increased */
    }
    
    /* Navigation padding adjustment */
    nav {
        padding: 1rem 0;
    }
    
    /* Ensure content doesn't hide behind fixed header */
    .hero-section {
        padding-top: 96px; /* match header */
    }
    
    /* Hero section */
    .hero-content {
        padding: 1.5rem 1rem;
        text-align: center;
    }
    
    .hero-subheadline {
        font-size: 1rem;
        margin-bottom: 1rem;
        line-height: 1.5;
    }
    
    /* Ensure text doesn't overflow */
    .hero-section p {
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }
    
    /* Service cards */
    .service-card {
        margin-bottom: 1.5rem;
        padding: 1.5rem;
    }
    
    /* Testimonials carousel */
    .testimonials-container {
        padding: 0 1rem;
    }
    
    .testimonial-card {
        padding: 1.5rem;
        margin: 0 0.5rem;
    }
    
    /* Statistics */
    .counter {
        font-size: 2rem;
    }
    
    /* Buttons */
    .btn-primary {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
    
    /* Spacing adjustments */
    .section-padding {
        padding: 3rem 0;
    }
    
    /* Grid adjustments */
    .grid-responsive {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* Fresh mobile menu overlay styles (top-level) */
#mobile-menu {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100vw; height: 100vh; height: 100dvh; height: 100svh;
    z-index: 2147483647;
    display: none;
}
#mobile-menu.show { display: block; }

#mobile-menu .mobile-menu-backdrop {
    position: absolute; inset: 0;
    background: rgba(0,0,0,0.6);
    opacity: 0;
    transition: opacity 300ms ease;
}
#mobile-menu.show .mobile-menu-backdrop { opacity: 1; }

#mobile-menu .mobile-menu-panel {
    position: absolute; left: 0; right: 0; top: 0; bottom: 0;
    width: 100%;
    background: #fff;
    border-bottom-left-radius: 1.25rem;
    border-bottom-right-radius: 1.25rem;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    transform: translateY(-110%);
    transition: transform 320ms ease;
    height: 100%; max-height: 100%; overflow-y: auto; -webkit-overflow-scrolling: touch;
    height: 100vh; height: 100dvh; height: 100svh;
}
@supports (-webkit-touch-callout: none) {
    #mobile-menu .mobile-menu-panel { height: -webkit-fill-available; max-height: -webkit-fill-available; }
}
#mobile-menu.show .mobile-menu-panel { transform: translateY(0); }

/* Close button */
.mobile-menu-close {
    position: absolute; top: 1rem; right: 1rem;
    width: 40px; height: 40px; border-radius: 9999px;
    background: #f3f4f6; color: #374151; display: flex; align-items: center; justify-content: center;
}

/* Links */
.mobile-menu-nav { padding: 4.5rem 1.5rem 1rem; display: flex; flex-direction: column; gap: 0.5rem; }
.mobile-menu-link { display: block; padding: 0.75rem 1rem; border-radius: 0.75rem; color: #374151; font-weight: 600; opacity: 0; transform: translateY(8px); transition: opacity 360ms ease, transform 360ms ease; }
#mobile-menu.show .mobile-menu-link { opacity: 1; transform: translateY(0); }
#mobile-menu.show .mobile-menu-link:nth-child(1) { transition-delay: 60ms; }
#mobile-menu.show .mobile-menu-link:nth-child(2) { transition-delay: 120ms; }
#mobile-menu.show .mobile-menu-link:nth-child(3) { transition-delay: 180ms; }
#mobile-menu.show .mobile-menu-link:nth-child(4) { transition-delay: 240ms; }
#mobile-menu.show .mobile-menu-link:nth-child(5) { transition-delay: 300ms; }
#mobile-menu.show .mobile-menu-link:nth-child(6) { transition-delay: 360ms; }
.mobile-menu-link:hover { background: #eff6ff; color: #2563eb; }

/* Sticky CTA */
.mobile-menu-cta { position: sticky; bottom: 0; background: rgba(255,255,255,0.9); backdrop-filter: blur(6px); border-top: 1px solid #e5e7eb; padding: 1rem 1.5rem; }
.mobile-menu-cta-btn { display: block; text-align: center; padding: 1rem 1.25rem; border-radius: 0.875rem; color: #fff; background: linear-gradient(135deg, #3b82f6, #8b5cf6); font-weight: 700; box-shadow: 0 10px 20px rgba(59,130,246,0.25); }

/* Embla Carousel Testimonials Custom Styles */
.embla {
    position: relative;
    padding: 2rem 0 4rem 0;
}

.embla__container {
    gap: 1.5rem;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

.embla__slide {
    width: 100%;
    transition: all 0.3s ease;
    transform-origin: center;
}

@media (min-width: 768px) {
    .embla__slide {
        width: calc(50% - 0.75rem);
    }
}

@media (min-width: 1024px) {
    .embla__slide {
        width: calc(33.333% - 1rem);
    }
}

.testimonial-card {
    min-height: 320px;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

.testimonial-card:hover {
    transform: translateY(-4px) translateZ(0);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Smooth slide transitions */
.embla__slide.is-selected .testimonial-card {
    transform: scale(1.02) translateZ(0);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.embla__slide.is-selected .testimonial-card:hover {
    transform: scale(1.05) translateY(-4px) translateZ(0);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

/* Custom Navigation Button Styles */
.embla__prev,
.embla__next {
    background: rgba(59, 130, 246, 0.9);
    width: 56px;
    height: 56px;
    color: white;
    font-size: 1.25rem;
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    z-index: 20;
}

.embla__prev:hover,
.embla__next:hover {
    background: rgba(59, 130, 246, 1);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 12px 30px rgba(59, 130, 246, 0.4);
}

.embla__prev:disabled,
.embla__next:disabled {
    opacity: 0.3;
    transform: translateY(-50%);
}

.embla__prev:disabled:hover,
.embla__next:disabled:hover {
    transform: translateY(-50%);
    background: rgba(59, 130, 246, 0.9);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

.embla__prev {
    left: -40px;
}

.embla__next {
    right: -40px;
}

/* Pagination dots - mobile/tablet only */
.embla__dots {
    display: none;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 2rem;
}

.embla__dot {
    width: 16px !important;
    height: 16px !important;
    min-width: 16px !important;
    min-height: 16px !important;
    max-width: 16px !important;
    max-height: 16px !important;
    border-radius: 50%;
    background: #d1d5db !important;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.6;
    padding: 0 !important;
    flex-shrink: 0 !important;
}

.embla__dot:hover {
    background: #9ca3af;
    transform: scale(1.2);
}

.embla__dot--selected {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6) !important;
    transform: scale(1.3) !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4) !important;
    opacity: 1 !important;
}

/* Hide navigation on mobile */
@media (max-width: 768px) {
    .embla__prev,
    .embla__next {
        display: none !important;
    }
    
    .embla {
        padding: 1rem 0 3rem 0;
    }
    
    /* Show pagination dots on mobile */
    .embla__dots {
        display: flex !important;
    }
    
    /* Remove outer padding on mobile */
    .relative.max-w-6xl.mx-auto {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
}

/* Tablet styles */
@media (min-width: 769px) and (max-width: 1023px) {
    .embla__prev,
    .embla__next {
        display: flex !important;
    }
    
    /* Show pagination dots on tablets */
    .embla__dots {
        display: flex !important;
    }
}

/* Desktop styles */
@media (min-width: 1024px) {
    .embla__prev,
    .embla__next {
        display: flex !important;
    }
    
    /* Hide pagination dots on desktop */
    .embla__dots {
        display: none !important;
    }
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .embla__dots {
        margin-top: 1.5rem;
        gap: 0.4rem;
    }
    
    .embla__dot {
        width: 8px !important;
        height: 8px !important;
        min-width: 8px !important;
        min-height: 8px !important;
        max-width: 8px !important;
        max-height: 8px !important;
    }
    
    .testimonial-card {
        min-height: 280px;
    }
}

/* Tablet adjustments */
@media (min-width: 641px) and (max-width: 1023px) {
    .embla__dots {
        margin-top: 1.75rem;
        gap: 0.6rem;
    }
    
    .embla__dot {
        width: 10px !important;
        height: 10px !important;
        min-width: 10px !important;
        min-height: 10px !important;
        max-width: 10px !important;
        max-height: 10px !important;
    }
}

/* Ensure testimonial cards maintain consistent height */
.embla__slide .testimonial-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.embla__slide .testimonial-card blockquote {
    flex: 1;
}

/* Smooth fade and scale transitions for slides */
.embla__slide {
    opacity: 0.8;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.embla__slide.is-selected {
    opacity: 1;
}

.embla__slide:not(.is-selected) {
    opacity: 0.7;
}

/* Enhanced smooth scrolling */
.embla__container {
    transition-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transition-duration: 0.5s;
}

/* Smooth dot transitions */
.embla__dot {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}


/* Smooth navigation button transitions */
.embla__prev,
.embla__next {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}

/* Override any global button styles that might affect Embla dots */
.embla__dot,
.embla__dots .embla__dot,
button.embla__dot {
    all: unset !important;
    width: 16px !important;
    height: 16px !important;
    min-width: 16px !important;
    min-height: 16px !important;
    max-width: 16px !important;
    max-height: 16px !important;
    border-radius: 50% !important;
    background: #d1d5db !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    opacity: 1 !important;
    margin: 0 !important;
    padding: 0 !important;
    flex-shrink: 0 !important;
    display: inline-block !important;
    box-sizing: border-box !important;
}

/* Mobile override for dots */
@media (max-width: 640px) {
    .embla__dot,
    .embla__dots .embla__dot,
    button.embla__dot {
        width: 8px !important;
        height: 8px !important;
        min-width: 8px !important;
        min-height: 8px !important;
        max-width: 8px !important;
        max-height: 8px !important;
    }
}

/* Tablet override for dots */
@media (min-width: 641px) and (max-width: 1023px) {
    .embla__dot,
    .embla__dots .embla__dot,
    button.embla__dot {
        width: 10px !important;
        height: 10px !important;
        min-width: 10px !important;
        min-height: 10px !important;
        max-width: 10px !important;
        max-height: 10px !important;
    }
}

/* Small tablets and large phones */
@media (min-width: 641px) and (max-width: 768px) {
    /* Typography */
    h1 {
        font-size: 3.5rem;
    }
    
    h2 {
        font-size: 2.8rem;
    }
    
    /* Hero headline specific sizing */
    .hero-headline {
        font-size: 4rem !important;
        line-height: 1.1;
    }
    
/* Header height adjustment */
    header {
        height: 104px; /* increased */
    }
    
    .hero-section {
        padding-top: 104px; /* match header */
    }
    
    /* Container overflow fixes */
    .container {
        max-width: 100%;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
        overflow-x: hidden;
    }
    
    /* Prevent horizontal overflow */
    body {
        overflow-x: hidden;
    }
    
    /* Book section and footer extra spacing for tablet */
    #book {
        padding-left: 2.5rem;
        padding-right: 2.5rem;
    }
    
    /* Services and Contact sections tablet fixes */
    #services, #contact {
        min-height: auto;
        overflow: visible;
        padding: 3rem 0;
    }
    
    #services .container, #contact .container {
        max-width: 100%;
        overflow: visible;
        padding: 0 1.5rem;
    }
    
    /* Service cards tablet optimization */
    .service-card {
        height: auto;
        min-height: auto;
        max-height: none;
        overflow: visible;
        padding: 2rem;
    }
    
    /* Contact form tablet optimization */
    .contact-form, .contact-info {
        height: auto;
        min-height: auto;
        max-height: none;
        overflow: visible;
    }
    
    footer {
        padding-left: 2.5rem;
        padding-right: 2.5rem;
    }
    
    /* Grid layouts */
    .grid-responsive {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    /* Service cards in 2 columns */
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Testimonials */
    .testimonial-card {
        padding: 2rem;
    }
    
    /* Statistics in 2x2 grid */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablets */
@media (min-width: 769px) and (max-width: 1024px) {
    /* Typography */
    h1 {
        font-size: 4.5rem;
    }
    
    h2 {
        font-size: 3.2rem;
    }
    
    /* Hero headline specific sizing */
    .hero-headline {
        font-size: 5rem !important;
        line-height: 1.1;
    }
    
    /* Header height adjustment */
    header {
        height: 90px;
    }
    
    .hero-section {
        padding-top: 90px;
    }
    
    /* Grid layouts */
    .grid-responsive {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem;
    }
    
    /* Services in 2 columns */
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Testimonials in 2 columns */
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Statistics in 4 columns */
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    /* Navigation */
    .nav-links {
        gap: 1rem;
    }
}

/* Desktop and large screens */
@media (min-width: 1025px) {
    /* Typography */
    h1 {
        font-size: 5rem;
    }
    
    h2 {
        font-size: 3.5rem;
    }
    
    /* Full grid layouts */
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .testimonials-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    /* Enhanced spacing */
    .section-padding {
        padding: 5rem 0;
    }
    
    /* Larger touch targets for accessibility */
    .nav-link {
        min-height: 44px;
        min-width: 44px;
    }
}

/* Extra large screens */
@media (min-width: 1440px) {
    /* Container max width */
    .container {
        max-width: 1400px;
    }
    
    /* Enhanced typography */
    h1 {
        font-size: 6rem;
    }
    
    h2 {
        font-size: 4rem;
    }
    
    /* More spacing */
    .section-padding {
        padding: 6rem 0;
    }
}

/* Landscape orientation adjustments */
@media (orientation: landscape) and (max-height: 500px) {
    .hero-section {
        min-height: 100vh;
        padding: 2rem 0;
    }
    
    .hero-content {
        padding: 1rem;
    }
    
    .section-padding {
        padding: 2rem 0;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Ensure crisp text rendering */
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .print-break {
        page-break-before: always;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: #000;
        background: #fff;
    }
    
    h1, h2, h3, h4, h5, h6 {
        color: #000;
        page-break-after: avoid;
    }
}

/* Modern gradient text */
.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glass morphism effect */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

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

.card-hover:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-xl);
}

/* Animated gradient backgrounds */
.animated-gradient {
    background: linear-gradient(-45deg, #667eea, #764ba2, #f093fb, #f5576c);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Button styles */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-dark));
    color: white;
    box-shadow: var(--shadow-medium);
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-blue-dark), #1e40af);
    box-shadow: var(--shadow-large);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: white;
    color: var(--primary-blue);
    transform: translateY(-2px);
}

/* Header styles */
#header {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 9999 !important;
}

#header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-large);
}

/* Ensure header is always visible */
header {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 9999 !important;
    height: 96px; /* Increased default navbar height (desktop/tablet) */
}

/* Add top padding so content doesn't hide under fixed header (desktop/tablet) */
.hero-section {
    padding-top: 96px;
}

/* Scroll to Top Button */
#scroll-to-top {
    position: fixed !important;
    bottom: calc(2rem + env(safe-area-inset-bottom, 0px)) !important;
    right: 2rem !important;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6) !important;
    color: white !important;
    border: none !important;
    border-radius: 50% !important;
    width: 56px !important;
    height: 56px !important;
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    z-index: 1000 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(20px) !important;
    padding: 0 !important;
    outline: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

#scroll-to-top:hover {
    transform: translateY(-2px) scale(1.1);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

#scroll-to-top:active {
    transform: translateY(0) scale(0.95);
}

#scroll-to-top.show {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
    display: flex !important;
}

#scroll-to-top i {
    font-size: 1.25rem;
    transition: transform 0.3s ease;
}

#scroll-to-top:hover i {
    transform: translateY(-2px);
}

/* Responsive scroll to top button */
@media (max-width: 640px) {
    #scroll-to-top {
        bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px)) !important;
        right: 1.5rem !important;
        width: 48px !important;
        height: 48px !important;
        min-width: 48px !important;
        min-height: 48px !important;
    }
    
    #scroll-to-top i {
        font-size: 1rem !important;
    }
    
    #scroll-to-top.show {
        display: flex !important;
    }
}

@media (min-width: 641px) and (max-width: 768px) {
    #scroll-to-top {
        bottom: calc(1.75rem + env(safe-area-inset-bottom, 0px)) !important;
        right: 1.75rem !important;
        width: 52px !important;
        height: 52px !important;
        min-width: 52px !important;
        min-height: 52px !important;
    }
    
    #scroll-to-top i {
        font-size: 1.125rem !important;
    }
    
    #scroll-to-top.show {
        display: flex !important;
    }
}

@media (min-width: 769px) {
    #scroll-to-top {
        bottom: calc(2rem + env(safe-area-inset-bottom, 0px)) !important;
        right: 2rem !important;
        width: 56px !important;
        height: 56px !important;
        min-width: 56px !important;
        min-height: 56px !important;
    }
    
    #scroll-to-top i {
        font-size: 1.25rem !important;
    }
    
    #scroll-to-top.show {
        display: flex !important;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    #scroll-to-top {
        box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4) !important;
    }
    
    #scroll-to-top:hover {
        box-shadow: 0 8px 25px rgba(59, 130, 246, 0.5) !important;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    #scroll-to-top {
        transition: opacity 0.2s ease !important;
    }
    
    #scroll-to-top:hover {
        transform: none !important;
    }
    
    #scroll-to-top:active {
        transform: scale(0.95) !important;
    }
}

/* Navigation styles */
.nav-link {
    position: relative;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

/* Active navigation state */
.nav-link.active {
    color: #2563eb !important;
    background-color: rgba(59, 130, 246, 0.1) !important;
    font-weight: 600;
}

.nav-link.active span {
    color: #2563eb !important;
}

.nav-link.active > div {
    width: 100% !important;
}

/* Removed conflicting ::after underline - using custom underline div in HTML instead */
/* Removed conflicting :hover color - using Tailwind hover:text-blue-600 in HTML instead */

/* Service card animations */
.service-card {
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-large);
    border-color: var(--primary-blue);
}

.service-card:hover .service-icon {
    transform: scale(1.1);
}

/* Testimonial grid (legacy) and masonry styles */
.testimonial-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

/* Masonry layout using CSS multi-columns (mobile/tablet only) */
.testimonial-masonry {
    column-count: 1;
    column-gap: 1.5rem;
}

.testimonial-masonry .testimonial-card {
    display: inline-block;
    width: 100%;
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
    -moz-column-break-inside: avoid;
    margin: 0 0 1.5rem;
}

@media (min-width: 640px) {
    .testimonial-grid { grid-template-columns: repeat(2, 1fr); }
    .testimonial-masonry { column-count: 2; column-gap: 1.75rem; }
}

/* Desktop and above: switch to regular grid, not masonry */
@media (min-width: 1025px) {
    .testimonial-masonry {
        column-count: initial;
        column-gap: 0;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
    .testimonial-masonry .testimonial-card {
        display: block;
        margin: 0;
    }
}
@media (min-width: 1280px) {
    .testimonial-masonry {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
    }
}

/* Testimonial card styles */
.testimonial-card {
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
}

.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-medium);
    border-color: var(--primary-blue);
}

/* Hero section animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

.animate-fade-in-left {
    animation: fadeInLeft 0.8s ease-out;
}

.animate-fade-in-right {
    animation: fadeInRight 0.8s ease-out;
}

/* Scroll reveal animations */
.reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 600ms ease, transform 600ms ease;
    will-change: opacity, transform;
}

.reveal.in {
    opacity: 1;
    transform: translateY(0);
}

.reveal-stagger > * {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 600ms ease, transform 600ms ease;
}

.reveal-stagger.in > * {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .reveal,
    .reveal-stagger > * {
        transition: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

/* Floating animation for decorative elements */
@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    33% {
        transform: translateY(-15px) rotate(1deg);
    }
    66% {
        transform: translateY(-10px) rotate(-1deg);
    }
}

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

/* Enhanced floating with different delays */
.animate-float-delay-1 {
    animation: float 4s ease-in-out infinite;
    animation-delay: 0.5s;
}

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

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

/* Modern pulse animation */
@keyframes modern-pulse {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.05);
    }
}

.animate-modern-pulse {
    animation: modern-pulse 3s ease-in-out infinite;
}

/* Pulse slow animation for background */
@keyframes pulse-slow {
    0%, 100% {
        opacity: 0.2;
        transform: scale(1);
    }
    50% {
        opacity: 0.4;
        transform: scale(1.02);
    }
}

.animate-pulse-slow {
    animation: pulse-slow 4s ease-in-out infinite;
}

/* Pulse animation for accent elements */
@keyframes pulse-slow {
    0%, 100% {
        opacity: 0.2;
        transform: scale(1);
    }
    50% {
        opacity: 0.4;
        transform: scale(1.05);
    }
}

.animate-pulse-slow {
    animation: pulse-slow 2s ease-in-out infinite;
}

/* Scroll indicator animation */
@keyframes bounce-slow {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) translateX(-50%);
    }
    40% {
        transform: translateY(-10px) translateX(-50%);
    }
    60% {
        transform: translateY(-5px) translateX(-50%);
    }
}

.animate-bounce-slow {
    animation: bounce-slow 2s infinite;
}

/* Form styles */
input, textarea {
    transition: all 0.3s ease;
}

input:focus, textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}


/* Simple Mobile Menu Styles */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0);
    z-index: 9999;
    display: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
}

.mobile-menu-overlay.show {
    display: block;
    opacity: 1;
    visibility: visible;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.mobile-menu-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background: #fff;
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.15);
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    will-change: transform;
}

.mobile-menu-overlay.show .mobile-menu-content {
    transform: translateX(0);
}

.mobile-menu-header {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
    transform: translateY(-20px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.1s;
}

.mobile-menu-overlay.show .mobile-menu-header {
    transform: translateY(0);
    opacity: 1;
}

.mobile-menu-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform: scale(0.8);
    opacity: 0;
}

.mobile-menu-overlay.show .mobile-menu-close-btn {
    transform: scale(1);
    opacity: 1;
    transition-delay: 0.2s;
}

.mobile-menu-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

.mobile-menu-close-btn:active {
    transform: scale(0.9);
}

.mobile-menu-nav {
    padding: 1rem 0;
    flex: 1;
}

.mobile-menu-link {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    color: #374151;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-left: 3px solid transparent;
    transform: translateX(-30px);
    opacity: 0;
}

.mobile-menu-link:nth-child(1) { transition-delay: 0.15s; }
.mobile-menu-link:nth-child(2) { transition-delay: 0.2s; }
.mobile-menu-link:nth-child(3) { transition-delay: 0.25s; }
.mobile-menu-link:nth-child(4) { transition-delay: 0.3s; }
.mobile-menu-link:nth-child(5) { transition-delay: 0.35s; }
.mobile-menu-link:nth-child(6) { transition-delay: 0.4s; }

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

.mobile-menu-link:hover {
    background: #eff6ff;
    color: #2563eb;
    border-left-color: #3b82f6;
    transform: translateX(4px);
}

.mobile-menu-link i {
    width: 20px;
    text-align: center;
}

.mobile-menu-cta {
    padding: 1.5rem;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.45s;
}

.mobile-menu-overlay.show .mobile-menu-cta {
    transform: translateY(0);
    opacity: 1;
}

.mobile-menu-cta-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    text-decoration: none;
    font-weight: 700;
    border-radius: 0.75rem;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.mobile-menu-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.35);
}

/* Mobile menu button */
#mobile-menu-btn {
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    min-height: 44px;
    min-width: 44px;
    position: relative;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

#mobile-menu-btn:hover {
    background-color: rgba(59, 130, 246, 0.1);
    transform: scale(1.05);
}

#mobile-menu-btn:active {
    transform: scale(0.95);
}


/* Ensure proper z-index for header */
#header {
    z-index: 1000 !important;
}

/* Mobile menu animation - removed conflicting styles */

/* Section spacing */
section {
    position: relative;
    z-index: 1; /* Ensure sections stay above menu */
}

/* Gradient overlays */
.gradient-overlay {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.9), rgba(79, 70, 229, 0.9));
}

/* Text selection */
::selection {
    background: var(--primary-blue);
    color: white;
}

::-moz-selection {
    background: var(--primary-blue);
    color: white;
}

/* Focus styles for accessibility */
button:focus,
a:focus,
input:focus,
textarea:focus {
    outline: 2px solid var(--primary-blue);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn-primary {
        border: 2px solid white;
    }
    
    .service-card,
    .testimonial-card {
        border: 2px solid var(--text-dark);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    /* Disable testimonial auto-scroll for users who prefer reduced motion */
    .testimonials-track {
        transform: translateX(0) !important;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .btn-primary,
    .btn-secondary {
        background: none !important;
        color: black !important;
        border: 1px solid black !important;
    }
}

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

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

::-webkit-scrollbar-thumb {
    background: var(--primary-blue);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-blue-dark);
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

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

/* Success/Error message styles */
.message {
    padding: 1rem;
    border-radius: 0.5rem;
    margin: 1rem 0;
    font-weight: 500;
}

.message.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

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

/* Lazy loading placeholder */
.lazy-load {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lazy-load.loaded {
    opacity: 1;
}

/* Responsive typography */
@media (max-width: 640px) {
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    .text-5xl {
        font-size: 2.5rem;
    }
    
    .text-4xl {
        font-size: 2rem;
    }
}

/* Container max-width adjustments */
@media (min-width: 1280px) {
    .container {
        max-width: 1200px;
    }
}

/* 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 visible for better keyboard navigation */
.focus-visible:focus {
    outline: 2px solid var(--primary-blue);
    outline-offset: 2px;
}

/* High contrast improvements */
@media (prefers-contrast: high) {
    .text-gray-600 {
        color: #000000;
    }
    
    .text-gray-700 {
        color: #000000;
    }
    
    .bg-gray-50 {
        background-color: #ffffff;
    }
}

/* Loading states and animations */
.loading {
    position: relative;
    pointer-events: none;
}

.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Touch interactions */
.touch-active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
}

/* Enhanced focus states */
button:focus,
a:focus,
input:focus,
textarea:focus,
.service-card:focus,
.testimonial-card:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5);
}

/* Smooth transitions for all interactive elements */
button,
a,
.service-card,
.testimonial-card,
input,
textarea {
    transition: all 0.2s ease;
}

/* Enhanced hover states */
.service-card:hover,
.testimonial-card:hover {
    transform: translateY(-4px) scale(1.02);
}

/* Loading skeleton */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Improved mobile touch targets */
@media (max-width: 768px) {
    button,
    a,
    .service-card,
    .testimonial-card {
        min-height: 44px;
        min-width: 44px;
    }
}

/* Scroll progress indicator */
#scroll-progress {
    transition: width 0.3s ease;
}

/* Enhanced button animations */
.btn-primary:active,
.btn-secondary:active {
    transform: scale(0.95);
}

/* Improved accessibility for reduced motion */
@media (prefers-reduced-motion: reduce) {
    .animate-pulse,
    .animate-bounce,
    .animate-float,
    .animate-pulse-slow {
        animation: none;
    }
    
    .service-card:hover,
    .testimonial-card:hover {
        transform: none;
    }
}
