/* === SISTEMA DE FORMATOS LA PATRIA - CÓDIGO LIMPIADO === */

/* Reseteo específico para componentes propios */
.lapatria-carousel-nav,
.lapatria-nav-carousel,
.lapatria-content-area {
    /* font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; */
    box-sizing: border-box;
}

/* Ajustes básicos para el post */
.single-post #middle {
    margin-top: 70px !important;
}

.lapatria-post-article {
    margin: 0 !important;
    padding: 0 !important;
}

/* Contenido Superior */
.superior-content {
    padding: 0;
    margin-bottom: 20px;
}


.post-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin: 0;
    font-size: 14px;
    color: #666;
}

.post-featured-image {
    margin: 0;
    text-align: center;
}

.post-featured-image .featured-img {
    max-width: 100%;
    height: auto;
}

.image-caption {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
    font-style: italic;
    text-align: center;
}

.post-excerpt {
    background: #f8f9fa;
    padding: 0 15px;
    border-left: 4px solid #1d9bf0;
    margin: 15px 0;
    font-style: italic;
}

/* Navegación Carrusel - Posicionamiento controlado por CSS */
.lapatria-carousel-nav {
    position: sticky !important;
    z-index: 1000 !important;
    background: rgba(0, 0, 0, 0.10) !important;
    backdrop-filter: blur(10px) !important;
    border-bottom: 1px solid #333 !important;
    transition: none !important;
    width: 100% !important;
    /* margin-bottom: 20px !important; */
    will-change: position, transform !important;
}

/* Estado sticky - Cambia a fixed y se posiciona donde debe */
.lapatria-carousel-nav.lapatria-sticky {
    position: fixed !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    transition: none !important;
}

@media (max-width: 480px) {
    .lapatria-carousel-nav {
        top: 45px !important; /* Punto donde se ancla en móvil */
    }
    
    .lapatria-carousel-nav.lapatria-sticky {
        top: 45px !important;
    }
}

/* Anchos responsive según breakpoints del header - Más detallado */
@media screen and (min-width: 1441px) {
    .lapatria-carousel-nav.lapatria-sticky {
        width: 1400px !important;
    }
    
    .lapatria-carousel-nav.lapatria-sticky .lapatria-nav-carousel {
        max-width: 1400px !important;
        padding: 7px 20px !important;
    }
}

@media screen and (min-width: 1041px) and (max-width: 1440px) {
    .lapatria-carousel-nav.lapatria-sticky {
        width: 1040px !important;
    }
    
    .lapatria-carousel-nav.lapatria-sticky .lapatria-nav-carousel {
        max-width: 1000px !important;
        padding: 7px 20px !important;
    }
}

@media screen and (min-width: 769px) and (max-width: 1040px) {
    .lapatria-carousel-nav.lapatria-sticky {
        width: calc(100vw - 40px) !important;
        left: 0 !important;
        transform: none !important;
        padding: 0 20px !important;
    }
    
    .lapatria-carousel-nav.lapatria-sticky .lapatria-nav-carousel {
        max-width: 100% !important;
        padding: 7px 0 !important;
    }
}

@media screen and (min-width: 1441px) {
    .cabecera-lapatria.sticky ~ #middle .lapatria-carousel-nav.lapatria-sticky {
        top: 88px !important;
    }
}

@media screen and (min-width: 1041px) and (max-width: 1440px) {
    .cabecera-lapatria.sticky ~ #middle .lapatria-carousel-nav.lapatria-sticky {
        top: 88px !important;
    }
}

@media screen and (min-width: 769px) and (max-width: 1040px) {
    .cabecera-lapatria.sticky ~ #middle .lapatria-carousel-nav.lapatria-sticky {
        top: 88px !important;
    }
}

@media (max-width: 768px) {
    #middle {
        margin-top: 50px !important;
    }
    
    .lapatria-carousel-nav.lapatria-sticky {
        top: 44px !important;
        width: calc(100vw - 20px) !important;
        left: 0 !important;
        transform: none !important;
        padding: 0 10px !important;
    }
}

@media (max-width: 480px) {
    .single-post #middle {
        margin-top: 48px !important;
    }
   
    .lapatria-carousel-nav.lapatria-sticky {
        top: 44px !important;
        width: calc(100vw - 16px) !important;
        padding: 0 8px !important;
    }
}

/* Carrusel interior - CORRECCIÓN PARA PREVENIR DESPLAZAMIENTO */
.lapatria-nav-carousel {
    display: flex !important;
    overflow-x: auto !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    padding: 8px 20px !important;
    gap: 8px !important;
    margin: 0 auto !important;
    /* IMPORTANTE: Prevenir que el scroll del carrusel afecte el layout padre */
    scroll-behavior: auto !important;
}

.lapatria-nav-carousel::-webkit-scrollbar {
    display: none !important;
}

/* Botones de navegación */
.lapatria-nav-carousel .nav-tab {
    flex-shrink: 0 !important;
    padding: 0 15px !important;
    height: 35px;
    border-radius: 5px !important;
    background: #3e4345 !important;
    border: 1px solid #333 !important;
    color: #8899a6 !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    white-space: nowrap !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    text-decoration: none !important;
    outline: none !important;
}

.lapatria-nav-carousel .nav-tab:hover {
    background: #1a1a1a !important;
    border-color: #555 !important;
}

.lapatria-nav-carousel .nav-tab.active {
    background: #1d9bf0 !important;
    border-color: #1d9bf0 !important;
    color: #fff !important;
}

