/* RESET BÁSICO */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: "Montserrat", sans-serif;
    text-align: center;
}

h2 {

    font-size: clamp(1.35rem, 2.45vw, 2.75rem);
    margin-bottom: 1.5rem;
    font-weight: 600;
    color: #0f163b;

}


h3 {
    font-size: clamp(1rem, 1.5vw, 1.5rem);
    margin-bottom: 0.5rem;
    font-weight: 700;
    /* color: #ff0000; */
    color: #0D1333
}

html {
    scroll-behavior: smooth;
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', sans-serif;
    /* line-height: 1.6; */
    color: #333;
    padding-top: 85px;
    background-color: #f7f8fa;
}

p {
    /* font-size: 1rem; */
    line-height: 1.5;
    /* margin-bottom: 1rem; */
}

header {

    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);

}

/* HEADER */
.header-container {
    position: fixed;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .25rem 1.5rem;
    background-color: #fff;
    position: relative;
    z-index: 10;
    font-family: "Montserrat", sans-serif;
    font-optical-sizing: auto;
    font-style: normal;
}

/* LOGO */
.logo img {
    max-height: 70px;
}

/* NAV ESCRITORIO */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-menu ul {
    display: flex;
    gap: 2rem;
    list-style: none;
}

/* Header links */
.nav-menu ul li a {
    text-decoration: none;
    color: rgb(36, 35, 35);
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    /* necesario para posicionar el ::after */
    transition: all 0.3s ease;
}

.nav-menu ul li a::after {
    content: '';
    position: absolute;
    width: 0%;
    height: 2px;
    background-color: #f0831e;
    /* mismo color CTA */
    bottom: -3px;
    left: 0;
    transition: width 0.3s;
}

.nav-menu ul li a:hover::after {
    width: 100%;
}





/* BOTÓN COTIZAR DESKTOP */
.btn-cotizar-desktop,
.btn-cotizar {
    padding: 0.5rem 1rem;
    background-color: #1A237E;
    color: #fff;
    border-radius: 8px;
    font-weight: 500;
    transition: 0.2s;
    text-decoration: none;
}

.btn-cotizar-desktop:hover,
.btn-cotizar:hover {
    background-color: #3949AB;
    scale: 1.01;
}

/* HAMBURGUESA */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 25px;
    height: 20px;
    border: none;
    background: none;
    cursor: pointer;
    z-index: 20;
}

.hamburger span {
    display: block;
    height: 3px;
    background-color: #1A237E;
    border-radius: 2px;
}

.btn-cotizar {
    display: none;

}



/* hero */



