/* =========================================
   VISTA DE PERFIL DE USUARIO (perfil.css)
========================================== */

.perfil-cabecera-nueva {
    margin-bottom: 2rem;
    position: relative;
}

.perfil-banner {
    width: 100%;
    height: 210px;
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.5);
}

.perfil-info-flex {
    display: flex;
    align-items: flex-start;
    padding: 0 2rem 1.5rem 2rem;
    gap: 2rem;
    position: relative;
    margin-top: -80px;
}

.perfil-avatar-solapado {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    border: 5px solid #0d0d0d;
    object-fit: cover;
    background-color: #222;
    flex-shrink: 0;
}

.perfil-detalles {
    display: flex;
    flex-direction: column;
    padding-top: 88px;
    padding-bottom: 10px;
}

.perfil-nombre {
    font-size: 2rem;
    color: white;
    margin: 0 0 2px 0;
    line-height: 1;
}

.perfil-usuario {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.perfil-bio {
    color: #ccc;
    font-size: 0.95rem;
    margin: 0 0 15px 0;
    max-width: 600px;
}

/* --- BOTONES Y STATS --- */
.perfil-acciones-inline {
    display: flex;
    align-items: center;
    gap: 25px;
}

.btn-seguir-morado {
    background-color: var(--color-acento-purpura, #8a2be2);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 25px;
    font-weight: bold;
    font-size: 0.95rem;
    cursor: pointer;
    transition: transform 0.2s, filter 0.2s;
    display: inline-flex;
    align-items: center;
}

.btn-seguir-morado:hover { 
    filter: brightness(1.2); 
    transform: scale(1.05);
}

.perfil-stats-inline {
    display: flex;
    gap: 20px;
    color: #888;
    font-size: 1rem;
}

.perfil-stats-inline strong { 
    color: white; 
    font-size: 1.1rem;
    margin-right: 5px; 
}

/* --- VITRINA DE MEDALLAS --- */
.vitrina-medallas {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding: 10px 0;
    scrollbar-width: none; /* Firefox */
}
.vitrina-medallas::-webkit-scrollbar { display: none; }

.medalla-item {
    width: 85px;
    height: 85px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1e1e1e, #2a2a35);
    border: 2px solid var(--color-acento-purpura, #8a2be2);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    cursor: pointer;
    transition: transform 0.2s;
}
.medalla-item:hover { transform: translateY(-5px); }
.medalla-item span { font-size: 0.7rem; color: white; font-weight: bold; text-align: center; }

/* --- CARRUSEL GENERAL (Botones y envoltura) --- */
.carrusel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.btn-carrusel {
    background-color: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    transition: background 0.2s;
    z-index: 2;
    flex-shrink: 0;
}
.btn-carrusel:hover { background-color: var(--color-acento-purpura, #8a2be2); }
.btn-izq { margin-right: 10px; }
.btn-der { margin-left: 10px; }

/* --- RESPONSIVO MÓVIL --- */
@media (max-width: 768px) {
    .perfil-info-flex {
        flex-direction: column;
        align-items: center;
        text-align: center;
        margin-top: -80px;
        padding: 0 20px 1rem;
    }
    .perfil-detalles {
        padding-top: 0;
    }
    .perfil-acciones-inline {
        flex-direction: column;
        justify-content: center;
        gap: 15px;
    }
    .perfil-bio { margin: 0 auto 15px auto; }
}

@media (max-width: 520px) {
    .perfil-banner {
        height: 160px;
        border-radius: 12px;
    }

    .perfil-info-flex {
        margin-top: -55px;
        gap: 1rem;
        padding: 0 12px 12px;
    }

    .perfil-avatar-solapado {
        width: 110px;
        height: 110px;
        border-width: 4px;
    }

    .perfil-nombre {
        font-size: 1.5rem;
    }

    .perfil-stats-inline {
        gap: 12px;
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* =========================================
   CAPA DE PROTECCION PERFIL (override final)
========================================== */
.page-perfil .contenedor-principal.wide-container {
    max-width: 1350px;
    margin-top: 1rem;
}

.page-perfil .bloque-seccion {
    background: linear-gradient(180deg, #171717 0%, #141414 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 1rem 1.1rem;
    margin-bottom: 0.95rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.page-perfil .titulo-separador {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0.1rem 0 0.95rem;
}

.page-perfil .titulo-separador::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.page-perfil .pildora-titulo {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 999px;
    background: #111318;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #f4f4f4;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.page-perfil .vitrina-medallas {
    justify-content: center;
    padding: 8px 0 2px;
}

.page-perfil .carrusel-wrapper {
    gap: 0;
}

.page-perfil .btn-carrusel {
    width: 32px;
    height: 32px;
    background: transparent;
    color: #b8b8b8;
    border-radius: 50%;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.page-perfil .btn-carrusel:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.page-perfil #favoritos-container.galeria-items,
.page-perfil .bloque-seccion .galeria-items {
    gap: 8px;
    padding: 6px 0 2px;
}


.page-perfil .tarjeta-resena-universal {
    border-radius: 8px;
    background: #21233a;
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 0.9rem;
    min-height: auto;
}

.page-perfil .tarjeta-resena-universal .contenido-wrap {
    height: auto;
    overflow: visible;
}

.page-perfil .tarjeta-resena-universal .contenido-wrap::after {
    display: none;
}

.page-perfil .footer-full-width {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px) {
    .page-perfil .bloque-seccion {
        padding: 0.8rem;
        border-radius: 8px;
    }

    .page-perfil .btn-carrusel {
        display: none;
    }

}