/* Contenedor del chat */
#chat-container {
    width: 100%;
    max-width: 400px;
    height: 500px;
    border: 2px solid #ccc;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: column;

    position: fixed;
    right: 20px;
    bottom: -520px;  /* oculto fuera de pantalla */
    z-index: 9999;
    background-color: #fff;
    transition: bottom 0.3s ease; /* animación deslizante */
}

/* Clase para mostrar el chat */
#chat-container.open {
    bottom: 20px; /* visible */
}

/* Botón flotante */
#toggleChat {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 10000;
    padding: 10px 20px;
    border: none;
    background-color: #007bff;
    color: white;
    border-radius: 8px;
    cursor: pointer;
}

#toggleChat:hover {
    background-color: #0056b3;
}


#chat-header {
    background-color: #1E88E5; /* azul */
    color: #fff;
    padding: 12px;
    text-align: center;
    font-weight: bold;
    font-size: 16px;
}

#chat {
    flex: 1;
    width: 100%;
    max-width: 400px;
    height: 500px;

    padding: 10px;
    overflow-y: auto;
    font-family: Arial, sans-serif;

    /* Degradado animado */
    background: linear-gradient(135deg, #E53935, #FFD600, #1E88E5);
    background-size: 600% 600%;
    animation: gradientAnimation 15s ease infinite;

    border-radius: 12px;
    border: none;
    box-shadow: none;
}


/* Animación suave del degradado */
@keyframes gradientAnimation {
    0% {background-position: 0% 50%;}
    50% {background-position: 100% 50%;}
    100% {background-position: 0% 50%;}
}

/* Mensajes del bot con fondo blanco semitransparente */
.message.bot {
    background-color: rgba(255,255,255,0.9);
    color: #000;
    padding: 10px;          /* un poco más compacto */
    border-radius: 18px;
    margin-bottom: 5px;     /* menos espacio entre mensajes */
    max-width: 85%;
    align-self: flex-start;
    line-height: 1.4;       /* menos espacio entre oraciones */
}

.message.user {
    background-color: #90CAF9; /* azul pastel */
    color: #000;
    padding: 10px;
    border-radius: 18px;
    margin-bottom: 5px;
    max-width: 85%;
    align-self: flex-end;
    box-shadow: 0px 2px 5px rgba(0,0,0,0.1);
    line-height: 1.4;
}

/* Botones en rojo brillante sin líneas ni subrayado */
.bot-buttons button {
    margin: 3px 2px;          /* un poco más compacto */
    padding: 8px 14px;
    border: none;              /* quita bordes */
    outline: none;             /* quita borde al hacer clic */
    text-decoration: none;     /* quita subrayado por si es enlace */
    border-radius: 12px;
    cursor: pointer;
    background-color: #E53935;
    color: #fff;
    font-weight: bold;
    transition: all 0.2s ease;
}

.bot-buttons button:hover {
    transform: translateY(-2px);
    box-shadow: 0px 3px 6px rgba(0,0,0,0.2);
}

/* Para todo el texto y párrafos dentro del chat */
#chat p {
    margin: 0;
    padding: 0;
    line-height: 1.4; /* menos espacio entre líneas */
}

.servicio {
    border: none;         /* Quita cualquier borde */
    border-bottom: none;  /* Quita línea de abajo */
    box-shadow: none;     /* Quita sombras si las hay */
    text-decoration: none; /* Quita subrayado si es link */
}

/* Mensajes del bot y usuario */
.message.bot {
    background-color: rgba(255, 255, 255, 0.9);
    color: #000;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 8px;
    max-width: 90%;
}

.message.user {
    background: linear-gradient(to right, #0084ff, #57bcff);
    color: rgb(3, 3, 3);
    padding: 10px;
    border-radius: 10px;
    font-weight: bold;
    text-align: center;
    display: block;
    width: 100%;
    margin: 5px 0;
}


/* Botones del bot */
.bot-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 5px;
}

.bot-buttons button {
     padding: 6px 12px;
    border-radius: 6px;
    border: none;
    background-color: #2196f3;
    color: #fff;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.bot-buttons button:hover {
    background-color: #1976d2;
}

/* Servicios (sin línea) */
.service-item {
    text-decoration: none;  /* Quita subrayado */
    border: none;           
    box-shadow: none;       
    color: inherit;         
    cursor: pointer;
}

.service-item:hover {
    text-decoration: none;  
    color: #1976d2;         /* Opcional: color al pasar mouse */
}

/* Contactos (con línea)*/
.service-link {
    text-decoration: underline;  /* Mantiene la línea */
    color: blue;                 /* Color de link tradicional */
    cursor: pointer;
}

.service-link:hover {
    text-decoration: underline;  /* Línea al pasar mouse */
}

/* Áreas (sin línea) */
.area-item {
    text-decoration: none;  /* Quita subrayado */
    border: none;           
    box-shadow: none;       
    color: inherit;         
    cursor: pointer;
}

.area-item:hover {
    text-decoration: none;  
    color: #1976d2;         /* Opcional: color al pasar mouse */
}

/* Centrar los títulos de las áreas  */
.titulo-area {
   text-align: center;        /* centra el texto */
    font-weight: bold;         /* negrita */
    font-size: 15px;           /* tamaño del texto */
    background: linear-gradient(to right, #ff9800, #ffeb3b); /* mismo degradado */
    border-radius: 6px;        /* esquinas redondeadas */
    padding: 6px;              /* espacio interno */
    width: 100%;               /* ocupa todo el ancho */
    box-sizing: border-box;    /* asegura que el padding no afecte el ancho */
    margin-bottom: 8px;        /* separación con el texto siguiente */
}

/* ==== Títulos centrados de los servicios ==== */
.titulo-servicio {
    text-align: center;        /* centra el texto */
    font-weight: bold;         /* negrita */
    font-size: 15px;           /* tamaño del texto */
    background: linear-gradient(to right, #ff9800, #ffeb3b); /* mismo degradado */
    border-radius: 6px;        /* esquinas redondeadas */
    padding: 6px;              /* espacio interno */
    width: 100%;               /* ocupa todo el ancho */
    box-sizing: border-box;    /* asegura que el padding no afecte el ancho */
    margin-bottom: 8px;        /* separación con el texto siguiente */
}

/* ==== Estilo del mensaje de despedida ==== */
.despedida {
    text-align: center;
    background: linear-gradient(to right, #4CAF50, #8BC34A);
    color: white;
    font-weight: bold;
    font-size: 15px;
    padding: 10px;
    border-radius: 10px;
    margin-top: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.titulo-registro-civil {
    text-align: center;  
    font-weight: bold;  
    font-size: 16px;  

    /* 🔥 Degradado como el de servicios */
    background: linear-gradient(to right, #ff9800, #ffeb3b);
    
    border-radius: 6px;
    padding: 6px;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 8px;
}
