.flashcards-repaso {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2em;
  position: relative;   /* ✅ Crea contexto de apilamiento */
  z-index: 1;            /* ✅ Evita que se superponga sobre elementos como la rueda */
}

/* 🔲 Tarjeta envolvente */
.flashcard-item {
  width: 100%;
  max-width: 600px;
  cursor: pointer;
  margin-bottom: 3em;    /* ✅ Más espacio para evitar solapamiento */
  padding-bottom: 1em;
  position: relative;    /* ✅ Permite que el min-height tenga efecto */
  min-height: 200px;     /* ✅ Forzamos altura visible en el flujo */
}

/* 🧱 Contenedor que permite altura real */
.flashcard-wrapper {
  perspective: 1000px;
  position: relative;
  min-height: 1px;       /* ✅ Evita colapso */
  height: auto;          /* ✅ Permite expansión */
}

/* 🔄 Contenedor interno que gira */
.flashcard-inner {
  position: relative;
  width: 100%;
  transform-style: preserve-3d;
  transition: transform 0.6s ease;
}

/* 🔁 Activación del giro */
.flashcard-item.mostrando-respuesta .flashcard-inner {
  transform: rotateY(180deg);
}

/* 🧩 Cara frontal y trasera */
.flashcard-face {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  backface-visibility: hidden;
  padding: 1.5em;
  border: 1px solid #ccc;
  border-radius: 30px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  box-sizing: border-box;
  overflow-wrap: break-word;
  min-height: 180px;     /* ✅ Altura mínima para evitar colapso */
}

/* Borde naranja solo para la cara frontal */
.flashcard-face:not(.flashcard-back) {
  border: 30px solid #f97316; /* Naranja Opositadatos */
}

/* Marca de agua con la O del logo */

.flashcard-face:not(.flashcard-back) {
  background: #fff url('https://opositadatos.es/wp-content/uploads/2025/11/Marca-de-agua-de-la-O-del-logo-5.png') center center no-repeat;
  background-size: 30%;
  opacity: 1;
}

/* 🔙 Cara trasera */
.flashcard-back {
  transform: rotateY(180deg);
}

/* 🧠 Contenedor de botones */
.flashcard-buttons {
  margin-top: 1em;
  display: flex;
  justify-content: center;
  gap: 1em;
}

