/* ==============================
   TEMA — CSS (convertido desde theme.sass)
   Variables aplicadas en línea:
   color-primary: #61b89a | secondary: #f3972d | objetivos: #6b4c9a/#4b2f6b
   exploremos: #5b95d1/#2e6fa7 | recordemos: #dc5a7dff/#ae1442ff
   contenido: #719768/#69bd61 | observacion: #009ab6/#016a7d
   instruccion: #eb8c47/#ad5f27 | ejemplo: #0d9488/#0f766e
   font-main: "Segoe UI", sans-serif | font-aux: "Helvetica Neue", "Segoe UI", Arial, sans-serif
   font-normal: 1.14rem | font-semilarge: 1.16rem | font-large: 1.24rem
   ============================== */

/* ==============================
   ESTILOS BASE — GENERALES
   ============================== */

.page-header-headings .text-muted {
  color: #fff !important;
}

.breadcrumb {
  background-color: #f3f4f6 !important;
}

header ol.breadcrumb {
  color: #d45762;
}

#page-mod-quiz-attempt #responseform {
  max-width: 1264px;
  margin-left: auto;
  margin-right: auto;
}

.que .formulation {
  margin-bottom: 0px;
  border-color: #fff !important;
  background-color: #fff !important;
  border-radius: 0px !important;
}

@media (min-width: 1200px) {
  #page-mod-quiz-attempt .answer,
  #page-mod-quiz-attempt .problemcontent,
  #page-mod-quiz-attempt .im-controls,
  #page-mod-quiz-attempt .table-responsive {
    padding-left: 82px;
  }
}

.problemcontent p,
.contextcontent p,
.pagecontent p,
form select option,
li,
.rightanswer {
  font-size: 1.14rem;
}

/* =============================
   ETIQUETAS DE TRABAJO
   ============================= */
.etiqueta-trabajo {
  display: inline-flex;
  align-items: center;
  background: #f3972d;
  padding: 8px 20px 8px 12px;
  border-radius: 0px 12px 12px 0px;
  font-family: "Segoe UI", sans-serif;
  color: white;
  font-weight: bold;
  gap: 12px;
}

.etiqueta-trabajo .etiqueta-barra {
  width: 6px;
  height: 45px;
  background: white;
  border-radius: 3px;
}

.etiqueta-trabajo .etiqueta-icono {
  width: 45px;
  height: 100%;
}

.etiqueta-trabajo .etiqueta-texto {
  font-size: 24px;
}

/* =============================
   ENUNCIADOS
   ============================= */
.enunciado-container {
  display: flex;
  align-items: center;
  font-family: "Segoe UI", sans-serif;
  gap: 20px;
  position: relative;
}

.enunciado-container .enunciado-numero {
  width: 75px;
  height: 75px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #61b89a;
  color: white;
  font-size: 2rem;
  font-weight: bold;
}

.enunciado-container .enunciado-linea {
  display: none;
  width: 25%;
  height: 8px;
  background: #61b89a;
  border-radius: 6px;
  position: absolute;
  top: 0;
  left: 36px;
}

@media (min-width: 800px) {
  .enunciado-container .enunciado-linea {
    display: block;
  }
}

.enunciado-container .enunciado-texto {
  flex: 1;
  padding-left: 16px;
  font-size: 1.24rem;
  color: #333;
  font-weight: 700;
  line-height: 1.2;
  text-align: justify;
}

.feedback .rightanswer .enunciado-container {
  display: none;
}

/* =============================
   BOTONES
   ============================= */
.submit.btn.btn-secondary,
.retrobutton {
  border-radius: 8px;
  font-weight: 700;
  font-size: 1.14rem;
  background-color: #61b89a;
}

/* =============================
   CÁPSULAS BASE
   ============================= */
.capsula-container {
  overflow: visible;
  font-family: "Helvetica Neue", "Segoe UI", Arial, sans-serif;
  margin: 24px 32px;
  position: relative;
}

.capsula-container .capsula-header {
  color: white;
  display: flex;
  align-items: center;
  font-size: 20px;
  padding: 20px 20px 20px 100px;
  position: relative;
  border-bottom: none;
  border-top-left-radius: 25px;
}

.capsula-container .capsula-icon {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  left: -45px;
  top: 50%;
  transform: translateY(-50%);
}

.capsula-container .capsula-icon img {
  width: 45px;
  height: 45px;
}

