.user-profile .main-data {
	display: table;
    width: 100%;
}

.user-profile .main-data .bienvenido {
    margin: 10px 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    line-height: 1.4;
    max-width: 100%;
    box-sizing: border-box;
}

.user-profile .data-user {
	float: left;
    width: 70%;
    margin-right: 2%;
    padding: 15px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden; /* Evita que los elementos se salgan */
    box-sizing: border-box; /* Incluye padding en el ancho total */
}

.user-profile .data-centro {
	width: 28%;
    text-align: center;
    float: left;
    padding: 15px;
}

.user-profile .data-timer {
    margin-top: 20px;
    width: 100%;
    text-align: center;
    float: left;
    padding: 0;
}

.user-profile .data-user .name {
    font-weight: bold;
}

.user-profile .logros {
	margin-top: 20px;
}

.user-profile .lista-logros {
	display: table;
    width: 100%;
    list-style: none;
    padding: 0;
    margin: 0;
}

.user-profile .logros .loader {
    min-height: 150px;
    width: 100%;
    position: relative;
}

.user-profile .logro-item {
    width: 100%;
    margin: 10px 0 0px;
    position: relative;
}


.user-profile .logro-item p {
    padding: 0;
    text-align: left;
    font-size: 1em;
}

.user-profile .no-centro-alumno {
    color: #c10000;
    background-color: #ffe0e0;
    padding: 20px;
    z-index: 20;
    position: relative;
    margin: 10px 0 15px;
    border-radius: 5px;
}

.user-profile .logro-item .icon {
    width: 100%;
}

.btn-link-new-center-alumnos {
    font-size: 1.25em;
    font-weight: bolder;
}

.user-profile .logro-item .offset {
    border: 2px solid #b6e5fa;
    border-radius: 10px;
    padding: 10px;
    width: 100%;
    display: table;
    background-color: #e5f7fe;
    box-shadow: 1px 1px 5px #89a5b155;
}

.user-profile .logro-item .offset.cursor:hover {
    border: 2px solid #b6e5fa;
    background-color: #bfebfd;
    cursor: pointer;
}

.user-profile .logro-item .offset {
    cursor: not-allowed;
}

.user-profile .logro-item .offset h5{
    font-weight: bold;
}

.user-profile .logro-item .tick {
    display: block;
    width: 50px;
}

.user-profile .logro-item .notcompleted .tick {
    display: none;
}

.user-profile .logro-item .notcompleted {
    border: 1px dashed #aaa;
    background-color: #eee;
}

.user-profile .logro-item p {
    overflow-y: auto;
    max-height: 75px;
}

.user-profile .logro-item .notcompleted.cursor:hover {
    background-color: rgb(214, 214, 214);
    cursor: pointer;
}

.user-profile .logro-item .notcompleted h5 {
    color: rgb(101, 101, 101);
    font-weight: bold;
}

.user-profile .logro-item .notcompleted p {
    color: #666;
}

/* .user-profile .logro-item .notcompleted img {
    filter: grayscale(100%);
} */

.goto-button {
    display: none;
    border: none;
    padding: 0;
    width: 100%;
    background-color: transparent;
}

.user-profile .logro-item .notcompleted .goto-button {
    display: block;
}

.goto-button:hover,
.goto-button:active,
.goto-button:focus {
    border: none;
    outline:none;
}

.goto-button img {
    filter: inherit !important;
    width: 100%;
}

.user-profile {
	position: relative;
    width: 100%;
    display: table;
    overflow: hidden; /* Evita desbordamientos generales */
}

.user-profile .box-container {
    overflow: hidden; /* Asegura que el contenedor mantenga sus elementos */
    box-sizing: border-box;
}

.user-profile .data-user {
	float: left;
    width: 70%;
    margin-right: 2%;
    padding: 15px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden; /* Evita que los elementos se salgan */
    box-sizing: border-box; /* Incluye padding en el ancho total */
}

