/* Estilos para el componente de Historia de Glucosoral */

/* Contenedor principal */
.history-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
    overflow: hidden;
}

/* Navegación de títulos */
.history-nav {
    width: 100%;
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-bottom: 40px; /* Aumentar margen entre títulos y cuadros */
    position: relative;
    gap: 30px;
}
.history-nav-item {
    padding: 15px 30px;
    width: 100%;
    font-size: 17px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #cccccc;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    text-align: center;
    font-family: 'Obviosly';
}
.cbfg-title {
    text-transform: uppercase !important;
}
h3.cbfg-title {
    text-transform: uppercase !important;
}
.history-nav-item.active {
    color: #ff3333;
    font-weight: 500;
    border-right: 2px solid red;
    margin: 0px;
    border-left: 2px solid red;
}
/* Contenedor de bloques */
.cbfg-container {
    display: flex;  
    justify-content: center;
    align-items: stretch;
    width: 100%;
    overflow: hidden;
    position: relative;
    gap: 30px;
}

/* Estilos para los bloques */
.cbfg-item {
    flex: 1;
    padding: 30px;
    transition: all 0.5s ease;
    cursor: pointer;
    position: relative;
    background-color: #f5f5f5;
    margin: 0;
    max-width: 33.333%;
    display: none; /* Ocultar por defecto */
    height: fit-content;
    min-height: fit-content !important;
    border-radius: 10px;
}

.cbfg-item.left,
.cbfg-item.right,
.cbfg-item.active {
    display: block; /* Mostrar solo los tres bloques visibles */
}

/* Estilos para el bloque activo (central) */
.cbfg-item.active {
    background-color: #ff3333;
    color: white;
    z-index: 10;
    /* Quitar bordes */
    border: none;
}

/* Estilos para el contenido de los bloques */
.cbfg-content {
    font-size: 1rem;
    line-height: 1.6;
}

/* Asegurar que los párrafos tengan espacio adecuado */
.cbfg-content p {
    margin-bottom: 0px !important;
}

/* Estilos específicos para cada bloque */
.cbfg-item:not(.active) {
    background-color: #f5f5f5;
    color: #666;
}

/* Tamaños específicos para cada bloque según orden */
.cbfg-item:nth-child(1) {
    min-width: 330px;
}

.cbfg-item:nth-child(2) {
    min-width: 380px;
}

.cbfg-item:nth-child(3) {
    min-width: 350px;
}

/* Estilos para el título dentro del contenido */
.cbfg-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 500;
    display: none; /* Oculto en desktop, visible en mobile */
}

.cbfg-item.active .cbfg-title {
    color: white;
}

/* Estilos para mantener consistencia en el texto */
.cbfg-item p {
    margin: 0 0 1.5em;
    padding: 0;
}

.cbfg-item.active p, 
.cbfg-item.left p, 
.cbfg-item.right p {
    margin: 0 0 1.5em;
    padding: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .history-nav {
        display: none; /* Ocultar la navegación en móvil */
    }
    
    .cbfg-container {
        flex-direction: column;
    }
    
    .cbfg-item {
        flex: 1;
        max-width: 100%;
        margin: 10px 0;
        display: block; /* Mostrar todos los items */
        min-width: 100% !important; /* Anular min-width específicos en móvil */
    }
    
    .cbfg-item.active {
        flex: 1;
    }
    
    .cbfg-title {
        display: block; /* Mostrar título en mobile */
        text-align: center;
        margin-bottom: 15px;
        padding-bottom: 10px;
        border-bottom: 1px solid rgba(0,0,0,0.1);
    }
    
    .cbfg-item.active .cbfg-title {
        border-bottom: 1px solid rgba(255,255,255,0.3);
    }
}