:root {
    --primary: #0066ff;
    --primary-dark: #0052cc;
    --secondary: #6c757d;
    --dark: #212529;
    --light: #f8f9fa;
    --success: #28a745;
    --info: #17a2b8;
    --warning: #ffc107;
    --danger: #dc3545;
    --accent: #00d0e0; /* turquesa suave */

}





* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f8fa;
    color: var(--dark);
    line-height: 1.6;
}

/* Header & Navegación */
header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}




.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--primary);
    font-weight: 700;
    font-size: 1.5rem;
}



nav ul {
    display: flex;
    gap: 2rem;
    list-style: none;
}

nav a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

nav a:hover {
    color: var(--primary);
}

nav a::after {
    content: "";
    position: absolute;
    width: 0;
    height: 2px;
    background: var(--primary);
    bottom: -5px;
    left: 0;
    transition: width 0.3s;
}

nav a:hover::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #0052d4, #4364f7, #6fb1fc);
    min-height: 80vh;
    padding: 8rem 5% 5rem;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    z-index: 1;
}

.hero-text {
    flex: 1;
    color: white;
}

.hero-text h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-text p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 600px;
}

.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background-color: white;
    color: var(--primary);
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid white;
    color: white;
    margin-left: 1rem;
}

.btn-outline:hover {
    background-color: white;
    color: var(--primary);
}

.hero-image {
    flex: 1;

    display: flex;
    justify-content: center;  /* Centra horizontalmente */
    align-items: center;      /* Centra verticalmente */
    height: 400px;            /* Altura de la imagen o contenedor */
    position: relative;       /* Si tienes algún contenido posicionado dentro */
}






/* Contenedor principal */
.logo-container {
    width: 80px;
    height: 30px;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 4px;
    margin-bottom: 4px;

}
/* Estilo del SVG */
.logo-svg {
    width: 100%;
    height: 100%;
}

/* Estilo del texto */
.logo-text {
    font-family: 'Arial', sans-serif; /* Fuente sans-serif */
    font-size: 3.6rem;
    fill: #0052cc;
    font-weight: 600;
    letter-spacing: 1px;
    text-anchor: middle; /* Centra horizontalmente */
    dominant-baseline: middle; /* Centra verticalmente */
}



/* Animación de código */
.code-animation {
    background-color: rgba(10, 10, 10, 0.85);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
    position: relative;
    width: 100%;
    max-width: 540px;
    height: auto;
    overflow: hidden;
}

.code-line {
    color: #f8f8f2;
    font-family: "Courier New", monospace;
    font-size: 15px;
    white-space: pre;
    opacity: 0;
    animation: fadeIn 0.4s forwards;
    margin-bottom: 6px;
}

.code-line:nth-child(1) {
    animation-delay: 0.3s;
    color: #ff79c6;
}
.code-line:nth-child(2) {
    animation-delay: 0.6s;
    color: #8be9fd;
}
.code-line:nth-child(3) {
    animation-delay: 0.9s;
    color: #50fa7b;
}
.code-line:nth-child(4) {
    animation-delay: 1.2s;
    color: #ffb86c;
}
.code-line:nth-child(5) {
    animation-delay: 1.5s;
    color: #bd93f9;
}
.code-line:nth-child(6) {
    animation-delay: 1.8s;
    color: #ff5555;
}
.code-line:nth-child(7) {
    animation-delay: 2.1s;
    color: #f1fa8c;
}
.code-line:nth-child(8) {
    animation-delay: 2.4s;
    color: #8aff80;
}
.code-line:nth-child(9) {
    animation-delay: 2.7s;
    color: #66d9ef;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
} 


/* Reducción para pantallas pequeñas (<480px) */
@media (max-width: 480px) {
    .code-animation {
        display: none;
    }    

  }





/* Formas flotantes */
.shape {
    position: absolute;
    opacity: 0.1;
}



.shape-1 {
    top: 10%;
    left: 5%;
    width: 80px;
    height: 80px;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    background-color: white;
    animation: float 10s ease-in-out infinite;
}



