body {
  font-family: "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #2b2d42;
  background-color: #f4f6f8;
  margin: 0;
  padding: 0;
}

/* ==== CONTENEDORES ==== */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.center-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
}

/* ==== TEXTO FORMATEADO ==== */
.formatted-text {
  font-family: Georgia, serif;
  font-size: 1.1rem;
  line-height: 1.7;
  color: #333;
  padding: 0.5rem;
  white-space: pre-wrap;
}

/* ==== BOTONES ==== */
.btn-primary {
  background-color: #005377;
  border-color: #005377;
  color: #fff;
  transition: all 0.3s ease-in-out;
}

.btn-primary:hover {
  background-color: #004262;
  border-color: #003b57;
  color: #fff;
}

.btn-outline-primary {
  background-color: transparent;
  border: 1px solid #007bff;
  color: #007bff;
  transition: all 0.3s ease-in-out;
}

.btn-outline-primary:hover {
  background-color: #007bff;
  color: #fff;
}

.btn-accent {
  background-color: #ff884b;
  border-color: #ff884b;
  color: #fff;
}

.btn-accent:hover {
  background-color: #e6763e;
  border-color: #d66a36;
}

/* ==== ALERTAS PERSONALIZADAS ==== */
.alert {
  padding: 0.75rem 1.25rem;
  margin-bottom: 1rem;
  border-radius: 4px;
}

.alert-info {
  background-color: #e9f7fd;
  color: #0c5460;
  border: 1px solid #b8daff;
}

.alert-success {
  background-color: #e6f4ea;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert-warning {
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffeeba;
}

