/* ========================================
   ZEROA WORKBOOK - ESTILOS PRINCIPALES
   Dominio Personal™ - Carrusel Editorial
   ======================================== */

/* ==================== VARIABLES ==================== */
:root {
  --color-primary: #b91c1c;
  --color-primary-dark: #8B1A1A;
  --color-primary-light: #E85A5A;
  --color-primary-medium: #C23C3C;
  --color-accent: #dc2626;
  --color-accent-hover: #b91c1c;
  --color-text: #000;
  --color-text-muted: #555;
  --color-bg: #ffffff;
  --color-border: #ddd;
  --font-main: 'Arial', sans-serif;
}

/* ==================== CARRUSEL ==================== */
.simple-carousel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
}

.carousel-viewport {
  height: 90vh;
  min-height: 500px;
  max-height: 1000px;
  overflow: hidden;
  position: relative;
}

.carousel-track {
  display: flex;
  height: 100%;
  transition: transform 0.4s ease;
}

.carousel-slide {
  width: 100%;
  min-width: 100%;
  height: 100%;
  padding: 30px;
  box-sizing: border-box;
  background: var(--color-bg);
  overflow-y: auto;
}

.carousel-slide.cover {
  padding: 0;
}

.carousel-slide.cover img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Scrollbar del slide */
.carousel-slide::-webkit-scrollbar {
  width: 8px;
}

.carousel-slide::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.carousel-slide::-webkit-scrollbar-thumb {
  background: var(--color-accent);
  border-radius: 4px;
}

.carousel-slide::-webkit-scrollbar-thumb:hover {
  background: var(--color-accent-hover);
}

/* ==================== FLECHAS DE NAVEGACIÓN ==================== */
.arrow {
  background: #ff0000;
  color: #fff;
  border: none;
  width: 42px;
  height: 40px;
  font-size: 35px;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
  padding-bottom: 10px;
  flex-shrink: 0;
  transition: background-color 0.2s ease;
}

.arrow:hover {
  background-color: #C00202;
}

/* ==================== PÁGINA EDITORIAL ==================== */
.editorial-page {
  position: relative;
  min-height: max-content;
  height: auto;
  padding: 0;
  box-sizing: border-box;
  background: var(--color-bg);
  font-family: var(--font-main);
  display: flex;
  flex-direction: column;
}

/* Marca de agua */
.editorial-page::before {
  content: "";
  position: absolute;
  top: 140px;
  right: 40px;
  width: 420px;
  height: 420px;
  background-image: url("https://zeroa82.sg-host.com/wp-content/uploads/2020/06/Isotipo.png");
  background-repeat: no-repeat;
  background-size: contain;
  opacity: 0.05;
  pointer-events: none;
  z-index: 1;
}

/* Scrollbar de la página */
.editorial-page::-webkit-scrollbar {
  width: 8px;
}

.editorial-page::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.editorial-page::-webkit-scrollbar-thumb {
  background: var(--color-accent);
  border-radius: 4px;
}

.editorial-page::-webkit-scrollbar-thumb:hover {
  background: var(--color-accent-hover);
}

/* ==================== HEADER EDITORIAL ==================== */
.editorial-header {
  position: relative;
  width: 100%;
  flex-shrink: 0;
  margin-bottom: 20px;
}

/* Barra roja superior - CSS puro */
.editorial-header::before {
  content: '';
  display: block;
  width: 100%;
  height: 20px;
  background-color: #b91c1c;
}

/* Imagen de las formas geométricas - AGREGAR TU URL */
.header-shape {
  display: block;
  width: 250px; /* Ajusta según tu imagen */
  height: 65px; /* Ajusta según tu imagen */
  background-image: url("https://zeroa82.sg-host.com/wp-content/uploads/2025/12/descarga.png");
  background-repeat: no-repeat;
  background-position: left top;
  background-size: contain;
}

/* ==================== CONTENIDO EDITORIAL ==================== */
.editorial-content {
  position: relative;
  z-index: 2;
  flex: 1;
  padding: 40px 50px 40px 50px;
  min-height: 400px;
}

.editorial-content h2.module-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--color-text);
}

.editorial-content h3 {
  font-size: 15px;
  font-weight: 700;
  margin-top: 30px;
  margin-bottom: 10px;
  color: var(--color-text);
}

.editorial-content p {
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 12px;
  margin-top: 12px;
  color: var(--color-text);
}

/* ==================== LISTAS ==================== */
.editorial-content ul {
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 12px;
  margin-top: 12px;
  padding-left: 20px;
  color: var(--color-text);
}

.editorial-content ul li {
  margin-bottom: 10px;
  line-height: 1.6;
  color: var(--color-text);
  font-size: 14px;
}

.editorial-content ol {
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 12px;
  margin-top: 12px;
  padding-left: 20px;
  color: var(--color-text);
}

.editorial-content ol li {
  margin-bottom: 10px;
  line-height: 1.6;
  color: var(--color-text);
  font-size: 14px;
}

.editorial-content hr {
  border: none;
  height: 1px;
  background: var(--color-text);
  opacity: 0.15;
  margin: 30px 0;
}

/* Clases de texto especiales */
.intro-text {
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 30px;
  color: var(--color-text);
}

.quote {
  font-style: italic;
  margin-bottom: 30px;
  color: var(--color-text);
}

.note {
  font-size: 13px;
  font-style: italic;
  color: var(--color-text-muted);
  margin-top: -8px;
  margin-bottom: 12px;
}

.power-title,
.action-title {
  font-weight: 700;
  margin-top: 20px;
  color: var(--color-text);
}

.exercise-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
  margin-top: 0;
  color: var(--color-text);
}