.shape-2 {
    bottom: 40%;
    right: 80%;
    width: 150px;
    height: 150px;
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    background-color: white;
    animation: float 12s ease-in-out infinite;
}

.shape-3 {
    top: 80%;
    left: 20%;
    width: 100px;
    height: 100px;
    border-radius: 50% 50% 20% 80% / 25% 80% 20% 75%;
    background-color: white;
    animation: float 8s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(10px, 15px) rotate(5deg);
    }
    50% {
        transform: translate(5px, -10px) rotate(-5deg);
    }
    75% {
        transform: translate(-10px, 5px) rotate(3deg);
    }
    100% {
        transform: translate(0, 0) rotate(0deg);
    }
}

/* Servicios */
.section {
    padding: 5rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--dark);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: "";
    position: absolute;
    height: 4px;
    width: 60px;
    background: var(--primary);
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}



.section-header h3 {
    font-size: 2rem;  /* Un poco más pequeño que el h2 */
    color: var(--dark);
    margin-bottom: 0.75rem; /* Ajuste del margen inferior */
    position: relative;
    display: inline-block;
}


.section-header p {
    color: var(--secondary);
    max-width: 700px;
    margin: 0 auto;
}




.section-header h2 {
    margin-bottom: 1rem;
    color: var(--dark);
    font-size: 2rem; /* Tamaño de fuente para el título de sección */
}

.section-header p {
    color: var(--secondary);
    font-size: 1.1rem;
    max-width: 700px; /* Ancho máximo para el párrafo descriptivo */
    margin: 0 auto; /* Centrar el párrafo */
}







/* Servicios */   


.services-grid {
    display: grid;
    flex-direction: column;
    gap: 30px;
    /* 2 columnas en desktop */
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));


    }



.service-card {
    width: 100%;
    min-width: 0;
}


.service-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    padding: 30px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;

    width: 100%;
    min-width: 0;


}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}
.service-icon {
    margin-bottom: 25px;
    height: 180px;
    
    display: flex;
    align-items: center;
    justify-content: center;
    
}
.service-content h3 {
    font-size: 1.5rem;
    color: #0077CC;
    margin-bottom: 15px;
}
.service-content p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
}



    .service-link {
        color: var(--secondary);
        font-weight: 600;
        text-decoration: none;
        display: inline-block; /* Cambiado de inline-flex a inline-block */
        margin-top: auto;
        padding: 0.5rem 0;
        position: relative;
        transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
        width: fit-content;

        display: none;
    }
    
    /* Efecto de subrayado sofisticado */
    .service-link::before {
        content: "";
        position: absolute;
        width: 100%;
        height: 1px;
        bottom: 0;
        left: 0;
        background-color: var(--primary);
        transform: scaleX(0);
        transform-origin: right;
        transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    }
    
    .service-link:hover {
        color: var(--primary-dark);
        text-decoration: none;
    }
    
    .service-link:hover::before {
        transform: scaleX(1);
        transform-origin: left;
        background-color: var(--primary-dark);
    }
    



    @media (max-width: 480px) {

        .services-grid {
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        }
        .service-icon {
            display: block;
            text-align: center;
        }
    
        .service-icon svg {
            max-width: 100%;
            height: auto;
        }
    }




/* Portafolio */
.portfolio {
    background-color: #f0f4f8; /* O el color de fondo que prefieras */
    text-align: center; /* Centra el encabezado */
}


.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    align-items: stretch; /* <-- hace que los hijos (items) tengan mismo alto */
}

.portfolio-item {
    border-radius: 10px;
    padding: 2rem;
    background-color: white;
    text-align: left;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    border: 1px solid #ddd;

    display: flex;
    flex-direction: column;
    justify-content: space-between; /* <--- esto es clave */
    height: 100%; /* <--- fuerza que ocupe todo el alto disponible */
}


