/* Performance optimizations */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Optimize rendering performance */
img, button, .service-card, .hero h1, .hero h2 {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Hardware acceleration for smooth animations */
.hero, .service-card, .about-image, .mobile-menu, .chat-toggle {
    will-change: transform;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    -moz-transform: translateZ(0);
    -ms-transform: translateZ(0);
}

/* Optimize transitions for better performance */
* {
    transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
}
    
body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    color: #1f2937;
    background-color: #e5e7eb;
    overflow-x: hidden;
    font-weight: 600;
    padding: 0;
}

        body.menu-open {
            overflow: hidden;
        }

        body.modal-open {
            overflow: hidden;
        }

        /* Header */
        .header {
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(10px);
            color: #1f2937;
            padding: 1rem 0;
            position: sticky;
            top: 0;
            z-index: 1000;
            box-shadow: 0 2px 20px rgba(0,0,0,0.1);
            transition: background-color 0.3s ease, box-shadow 0.3s ease;
            will-change: background-color, box-shadow;
        }

        .nav-container {
            max-width: 1200px;
            margin: 0 auto;
            padding-right: 0;
            padding-left: 0;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .logo {
            font-size: 1.8rem;
            font-weight: 700;
            text-decoration: none;
            color: #1f2937;
            transition: color 0.3s ease;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            position: relative;
            left: 0;
            margin-left: 0;
            padding-left: 0;
        }

        .logo img {
            height: 40px;
            width: auto;
            user-select: none;
            -webkit-user-drag: none;
            padding-left: 0px;
            padding-right: 0px;
        }

        .logo:hover {
            color: #6b7280;
        }

        .nav-menu {
            display: flex;
            list-style: none;
            gap: 2rem;
            margin-left: auto;
            margin-right: 0;
        }


        .nav-menu a {
            color: #1f2937;
            text-decoration: none;
            font-weight: 500;
            transition: color 0.3s ease;
            position: relative;
        }

        .nav-menu a::after {
            content: '';
            position: absolute;
            width: 0;
            height: 2px;
            bottom: -5px;
            left: 0;
            background-color: #6b7280;
            transition: width 0.3s ease;
        }

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

        .mobile-menu-btn {
            display: none;
            background: none;
            border: none;
            color: #1f2937;
            font-size: 1.5rem;
            cursor: pointer;
            z-index: 1001;
        }

        /* Mobile Menu */
        .mobile-menu {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100vh;
            background: rgba(255, 255, 255, 0.98);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 1000;
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            will-change: opacity, visibility;
        }

        .mobile-menu.active {
            opacity: 1;
            visibility: visible;
        }

        .mobile-menu ul {
            list-style: none;
            text-align: center;
        }

        .mobile-menu li {
            margin: 2rem 0;
        }

        .mobile-menu a {
            color: #1f2937;
            text-decoration: none;
            font-size: 2rem;
            font-weight: 600;
            transition: color 0.3s ease;
        }

        .mobile-menu a:hover {
            color: #6b7280;
        }

        .mobile-close {
            position: absolute;
            top: 2rem;
            right: 2rem;
            background: none;
            border: none;
            color: #1f2937;
            font-size: 2rem;
            cursor: pointer;
        }

        /* Hero Section */
        .hero {
            background: linear-gradient(135deg, rgba(75, 85, 99, 0.9) 0%, rgba(107, 114, 128, 0.8) 100%);
            color: white;
            padding: 8rem 0 4rem;
            position: relative;
            overflow: hidden;
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .hero::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: url('WhatsApp Image 2025-07-21 at 12.43.55 AM.jpeg') center/cover no-repeat;
            filter: blur(2px) grayscale(1) brightness(0.8) contrast(1.7);
            opacity: 0.65;
            z-index: 0;
        }
        .hero > .hero-content {
            position: relative;
            z-index: 1;
        }

        .hero h1 {
            font-size: 5.2rem;
            font-weight: 900;
            margin-bottom: 1.2rem;
            line-height: 1.1;
            opacity: 0;
            transform: translateY(30px);
            animation: fadeInUpCalm 0.9s cubic-bezier(0.4, 0, 0.2, 1) forwards;
            animation-delay: 0s;
            text-align: center;
            text-shadow: 0px 0px 2px #fff;
            background: linear-gradient(90deg, #fff 0%, #f1f5f9 30%, #e5e7eb 60%, #fff 100%);
            background-clip: text;
            -webkit-background-clip: text;
            color: transparent;
            -webkit-text-fill-color: transparent;
            text-transform: uppercase;
            font-family: 'Lexend Deca', sans-serif;
            letter-spacing: 0.04em;
        }
        .hero .hero-sub {
            font-size: 2rem;
            font-weight: 500;
            color: #fff;
            text-align: center;
            text-shadow: 0 4px 18px rgba(0,0,0,0.45), 0 2px 4px rgba(0,0,0,0.25);
            font-family: 'Lexend Deca', sans-serif;
            margin-bottom: 0;
        }
        /* Asegúrate de que no haya una clase .animate que sobreescriba la animación */
        .hero h1.animate {
            animation: fadeInUpCalm 0.9s cubic-bezier(0.4, 0, 0.2, 1) forwards;
            animation-delay: 0s;
        }
        /* Si hay JS que añade .animate, asegúrate de que no sobreescriba la animación */
        @keyframes fadeInUpCalm {
            from {
                opacity: 0;
                transform: translateY(30px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .hero p {
            font-size: 2rem;
            margin-bottom: 2rem;
            opacity: 0;
            transform: translateY(30px);
            animation: fadeInUp 1s ease forwards 0.3s;
            max-width: 600px;
            margin-left: auto;
            margin-right: auto;
            text-align: center;
            text-shadow: 0 4px 18px rgba(0,0,0,0.45), 0 2px 4px rgba(0,0,0,0.25);
            color: #fff;
            font-family: 'Lexend Deca', sans-serif;
        }

        .cta-button {
            display: inline-block;
            background: rgba(255, 255, 255, 0.2);
            color: white;
            padding: 1rem 2rem;
            text-decoration: none;
            border-radius: 50px;
            font-weight: 600;
            transition: all 0.3s ease;
            border: 2px solid rgba(255, 255, 255, 0.3);
            opacity: 0;
            transform: translateY(30px);
            animation: fadeInUp 1s ease forwards 0.6s;
        }

        .cta-button:hover {
            background: rgba(255, 255, 255, 0.3);
            border-color: rgba(255, 255, 255, 0.5);
            transform: translateY(-2px);
        }

        /* About Section */
        .about {
            padding: 5rem 0;
            background: rgba(243, 244, 246, 0.8);
        }
        .about > .container {
            position: relative;
            z-index: 1;
        }

        .section-title {
            text-align: center;
            font-size: 2.5rem;
            font-weight: 700;
            margin-bottom: 3rem;
            color: #1f2937;
            opacity: 0;
            transform: translateY(30px);
        }

        .contact .section-title {
            color: white;
        }

        .section-title.animate {
            animation: fadeInUp 0.8s ease forwards;
        }

        .about-content {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 4rem;
            align-items: center;
        }

        .about-text {
            font-size: 1.1rem;
            line-height: 1.8;
            color: #374151;
            opacity: 0;
            transform: translateX(-30px);
            margin-left: 2rem;
            text-wrap: pretty;
            -webkit-hyphens: none;
            hyphens: none;
        }
        @media (max-width: 900px) {
            .about-text {
                margin-left: 0.5rem;
            }
        }

        .about-text.animate {
            animation: fadeInLeft 0.8s ease forwards;
        }

        .about-image {
            background: linear-gradient(135deg, rgba(75, 85, 99, 0.8), rgba(107, 114, 128, 0.8));
            height: 400px;
            border-radius: 20px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 4rem;
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
            opacity: 0;
            transform: translateX(30px);
            position: relative;
            overflow: hidden;
            margin: 0 2rem;
        }
        @media (max-width: 900px) {
            .about-image {
                margin: 0 0.5rem;
            }
        }

        .about-image::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: url('IMG-20170207-WA0013-495x400.jpg') center/cover;
            opacity: 0.8;
            z-index: 1;
        }

        .about-image.animate {
            animation: fadeInRight 0.8s ease forwards;
        }

        /* Services Section */
        .services {
            padding: 5rem 0;
            position: relative;
            background: rgba(243, 244, 246, 0.8);
        }
        .services-grid {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 1.2rem;
            margin-top: 3rem;
            width: 100%;
            max-width: 1200px;
            margin-left: auto;
            margin-right: auto;
            justify-content: center;
            align-items: center;
            padding-left: 2rem;
            padding-right: 2rem;
            place-items: center;
        }
        .service-card {
            min-width: 0;
            min-height: 320px;
            padding: 2.5rem 2.5rem;
        }
        @media (max-width: 1200px) {
            .services-grid {
                grid-template-columns: repeat(2, minmax(340px, 1fr));
                gap: 1rem;
                padding-left: 1rem;
                padding-right: 1rem;
            }
            .service-card {
                min-width: 340px;
                min-height: 300px;
                padding: 2rem 2rem;
            }
        }
        @media (max-width: 900px) {
            .services-grid {
                grid-template-columns: 1fr;
                gap: 0.7rem;
                padding-left: 0.5rem;
                padding-right: 0.5rem;
            }
            .service-card {
                min-width: 0;
                min-height: 220px;
                padding: 1.2rem 1.2rem;
            }
        }
        @media (max-width: 600px) {
            .services-grid {
                grid-template-columns: 1fr;
                gap: 0.4rem;
                padding-left: 0;
                padding-right: 0;
            }
            .service-card {
                min-width: 0;
                min-height: 160px;
                padding: 0.7rem 0.7rem;
            }
        }

        .service-card {
            background: linear-gradient(135deg, #23272b 0%, #55595e 100%);
            color: #f3f4f6;
            padding: 2rem;
            border-radius: 15px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.1);
            transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            border: 1px solid rgba(209, 213, 219, 0.3);
            position: relative;
            overflow: hidden;
            opacity: 0;
            transform: translate3d(0, 30px, 0);
            cursor: pointer;
            text-align: center;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            will-change: transform, opacity;
        }
        .service-card h3, .service-card p {
            color: #f3f4f6;
        }
        .service-card .service-icon {
            background: rgba(243, 244, 246, 0.12);
            color: #d1d5db;
            border: 1px solid rgba(209, 213, 219, 0.18);
        }
        .service-card.animate {
            animation: fadeInUp 0.8s ease forwards;
        }

        .service-card::before {
            display: none !important;
        }

        .service-card:nth-child(1)::before {
            background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><rect width="100" height="100" fill="%233b82f6"/><circle cx="50" cy="50" r="20" fill="%231e40af"/></svg>');
        }

        .service-card:nth-child(2)::before {
            background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><rect width="100" height="100" fill="%23f59e0b"/><polygon points="50,20 80,80 20,80" fill="%23d97706"/></svg>');
        }

        .service-card:nth-child(3)::before {
            background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><rect width="100" height="100" fill="%2310b981"/><rect x="30" y="30" width="40" height="40" fill="%23059669"/></svg>');
        }

        .service-card:nth-child(4)::before {
            background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><rect width="100" height="100" fill="%238b5cf6"/><circle cx="50" cy="50" r="15" fill="%237c3aed"/></svg>');
        }

        .service-card:nth-child(5)::before {
            background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><rect width="100" height="100" fill="%23ef4444"/><path d="M30,50 L70,50 M50,30 L50,70" stroke="%23dc2626" stroke-width="5"/></svg>');
        }

        .service-card:nth-child(6)::before {
            background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><rect width="100" height="100" fill="%236b7280"/><path d="M25,50 L75,50 M50,25 L50,75" stroke="%23555" stroke-width="3"/></svg>');
        }

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

        .service-card {
            background: linear-gradient(135deg, #23272b 0%, #55595e 100%);
            color: #f3f4f6;
            transition: opacity 0.3s;
        }
        .service-card:hover {
            opacity: 1;
            box-shadow: 0 8px 32px rgba(80,80,80,0.25), 0 1.5px 8px rgba(80,80,80,0.12);
            z-index: 2;
            transform: translate3d(0, 0, 0) scale(1.035);
        }

        .service-content {
            position: relative;
            z-index: 2;
        }

        .service-icon {
            width: 60px;
            height: 60px;
            background: rgba(243, 244, 246, 0.12);
            border-radius: 15px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #d1d5db;
            font-size: 1.5rem;
            margin-bottom: 1.5rem;
            border: 1px solid rgba(209, 213, 219, 0.18);
        }

        .service-card h3 {
            font-size: 1.5rem;
            font-weight: 600;
            margin-bottom: 1rem;
            color: #f3f4f6;
        }

        .service-card p {
            color: #d1d5db;
            line-height: 1.6;
        }

        /* Contact Section */
        .contact {
            padding: 5rem 0;
            background: linear-gradient(135deg, rgba(75, 85, 99, 0.95) 0%, rgba(107, 114, 128, 0.9) 100%);
            color: white;
        }

        .contact-content {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 4rem;
            align-items: center;
        }
        .contact-info {
            margin-left: 2rem;
        }
        .contact-form {
            margin-right: 2rem;
        }

        .contact-info h3 {
            font-size: 2rem;
            margin-bottom: 1.5rem;
            opacity: 0;
            transform: translateX(-30px);
        }
        @media (max-width: 600px) {
            .contact-info h3 {
                display: none;
            }
        }

        .contact-info.animate h3 {
            animation: fadeInLeft 0.8s ease forwards;
        }

        .contact-item {
            display: flex;
            align-items: center;
            margin-bottom: 1.5rem;
            font-size: 1.1rem;
            opacity: 0;
            transform: translateX(-30px);
        }

        .contact-info.animate .contact-item:nth-child(2) {
            animation: fadeInLeft 0.8s ease forwards 0.2s;
        }

        .contact-info.animate .contact-item:nth-child(3) {
            animation: fadeInLeft 0.8s ease forwards 0.4s;
        }

        .contact-info.animate .contact-item:nth-child(4) {
            animation: fadeInLeft 0.8s ease forwards 0.6s;
        }

        .contact-item i {
            margin-right: 1rem;
            color: #d1d5db;
            font-size: 1.2rem;
        }

        .social-links {
            display: flex;
            gap: 1rem;
            margin-top: 2rem;
            opacity: 0;
            transform: translateX(-30px);
        }

        .contact-info.animate .social-links {
            animation: fadeInLeft 0.8s ease forwards 0.8s;
        }

        .social-link {
            width: 54px;
            height: 54px;
            background: rgba(255, 255, 255, 0.2);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            text-decoration: none;
            transition: all 0.3s ease;
            border: 1px solid rgba(255, 255, 255, 0.3);
            font-size: 1.6rem;
        }

        .social-link:hover {
            background: rgba(255, 255, 255, 0.3);
            transform: translateY(-2px);
        }

        .contact-form {
            opacity: 0;
            transform: translateX(30px);
        }

        .contact-form.animate {
            animation: fadeInRight 0.8s ease forwards;
        }

        .contact-form form {
            background: rgba(255, 255, 255, 0.1);
            padding: 2rem;
            border-radius: 15px;
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
            border: 1px solid rgba(255, 255, 255, 0.2);
            backdrop-filter: blur(10px);
        }

        .form-group {
            margin-bottom: 1.5rem;
        }

        .form-group input,
        .form-group textarea {
            width: 100%;
            padding: 1rem;
            border: 1px solid rgba(255, 255, 255, 0.3);
            border-radius: 8px;
            font-size: 1rem;
            background: rgba(255, 255, 255, 0.1);
            color: white;
            transition: all 0.3s ease;
            font-family: 'Montserrat', sans-serif;
            resize: none;
        }

        .form-group input:focus,
        .form-group textarea:focus {
            outline: none;
            border-color: rgba(255, 255, 255, 0.5);
            box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
        }

        .form-group input::placeholder,
        .form-group textarea::placeholder {
            color: rgba(255, 255, 255, 0.7);
        }

        .submit-btn {
            background: rgba(255, 255, 255, 0.2);
            color: white;
            padding: 1rem 2rem;
            border: 1px solid rgba(255, 255, 255, 0.3);
            border-radius: 8px;
            font-size: 1rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            width: 100%;
            font-family: 'Montserrat', sans-serif;
        }

        .submit-btn:hover {
            background: rgba(255, 255, 255, 0.3);
            transform: translateY(-2px);
        }

/* Codigo para el manejo del formulario */

        .form-status {
            margin-top: 15px;
            font-size: 17px;
            text-align: center;
            font-weight: 600;
            color: rgba(255, 255, 255, 0.9);
            text-shadow: 0 0 6px #00000050;
        }
        
        .form-status.success {
            color: rgba(255, 255, 255, 0.9);
        }

        .form-status.error {
            color: rgba(255, 255, 255, 0.9);
        }
        
        .submit-btn:disabled {
            opacity: 0.7;
            cursor: not-allowed;
        }


/* Mantener el estilo del formulario al usar autocompletado de Chrome */ 

.form-group input:-webkit-autofill, 
.form-group input:-webkit-autofill:hover, 
.form-group input:-webkit-autofill:focus, 
.form-group input:-webkit-autofill:active { -webkit-text-fill-color: white !important; -webkit-box-shadow: 0 0 0 1000px rgba(255, 255, 255, 0.1) inset !important; box-shadow: 0 0 0 1000px rgba(255, 255, 255, 0.1) inset !important; border: 1px solid rgba(255, 255, 255, 0.3) !important; transition: background-color 5000s ease-in-out 0s; 
}

        /* Footer */
        .footer {
            background: rgba(31, 41, 55, 0.95);
            color: white;
            padding: 2rem 0;
            text-align: center;
        }

        .footer-content {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 2rem;
        }

        .footer-content--firma {
            margin-top: 0.5rem; 
            opacity: 0.6; 
            font-size: 0.65rem;
        }

        .firma-luca {
            margin-left: 0.4em; 
            display: inline-block;
        }

        /* Optimized animations with hardware acceleration */
        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translate3d(0, 30px, 0);
            }
            to {
                opacity: 1;
                transform: translate3d(0, 0, 0);
            }
        }

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

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

        /* Responsive Design */

        @media (max-width: 768px) {
            .nav-menu {
                display: none;
            }

            .mobile-menu-btn {
                display: block;
            }

            .hero h1 {
                font-size: 2.3rem;
            }
            .hero .hero-sub {
                font-size: 1.1rem;
            }

            .about-content,
            .contact-content {
                grid-template-columns: 1fr;
                gap: 2rem;
            }

            .services-grid {
                grid-template-columns: 1fr;
            }

            .section-title {
                font-size: 2rem;
            }

            .mobile-menu {
                display: flex;
            }

            .mobile-menu-btn {
                margin-right: 1.2rem;
            }
        }

        /* AI Chat Widget */
        .ai-chat-widget {
            position: fixed;
            bottom: 2rem;
            right: 2rem;
            z-index: 1000;
            width: 350px;
            height: 500px;
            background: white;
            border-radius: 15px;
            box-shadow: 0 20px 40px rgba(0,0,0,0.2);
            display: none;
            flex-direction: column;
            overflow: hidden;
        }

        .ai-chat-widget.active {
            display: flex;
        }

        .chat-header {
            background: linear-gradient(135deg, rgba(75, 85, 99, 0.95) 0%, rgba(107, 114, 128, 0.9) 100%);
            color: white;
            padding: 1rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .chat-header h3 {
            margin: 0;
            font-size: 1.1rem;
            display: flex; 
            align-items: center; 
            gap: 0.5rem;
        }

        .chat-header--span {
            display: inline-block; 
            width: 12px; 
            height: 12px; 
            background: #22c55e; 
            border-radius: 50%; 
            box-shadow: 0 0 4px #22c55e; 
            margin-right: 0.5rem;
        }

        .chat-close {
            background: none;
            border: none;
            color: white;
            font-size: 1.2rem;
            cursor: pointer;
        }
        
        .chat-messages {
            flex: 1;
            min-width: 0;
            padding: 1rem;
            overflow-y: auto;
            overflow-x: hidden;
            background: #f9fafb;
        }
        
        .message {
            margin-bottom: 1rem;
            padding: 0.8rem;
            border-radius: 10px;
            max-width: 80%;
            min-width: 0;
            box-sizing: border-box;
            white-space: normal;
            overflow-wrap: anywhere;
            word-break: break-word;
}

        .message.user {
            background: #3b82f6;
            color: white;
            margin-left: auto;
        }

        .message.ai {
            background: white;
            color: #1f2937;
            border: 1px solid #e5e7eb;
        }

        .chat-input {
            padding: 1rem;
            border-top: 1px solid #e5e7eb;
            display: flex;
            gap: 0.5rem;
        }

        .chat-input input {
            flex: 1;
            padding: 0.5rem;
            border: 1px solid #d1d5db;
            border-radius: 8px;
            font-family: 'Montserrat', sans-serif;
        }

        .chat-input button {
            padding: 0.5rem 1rem;
            background: #6b7280;
            color: #fff;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            font-family: 'Montserrat', sans-serif;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .chat-input button i {
            color: #fff;
            font-size: 1.3rem;
        }

        .chat-toggle {
            position: fixed;
            bottom: 2rem;
            right: 2rem;
            width: 60px;
            height: 60px;
            background: linear-gradient(135deg, rgba(31, 41, 55, 0.98) 0%, rgba(55, 65, 81, 0.95) 100%);
            border: none;
            border-radius: 50%;
            color: white;
            font-size: 1.5rem;
            cursor: pointer;
            box-shadow: 0 10px 30px rgba(0,0,0,0.2);
            z-index: 999;
            transition: all 0.3s ease;
        }

        .chat-toggle:hover {
            transform: scale(1.1);
        }

        /* Optimized smooth scrolling */
        html, body {
            scroll-behavior: smooth;
            -webkit-overflow-scrolling: touch;
        }

        /* Reduce repaint during scroll */
        .hero, .about, .services, .contact {
            contain: layout style paint;
        }

        /* Optimize images */
        img {
            max-width: 100%;
            height: auto;
            image-rendering: -webkit-optimize-contrast;
            image-rendering: crisp-edges;
        }

        /* Scroll animations */
        .animate-on-scroll {
            opacity: 0;
            transform: translate3d(0, 30px, 0);
            transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
            will-change: opacity, transform;
        }

        .animate-on-scroll.animate {
            opacity: 1;
            transform: translate3d(0, 0, 0);
        }

        /* 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 styles for accessibility */
        a:focus,
        button:focus,
        input:focus,
        textarea:focus {
            outline: 2px solid #3b82f6;
            outline-offset: 2px;
        }

        /* High contrast mode support */
        @media (prefers-contrast: high) {
            body {
                background-color: #ffffff;
                color: #000000;
            }
        }



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

        .logo:focus:not(:focus-visible) {
            outline: none;
        }

        @media (max-width: 600px) {
            .modal-content-responsive {
                padding: 1.2rem 0.5rem !important;
                max-width: 98vw !important;
                width: 98vw !important;
                border-radius: 10px !important;
            }
            .mobile-menu-btn {
                margin-right: 1.2rem;
            }
        }
        @media (max-width: 600px) {
            .about-text {
                margin-left: 1rem;
                margin-right: 1rem;
                max-width: calc(100vw - 2rem);
            }
            .about-text p {
                text-align: justify;
                max-width: 100%;
                margin-left: 0;
                margin-right: 0;
            }
            .service-card {
                margin-left: 0.7rem;
                margin-right: 0.7rem;
            }
            .contact-form {
                margin-left: 1rem;
                margin-right: 1rem;
            }
            .ai-chat-widget {
                width: calc(100vw - 2rem);
                max-width: 350px;
                right: 1rem;
                bottom: 1rem;
            }
            .chat-toggle {
                right: 1rem;
                bottom: 1rem;
            }
        }
        

        .service-card {
            text-decoration: none !important;
        }

        .service-card:visited, .service-card:active, .service-card:focus, .service-card:hover {
            text-decoration: none !important;
        }

        .service-card:focus {
            outline: none;
        }
        
        .mobile-menu-btn:focus, .mobile-close:focus, nav button:focus {
            outline: none;
        }


        body.no-grid-anim .service-card.animate-on-scroll {
            animation: none !important;
            opacity: 1 !important;
            transform: none !important;
            transition: none !important;
        }

.firma-luca {
    font-family: 'Rouge Script', cursive;
    font-style: italic;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.22);
    letter-spacing: 1px;
    font-size: 2.7em;
}