.alert-danger {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* ==== LINKS ==== */
a {
  color: #007bff;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ==== ENCABEZADOS ==== */
h1,
h2,
h3,
h4 {
  color: #005377;
  font-family: "Montserrat", sans-serif;
}

/* ==== SCROLL NAV ==== */
.nav-scroller {
  overflow-x: auto;
  white-space: nowrap;
  padding: 0.5rem 0;
}

.btn-check:checked + .btn-outline-primary {
  background-color: #0d6efd;
  color: white;
  border-color: #0d6efd;
}

input[type="radio"].btn-check:checked + .btn-outline-primary {
  background-color: #0d6efd !important;
  color: white !important;
  border-color: #0d6efd !important;
}

/* ==== NEW CLASSES ==== */
.text-balance-container {
  min-width: fit-content;
  max-width: 90%;
  text-wrap: balance;
}

.ai-logo-size {
  width: 90px;
  height: 200px;
}

.max-280 {
  max-width: 280px;
}

.centered-95 {
  max-width: 95%;
  margin: 0 auto;
}

.card-distribucion {
  width: 260px;
  min-height: 120px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.dark-panel {
  width: 80%;
  height: 300px;
  border-radius: 21px 21px 0 0;
}

/* Added CSS from base.html embedded style block and additional styles */
.card-animada {
  opacity: 0;
  transform: scale(0.95);
  animation: fadeInScale 0.5s ease forwards;
}

@keyframes fadeInScale {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.navbar-gradient {
  background: linear-gradient(to right, #ffffff, #6c757d, #212529);
}

.footer-gradient {
  background: linear-gradient(to left, #ffffff, #6c757d, #212529);
}

.footer-gradient,
.footer-gradient h5,
.footer-gradient small,
.footer-gradient a {
  color: white !important;
}

.footer-gradient a:hover {
  color: #f8f9fa !important;
  text-decoration: underline;
}

.section-box {
  background-color: #ffffff;
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.register-disabled-page {
  font-family: "Segoe UI", sans-serif;
  background-color: #f8f9fa;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  text-align: center;
}

.register-disabled-box {
  background-color: white;
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  max-width: 500px;
}

.register-disabled-box h1 {
  font-size: 24px;
  color: #333;
}

.register-disabled-box p {
  color: #555;
  margin-bottom: 20px;
}

.register-disabled-box .btn {
  display: inline-block;
  background-color: #007bff;
  color: white;
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
}

.register-disabled-box .btn:hover {
  background-color: #0056b3;
}

/* New classes for profile.html */
.profile-container {
  background-color: #f8f9fa;
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* ==== PALETA DE COLORES OPOSIPRO ==== */
:root {
  --color-primario: #005377; /* Azul Inteligente */
  --color-secundario: #2e8b57; /* Verde Éxito */
  --color-acento: #ffc857; /* Amarillo Consciente */
  --color-fondo: #f9fafb; /* Gris Muy Claro */
  --color-contraste: #012a4a; /* Azul Marino Suave */
}

.profile-medal {
  width: 10%;
  height: 10%;
}

.profile-image {
  border-radius: 50%;
  border: 2px solid #007bff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  width: 100%;
  height: auto;
}

/* ==== DASHBOARD STYLES MOVED FROM dashboard.html ==== */
.modern-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.modern-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.1);
}

.card-title {
  font-weight: 600;
}

.card-text {
  font-size: 0.95rem;
}

.bg-body-tertiary {
  background-color: #f8f9fa !important;
}

.ribbon-inside {
  position: absolute;
  top: -100%;
  left: 35%;
  transform: translate(-50%, -50%) rotate(-45deg);
  background-color: rgba(220, 53, 69, 0.85);
  color: white;
  padding: 4px 40px;
  font-weight: bold;
  font-size: 0.75rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  animation: pulseRibbon 1.5s infinite ease-in-out;
  pointer-events: none;
  z-index: 1;
}

@keyframes pulseRibbon {
  0% {
    transform: rotate(-45deg) scale(1);
  }
  50% {
    transform: rotate(-45deg) scale(1.05);
  }
  100% {
    transform: rotate(-45deg) scale(1);
  }
}

/* ==== ESTILOS MOVIDOS DESDE BASE.HTML ==== */
input[type="radio"].btn-check:checked + .btn-outline-primary {
  background-color: #0d6efd !important;
  color: white !important;
  border-color: #0d6efd !important;
}

.navbar-gradient {
  background: linear-gradient(to right, #ffffff, #6c757d, #212529);
}

.navbar {
  position: relative;
}

.footer-gradient {
  background: linear-gradient(to left, #ffffff, #6c757d, #212529);
}

.footer-gradient,
.footer-gradient h5,
.footer-gradient small,
.footer-gradient a {
  color: white !important;
}

.footer-gradient a:hover {
  color: #f8f9fa !important;
  text-decoration: underline;
}

.footer-gradient h5 {
  font-weight: 600;
  font-size: 1.1rem;
}
/* ==== ESTILO TRUSTPILOT ==== */
#trustpilot-widget-container {
  margin-top: 40px;
  margin-bottom: 20px;
}

.trustpilot-widget {
  max-width: 500px;
  margin: 0 auto;
}

/* ==== ANIMACIÓN DE ENTRADA FADE-IN ==== */
.fade-in {
  opacity: 0;
  animation: fadeInAnimation 1.2s ease forwards;
}

@keyframes fadeInAnimation {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ==== ANIMACIÓN DE ENTRADA SLIDE-IN-UP ==== */
.slide-in-up {
  opacity: 0;
  transform: translateY(50px);
  animation: slideInUpAnimation 1s ease forwards;
}

@keyframes slideInUpAnimation {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* ==== ANIMACIÓN DE BOTÓN WHATSAPP ==== */
.whatsapp-chat-bounce {
  animation: bounceWhatsapp 2s infinite;
}

@keyframes bounceWhatsapp {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-8px);
  }
  60% {
    transform: translateY(-4px);
  }
}
/* ==== ANIMACIONES DE SCROLL ==== */
.fade-in-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==== EFECTOS HOVER ADICIONALES EN BOTONES ==== */
.btn-primary:hover,
.btn-success:hover,
.btn-warning:hover {
  transform: scale(1.05);
  transition: all 0.3s ease-in-out;
}

/* ==== ESTILO DE BARRA DE PROGRESO ==== */
#nprogress {
  pointer-events: none;
}

#nprogress .bar {
  background: var(--color-primario);
  position: fixed;
  z-index: 9999;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
}

/* ==== ESTILOS LIMPIOS PARA INDEX ==== */
.flex-wrap-center {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

.list-style-none {
  list-style: none;
  padding-left: 0;
}

/* ==== RESPONSIVE CORRECCIÓN FINAL: OCULTAR DECORACIONES ==== */
@media (max-width: 992px) {
  .product-device,
  .product-device-2 {
    display: none !important;
  }
  .product-device svg {
    display: none !important;
  }
}

/* ==== RESPONSIVE MÓVIL (≤767px) ==== */
@media (max-width: 767px) {
  .container,
  .centered-95 {
    padding: 1rem;
  }

  h1,
  h2,
  h3,
  h4 {
    font-size: 1.5rem;
  }

  p,
  .lead {
    font-size: 1rem;
  }

  .row.row-cols-1.row-cols-md-2 {
    display: block;
  }

  .col.text-bg-dark,
  .col.bg-body-tertiary {
    margin-bottom: 2rem;
  }

  .btn {
    width: 100%;
    font-size: 1rem;
    padding: 12px;
  }

  .alert-heading {
    font-size: 1.3rem;
  }

  .card-distribucion {
    width: 90%;
    margin: 0 auto 1rem;
  }
}

/* ==== RIBBON DIAGONAL PARA LA TARJETA DE SUSCRIPCIÓN ==== */
.ribbon-diagonal {
  position: absolute;
  top: 35px;
  left: -45px;
  transform: rotate(-45deg);
  background-color: var(--color-primario);
  color: white;
  padding: 6px 50px;
  font-size: 0.8rem;
  font-weight: bold;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  pointer-events: none;
  z-index: 10;
  border-radius: 4px;
  animation: ribbonPulse 3s infinite ease-in-out;
}

/* Animación para hacer latir ligeramente la cinta */
@keyframes ribbonPulse {
  0%,
  100% {
    transform: rotate(-45deg) scale(1);
  }
  50% {
    transform: rotate(-45deg) scale(1.05);
  }
}
/* ==== ESTILO PARA CONTADOR DE DÍAS RESTANTES EN PRUEBA ==== */
.counter-dias-restantes {
  font-size: 2rem;
  font-weight: bold;
  color: var(--color-secundario);
  animation: pulseDays 2s infinite;
}

@keyframes pulseDays {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

/* ==== ESTILO PARA CONTADOR URGENTE CUANDO QUEDAN 3 DÍAS O MENOS ==== */
.contador-urgente {
  color: var(--color-acento);
  animation: blinkUrgent 1s infinite;
}

@keyframes blinkUrgent {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.card-promocional {
  max-width: 720px;
  margin: 2rem auto;
  animation: fadeInSlideUp 1s ease-in-out forwards;
  opacity: 0;
  transform: translateY(20px);
}

.card-promocional-visitante {
  background: linear-gradient(135deg, #e3e3e3, #ffffff);
  border-left: 5px solid var(--color-primario);
  border-radius: 1rem;
}

@keyframes fadeInSlideUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==== MENÚ HAMBURGUESA PERSONALIZADO ==== */
@media (max-width: 575px) {
  .navbar .navbar-nav {
    display: none;
  }

  .custom-hamburger {
    display: block;
    position: fixed;
    top: 15px;
    right: 15px;
    z-index: 1050;
    background-color: var(--color-primario);
    color: white;
    border: none;
    padding: 10px 12px;
    border-radius: 5px;
    font-size: 1.25rem;
  }

  .custom-mobile-menu {
    display: none;
    position: fixed;
    top: 60px;
    right: 15px;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1049;
    width: 200px;
    padding: 1rem;
  }

  .custom-mobile-menu.show {
    display: block;
  }

  .custom-mobile-menu a {
    display: block;
    margin-bottom: 10px;
    color: var(--color-primario);
    font-weight: 500;
    text-decoration: none;
  }

  .custom-mobile-menu a:hover {
    text-decoration: underline;
  }
}

@media (min-width: 576px) {
  #customMobileMenu {
    display: none !important;
  }
}

@media (max-width: 575px) {
  .card.shadow-sm.p-4.mb-4 {
    margin-left: 10px !important;
    margin-right: 10px !important;
  }
}

@media (max-width: 575px) {
  .d-flex.justify-content-center.mb-3 {
    margin-left: 10px;
    margin-right: 10px;
  }
}

@media (max-width: 575px) {
  #groupContainer > .card.shadow-sm.p-4.mb-4 {
    margin-left: 10px !important;
    margin-right: 10px !important;
  }
}
@media (max-width: 575px) {
  #groupContainer .group-card {
    margin-left: 10px !important;
    margin-right: 10px !important;
  }
}
@media (max-width: 575px) {
  #fieldOptions {
    flex-direction: column !important;
    align-items: center;
  }

  #fieldOptions .field-card {
    margin: 0.5rem 0 !important;
    width: 90%;
  }
}

@media (max-width: 575px) {
  #nivelContainer > .card.shadow-sm.p-4.mb-4 {
    margin-left: 10px !important;
    margin-right: 10px !important;
  }

  #nivelOptions {
    flex-direction: column !important;
    align-items: center;
  }

  #nivelOptions .nivel-card {
    margin: 0.5rem 0 !important;
    width: 90%;
  }
}
@media (max-width: 575px) {
  .row.justify-content-center.mt-4.mb-3 {
    flex-wrap: nowrap;
    padding: 0 10px;
  }

  #clearSearch {
    width: 33.33% !important;
    margin-right: 10px;
  }

  #searchAskTitleGroup {
    width: 66.66% !important;
  }
}