.capsula-container .capsula-content {
  padding: 30px 30px 40px;
  background: white;
  color: #333;
  line-height: 1.5;
  border: 2px solid #ddd;
  border-top: none;
  border-bottom-left-radius: 25px;
  border-bottom-right-radius: 25px;
  font-size: 1.14rem;
}

/* =============================
   HEADER (unidad)
   ============================= */
.unidad-header {
  position: relative;
  background-color: #4b2f6b;
  color: #ffffff;
  padding: 48px 64px 56px 96px;
  font-family: "Montserrat", "Helvetica", sans-serif;
  overflow: hidden;
}

.unidad-header .barra-lateral {
  position: absolute;
  left: 32px;
  top: 32px;
  bottom: 32px;
  width: 12px;
  background-color: #ffffff;
}

.unidad-header .contenido {
  display: flex;
  flex-direction: column;
  gap: 32px;
  text-transform: uppercase;
  text-align: left;
}

.unidad-header .unidad {
  font-size: 1.12rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.95;
}

.unidad-header .tema {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.15;
  margin: 0;
  color: #ffffff;
}

.unidad-header .tema span {
  display: block;
  margin-top: 8px;
}

.unidad-header .leccion {
  font-size: 1.64rem;
  font-weight: 700;
  line-height: 1.25;
  margin: 0;
}

@media (max-width: 768px) {
  .unidad-header {
    padding: 32px 24px;
  }
  .unidad-header .barra-lateral {
    display: none;
  }
  .unidad-header .contenido {
    gap: 24px;
  }
  .unidad-header .tema {
    font-size: 1.6rem;
  }
  .unidad-header .leccion {
    font-size: 1.35rem;
  }
}

.ablock .answer .attachments .buttonsets {
  display: none;
}

/* =============================
   FLEX IMÁGENES (responsive)
   ============================= */