/* Área de contenido - CORRECCIÓN PARA MÓVIL */
.lapatria-content-area {
    overflow-x: hidden !important; /* IMPORTANTE: Prevenir scroll horizontal */
    width: 100% !important;
}

/* Contenidos de formato - PREVENIR DESBORDAMIENTO */
.lapatria-content-area .format-content {
    display: none !important;
    animation: lapatriaFadeIn 0.3s ease !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    word-wrap: break-word !important;
    box-sizing: border-box !important;
}

.lapatria-content-area .format-content.active {
    display: block !important;
}

@keyframes lapatriaFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Estilos específicos por formato - CORRECCIÓN PARA MÓVIL */
/*.lapatria-en-facilito {
    background: #f6953d !important;
    color: #000 !important;

    display: grid !important;
    gap: 15px !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
}*/

.lapatria-en-facilito {
    background: #f6953d !important;
    border-radius: 10px !important;
    padding: 20px !important;
    margin: 20px 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    column-count: 2;
    column-gap: 20px;
    text-align: justify;
    line-height: 1.4;
    column-fill: balance;
    orphans: 3;
    widows: 3;
}


.lapatria-en-facilito h2 {
    color: #000 !important;
    font-size: 1.8rem !important;
    word-wrap: break-word !important;
}

/* A partir de 768px, dos columnas */
@media (max-width: 768px) {
  .lapatria-en-facilito {
    column-count: 1;
    /* grid-template-columns: 1fr 1fr; */
  }
}



.lapatria-nota-completa {
    background: #fdfdfd !important;
    color: #3e4345 !important;
    padding: 24px !important;
    border-radius: 10px !important;
    border: 1px solid #333 !important;
    margin: 20px 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
}

@media (min-width: 1040px){
    .lapatria-nota-completa {
        column-count: 2;
        column-gap: 20px;
        column-rule: 1px solid #ccc;
        line-height: 1.4;
        column-fill: balance;
        orphans: 3;
        widows: 3;
    }

    .lapatria-nota-completa h2, 
    .lapatria-nota-completa h3 {
        break-inside: avoid;
        break-after: avoid;
        margin-top: 15px;
        margin-bottom: 8px;
    }

    /* Título principal - QUITAR break-after: column 
    .lapatria-nota-completa h2 {
        column-span: all;
        text-align: center;
        margin-bottom: 15px;
        padding-bottom: 10px;
        border-bottom: 2px solid #333;
    }*/

    /* Asegurar alineación del contenido después del h2 */
    .lapatria-nota-completa h2 + p {
        margin-top: 0 !important;
        line-height: 1.4;
    }
}





.lapatria-nota-completa h2 {
    color: #3e4345 !important;
    margin-bottom: 15px !important;
    font-size: 1.8rem !important;
    word-wrap: break-word !important;
}

.lapatria-info-punto {
    background: #375e97 !important;
    padding: 10px !important;
    border-radius: 10px !important;
    border: 2px solid #444 !important;
    margin: 20px 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
}

@media (min-width: 1040px){
    .lapatria-info-punto {
        column-count: 2;
        column-gap: 20px;
        line-height: 1.4;
        column-fill: balance;
        orphans: 3;
        widows: 3;
    }
}

.lapatria-info-punto h2,
.lapatria-info-punto h3 {
    color: white !important;
    margin-bottom: 15px !important;
    font-size: 1.8rem !important;
    word-wrap: break-word !important;
}

.lapatria-ampliacion {
    background: #fdfdfd !important;
    color: #3e4345 !important;
    padding: 24px !important;
    border-radius: 10px !important;
    border: 1px solid #333 !important;
    margin: 20px 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
}

.lapatria-ampliacion h2 {
    color: #3e4345 !important;
    margin-bottom: 15px !important;
    font-size: 1.8rem !important;
    word-wrap: break-word !important;
}

@media (min-width: 1040px){
    .lapatria-ampliacion {
        column-count: 2;
        column-gap: 20px;
        column-rule: 1px solid #ccc;
        text-align: justify;
        line-height: 1.4;
        column-fill: balance;
        orphans: 3;
        widows: 3;
    }

    .lapatria-ampliacion h2, 
    .lapatria-ampliacion h3 {
        break-inside: avoid;
        break-after: avoid;
        margin-top: 15px;
        margin-bottom: 8px;
    }

    /* Asegurar alineación del contenido después del h2 */
    .lapatria-ampliacion h2 + p {
        margin-top: 0 !important;
        line-height: 1.4;
    }
}


.lapatria-lenguas {
    background: #fdfdfd !important;
    color: #3e4345 !important;
    padding: 24px !important;
    border-radius: 10px !important;
    border: 1px solid #333 !important;
    margin: 20px 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
}

.lapatria-lenguas h2 {
    color: #3e4345 !important;
    margin-bottom: 15px !important;
    font-size: 1.8rem !important;
    word-wrap: break-word !important;
}

.boton-idiomas {
    font-family: Helvetica, 'Nimbus Sans L', sans-serif;
    cursor: pointer; 
    padding: 5px 10px;
    border: #3498db 1px solid;
    border-radius: 5px;
    text-align: center;
    display: inline-block;
}

.boton-idiomas:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
    color: #fff;
    background-color: #3498db;
    text-decoration: none;
}

.boton-idiomas-seleccionado {
    font-family: Helvetica, 'Nimbus Sans L', sans-serif;
    background-color: #333;
    color: #ffffff;
    cursor: pointer; 
    padding: 5px 10px;
    border: #333 1px solid;
    border-radius: 5px;
    text-align: center;
    display: inline-block;
}

