/* static/css/styles.css */

:root {
    /* Paleta Base */
    --primary-color: #0d2c58;
    --bg-light: #f8f9fa;
    --glass-bg: rgba(255, 255, 255, 0.90);

    /* Paleta CREMIL */
    --cremil-red: #D62027;
    --cremil-blue: #004A99;
    --cremil-green: #008542;
    --cremil-lightblue: #6FBCEE;

    /* Variables de Configuración */
    --navbar-height: 76px;
}

/* --- Base --- */
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-light);
    color: var(--primary-color);
    overflow-x: hidden;
    /* La estructura flex se maneja vía clases de Bootstrap en el HTML */
}

h1, h2, h3, h4, h5, .navbar-brand {
    font-family: 'Poppins', sans-serif;
}

main {
    /* Padding para compensar el Navbar Fixed */
    padding-top: var(--navbar-height);
}

/* --- Navbar Glassmorphism --- */
.navbar-glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding-top: 10px;
    padding-bottom: 10px;
    z-index: 1030;
}

.navbar-brand img {
    max-height: 50px;
    width: auto;
    transition: transform 0.3s ease;
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

/* --- Hero Section --- */
.hero-section {
    padding-top: 140px;
    padding-bottom: 80px;
    background: radial-gradient(circle at top right, #e9ecef 0%, transparent 40%);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: #6c757d;
    max-width: 700px;
    margin: 0 auto 40px auto;
}

/* --- Botones --- */
.btn-primary-custom {
    background-color: var(--cremil-blue);
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 74, 153, 0.3);
    transition: transform 0.2s, background-color 0.2s;
}

.btn-primary-custom:hover {
    background-color: var(--cremil-red);
    transform: translateY(-2px);
}

/* --- UI Cards --- */
.ui-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.03);
    overflow: hidden;
    transition: transform 0.3s ease;
}

.ui-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
}

.ui-header {
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    color: #555;
}

/* --- Chat Interface --- */
.chat-body {
    padding: 20px;
    height: 300px;
    overflow-y: auto;
    background-color: #fcfcfc;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.chat-bubble {
    padding: 12px 18px;
    border-radius: 15px;
    font-size: 0.95rem;
    max-width: 85%;
    position: relative;
    line-height: 1.5;
}

.bubble-user {
    background-color: #e9ecef;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
    color: #333;
}

.bubble-ai {
    background-color: rgba(0, 74, 153, 0.08);
    align-self: flex-start;
    border-bottom-left-radius: 2px;
    color: #333;
    border-left: 3px solid var(--cremil-blue);
}

.ai-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.ai-icon {
    color: var(--cremil-blue);
    margin-right: 5px;
}

.chat-input-area {
    padding: 15px;
    background: white;
    border-top: 1px solid #f0f0f0;
}

/* --- Chart Visualization --- */
.chart-container {
    padding: 30px;
    height: 300px;
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    background: white;
}

.bar-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 15%;
    height: 100%;
    justify-content: flex-end;
}

.bar {
    width: 100%;
    border-radius: 8px 8px 0 0;
    transition: height 1s ease-out;
    height: 0;
    animation: growBars 1.5s ease-out forwards;
    position: relative;
}

.bar::after {
    content: attr(data-value);
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    font-weight: 600;
    color: #555;
    white-space: nowrap;
}

@keyframes growBars {
    to { height: var(--final-height); }
}

.bar-label {
    font-size: 0.85rem;
    color: #888;
    font-weight: 500;
}

/* --- Feature Cards --- */
.feature-card {
    padding: 30px;
    background: white;
    border-radius: 20px;
    height: 100%;
    transition: all 0.3s;
    border: 1px solid transparent;
}

.feature-card:hover {
    border-color: rgba(0, 74, 153, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.icon-box {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    background-color: rgba(0, 74, 153, 0.1);
    color: var(--cremil-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 20px;
}

/* --- Team Section --- */
.team-card {
    transition: transform 0.3s;
}

.team-card:hover {
    transform: translateY(-5px);
}

.team-img-container {
    width: 120px;
    height: 120px;
    margin: 0 auto 15px auto;
    border-radius: 50%;
    padding: 4px;
    background: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.team-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid white;
}

.ring-red { background: linear-gradient(135deg, var(--cremil-red), #ff5f6d); }
.ring-blue { background: linear-gradient(135deg, var(--cremil-blue), #3a7bd5); }
.ring-green { background: linear-gradient(135deg, var(--cremil-green), #2ecc71); }
.ring-lightblue { background: linear-gradient(135deg, var(--cremil-lightblue), #00d2ff); }

.badge-cremil-red { background-color: var(--cremil-red); }
.badge-cremil-blue { background-color: var(--cremil-blue); }
.badge-cremil-green { background-color: var(--cremil-green); }
.badge-cremil-lightblue { background-color: var(--cremil-lightblue); color: #0d2c58; }

/* --- Footer --- */
.logo-strip {
    transition: all 0.3s;
    max-height: 90px;
    margin: 0 15px;
    object-fit: contain;
}

.logo-strip:hover {
    filter: grayscale(0%);
    opacity: 1;
}