/* ================================
   CONTÉM BITS – PADRÃO DE CURSO
   ================================ */

:root {
  --cb-primary: #428bca;
  --cb-bg-soft: #f8f9fa;
  --cb-text: #333;
  --cb-muted: #6c757d;
  --cb-border: #e3e6ea;
  --cb-highlight: #fff3cd;
}

/* Fonte padrão */
body {
  font-family: 'Open Sans', sans-serif;
  color: var(--cb-text);
  line-height: 1.7;
}

/* ================================
   TÍTULOS
   ================================ */

.cb-title {
  font-family: 'Poppins', sans-serif;
  font-size: 2.2rem;
  font-weight: 600;
  color: var(--cb-primary);
  margin-bottom: 1rem;
}

.cb-subtitle {
  font-family: 'Raleway', sans-serif;
  font-size: 1.5rem;
  font-weight: 500;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  border-left: 4px solid var(--cb-primary);
  padding-left: 0.75rem;
}

/* ================================
   TEXTO
   ================================ */

.cb-text {
  font-size: 1rem;
  margin-bottom: 1rem;
}

.cb-muted {
  color: var(--cb-muted);
  font-size: 0.95rem;
}

/* ================================
   IMAGENS
   ================================ */

.cb-image-frame {
  background-color: #fff;
  border: 1px solid var(--cb-border);
  border-radius: 8px;
  padding: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  margin: 2rem 0;
  text-align: center;
}

.cb-image-frame img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}

.cb-image-caption {
  font-size: 0.9rem;
  color: var(--cb-muted);
  margin-top: 0.5rem;
  font-style: italic;
}

/* ================================
   BLOCO DE DESTAQUE
   ================================ */

.cb-highlight {
  position: relative;
  background-color: var(--cb-highlight);
  border: 1px solid #ffe69c;
  border-radius: 8px;
  padding: 1.25rem 1.25rem 1.25rem 3rem;
  margin: 2rem 0;
}

.cb-highlight::before {
  content: "💡";
  position: absolute;
  left: 1rem;
  top: 1.1rem;
  font-size: 1.5rem;
}

.cb-highlight strong {
  font-weight: 600;
  color: var(--cb-primary);
}



/* ================================
   BLOCO DE CÓDIGO
   ================================ */

.cb-code {
  background-color: #1e1e1e;
  color: #eaeaea;
  border-radius: 8px;
  padding: 1rem 3.25rem;
  margin: 2rem 0;
  font-family: Consolas, 'Courier New', monospace;
  font-size: 0.95rem;
  overflow-x: auto;
  position: relative;
  padding-top: 2.5rem;
}

.cb-code::before {
  content: "JavaScript";
  position: absolute;
  top: 0.75rem;
  left: 1rem;
  background-color: var(--cb-primary);
  color: #fff;
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 6px;
  font-family: 'Poppins', sans-serif;
}

.cb-copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: rgba(66, 139, 202, 0.9);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.cb-copy-btn:hover {
  background-color: #357ab8;
}

.cb-copy-btn:active {
  transform: scale(0.95);
}

.cb-copy-btn.copied {
  background-color: #28a745;
}

/* Para outros tipos no futuro */
.cb-code.css::before { content: "CSS"; }
.cb-code.html::before { content: "HTML"; }
.cb-code.php::before { content: "PHP"; }

/* ================================
   ALERTAS DIDÁTICOS
   ================================ */

.cb-alert {
  position: relative;
  border-radius: 8px;
  padding: 1.2rem 1.2rem 1.2rem 3rem;
  margin: 2rem 0;
  font-size: 0.95rem;
}

/* Ícone */
.cb-alert::before {
  position: absolute;
  left: 1rem;
  top: 1.1rem;
  font-size: 1.4rem;
}

/* DICA */
.cb-alert.tip {
  background-color: #e7f3ff;
  border: 1px solid #b6dbff;
}

.cb-alert.tip::before {
  content: "💡";
}

/* DICA */
.destaque {
   position: relative;
  border-radius: 8px;
  padding: 1.2rem 1.2rem 1.2rem 3rem;
  margin: 2rem 0;
  font-size: 0.95rem;
  background-color: #fce4c5;
  border: 1px solid #fdd5a1;
}



/* CUIDADO */
.cb-alert.warning {
  background-color: #fff3cd;
  border: 1px solid #ffe69c;
}

.cb-alert.warning::before {
  content: "⚠️";
}

/* ERRO */
.cb-alert.error {
  background-color: #f8d7da;
  border: 1px solid #f1aeb5;
}

.cb-alert.error::before {
  content: "❌";
}

/* ================================
   LISTAS ESTILIZADAS – CONTÉM BITS
   ================================ */

/* Lista padrão (não ordenada) */
.cb-list {
  list-style: none;
  padding-left: 0;
  margin: 1.5rem 0;
}

.cb-list li {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

/* Ícone personalizado */
.cb-list li::before {
  content: "▹";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--cb-primary);
  font-size: 1.2rem;
  line-height: 1.4;
}

/* ================================
   LISTA ORDENADA
   ================================ */

.cb-list-ordered {
  counter-reset: item;
  list-style: none;
  padding-left: 0;
  margin: 1.5rem 0;
}

.cb-list-ordered li {
  counter-increment: item;
  position: relative;
  padding-left: 2.5rem;
  margin-bottom: 0.75rem;
}

.cb-list-ordered li::before {
  content: counter(item);
  position: absolute;
  left: 0;
  top: 0;
  width: 1.8rem;
  height: 1.8rem;
  background-color: var(--cb-primary);
  color: #fff;
  border-radius: 50%;
  text-align: center;
  font-size: 0.85rem;
  line-height: 1.8rem;
  font-weight: 600;
}

/* ================================
   LISTA DE DESTAQUE (opcional)
   ================================ */

.cb-list-highlight li::before {
  content: "✔";
  color: #28a745;
}

/* ================================
   RESUMO DA AULA – CONTÉM BITS
   ================================ */

.cb-resumo {
  position: relative;
  background-color: #f4f8fc;
  border-left: 5px solid var(--cb-primary);
  border-radius: 10px;
  padding: 2rem 2rem 1.5rem 2.5rem;
  margin: 3rem 0;
  font-size: 0.95rem;
}

/* Título do resumo */
.cb-resumo h3 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: #333;
}

/* Ícones flutuantes */
.cb-resumo::before {
  content: "💾";
  position: absolute;
  top: -16px;
  left: -16px;
  background-color: var(--cb-primary);
  color: #fff;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.cb-resumo::after {
  content: "🧠";
  position: absolute;
  top: -16px;
  left: 28px;
  background-color: #6f42c1;
  color: #fff;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* Lista interna */
.cb-resumo ul {
  margin: 0;
  padding-left: 1.2rem;
}

.cb-resumo li {
  margin-bottom: 0.5rem;
  line-height: 1.5;
}