.lapatria-mas-alla {
    color: #3e4345 !important;
    padding: 24px !important;
    border-radius: 10px !important;
    border: 1px solid #333 !important;
    margin-top: 20px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
}

.lapatria-mas-alla h2 {
    color: #3e4345 !important;
    margin-bottom: 15px !important;
    font-size: 1.8rem !important;
    word-wrap: break-word !important;
}

@media (min-width: 1040px){
    .lapatria-mas-alla {
        column-count: 2;
        column-gap: 20px;
        column-rule: 1px solid #ccc;
        text-align: justify;
        line-height: 1.4;
        column-fill: balance;
        orphans: 3;
        widows: 3;
    }

    .lapatria-mas-alla h2, 
    .lapatria-mas-alla h3 {
        break-inside: avoid;
        break-after: avoid;
        margin-top: 15px;
        margin-bottom: 8px;
    }

    /* Asegurar alineación del contenido después del h2 */
    .lapatria-mas-alla h2 + p {
        margin-top: 0 !important;
        line-height: 1.4;
    }
}







.lapatria-narrada {
    background: linear-gradient(180deg, #f6953d, #f6953d) !important;
    color: #000 !important;
    padding: 15px !important;
    border-radius: 10px !important;
    margin: 20px 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
}

.lapatria-narrada h2 {
    color: #000 !important;
    margin-bottom: 15px !important;
    font-size: 1.8rem !important;
    word-wrap: break-word !important;
}

.lapatria-desafio {
    background-color: #f0f2f5;
}

.lapatria-desafio-inner {
    background: #375e97 !important;
    padding: 20px !important;
    border-radius: 10px !important;
    border: 2px solid #444 !important;
    margin: 20px 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
    display: grid !important;
    gap: 15px !important;
}

.lapatria-desafio-inner h2 {
    margin-bottom: 15px !important;
    font-size: 1.8rem !important;
    word-wrap: break-word !important;
}

.lapatria-desafio-inner p {
    word-wrap: break-word !important;
}

.lapatria-desafio-inner  {
  grid-column: 1 / -1; /* Ocupa todo el ancho */
}

/* A partir de 768px, dos columnas */
@media (min-width: 840px) {
  .lapatria-desafio-inner {
    grid-template-columns: 1fr 1fr;
  }
}


/* Asegurar que TODOS los elementos de texto respeten el ancho */
.lapatria-content-area * {
    box-sizing: border-box !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
}

/* Contenedores de contenido previo y posterior */
.lapatria-contenido-previo {
    background: #f8f9fa !important;
    padding: 20px !important;
    margin-bottom: 20px !important;
    border-left: 4px solid #1d9bf0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
}

.lapatria-contenido-posterior {
    background: #f0f2f5 !important;
    padding: 20px !important;
    margin-bottom: 20px !important;
    border-left: 4px solid #28a745 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
}

/* Contenido Inferior */
.inferior-content {
    padding: 0 !important;
    background: #e8e8e8 !important;
    border-top: 2px solid #ccc !important;
}

/* Footer del post */

.post-tags h4 {
    margin: 0;
}

.post-tags a {
    color: #1d9bf0 !important;
    text-decoration: none !important;
    margin-right: 5px !important;
}

.post-categories a:hover,
.post-tags a:hover {
    text-decoration: underline !important;
}

/* Espaciador del carrusel - Siempre presente */
.lapatria-carousel-spacer {
    height: 0 !important;
    width: 100% !important;
    background: transparent !important;
    pointer-events: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    /* transition: height 0.1s ease !important; */
    overflow: hidden !important;
}

/* Cuando el carrusel está sticky, el espaciador toma su altura */
.lapatria-carousel-spacer.active {
    height: 60px !important; /* Altura aproximada del carrusel */
}

@media (max-width: 768px) {
    .lapatria-carousel-spacer.active {
        height: 60px !important;
    }
}

@media (max-width: 480px) {
    .lapatria-carousel-spacer.active {
        height: 60px !important;
    }
}

/* Responsive para elementos internos - MEJORADO PARA MÓVIL */
@media (max-width: 768px) {
    .post-categories,
    .post-tags {
        padding: 15px !important;
    }
    
    .lapatria-nav-carousel {
        padding: 7px 10px !important;
        gap: 6px !important;
    }
    
    .lapatria-nav-carousel .nav-tab {
        font-size: 16px !important;
    }
    
}

@media (max-width: 480px) {
    .post-categories,
    .post-tags {
        padding: 10px !important;
    }

    .lapatria-nav-carousel {
        padding: 7px 8px !important;
        gap: 4px !important;
    }
    
    .lapatria-nav-carousel .nav-tab {
        padding: 0 15px !important;
        font-size: 14px !important;
    }
    
    /* Asegurar que en móviles pequeños NO haya desbordamiento */
    body {
        overflow-x: hidden !important;
    }
    
    /* Forzar que todos los elementos de formato respeten el ancho */
    .lapatria-en-facilito *,
    .lapatria-nota-completa *,
    .lapatria-info-punto *,
    .lapatria-ampliacion *,
    .lapatria-mas-alla *,
    .lapatria-narrada *,
    .lapatria-retos * {
        max-width: 100% !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        box-sizing: border-box !important;
    }
}

/* CORRECCIÓN ESPECÍFICA PARA EVITAR SCROLL HORIZONTAL EN MÓVIL */
@media (max-width: 768px) {
    /* Prevenir cualquier desbordamiento horizontal */
    html, body {
        overflow-x: hidden !important;
        max-width: 100% !important;
    }
    
    /* Asegurar que el contenedor principal no cause problemas */
    .lapatria-post-article {
        overflow-x: hidden !important;
        max-width: 100% !important;
    }
    
    /* Forzar que todos los elementos de formato respeten el ancho */
    .lapatria-en-facilito *,
    .lapatria-nota-completa *,
    .lapatria-info-punto *,
    .lapatria-ampliacion *,
    .lapatria-mas-alla *,
    .lapatria-narrada *,
    .lapatria-retos * {
        max-width: 100% !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        box-sizing: border-box !important;
    }
    
    /* Corregir elementos específicos que pueden causar overflow */
    .lapatria-content-area img,
    .lapatria-content-area iframe,
    .lapatria-content-area video,
    .lapatria-content-area audio {
        max-width: 100% !important;
        height: auto !important;
        box-sizing: border-box !important;
    }
    
    /* Tablas responsive */
    .lapatria-content-area table {
        width: 100% !important;
        table-layout: fixed !important;
        word-wrap: break-word !important;
    }
    
    .lapatria-content-area td,
    .lapatria-content-area th {
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }
}

/* Override de estilos del tema padre que puedan interferir */
.lapatria-content-area * {
    box-sizing: border-box !important;
}

.lapatria-content-area p {
    margin: 1em 0;
    line-height: 1.6;
}

.lapatria-content-area h2 {
    font-weight: bold !important;
    line-height: 1.5 !important;
}





/* ****************** CARDS *********************** */

.cardLP-desafios { 
    background: #f9f9f9 !important;
    padding: 15px;
    margin: 0;
    border-radius: 8px;
    /* box-shadow: 0 2px 5px rgba(0,0,0,0.5); */
    margin-bottom: 20px;
    break-inside: avoid;
}

.cardLP-audio { 
    background: #f9f9f9;
    color: #1a1a1a;
    padding: 15px;
    margin: 0;
    border-radius: 6px;
    margin-bottom: 20px;
    break-inside: avoid;
}

@media (min-width: 1040px){
    .cardLP-audio {
        column-count: 2;
        column-gap: 20px;
        column-rule: 1px solid #ccc;
        line-height: 1.4;
        column-fill: balance;
        orphans: 3;
        widows: 3;
    }
}

.cardLP-fijo { 
    background: #f9f9f9;
    color: #1a1a1a;
    padding: 15px;
    margin: 0;
    border-radius: 6px;
    /* box-shadow: 0 2px 5px rgba(0,0,0,0.5); */
    margin-bottom: 20px;
    break-inside: avoid;
}

.cardLP-fijo h2 {
    color: #375e97 !important;
    line-height: 1.3em;
    font-size: 1.4rem !important;
}

.cardLP-fijo h3,
.cardLP-fijo h4 {
    color: #375e97 !important;
    line-height: 1.3em;
    font-size: 1.2rem !important;
}

.cardLP-fijo td,
.cardLP-fijo th{
    color: #375e97 !important;
    font-size: 0.8rem;
    line-height: 1.3rem;
}

/* Nuevo enfoque: Grid layout para flip */
.cardLP {
    cursor: pointer;
    perspective: 1000px;
    border-radius: 6px;
}

.cardLP-inner {
    display: grid;
    grid-template-areas: "content";
    transition: transform 0.6s;
    transform-style: preserve-3d;
    box-shadow: -2px 2px 2px rgba(0,0,0,0.5);
    margin: 15px 0;
}

.cardLP.flipped .cardLP-inner {
    transform: rotateY(180deg);
}

.cardLP-front, .cardLP-back {
    grid-area: content;
    background: #f9f9f9;
    padding: 15px;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    border-radius: 4px;
        break-inside: avoid;
}

.cardLP-front {
    z-index: 2;
    text-align: center;
    justify-content: center;
    align-items: center;
}

.cardLP-front:before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  border-width: 0 20px 20px 0;
  border-style: solid;
  display: block;
  width: 0;
  border-color: #dfdfdf #f6953d;
  /* -webkit-box-shadow: 0 1px 1px rgba(0,0,0,0.3), -1px 1px 1px rgba(0,0,0,0.2); */
  /* -moz-box-shadow: 0 1px 1px rgba(0,0,0,0.3), -1px 1px 1px rgba(0,0,0,0.2); */
  box-shadow: 0 1px 1px rgba(0,0,0,0.2), -1px 1px 2px rgba(0,0,0,0.1);
}