.create-new-centro {
    margin: 10px 0 12px;
}

.link-new-centro {
    margin: 0 0 20px;
}

.create-new-centro button,
.link-new-centro button {
    width: 95%;
    padding: 10px 10px;
}

.linked-centers-preview .centro-linked {
    /* display: table; */
    border-radius: 15px;
    border: 1px solid #498DCB43;
    margin: 10px 2px;
    position: relative;
    /* position: relative;
    width: 32%;
    float: left;
    height: 245px; */
}

.linked-centers-preview .gradient-bottom {
    background-image: url(/images/gradient-bottom.png);
    position: absolute;
    width: 97%;
    height: 10px;
    bottom: 0px;
    background-size: 100% 100%;
    z-index: 15;
}

.linked-centers-preview .gradient-top {
    background-image: url(/images/gradient-top.png);
    position: absolute;
    width: 97%;
    height: 10px;
    top: 32px;
    background-size: 100% 100%;
    z-index: 15;
}

/* Puntaje pequeño y discreto */
.linked-centers-preview .centro-linked .puntaje {
    position: absolute;
    background-color: #fff;
    min-width: 32px;
    min-height: 24px;
    top: 2px;
    right: 4px;
    left: auto;
    border-radius: 12px;
    padding: 2px 8px;
    z-index: 20;
    border: 1.5px solid;
    box-shadow: 0px 1px 4px rgba(0,0,0,.3);
    border-color: #5C90D2;
    color: #5C90D2;
    font-size: 0.85em;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1.1;
}

.puntaje-label {
    font-size: 0.7em;
    font-weight: 800;
    line-height: 1;
}

.puntaje-score {
    font-size: 1.1em;
    font-weight: bold;
    line-height: 1;
}

.linked-centers-preview .centro-linked .numero {
    position: absolute;
    background-color: #fff;
    height: 28px;
    top: 3px;
    left: 0px;
    border-radius: 10px;
    padding: 2px 8px;
    z-index: 10;
    border: 2px solid;
    box-shadow: 0px 1px 4px rgba(0,0,0,.3);
    border-color: #5C90D2;
    color: #5C90D2;
    font-size: 0.95em;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Corona solo imagen sin borde */
.linked-centers-preview .centro-linked .corona {
    position: absolute;
    width: 35px;
    top: 0px;
    left: 0px;
    z-index: 20;
    display: none;
}

.linked-centers-preview .centro-linked .primer-puesto {
    border-color: #3255A2;
    color: #3255A2;
}

.linked-centers-preview .centro-linked .primer-puesto .corona-1 {
    display: block;
}

.linked-centers-preview .centro-linked .segundo-puesto {
    border-color: #EE8148;
    color: #EE8148;
}

.linked-centers-preview .centro-linked .segundo-puesto .corona-2 {
    display: block;
}

.linked-centers-preview .centro-linked .tercer-puesto {
    border-color: #14B0AB;
    color: #14B0AB;
}

.linked-centers-preview .centro-linked .tercer-puesto .corona-3 {
    display: block;
}

.linked-centers-preview .centro-linked .nombre {
    margin: 10px auto 0;
    padding: 0 10px;
    font-size: 1em;
    color: #3155A5;
    background-color: #fff;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    max-width: 90%;
    text-align: center;
}

.linked-centers-preview .centro-linked .image-not-found {
    background-color: #ddd;
    width: 100%;
    border-radius: 14px 14px 0 0;
    padding-top: 60%;
    position: relative;
}

.linked-centers-preview .centro-linked .image-not-found img {
    height: 90px;
    margin: -45px -69.6px 0 0;
    /* filter: grayscale(100%); */
    mix-blend-mode: multiply;
    position: absolute;
    top: 50%;
    right: 50%;
}

/* Estilos específicos para imágenes de grupos */
.linked-centers-preview .centro-linked .image-not-found img[src*="6.jpg"] {
    width: 70%;
    height: 80%;
    object-fit: contain;
    margin: 0;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-60%, -50%);
}

