/* --- ESTILOS GENERALES --- */
:root {
    --primary: #2c3e50;    /* Azul corporativo */
    --accent: #27ae60;     /* Verde Eco/Ahorro */
    --gas: #c0392b;        /* Rojo Gasolina/Gasto */
    --bg-light: #f8f9fa;   /* Fondos suaves */
    --text: #333333;
}

body {
    
    margin: 0;
    padding: 0;
    //background: #fff;
    line-height: 1.6;
}

/* --- HEADER --- */
header {
    color: white;
    padding: 50px 20px;
    text-align: center;
    background: #00bfba;
}

header h1 {
    margin: 0;
    font-size: 2.2rem;
}

header p {
    opacity: 0.9;
    margin-top: 10px;
    font-size: 1.1rem;
}

/* --- CONTENEDOR PRINCIPAL --- */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    font-family: "oswald", sans-serif;
}

/* --- TABLA TÉCNICA --- */
.table-section {
    margin-top: -30px; /* Efecto flotante sobre el header */
    margin-bottom: 50px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    overflow: hidden;
}

.table-wrapper {
    overflow-x: auto; /* Scroll lateral en móviles */
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 700px;
}

th {
    background: #eee;
    padding: 15px;
    text-align: left;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    color: #555;
}

td {
    padding: 15px;
    border-bottom: 1px solid #f1f1f1;
    vertical-align: middle;
}

/* Estilos de filas y celdas */
.row-gas { border-left: 5px solid var(--gas); }
.row-elec { border-left: 5px solid var(--accent); background-color: #fafffc; }

.price-tag { font-weight: bold; color: var(--primary); }
.cost-bad { color: var(--gas); font-weight: bold; }
.cost-good {
    color: var(--accent);
    font-weight: bold;
    background: #dfffe9;
    padding: 3px 8px;
    border-radius: 4px;
}

/* --- BATALLA VISUAL (FOTOS) --- */
.section-title {
    text-align: center;
    margin: 50px 0 30px 0;
    font-size: 1.8rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.section-title span {
    background: var(--primary);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 1rem;
    vertical-align: middle;
}

.versus-container {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 20px;
    flex-wrap: wrap;
}

.bike-card {
    flex: 1;
    min-width: 300px;
    border: 1px solid #eee;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.2s ease;
    background: white;
}

.bike-card:hover {
    transform: translateY(-5px);
}

.bike-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    background-color: #ddd; /* Color de fondo mientras carga */
}

.card-body {
    padding: 20px;
    text-align: center;
}

.card-body h3 { margin: 0 0 5px 0; }

.tag {
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.tag-gas { color: var(--gas); }
.tag-elec { color: var(--accent); }

/* --- GRÁFICO DE BARRAS --- */
.chart-box {
    background: white;
    padding: 25px;
    border-radius: 10px;
    margin-top: 25px;
    border: 1px solid #eee;
    border-left: 4px solid var(--primary);
}

.chart-title {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 15px;
    text-align: center;
}

.bar-row {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    font-size: 0.9rem;
}

.bar-label {
    width: 120px; /* Ancho fijo para el texto */
    font-weight: bold;
}

.bar-track {
    flex-grow: 1;
    background: #e0e0e0;
    height: 24px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.bar-fill {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end; /* Texto alineado a la derecha */
    padding-right: 10px;
    color: white;
    font-weight: bold;
    font-size: 0.8rem;
    transition: width 1s ease-in-out;
}

/* Colores de las barras */
.fill-gas { background: var(--gas); }
.fill-elec { background: var(--accent); }

/* --- BOTÓN FINAL --- */
.cta-container {
    text-align: center;
    margin: 60px 0;
}

.btn {
    background: var(--accent);
    color: white;
    padding: 15px 35px;
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1.1rem;
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.4);
    transition: background 0.3s, transform 0.2s;
}

.btn:hover {
    background: #219150;
    transform: scale(1.05);
}

/* --- RESPONSIVE (MÓVIL) --- */
@media (max-width: 768px) {
    .versus-container {
        flex-direction: column;
    }
    
    .section-title {
        font-size: 1.5rem;
        flex-direction: column;
        gap: 5px;
    }
    
    header {
        padding: 40px 15px;
    }
    
    .bar-label {
        width: 100px;
        font-size: 0.8rem;
    }
}