* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


:root {
    --color-cta: #0a369d;
    --cta-hover: #3061d1;
    --color-fondo: #cfdee7;
    --color-secundary: #bbd6ff56;
    --white: #ffffff;
    --black: #000000;
    --gris: #eee;
    --text-p: #555;
    --azul-oscuro: #002147;
    --azul-claro: #007BFF;
    --blanco: #FFFFFF;
}

html {
    scroll-behavior: smooth;
    position: relative;
}

body {
   font-family: sans-serif;
   margin: 0;
   position: relative;
   width: 100%;
}

/*--------NAVBAR-----*/
header {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 900;
}

.nav-links {
    display: none;
}

.navbar {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background-color: var(--white);
}

.logo img {
    width: 40px;
    height: 40px;
}

.cta-navbar {
    display: flex;
    padding: 10px 20px;
    background-color: var(--color-cta);
    color: var(--white);
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.cta-navbar:hover {
    background-color: var(--cta-hover);
}

/*------NAVBAR PANTALLAS GRANDES------*/

@media (min-width: 1024px) {
    .nav-links {
        list-style: none;
        display: flex;
        gap: 0.5rem;
    }

    .nav-links a {
        text-decoration: none;
        color: var(--black);
        transition: all 0.3s ease;
        padding: 10px 20px;
        border-radius: 5px;
        font-weight: bold;
    }

    .nav-links a:hover {
        color: var(--white);
        background-color: var(--color-cta);
    }
}


/*-----------HERO SECTION--------------*/


.hero-section {
    padding: 80px 20px;
    margin: 0 auto;
    width: 100%;
    height: 100dvh;

    background: url('sieecfondo.avif');
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;

    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;

}

.hero-text {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-shadow: 0 0 10px rgba(0, 0, 0);
}

.hero-text h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: var(--gris);
}

.hero-text strong {
    color: var(--white);
}

.hero-text p {
    margin-top: 1rem;
    font-size: 1.2rem;
    color: var(--gris);
}

.cta-hero {
    display: inline-block;
    padding: 15px 50px;
    background-color: var(--color-cta);
    color: var(--white);
    text-decoration: none;
    margin-top: 1rem;
    border-radius: 5px;
    transition: all 0.3s ease;
    font-weight: bold;
}

.cta-hero:hover {
    transform: translateY(-3px);
    background-color: var(--cta-hover);
}

.sello-calidad {
    display: inline-flex;
    align-items: center;
    margin-top: 2rem;
    gap: 12px;
    background: rgba(255, 255, 255, 0.1); /* Fondo sutil */
    backdrop-filter: blur(8px); /* Efecto de cristal */
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 10px 20px;
    border-radius: 50px; /* Forma de píldora */
    margin-bottom: 20px;
}

.icono-sello {
    font-size: 1.2rem;
}

.sello-calidad p {
    color: var(--white);
    font-size: 0.9rem;
    margin: 0 !important; /* Quitar márgenes heredados */
    letter-spacing: 0.5px;
    text-shadow: none !important;
}

.sello-calidad strong {
    color: var(--cta-hover); /* Dorado para resaltar las normas */
}


/* Ajuste para móviles */
@media (max-width: 768px) {
    .sello-calidad {
        padding: 8px 15px;
        font-size: 0.8rem;
    }
}

/*--------solucion section---------*/

.solucion-section {
    padding: 100px 20px;
    margin: 80px 0;

}

.solucion-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
    gap: 1rem;
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    align-items: center;
}

.solucion-text {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 500px;
    text-align: left;
}

.titulito {
    color: #666;
    letter-spacing: 0.3rem; 
    text-align: left;
}

.flecha {
    color: var(--cta-hover);
    font-size: 20px;
    font-weight: bold;
}

.solucion-text h2 {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    color: var(--color-cta);
}

.solucion-img img {
    width: 100%;
    max-width: 390px;
    height: auto;
    display: block;
    border-radius: 10px;
    margin: 2rem auto 0 auto;
}


.solucion-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    text-align: left;
    align-items: center;
    justify-content: start;
    gap: 0.9rem;
}

.emoji {
    font-size: 2rem;
}

.card-title {
    font-weight: bold;
    margin: 10px 0;
}

.card {
    width: 100%; 
    min-width: 0; 
    margin: 0;
    border: 1px solid var(--gris);
    border-radius: 5px;
    padding: 20px;
    transition: all 0.3s ease;
}
.card:hover {
    transform: translateY(-10px);
}