.cardLP-back:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  border-width: 20px 20px 0 0  ;
  border-style: solid;
  display: block;
  width: 0;
  border-color: #f6953d rgb(255, 255, 255, 0.1%);
}

.cardLP-back {
    transform: rotateY(180deg);
    justify-content: space-between;
}

.cardLP-front h3 {
    font-size: 1.5em;
    margin: 0;
}

.cardLP-back p {
    margin: 0 !important;
    padding-bottom: 0 !important;
    line-height: 1.4;
    flex-grow: 1;
}

.cardLP-back button {
    background: #375e97;
    margin: 5px;
    padding: 5px 10px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1em;
    color: #fff;
    font-weight: bold;
    transition: opacity 0.3s ease;
}

.cardLP-back button:hover {
    opacity: 0.8;
}

.cardLP-back img {
    width: 100%; /* Asegúrate de que la imagen ocupe todo el ancho de la tarjeta */
    height: auto; /* Mantiene la proporción de la imagen */
    border-radius: 10px; /* Asegura que la imagen tenga bordes redondeados */
}
.cardLP-back a {
    display: block; /* Asegura que el enlace ocupe todo el ancho */
    margin: 0; /* Espacio entre la imagen y el enlace */
    text-align: center; /* Centra el texto del enlace */
    text-decoration: none; /* Quita el subrayado del enlace */
}

