/* Estilos generales */
.gradient-bg {
    background: linear-gradient(135deg, #1a365d 0%, #2563eb 100%);
}

.card-hover {
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.testimonial-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-left: 4px solid #3B82F6;
}

.stats-card {
    border-left: 4px solid #3B82F6;
}

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fadeInUp {
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes rotation {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Loader */
.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loader {
    width: 48px;
    height: 48px;
    border: 5px solid #3B82F6;
    border-bottom-color: transparent;
    border-radius: 50%;
    animation: rotation 1s linear infinite;
}

.loader-text {
    position: absolute;
    margin-top: 80px;
    color: #3B82F6;
    font-weight: bold;
}

.fade-out {
    opacity: 0;
    transition: opacity 0.5s ease-out;
}

/* Estilos del chatbot */
#chatbot-container {
    z-index: 9999;
}

#chatbot-window {
    width: 320px;
    height: 400px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

#chat-messages {
    height: 280px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.message {
    margin-bottom: 8px;
    border-radius: 18px;
    padding: 8px 12px;
    max-width: 80%;
    word-wrap: break-word;
}

.user-message {
    background-color: #e9f3ff;
    border-radius: 18px 18px 0 18px;
    align-self: flex-end;
    margin-left: auto;
}

.llm-message {
    background-color: #f0f0f0;
    border-radius: 18px 18px 18px 0;
    align-self: flex-start;
}

.system-message {
    background-color: #ffe8e8;
    border-radius: 18px;
    margin: 8px auto;
    max-width: 90%;
    text-align: center;
    font-style: italic;
}

/* Responsive */
@media (max-width: 640px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .hero-section h1 {
        font-size: 2rem !important;
    }
    
    #chatbot-window {
        width: 300px;
        right: -10px;
    }
    
    .icon-container {
        height: 160px;
    }
}

@media (min-width: 641px) and (max-width: 768px) {
    .hero-section h1 {
        font-size: 2.5rem !important;
    }
    
    .icon-container {
        height: 180px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .hero-section h1 {
        font-size: 3rem !important;
    }
    
    .icon-container {
        height: 200px;
    }
}

@media (min-width: 1025px) {
    .hero-section h1 {
        font-size: 3.5rem !important;
    }
    
    .icon-container {
        height: 220px;
    }
}

/* Estilos para el chat.css */
/* Puedes incluir estos en un archivo chat.css separado o mantenerlos aquí */

.chat-messages {
    display: flex;
    flex-direction: column;
}

.user-message {
    background-color: #e9f3ff;
    color: #333;
    border-radius: 18px 18px 0 18px;
    padding: 10px 15px;
    margin: 5px 0;
    max-width: 80%;
    align-self: flex-end;
}

.llm-message {
    background-color: #f0f0f0;
    color: #333;
    border-radius: 18px 18px 18px 0;
    padding: 10px 15px;
    margin: 5px 0;
    max-width: 80%;
    align-self: flex-start;
}

.system-message {
    background-color: #ffe8e8;
    color: #666;
    border-radius: 18px;
    padding: 8px 12px;
    margin: 5px auto;
    max-width: 90%;
    text-align: center;
    font-style: italic;
}

/* Fix para navegadores antiguos */
.flex-1 {
    flex: 1 1 0%;
}

.flex-none {
    flex: none;
}

.flex-shrink-0 {
    flex-shrink: 0;
}

.overflow-hidden {
    overflow: hidden;
}