* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}

body {
    background: #1A2021;
    color: #FFFFFF;
}

/* Animaciones */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-on-scroll {
    opacity: 0;
    animation: fadeIn 0.8s ease-out forwards;
}

/* Encabezado */
.navbar {
    background: linear-gradient(to right, #002855, #0D47A1);
    padding: 12px 0;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
}

.navbar-brand {
    font-family: 'Inter', sans-serif;
    font-size: 2.2rem;
    color: #FFFFFF;
    font-weight: 700;
    letter-spacing: 1px;
}

.navbar-nav .nav-link {
    color: #FFFFFF;
    font-size: 1.1rem;
    margin: 0 18px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    position: relative;
    transition: all 0.2s ease;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background: #BBDEFB;
    transition: width 0.2s ease;
}

.navbar-nav .nav-link:hover::after {
    width: 100%;
}

.navbar-nav .nav-link:hover {
    color: #BBDEFB;
}

.btn-cta {
    background: linear-gradient(to right, #1565C0, #003087);
    color: #FFFFFF;
    padding: 10px 22px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
    border: 1px solid #E8ECEF;
}

.btn-cta:hover {
    background: linear-gradient(to right, #42A5F5, #1565C0);
    transform: scale(1.02);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    border: 1px solid #BBDEFB;
}

/* Hero */
.hero {
    height: 100vh;
    background: linear-gradient(to bottom, rgba(0, 40, 85, 0.95), rgba(0, 20, 40, 0.95)), url('https://source.unsplash.com/random/1920x1080/?electrical-engineering');
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #FFFFFF;
    position: relative;
    max-width: 100%;
}

#particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0;
}

.hero h1 {
    font-family: 'Inter', sans-serif;
    font-size: 3.8rem;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 1.8rem;
    letter-spacing: 1px;
    max-width: 900px;
    animation: fadeIn 1s ease-out forwards;
    z-index: 2;
}

.hero p {
    font-size: 1.7rem;
    font-weight: 300;
    margin-bottom: 2.5rem;
    max-width: 800px;
    letter-spacing: 0.8px;
    line-height: 1.8;
    animation: fadeIn 1s ease-out forwards;
    animation-delay: 0.2s;
    z-index: 2;
}

.hero .cta {
    background: linear-gradient(to right, #1565C0, #003087);
    color: #FFFFFF;
    padding: 1.2rem 2.8rem;
    border-radius: 8px;
    text-decoration: none;
    font-size: 1.3rem;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
    animation: fadeIn 1s ease-out forwards;
    animation-delay: 0.4s;
    z-index: 2;
    border: 1px solid #E8ECEF;
}

.hero .cta:hover {
    background: linear-gradient(to right, #42A5F5, #1565C0);
    transform: scale(1.02);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    border: 1px solid #BBDEFB;
}

.hero .sello {
    font-size: 1.1rem;
    margin-top: 2rem;
    color: #E8ECEF;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    border-bottom: 1px solid #BBDEFB;
    padding-bottom: 6px;
    max-width: 600px;
    animation: fadeIn 1s ease-out forwards;
    animation-delay: 0.8s;
    z-index: 2;
}

/* Servicios */
.servicios {
    padding: 70px 0;
    background: linear-gradient(to bottom, #1A2021, #2A3031);
    text-align: center;
    border-top: 1px solid #E8ECEF;
    max-width: 100%;
    role: "region";
    aria-label: "Servicios de Spira";
}

.servicios h2 {
    font-family: 'Inter', sans-serif;
    font-size: 3rem;
    color: #FFFFFF;
    font-weight: 700;
    margin-bottom: 25px;
    animation: fadeIn 0.8s ease-out forwards;
}

.servicios p {
    font-size: 1.4rem;
    color: #E8ECEF;
    font-weight: 300;
    margin-bottom: 40px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    letter-spacing: 0.8px;
    line-height: 1.8;
}

.servicio-card {
    background: linear-gradient(to bottom, #2A3031, #202526);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
    min-height: 350px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid #E8ECEF;
    backdrop-filter: blur(8px);
}

.servicio-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 7px 14px rgba(0, 0, 0, 0.4);
}

.servicio-card i {
    font-size: 3.2rem;
    color: #1565C0;
    margin-bottom: 20px;
    transition: transform 0.2s ease;
}

.servicio-card:hover i {
    transform: scale(1.05);
}

.servicio-card h3 {
    font-family: 'Inter', sans-serif;
    font-size: 1.8rem;
    color: #FFFFFF;
    font-weight: 700;
    margin-bottom: 15px;
}

.servicio-card p, .servicio-card ul {
    font-size: 1.1rem;
    color: #E8ECEF;
    font-weight: 300;
    flex-grow: 1;
    letter-spacing: 0.8px;
    line-height: 1.8;
}

.servicio-card ul {
    list-style: none;
    padding: 0;
    margin-bottom: 12px;
}

.servicio-card ul li {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
}

.servicio-card ul li i {
    font-size: 0.9rem;
    color: #1565C0;
    margin-right: 8px;
    transition: transform 0.2s ease;
}

.servicio-card:hover ul li i {
    transform: scale(1.05);
}

.servicio-card a.service-btn {
    color: #E8ECEF;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.2s ease;
    padding: 8px 16px;
    border: 2px solid #1565C0;
    border-radius: 6px;
    display: inline-block;
}

.servicio-card a.service-btn:hover {
    color: #BBDEFB;
    transform: translateX(4px);
    border-color: #42A5F5;
}

/* Por Qué Elegirnos */
.elegirnos {
    padding: 70px 0;
    background: linear-gradient(to bottom, #1A2021, #2A3031);
    text-align: center;
    border-top: 1px solid #E8ECEF;
    max-width: 100%;
    role: "region";
    aria-label: "Por Qué Elegirnos";
}

.elegirnos h2 {
    font-family: 'Inter', sans-serif;
    font-size: 3rem;
    color: #FFFFFF;
    font-weight: 700;
    margin-bottom: 40px;
    animation: fadeIn 0.8s ease-out forwards;
}

.elegirnos-card {
    padding: 25px;
    background: linear-gradient(to bottom, #2A3031, #202526);
    border-radius: 10px;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
    text-align: left;
    border: 1px solid #E8ECEF;
    backdrop-filter: blur(8px);
}

.elegirnos-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 7px 14px rgba(0, 0, 0, 0.4);
}

.elegirnos-card i {
    font-size: 2.2rem;
    color: #1565C0;
    margin-right: 20px;
    transition: transform 0.2s ease;
}

.elegirnos-card:hover i {
    transform: scale(1.05);
}

.elegirnos-card h3 {
    font-family: 'Inter', sans-serif;
    font-size: 1.6rem;
    color: #FFFFFF;
    font-weight: 700;
    margin-bottom: 12px;
}

.elegirnos-card p {
    font-size: 1.1rem;
    color: #E8ECEF;
    font-weight: 300;
    letter-spacing: 0.8px;
    line-height: 1.8;
}

/* Proyectos */
.proyectos {
    padding: 70px 0;
    background: linear-gradient(to bottom, #1A2021, #2A3031);
    text-align: center;
    border-top: 1px solid #E8ECEF;
    max-width: 100%;
    role: "region";
    aria-label: "Proyectos de Spira";
}

.proyectos h2 {
    font-family: 'Inter', sans-serif;
    font-size: 3rem;
    color: #FFFFFF;
    font-weight: 700;
    margin-bottom: 40px;
    animation: fadeIn 0.8s ease-out forwards;
}

.proyecto-card {
    background: linear-gradient(to bottom, #2A3031, #202526);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid #E8ECEF;
    backdrop-filter: blur(8px);
}

.proyecto-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 7px 14px rgba(0, 0, 0, 0.4);
}

.proyecto-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 8px;
    filter: brightness(100%);
    transition: transform 0.2s ease;
    border: 1px solid #E8ECEF;
    transform: translateZ(0);
}

.proyecto-card:hover img {
    transform: scale(1.03);
    filter: brightness(105%);
}

.proyecto-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 220px;
    background: rgba(0, 40, 85, 0.1);
    transition: none;
}

.proyecto-card h3 {
    font-family: 'Inter', sans-serif;
    font-size: 1.6rem;
    color: #FFFFFF;
    margin: 15px 0 6px;
    font-weight: 700;
}

.proyecto-card .year {
    font-size: 0.9rem;
    color: #E8ECEF;
    font-weight: 300;
    margin-bottom: 10px;
}

.proyecto-card p {
    font-size: 1.1rem;
    color: #E8ECEF;
    font-weight: 300;
    letter-spacing: 0.8px;
    line-height: 1.8;
}

/* Contacto */
.contacto {
    padding: 70px 0;
    background: linear-gradient(to bottom, #1A2021, #2A3031);
    text-align: center;
    border-top: 1px solid #E8ECEF;
    max-width: 100%;
    role: "region";
    aria-label: "Formulario de contacto";
}

.contacto h2 {
    font-family: 'Inter', sans-serif;
    font-size: 3rem;
    color: #FFFFFF;
    font-weight: 700;
    margin-bottom: 40px;
    animation: fadeIn 0.8s ease-out forwards;
}

.contacto form {
    max-width: 850px;
    margin: 0 auto;
}

.contacto .form-control {
    border-radius: 8px;
    margin-bottom: 20px;
    background: linear-gradient(to bottom, #2A3031, #202526);
    color: #FFFFFF;
    border: 1px solid #E8ECEF;
    font-size: 1.1rem;
    padding: 14px 14px 14px 45px;
    transition: all 0.2s ease;
    backdrop-filter: blur(8px);
    font-family: 'Inter', sans-serif;
    width: 100%;
}

.contacto .form-control:focus {
    border-color: #1565C0;
    box-shadow: 0 0 5px rgba(21, 101, 192, 0.5);
}

.contacto .form-control::placeholder {
    color: #B0BEC5;
}

.contacto .form-group {
    position: relative;
    display: block;
}

.contacto .form-group::before {
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    content: '';
    color: #1565C0;
    font-size: 1.1rem;
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
    line-height: 1;
}

.contacto .form-group.nombre::before {
    content: '\f007';
}

.contacto .form-group.telefono::before {
    content: '\f095';
}

.contacto .form-group.email::before {
    content: '\f0e0';
}

.contacto .form-group.asunto::before {
    content: '\f075';
}

.contacto .form-group.mensaje::before {
    content: '\f27a';
    top: 20px; /* Adjusted for textarea to align with first line */
    transform: none; /* Removed translateY to avoid misalignment */
}

.contacto .form-group.mensaje .form-control {
    padding-top: 20px; /* Increased top padding to align text with icon */
    min-height: 120px; /* Ensure textarea has enough height */
}

.contacto .btn-primary {
    background: linear-gradient(to right, #1565C0, #003087);
    border: 1px solid #E8ECEF;
    padding: 12px 35px;
    border-radius: 8px;
    font-size: 1.2rem;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
}

.contacto .btn-primary:hover {
    background: linear-gradient(to right, #42A5F5, #1565C0);
    transform: scale(1.02);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    border: 1px solid #BBDEFB;
}

.contacto-info {
    margin-top: 40px;
    font-size: 1.1rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.contacto-info p {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.contacto-info a {
    color: #E8ECEF;
    text-decoration: none;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
}

.contacto-info a:hover {
    color: #BBDEFB;
    transform: translateX(4px);
}

.contacto-info i {
    font-size: 1.2rem;
    color: #1565C0;
    transition: transform 0.2s ease;
}

.contacto-info p:hover i {
    transform: scale(1.1);
}

/* Pie de página */
.footer {
    background: linear-gradient(to right, #002855, #0D47A1);
    color: #FFFFFF;
    padding: 50px 0;
    text-align: center;
    border-top: 1px solid #E8ECEF;
    backdrop-filter: blur(8px);
    max-width: 100%;
    role: "contentinfo";
}

.footer h4 {
    font-family: 'Inter', sans-serif;
    font-size: 1.8rem;
    color: #FFFFFF;
    font-weight: 700;
    margin-bottom: 20px;
    position: relative;
}

.footer h4::after {
    content: '';
    position: absolute;
    width: 35px;
    height: 2px;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    background: #BBDEFB;
    transition: width 0.2s ease;
}

.footer h4:hover::after {
    width: 50px;
}

.footer p, .footer a {
    font-size: 1rem;
    color: #E8ECEF;
    font-weight: 300;
    text-decoration: none;
    margin: 0 15px;
    transition: all 0.2s ease;
    letter-spacing: 0.8px;
    line-height: 1.8;
}

.footer a:hover {
    color: #BBDEFB;
    transform: translateX(4px);
}

.footer .social {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.footer .social i {
    font-size: 1.7rem;
    color: #E8ECEF;
    transition: all 0.2s ease;
}

.footer .social i:hover {
    color: #BBDEFB;
    transform: scale(1.05);
}

.footer .sello {
    margin: 25px auto 0;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    color: #E8ECEF;
    padding: 12px 20px;
    border-bottom: 2px solid #BBDEFB;
    max-width: 90%;
    text-align: center;
    line-height: 1.6;
}

/* Botón Flotante WhatsApp */
.whatsapp-float {
    position: fixed;
    bottom: 35px;
    right: 35px;
    background: linear-gradient(to bottom, #25D366, #128C7E);
    color: #FFFFFF;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transition: all 0.3s ease;
    text-decoration: none;
    transform: translateZ(0);
    backdrop-filter: blur(8px);
    line-height: 1;
    animation: pulse 2s infinite ease-in-out;
}

.whatsapp-float:hover {
    background: linear-gradient(to bottom, #34C759, #1A9C74);
    transform: scale(1.1);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
    border: 1px solid #BBDEFB;
}

.whatsapp-float i {
    font-size: 1.9rem;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.4);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
    }
}

/* Responsividad */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.6rem;
    }
    .hero p {
        font-size: 1.4rem;
    }
    .hero .cta {
        padding: 1rem 2.2rem;
        font-size: 1.2rem;
    }
    .hero .sello {
        font-size: 0.9rem;
        max-width: 90%;
    }
    .servicios, .elegirnos, .proyectos, .contacto {
        padding: 50px 0;
    }
    .servicios h2, .elegirnos h2, .proyectos h2, .contacto h2 {
        font-size: 2.6rem;
    }
    .servicio-card {
        min-height: 360px;
    }
    .contacto-info {
        flex-direction: column;
        gap: 12px;
    }
    .navbar-brand {
        font-size: 1.7rem;
    }
    .navbar-nav .nav-link {
        font-size: 1rem;
        margin: 0 10px;
    }
    .btn-cta {
        padding: 8px 18px;
        font-size: 1rem;
    }
    .footer h4 {
        font-size: 1.6rem;
    }
    .footer .col-md-4 {
        border-top: 1px solid #E8ECEF;
        padding-top: 15px;
        margin-top: 15px;
    }
    .footer .sello {
        font-size: 0.85rem;
        padding: 10px 15px;
    }
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 48px;
        height: 48px;
    }
    .whatsapp-float i {
        font-size: 1.7rem;
    }
    .servicio-card h3, .proyecto-card h3 {
        font-size: 1.5rem;
    }
    .elegirnos-card h3 {
        font-size: 1.4rem;
    }
    .proyecto-card img {
        height: 180px;
    }
}