.card p {
    opacity: 0.85;
    font-size: 14px;
}

@media (min-width: 1024px) {
    .solucion-container {
        display: flex;
        flex-direction: row;
        gap: 2rem;
    }

    .solucion-text {
        margin-right: 2rem; 
    }

    .titulito {
        letter-spacing: 1rem; 
    }

}


/*------servicios section----------*/


.servicios-section {
    padding: 80px 20px;
    margin: 40px 0px;
    width: 100%;
    text-align: center;
}

.servicios-section h2 {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    margin-bottom: 1rem;
    color: var(--color-cta);
}

.servicios-section p {
    font-size: 14px;
    margin-bottom: 2.5rem;
}

.servicios-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    grid-auto-rows: 230px;
    gap: 1.5rem;
    margin-top: 2.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

.servicio {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 20px;
    text-align: left;
    box-shadow: 0 0 30px var(--color-secundary);
    border-radius: 5px;
    transition: all 0.3s ease;
    position: relative;
}

.servicio:hover {
    transform: translateY(-5px);
}

.servicio h3 {
    color: var(--cta-hover);
}


.cta-servicios {
    display: inline-block;
    padding: 15px 40px;
    border-radius: 5px;
    background-color: var(--color-cta);
    color: var(--white);
    text-decoration: none;
    margin-top: 2rem;
    font-weight: bold;
    transition: all 0.3s ease;
}

.cta-servicios:hover  {
    transform: translateY(-4px);
    background-color: var(--cta-hover);
}

/*boton-btn-ver*/
.btn-ver {
    border: none;
    text-align: left;
    background-color: var(--white);
    font-weight: bold;
    color: var(--cta-hover);
    position: absolute;
    top: 180px;
    left: 15px;
    padding: 10px;
    transition: all 0.3s ease;
}

.btn-ver:hover {
    color: var(--color-cta);
}

.servicio.extra {
    display: none; /* Se ocultan totalmente */
    opacity: 0;
    transform: translateY(30px);
}

.servicio.extra.visible {
    display: flex ; 
    animation: fadeInUp 0.6s forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Ocultar el botón suavemente */
#btn-ver-mas.hidden {
    opacity: 0;
    pointer-events: none;
    transition: 0.4s;
}

/* modales*/

.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    overflow: hidden;
    animation: modalIn 0.3s ease;
}

.modal-flex {
    display: flex;
}

/* IMAGEN */
.modal-img {
    width: 50%;
}

.modal-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: center;
    
}

/* TEXTO */
.modal-text {
    width: 50%;
    padding: 25px;
    position: relative;
}

.modal-text h3 {
    margin-bottom: 10px;
}

.modal-text p {
    margin-bottom: 15px;
    color: #555;
}

.modal-text ul {
    margin-bottom: 20px;
    padding-left: 20px;
}

.close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 22px;
    cursor: pointer;
}

/* BOTÓN */
.btn-modal {
    display: inline-block;
    background: var(--color-cta);
    color: var(--white);
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-modal:hover {
    background-color: var(--cta-hover);
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .modal-flex {
        flex-direction: column;
    }

    .modal-img,
    .modal-text {
        width: 100%;
    }

    .modal-img {
        height: 250px;
    }
}

/* ANIMACIÓN */
@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* --- SECCIÓN GALERÍA --- */

/* --- Contenedor de la Galería --- */
.gallery-container {
    padding: 40px 5%;
    max-width: 1200px;
    margin: 0 auto;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.gallery-title {
    text-align: center;
    color: var(--color-cta); /* Ajusta a tu color corporativo */
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    margin-bottom: 40px;
    position: relative;
}

/* --- Grid Responsivo Fluido --- */
.projects-grid {
    display: grid;
    /* min(100%, 300px) evita que se amontone en pantallas pequeñas */
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: 25px;
}

/* --- Tarjetas --- */
.project-card {
    position: relative;
    aspect-ratio: 4 / 5; /* Proporción elegante */
    border-radius: 15px;
    overflow: hidden;
    background-color: #000;
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
    cursor: pointer;
}

.project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

/* --- Overlay de Descripción (Hover) --- */
.overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top, 
        rgba(10, 25, 47, 0.95) 20%, 
        rgba(10, 25, 47, 0.7) 60%, 
        transparent 100%
    );
    display: flex;
    align-items: flex-end;
    padding: 25px;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 2;
}

.text {
    color: #ffffff;
    transform: translateY(20px);
    transition: transform 0.4s ease;
}