/* 🧠 Cada bloque botón + icono */
.flashcard-buttons .boton-con-icono {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* 😃 Icono encima del botón */
.flashcard-buttons .boton-con-icono .icono {
  font-size: 1.5em;
  margin-bottom: 0.3em;
}

/* 🧠 Botón */
.flashcard-buttons button {
  padding: 0.5em 1em;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1em;
  font-weight: bold;
  text-align: center;
}

/* 🎨 Colores por score */
.flashcard-buttons button[data-score="5"] {
  background: #4CAF50;
  color: white;
}

.flashcard-buttons button[data-score="3"] {
  background: #FFC107;
  color: black;
}

.flashcard-buttons button[data-score="1"] {
  background: #F44336;
  color: white;
}

/* ✨ Botón activo */
.flashcard-btn-activo {
  outline: 2px solid black;
  box-shadow: 0 0 5px rgba(0,0,0,0.3);
}

/* ============================
   🎓 RESUMEN FINAL DE SESIÓN
   ============================ */

.resumen-sesion {
  max-width: 600px;
  margin: 40px auto;
  padding: 20px;
  border: 1px solid #ddd;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  font-family: sans-serif;
  background-color: #fff;
}

.resumen-sesion h2 {
  text-align: center;
  color: #2c3e50;
  font-size: 1.6em;
  margin-bottom: 1em;
}

.resumen-sesion canvas {
  display: block;
  margin: 30px auto;
  max-width: 100%;
  height: auto;
}

.resumen-sesion ul {
  list-style: none;
  padding: 0;
  margin: 20px 0;
  text-align: center;
  font-size: 1em;
}

.resumen-sesion ul li {
  margin-bottom: 8px;
}

.resumen-sesion p {
  text-align: center;
  font-size: 0.95em;
  color: #555;
  margin-bottom: 1em;
}

.resumen-sesion .proxima-fecha {
  margin-top: 30px;
  padding: 14px;
  background-color: #eef6ff;
  text-align: center;
}

.resumen-sesion .proxima-fecha span {
  font-size: 1.4em;
}

.resumen-sesion .proxima-fecha strong {
  font-size: 1.15em;
  font-weight: 600;
  color: #2c3e50;
}

.resumen-sesion .proxima-fecha strong span {
  color: #2980b9;
}

/* 📱 Adaptación móvil */
@media screen and (max-width: 480px) {
  .resumen-sesion {
    padding: 16px;
    margin: 20px auto;
  }

  .resumen-sesion h2 {
    font-size: 1.4em;
  }

  .resumen-sesion ul {
    font-size: 0.95em;
  }

  .resumen-sesion .proxima-fecha {
    padding: 12px;
  }

  .resumen-sesion .proxima-fecha span {
    font-size: 1.3em;
  }

  .resumen-sesion .proxima-fecha strong {
    font-size: 1.05em;
  }
}


/* ============================
   📘 RESUMEN DEL PLAN ACTIVO
   ============================ */

.flashcards-resumen {
  max-width: 600px;
  margin: 40px auto;
  font-family: sans-serif;
}

.flashcards-resumen section {
  background: #f9f9f9;
  border-left: 4px solid #0073aa;
  padding: 16px;
  margin-bottom: 20px;
  border-radius: 8px;
}

.flashcards-resumen .objetivo-hoy {
  border-left-color: #00a32a;
}

.flashcards-resumen h4 {
  margin-top: 0;
  font-size: 1.2em;
  color: #2c3e50;
}

.flashcards-resumen ul {
  list-style: none;
  padding-left: 0;
  margin: 12px 0 0;
}

.flashcards-resumen li {
  margin-bottom: 6px;
  font-size: 1em;
}

/* ===============================================
   EFECTO DE VOLTEO PARA LA O DEL LOGO EN LA HOME
   =============================================== */

.wp-image-158 {
  display: inline-block;
  transition: transform 0.6s ease-in-out;
  transform-style: preserve-3d;
  backface-visibility: hidden;
}

.wp-image-158.flip {
  animation: flipTwice 1.2s ease-in-out forwards;
}

@keyframes flipTwice {
  0% { transform: rotateY(0deg); }
  50% { transform: rotateY(180deg); }
  100% { transform: rotateY(0deg); }
}


/* ===============================================
   PERSONALIZACIÓN MENSAJES FORMULARIO DE REGISTRO
   =============================================== */

.od-register-errors {
  background: #ffe6e6;
  border: 1px solid #cc0000;
  padding: 1em;
  margin-bottom: 1em;
  color: #990000;
  border-radius: 4px;
}

.od-register-success {
  background: #e6ffea;
  border: 1px solid #00aa55;
  padding: 1em;
  margin-bottom: 1em;
  color: #006633;
  border-radius: 4px;
}

/* ====================================================
   CENTRAR BOTONES ACCEDER Y REGISTRO DE LOS SHORTCODES
   ==================================================== */


/* Centrar botón del formulario de acceso */
p.login-submit {
  text-align: center;
}

p.login-submit input[type="submit"] {
  display: inline-block;
}


/* Centrar botón del formulario de registro */
.od-register-form input[type="submit"] {
  display: block;
  margin: 0 auto;
}

/* ====================================================
   PANEL DE PROGRESO Y CONTADOR
   ==================================================== */

.flashcard-progreso {
  width: 100%;
  max-width: 600px;
  height: 12px;
  background-color: #eee;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 6px;
}

.flashcard-barra {
  height: 100%;
  background-color: #4CAF50;
  transition: width 0.3s ease;
}

.flashcard-contador {
  display: flex;
  gap: 12px;
  justify-content: center;
  font-weight: 500;
  color: #444;
  font-size: 1rem;
  margin-bottom: 12px;
}

/* ===============================================
   PANEL DE PLANES Y FICHAS DE LAS CATEGORÍAS
   =============================================== */

.panel-planes {
  padding: 2rem 1rem;
}

.panel-planes h3 {
  font-size: 1.6rem;
  margin-bottom: 1.5rem;
  color: #ffffff;
  text-align: center;
}

.panel-planes .fichas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

/* Estilo base de cada ficha */
.ficha-plan {
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  padding: 1.5rem;
  transition: transform 0.2s ease;
  border-left: 6px solid #ff7f00;
}

.ficha-plan:hover {
  transform: translateY(-4px);
}

.ficha-plan h4 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: #1a1a1a;
}

.ficha-plan p {
  margin: 0.3rem 0;
  font-size: 0.95rem;
  color: #333;
}

.ficha-plan strong {
  color: #000;
}

/* Botones */
.acciones-plan {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.acciones-plan a.btn {
  padding: 0.5rem 1rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background-color 0.2s ease;
}

.btn-repasar {
  background-color: #007bff;
  color: #fff;
}

.btn-reconfigurar {
  background-color: #ff7f00;
  color: #fff;
}

.btn-configurar {
  background-color: #28a745;
  color: #fff;
}

.btn-comprar {
  background-color: #dc3545;
  color: #fff;
}

/* Colores por estado */
.ficha-al_dia {
  border-left-color: #28a745;
}

.ficha-pendiente {
  border-left-color: #007bff;
}

.ficha-retraso {
  border-left-color: #dc3545;
}

.ficha-no_configurado {
  border-left-color: #ffc107;
}

.panel-planes h3 {
  font-size: 1.6rem;
  margin-bottom: 1.5rem;
  color: #1a1a1a; /* blanco para fondo oscuro */
  text-align: left;
}