@media (max-width: 575px) {
  .table {
    margin-left: 10px;
    margin-right: 10px;
  }
}
/* ==== hasta aquí bien ==== */

@media (max-width: 575px) {
  #paginationControls {
    margin-left: 10px;
    margin-right: 10px;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center;
    gap: 0.5rem;
  }

  #paginationControls button {
    padding: 0.5rem 0.75rem;
    font-size: 0;
  }

  #paginationControls button#firstPage::before {
    content: "⏮";
    font-size: 1.25rem;
  }

  #paginationControls button#prevPage::before {
    content: "◀";
    font-size: 1.25rem;
  }

  #paginationControls button#nextPage::before {
    content: "▶";
    font-size: 1.25rem;
  }

  #paginationControls button#lastPage::before {
    content: "⏭";
    font-size: 1.25rem;
  }

  #paginationControls #pageInfo {
    display: none;
  }

  .d-flex.flex-column.flex-md-wrap.align-items-center.justify-content-center
    > .col-md-5.mb-3 {
    width: calc(100% - 20px) !important;
    margin-left: 10px !important;
    margin-right: 10px !important;
  }

  .mt-4.d-flex.justify-content-center.gap-3.flex-wrap.align-items-center {
    flex-wrap: nowrap !important;
    margin-left: 10px;
    margin-right: 10px;
    gap: 0.5rem;
  }

  .mt-4.d-flex.justify-content-center.gap-3.flex-wrap.align-items-center
    button[name="anterior"] {
    font-size: 0;
    padding: 0.5rem 0.75rem;
  }
  .mt-4.d-flex.justify-content-center.gap-3.flex-wrap.align-items-center
    button[name="anterior"]::before {
    content: "⬅️";
    font-size: 1.25rem;
  }

  .mt-4.d-flex.justify-content-center.gap-3.flex-wrap.align-items-center
    button[name="siguiente"]::before {
    content: "➡️";
    font-size: 1.25rem;
  }

  .mt-4.d-flex.justify-content-center.gap-3.flex-wrap.align-items-center
    button[name="pause"]::before {
    content: "⏸️";
    font-size: 1.25rem;
  }
}