/* FIX ESPECÍFICO PARA FIREFOX */
@-moz-document url-prefix() {
    .cardLP-front, .cardLP-back {
        -moz-backface-visibility: hidden;
        -moz-transform-style: preserve-3d;
    }
    
    .cardLP-inner {
        -moz-transform-style: preserve-3d;
    }
}

.texto-blanco {
    font-family:Arial,sans-serif;
    color: #fff !important;
}

.texto-azul {
    font-family:Arial,sans-serif;
    color: #1a3362 !important;
}




.audio-player-container {
    width:100%;
    max-width:400px;
    margin:0;
    background:#000;
    border-radius:8px;
    padding:20px;
    box-shadow:0 4px 15px rgba(0,0,0,0.2);
    font-family:Arial,sans-serif;
}

.audio-title {
    text-align:center;
    font-size:16px;
    line-height: 1.3 !important;
    font-weight:bold;
    margin-bottom:15px;
    color:#ecf0f1;
}

.audio-controls {
    display:flex;
    align-items:center;
    justify-content:center;
    gap:15px;
    margin-bottom:20px;
}

.play-btn {
    border:none;
    width:30px;
    height:30px;
    cursor:pointer;
    display:none;
    align-items:center;
    justify-content:center;
    -webkit-tap-highlight-color:transparent;
    opacity:0;
    transform:scale(0.8);
    padding: 0; /* Eliminar cualquier padding */
}