/* --- Hover Effect --- */
.portfolio-item:hover {
    background-color: var(--primary); /* Cambia el fondo al color primario */
    color: white; /* Cambia el color del texto a blanco */
    border-color: var(--primary); /* Cambia el color del borde */
    /* Puedes añadir una ligera elevación si quieres */
    /* transform: translateY(-5px); */
    /* box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2); */
}
/* ------------------- */


/* Estilos para el contenido dentro del item */
.portfolio-title {
    font-size: 1.3rem; /* Ajusta el tamaño del título */
    margin-bottom: 1rem;
    color: var(--dark); /* Color inicial del título */
    transition: color 0.3s ease; /* Transición para el color del título */
}

.portfolio-item:hover .portfolio-title {
    color: white; /* Color del título en hover */
}

.portfolio-description {
    font-size: 1rem; /* Ajusta el tamaño de la descripción */
    color: var(--secondary); /* Color inicial de la descripción */
    margin-bottom: 0; /* Remueve margen inferior si no hay enlace */
     transition: color 0.3s ease; /* Transición para el color de la descripción */
}

.portfolio-item:hover .portfolio-description {
     color: rgba(255, 255, 255, 0.9); /* Color de la descripción en hover */
}


/* Si decides añadir un enlace */
.portfolio-link {
     display: inline-block; /* O block */
     margin-top: 1rem;
     color: var(--primary); /* Color inicial del enlace */
     text-decoration: none;
     font-weight: 600;
     transition: color 0.3s ease;
}

.portfolio-item:hover .portfolio-link {
     color: white; /* Color del enlace en hover */
}


/* Eliminar estilos no necesarios */
/* .portfolio-img { ... } */ /* Eliminar */
/* .portfolio-overlay { ... } */ /* Eliminar */
/* .portfolio-item:hover .portfolio-overlay { ... } */ /* Eliminar */
/* .portfolio-item:hover .portfolio-img { ... } */ /* Eliminar */
/* .portfolio-category { ... } */ /* Eliminar si no se usa */






/* Tecnologías */
.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.tech-icons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 40px;
    max-width: 1200px;  /* Aumentado para mejor ajuste */
    margin: 0 auto;
}

.tech-icon {
    width: 100px;
    height: 120px; /* Aumento en la altura para espacio adecuado entre icono y texto */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.tech-icon i {
    font-size: 3rem; /* Ajuste de tamaño para más visibilidad */
    margin-bottom: 10px;
    color: var(--primary, #333); /* Color principal con valor por defecto */
}

.tech-icon span {
    font-size: 1rem;  /* Aumento del tamaño del texto para mejor visibilidad */
    font-weight: 500;
    color: var(--secondary, #666); /* Color secundario con valor por defecto */
}




/* Contacto */
.contact {
    background: linear-gradient(135deg, #0052d4, #4364f7, #6fb1fc);
    color: white;
}

.contact-header h2,
.contact-header p {
    color: white;
}

.contact-header h2::after {
    background: white;
}

.contact-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
}



.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
}

.contact-text h3 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.contact-text p,
.contact-text a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s;
}

.contact-text a:hover {
    color: white;
}

/* Footer */
footer {
    background-color: #15171a;
    color: rgba(255, 255, 255, 0.7);
    padding: 3rem 5%;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
}

.footer-logo {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: inline-block;
}

.footer-about p {
    margin-bottom: 1.5rem;
}

.social-icons {
    display: flex;
    gap: 1rem;
}

.social-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s;
}

.social-icon:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.footer-title {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: white;
}

.footer-contact-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    align-items: flex-start;
}

.footer-contact-icon {
    color: var(--primary);
    font-size: 1.2rem;
}