.hero {

    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 90vh;
    background: linear-gradient(rgba(0, 40, 80, 0.8), rgba(0, 40, 80, 0.9)),
        url('../public/images/hero-img.webp') no-repeat center/cover;
    color: #fff;
    padding: 2rem;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(270deg, #002850, #a59a37, #102272, #fff45a);
    background-size: 800% 800%;
    animation: gradientShift 15s ease infinite;
    opacity: 0.3;
    /* sutil para no tapar la imagen */
    z-index: 1;
}


.hero-content {
    max-width: 900px;
    z-index: 2;
}

.sec-logo {
    position: absolute;
    top: 100px;
    left: 20px;
    width: 100px;
    height: auto;
    border-radius: 50%;
    z-index: 3;
}


.hero-content h1 {
    font-size: clamp(2rem, 5.5vw, 3.2rem);
    margin-bottom: 1rem;
    font-optical-sizing: auto;
    font-style: normal;
}

.hero-content p {
    font-size: clamp(1rem, 2.2vw, 1.115rem);
    margin-bottom: 1.5rem;
}

.btn-cta {
    display: inline-block;
    background: #f0831e;
    color: #000;

    padding: 0.55rem 1.25rem;
    border-radius: 8px;
    text-decoration: none;
    transition: 0.2s ease;
}

.btn-cta:hover {
    background: #e79a51;

}



section {
    padding: 2rem 2rem;
    scroll-margin-top: 90px;
}



/* SECCIÓN DE SERVICIOS */


.service-items {

    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 4rem 2rem;
    justify-items: center;
}


.service-item {

    text-align: center;
    /* max-width: 300px; */
    padding: 1rem;
    background-color: #fff;
    box-shadow: rgba(50, 50, 93, 0.25) 0px 6px 12px -2px, rgba(0, 0, 0, 0.3) 0px 3px 7px -3px;
    border-radius: 10px;
}

.service-item:hover {
    cursor: pointer;
}


.service-item img {
    width: 60px;
    height: auto;
    margin-bottom: 1rem;
    padding: .5rem;
    background-color: #102272;
    border-radius: 50px;
}

.service-item h3 {
    margin-bottom: 0.5rem;
}

.service-item p {
    font-size: 0.75rem;
    margin: .5rem auto;
}

/* .service-item ul {
    font-size: 0.65rem;
    text-align: left;
    margin: .75rem;
    list-style-position: inside;
    
} */

.service-item ul {
    font-size: 0.75rem;
    text-align: left;
    margin: 0.75rem;
    list-style-position: outside;
    padding-left: 1.2rem;
}

.service-item ul li::marker {
    color: #a59a37;
    font-size: 1rem;
}



/* TESTIMONIOS */


.testimonials {
    padding: 4rem 2rem;
    text-align: center;
    overflow: hidden;
}


.testimonial-carousel {
    display: flex;
    gap: 2rem;
    overflow-x: hidden;
    overflow-y: hidden;
    scroll-behavior: auto;

}



.stars {
    color: #b6a129;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}
.testimonial {
    min-width: 300px;
    max-width: 350px;
    flex: 0 0 auto;
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-align: left;
    transition: transform 0.3s ease;

    /* Para que el autor quede abajo */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
    /* separador elegante */
}

.author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #4cafef;
    /* color base, puedes personalizar */
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #fff;
    font-size: 0.9rem;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.author-info h3 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #222;
}

.author-info p {
    font-size: 0.85rem;
    color: #666;
    margin: 0.15rem 0 0 0;
}




/* proyectos */

.portfolio {
    padding: 2rem 1rem;
    text-align: center;
}



.portfolio-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(440px, 1fr));
    gap: 2rem;
}

.card {
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;

}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.card-image {
    position: relative;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 230px;
    object-fit: cover;
}

.badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #0a3992;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.3rem 0.6rem;
    border-radius: 0.5rem;
    text-transform: uppercase;
}

.card-content {
    padding: 1rem;
    text-align: center;
}

.card-content h3 {
    margin-bottom: 0.5rem;
    color: #102272;
}

.card-content p {
    font-size: 0.75rem;
    color: #555;
    line-height: 1.4;
}







/* nosotros */


.about.container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
    gap: 2rem;
}

.about.container h2 {
    grid-column: 1 / -1;
    text-align: center;
}

.about-content,
.about-images {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;

}


/* Texto descriptivo */
.about-description {
    font-size: clamp(1rem, 1.2vw, 1.1rem);
    margin-bottom: 2rem;
    color: #333;
    text-align: justify;
    text-justify: inter-word;
}

