:root {
    --primary: #2A5C82;
    --secondary: #34B3A1;
    --dark: #1A2930;
    --light: #F5F5F5;
}

/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif; /* Fuente general del sitio */
}

body {
    line-height: 1.6;
    background-color: var(--light);
}

/* Navbar */
.navbar {
    height: 80px; /* Ajustar aqui según tu diseño real */
    background: rgba(255, 255, 255, 0.95);
    transition: background-color 0.3s ease; /* Only transition background */
    padding: 1rem 5%;
    position: fixed;
    width: 100%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo {
    width: 25px;
}

.nav-links {
    display: flex;

}

.nav-links a {
    color: #333;
    text-decoration: none;
    margin-left: 20px;
}

.nav-links a:hover {
    color: var(--secondary);
}



/* Hero Section */
.hero {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    display: flex;
    align-items: center;
    padding: 0 5%;
    padding-top: 0 !important; /* Eliminar padding adicional */
    position: relative; /* For parallax effect */
    overflow: hidden;
    background-attachment: fixed;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    color: white;
    text-align: center;
    transition: transform 0.1s ease-out;
}

.hero-logo {
    width: 450px;
    margin-bottom: 2rem;
}

h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-button {
    background: var(--secondary);
    color: white;
    padding: 1rem 2rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 500;
    transition: transform 0.3s;
    display: inline-block;
}

.cta-button:hover {
    transform: translateY(-3px);
}

/* Features Grid */
.servicios { /* Changed to 'servicios' to match HTML */
    padding: 5rem 5%;
    background: white;
}

.features-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    padding: 2rem;
    border-radius: 10px;
    background: var(--light);
    text-align: center;
    transition: transform 0.3s;
    opacity: 0;
    transform: translateY(30px);
    /*transition: opacity 0.8s ease, transform 0.8s ease;*/
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 3 !important;

}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-card img {
    width: 250px;
    margin-bottom: 1rem;
}

.feature-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.feature-card:nth-child(1) {
    transition-delay: 0.2s;
}

.feature-card:nth-child(2) {
    transition-delay: 0.4s;
}

.feature-card:nth-child(3) {
    transition-delay: 0.6s;
}

/* Nosotros Section */
.nosotros {
    padding: 4rem 5%;
    text-align: center;
}

.nosotros h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--dark);
}

.nosotros p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #555;
    max-width: 800px;
    margin: 0 auto;
}

/* Contacto Section */
.contacto {
    padding: 4rem 5%;
    text-align: center;
    background-color: #f9f9f9;
}

.contacto h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--dark);
}

.contacto form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.contacto label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    text-align: left;
    width: 100%;
}

.contacto input[type="text"],
.contacto input[type="email"],
.contacto textarea {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1.5rem;
    border: 1px solid #ddd;
    border-radius: 0.3rem;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
}

.contacto textarea {
    resize: vertical;
}

.contacto button[type="submit"] {
    background-color: var(--secondary);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 0.3rem;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.contacto button[type="submit"]:hover {
    background-color: var(--primary);
}

/* Chatbot Styles */
#chatbot-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    text-align: center;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
    font-family: 'Arial', sans-serif; /* Or your preferred font */
}

#chatbot-section h2 {
    font-size: 2.0em; /* Reduced font size */
    margin-bottom: 15px;
    animation: fadeIn 1.5s ease-in-out;
}

#chatbot-section .messages {
    width: 90%; /* Adjust width */
    max-width: 600px; /* Limit max width */
    margin: 10px auto; /* Center horizontally */
    overflow-y: auto; /* Enable vertical scrolling */
    max-height: 300px; /* Limit height */
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 5px;
}

#chatbot-section .message {
    padding: 10px;
    margin-bottom: 5px;
    border-radius: 5px;
    word-wrap: break-word; /* Prevent long words from breaking layout */
}

#chatbot-section .message.bot {
    background-color: rgba(0, 0, 0, 0.3);
    text-align: left;
}

#chatbot-section .message.user {
    background-color: rgba(0, 0, 0, 0.5);
    text-align: right;
}