.imagenes-flex {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.imagenes-flex img {
  flex: 1 1 45%;
  max-width: 45%;
}

.imagenes-flex img:first-child:nth-last-child(3),
.imagenes-flex img:first-child:nth-last-child(3) ~ img {
  flex: 1 1 30%;
  max-width: 30%;
}

.imagenes-flex img:first-child:nth-last-child(4),
.imagenes-flex img:first-child:nth-last-child(4) ~ img {
  flex: 1 1 22%;
  max-width: 22%;
}

.imagenes-flex img:first-child:nth-last-child(5),
.imagenes-flex img:first-child:nth-last-child(5) ~ img {
  flex: 1 1 18%;
  max-width: 18%;
}

@media (max-width: 800px) {
  .imagenes-flex img,
  .imagenes-flex img:first-child:nth-last-child(3),
  .imagenes-flex img:first-child:nth-last-child(3) ~ img,
  .imagenes-flex img:first-child:nth-last-child(4),
  .imagenes-flex img:first-child:nth-last-child(4) ~ img,
  .imagenes-flex img:first-child:nth-last-child(5),
  .imagenes-flex img:first-child:nth-last-child(5) ~ img {
    max-width: 100%;
    flex: 1 1 auto;
  }
  .imagenes-flex {
    flex-direction: column;
    align-items: center;
  }
}

/* =============================
   CÁPSULAS — VARIANTES
   ============================= */
.exploremos .capsula-header {
  background: #5b95d1;
}
.exploremos .capsula-icon {
  background: #2e6fa7;
}

.objetivos .capsula-header {
  background: #6b4c9a;
}
.objetivos .capsula-icon {
  background: #4b2f6b;
}

.recordemos .capsula-header {
  background: #dc5a7dff;
}
.recordemos .capsula-icon {
  background: #ae1442ff;
}

.contenido .capsula-header {
  background: #719768;
}
.contenido .capsula-icon {
  background: #69bd61;
}

.observacion .capsula-header {
  background: #009ab6;
}
.observacion .capsula-icon {
  background: #016a7d;
}

.instruccion .capsula-header {
  background: #eb8c47;
}
.instruccion .capsula-icon {
  background: #ad5f27;
}

.ejemplo .capsula-header {
  background: #0d9488;
}
.ejemplo .capsula-icon {
  background: #0f766e;
}


/* =============================
   TABLAS REDONDEADAS
   ============================= */
.roundedtable {
  border-collapse: separate;
  border-spacing: 0;
  font-family: "Helvetica Neue", "Segoe UI", Arial, sans-serif;
  color: #333;
  margin: 20px 0;
  border: 1px solid #ddd;
  border-radius: 12px;
  overflow: hidden;
}

.roundedtable th {
  background-color: #d9d9d9ff;
  font-weight: 600;
  padding: 12px 15px;
  border-bottom: 1px solid #ddd;
}

.roundedtable td {
  padding: 12px 15px;
  border-bottom: 1px solid #eee;
}

.roundedtable td:last-child {
  border-bottom: none;
}

/* =============================
   DIÁLOGOS DE PERSONAJES
   ============================= */
.dialog {
  display: flex;
  align-items: flex-start;
  margin: 25px 0;
  gap: 15px;
}

.dialog.right {
  flex-direction: row-reverse;
}

.dialog .avatar {
  width: 80px;
  text-align: center;
}

.dialog .avatar img {
  width: 75px;
  height: 75px;
  object-fit: scale-down;
}

.dialog .avatar .name {
  padding: 4px 8px;
  font-size: 14px;
  color: white;
  font-weight: 600;
  border-radius: 12px;
}

.dialog .bubble {
  max-width: 800px;
  padding: 18px 22px;
  border-radius: 16px;
  font-size: 1.18rem;
  line-height: 1.45em;
  background: #ECECEC;
}

/* =============================
   CAROUSELS
   ============================= */
.carouselSYS,
.carouselSYStable,
.carousel-carpeta {
  position: relative;
  width: 95%;
  margin: 0 auto;
  overflow: hidden;
}

.carouselSYS-container,
.carouselSYStable-container {
  display: flex;
  transition: transform 0.5s ease;
}

.carouselSYS-slide,
.carouselSYStable-slide {
  min-width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.carouselSYS-slide img,
.carouselSYStable-slide img {
  max-width: 100%;
  height: auto;
}

.carouselSYS-prev,
.carouselSYS-next,
.carouselSYStable-prev,
.carouselSYStable-next {
  position: absolute;
  top: 50%;
  background: none !important;
  box-shadow: none !important;
  border: none;
  font-size: 24px !important;
  cursor: pointer;
  transform: translateY(-50%);
  color: gray;
  padding: 4px 4px 8px;
}

.carouselSYS-prev {
  left: 10px;
}
.carouselSYS-next {
  right: 10px;
}

.carouselSYStable-prev,
.carouselSYStable-next {
  color: #61b89a;
}

.carouselSYS .carouselSYS-prev,
.carouselSYS .carouselSYS-next,
.carouselSYStable .carouselSYStable-prev,
.carouselSYStable .carouselSYStable-next {
  color: #61b89a;
}

.carouselSYS .carouselSYS-prev:hover,
.carouselSYS .carouselSYS-next:hover,
.carouselSYStable .carouselSYStable-prev:hover,
.carouselSYStable .carouselSYStable-next:hover {
  background-color: #f3972d;
}

.carouselSYS-prev.disabled,
.carouselSYS-next.disabled,
.carouselSYStable-prev.disabled,
.carouselSYStable-next.disabled {
  color: gray !important;
  cursor: default !important;
}

.carouselSYS-prev.disabled:hover,
.carouselSYS-next.disabled:hover,
.carouselSYStable-prev.disabled:hover,
.carouselSYStable-next.disabled:hover {
  background: none;
  color: gray;
}

/* =============================
   CARPETAS
   ============================= */
.carousel-carpeta {
  padding-top: 40px;
}

.carousel-carpeta .carousel-carpeta-container {
  background-color: #fffacd;
  border-radius: 10px;
  border: 2px solid black;
  padding: 24px;
}

.carousel-carpeta .carousel-carpeta-container.blanco {
  background-color: #fff;
}

.carousel-carpeta .carousel-carpeta-tabs {
  position: absolute;
  top: 2px;
  left: 8px;
  width: 100%;
  display: flex;
  z-index: 1;
  justify-content: flex-start;
}

.carousel-carpeta .carousel-carpeta-tab {
  background-color: #d7cfa4 !important;
  border: 2px solid black !important;
  border-radius: 5px 5px 0 0 !important;
  padding: 5px 10px;
  cursor: pointer;
  font-size: 16px;
  color: #313131 !important;
}

.carousel-carpeta .carousel-carpeta-tab:hover {
  background-color: #ffd700 !important;
}

.carousel-carpeta .carousel-carpeta-tab.active {
  background-color: #fffacd !important;
  font-weight: bold;
  border-bottom: none !important;
}

/* =============================
   TABS SYS
   ============================= */
.tablatabSYS .tab-content {
  display: none;
}
.tablatabSYS .tab-content.active {
  display: block;
}

.tablatabSYS .tabhead {
  padding: 10px;
  text-align: center;
}

.tablatabSYS .tabhead a {
  background: transparent;
  color: white;
  border-radius: 10px;
  padding: 10px;
  cursor: pointer;
}

.tablatabSYS .tabhead a.active {
  background-color: rgba(255, 255, 255, 0.2);
}

.tablatabSYS .tabmid {
  padding: 20px;
  margin-top: -2px;
  border-radius: 0 0 10px 10px;
}

.tablatabSYS.azul .tabhead {
  background-color: #0095DB;
}
.tablatabSYS.azul .tabhead a.active {
  background-color: #007ab7;
}
.tablatabSYS.azul .tabmid {
  border: 2px solid #0095DB;
}

.tablatabSYS.roja .tabhead {
  background-color: #e71f24;
}
.tablatabSYS.roja .tabmid {
  border: 2px solid #e71f24;
}

.tablatabSYS.morado .tabhead {
  background-color: #800080;
}
.tablatabSYS.morado .tabhead a.active {
  background-color: #660066;
}
.tablatabSYS.morado .tabmid {
  border: 2px solid #800080;
}

.mtfgreyingout {
  display: none;
}

/* =============================
   Recuadros
   ============================= */
.recuadroSYS {
  background-color: #f0f0f1;
  width: fit-content;
  margin-top: 30px;
  margin-bottom: 16px;
  padding: 30px;
  padding-bottom: 12px;
  border-radius: 12px;
}

.recuadroSYS.rosado {
  background-color: #f7e5eb;
}

/* ========================================
   FEEDBACK — ocultar texto PYE en ítems INFO (Encuestas)
   ======================================== */
.path-mod-feedback .feedback-item-info .felement {
  font-size: 0 !important;
  padding: 0 !important;
  min-height: 0 !important;
}

/* ========================================
   Botones siguiente y anterior página
   ======================================== */
.mod_quiz-prev-nav.btn,
.mod_quiz-next-nav.btn {
  padding: 12px 16px;
  font-size: 1.16rem;
}

/* =============================
   DROPDOWN SYS
   ============================= */
.dropdownSYS {
  width: 100%;
}

.dropdownSYS-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-weight: 600;
  color: white;
  background-color: #61b89a;
  border: none;
  border-radius: 0.75rem;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.15s ease;
}

.dropdownSYS-toggle:hover {
  background-color: #52a88a;
}

.dropdownSYS-toggle:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(97, 184, 154, 0.45);
}