/* Tarjetas Misión/Visión */
.about-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.about-card {
    flex: 1 1 250px;
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    /* 🔑 Imagen y texto en columna */
    align-items: flex-start;
    gap: 0.75rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.about-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.about-card-icon {
    width: 48px;
    height: 48px;
}

.about-card-text {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.about-card-text strong {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
}

.about-card-text p {
    margin-top: 0.5rem;
    line-height: 1.6;
}

.btn-cta-about {
    display: inline-block;
    max-width: 300px;
    text-align: center;
    background-color: #1A237E;
    color: #fff;
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    transition: 0.2s ease;
}

.btn-cta-about:hover {
    background-color: #3949AB;
}

/* Contenedor de imágenes */
.about-images {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.about-images img {
    width: 100%;
    min-height: 200px;
    max-height: 250px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}



/* FORMULARIO */


.contact-section {
    position: relative;
    color: #222;
    background-color: #fff;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.55)),
        url('../public/images/trabajos/ingeniero-electrico.webp');
    background-size: cover;
  
    background-position: center;
    background-repeat: no-repeat;
}


.contact-form-container{
    border-radius: 10px;
    padding-top: 1.25rem;
    padding-bottom: 1.5rem;;
    background-color: #fff;
}


.contact-section h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin-bottom: 0.5rem;
    text-align: center;
    color: #102272;
}

label {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: #0D1333;
}

.contact-section .contact-section-instruction {
    text-align: center;
    margin-bottom: 1rem;
    padding: 0 1rem;
    font-size: .8rem;
    color: #555;
}

.contact-form {
    max-width: 650px;
    margin: 0 auto;
    background-color: rgb(241, 239, 239)5f5;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: .75rem;
    border-radius: 10px;
    box-shadow: rgba(14, 63, 126, 0.06) 0px 0px 0px 1px, rgba(42, 51, 70, 0.03) 0px 1px 1px -0.5px, rgba(42, 51, 70, 0.04) 0px 2px 2px -1px, rgba(42, 51, 70, 0.04) 0px 3px 3px -1.5px, rgba(42, 51, 70, 0.03) 0px 5px 5px -2.5px, rgba(42, 51, 70, 0.03) 0px 10px 10px -5px, rgba(42, 51, 70, 0.03) 0px 24px 24px -8px;
}

fieldset {
    border: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    position: relative;
}

.error-message {
    color: #c0352b;
    font-size: 0.85rem;
    display: none;
    margin-top: 0.25rem;
}

.error-message.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

#form-success {
    display: none;
    color: green;
    text-align: center;
    margin-top: 1rem;
}



.contact-form input,
.contact-form select,
.contact-form textarea {
    padding: 0.65rem 1rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    width: 100%;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #1A237E;
    box-shadow: 0 0 0 2px rgba(26, 35, 126, 0.2);
}

textarea {
    resize: vertical;
}

.btn-submit {
    background-color: #1A237E;
    color: #fff;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s, transform 0.2s;
}

.btn-submit:hover {
    background-color: #3949AB;
    transform: scale(1.02);
}
















/* whatsapp */



.Whatsapp-floating-chat {
    position: fixed;
    bottom: 1.5rem;
    right: 2rem;
    transition: 0.2s;
    animation: heartbeat 7.5s infinite;

}

.Whatsapp-floating-chat:hover {
    transform: scale(1.2);
    animation: none;
}



/* Spinner para botón */
.spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #007bff;
    /* color principal del botón/modal */
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}





/* FOOTER   */

.site-footer {
    background-color: #0D1333;
    color: #ffffff;
    padding: 3rem 2rem 1.5rem;
    font-family: 'Inter', sans-serif;
}

.footer-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 2rem;
}

.footer-brand {
    flex: 1 1 300px;
}

.footer-logo img {
    max-height: 70px;
    margin-bottom: 1rem;
}

.footer-description {
    font-size: 0.75rem;
    line-height: 1.6;
    color: #ccc;
    text-align: justify;
    text-justify: inter-word;
}

.footer-nav {
    flex: 1 1 200px;
}

.footer-nav ul {
    list-style: none;
    padding: 0;
}

.footer-nav ul li {
    margin-bottom: 0.75rem;
}

.footer-nav ul li a {
    text-decoration: none;
    color: #ffffff;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    font-size: .8rem;
}

.footer-nav ul li a::after {
    content: '';
    position: absolute;
    width: 0%;
    height: 2px;
    background-color: #f0831e;
    /* color CTA */
    bottom: -3px;
    left: 0;
    transition: width 0.3s;
}

.footer-nav ul li a:hover::after {
    width: 100%;
}

/* 🔹 Bloque de contacto */
.footer-contact {
    flex: 1 1 250px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    font-size: 0.8rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #fff;
}

.contact-item img {
    width: 20px;
    height: 20px;
}

.contact-item a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}


.contact-item a:hover {
    color: #f0831e;
    /* mismo CTA */
}