.copyright {
    text-align: center;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 992px) {
    .hero-content {
        flex-direction: column;
        text-align: center;
    }

    .hero-text p {
        margin: 0 auto 2rem;
    }

    .hero-image {
        margin-top: 2rem;
    }

    .code-animation {
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    nav ul {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 2rem;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
        transition: clip-path 0.3s ease-in-out;
    }

    nav ul.active {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }

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

    .hero {
        padding-top: 6rem;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

    .section-header h2 {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .btn-outline {
        margin-left: 0;
        margin-top: 1rem;
    }

    .hero-text h1 {
        font-size: 2rem;
    }

    .section {
        padding: 3rem 5%;
    }

    .section-header h2 {
        font-size: 1.8rem;
    }
}



@media (max-width: 480px) {
    .section {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}




/* Estilo de los iconos dentro de los botones */
.contact-icon i {
    font-size: 2rem; /* Tamaño del icono */
    margin-right: 10px;
}

/* Estilo del botón de LinkedIn */
.btn-linkedin {
    display: inline-block;
    background-color: #0077b5; /* Color de LinkedIn */
    color: white;
    padding: 10px 20px;
    font-size: 1rem;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.3s;
    margin-top: 10px;
}

.btn-linkedin:hover {
    background-color: #005a8b; /* Color de LinkedIn al pasar el ratón */
}

.contact-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.contact-text h3 {
    font-size: 1.5rem;
    font-weight: bold;
}







/* Estilos para el Asistente Virtual */
section.asistente {
    padding: 4rem 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e1e60, #09092e);

    display: flex;
    flex-direction: column; /* Cambiado para disposición en columna */
    align-items: center; /* Alinea todo al centro horizontalmente */
    justify-content: center; /* Centra el contenido verticalmente */

    max-width: 1400px;
}



.asistente-header h2,
.asistente-header p {
    color: white;
}

.asistente-header h2::after {
    background: white;
}



.asistente-grid {
    display: flex;
    flex-wrap: wrap; /* Permite que los elementos se acomoden en varias filas */
  

    justify-content: space-between;
    
}



.info-chat {
    /*
    flex: 1 1 40%; 
    max-width: 450px; 
    */
    padding: 1rem;
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

/* Estilos para el párrafo */
.info-chat p {
    font-size: 1.2rem; /* Tamaño de texto adecuado */
    opacity: 0.9; /* Ligera opacidad */
    text-align: left; /* Alineación de texto a la izquierda */
    margin: 0; /* Elimina márgenes */
}



/* Estilos para el contenedor del chat */
.chatbot-container {
    /*
    flex: 2 1 60%;
    */ 
    max-width: 900px; 

    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 3rem;
    width: 100%; /* Asegura que el chat use todo el espacio disponible */

}


.chat-window {
    flex: 1 1 420px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 2rem;
    backdrop-filter: blur(18px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s ease;
    min-height: 70vh;
}

.chat-window:hover {
    transform: scale(1.02);
}

.chat-window p {
    margin-bottom: auto;
    text-align: center;
    opacity: 0.9;
    font-size: 1.1rem;
}

.chat-input {
    display: flex;
    margin-top: 1.5rem;
}

.chat-input input {
    flex: 1;
    padding: 0.9rem 1.2rem;
    border: none;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 1rem;
    outline: none;
    transition: background 0.3s ease;
}

.chat-input input:focus {
    background: rgba(255, 255, 255, 0.25);
}

.chat-input input::placeholder {
    color: #ddd;
}

.chat-input button {
    background: var(--accent);
    border: none;
    border-radius: 50%;
    width: 46px;
    height: 46px;
    margin-left: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s ease, background 0.3s ease;
}

.chat-input button:hover {
    background: #00b8c8;
    transform: rotate(20deg) scale(1.1);
}

.chat-input button i {
    color: #000;
    font-size: 1.2rem;
}


.chat-history {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}



.message {
    padding: 0.8rem 1rem;
    border-radius: 15px;
    max-width: 80%;
}

.bot-message {
    background: rgba(255, 255, 255, 0.1);
    align-self: flex-start;
    color: #fff;
}

.user-message {
    background: #00f2ff;
    align-self: flex-end;
    color: #000;
}


/* Estilos para pantallas pequeñas (≤ 480px) */
@media (max-width: 480px) {
    .chat-window {
        padding: 0.5rem; /* Padding reducido en móviles */
    }
}


/* Cambia a 250px SOLO cuando la pantalla ≤ 350px */
@media (max-width: 350px) {
    .chatbot-container {
        width: 250px; 
    }
}