/* Flecha dibujada con ::after para que siempre sea visible (no requiere elemento en HTML) */
.dropdownSYS-toggle::after {
  content: "";
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  margin-left: 0.5rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  color: inherit;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.dropdownSYS-toggle[aria-expanded="true"]::after {
  transform: rotate(-135deg);
}

/* Por si en el HTML se añade un elemento .dropdownSYS-arrow */
.dropdownSYS-arrow {
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  margin-left: 0.5rem;
  flex-shrink: 0;
}

.dropdownSYS-toggle[aria-expanded="true"] .dropdownSYS-arrow {
  transform: rotate(-135deg);
}

.dropdownSYS-content {
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
  border-left: 3px solid #61b89a;
}

/* =============================
   Página de componentes — utilidades
   ============================= */
.componente-block {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #e5e7eb;
}
.componente-block:last-of-type {
  border-bottom: none;
}
.btn-copiar {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  background: #61b89a;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
}
.btn-copiar:hover {
  background: #4fa088;
}
.btn-copiar.copiado {
  background: #22c55e;
}


/* Exclusivas para esta página */
a.btn.btn-primary {
  background-color: #302953;
  color: white;
  padding: 16px;
  border-radius: 12px;
  font-size: 1.14rem;
}
a.btn.btn-primary:hover {
  background-color: #423963;
  color: white;
  text-decoration: none;
}
a.btn.btn-primary:active {
  background-color: #302953;
}
a.btn.btn-primary:focus {
  background-color: #302953;
}
a.btn.btn-primary:disabled {
  background-color: #302953;
}