﻿/* Variáveis do Curso - Cores Amigáveis e Alto Contraste */
:root {
    --ci-primary: #0056b3;
    /* Azul Forte */
    --ci-primary-hover: #004494;
    --ci-secondary: #0080ff;
    --ci-bg: #f5f7fa;
    /* Fundo claro e limpo */
    --ci-bg-card: #ffffff;
    --ci-text: #2c3e50;
    /* Contraste máximo com o fundo */
    --ci-text-light: #6c757d;
    --ci-border: #dee2e6;

    --ci-success: #28a745;
    --ci-success-hover: #218838;
    --ci-danger: #dc3545;
    --ci-warning: #ffc107;

    --ci-border-radius: 16px;
    --ci-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --ci-transition: all 0.3s ease;

    --ci-font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Reset básico dentro do nosso contêiner para não quebrar o site do cliente */
#curso-ibfc-app {
    all: initial;
    /* Reseta as cascadas globais */
    font-family: var(--ci-font-family);
    color: var(--ci-text);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 900px;
    margin: 20px auto;
    background-color: var(--ci-bg-card);
    border-radius: var(--ci-border-radius);
    box-shadow: var(--ci-shadow);
    overflow: hidden;
    position: relative;
    min-height: 600px;
}

#curso-ibfc-app * {
    box-sizing: border-box;
}

/* Header - Progresso */
.ci-header {
    background-color: var(--ci-bg);
    padding: 20px 30px;
    border-bottom: 2px solid var(--ci-border);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.ci-header-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--ci-primary);
    text-align: center;
}

/* O conteúdo revelado ao clicar: oculto por padrão (height:0 via GSAP), sem animação CSS */
.ci-card-reveal {
    overflow: hidden;
    height: 0;
    opacity: 0;
    font-size: 0.95rem;
    color: var(--ci-text-light);
    margin-top: 0;
    padding-top: 0;
}

/* Modificadores de Estado Injetados Via JS */
.ci-card.ci-revealed {
    border-color: var(--ci-success);
    background-color: #f0fdf4;
}

/* Barra de Progresso Visual */
.ci-progress-bar-container {
    width: 100%;
    height: 12px;
    background-color: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
}

.ci-progress-bar-fill {
    height: 100%;
    background-color: var(--ci-secondary);
    width: 0%;
    /* Controlado pelo JS */
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.ci-progress-text {
    font-size: 0.95rem;
    color: var(--ci-text-light);
    text-align: center;
    font-weight: 600;
}

/* Content Area - Onde os módulos aparecem */
.ci-content {
    flex-grow: 1;
    padding: 40px;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
}

/* Animações de Slide In/Out agora via GSAP */
.ci-slide {
    display: none;
    opacity: 0;
}

.ci-slide.ci-active {
    display: block;
    opacity: 1;
}

/* Footer - Navegação */
.ci-footer {
    padding: 25px 30px;
    border-top: 2px solid var(--ci-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--ci-bg);
}

/* Botões Amigáveis e Acessíveis */
.ci-btn {
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--ci-transition);
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
}

.ci-btn:focus-visible {
    outline: 3px solid var(--ci-warning);
    outline-offset: 2px;
}

.ci-btn-prev {
    background-color: var(--ci-text-light);
}

.ci-btn-prev:hover:not(:disabled) {
    background-color: #5a6268;
    transform: translateX(-3px);
}

.ci-btn-next {
    background-color: var(--ci-primary);
}

.ci-btn-next:hover:not(:disabled) {
    background-color: var(--ci-primary-hover);
    transform: translateX(3px);
}