.linked-centers-preview .centro-linked .image-found {
    background-color: #ddd;
    border-radius: 14px 14px 0 0;
    padding-top: 60%;
    position: relative;
    background-repeat: no-repeat;
    background-size: cover;
    background-position-y: center;
    background-position-x: center;
}

.linked-centers-preview {
    position: relative;
}

.linked-centers-preview-scroll {
    overflow: auto;
    position: relative;
    max-width: 46rem;
    padding: 0px 10px;
    display: flex;
    padding-right: 20px; /* Padding derecho para que se vea completo el último registro */
}

.linked-centers-preview .centro-linked .locacion {
    font-size: .9em;
    text-align: center;
    margin-top: 8px;
    padding: 0;
    margin-bottom: 8px;
    color: #555;
    background-color: #fff;
}

/* Mejorar el espaciado del contenido de las tarjetas */
.linked-centers-preview .centro-linked a {
    display: block;
    padding-bottom: 10px;
}

.lista-centros-linked {
padding: 0;
    margin: 0 10px;
    border-top: 1px solid #E4E5E6;
}

.lista-centros-linked li {
display: table;
    width: 100%;
    padding: 10px;
}

.lista-centros-linked .centro-linked {
border: 1px solid #E4E5E6;
    border-top: 0;

}

.lista-centros-linked .centro-linked:nth-child(2n) {
background-color: #f0f4f8;
}

.lista-centros-linked .centro-linked p {
    margin: 0px;
    float: left;
    width: 70%;
}

.lista-centros-linked .centro-linked a {
    float: left;
    width: 30%;
    text-align: right;
}

.logout {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.25em;
    font-weight: bolder;
}

.lista-centros-linked .new-link {
text-align: center;
    margin-top: 20px;
}

.lista-centros-linked .new-link-select {
    margin-top: 20px;
    position: relative;
}

.lista-centros-linked .nuevo-centro-field {
float: left;
    width: 60%;
}

.lista-centros-linked .nuevo-centro-field input {
    width: 100%;
}

.lista-centros-linked .button-save-linked-center {
    position: absolute;
    bottom: 10px;
    right: 10px;
}

.new-link-select select {
    width: 100%;
}

.placeholder-image{
    background-image:url('/images/escuela-chica.jpg');
    width:100%;
    height:124px;
    border-radius: 14px 14px 0 0;
    background-size:contain;
    background-repeat: no-repeat;
    background-color: #ddd;
    background-position:center;
}

#ficha-descripcion {
    min-height: 200px;
    min-width: 400px;
    line-height: 18px;
    font-size: 1em;
}

.li-centros ul {
    display: inline-block;
    border: 1px solid #bbb;
    padding: 0;
    min-width: 400px;
}

.li-centros ul li {
    
}

.li-centros ul li label {
    text-align: left;
    margin: 0;
    padding: 8px 10px;
    width: 100%;
    cursor: pointer;
}

.li-centros ul li input {
    margin: -5px 10px 0 0;
}

.li-centros ul li .disabled {
    background-color: #eee;
    cursor: auto;
}

.li-centros ul li .disabled span {
    color: #aaa;
}

.li-centros ul li .disabled img {
    width: 25px;
    margin: -1px 0 0 8px;
}