@media (max-width: 770px) {
  td {
    text-align: center !important;
    padding: 0.5rem;
  }

  td > form,
  td > a.btn {
    display: block;
    width: calc(100% - 20px);
    min-width: 40px;
    padding: 0 !important;
    margin: 0.25rem 10px;
    text-align: center !important;
    justify-content: center;
    align-items: center;
  }

  td > form .btn,
  td > a.btn {
    width: 100%;
    padding: 0.4rem 0 !important;
    font-size: 0 !important;
    border-radius: 0.375rem;
  }

  td > form .btn.btn-danger::before {
    content: "🗑️";
    font-size: 1.2rem;
    display: inline-block;
  }

  td > a.btn.btn-warning::before {
    content: "⏯️";
    font-size: 1.2rem;
    display: inline-block;
  }
}

@media (max-width: 575px) {
  #respuesta-y-evaluacion .btn-group.d-flex.mt-2 {
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
  }

  #respuesta-y-evaluacion .btn-group.d-flex.mt-2 .btn {
    flex: 1 1 calc(33.333% - 1rem);
    min-width: 100px;
    font-size: 0.85rem;
    padding: 0.5rem;
  }

  #respuesta-y-evaluacion + #mostrar-btn,
  #respuesta-y-evaluacion + #mostrar-btn + a {
    display: inline-block;
    width: 48%;
    margin: 0.5rem 1%;
    text-align: center;
    vertical-align: middle;
  }

  #respuesta-y-evaluacion + #mostrar-btn {
    text-align: center;
  }

  #respuesta-y-evaluacion + #mostrar-btn + a {
    text-align: center;
  }
}