.footer-logo-sec {
    justify-content: center;


}

.footer-logo-sec img {
    margin-top: 1rem;
    text-align: center;
    width: 100px;
    height: auto;
    border-radius: 50%;
}




/* Footer bottom */
.footer-bottom {
    text-align: center;
    margin-top: 2rem;
    font-size: 0.65rem;
    color: #bbb;
}

.footer-bottom .developer-link {
    color: #f0831e;
    text-decoration: none;
    font-weight: 500;
}

.footer-bottom .developer-link:hover {
    text-decoration: underline;
}







/* MODAL */



/* Modal overlay */
#modal-message {
    position: fixed;
    font-family: 'Inter', sans-serif;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    /* inicialmente oculto */
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease forwards;
}

/* Modal box */
#modal-box {
    background-color: #fff;
    padding: 2rem;
    border-radius: 10px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    transform: scale(0.8);
    animation: scaleUp 0.3s ease forwards;
}

/* Modal text */
#modal-text {
    font-size: 1rem;
    color: #333;
    margin-bottom: 1.5rem;
}

/* Close button */
#modal-box button {
    background-color: #002850;
    color: #fff;
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: background-color 0.3s ease;
}

#modal-box button:hover {
    background-color: #0056b3;
}


/* Éxito */
#modal-box.success {
    border: 2px solid green;
}

/* Error */
#modal-box.error {
    border: 2px solid red;
}






/* RESPONSIVE MÓVIL / TABLET */
@media screen and (max-width: 992px) {

    /* Ocultar nav y botón de escritorio */
    .nav-menu {
        position: fixed;
        top: 82px;
        left: -100%;
        width: 100%;
        height: 100vh;
        background-color: #ffffffe1;
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 3rem 2rem;
        gap: 2rem;
        transition: left 0.3s ease;
        box-shadow: 2px 0 8px rgba(0, 0, 0, 0.2);
        z-index: 15;
    }

    .nav-menu ul {
        flex-direction: column;
        gap: 1.5rem;
    }

    .btn-cotizar {
        display: block;
        margin-top: 2rem;
    }

    .btn-cotizar-desktop {
        display: none;
    }

    /* Mostrar hamburguesa a la derecha */
    .hamburger {
        display: flex;
    }

    /* Menú activo */
    .nav-menu.active {
        left: 0;
    }




    .testimonial-carousel {
        gap: 1rem;
    }


    /* nosotros */
    .about.container {
        grid-template-columns: 1fr;
        /* una columna */
    }

    .about-images {
        display: grid;
        grid-template-columns: 1fr 1fr;

    }

    .about-cards {
        flex-direction: column;
    }

    /* formulario */


    .contact-section {
        padding: .55rem;
    }
    .contact-form {
        gap: 0.75rem;
    }


    /* footer */


    .footer-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-nav {
        margin-top: 1.5rem;
    }

    .footer-nav ul li {
        margin-bottom: 0.5rem;
    }

    .footer-contact {
        margin-top: 1.5rem;
        align-items: center;
    }
}

/* SEC */



.sec {
    color: #335fb3;
}

@media screen and (max-width: 480px) {

    .service-items {
        grid-template-columns: 1fr;
        /* 1 columna en pantallas muy chicas */
        padding: 2rem 1rem;
        /* menos padding lateral */
    }

    .portfolio-items {
        grid-template-columns: 1fr;
        /* evita que la min-width de 440px rompa el layout */
    }


    .testimonial {
        min-width: 250px;
        max-width: 100%;
    }

    .about-images {
        grid-template-columns: 1fr;
    }

}




/* scroll animation */


.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.scroll-animate.show {
    opacity: 1;
    transform: translateY(0);
}



/* animations */



@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}



@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}


@keyframes heartbeat {

    0%,
    8% {
        transform: scale(1);
    }

    5% {
        transform: scale(1.1);
    }

}






/* Animaciones MODAL */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes scaleUp {
    from {
        transform: scale(0.8);
    }

    to {
        transform: scale(1);
    }
}



/* Spiiner */




/* Animación del spinner */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}