.instruction {
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 16px;
  color: var(--color-text);
}

/* Listas editoriales */
.editorial-list {
  margin: 14px 0 20px 20px;
  padding-left: 18px;
  color: var(--color-text);
}

.editorial-list li {
  margin-bottom: 10px;
  line-height: 1.6;
  color: var(--color-text);
  font-size: 14px;
}

.editorial-divider {
  width: 100%;
  height: 1px;
  background: black;
  margin: 30px 0 40px 0;
}

/* ==================== FOOTER EDITORIAL ==================== */
.editorial-footer {
  position: relative;
  margin-top: auto;
  padding: 20px 50px;
  height: 40px;
  z-index: 100;
  pointer-events: none;
  flex-shrink: 0;
}

.footer-line {
  position: absolute;
  left: 0;
  top: 18px;
  width: 100%;
  height: 40px;
  background: linear-gradient(
    to right,
    #DC2626FF 0%,
    #FFFFFF00 100%
  );
}

.footer-logo {
  position: absolute;
  right: 0;
  top: -6px;
  width: 60px;
  height: auto;
  background: var(--color-bg);
  padding-left: 10px;
}

/* ==================== TEXTAREAS ==================== */
.workbook-textarea {
  width: 100%;
  min-height: 80px;
  padding: 8px;
  font-family: var(--font-main);
  font-size: 14px;
  line-height: 1.6;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  resize: vertical;
  margin-bottom: 20px;
  transition: border-color 0.2s;
  background: var(--color-bg);
  color: var(--color-text);
  z-index: 5;
  position: relative;
}

.workbook-textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.1);
}

.workbook-textarea.single-line {
  min-height: 36px;
  overflow: hidden;
  resize: none;
}

.workbook-textarea.small {
  min-height: 50px;
}

/* ==================== TABLAS ==================== */

/* Contenedor con scroll horizontal */
.table-container {
  width: 100%;
  overflow-x: auto;
  margin: 15px 0 80px 0;
  border: 1px solid var(--color-border);
  border-radius: 4px;
}

.table-container .affirmation-table {
  margin: 0 0 30px 0;
  min-width: 600px;
}

/* Estilos base de tabla */
.affirmation-table {
  width: 100%;
  max-width: 100%;
  margin: 15px 0 60px 0;
  border-collapse: collapse;
  font-size: 12px;
  background: var(--color-bg);
  z-index: 5;
  position: relative;
}

.affirmation-table th,
.affirmation-table td {
  border: 1px solid var(--color-border);
  padding: 8px 10px;
  text-align: left;
  background: var(--color-bg);
  color: var(--color-text);
  vertical-align: top;
}

.affirmation-table th {
  background-color: var(--color-accent);
  color: #fff;
  font-weight: 700;
  text-align: center;
  font-size: 11px;
  padding: 6px 8px;
}

.affirmation-table td {
  font-size: 11px;
  line-height: 1.4;
}

/* Columna de checkbox */
.affirmation-table td.checkbox-cell {
  width: 50px;
  min-width: 50px;
  max-width: 50px;
  text-align: center;
  vertical-align: middle;
  background-color: #f5f5f5;
  padding: 8px 5px;
}

/* Columna de texto */
.affirmation-table td.text-cell {
  width: auto;
  line-height: 1.5;
  padding: 10px 15px;
}

.affirmation-table td.text-cell label {
  cursor: pointer;
  display: block;
  width: 100%;
  font-size: 12px;
}

/* Checkboxes */
.affirmation-table input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  margin: 0;
  padding: 0;
  z-index: 10;
  position: relative;
}

/* Textareas dentro de tablas */
.affirmation-table .workbook-textarea {
  width: 100%;
  min-height: 40px;
  max-height: 80px;
  padding: 5px;
  font-size: 11px;
  line-height: 1.3;
  border: 1px solid var(--color-border);
  border-radius: 3px;
  resize: vertical;
  margin: 0;
  box-sizing: border-box;
}

.affirmation-table .workbook-textarea.small {
  min-height: 35px;
  max-height: 60px;
}

.affirmation-table .workbook-textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.2);
}

/* Anchos de columnas para tablas de múltiples columnas */
.affirmation-table td:first-child {
  width: 40px;
  text-align: center;
  font-weight: 700;
}

.affirmation-table td:nth-child(2),
.affirmation-table td:nth-child(3),
.affirmation-table td:nth-child(4),
.affirmation-table td:nth-child(5) {
  width: 20%;
}

/* Para tablas con solo 2 columnas (checkbox + texto) */
.affirmation-table thead th[colspan="2"] {
  text-align: center;
}

/* Tabla de checkboxes - Ultra compacta */
.table-container .affirmation-table {
  table-layout: fixed;
  width: 100%;
}

.table-container .affirmation-table colgroup col:first-child {
  width: 50px;
}

.table-container .affirmation-table td:first-child,
.table-container .affirmation-table td.checkbox-cell {
  width: 50px !important;
  min-width: 50px !important;
  max-width: 50px !important;
  padding: 5px !important;
  box-sizing: border-box;
}

.table-container .affirmation-table td:last-child,
.table-container .affirmation-table td.text-cell {
  width: calc(100% - 50px) !important;
  padding: 10px 15px !important;
}

.table-container .affirmation-table input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  display: block;
}

/* ==================== INDICADOR DE GUARDADO ==================== */
.workbook-save-indicator {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 10px 20px;
  background: #10b981;
  color: white;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 9999;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.workbook-save-indicator.show {
  opacity: 1;
}

.workbook-save-indicator.error {
  background: #ef4444;
}

/* ==================== ESPACIADO FINAL ==================== */
.editorial-content > *:last-child {
  margin-bottom: 40px;
}