.ci-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ==== QUIZ DE MÚLTIPLA ESCOLA (IBFC) ==== */
.ci-quiz-box {
    overflow: hidden;
    max-width: 100%;
    box-sizing: border-box;
    margin-top: 20px;
    background: #f0f8ff;
    padding: 20px;
    border-radius: 12px;
    border-left: 5px solid var(--ci-primary);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.ci-quiz-box h4 {
    color: var(--ci-primary);
    margin-bottom: 15px;
}

.ci-quiz-options {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 15px 0;
}

.ci-quiz-btn {
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    max-width: 100% !important;
    text-align: left !important;
    justify-content: flex-start !important;
    padding: 12px 18px !important;
    font-size: 0.95rem !important;
    background: #fff !important;
    color: var(--ci-text) !important;
    border: 1px solid var(--ci-border) !important;
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
}

.ci-quiz-btn:hover:not(:disabled) {
    background: #e9f2ff !important;
    border-color: var(--ci-primary) !important;
    transform: translateX(5px);
}

.ci-quiz-btn[data-correct="true"].ci-answered {
    background: var(--ci-success) !important;
    color: #fff !important;
    border-color: var(--ci-success) !important;
}

.ci-quiz-btn[data-correct="false"].ci-answered.ci-selected {
    background: var(--ci-danger) !important;
    color: #fff !important;
    border-color: var(--ci-danger) !important;
}

.ci-quiz-feedback {
    margin-top: 15px;
    padding: 15px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #eee;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Typography Base para os Módulos */
.ci-slide h2 {
    font-size: 2rem;
    color: var(--ci-primary);
    margin-top: 0;
    margin-bottom: 20px;
}

.ci-slide p {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 15px;
}

/* Base de Cartões para Conteúdo em Grid (Fase 3 & 4) */
.ci-grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.ci-card {
    background: var(--ci-bg);
    border: 2px solid var(--ci-border);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ci-card-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
    display: inline-block;
}

.ci-card-title {
    font-weight: bold;
    color: var(--ci-primary);
    font-size: 1.1rem;
}

.ci-card-reveal {
    height: 0;
    opacity: 0;
    overflow: hidden;
    color: var(--ci-text);
    font-size: 0.95rem;
    line-height: 1.4;
    transition: none;
    /* Agora deixamos o GSAP cuidar disso via Inline Styles */
}

/* Responsivo */
@media (max-width: 600px) {
    .ci-content {
        padding: 20px;
    }

    .ci-btn {
        padding: 12px 20px;
        font-size: 1rem;
    }

    .ci-slide h2 {
        font-size: 1.5rem;
    }
}

/* ==== FASE 3: Simulação Hands-on OS Windows ==== */
.ci-os-window {
    width: 100%;
    margin: 20px 0;
    background: #ffffff;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    user-select: none;
}

.ci-os-header {
    background: #f0f0f0;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ddd;
    border-radius: 8px 8px 0 0;
}

.ci-os-title {
    font-size: 0.9rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ci-os-controls {
    display: flex;
    gap: 6px;
}

.ci-os-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.ci-os-dot.red {
    background: #ff5f56;
}

.ci-os-dot.yellow {
    background: #ffbd2e;
}

.ci-os-dot.green {
    background: #27c93f;
}

.ci-os-body {
    display: flex;
    height: 300px;
    position: relative;
    border-radius: 0 0 8px 8px;
}

.ci-os-sidebar {
    width: 160px;
    background: #f9f9f9;
    border-right: 1px solid #ddd;
    padding: 15px;
    border-radius: 0 0 0 8px;
}

.ci-os-sidebar-label {
    font-size: 0.8rem;
    color: #888;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.ci-os-main {
    flex-grow: 1;
    padding: 20px;
    background: #ffffff;
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 15px;
    border-radius: 0 0 8px 0;
}

/* Interação Hand-on GSAP */
.ci-draggable-item {
    width: 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: grab;
    padding: 10px;
    border-radius: 4px;
    transition: background 0.2s;
    position: relative;
    z-index: 10;
}

.ci-draggable-item:active {
    cursor: grabbing;
}

.ci-draggable-item:hover {
    background: rgba(0, 86, 179, 0.1);
}

.ci-item-icon {
    font-size: 2.5rem;
    pointer-events: none;
}

.ci-item-name {
    font-size: 0.8rem;
    color: #333;
    margin-top: 5px;
    text-align: center;
    pointer-events: none;
}

.ci-dropzone {
    border: 2px dashed #ccc;
    border-radius: 6px;
    background: #fafafa;
    min-width: 120px;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.ci-dropzone.active-hover {
    border-color: var(--ci-primary);
    background: rgba(0, 86, 179, 0.05);
}

.ci-os-glass-modal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 50;
    text-align: center;
    border-radius: 0 0 8px 8px;
}

/* --- Estilos para Simulação de Modo Detalhes (Windows) --- */
.ci-os-list-header {
    display: flex;
    align-items: center;
    background: #fdfdfd;
    border-bottom: 1px solid #eee;
    padding: 8px 10px;
    font-size: 0.75rem;
    font-weight: 500;
    color: #666;
    gap: 10px;
}

.ci-sort-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    border-bottom: 1px solid #f9f9f9;
    transition: background 0.2s;
    font-size: 0.85rem;
    cursor: default;
}

.ci-sort-item:hover {
    background: #e5f3ff;
}

.ci-sort-item .ci-col-name {
    flex: 2;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ci-sort-item .ci-col-date {
    flex: 1.5;
    color: #888;
    font-size: 0.75rem;
}

.ci-sort-item .ci-col-type {
    flex: 1;
    color: #888;
    font-size: 0.75rem;
}

.ci-sort-item .ci-col-size {
    flex: 1;
    color: #888;
    font-size: 0.75rem;
    text-align: right;
}

.ci-fake-menu {
    position: absolute;
    background: #fff;
    border: 1px solid #bbb;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    padding: 4px 0;
    z-index: 1000;
    display: none;
    font-family: sans-serif;
    font-size: 0.85rem;
    min-width: 180px;
}

.ci-menu-item {
    padding: 6px 20px;
    cursor: pointer;
    transition: background 0.15s;
    color: #333;
}

.ci-menu-item:hover {
    background: #0078d7;
    color: #fff;
}

.ci-menu-item-nested {
    padding: 6px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #333;
    cursor: default;
    border-bottom: 1px solid #eee;
    margin-bottom: 4px;
    font-weight: bold;
}

/* --- Pen Drive Realista --- */
.ci-pendrive-body {
    width: 60px;
    height: 30px;
    background: #333;
    /* Corpo do Pen Drive */
    border-radius: 4px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
    border: 1px solid #111;
}

.ci-pendrive-led {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    background: #555;
    border-radius: 50%;
}

.ci-pendrive-body.active .ci-pendrive-led {
    background: #00ff00;
    box-shadow: 0 0 5px #00ff00;
    animation: ci-blink 0.5s infinite alternate;
}

.ci-pendrive-connector {
    width: 20px;
    height: 18px;
    background: #aaa;
    /* Metal */
    border: 1px solid #888;
    position: absolute;
    left: -20px;
    top: 50%;
    transform: translateY(-50%);
    border-radius: 2px 0 0 2px;
}

.ci-pendrive-connector::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    width: 4px;
    height: 4px;
    background: #666;
    box-shadow: 8px 0 #666;
}

@keyframes ci-blink {
    from {
        opacity: 0.3;
    }

    to {
        opacity: 1;
    }
}

/* Box de Pegadinha IBFC */
.ci-quiz-trap {
    margin-top: 15px;
    padding: 12px 15px;
    background: #fff9e6;
    border-left: 4px solid #ffcc00;
    border-radius: 4px;
    font-size: 0.85rem;
    color: #856404;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    animation: ci-pulse-yellow 2s infinite;
}

.ci-quiz-trap::before {
    content: '⚠️';
    font-size: 1.1rem;
}

.ci-quiz-trap strong {
    color: #533f03;
    display: block;
    margin-bottom: 3px;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

@keyframes ci-pulse-yellow {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 204, 0, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(255, 204, 0, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 204, 0, 0);
    }
}
/* Mouse Virtual Mobile */
@media (min-width: 769px) {
    .ci-only-mobile { display: none !important; }
}
@media (max-width: 768px) {
    .ci-only-mobile { display: flex; flex-direction: column; align-items: center; margin-top: 15px; }
}
.ci-mouse-btn { transition: fill 0.2s, opacity 0.2s; }
.ci-mouse-btn:active { fill: rgba(0, 0, 0, 0.1); }
.ci-mouse-highlight-left { fill: rgba(0, 120, 215, 0.2) !important; animation: ci-mouse-pulse 2s infinite; }
.ci-mouse-highlight-right { fill: rgba(0, 120, 215, 0.2) !important; animation: ci-mouse-pulse 2s infinite; }
@keyframes ci-mouse-pulse {
    0% { opacity: 0.2; }
    50% { opacity: 0.6; }
    100% { opacity: 0.2; }
}

/* Anima��o M�ozinha Indicativa */
@keyframes ci-hand-move-down {
    0% { transform: translateY(-30px); opacity: 0; }
    30% { opacity: 1; }
    80% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(0) scale(0.9); opacity: 0; }
}
.ci-hand-pointer {
    position: absolute;
    font-size: 2.2rem;
    pointer-events: none;
    z-index: 20;
    animation: ci-hand-move-down 2s infinite ease-in-out;
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.3));
}