.text h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: #64ffda; /* Color de acento */
}

.text p {
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}

/* --- ESTADOS HOVER (PC) Y ACTIVE (MÓVIL) --- */
.project-card:hover .overlay,
.project-card.active .overlay {
    opacity: 1;
}

.project-card:hover .text,
.project-card.active .text {
    transform: translateY(0);
}

.project-card:hover img,
.project-card.active img {
    transform: scale(1.1);
}

/* Soporte para PC: Solo hover si el dispositivo lo permite */
@media (hover: hover) {
    .project-card:hover .overlay {
        opacity: 1;
    }
}

/*prueba social*/



.stats-section {
    padding: 0px 10px 100px 10px;
    width: 100%;
    box-sizing: border-box;
}

.stats-container {
    display: grid;
    /* Crea 4 columnas iguales que se ajustan al ancho disponible */
    grid-template-columns: repeat(3, 1fr); 
    gap: 10px;
    max-width: 1100px;
    margin: 0 auto;
}

.stat-item {
    background-color: var(--white);
    padding: 20px 5px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    border-bottom: 4px solid var(--color-cta);
    transition: 0.3s;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stat-num {
    display: block;
    color: var(--color-cta);
    font-weight: 800;
    /* Tamaño de fuente fluido: se ajusta según el ancho de pantalla */
    font-size: clamp(1.2rem, 4vw, 2.5rem); 
    line-height: 1;
}

.stat-desc {
    margin: 5px 0 0 0;
    color: #444;
    font-weight: 600;
    text-transform: uppercase;
    /* Texto fluido más pequeño para que no se rompa en móvil */
    font-size: clamp(0.6rem, 2vw, 0.9rem);
    letter-spacing: 0.5px;
}

/* Efecto hover solo para PC */
@media (min-width: 1024px) {
    .stat-item:hover {
        transform: translateY(-5px);
        border-color: var(--cta-hover);
    }
}

/* Ajuste específico para celulares muy pequeños */
@media (max-width: 400px) {
    .stats-container {
        gap: 5px; /* Menos espacio entre cuadros para ganar sitio */
    }
    .stat-item {
        padding: 15px 2px;
    }
}

/*ingeniero*/

.about-engineer {
    background-color: var(--white); 
    padding: 160px 20px;
    display: flex;
    justify-content: center;
}

.about-container {
    width: 100%;
    max-width: 1100px;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 50px;
    align-items: center;
}

.about-image {
    position: relative;
}

.image-placeholder {
    width: 100%;
    aspect-ratio: 4 / 5; /* Formato retrato profesional */
    background-color: var(--color-fondo);
    border-radius: 20px;
    overflow: hidden;
    border-left: 8px solid var(--color-cta);
    box-shadow: 20px 20px 0px var(--color-fondo); /* Efecto de diseño moderno */
}

.image-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-subtitle {
    color: var(--cta-hover);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.about-title {
    color: var(--color-cta);
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 20px;
}

.about-text {
    color: #555;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 15px;
}

.about-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: var(--color-fondo);
    padding: 10px 20px;
    border-radius: 50px;
    color: var(--color-cta);
    font-weight: bold;
    margin-top: 10px;
}

.badge-icon {
    background-color: var(--color-cta);
    color: white;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.8rem;
}

/* Responsividad para móviles */
@media (max-width: 768px) {
    .about-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 30px;
    }

    .about-title {
        font-size: 2rem;
    }

    .about-image {
        max-width: 350px;
        margin: 0 auto;
    }
    
    .image-placeholder {
        box-shadow: 10px 10px 0px var(--color-fondo);
    }

    .about-badge {
        justify-content: center;
    }
}



/*-----formulario-------*/

.contacto {
    padding: 80px 20px 120px 20px;
    margin-bottom: 3rem;
    background: #fff;
    display: flex;
    justify-content: center;
}

.form-container {
    width: 100%;
    max-width: 450px;
    background: var(--color-fondo);
    padding: 30px; /* Un poco más de aire */
    border-radius: 12px;
    text-align: center;
}

.form-container h2 {
    margin-bottom: 10px;
    color: var(--color-cta); /* Usando tu variable principal */
}

.form-container p {
    margin-bottom: 25px;
    font-size: 14px;
    color: #444;
}

/* Contenedor individual para Label + Input */
.form-group {
    display: flex;
    flex-direction: column;
    text-align: left; /* Label siempre a la izquierda */
    margin-bottom: 15px;
    gap: 8px; /* Espacio entre label e input */
}