/* Estilos para modal responsive con scroll */
.modal-body-scrollable {
    max-height: 70vh;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Ajustes responsive para el modal */
@media screen and (max-height: 600px) {
    .modal-body-scrollable {
        max-height: 60vh;
    }
}

@media screen and (max-height: 500px) {
    .modal-body-scrollable {
        max-height: 50vh;
    }
}

/* Media queries unificados y organizados de mayor a menor */
@media screen and (max-width: 1200px) {
    .linked-centers-preview-scroll {
        max-width: 38rem;
    }
}

@media screen and (max-width: 980px) {
    .linked-centers-preview-scroll {
        max-width: 34rem;
    }
}

@media screen and (max-width: 868px) {
    .linked-centers-preview-scroll {
        max-width: 37rem;
    }
    
    .user-profile .logro-item h5 {
        margin-top: 12px;
    }
    
    .user-profile .logro-item .icon, .goto-button img {
        width: 90px;
    }
    
    .user-profile {
        width: 100%;
        display: block;
    }
    
    .user-profile .data-user {
        float: none;
        width: 100%;
        margin-right: 0;
        overflow: hidden;
        box-sizing: border-box;
    }
    
    .user-profile .data-centro {
        width: 100%;
        float: none;
        margin: 15px 0 0;
    }
    
    .user-profile .data-timer {
        width: 100%;
        float: none;
        margin: 15px 0 20px;
    }
    
    /* Asegurar que los elementos internos se acoplen al contenedor */
    .user-profile .main-data {
        width: 100%;
        overflow: hidden;
    }
    
    .linked-centers-preview {
        width: 100%;
        overflow: hidden;
    }
    
    .linked-centers-preview-scroll {
        max-width: 100%;
        width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 0 10px;
        padding-right: 20px; /* Padding derecho para scroll */
    }
    
    /* Asegurar que .bienvenido se vea correctamente */
    .user-profile .main-data .bienvenido {
        width: 100%;
        box-sizing: border-box;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        line-height: 1.4;
        margin: 8px 0;
        padding: 0 5px;
    }
}

@media screen and (max-width: 768px) {
    .modal-dialog.modal-lg {
        margin: 10px;
        max-width: calc(100% - 20px);
    }
    
    .modal-body-scrollable {
        max-height: 65vh;
    }
    
    /* Asegurar que el contenedor principal limite el contenido */
    .user-profile .box-container.data-user {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
        box-sizing: border-box;
        padding: 10px;
        display: block;
    }
    
    .user-profile .main-data {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
        box-sizing: border-box;
        display: block;
    }
    
    .linked-centers-preview-scroll {
        max-width: 100%;
        width: 100%;
        padding: 0 10px;
        padding-right: 25px; /* Padding derecho para scroll en móviles */
        overflow-x: auto;
        overflow-y: hidden;
        flex-wrap: nowrap;
    }
    
    /* Mostrar scrollbar en webkit browsers */
    .linked-centers-preview-scroll::-webkit-scrollbar {
        height: 6px;
    }
    
    .linked-centers-preview-scroll::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 3px;
    }
    
    .linked-centers-preview-scroll::-webkit-scrollbar-thumb {
        background: #c1c1c1;
        border-radius: 3px;
    }
    
    .linked-centers-preview-scroll::-webkit-scrollbar-thumb:hover {
        background: #a8a8a8;
    }
    
    .user-profile .main-data .bienvenido {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        line-height: 1.4;
        margin: 8px 0;
        padding: 0 5px;
        font-size: 0.9em;
        overflow: hidden; /* Evita que el texto se salga */
    }
    
    .linked-centers-preview {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
        margin: 15px 0;
        box-sizing: border-box;
    }
    
    .linked-centers-preview h5 {
        font-size: 1.1em;
        margin-bottom: 15px;
    }
    
    /* Mantener proporciones correctas de las tarjetas */
    .linked-centers-preview .centro-linked {
        min-width: 120px;
        max-width: 150px;
        height: auto;
        min-height: 200px;
        margin: 5px;
        box-sizing: border-box;
        /* Mantener proporciones originales */
        aspect-ratio: 3/4;
        display: flex;
        flex-direction: column;
        /* Evitar que las tarjetas se compriman */
        flex-shrink: 0;
    }
    
    /* Mantener proporciones de imágenes */
    .linked-centers-preview .centro-linked .image-not-found {
        padding-top: 60%; /* Mantener proporción 60% de altura */
        min-height: 120px;
        position: relative;
        border-radius: 14px 14px 0 0;
        background-color: #ddd;
        /* Asegurar que la imagen mantenga su tamaño */
        overflow: hidden;
    }
    
    .linked-centers-preview .centro-linked .image-not-found img {
        height: 90px;
        width: auto;
        margin: 0;
        max-width: 80%;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        object-fit: contain;
        /* Evitar que la imagen se comprima */
        min-width: 60px;
        min-height: 60px;
    }
    
    /* Mantener proporciones para imágenes de grupos */
    .linked-centers-preview .centro-linked .image-not-found img[src*="6.jpg"] {
        width: 70%;
        height: 80%;
        object-fit: contain;
        margin: 0;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        /* Mantener tamaño mínimo */
        min-width: 50px;
        min-height: 50px;
    }
    
    .linked-centers-preview .centro-linked .image-found {
        padding-top: 60%; /* Mantener proporción 60% de altura */
        min-height: 120px;
        background-size: cover;
        background-position: center;
        border-radius: 14px 14px 0 0;
    }
    
    .linked-centers-preview .centro-linked .nombre {
        font-size: 0.85em;
        margin-top: 8px;
        padding: 0 5px;
        line-height: 1.2;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        text-align: center;
        background-color: #fff;
        color: #3155A5;
    }
    
    .linked-centers-preview .centro-linked .locacion {
        font-size: 0.8em;
        margin-top: 5px;
        padding: 0 5px;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        text-align: center;
        background-color: #fff;
        color: #555;
    }
    
    .linked-centers-preview .centro-linked .puntaje {
        min-width: 28px;
        min-height: 20px;
        font-size: 0.75em;
        top: 1px;
        right: 2px;
        position: absolute;
        background-color: #fff;
        border-radius: 12px;
        padding: 2px 6px;
        z-index: 20;
        border: 1.5px solid #5C90D2;
        color: #5C90D2;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }
    
    .linked-centers-preview .centro-linked .numero {
        height: 24px;
        font-size: 0.85em;
        top: 2px;
        left: 2px;
        position: absolute;
        background-color: #fff;
        border-radius: 10px;
        padding: 2px 6px;
        z-index: 10;
        border: 2px solid #5C90D2;
        color: #5C90D2;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .linked-centers-preview .centro-linked .corona {
        width: 30px;
        position: absolute;
        top: 0px;
        left: 0px;
        z-index: 20;
    }
    
    .linked-centers-preview .centro-linked .image-not-found img,
    .linked-centers-preview .centro-linked .image-found {
        width: 60px;
        height: 60px;
    }
    
    .linked-centers-preview .centro-linked .image-found {
        width: 60px;
        height: 60px;
        background-size: cover;
        background-position: center;
    }
}

@media screen and (max-width: 480px) { 
    .linked-centers-preview-scroll {
        max-width: 100%;
        width: 100%;
        padding: 0 5px;
        padding-right: 30px; /* Padding derecho extra para pantallas muy pequeñas */
        overflow-x: auto;
        overflow-y: hidden;
    }
    
    /* Scrollbar para pantallas muy pequeñas */
    .linked-centers-preview-scroll::-webkit-scrollbar {
        height: 4px;
    }
    
    .linked-centers-preview-scroll::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 2px;
    }
    
    .linked-centers-preview-scroll::-webkit-scrollbar-thumb {
        background: #c1c1c1;
        border-radius: 2px;
    }
    
    .user-profile {
        width: 100%;
        display: block;
    }
    
    .data-user h4 {
        margin-right: 40px;
    }
    
    .user-profile .main-data .bienvenido {
        padding: 0;
        width: 100%;
        box-sizing: border-box;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        line-height: 1.3;
        font-size: 0.85em;
        margin: 6px 0;
    }
    
    .user-profile .logro-item {
        width: 100%;
        float: none;
        min-width: 0px;
    }
    
    .user-profile .data-user {
        float: none;
        width: 100%;
        margin-right: 0;
        overflow: hidden;
        box-sizing: border-box;
        padding: 10px;
    }
    
    .user-profile .data-centro {
        width: 100%;
        float: none;
        margin: 15px 0 0;
    }
    
    .lista-centros-linked .button-save-linked-center {
        position: inherit;
        bottom: 0;
        right: 0;
        margin-top: 15px;
    }
    
    .user-profile .logro-item p {
        margin: 0;
    }
    
    .user-profile .logro-item .tick {
        width: 30px;
        left: 35px;
        top: 95px;
    }
    
    #modal-ficha-actividad .dialog-icon .icn {
        width: 40px;
        height: 40px;
        background-size: 100%;
    }
    
    #ficha-descripcion {
        min-width: 100%;
    }
    
    #modal-ficha-actividad .li-centros ul {
        min-width: 100%;
    }
    
    #modal-ficha-actividad .li-centros ul li input {
        margin: -1px 10px 0 0;
        width: auto;
    }
    
    .lista-centros-linked .new-link-select {
        text-align: center;
    }
    
    .lista-centros-linked .nuevo-centro-field {
        float: none;
        width: 100%;
    }
    
    .user-profile .data-timer {
        width: 100%;
        float: none;
        margin: 15px 0 20px;
    }
    
    /* Ajustes adicionales para asegurar que todo se acople */
    .user-profile .main-data {
        width: 100%;
        overflow: hidden;
        display: block;
    }
    
    .linked-centers-preview {
        width: 100%;
        overflow: hidden;
        margin: 10px 0;
    }
    
    .linked-centers-preview-scroll {
        max-width: 100%;
        width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 0 5px;
        padding-right: 30px; /* Padding derecho extra para pantallas muy pequeñas */
        box-sizing: border-box;
    }
    
    /* Asegurar que las tarjetas no se salgan del contenedor */
    .linked-centers-preview .centro-linked {
        min-width: 100px;
        max-width: 130px;
        min-height: 180px;
        margin: 3px;
        box-sizing: border-box;
        /* Mantener proporciones en pantallas muy pequeñas */
        aspect-ratio: 3/4;
        display: flex;
        flex-direction: column;
        /* Evitar que las tarjetas se compriman */
        flex-shrink: 0;
    }
    
    /* Mantener proporciones de imágenes en pantallas muy pequeñas */
    .linked-centers-preview .centro-linked .image-not-found {
        padding-top: 60%;
        min-height: 100px;
    }
    
    .linked-centers-preview .centro-linked .image-not-found img {
        height: 70px;
        margin: 0;
        width: auto;
        max-width: 75%;
    }
    
    .linked-centers-preview .centro-linked .image-found {
        padding-top: 60%;
        min-height: 100px;
    }
    
    /* Ajustes adicionales para pantallas muy pequeñas */
    .linked-centers-preview h5 {
        font-size: 1em;
        margin-bottom: 12px;
    }
    
    .linked-centers-preview .centro-linked .nombre {
        font-size: 0.8em;
        margin-top: 6px;
        padding: 0 3px;
    }
    
    .linked-centers-preview .centro-linked .locacion {
        font-size: 0.75em;
        margin-top: 4px;
        padding: 0 3px;
    }
    
    .linked-centers-preview .centro-linked .puntaje {
        min-width: 24px;
        min-height: 18px;
        font-size: 0.7em;
        padding: 1px 4px;
    }
    
    .linked-centers-preview .centro-linked .numero {
        height: 20px;
        font-size: 0.8em;
        padding: 1px 4px;
    }
    
    .linked-centers-preview .centro-linked .corona {
        width: 25px;
    }
    
    .linked-centers-preview .centro-linked .image-not-found img,
    .linked-centers-preview .centro-linked .image-found {
        width: 50px;
        height: 50px;
    }
}