/* Exercise Instructions
 * Exercise card images, instructions modal, large modal variant, instructions card.
 */
/* Instructions Card */
.instructions-card {
    background: var(--card-background);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    margin-bottom: 2rem;
    overflow: hidden;
}

.instructions-header {
    background: var(--gradient-primary);
    color: white;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.instructions-header:hover {
    background: linear-gradient(135deg, #5145e5 0%, #7c3aed 100%);
}

.instructions-toggle {
    color: white;
    font-size: 1.2rem;
    transition: var(--transition);
}

.instructions-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.instructions-header i {
    margin-right: 0.5rem;
}

.instructions-content {
    padding: 1.5rem;
    transition: all 0.3s ease;
    overflow: hidden;
}

.instruction-step {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--surface-color);
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
}

.instruction-step:last-child {
    margin-bottom: 0;
}

.step-icon {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
}

.step-content h4 {
    margin: 0 0 0.5rem 0;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1rem;
}

.step-content p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.5;
    font-size: 0.9rem;
}

.step-content strong {
    color: var(--primary-color);
    font-weight: 600;
}

.instructions-footer {
    padding: 1.5rem;
    text-align: center;
    background: var(--surface-color);
    border-top: 1px solid var(--border-color);
}

.instructions-footer .btn {
    font-size: 1rem;
    padding: 0.75rem 2rem;
}

@media (max-width: 768px) {
    .instruction-step {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
    
    .instructions-content {
        padding: 1rem;
    }
    
    .instructions-footer {
        padding: 1rem;
    }
}

/* ============== EXERCISE IMAGES AND INSTRUCTIONS ============== */

/* Exercise card images */
.exercise-image {
    width: 100%;
    height: 120px;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 1rem;
    background: rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
}

.exercise-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.exercise-image img:hover {
    transform: scale(1.05);
}

/* Exercise instructions modal */
.exercise-instructions {
    max-height: 70vh;
    overflow-y: auto;
}

.instructions-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 8px;
}

.instructions-images img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.instructions-images img:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.instructions-steps {
    margin-bottom: 1.5rem;
}

.instructions-steps h3 {
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.instructions-steps ol {
    padding-left: 1.25rem;
    line-height: 1.6;
}

.instructions-steps li {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.instructions-muscles,
.instructions-equipment {
    padding: 1rem;
    background: rgba(var(--primary-color-rgb), 0.05);
    border-radius: 8px;
    margin-bottom: 1rem;
}

.instructions-muscles h3,
.instructions-equipment h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.instructions-muscles p,
.instructions-equipment p {
    margin: 0.25rem 0;
    color: var(--text-primary);
}

/* Large modal for instructions */
#exerciseInstructionsModal .modal-content {
    max-width: 700px;
    width: 90vw;
}

@media (max-width: 768px) {
    .exercise-image {
        height: 100px;
    }
    
    .instructions-images {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
        padding: 0.75rem;
    }
    
    .instructions-images img {
        height: 100px;
    }
    
    #exerciseInstructionsModal .modal-content {
        width: 95vw;
        margin: 1rem;
    }
    
    .exercise-instructions {
        max-height: 60vh;
    }
}