/* Estilo de los Labels (Accesibilidad) */
label {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-cta);
    margin-left: 4px;
}

/* Inputs, Select y Textarea */
input,
select,
textarea {
    padding: 12px;
    border-radius: 8px;
    border: 2px solid transparent; /* Para que no salte al poner focus */
    font-size: 14px;
    outline: none;
    width: 100%;
    transition: all 0.3s ease;
}

/* Efecto al hacer clic en un campo */
input:focus,
select:focus,
textarea:focus {
    border-color: var(--cta-hover);
    background-color: #fff;
    box-shadow: 0 0 8px rgba(10, 54, 157, 0.1);
}

textarea {
    resize: none;
    min-height: 100px;
}

/* BOTÓN (Diseño reforzado) */
.cta-form {
    background: var(--color-cta);
    color: #fff;
    padding: 14px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    font-size: 16px;
    transition: all 0.3s ease;
    margin-top: 10px;
    width: 100%;
    box-shadow: 0 4px 6px rgba(10, 54, 157, 0.2);
}

.cta-form:hover {
    background: var(--cta-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(10, 54, 157, 0.3);
}

.cta-form:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(10, 54, 157, 0.2);
}

/*--------footer---------*/


.main-footer {
    background-color: var(--color-cta);
    color: var(--white);
    padding: 60px 20px 20px;
    font-family: sans-serif;
}

.footer-container {
    display: flex;
    flex-direction: column; 
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-logo {
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.footer-logo span {
    color: var(white); /* Amarillo eléctrico */
}

.footer-info p {
    color: #bdc3c7;
    line-height: 1.6;
    font-size: 0.95rem;
}

.footer-contact h4, .footer-social h4 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #ecf0f1;
    text-decoration: none;
    margin-bottom: 15px;
    transition: color 0.3s;
}

.contact-item svg {
    width: 20px;
    height: 20px;
    color: var(--color-secundary);
}

.social-icons {
    display: flex;
    gap: 20px;
}

.social-icons a {
    color: var(--white);
    background: rgba(255, 255, 255, 0.1);
    padding: 10px;
    border-radius: 50%;
    display: flex;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background: var(--color-secundary);
    color: var(--white);
    transform: translateY(-5px);
}

.social-icons svg {
    width: 24px;
    height: 24px;
}

/* Contenedor del mensaje */
.toast {
    visibility: hidden; /* Oculto por defecto */
    min-width: 250px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 8px;
    padding: 16px;
    position: fixed;
    z-index: 1000;
    left: 50%;
    bottom: 30px; /* Aparece abajo */
    transform: translateX(-50%);
    box-shadow: 0px 4px 15px rgba(0,0,0,0.2);
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

/* Clase que activaremos con JS */
.toast.show {
    visibility: visible;
    animation: fadeInOut 4s; /* Aparece y desaparece en 4 segundos */
}

/* Animación de entrada y salida */
@keyframes fadeInOut {
    0% { bottom: 0; opacity: 0; }
    10% { bottom: 30px; opacity: 1; }
    90% { bottom: 30px; opacity: 1; }
    100% { bottom: 0; opacity: 0; }
}

/* Línea final y legal */
.footer-bottom {
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 0.85rem;
    color: #7f8c8d;
}

.legal-links {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.legal-links a {
    color: #7f8c8d;
    text-decoration: none;
}

/* --- DESKTOP VIEW --- */
@media (min-width: 768px) {
    .footer-container {
        flex-direction: row; /* Horizontal en pantallas grandes */
        justify-content: space-between;
        align-items: flex-start;
    }

    .footer-info {
        flex: 1;
        max-width: 400px;
    }

    .footer-bottom {
        display: flex;
        justify-content: space-between;
        text-align: left;
    }
    
    .legal-links {
        margin-top: 0;
    }
}

/*boton flotante whatsapp*/

.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 25px;
    right: 25px;
    background-color: #25d366;
    color: white;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 2px 4px 12px rgba(0,0,0,0.3);
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.whatsapp-float:hover {
    background-color: #1ebe57;
    transform: scale(1.1);
    box-shadow: 2px 6px 16px rgba(0,0,0,0.4);
}

/* Ajuste para pantallas pequeñas */
@media (max-width: 768px) {
    .whatsapp-float {
        width: 60px;
        height: 60px;
        bottom: 25px;
        right: 25px;
    }
    .whatsapp-float svg {
        width: 30px;
        height: 30px;
    }
}