@media (max-width: 575px) {
  .position-absolute.top-0.start-0.translate-middle.badge.bg-primary {
    left: 50% !important;
    transform: translateX(-50%) !important;
  }
}

/* ==== CONTAINER-FLUID UNIVERSAL MARGINS ==== */
.container-fluid {
  margin-left: 10px;
  margin-right: 10px;
}

/* ==== NIVEL CARD ==== */
.nivel-card {
  border: 2px solid #dee2e6;
}

.learning-cards-container {
  max-width: 1200px;
  margin: 2rem auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  padding: 1rem;
}

.learning-card {
  background-color: rgba(255, 255, 255, 0.281);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  text-align: center;
  padding: 0.8rem 0.75rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
}

.learning-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.learning-card h3 {
  font-size: 1rem;
  color: var(--color-primario);
  font-family: "Montserrat", sans-serif;
  margin-bottom: 1rem;
}

/* ==== Ajuste de imagen en la tarjeta de aprendizaje ==== */
.learning-card img {
  width: 100%;
  height: auto;
  max-height: 200px; /* Altura máxima, puedes ajustar esta medida */
  object-fit: contain;
  display: block;
  margin: 0 auto;
  border-radius: 0 0 12px 12px;
}

.learning-motivation {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 2rem;
  color: #000;
  font-family: "Montserrat", sans-serif;
}

/* Nueva regla para 2 tarjetas por fila en pantallas <=1200px */
@media (max-width: 1200px) {
  .learning-cards-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 575px) {
  .learning-cards-container {
    grid-template-columns: 1fr !important;
    gap: 1rem;
    padding: 0.5rem;
  }

  .learning-card {
    padding: 1rem 0.75rem;
  }

  .learning-card h3 {
    font-size: 1.1rem;
  }

  .learning-motivation {
    font-size: 1.25rem;
  }
}

.background-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.4);
  z-index: 0;
  pointer-events: none;
}

.main-content-wrapper {
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 1rem;
  backdrop-filter: blur(4px);
}

.row .col,
.row .col .bg-body-tertiary,
.row .col .bg-dark {
  background-color: rgba(255, 255, 255, 0.2) !important;
}

/* ==== BADGE DE NIVEL PARA PREGUNTAS TEST ==== */
.badge-nivel {
  display: inline-block;
  vertical-align: middle;
  font-size: 0.95em;
  font-weight: 600;
  border-radius: 0.7em;
  padding: 0.23em 0.85em;
  margin-left: 0.2em;
  margin-right: 0.2em;
  line-height: 1;
  letter-spacing: 0.01em;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  border: 1px solid transparent;
}

.badge-nivel-facil {
  color: #0c5228;
  background: #e7fae9;
  border-color: #b4e5bb;
}

.badge-nivel-intermedio {
  color: #295068;
  background: #e8f3fa;
  border-color: #b1d3e5;
}

.badge-nivel-avanzado {
  color: #856404;
  background: #fff8e1;
  border-color: #ffe4a1;
}

.badge-nivel-superior {
  color: #633963;
  background: #f3e8fa;
  border-color: #d3b1e5;
}

.feedback-elegante {
  background-color: #f5f8fc;
  border-left: 5px solid #0d6efd;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  color: #333;
  line-height: 1.6;
  padding: 16px;
  margin-bottom: 20px;
}