#chatbot-section .input-area {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 90%;
    max-width: 600px;
    margin: 10px auto;
}

#chatbot-section input[type="text"] {
    flex-grow: 1;
    padding: 10px;
    border: none;
    border-radius: 5px;
    margin-right: 10px;
    background-color: rgba(255, 255, 255, 0.7);
    color: #000; /* Adjust text color */
}

#chatbot-section button {
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    background-color: var(--secondary); /* Use your theme color */
    color: white;
    cursor: pointer;
    transition: background-color 0.3s;
}

#chatbot-section button:hover {
    background-color: var(--primary); /* Darken on hover */
}

#chatbot-section .cursor {
    animation: blink 0.8s infinite;
    font-size: 1.2em; /* Adjust cursor size */
}

/* Cursor de escritura */
.cursor {
    animation: blink 0.8s infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    background-color: #f0f0f0;
    color: #777;
}

/* Navbar Scrolled Style */
.navbar-scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}




/* Media Queries */
@media screen and (max-width: 768px) {

    .nav-links {
        display: flex !important; /* Mantener flex para el layout */
        right: -100%; /* Control de posición */
    }


    h1 {
        font-size: 2.5rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        background-attachment: scroll; /* Better performance on mobile */
    }

    .hero-logo {
        width: 280px;
    }

    .hero p {
        font-size: 1.1rem;
    }

    /* Chatbot Responsive */
    #chatbot-section h2 {
        font-size: 1.8em;
    }

    /* Nosotros Responsive */
    .nosotros h2,
    .contacto h2 {
        font-size: 2rem;
    }

    .nosotros p {
        font-size: 1rem;
    }
}





@media screen and (max-width: 480px) {
    h1 {
        font-size: 2rem;
    }

    .cta-button {
        padding: 0.8rem 1.5rem;
    }

    /* Chatbot Responsive */
    #chatbot-section h2 {
        font-size: 1.6em;
    }


    #chatbot-section .input-area {
        flex-direction: column;
    }


    #chatbot-section input[type="text"] {
        margin-right: 0;
        margin-bottom: 10px;
    }

}

/* SUBTITULO CHATBOT AREA */
.subtitle {
    font-size: 1.2em;
    color: #FFF;
    text-align: center;
    margin-top: 5px;
}



/* Preloader */
#preloader {
    position: fixed;
    width: 100%;
    height: 100%;
    background: white; /* Cambia el color según tu diseño */
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Ocultar contenido principal hasta que se quite el preloader */
body.loaded {
    overflow: auto !important; /* Se activa después */
}



/* Ensure sections have proper spacing and scroll-margin */
section[id] {
    scroll-margin-top: 80px !important;
    padding: 2rem 0 !important; /* Add vertical spacing */
    min-height: auto !important; /* Remove any fixed heights */
}


/*  SERVICIOS SECTION  */


/* Services section specific fixes */
#servicios {
    position: relative;
    z-index: 2;
    background: white;
    overflow: visible !important;
}

.features-grid {
    position: relative;
    z-index: 2;
}




/* CHATBOT SECTION */


/* Animación especial para chatbot desde contacto */
@keyframes chatbot-bounce {
    0%, 100% { transform: translateY(0); }
    30% { transform: translateY(-30px); }
    60% { transform: translateY(15px); }
}

#chatbot-section {
    transition: all 0.3s ease;
    position: relative;
    z-index: 50;
    border: 2px solid transparent;
}

#chatbot-section.chatbot-highlight {
    border-color: #34B3A1;
    box-shadow: 0 0 25px rgba(52, 179, 161, 0.3);
}


/* Corrección posición inicio */
#inicio {
    scroll-margin-top: 80  ;
    padding-top: 80;
}

/* Animación chatbot mejorada */
@keyframes chatbot-bounce {
    0% { transform: translateY(60px); opacity: 0; }
    50% { transform: translateY(-20px); opacity: 1; }
    75% { transform: translateY(10px); }
    100% { transform: translateY(0); }
}


.chatbot-highlight {
    animation: chatbot-bounce 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}