.play-btn .btn-icon {
    font-size: 30px !important;
    line-height: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
    font-family: Arial, sans-serif !important;
    font-weight: normal !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Estados del botón con mejor centrado */
.play-btn.pausado .btn-icon::before,
.play-btn:not(.pausado):not(.activo) .btn-icon::before {
    content: "▶️";
    display: block;
    text-align: center;
    margin: 0; /* Ajuste fino para el triángulo */
}

.play-btn.activo .btn-icon::before {
    content: "⏸️";
    display: block;
    text-align: center;
    margin: 0; /* Sin ajuste para pausa */
}
/* Animación de aparición del botón */
.play-btn[style*="flex"] {
    animation: fadeInButton 0.3s ease forwards;
}

@keyframes fadeInButton {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.play-btn .btn-icon:hover {
    transform:scale(1.1);
}

.play-btn:disabled {
    background:#7f8c8d;
    cursor:not-allowed;
    transform:none;
    opacity:0.5;
}

.volume-control {
    display:flex;
    align-items:center;
    gap:8px;
}

.volume-slider {
    width:120px;
    height:4px;
    background:#34495e;
    border-radius:2px;
    outline:none;
    -webkit-appearance:none;
    appearance:none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance:none;
    appearance:none;
    width:16px;
    height:16px;
    background:#1d9bf0;
    border-radius:50%;
    cursor:pointer;
}

.volume-slider::-moz-range-thumb {
    width:16px;
    height:16px;
    background:#e74c3c;
    border-radius:50%;
    border:none;
    cursor:pointer;
}

.progress-container {
    margin-top: 10px;
}

.progress-bar {
    width:100%;
    height:6px;
    background:#34495e;
    border-radius:3px;
    overflow:hidden;
    cursor:pointer;
}

.progress-fill {
    height:100%;
    background:linear-gradient(90deg,#e74c3c,#ffd966);
    width:0%;
    transition:width 0.1s ease;
}

.time-display {
    display:flex;
    justify-content:space-between;
    font-size:12px;
    color:#bdc3c7;
    margin-top:8px;
}

.url-input-container {
    margin-bottom:20px;
}

.url-input {
    width:100%;
    padding:10px;
    border:1px solid #34495e;
    border-radius:4px;
    background:#34495e;
    color:white;
    font-size:14px;
    box-sizing:border-box;
}

.url-input::placeholder {
    color:#95a5a6
}

.load-btn {
    background:#3498db;
    color:white;
    border:none;
    padding:10px 20px;
    border-radius:4px;
    cursor:pointer;
    font-size:14px;
    margin-top:10px;
    width:100%;
    transition:background 0.3s ease;
}

.load-btn:hover {
    background:#2980b9
}

.error-message {
    background:#e74c3c;
    color:white;
    padding:10px;
    border-radius:4px;
    margin-top:10px;
    font-size:14px;
    display:none;
}

.loading {
    text-align:center;
    color:#3498db;
    font-size:14px;
    display:none;
}

.success-message {
    background:#27ae60;
    color:white;
    padding:10px;
    border-radius:4px;
    margin-top:10px;
    font-size:14px;
    display:none;
}

.stop-btn {
    border:none;
    width:30px;
    height:30px;
    cursor:pointer;
    display:none;
    align-items:center;
    justify-content:center;
    -webkit-tap-highlight-color:transparent;
    opacity:0;
    padding: 0;
}

.stop-btn .stop-icon {
    font-size: 30px !important;
    line-height: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
    font-family: Arial, sans-serif !important;
    font-weight: normal !important;
    margin: 0 !important;
    padding: 0 !important;
}

.stop-btn[style*="flex"] {
    animation: fadeInButton 0.5s ease forwards;
}

.stop-btn .stop-icon:hover {
    background:#000;
    transform:scale(1.1);
}

.stop-btn:disabled {
    background:#7f8c8d;
    cursor:not-allowed;
    transform:none;
    opacity:0.5;
}

@media(max-width:768px) {
    .audio-player-container {
        margin:0;
        padding:15px;
    }
    
    .audio-controls {
        gap:20px;
    }
    
    .play-btn {
        width:22px;
        height:22px;
    }
    
    .play-btn .btn-icon {
        font-size: 22px !important;
    }

    .volume-slider {
        width:100px;
    }
}



/* **************** JUEGOS ***************** */


/* Comunes */
.game-card {
    font-family: Arial, sans-serif !important;
    padding: 0;
    overflow: hidden;
    width:100%;
}
.game-title {
    color: #333;
    font-size: 1.5rem;
    margin-bottom: 15px;
    display: flex !important;
    align-items: center;
    gap: 10px;
}
.game-icon {
    font-size: 2rem;
}
.game-description {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
}
.result-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
    width:100% !important;
}

.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}
.boton-juegos-btn {
    background: #74b9ff;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 0.85rem;
    cursor: pointer;
    margin: 3px;
    transition: all 0.2s ease;
}
.boton-juegos-btn:hover {
    color: white;
    background: #0984e3;
    transform: translateY(-1px);
}

.instructions {
    background: #e8f4f8;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: clamp(0.85rem, 2vw, 1rem);
    border-left: 4px solid #3498db;
}


/* Trivia y opciones - Mejorado para textos largos */
.trivia-question {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    margin: 20px 0;
    border-left: 4px solid #4ecdc4;
    line-height: 1.6;
    font-size: clamp(1rem, 2.5vw, 1.1rem);
}

.trivia-question strong {
    display: block;
    margin-bottom: 10px;
    color: #2c3e50;
}

.trivia-options {
    display: grid;
    gap: 12px;
}

.trivia-option {
    background: #97cbff;
    color:#2c3e50;
    border: none;
    width: 100%;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    line-height: 1.5;
    font-size: clamp(0.9rem, 2vw, 1rem);
    word-wrap: break-word;
    hyphens: auto;
}

.trivia-option:hover:not(:disabled) {
    background: #dee2e6;
    transform: translateX(5px);
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.trivia-option:disabled {
    cursor: default;
}

.trivia-option.correct {
    background: #d4edda !important;
    border: 2px solid #28a745 !important;
    color: #155724 !important;
    font-weight: bold !important;
}

.trivia-option.incorrect {
    background: #f8d7da !important;
    border: 2px solid #dc3545 !important;
    color: #721c24 !important;
}

/* Responsive para textos largos */
@media (max-width: 768px) {
    .trivia-question {
        padding: 20px 15px;
    }
    
    .trivia-option {
        padding: 15px;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .trivia-question {
        padding: 15px;
        font-size: 0.95rem;
    }
    
    .trivia-option {
        padding: 12px;
        font-size: 0.9rem;
        line-height: 1.4;
    }
}





/* Memory Game */
.memory-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.memory-card {
    aspect-ratio: 1;
    background: #6c5ce7;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem !important;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.memory-card.flipped {
    background: #00cec9;
}

.memory-card.matched {
    background: #00b894;
    cursor: default;
}

.click-counter {
    text-align: center;
    margin-bottom: 15px;
    font-size: 1rem;
    font-weight: bold;
    color: #2c3e50;
    background: #ecf0f1;
    padding: 10px;
    border-radius: 8px;
}

.click-counter #click-count {
    color: #e74c3c;
}

.click-counter #estimated-score {
    color: #27ae60;
}




/* Mini Sudoku */
.sudoku-grid {
    display: grid !important;
    grid-template-columns: repeat(6, 1fr) !important;
    gap: 3px !important;
    background: #2c3e50 !important;
    padding: 8px !important;
    border-radius: 5px !important;
    margin: 20px auto !important;
    max-width: 320px !important;
    border: 3px solid #2c3e50 !important;
}

.sudoku-cell {
    width: 44px !important;
    height: 44px !important;
    border: none !important;
    text-align: center !important;
    font-size: 1rem !important;
    font-weight: bold !important;
    border-radius: 3px !important;
    transition: all 0.2s ease !important;
}

/* Colores de fondo para cada región 2x3 */
.sudoku-cell.region-0 { background: #fff2c3 !important; } /* Amarillo muy suave - Superior izq */
.sudoku-cell.region-1 { background: #ceeaff !important; } /* Azul muy suave - Superior der */
.sudoku-cell.region-2 { background: #e4c4ff !important; } /* Celeste muy suave - Media izq */
.sudoku-cell.region-3 { background: #ffd8b8 !important; } /* Naranja muy suave - Media der */
.sudoku-cell.region-4 { background: #c5ffc5 !important; } /* Verde muy suave - Inferior izq */
.sudoku-cell.region-5 { background: #ffc2d6 !important; } /* Rosa muy suave - Inferior der */

/* Ocultar spinners/steppers de input number */
.sudoku-cell::-webkit-outer-spin-button,
.sudoku-cell::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 0 0 -4px !important;
}

.sudoku-cell[type=number] {
    -moz-appearance: textfield !important;
}

.sudoku-cell.valid {
    border-color: #4caf50 !important;
}

.sudoku-cell.invalid {
    border-color: #f44336 !important;
    animation: shake 0.3s ease-in-out !important;
}

@keyframes shake {
    0%, 100% { transform: translateX(0) !important; }
    25% { transform: translateX(-2px) !important; }
    75% { transform: translateX(2px) !important; }
}

.sudoku-cell:focus {
    outline: 2px solid #3498db !important;
    background: #fff !important;
    box-shadow: 0 0 10px rgba(52, 152, 219, 0.3) !important;
}

.sudoku-cell.prefilled {
    font-weight: bold !important;
    color: #2c3e50 !important;
}

.sudoku-cell:hover:not([readonly]) {
    background: #fff !important;
    transform: scale(1.05) !important;
}

@media (max-width: 480px) {
    .sudoku-grid {
        max-width: 300px !important;
        height:auto !important;
    }
    
    .sudoku-cell {
        width: 38px !important;
        height: 38px !important;
        font-size: 1rem !important;
    }
}






/* Math Game Styles */
.math-game {
    text-align: center !important;
}

.math-question {
    background: #f8f9fa !important;
    padding: 25px !important;
    border-radius: 10px !important;
    margin-bottom: 20px !important;
    font-size: 1.8rem !important;
    font-weight: bold !important;
    color: #333 !important;
    min-height: 80px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.math-question:hover {
    background: #e9ecef !important;
}

.math-question.clickable {
    background: #e8f4f8 !important;
    border: 2px dashed #3498db !important;
}

.math-input-container {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 10px !important;
    margin: 20px 0 !important;
}

.math-input-container input {
    flex: 1 !important;
    max-width: 200px !important;
    height: 55px !important;
    font-size: 1.4rem !important;
    font-weight: bold !important;
    text-align: center !important;
    border: 3px solid #3498db !important;
    border-radius: 12px !important;
    padding: 0 15px !important;
    background: #f8f9ff !important;
}

/* Ocultar flechas en inputs tipo number */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none !important;
  margin: 0 !important;
}

input[type=number] {
  -moz-appearance: textfield !important; /* Firefox */
}

.math-input-container input:focus {
    outline: none !important;
    border-color: #e74c3c !important;
    background: white !important;
    box-shadow: 0 0 10px rgba(231, 76, 60, 0.3) !important;
}

.math-input-container input::placeholder {
    font-size: 1.1rem !important;
    color: #7f8c8d !important;
}

.enter-btn {
    width: 55px !important;
    height: 55px !important;
    background: #27ae60 !important;
    color: white !important;
    border: none !important;
    border-radius: 12px !important;
    font-size: 1.5rem !important;
    font-weight: bold !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.enter-btn:hover {
    background: #219a52 !important;
    transform: scale(1.05) !important;
}

.enter-btn:disabled {
    background: #bdc3c7 !important;
    cursor: not-allowed !important;
    transform: none !important;
}

.math-stats {
    display: flex !important;
    justify-content: center !important;
    gap: 15px !important;
    margin: 20px 0 !important;
    font-size: 0.95rem !important;
    flex-wrap: wrap !important;
}

.math-stats span {
    background: #ecf0f1 !important;
    padding: 10px 15px !important;
    border-radius: 20px !important;
    font-weight: 500 !important;
}

/* Responsive para móviles */
@media (max-width: 480px) {
    .math-stats {
        flex-direction: column !important;
        gap: 8px !important;
    }
}










/* ******************* PARA JUEGOS DE LECTURA *********************** */
        .score-display {
            text-align: center;
            margin-bottom: 15px;
            font-size: clamp(1rem, 2.5vw, 1.2rem);
            font-weight: bold;
            color: white;
            background: #3498db;
            padding: 5px 10px;
            border-radius: 8px;
        }

        .timer-display {
            text-align: center;
            margin-bottom: 10px;
            font-size: clamp(0.9rem, 2vw, 1rem);
            color: #666;
            padding: 0;
        }




        /* JUEGO 1: CHRONOS */
        .chronos-list {
            list-style: none !important;
            margin-bottom: 20px;
        }

        .chronos-item {
            background: #ecf0f1 !important;
            padding: 5px 15px !important;
            margin: 10px 0 !important;
            border-radius: 8px !important;
            cursor: pointer !important;
            border: 2px solid transparent !important;
            transition: all 0.3s ease !important;
            user-select: none !important;
            font-size: clamp(0.9rem, 2vw, 1rem) !important;
            line-height: 1.4 !important;
        }

        .chronos-item:hover {
            background: #d5dbdb !important;
        }

        .chronos-item.selected {
            border-color: #3498db !important;
            background: #e8f4f8 !important;
        }

        .chronos-item.correct {
            border-color: #27ae60 !important;
            background: #d5f4e6 !important;
        }

        .chronos-item.incorrect {
            border-color: #e74c3c !important;
            background: #fadbd8 !important;
        }


        /* JUEGO 2: DETECTIVE */
        .data-question {
            background: #ecf0f1;
            padding: 5px 15px;
            border-radius: 10px;
            margin-bottom: 15px;
            font-size: clamp(0.9rem, 2vw, 1.1rem);
            line-height: 1.4;
            text-align: left;
        }

        .data-input {
            display: inline-block;
            padding: 10px 12px;
            border: 2px solid #3498db;
            border-radius: 5px;
            margin: 5px 0;
            width: 100%;
            text-align: center;
            font-weight: bold;
            font-size: 16px;
        }

        /* JUEGO 3: CAUSA Y EFECTO */
        .cause-effect-container {
            display: flex;
            flex-direction: column;
            gap: 20px;
            margin-bottom: 20px;
        }

        .causes, .effects {
            flex: 1;
        }

        .causes h4, .effects h4 {
            color: #2c3e50;
            margin-bottom: 10px;
            font-size: clamp(1rem, 2.5vw, 1.1rem);
        }

        .cause-item, .effect-item {
            background: #ecf0f1;
            padding: 5px 15px;
            margin: 10px 0;
            border-radius: 8px;
            cursor: pointer;
            border: 2px solid transparent;
            transition: all 0.3s ease;
            font-size: clamp(0.85rem, 2vw, 0.9rem);
            line-height: 1.4;
        }

        .cause-item:hover, .effect-item:hover {
            background: #d5dbdb;
        }

        .cause-item.selected {
            border-color: #e67e22;
            background: #fdebd0;
        }

        .effect-item.matched {
            border-color: #27ae60;
            background: #d5f4e6;
        }

        .cause-item.matched {
            border-color: #27ae60;
            background: #d5f4e6;
        }

        /* JUEGO 4: QUIÉN DIJO QUÉ */
        .quotes-container {
            margin-bottom: 20px;
        }

        .quote-item {
            background: #f8f9fa;
            padding: 5px 15px;
            margin: 10px 0;
            border-left: 4px solid #3498db;
            border-radius: 5px;
            font-style: italic;
            cursor: pointer;
            transition: all 0.3s ease;
            font-size: clamp(0.85rem, 2vw, 0.95rem);
            line-height: 1.4;
        }

        .quote-item:hover {
            background: #e8f4f8;
        }

        .quote-item.selected {
            background: #e8f4f8;
            border-left-color: #e67e22;
        }

        .quote-item.assigned {
            background: #d5f4e6;
            border-left-color: #27ae60;
        }

        .people-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
            gap: 10px;
        }

        .person-item {
            background: #ecf0f1;
            padding: 5px 15px;
            text-align: center;
            border-radius: 8px;
            cursor: pointer;
            border: 2px solid transparent;
            transition: all 0.3s ease;
            font-size: clamp(0.8rem, 2vw, 0.9rem);
            line-height: 1.3;
        }

        .person-item:hover {
            background: #d5dbdb;
        }

        .person-item.assigned {
            border-color: #27ae60;
            background: #d5f4e6;
        }

        /* JUEGO 5: CONTEXTO */
        .context-questions {
            margin-bottom: 15px;
        }

        .context-question {
            background:#b4d8fc;
            padding: 10px;
            border-radius: 10px;
            margin-bottom: 15px;
        }

        .context-question h4 {
            color: #2c3e50;
            margin-bottom: 15px;
            font-size: clamp(1rem, 2.5vw, 1.1rem);
            line-height: 1.3;
        }

        .context-options {
            display: grid;
            gap: 10px;
        }

        .context-option {
            background: #ecf0f1;
            padding: 5px 15px;
            border-radius: 8px;
            cursor: pointer;
            border: 2px solid transparent;
            transition: all 0.3s ease;
            font-size: clamp(0.85rem, 2vw, 0.95rem);
            line-height: 1.4;
        }

        .context-option:hover {
            background: #d5dbdb;
        }

        .context-option.selected {
            border-color: #3498db;
            background: #e8f4f8;
        }

        .context-option.correct {
            border-color: #27ae60;
            background: #d5f4e6;
        }

        .context-option.incorrect {
            border-color: #e74c3c;
            background: #fadbd8;
        }

        /* JUEGO 7: FACT VS OPINION */
        .fact-detector-controls {
            display: flex;
            gap: 10px;
            justify-content: center;
            margin-bottom: 20px;
            flex-wrap: wrap;
        }

        .classification-btn {
            padding: 0 15px;
            border: none;
            border-radius: 5px;
            font-size: clamp(0.9rem, 2vw, 1rem);
            font-weight: bold;
            cursor: pointer;
            transition: all 0.3s ease;
            min-width: 120px;
        }

        .fact-btn {
            background: #3498db;
            color: white;
        }

        .opinion-btn {
            background: #e67e22;
            color: white;
        }

        .statements-container {
            margin-bottom: 20px;
        }

        .statement-item {
            background: #f8f9fa !important;
            padding: 5px 15px !important;
            margin: 10px 0 !important;
            border-radius: 8px !important;
            cursor: pointer !important;
            border: 2px solid transparent !important;
            transition: all 0.3s ease !important;
            font-size: clamp(0.85rem, 2vw, 0.95rem) !important;
            line-height: 1.4 !important;
        }

        .statement-item:hover {
            background: #e8f4f8 !important;
        }

        .statement-item.selected {
            background: #e8f4f8 !important;
        }

        .statement-item.fact {
            border-color: #3498db !important;
            background: #e8f4f8 !important;
        }

        .statement-item.opinion {
            border-color: #e67e22 !important;
            background: #fdebd0 !important;
        }

        .statement-item.correcto {
            border-color:#219a52 !important;
        }

        .statement-item.equivocado {
            border-color:#dc3545 !important;
        }

        /* RESPONSIVE ADICIONAL */
        @media (min-width: 769px) {
            .cause-effect-container {
                flex-direction: row;
            }
            .fact-detector-controls {
                justify-content: center;
            }
        }

        @media (max-width: 480px) {            
            .classification-btn {
                min-width: 100px;
                padding: 12px 15px;
            }
        }


.cmsmasters_items_loader {
    border: 1px solid #7e7e7e !important;
    border-radius: 10px !important;
    padding: 0 16px !important;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin: 0 0 25px 0;
    display: inline-block;
    text-transform: none;
    letter-spacing: 0.2px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}