/* ============================================= */
/* == ESTILOS GENERALES PARA STORYTELLING      === */
/* ============================================= */

.story-step {
    margin-top: 30px;
    padding: 25px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background-color: var(--color-background);
    border-left: 5px solid var(--color-primary);
}

.story-step h1, .story-step h2, .story-step h3 {
    margin-top: 0;
    color: var(--color-primary-dark);
}

.hidden-scene {
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.reveal-button {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 25px;
    font-size: 1rem;
    font-weight: 700;
    color: white;
    background-color: var(--color-primary-dark); 
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.reveal-button:hover {
    transform: translateY(-2px);
     background-color: var(--color-primary-light);
}

/* ============================================= */
/* == ESTILOS SIMULADOR CARDÍACO INTERACTIVO   === */
/* ============================================= */

.cardiac-simulator-container {
    padding: 25px;
    background-color: #f8f9fa; /* Fondo ligeramente gris para destacarlo */
    border: 1px solid var(--color-border);
    border-radius: 12px;
    margin-top: 30px;
    margin-bottom: 30px;
}

.cardiac-simulator-container h3 {
    text-align: center;
    margin-top: 0;
    color: var(--color-primary);
}

.cardiac-simulator-container p {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 20px auto;
}

.simulator-flex-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 30px;
}

/* --- Estilos del Diagrama del Corazón --- */
.heart-diagram-wrapper {
    position: relative; /* Clave para posicionar los hotspots */
    width: 100%;
    max-width: 300px; /* Ajustamos tamaño para el nuevo simulador */
    flex-shrink: 0;
}

.heart-svg {
    width: 100%;
    height: auto;
}

.heart-svg .heart-outline {
    fill: #ffebee; 
    stroke: #e57373;
    stroke-width: 2;
}

.heart-svg .conduction-path {
    fill: none;
    stroke: #ffc107; 
    stroke-width: 3;
    stroke-linecap: round;
    transition: stroke 0.3s ease; /* Transición para el efecto de bloqueo */
}

.heart-svg .node {
    fill: #ff9800;
    stroke: #e65100;
    stroke-width: 1.5;
}

/* Clase para indicar un camino bloqueado */
.heart-svg .blocked-path {
    stroke: #d32f2f; /* Rojo oscuro para indicar bloqueo */
    stroke-dasharray: 4; /* Línea punteada */
}

.heart-svg .label { font-family: sans-serif; font-size: 14px; font-weight: bold; fill: #424242; }
.heart-svg .label-small { font-size: 10px; font-weight: bold; fill: #424242; }
.heart-svg .label-tiny { font-size: 8px; font-weight: bold; fill: #424242; }

/* --- Estilos y Posicionamiento de los Hotspots --- */
.hotspot {
    position: absolute;
    cursor: pointer;
    /* background-color: rgba(0, 123, 255, 0.3); /* Descomenta para ver y ajustar posiciones */
    z-index: 10;
    transition: background-color 0.2s ease;
}

.hotspot:hover {
    background-color: rgba(0, 123, 255, 0.2);
}

/* Posiciones para los hotspots del simulador de eje */
#hotspot-hbai { top: 55%; left: 15%; width: 20%; height: 20%; border-radius: 10px; }
#hotspot-hbpi { top: 70%; left: 30%; width: 20%; height: 25%; border-radius: 10px; }


/* --- Estilos del Diagrama del Eje --- */
.axis-diagram-wrapper {
    width: 100%;
    max-width: 250px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.axis-svg {
    width: 100%;
    height: auto;
    overflow: visible; /* Para que las etiquetas no se corten */
}

.axis-svg .axis-line {
    stroke: #90a4ae;
    stroke-width: 1;
}

.axis-svg .axis-label {
    font-family: sans-serif;
    font-size: 12px;
    fill: var(--color-text-secondary);
}

#axis-arrow {
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55); /* Transición con efecto "rebote" */
    transform-origin: center;
}

.axis-svg .axis-arrow-line {
    stroke: var(--color-primary-dark);
    stroke-width: 3;
}

.axis-svg .axis-arrow-head {
    fill: var(--color-primary-dark);
}

/* Estilos para el botón de reset del eje */
#reset-axis-button {
    padding: 8px 16px;
    font-size: 0.9rem;
}


/* --- Estilos de la caja de descripción --- */
.ecg-description-box {
    margin-top: 15px;
    padding: 15px;
    background-color: #eef2f9;
    border-radius: 8px;
    font-style: italic;
    color: var(--color-text-secondary);
    min-height: 70px; /* Para evitar que salte al cambiar el texto */
    text-align: center;
    width: 100%;
    max-width: 600px; /* Ancho máximo para la descripción */
    margin-left: auto;
    margin-right: auto;
}
